fix: 仅按 Token 阈值压缩上下文

- EasyFlow 调用方忽略新旧消息数压缩配置

- 保留最小 Token 阈值与最近消息保留数量

- 隐藏智能体配置页的消息数阈值
This commit is contained in:
2026-07-23 19:49:25 +08:00
parent 8b4ba65e1c
commit 417e846cbd
3 changed files with 60 additions and 34 deletions

View File

@@ -106,29 +106,6 @@ const emit = defineEmits<{ change: [] }>();
/>
</ElFormItem>
<div class="agent-form__grid">
<ElFormItem>
<template #label>
<span class="agent-form__label">
消息数触发阈值
<ElTooltip
content="工作记忆里的消息条数达到该值时,会触发上下文压缩;用户消息和智能体消息都会计入。"
effect="light"
placement="top"
>
<ElIcon class="agent-form__info" aria-label="消息数触发阈值说明">
<InfoFilled />
</ElIcon>
</ElTooltip>
</span>
</template>
<ElInputNumber
v-model="agent.memoryConfigJson!.compressionParameter.msgThreshold"
:min="1"
:max="100"
controls-position="right"
@change="emit('change')"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<span class="agent-form__label">