Skip to content

Commit e3caad8

Browse files
author
linyuan.yang
committed
up
1 parent 7e3aa34 commit e3caad8

8 files changed

Lines changed: 17 additions & 14 deletions

File tree

packages/admin/src/i18n/en.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export default {
213213
edit_title: 'Edit Model',
214214
model: 'Model',
215215
temperature: 'Temperature',
216-
max_tokens: 'Max Tokens',
216+
max_tokens: 'Max Output Tokens',
217217
no_limit: 'No limit',
218218
name_placeholder: 'e.g. openai-gpt4',
219219
confirm_delete: 'Delete model "{name}"?',
@@ -224,6 +224,8 @@ export default {
224224
context_window: 'Context Window',
225225
thinking: 'Thinking',
226226
thinking_none: 'Default (off)',
227+
thinking_adaptive: 'Adaptive (think when needed)',
228+
thinking_enabled: 'Always on',
227229
thinking_budget: 'Budget Tokens',
228230
prompt_caching: 'Prompt Caching',
229231
prompt_caching_desc: 'Enable prompt caching (saves ~90% input cost for multi-turn conversations)',

packages/admin/src/i18n/zh.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export default {
213213
edit_title: '编辑模型',
214214
model: 'Model',
215215
temperature: 'Temperature',
216-
max_tokens: 'Max Tokens',
216+
max_tokens: '最大输出 Tokens',
217217
no_limit: '不限制',
218218
name_placeholder: '如 openai-gpt4',
219219
confirm_delete: '确定要删除模型 "{name}" 吗?',
@@ -224,6 +224,8 @@ export default {
224224
context_window: '上下文窗口',
225225
thinking: '思考模式',
226226
thinking_none: '默认(关闭)',
227+
thinking_adaptive: '自适应(按需思考)',
228+
thinking_enabled: '始终开启',
227229
thinking_budget: '思考 Token 预算',
228230
prompt_caching: '提示缓存',
229231
prompt_caching_desc: '启用 Prompt Caching(多轮对话可节省约 90% 输入费用)',

packages/admin/src/views/ModelsView.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,8 @@ async function refresh() {
294294
<label>{{ t('models.thinking') }}</label>
295295
<select v-model="thinkingType">
296296
<option value="">{{ t('models.thinking_none') }}</option>
297-
<option value="adaptive">adaptive</option>
298-
<option value="enabled">enabled</option>
299-
<option value="disabled">disabled</option>
297+
<option value="adaptive">{{ t('models.thinking_adaptive') }}</option>
298+
<option value="enabled">{{ t('models.thinking_enabled') }}</option>
300299
</select>
301300
</div>
302301
<div v-if="isAnthropic && thinkingType === 'enabled'" class="form-group">

packages/admin/src/views/agents/AgentModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ defineExpose({ open })
257257
<span style="font-size:0.78rem;color:var(--color-text-muted,#888);margin-top:2px">{{ t('agents.compact_model_hint') }}</span>
258258
</div>
259259

260-
<!-- Compact Prompt (配置了 compactModel 时,Generative/ACP 不支持) -->
261-
<div class="form-group" v-if="form.type !== AgentMode.Generative && form.type !== AgentMode.ACP && form.compactModel">
260+
<!-- Compact Prompt (Generative/ACP 不支持) -->
261+
<div class="form-group" v-if="form.type !== AgentMode.Generative && form.type !== AgentMode.ACP">
262262
<label>{{ t('agents.compact_prompt') }}</label>
263263
<textarea v-model="form.compactPrompt" rows="3" :placeholder="t('agents.compact_prompt_placeholder')" />
264264
</div>

packages/channel.xiaoai/tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
0 Bytes
Binary file not shown.

packages/sbot/src/Session/BuiltInCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class CompactCommand implements ICommand {
120120

121121
const result = await compactor.compact(allMessages);
122122
const compactedIds = allMessages.filter(m => m.id != null).map(m => m.id!);
123-
await saver.applyCompaction(compactedIds, ConversationCompactor.buildPostCompactMessage(result.summary));
123+
await saver.applyCompaction(compactedIds, ConversationCompactor.buildPostCompactMessage(result.summary, false));
124124
return `压缩完成:${allMessages.length} 条消息已压缩`;
125125
} finally {
126126
await saver.dispose();

packages/scorpio.ai/src/Saver/ConversationCompactor.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ export class ConversationCompactor {
7979
return { summary };
8080
}
8181

82-
static buildPostCompactMessage(summary: string): StoredMessage {
82+
static buildPostCompactMessage(summary: string, continuation = true): StoredMessage {
83+
const content = continuation
84+
? `[对话摘要]\n${summary}\n\n${POST_COMPACT_CONTINUATION}`
85+
: `[对话摘要]\n${summary}`;
8386
return {
84-
message: {
85-
role: MessageRole.Human,
86-
content: `[对话摘要]\n${summary}\n\n${POST_COMPACT_CONTINUATION}`,
87-
},
87+
message: { role: MessageRole.Human, content },
8888
createdAt: Math.floor(Date.now() / 1000),
8989
};
9090
}

0 commit comments

Comments
 (0)