dsh-switchman 1.10.2 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +5 -4
- package/README.es.md +5 -4
- package/README.fr.md +5 -4
- package/README.it.md +5 -4
- package/README.ja.md +5 -4
- package/README.ko.md +5 -4
- package/README.md +14 -5
- package/README.pt.md +5 -4
- package/README.ru.md +5 -4
- package/README.zh-TW.md +5 -4
- package/README.zh.md +5 -4
- package/client.js +323 -40
- package/cordis.patch.yml +23 -20
- package/host/config.js +51 -7
- package/host/context-trim/fork.js +5 -1
- package/host/context-trim/index.js +329 -178
- package/host/context-trim/metrics.js +7 -7
- package/host/context-trim/state.js +351 -50
- package/host/context-trim/summarizer.js +147 -33
- package/host/context-trim/surface.js +415 -11
- package/host/context-trim/trigger.js +170 -51
- package/host/context-trim/view.js +144 -20
- package/host/context-watch.js +80 -73
- package/host/routes.js +64 -4
- package/package.json +2 -2
package/README.zh-TW.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
dsh-switchman 是一個 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)外掛。裝上之後,主模型從「親自幹活」變成調度員:量水位、選車道、派任務、盯驗收。它不是新模型,是一套掛在 DSH 上的調度規程加一個設定頁,一共做八件事:
|
|
16
16
|
|
|
17
|
-
**1. 上下文水位:長對話不撐爆。** 每輪即時統計對話 token,三條水位線逐級加碼:80k(soft,可調)提醒「該委派了」;
|
|
17
|
+
**1. 上下文水位:長對話不撐爆。** 每輪即時統計對話 token,三條水位線逐級加碼:80k(soft,可調)提醒「該委派了」;95k(hard)收緊單次讀取預算、引導收尾;150k(force)自動交接——寫交接文件(附加式對話日誌本身就是完整備份)、壓縮上下文、喚醒續跑,任務不斷線。交接那一刻還在跑的背景子代理也不會丟:id、任務、報告路徑都寫進交接文件,續跑的對話知道去哪收報告,不會重複派工。每個子代理自帶獨立硬上限,到頂寫完 HANDOFF 摘要退場。自動干預不合手時可臨時接管:`/ctx-pause` 停掉全部水位動作(量測照跑、尾部水位線轉成 paused,只是不動手),`/ctx-resume` 隨時恢復——重新啟動 DSH 後干預也會自動回來,是臨時放手,不是永久關閉;`/ctx-handover` 不等水位到頂,主動發起同一次交接:寫交接文件、壓縮上下文、喚醒續跑(對話先被引導到閒置邊界,結果可能要等幾分鐘)。
|
|
18
18
|
|
|
19
19
|
**2. 六個派發池:什麼活配什麼模型。** 輕量池(批次小活)、機械池(模板化改寫)、主力池(日常編碼)、高難池(高難推理與大規模重構)、多模態池(看圖)、複審池(獨立驗證)。設定頁裡勾候選、排優先順序、標 S/A/B/C 級,還能給每條路線單獨釘選思考強度——強度下拉來自該模型真實支援的級別,不是通用三級。主模型每輪提示詞裡都帶著一張 `[SWITCHMAN:POOLS]` 推薦表,照表派工。執行模式三態:關閉 / 建議 / 強制(強制 = 池外模型直接拒絕)。
|
|
20
20
|
|
|
@@ -86,7 +86,7 @@ dsh-switchman 是一個 [DeepSeek Harness](https://github.com/deepseek-ai/deepse
|
|
|
86
86
|
bash <安裝目錄>/skills/db-query/scripts/setup.sh
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
**分類器選型建議**:若要在本機部署決策模型,建議用 Ollama 執行 `
|
|
89
|
+
**分類器選型建議**:若要在本機部署決策模型,建議用 Ollama 執行 `d3:4b-mxfp8`:分類器類型選「決策端點(systemone)」,端點填 `http://127.0.0.1:11434/v1/systemone`,模型名稱填 `d3:4b-mxfp8`。若走 LLM 目錄的 chat 分類器,建議選雲端小模型,或不帶思考(推理)能力的本機小模型——關閉思考可同時壓低延遲與分類逾時失敗率。
|
|
90
90
|
|
|
91
91
|
## 預設配置
|
|
92
92
|
|
|
@@ -96,7 +96,7 @@ bash <安裝目錄>/skills/db-query/scripts/setup.sh
|
|
|
96
96
|
|
|
97
97
|
**派發池**:六條泳道(economy/mechanical/main/hard/vision/review)候選均為空(= 用系統預設模型,不干預);手動排序與 effort 釘選均為關/空;`dispatchEnforce` = `advice`(建議不強制)。
|
|
98
98
|
|
|
99
|
-
**上下文水位**:soft `80000` / hard `
|
|
99
|
+
**上下文水位**:soft `80000` / hard `95000` / force `150000` tokens;單次讀取預算 `3000`;超預算行為 `cap`(截斷加警告);`wmAutoHandover` = 開(force 級自動寫交接文件+壓縮);子代理硬上限 = 開(共享 150k)。
|
|
100
100
|
|
|
101
101
|
**Agent Teams**:`teamsMode` = 關;`syncWhitelist` = 關(兩者相互獨立)。
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ bash <安裝目錄>/skills/db-query/scripts/setup.sh
|
|
|
104
104
|
|
|
105
105
|
**上下文裁剪**:`trimEnabled` = 開;`trimMode` = `auto`(全自動);增長閘門 `22500` token + 增量 `50000` token;壓力 `60%` / 緊急 `95%`;保護尾部 `6` 則;折疊節奏上限每小時 `6` 次;side model 未設定(繼承對話模型)——詳見下文「自動上下文裁剪」一節。
|
|
106
106
|
|
|
107
|
-
**開箱要點**:① 意圖識別開箱不可用是有意設計,三步開啟(分類器、候選、開關);② Auto 有效視窗開箱即為 200000——護欄保證 0.8×視窗 ≥ force 級(150000),核心壓縮線(160000)永遠在平滑交接線(150000)之後;③ 開箱最有感的是水位三件套:80k 提醒委派 /
|
|
107
|
+
**開箱要點**:① 意圖識別開箱不可用是有意設計,三步開啟(分類器、候選、開關);② Auto 有效視窗開箱即為 200000——護欄保證 0.8×視窗 ≥ force 級(150000),核心壓縮線(160000)永遠在平滑交接線(150000)之後;③ 開箱最有感的是水位三件套:80k 提醒委派 / 95k 收斂讀取 / 150k 自動交接(寫文件+壓縮),無須任何設定。
|
|
108
108
|
|
|
109
109
|
## 自動上下文裁剪
|
|
110
110
|
|
|
@@ -130,6 +130,7 @@ bash <安裝目錄>/skills/db-query/scripts/setup.sh
|
|
|
130
130
|
| `trimProtectedTail` | `6` | 最後 N 則訊息永不折疊。 |
|
|
131
131
|
| `trimMaxFoldsPerHour` | `6` | 每滾動小時 side model 折疊的節奏上限(緊急級豁免)。 |
|
|
132
132
|
| `trimSideModel` | 未設定 | 寫摘要的 side model 路由。留空 = 繼承對話目前模型。 |
|
|
133
|
+
| `trimFoldFallbackModel` | 未設定 | 摘要 side model 失敗時摺疊改用的重試路由;壓力檔仍失敗則退回機械摺疊。留空 = 無備援。盡量選擇冷卻、風控與並行餘量充足的路由。 |
|
|
133
134
|
| `trimStateDir` | 未設定 | 折疊狀態目錄覆蓋。留空 = `<dshHome>/.dsh-switchman/state/trim/`。 |
|
|
134
135
|
| `surfaceFold` | `true` | 把已提交的 fold 送上對話表面(shadow-price 計量事件 + `surfaceOp` replace 事件對)。關閉則維持僅拼接的 view。 |
|
|
135
136
|
|
package/README.zh.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
dsh-switchman 是一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)插件。装上之后,主模型从「亲自干活」变成调度员:量水位、选车道、派任务、盯验收。它不是新模型,是一套挂在 DSH 上的调度规程加一个配置界面,一共做八件事:
|
|
16
16
|
|
|
17
|
-
**1. 上下文水位:长会话不撑爆。** 每轮实时统计会话 token,三条水位线逐级加码:80k(soft,可调)提醒「该委派了」;
|
|
17
|
+
**1. 上下文水位:长会话不撑爆。** 每轮实时统计会话 token,三条水位线逐级加码:80k(soft,可调)提醒「该委派了」;95k(hard)收紧单次读取预算、引导收尾;150k(force)自动交接——写交接文档(追加式会话日志本身就是完整备份)、压缩上下文、唤醒续跑,任务不断线。交接那一刻还在跑的后台子智能体也不会丢:id、任务、报告路径都写进交接文档,续跑的会话知道去哪收报告,不会重复派活。每个子智能体自带独立硬顶,到顶写完 HANDOFF 摘要退场。自动干预不合手时可临时接管:`/ctx-pause` 停掉全部水位动作(测量照跑、尾部水位行转成 paused,只是不动手),`/ctx-resume` 随时恢复——重启 DSH 后干预也会自动回来,是临时放手,不是永久关闭;`/ctx-handover` 不等水位到顶,主动发起同一次交接:写交接文档、压缩上下文、唤醒续跑(会话先被引导到空闲边界,结果可能要等几分钟)。
|
|
18
18
|
|
|
19
19
|
**2. 六个派发池:什么活配什么模型。** 轻量池(批量小活)、机械池(模板化改写)、主力池(日常编码)、高难池(高难推理与大规模重构)、多模态池(看图)、复审池(独立验证)。设置页里勾候选、排优先级、标 S/A/B/C 档,还能给每条路线单独钉思考强度——档位下拉来自该模型真实支持的级别,不是通用三档。主模型每轮提示词里都带着一张 `[SWITCHMAN:POOLS]` 推荐表,照表派活。执行模式三态:关闭 / 建议 / 强制(强制 = 池外模型直接拒绝)。
|
|
20
20
|
|
|
@@ -86,7 +86,7 @@ dsh-switchman 是一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepse
|
|
|
86
86
|
bash <安装目录>/skills/db-query/scripts/setup.sh
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
**分类器选型建议**:若要本地部署决策模型,推荐用 Ollama 运行 `
|
|
89
|
+
**分类器选型建议**:若要本地部署决策模型,推荐用 Ollama 运行 `d3:4b-mxfp8`:分类器类型选「决策端点(systemone)」,端点填 `http://127.0.0.1:11434/v1/systemone`,模型名填 `d3:4b-mxfp8`。若走 LLM 目录的 chat 分类器,推荐云端小模型,或不带思考(推理)能力的本地小模型——关闭思考可同时压低延迟与分类超时失败率。
|
|
90
90
|
|
|
91
91
|
## 默认配置
|
|
92
92
|
|
|
@@ -96,7 +96,7 @@ bash <安装目录>/skills/db-query/scripts/setup.sh
|
|
|
96
96
|
|
|
97
97
|
**派发池**:六条泳道(economy/mechanical/main/hard/vision/review)候选均为空(= 用系统默认模型,不干预);手动排序与 effort 钉选均为关/空;`dispatchEnforce` = `advice`(建议不强制)。
|
|
98
98
|
|
|
99
|
-
**上下文水位**:soft `80000` / hard `
|
|
99
|
+
**上下文水位**:soft `80000` / hard `95000` / force `150000` tokens;单次读取预算 `3000`;超预算行为 `cap`(截断加警告);`wmAutoHandover` = 开(force 档自动写交接文档+压缩);子会话硬顶 = 开(共享 150k)。
|
|
100
100
|
|
|
101
101
|
**Agent Teams**:`teamsMode` = 关;`syncWhitelist` = 关(两者相互独立)。
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ bash <安装目录>/skills/db-query/scripts/setup.sh
|
|
|
104
104
|
|
|
105
105
|
**上下文裁剪**:`trimEnabled` = 开;`trimMode` = `auto`(全自动);增长闸门 `22500` token + 增量 `50000` token;压力 `60%` / 紧急 `95%`;保护尾部 `6` 条;折叠节奏上限每小时 `6` 次;side model 未设置(继承会话模型)——详见下文「自动上下文裁剪」一节。
|
|
106
106
|
|
|
107
|
-
**开箱要点**:① 意图识别开箱不可用是有意设计,三步开启(分类器、候选、开关);② Auto 有效窗口开箱即为 200000——护栏保证 0.8×窗口 ≥ force 档(150000),核心压缩线(160000)永远在平滑交接线(150000)之后;③ 开箱最有感的是水位三件套:80k 提醒委派 /
|
|
107
|
+
**开箱要点**:① 意图识别开箱不可用是有意设计,三步开启(分类器、候选、开关);② Auto 有效窗口开箱即为 200000——护栏保证 0.8×窗口 ≥ force 档(150000),核心压缩线(160000)永远在平滑交接线(150000)之后;③ 开箱最有感的是水位三件套:80k 提醒委派 / 95k 收敛读取 / 150k 自动交接(写文档+压缩),无需任何设置。
|
|
108
108
|
|
|
109
109
|
## 自动上下文裁剪
|
|
110
110
|
|
|
@@ -130,6 +130,7 @@ bash <安装目录>/skills/db-query/scripts/setup.sh
|
|
|
130
130
|
| `trimProtectedTail` | `6` | 最后 N 条消息永不折叠。 |
|
|
131
131
|
| `trimMaxFoldsPerHour` | `6` | 每滚动小时 side model 折叠的节奏上限(紧急档豁免)。 |
|
|
132
132
|
| `trimSideModel` | 未设置 | 写摘要的 side model 路由。留空 = 继承会话当前模型。 |
|
|
133
|
+
| `trimFoldFallbackModel` | 未设置 | 摘要 side model 失败时折叠改用的重试路由;压力档仍失败则退回机械折叠。留空 = 无兜底。尽量选择冷却、风控与并发余量充足的路由。 |
|
|
133
134
|
| `trimStateDir` | 未设置 | 折叠状态目录覆盖。留空 = `<dshHome>/.dsh-switchman/state/trim/`。 |
|
|
134
135
|
| `surfaceFold` | `true` | 把已提交的 fold 送上会话表面(shadow-price 计量事件 + `surfaceOp` replace 事件对)。关闭则保持仅拼接的 view。 |
|
|
135
136
|
|
package/client.js
CHANGED
|
@@ -265,13 +265,22 @@ window.__ModuleLoader__.load({
|
|
|
265
265
|
|
|
266
266
|
/** Numeric trim fields: settings field, schema minimum, and the
|
|
267
267
|
* Host-side default (also the fallback for malformed stored
|
|
268
|
-
* values). Percent fields cap at 100 like their Host schema.
|
|
268
|
+
* values). Percent fields cap at 100 like their Host schema.
|
|
269
|
+
* MUST mirror host/routes.js TRIM_NUMBER_FIELDS bounds — a field
|
|
270
|
+
* coerced server-side but never sent here fails every fenced
|
|
271
|
+
* write (and vice versa). */
|
|
269
272
|
const TRIM_NUMBER_FIELDS = [
|
|
270
273
|
{ field: 'trimGrowthTokens', min: 1000, def: 22500 },
|
|
271
274
|
{ field: 'trimIncrementTokens', min: 1000, def: 50000 },
|
|
272
275
|
{ field: 'trimPressurePercent', min: 5, max: 100, def: 60 },
|
|
273
276
|
{ field: 'trimEmergencyPercent', min: 5, max: 100, def: 95 },
|
|
274
277
|
{ field: 'trimWindowTokens', min: 0, def: 0 },
|
|
278
|
+
{ field: 'trimProtectedTail', min: 0, max: 100, def: 6 },
|
|
279
|
+
{ field: 'trimMaxFoldsPerHour', min: 1, max: 60, def: 6 },
|
|
280
|
+
{ field: 'trimLadderT2Tokens', min: 1000, def: 8000 },
|
|
281
|
+
{ field: 'trimLadderT2MinBlocks', min: 2, max: 200, def: 3 },
|
|
282
|
+
{ field: 'trimLadderT3Tokens', min: 1000, def: 6000 },
|
|
283
|
+
{ field: 'trimLadderT3MinBlocks', min: 2, max: 200, def: 2 },
|
|
275
284
|
];
|
|
276
285
|
|
|
277
286
|
/** Dictionary keys per numeric trim row. */
|
|
@@ -293,6 +302,30 @@ window.__ModuleLoader__.load({
|
|
|
293
302
|
label: 'trimWindowLabel',
|
|
294
303
|
help: 'trimWindowHelp',
|
|
295
304
|
},
|
|
305
|
+
trimProtectedTail: {
|
|
306
|
+
label: 'trimProtectedTailLabel',
|
|
307
|
+
help: 'trimProtectedTailHelp',
|
|
308
|
+
},
|
|
309
|
+
trimMaxFoldsPerHour: {
|
|
310
|
+
label: 'trimMaxFoldsPerHourLabel',
|
|
311
|
+
help: 'trimMaxFoldsPerHourHelp',
|
|
312
|
+
},
|
|
313
|
+
trimLadderT2Tokens: {
|
|
314
|
+
label: 'trimLadderT2TokensLabel',
|
|
315
|
+
help: 'trimLadderT2TokensHelp',
|
|
316
|
+
},
|
|
317
|
+
trimLadderT2MinBlocks: {
|
|
318
|
+
label: 'trimLadderT2MinBlocksLabel',
|
|
319
|
+
help: 'trimLadderT2MinBlocksHelp',
|
|
320
|
+
},
|
|
321
|
+
trimLadderT3Tokens: {
|
|
322
|
+
label: 'trimLadderT3TokensLabel',
|
|
323
|
+
help: 'trimLadderT3TokensHelp',
|
|
324
|
+
},
|
|
325
|
+
trimLadderT3MinBlocks: {
|
|
326
|
+
label: 'trimLadderT3MinBlocksLabel',
|
|
327
|
+
help: 'trimLadderT3MinBlocksHelp',
|
|
328
|
+
},
|
|
296
329
|
};
|
|
297
330
|
|
|
298
331
|
/** Every settings field this page edits, in mutate order. */
|
|
@@ -311,6 +344,11 @@ window.__ModuleLoader__.load({
|
|
|
311
344
|
// Context trim (design: context-trim-port-design.md).
|
|
312
345
|
'trimMode',
|
|
313
346
|
'trimEnabled',
|
|
347
|
+
'trimLadderEnabled',
|
|
348
|
+
'surfaceFold',
|
|
349
|
+
'trimSideModel',
|
|
350
|
+
'trimFoldFallbackModel',
|
|
351
|
+
'trimStateDir',
|
|
314
352
|
...TRIM_NUMBER_FIELDS.map(({ field }) => field),
|
|
315
353
|
'teamsMode',
|
|
316
354
|
'syncWhitelist',
|
|
@@ -482,6 +520,15 @@ window.__ModuleLoader__.load({
|
|
|
482
520
|
? value.trimMode
|
|
483
521
|
: 'auto',
|
|
484
522
|
trimEnabled: bool('trimEnabled', true),
|
|
523
|
+
trimLadderEnabled: bool('trimLadderEnabled', true),
|
|
524
|
+
surfaceFold: bool('surfaceFold', true),
|
|
525
|
+
trimSideModel:
|
|
526
|
+
sanitizeRoute(value?.trimSideModel) ??
|
|
527
|
+
({ provider: '', model: '' }),
|
|
528
|
+
trimFoldFallbackModel:
|
|
529
|
+
sanitizeRoute(value?.trimFoldFallbackModel) ??
|
|
530
|
+
({ provider: '', model: '' }),
|
|
531
|
+
trimStateDir: string('trimStateDir'),
|
|
485
532
|
...Object.fromEntries(
|
|
486
533
|
TRIM_NUMBER_FIELDS.map((spec) => [spec.field, number(spec)]),
|
|
487
534
|
),
|
|
@@ -561,6 +608,11 @@ window.__ModuleLoader__.load({
|
|
|
561
608
|
wmSubagentCap: values.wmSubagentCap,
|
|
562
609
|
trimMode: values.trimMode,
|
|
563
610
|
trimEnabled: values.trimEnabled,
|
|
611
|
+
trimLadderEnabled: values.trimLadderEnabled,
|
|
612
|
+
surfaceFold: values.surfaceFold,
|
|
613
|
+
trimSideModel: routeKey(values.trimSideModel),
|
|
614
|
+
trimFoldFallbackModel: routeKey(values.trimFoldFallbackModel),
|
|
615
|
+
trimStateDir: values.trimStateDir,
|
|
564
616
|
...Object.fromEntries(
|
|
565
617
|
TRIM_NUMBER_FIELDS.map(({ field }) => [field, values[field]]),
|
|
566
618
|
),
|
|
@@ -853,6 +905,30 @@ window.__ModuleLoader__.load({
|
|
|
853
905
|
'空闲时何时把历史折叠为摘要:off = 从不折叠,advisory = 仅模型主动调用,auto = 自动折叠。',
|
|
854
906
|
trimEnabledLabel: '启用自动裁剪',
|
|
855
907
|
trimEnabledHelp: '上下文裁剪层的总开关。',
|
|
908
|
+
trimLadderEnabledLabel: '阶梯折叠(T1/T2/T3)',
|
|
909
|
+
trimLadderEnabledHelp: '把累积的 T1 摘要再蒸馏为 T2、T2 再凝聚为 T3,让长会话视图保持平稳。',
|
|
910
|
+
surfaceFoldLabel: '把折叠写入会话表面',
|
|
911
|
+
surfaceFoldHelp: '追加宿主风格的替换事件,让折叠在冻结派发下也能到达线上。建议保持开启。',
|
|
912
|
+
trimSideModelLabel: '摘要模型',
|
|
913
|
+
trimSideModelHelp: '折叠摘要使用的模型路由;默认「跟随会话模型」。阶梯蒸馏同样使用该路由。',
|
|
914
|
+
trimFollowSession: '跟随会话模型',
|
|
915
|
+
trimFoldFallbackModelLabel: '折叠异常兜底模型',
|
|
916
|
+
trimFoldFallbackModelHelp: '摘要模型调用失败时改用该模型重试;仍失败则压力折叠退回机械折叠。尽量选择没有冷却、风控或并发限制的模型,避免与主会话共用同一账号。留空 = 无兜底。',
|
|
917
|
+
trimFallbackUnset: '未设置(失败时直接机械折叠)',
|
|
918
|
+
trimStateDirLabel: '账本目录',
|
|
919
|
+
trimStateDirHelp: '留空 = 默认的裁剪状态目录。',
|
|
920
|
+
trimProtectedTailLabel: '保护尾部(条数)',
|
|
921
|
+
trimProtectedTailHelp: '最后 N 条消息永不折叠。',
|
|
922
|
+
trimMaxFoldsPerHourLabel: '每小时折叠上限',
|
|
923
|
+
trimMaxFoldsPerHourHelp: '带模型调用的折叠节奏上限(紧急机械折叠不受限)。',
|
|
924
|
+
trimLadderT2TokensLabel: '阶梯 T2 质量(token)',
|
|
925
|
+
trimLadderT2TokensHelp: 'T1 摘要总质量达到该值后蒸馏为一个 T2。',
|
|
926
|
+
trimLadderT2MinBlocksLabel: '阶梯 T2 块数',
|
|
927
|
+
trimLadderT2MinBlocksHelp: '一次 T2 蒸馏至少合并的活跃 T1 块数。',
|
|
928
|
+
trimLadderT3TokensLabel: '阶梯 T3 质量(token)',
|
|
929
|
+
trimLadderT3TokensHelp: 'T2 摘要总质量达到该值后凝聚为一个 T3。',
|
|
930
|
+
trimLadderT3MinBlocksLabel: '阶梯 T3 块数',
|
|
931
|
+
trimLadderT3MinBlocksHelp: '一次 T3 凝聚至少合并的活跃 T2 块数。',
|
|
856
932
|
trimGrowthLabel: '增长阈值(token)',
|
|
857
933
|
trimGrowthHelp: '视图较上次折叠增长超过该 token 数后触发折叠。',
|
|
858
934
|
trimIncrementLabel: '增量阈值(token)',
|
|
@@ -903,7 +979,7 @@ window.__ModuleLoader__.load({
|
|
|
903
979
|
intentClassifierEndpointLabel: '决策端点',
|
|
904
980
|
intentClassifierEndpointHelp: '分类器类型为「决策端点」时直接调用的 /v1/systemone 完整 URL(不经 llm 提供方)',
|
|
905
981
|
intentSystemoneModelLabel: '决策端点模型',
|
|
906
|
-
intentSystemoneModelHelp: '发送到决策端点的 model 参数(如
|
|
982
|
+
intentSystemoneModelHelp: '发送到决策端点的 model 参数(如 d3:4b-mxfp8),自由填写,无需存在于模型供应商列表',
|
|
907
983
|
intentEndpointUnset: '未设置',
|
|
908
984
|
intentCandidatesLabel: '候选模型',
|
|
909
985
|
intentCandidatesHelp:
|
|
@@ -1093,6 +1169,36 @@ window.__ModuleLoader__.load({
|
|
|
1093
1169
|
'When to fold history into summaries at idle: off = never, advisory = model-invoked only, auto = automatic folds.',
|
|
1094
1170
|
trimEnabledLabel: 'Enable auto-trim',
|
|
1095
1171
|
trimEnabledHelp: 'Master switch for the context-trim layer.',
|
|
1172
|
+
trimLadderEnabledLabel: 'Ladder folding (T1/T2/T3)',
|
|
1173
|
+
trimLadderEnabledHelp:
|
|
1174
|
+
'Distill accumulated T1 summaries into T2, and T2 into T3, keeping long sessions flat.',
|
|
1175
|
+
surfaceFoldLabel: 'Ship folds to the session surface',
|
|
1176
|
+
surfaceFoldHelp:
|
|
1177
|
+
'Append host-style replace events so folds reach the wire even on frozen dispatches. Leave on.',
|
|
1178
|
+
trimSideModelLabel: 'Summarizer model',
|
|
1179
|
+
trimSideModelHelp:
|
|
1180
|
+
'Route for fold summaries; defaults to following the session model. Also used by ladder distillations.',
|
|
1181
|
+
trimFollowSession: 'Follow session model',
|
|
1182
|
+
trimFoldFallbackModelLabel: 'Fold fallback model',
|
|
1183
|
+
trimFoldFallbackModelHelp:
|
|
1184
|
+
'When the summary route fails, the fold retries on this model before degrading a pressure fold to a mechanical one. Prefer a model with headroom on cooldowns, risk control, and concurrency limits — avoid sharing the pinned account with the main session. Empty = no fallback leg.',
|
|
1185
|
+
trimFallbackUnset: 'Unset (failed folds go straight to mechanical)',
|
|
1186
|
+
trimStateDirLabel: 'Ledger directory',
|
|
1187
|
+
trimStateDirHelp: 'Empty = the default per-host trim state directory.',
|
|
1188
|
+
trimProtectedTailLabel: 'Protected tail (messages)',
|
|
1189
|
+
trimProtectedTailHelp: 'The last N messages are never folded.',
|
|
1190
|
+
trimMaxFoldsPerHourLabel: 'Max folds per hour',
|
|
1191
|
+
trimMaxFoldsPerHourHelp: 'Cadence cap for side-model folds (emergency mechanical folds exempt).',
|
|
1192
|
+
trimLadderT2TokensLabel: 'Ladder T2 mass (tokens)',
|
|
1193
|
+
trimLadderT2TokensHelp:
|
|
1194
|
+
'Distill T1 summaries into one T2 once their combined mass reaches this.',
|
|
1195
|
+
trimLadderT2MinBlocksLabel: 'Ladder T2 blocks',
|
|
1196
|
+
trimLadderT2MinBlocksHelp: 'Minimum active T1 blocks a T2 distillation merges.',
|
|
1197
|
+
trimLadderT3TokensLabel: 'Ladder T3 mass (tokens)',
|
|
1198
|
+
trimLadderT3TokensHelp:
|
|
1199
|
+
'Condense T2 summaries into one T3 once their combined mass reaches this.',
|
|
1200
|
+
trimLadderT3MinBlocksLabel: 'Ladder T3 blocks',
|
|
1201
|
+
trimLadderT3MinBlocksHelp: 'Minimum active T2 blocks a T3 condensation merges.',
|
|
1096
1202
|
trimGrowthLabel: 'Growth threshold (tokens)',
|
|
1097
1203
|
trimGrowthHelp:
|
|
1098
1204
|
'Fold once the view grows this many tokens since the last fold.',
|
|
@@ -1147,7 +1253,7 @@ window.__ModuleLoader__.load({
|
|
|
1147
1253
|
intentClassifierEndpointLabel: 'Decision endpoint',
|
|
1148
1254
|
intentClassifierEndpointHelp: 'Full /v1/systemone URL called directly when the classifier kind is the decision endpoint (no llm provider)',
|
|
1149
1255
|
intentSystemoneModelLabel: 'Decision endpoint model',
|
|
1150
|
-
intentSystemoneModelHelp: 'Model name sent to the decision endpoint (e.g.
|
|
1256
|
+
intentSystemoneModelHelp: 'Model name sent to the decision endpoint (e.g. d3:4b-mxfp8); free text, no provider entry needed',
|
|
1151
1257
|
intentEndpointUnset: 'Not set',
|
|
1152
1258
|
intentCandidatesLabel: 'Candidates',
|
|
1153
1259
|
intentCandidatesHelp:
|
|
@@ -1336,6 +1442,30 @@ window.__ModuleLoader__.load({
|
|
|
1336
1442
|
'閒置時何時將歷史摺疊為摘要:off = 從不摺疊,advisory = 僅模型主動呼叫,auto = 自動摺疊。',
|
|
1337
1443
|
trimEnabledLabel: '啟用自動裁剪',
|
|
1338
1444
|
trimEnabledHelp: '上下文裁剪層的總開關。',
|
|
1445
|
+
trimLadderEnabledLabel: '階梯摺疊(T1/T2/T3)',
|
|
1446
|
+
trimLadderEnabledHelp: '把累積的 T1 摘要再蒸餾為 T2、T2 再凝聚為 T3,讓長會話檢視保持平穩。',
|
|
1447
|
+
surfaceFoldLabel: '把摺疊寫入會話表面',
|
|
1448
|
+
surfaceFoldHelp: '追加宿主風格的替換事件,讓摺疊在凍結派發下也能到達線上。建議保持開啟。',
|
|
1449
|
+
trimSideModelLabel: '摘要模型',
|
|
1450
|
+
trimSideModelHelp: '摺疊摘要使用的模型路由;預設「跟隨對話模型」。階梯蒸餾同樣使用該路由。',
|
|
1451
|
+
trimFollowSession: '跟隨對話模型',
|
|
1452
|
+
trimFoldFallbackModelLabel: '摺疊異常備援模型',
|
|
1453
|
+
trimFoldFallbackModelHelp: '摘要模型呼叫失敗時改用該模型重試;仍失敗則壓力摺疊退回機械摺疊。盡量選擇沒有冷卻、風控或並行限制的模型,避免與主對話共用同一帳號。留空 = 無備援。',
|
|
1454
|
+
trimFallbackUnset: '未設定(失敗時直接機械摺疊)',
|
|
1455
|
+
trimStateDirLabel: '帳本目錄',
|
|
1456
|
+
trimStateDirHelp: '留空 = 預設的裁剪狀態目錄。',
|
|
1457
|
+
trimProtectedTailLabel: '保護尾部(條數)',
|
|
1458
|
+
trimProtectedTailHelp: '最後 N 訊息永不摺疊。',
|
|
1459
|
+
trimMaxFoldsPerHourLabel: '每小時摺疊上限',
|
|
1460
|
+
trimMaxFoldsPerHourHelp: '帶模型呼叫的摺疊節奏上限(緊急機械摺疊不受限)。',
|
|
1461
|
+
trimLadderT2TokensLabel: '階梯 T2 質量(token)',
|
|
1462
|
+
trimLadderT2TokensHelp: 'T1 摘要總質量達到該值後蒸餾為一個 T2。',
|
|
1463
|
+
trimLadderT2MinBlocksLabel: '階梯 T2 塊數',
|
|
1464
|
+
trimLadderT2MinBlocksHelp: '一次 T2 蒸餾至少合併的活躍 T1 塊數。',
|
|
1465
|
+
trimLadderT3TokensLabel: '階梯 T3 質量(token)',
|
|
1466
|
+
trimLadderT3TokensHelp: 'T2 摘要總質量達到該值後凝聚為一個 T3。',
|
|
1467
|
+
trimLadderT3MinBlocksLabel: '階梯 T3 塊數',
|
|
1468
|
+
trimLadderT3MinBlocksHelp: '一次 T3 凝聚至少合併的活躍 T2 塊數。',
|
|
1339
1469
|
trimGrowthLabel: '增長閾值(token)',
|
|
1340
1470
|
trimGrowthHelp: '檢視較上次摺疊增長超過該 token 數後觸發摺疊。',
|
|
1341
1471
|
trimIncrementLabel: '增量閾值(token)',
|
|
@@ -1383,7 +1513,7 @@ window.__ModuleLoader__.load({
|
|
|
1383
1513
|
intentClassifierEndpointLabel: '決策端點',
|
|
1384
1514
|
intentClassifierEndpointHelp: '分類器類型為「決策端點」時直接呼叫的 /v1/systemone 完整 URL(不經 llm 提供方)',
|
|
1385
1515
|
intentSystemoneModelLabel: '決策端點模型',
|
|
1386
|
-
intentSystemoneModelHelp: '傳送到決策端點的 model 參數(如
|
|
1516
|
+
intentSystemoneModelHelp: '傳送到決策端點的 model 參數(如 d3:4b-mxfp8),自由填寫,無需存在於模型供應商清單',
|
|
1387
1517
|
intentEndpointUnset: '未設定',
|
|
1388
1518
|
intentCandidatesLabel: '候選模型',
|
|
1389
1519
|
intentCandidatesHelp:
|
|
@@ -1607,7 +1737,7 @@ window.__ModuleLoader__.load({
|
|
|
1607
1737
|
intentClassifierEndpointLabel: '判定エンドポイント',
|
|
1608
1738
|
intentClassifierEndpointHelp: '分類器の種類が判定エンドポイントのとき直接呼び出す /v1/systemone の完全 URL(LLM プロバイダ不要)',
|
|
1609
1739
|
intentSystemoneModelLabel: '決定エンドポイントのモデル',
|
|
1610
|
-
intentSystemoneModelHelp: '決定エンドポイントへ送る model パラメータ(例:
|
|
1740
|
+
intentSystemoneModelHelp: '決定エンドポイントへ送る model パラメータ(例: d3:4b-mxfp8)。自由入力で、プロバイダー一覧への登録は不要',
|
|
1611
1741
|
intentEndpointUnset: '未設定',
|
|
1612
1742
|
intentCandidatesLabel: '候補モデル',
|
|
1613
1743
|
intentCandidatesHelp:
|
|
@@ -1833,7 +1963,7 @@ window.__ModuleLoader__.load({
|
|
|
1833
1963
|
intentClassifierEndpointLabel: '판정 엔드포인트',
|
|
1834
1964
|
intentClassifierEndpointHelp: '분류기 종류가 판정 엔드포인트일 때 직접 호출하는 /v1/systemone 전체 URL(LLM 공급자 불필요)',
|
|
1835
1965
|
intentSystemoneModelLabel: '결정 엔드포인트 모델',
|
|
1836
|
-
intentSystemoneModelHelp: '결정 엔드포인트로 보내는 model 매개변수(예:
|
|
1966
|
+
intentSystemoneModelHelp: '결정 엔드포인트로 보내는 model 매개변수(예: d3:4b-mxfp8). 자유 입력이며 공급자 목록에 없어도 됨',
|
|
1837
1967
|
intentEndpointUnset: '미설정',
|
|
1838
1968
|
intentCandidatesLabel: '후보 모델',
|
|
1839
1969
|
intentCandidatesHelp:
|
|
@@ -2060,7 +2190,7 @@ window.__ModuleLoader__.load({
|
|
|
2060
2190
|
intentClassifierEndpointLabel: 'Entscheidungs-Endpunkt',
|
|
2061
2191
|
intentClassifierEndpointHelp: 'Vollständige /v1/systemone-URL, die direkt aufgerufen wird, wenn der Klassifikator-Typ der Entscheidungs-Endpunkt ist (ohne LLM-Provider)',
|
|
2062
2192
|
intentSystemoneModelLabel: 'Modell des Entscheidungsendpunkts',
|
|
2063
|
-
intentSystemoneModelHelp: 'Modelname, der an den Entscheidungsendpunkt gesendet wird (z. B.
|
|
2193
|
+
intentSystemoneModelHelp: 'Modelname, der an den Entscheidungsendpunkt gesendet wird (z. B. d3:4b-mxfp8); freier Text, kein Anbieter-Eintrag nötig',
|
|
2064
2194
|
intentEndpointUnset: 'Nicht festgelegt',
|
|
2065
2195
|
intentCandidatesLabel: 'Kandidaten',
|
|
2066
2196
|
intentCandidatesHelp:
|
|
@@ -2290,7 +2420,7 @@ window.__ModuleLoader__.load({
|
|
|
2290
2420
|
intentClassifierEndpointLabel: 'Endpoint de decisión',
|
|
2291
2421
|
intentClassifierEndpointHelp: 'URL /v1/systemone completa que se llama directamente cuando el tipo de clasificador es el endpoint de decisión (sin proveedor LLM)',
|
|
2292
2422
|
intentSystemoneModelLabel: 'Modelo del endpoint de decisión',
|
|
2293
|
-
intentSystemoneModelHelp: 'Parámetro model que se envía al endpoint de decisión (p. ej.
|
|
2423
|
+
intentSystemoneModelHelp: 'Parámetro model que se envía al endpoint de decisión (p. ej. d3:4b-mxfp8); texto libre, no necesita estar en la lista de proveedores',
|
|
2294
2424
|
intentEndpointUnset: 'Sin establecer',
|
|
2295
2425
|
intentCandidatesLabel: 'Candidatos',
|
|
2296
2426
|
intentCandidatesHelp:
|
|
@@ -2520,7 +2650,7 @@ window.__ModuleLoader__.load({
|
|
|
2520
2650
|
intentClassifierEndpointLabel: 'Endpoint de décision',
|
|
2521
2651
|
intentClassifierEndpointHelp: 'URL /v1/systemone complète appelée directement quand le type de classificateur est l\'endpoint de décision (sans fournisseur LLM)',
|
|
2522
2652
|
intentSystemoneModelLabel: 'Modèle du point de décision',
|
|
2523
|
-
intentSystemoneModelHelp: 'Paramètre model envoyé au point de décision (p. ex.
|
|
2653
|
+
intentSystemoneModelHelp: 'Paramètre model envoyé au point de décision (p. ex. d3:4b-mxfp8) ; texte libre, inutile qu\'il figure dans la liste des fournisseurs',
|
|
2524
2654
|
intentEndpointUnset: 'Non défini',
|
|
2525
2655
|
intentCandidatesLabel: 'Candidats',
|
|
2526
2656
|
intentCandidatesHelp:
|
|
@@ -2750,7 +2880,7 @@ window.__ModuleLoader__.load({
|
|
|
2750
2880
|
intentClassifierEndpointLabel: 'Endpoint di decisione',
|
|
2751
2881
|
intentClassifierEndpointHelp: 'URL /v1/systemone completa chiamata direttamente quando il tipo di classificatore è l\'endpoint di decisione (senza provider LLM)',
|
|
2752
2882
|
intentSystemoneModelLabel: 'Modello dell\'endpoint di decisione',
|
|
2753
|
-
intentSystemoneModelHelp: 'Parametro model inviato all\'endpoint di decisione (es.
|
|
2883
|
+
intentSystemoneModelHelp: 'Parametro model inviato all\'endpoint di decisione (es. d3:4b-mxfp8); testo libero, non deve stare nell\'elenco dei provider',
|
|
2754
2884
|
intentEndpointUnset: 'Non impostato',
|
|
2755
2885
|
intentCandidatesLabel: 'Candidati',
|
|
2756
2886
|
intentCandidatesHelp:
|
|
@@ -2980,7 +3110,7 @@ window.__ModuleLoader__.load({
|
|
|
2980
3110
|
intentClassifierEndpointLabel: 'Endpoint de decisão',
|
|
2981
3111
|
intentClassifierEndpointHelp: 'URL /v1/systemone completa chamada diretamente quando o tipo de classificador é o endpoint de decisão (sem provedor LLM)',
|
|
2982
3112
|
intentSystemoneModelLabel: 'Modelo do endpoint de decisão',
|
|
2983
|
-
intentSystemoneModelHelp: 'Parâmetro model enviado ao endpoint de decisão (ex.:
|
|
3113
|
+
intentSystemoneModelHelp: 'Parâmetro model enviado ao endpoint de decisão (ex.: d3:4b-mxfp8); texto livre, não precisa estar na lista de provedores',
|
|
2984
3114
|
intentEndpointUnset: 'Não definido',
|
|
2985
3115
|
intentCandidatesLabel: 'Candidatos',
|
|
2986
3116
|
intentCandidatesHelp:
|
|
@@ -3209,7 +3339,7 @@ window.__ModuleLoader__.load({
|
|
|
3209
3339
|
intentClassifierEndpointLabel: 'Endpoint решений',
|
|
3210
3340
|
intentClassifierEndpointHelp: 'Полный URL /v1/systemone, вызываемый напрямую, когда тип классификатора — endpoint решений (без LLM-провайдера)',
|
|
3211
3341
|
intentSystemoneModelLabel: 'Модель endpoint решений',
|
|
3212
|
-
intentSystemoneModelHelp: 'Параметр model, отправляемый на endpoint решений (напр.
|
|
3342
|
+
intentSystemoneModelHelp: 'Параметр model, отправляемый на endpoint решений (напр. d3:4b-mxfp8); свободный текст, запись в списке провайдеров не нужна',
|
|
3213
3343
|
intentEndpointUnset: 'Не задано',
|
|
3214
3344
|
intentCandidatesLabel: 'Кандидаты',
|
|
3215
3345
|
intentCandidatesHelp:
|
|
@@ -5207,6 +5337,17 @@ window.__ModuleLoader__.load({
|
|
|
5207
5337
|
wmSubagentCap: values.wmSubagentCap,
|
|
5208
5338
|
trimMode: values.trimMode,
|
|
5209
5339
|
trimEnabled: values.trimEnabled,
|
|
5340
|
+
trimLadderEnabled: values.trimLadderEnabled,
|
|
5341
|
+
surfaceFold: values.surfaceFold,
|
|
5342
|
+
trimSideModel: {
|
|
5343
|
+
provider: values.trimSideModel.provider,
|
|
5344
|
+
model: values.trimSideModel.model,
|
|
5345
|
+
},
|
|
5346
|
+
trimFoldFallbackModel: {
|
|
5347
|
+
provider: values.trimFoldFallbackModel.provider,
|
|
5348
|
+
model: values.trimFoldFallbackModel.model,
|
|
5349
|
+
},
|
|
5350
|
+
trimStateDir: values.trimStateDir,
|
|
5210
5351
|
...Object.fromEntries(
|
|
5211
5352
|
TRIM_NUMBER_FIELDS.map(({ field }) => [field, values[field]]),
|
|
5212
5353
|
),
|
|
@@ -5669,6 +5810,78 @@ window.__ModuleLoader__.load({
|
|
|
5669
5810
|
),
|
|
5670
5811
|
);
|
|
5671
5812
|
};
|
|
5813
|
+
/** Trim route rows reuse the intent route picker machinery — the
|
|
5814
|
+
* provider/model option lists are session-wide, only the ids and
|
|
5815
|
+
* bound field differ. The summarizer row leads with a "follow
|
|
5816
|
+
* session model" sentinel standing for the empty route; the
|
|
5817
|
+
* fallback row keeps a plain unset option (empty = no fallback). */
|
|
5818
|
+
const TRIM_ROUTE_FOLLOW = '\0follow';
|
|
5819
|
+
const trimProviderOptions = (followMode, current) => [
|
|
5820
|
+
...(followMode
|
|
5821
|
+
? [h('option', { key: 'follow', value: TRIM_ROUTE_FOLLOW }, t('trimFollowSession'))]
|
|
5822
|
+
: [h('option', { value: '' }, t('intentRouteUnset'))]),
|
|
5823
|
+
...intentProviderOptions(current).filter(
|
|
5824
|
+
(opt) => opt && opt.props && opt.props.value !== '',
|
|
5825
|
+
),
|
|
5826
|
+
];
|
|
5827
|
+
const trimModelOptions = (followMode, route, current) => [
|
|
5828
|
+
...(followMode
|
|
5829
|
+
? [h('option', { key: 'follow', value: TRIM_ROUTE_FOLLOW }, t('trimFollowSession'))]
|
|
5830
|
+
: [h('option', { value: '' }, t('intentRouteUnset'))]),
|
|
5831
|
+
...intentModelOptions(route.provider, current).filter(
|
|
5832
|
+
(opt) => opt && opt.props && opt.props.value !== '',
|
|
5833
|
+
),
|
|
5834
|
+
];
|
|
5835
|
+
const trimRouteControl = (field, label, followMode) => {
|
|
5836
|
+
const route = values[field];
|
|
5837
|
+
return h(
|
|
5838
|
+
'div',
|
|
5839
|
+
{ style: { display: 'flex', gap: '6px', minWidth: 0 } },
|
|
5840
|
+
h('select', {
|
|
5841
|
+
...selectProps(
|
|
5842
|
+
`${trimId}-${field}-provider`,
|
|
5843
|
+
followMode && route.provider === ''
|
|
5844
|
+
? TRIM_ROUTE_FOLLOW
|
|
5845
|
+
: route.provider,
|
|
5846
|
+
(next) => {
|
|
5847
|
+
if (followMode && next === TRIM_ROUTE_FOLLOW) {
|
|
5848
|
+
edit(field, { provider: '', model: '' });
|
|
5849
|
+
return;
|
|
5850
|
+
}
|
|
5851
|
+
if (!followMode && next === '') {
|
|
5852
|
+
edit(field, { provider: '', model: '' });
|
|
5853
|
+
return;
|
|
5854
|
+
}
|
|
5855
|
+
const kept = intentModelsFor(next).some(
|
|
5856
|
+
(meta) => meta.model === route.model,
|
|
5857
|
+
);
|
|
5858
|
+
edit(field, {
|
|
5859
|
+
provider: next,
|
|
5860
|
+
model: kept ? route.model : '',
|
|
5861
|
+
});
|
|
5862
|
+
},
|
|
5863
|
+
),
|
|
5864
|
+
'aria-label': `${label} · provider`,
|
|
5865
|
+
}, ...trimProviderOptions(followMode, route.provider)),
|
|
5866
|
+
h('select', {
|
|
5867
|
+
...selectProps(
|
|
5868
|
+
`${trimId}-${field}-model`,
|
|
5869
|
+
followMode && route.model === ''
|
|
5870
|
+
? TRIM_ROUTE_FOLLOW
|
|
5871
|
+
: route.model,
|
|
5872
|
+
(next) => {
|
|
5873
|
+
if (followMode && next === TRIM_ROUTE_FOLLOW) {
|
|
5874
|
+
edit(field, { ...route, model: '' });
|
|
5875
|
+
return;
|
|
5876
|
+
}
|
|
5877
|
+
edit(field, { ...route, model: next });
|
|
5878
|
+
},
|
|
5879
|
+
),
|
|
5880
|
+
disabled: !editable || route.provider === '',
|
|
5881
|
+
'aria-label': `${label} · model`,
|
|
5882
|
+
}, ...trimModelOptions(followMode, route, route.model)),
|
|
5883
|
+
);
|
|
5884
|
+
};
|
|
5672
5885
|
/** Reasoning-effort select for one intent route: the model's
|
|
5673
5886
|
* wire efforts when the catalog reports them, the EFFORTS
|
|
5674
5887
|
* fallback otherwise; '' = adapter default. A stored value
|
|
@@ -6186,6 +6399,33 @@ window.__ModuleLoader__.load({
|
|
|
6186
6399
|
}),
|
|
6187
6400
|
lines: [],
|
|
6188
6401
|
}),
|
|
6402
|
+
h(SettingsRow, {
|
|
6403
|
+
key: 'intentClassifierKind',
|
|
6404
|
+
id: `${intentId}-kind`,
|
|
6405
|
+
label: t('intentClassifierKindLabel'),
|
|
6406
|
+
help: t('intentClassifierKindHelp'),
|
|
6407
|
+
control: h(
|
|
6408
|
+
'select',
|
|
6409
|
+
selectProps(
|
|
6410
|
+
`${intentId}-kind`,
|
|
6411
|
+
values.intentClassifierKind,
|
|
6412
|
+
(kind) => {
|
|
6413
|
+
if (INTENT_KINDS.includes(kind))
|
|
6414
|
+
edit('intentClassifierKind', kind);
|
|
6415
|
+
},
|
|
6416
|
+
),
|
|
6417
|
+
...INTENT_KINDS.map((kind) =>
|
|
6418
|
+
h(
|
|
6419
|
+
'option',
|
|
6420
|
+
{ key: kind, value: kind },
|
|
6421
|
+
t(
|
|
6422
|
+
`intentClassifierKind${kind[0].toUpperCase()}${kind.slice(1)}`,
|
|
6423
|
+
),
|
|
6424
|
+
),
|
|
6425
|
+
),
|
|
6426
|
+
),
|
|
6427
|
+
lines: [],
|
|
6428
|
+
}),
|
|
6189
6429
|
h(SettingsRow, {
|
|
6190
6430
|
key: 'intentClassifierRoute',
|
|
6191
6431
|
hidden: values.intentClassifierKind === 'systemone',
|
|
@@ -6231,33 +6471,6 @@ window.__ModuleLoader__.load({
|
|
|
6231
6471
|
),
|
|
6232
6472
|
lines: [],
|
|
6233
6473
|
}),
|
|
6234
|
-
h(SettingsRow, {
|
|
6235
|
-
key: 'intentClassifierKind',
|
|
6236
|
-
id: `${intentId}-kind`,
|
|
6237
|
-
label: t('intentClassifierKindLabel'),
|
|
6238
|
-
help: t('intentClassifierKindHelp'),
|
|
6239
|
-
control: h(
|
|
6240
|
-
'select',
|
|
6241
|
-
selectProps(
|
|
6242
|
-
`${intentId}-kind`,
|
|
6243
|
-
values.intentClassifierKind,
|
|
6244
|
-
(kind) => {
|
|
6245
|
-
if (INTENT_KINDS.includes(kind))
|
|
6246
|
-
edit('intentClassifierKind', kind);
|
|
6247
|
-
},
|
|
6248
|
-
),
|
|
6249
|
-
...INTENT_KINDS.map((kind) =>
|
|
6250
|
-
h(
|
|
6251
|
-
'option',
|
|
6252
|
-
{ key: kind, value: kind },
|
|
6253
|
-
t(
|
|
6254
|
-
`intentClassifierKind${kind[0].toUpperCase()}${kind.slice(1)}`,
|
|
6255
|
-
),
|
|
6256
|
-
),
|
|
6257
|
-
),
|
|
6258
|
-
),
|
|
6259
|
-
lines: [],
|
|
6260
|
-
}),
|
|
6261
6474
|
h(SettingsRow, {
|
|
6262
6475
|
key: 'intentClassifierEndpoint',
|
|
6263
6476
|
hidden: values.intentClassifierKind !== 'systemone',
|
|
@@ -6295,7 +6508,7 @@ window.__ModuleLoader__.load({
|
|
|
6295
6508
|
control: h('input', {
|
|
6296
6509
|
type: 'text',
|
|
6297
6510
|
value: values.intentClassifierSystemoneModel,
|
|
6298
|
-
placeholder: '
|
|
6511
|
+
placeholder: 'd3:4b-mxfp8',
|
|
6299
6512
|
onChange: (event) =>
|
|
6300
6513
|
edit('intentClassifierSystemoneModel', event.target.value),
|
|
6301
6514
|
disabled: !editable,
|
|
@@ -6651,6 +6864,76 @@ window.__ModuleLoader__.load({
|
|
|
6651
6864
|
}),
|
|
6652
6865
|
lines: [],
|
|
6653
6866
|
}),
|
|
6867
|
+
h(SettingsRow, {
|
|
6868
|
+
key: 'trimLadderEnabled',
|
|
6869
|
+
id: `${trimId}-ladder`,
|
|
6870
|
+
label: t('trimLadderEnabledLabel'),
|
|
6871
|
+
help: t('trimLadderEnabledHelp'),
|
|
6872
|
+
control: h('input', {
|
|
6873
|
+
type: 'checkbox',
|
|
6874
|
+
id: `${trimId}-ladder`,
|
|
6875
|
+
checked: values.trimLadderEnabled,
|
|
6876
|
+
onChange: () => {
|
|
6877
|
+
edit('trimLadderEnabled', !values.trimLadderEnabled);
|
|
6878
|
+
},
|
|
6879
|
+
disabled: !editable,
|
|
6880
|
+
style: STYLE.checkbox,
|
|
6881
|
+
}),
|
|
6882
|
+
lines: [],
|
|
6883
|
+
}),
|
|
6884
|
+
h(SettingsRow, {
|
|
6885
|
+
key: 'surfaceFold',
|
|
6886
|
+
id: `${trimId}-surface`,
|
|
6887
|
+
label: t('surfaceFoldLabel'),
|
|
6888
|
+
help: t('surfaceFoldHelp'),
|
|
6889
|
+
control: h('input', {
|
|
6890
|
+
type: 'checkbox',
|
|
6891
|
+
id: `${trimId}-surface`,
|
|
6892
|
+
checked: values.surfaceFold,
|
|
6893
|
+
onChange: () => {
|
|
6894
|
+
edit('surfaceFold', !values.surfaceFold);
|
|
6895
|
+
},
|
|
6896
|
+
disabled: !editable,
|
|
6897
|
+
style: STYLE.checkbox,
|
|
6898
|
+
}),
|
|
6899
|
+
lines: [],
|
|
6900
|
+
}),
|
|
6901
|
+
h(SettingsRow, {
|
|
6902
|
+
key: 'trimSideModel',
|
|
6903
|
+
id: `${trimId}-trimSideModel`,
|
|
6904
|
+
label: t('trimSideModelLabel'),
|
|
6905
|
+
help: t('trimSideModelHelp'),
|
|
6906
|
+
control: trimRouteControl('trimSideModel', t('trimSideModelLabel'), true),
|
|
6907
|
+
lines:
|
|
6908
|
+
values.trimSideModel.provider === '' || values.trimSideModel.model === ''
|
|
6909
|
+
? [{ text: t('trimFollowSession'), invalid: false }]
|
|
6910
|
+
: [
|
|
6911
|
+
{
|
|
6912
|
+
text: t('currentValue', {
|
|
6913
|
+
value: `${values.trimSideModel.provider}/${values.trimSideModel.model}`,
|
|
6914
|
+
}),
|
|
6915
|
+
invalid: false,
|
|
6916
|
+
},
|
|
6917
|
+
],
|
|
6918
|
+
}),
|
|
6919
|
+
h(SettingsRow, {
|
|
6920
|
+
key: 'trimFoldFallbackModel',
|
|
6921
|
+
id: `${trimId}-trimFoldFallbackModel`,
|
|
6922
|
+
label: t('trimFoldFallbackModelLabel'),
|
|
6923
|
+
help: t('trimFoldFallbackModelHelp'),
|
|
6924
|
+
control: trimRouteControl('trimFoldFallbackModel', t('trimFoldFallbackModelLabel'), false),
|
|
6925
|
+
lines:
|
|
6926
|
+
values.trimFoldFallbackModel.provider === '' || values.trimFoldFallbackModel.model === ''
|
|
6927
|
+
? [{ text: t('trimFallbackUnset'), invalid: false }]
|
|
6928
|
+
: [
|
|
6929
|
+
{
|
|
6930
|
+
text: t('currentValue', {
|
|
6931
|
+
value: `${values.trimFoldFallbackModel.provider}/${values.trimFoldFallbackModel.model}`,
|
|
6932
|
+
}),
|
|
6933
|
+
invalid: false,
|
|
6934
|
+
},
|
|
6935
|
+
],
|
|
6936
|
+
}),
|
|
6654
6937
|
...TRIM_NUMBER_FIELDS.map((spec) =>
|
|
6655
6938
|
h(SettingsRow, {
|
|
6656
6939
|
key: spec.field,
|