@sinm/kai 1.10.0-alpha → 1.10.2
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/dist-cli/kai-cli.js +33732 -29174
- package/dist-electron/renderer/assets/{_baseUniq-TWYIHSYo.js → _baseUniq-DXQms1uJ.js} +1 -1
- package/dist-electron/renderer/assets/_baseUniq-DXQms1uJ.js.gz +0 -0
- package/dist-electron/renderer/assets/{arc-CC0XHE9s.js → arc-BzUtcsT6.js} +1 -1
- package/dist-electron/renderer/assets/arc-BzUtcsT6.js.gz +0 -0
- package/dist-electron/renderer/assets/{architectureDiagram-Q4EWVU46-Db99kceI.js → architectureDiagram-Q4EWVU46-DWhLXXBB.js} +5 -5
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-DWhLXXBB.js.gz +0 -0
- package/dist-electron/renderer/assets/{blockDiagram-DXYQGD6D-BiHxnzw6.js → blockDiagram-DXYQGD6D-4chZr0B3.js} +6 -6
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-4chZr0B3.js.gz +0 -0
- package/dist-electron/renderer/assets/{c4Diagram-AHTNJAMY-DXZwk3Wh.js → c4Diagram-AHTNJAMY-B57DWDB5.js} +2 -2
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-B57DWDB5.js.gz +0 -0
- package/dist-electron/renderer/assets/{channel-BfTEjFDO.js → channel-CK8jbeS3.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4BX2VUAB-BbzW3sxS.js → chunk-4BX2VUAB-DJhRXS5K.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4TB4RGXK-Bp0IvYVD.js → chunk-4TB4RGXK-BaFYK52i.js} +5 -5
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-BaFYK52i.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-55IACEB6--tHMS1Fu.js → chunk-55IACEB6-DjaH1FL_.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-EDXVE4YY-C37AT76M.js → chunk-EDXVE4YY-K-LdDCd1.js} +1 -1
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-K-LdDCd1.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-FMBD7UC4-BmPFBz66.js → chunk-FMBD7UC4-DzGM7STk.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-OYMX7WX6-BK02zRf3.js → chunk-OYMX7WX6-CLJ8M1Y6.js} +3 -3
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-CLJ8M1Y6.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-QZHKN3VN-DQblzVJ3.js → chunk-QZHKN3VN-CbcXgYrp.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-YZCP3GAM-BBLOUO8q.js → chunk-YZCP3GAM-DG6A2gPT.js} +1 -1
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-DG6A2gPT.js.gz +0 -0
- package/dist-electron/renderer/assets/{classDiagram-6PBFFD2Q-GoIp7NtF.js → classDiagram-6PBFFD2Q-C516x-2x.js} +6 -6
- package/dist-electron/renderer/assets/{classDiagram-v2-HSJHXN6E-GoIp7NtF.js → classDiagram-v2-HSJHXN6E-C516x-2x.js} +6 -6
- package/dist-electron/renderer/assets/{clone-DsJHPXSI.js → clone-BZsfBfGE.js} +1 -1
- package/dist-electron/renderer/assets/{cose-bilkent-S5V4N54A-Bx3Btq3m.js → cose-bilkent-S5V4N54A-Wa-FYjHx.js} +1 -1
- package/dist-electron/renderer/assets/{cose-bilkent-S5V4N54A-Bx3Btq3m.js.gz → cose-bilkent-S5V4N54A-Wa-FYjHx.js.gz} +0 -0
- package/dist-electron/renderer/assets/{dagre-KV5264BT-UjO7D81D.js → dagre-KV5264BT-Df-HS0DT.js} +6 -6
- package/dist-electron/renderer/assets/dagre-KV5264BT-Df-HS0DT.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-5BDNPKRD-Qnftph66.js → diagram-5BDNPKRD-CaZsWnM2.js} +6 -6
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-CaZsWnM2.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-G4DWMVQ6-hAHLQAYy.js → diagram-G4DWMVQ6-0B-U8e4R.js} +6 -6
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-0B-U8e4R.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-MMDJMWI5-B3L74K7n.js → diagram-MMDJMWI5-Byvl-KNj.js} +5 -5
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-Byvl-KNj.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-TYMM5635-D-tCCI8y.js → diagram-TYMM5635-Dgy-yPsr.js} +5 -5
- package/dist-electron/renderer/assets/diagram-TYMM5635-Dgy-yPsr.js.gz +0 -0
- package/dist-electron/renderer/assets/{erDiagram-SMLLAGMA-BaVMPxLl.js → erDiagram-SMLLAGMA-CkzvnQaU.js} +4 -4
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-CkzvnQaU.js.gz +0 -0
- package/dist-electron/renderer/assets/{flowDiagram-DWJPFMVM-DZpn2G84.js → flowDiagram-DWJPFMVM-B5k0WctR.js} +6 -6
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-B5k0WctR.js.gz +0 -0
- package/dist-electron/renderer/assets/{ganttDiagram-T4ZO3ILL-BoSD-fWq.js → ganttDiagram-T4ZO3ILL-C2pFdr_b.js} +2 -2
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-C2pFdr_b.js.gz +0 -0
- package/dist-electron/renderer/assets/{gitGraphDiagram-UUTBAWPF-Bsenwzpz.js → gitGraphDiagram-UUTBAWPF-CJdXKPsy.js} +6 -6
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-CJdXKPsy.js.gz +0 -0
- package/dist-electron/renderer/assets/{graph-CAbnGHSS.js → graph-_80OeAYU.js} +2 -2
- package/dist-electron/renderer/assets/graph-_80OeAYU.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-3-RVvi2_.js → index-Cs0m4pX4.js} +1200 -693
- package/dist-electron/renderer/assets/index-Cs0m4pX4.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-CmcRKBhc.css → index-DCzIql_d.css} +908 -463
- package/dist-electron/renderer/assets/index-DCzIql_d.css.gz +0 -0
- package/dist-electron/renderer/assets/{infoDiagram-42DDH7IO-Dv3v-UTu.js → infoDiagram-42DDH7IO-CUBNnXNy.js} +4 -4
- package/dist-electron/renderer/assets/{ishikawaDiagram-UXIWVN3A-C0dzSTBj.js → ishikawaDiagram-UXIWVN3A-Blfv83uV.js} +1 -1
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-Blfv83uV.js.gz +0 -0
- package/dist-electron/renderer/assets/{journeyDiagram-VCZTEJTY-qIcnACCb.js → journeyDiagram-VCZTEJTY-CTytCzzg.js} +4 -4
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-CTytCzzg.js.gz +0 -0
- package/dist-electron/renderer/assets/{kanban-definition-6JOO6SKY-BE7SkXi1.js → kanban-definition-6JOO6SKY-CJ9BZQW-.js} +2 -2
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-CJ9BZQW-.js.gz +0 -0
- package/dist-electron/renderer/assets/{layout-B9EpUKCa.js → layout-sSswHT98.js} +4 -4
- package/dist-electron/renderer/assets/layout-sSswHT98.js.gz +0 -0
- package/dist-electron/renderer/assets/{linear-CCyL68xZ.js → linear-BglvYbbf.js} +1 -1
- package/dist-electron/renderer/assets/linear-BglvYbbf.js.gz +0 -0
- package/dist-electron/renderer/assets/{min-BYrYl2E1.js → min-Bzyu3TW9.js} +2 -2
- package/dist-electron/renderer/assets/min-Bzyu3TW9.js.gz +0 -0
- package/dist-electron/renderer/assets/{mindmap-definition-QFDTVHPH-CSoYt4jB.js → mindmap-definition-QFDTVHPH-Dvudei3d.js} +3 -3
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-Dvudei3d.js.gz +0 -0
- package/dist-electron/renderer/assets/{pieDiagram-DEJITSTG-DpGySR6o.js → pieDiagram-DEJITSTG-LipgyJMA.js} +6 -6
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-LipgyJMA.js.gz +0 -0
- package/dist-electron/renderer/assets/{quadrantDiagram-34T5L4WZ-63fCuOAt.js → quadrantDiagram-34T5L4WZ-BsvYEtIZ.js} +2 -2
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-BsvYEtIZ.js.gz +0 -0
- package/dist-electron/renderer/assets/{requirementDiagram-MS252O5E-BJPp47kS.js → requirementDiagram-MS252O5E-BnabpcqK.js} +3 -3
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-BnabpcqK.js.gz +0 -0
- package/dist-electron/renderer/assets/{sankeyDiagram-XADWPNL6-DTh3hGLh.js → sankeyDiagram-XADWPNL6-BuCgq17Q.js} +1 -1
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-BuCgq17Q.js.gz +0 -0
- package/dist-electron/renderer/assets/{sequenceDiagram-FGHM5R23-0cxZIN2-.js → sequenceDiagram-FGHM5R23-CtGBoKet.js} +3 -3
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-CtGBoKet.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-FHFEXIEX-kMxLUpUn.js → stateDiagram-FHFEXIEX-DYwbJ7V6.js} +8 -8
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-DYwbJ7V6.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-v2-QKLJ7IA2-BZxbk8dA.js → stateDiagram-v2-QKLJ7IA2-CtQIhDqi.js} +4 -4
- package/dist-electron/renderer/assets/{timeline-definition-GMOUNBTQ-Br1nJvtz.js → timeline-definition-GMOUNBTQ-Dg1mahK3.js} +2 -2
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-Dg1mahK3.js.gz +0 -0
- package/dist-electron/renderer/assets/{vennDiagram-DHZGUBPP-DDvLCVqL.js → vennDiagram-DHZGUBPP-CdFh8oWQ.js} +1 -1
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-CdFh8oWQ.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardley-RL74JXVD-8Clcfhfi.js → wardley-RL74JXVD-CQzndBZX.js} +3 -3
- package/dist-electron/renderer/assets/wardley-RL74JXVD-CQzndBZX.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardleyDiagram-NUSXRM2D-8FAhGkRL.js → wardleyDiagram-NUSXRM2D-BUhyPKXM.js} +5 -5
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-BUhyPKXM.js.gz +0 -0
- package/dist-electron/renderer/assets/{xychartDiagram-5P7HB3ND-BowiCO1z.js → xychartDiagram-5P7HB3ND-CwTHSfES.js} +2 -2
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-CwTHSfES.js.gz +0 -0
- package/dist-electron/renderer/index.html +2 -2
- package/package.json +7 -5
- package/dist-electron/renderer/assets/_baseUniq-TWYIHSYo.js.gz +0 -0
- package/dist-electron/renderer/assets/arc-CC0XHE9s.js.gz +0 -0
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-Db99kceI.js.gz +0 -0
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-BiHxnzw6.js.gz +0 -0
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-DXZwk3Wh.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-Bp0IvYVD.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-C37AT76M.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-BK02zRf3.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-BBLOUO8q.js.gz +0 -0
- package/dist-electron/renderer/assets/dagre-KV5264BT-UjO7D81D.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-Qnftph66.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-hAHLQAYy.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-B3L74K7n.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-TYMM5635-D-tCCI8y.js.gz +0 -0
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-BaVMPxLl.js.gz +0 -0
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-DZpn2G84.js.gz +0 -0
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-BoSD-fWq.js.gz +0 -0
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-Bsenwzpz.js.gz +0 -0
- package/dist-electron/renderer/assets/graph-CAbnGHSS.js.gz +0 -0
- package/dist-electron/renderer/assets/index-3-RVvi2_.js.gz +0 -0
- package/dist-electron/renderer/assets/index-CmcRKBhc.css.gz +0 -0
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-C0dzSTBj.js.gz +0 -0
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-qIcnACCb.js.gz +0 -0
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-BE7SkXi1.js.gz +0 -0
- package/dist-electron/renderer/assets/layout-B9EpUKCa.js.gz +0 -0
- package/dist-electron/renderer/assets/linear-CCyL68xZ.js.gz +0 -0
- package/dist-electron/renderer/assets/min-BYrYl2E1.js.gz +0 -0
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-CSoYt4jB.js.gz +0 -0
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-DpGySR6o.js.gz +0 -0
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-63fCuOAt.js.gz +0 -0
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-BJPp47kS.js.gz +0 -0
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-DTh3hGLh.js.gz +0 -0
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-0cxZIN2-.js.gz +0 -0
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-kMxLUpUn.js.gz +0 -0
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-Br1nJvtz.js.gz +0 -0
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-DDvLCVqL.js.gz +0 -0
- package/dist-electron/renderer/assets/wardley-RL74JXVD-8Clcfhfi.js.gz +0 -0
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-8FAhGkRL.js.gz +0 -0
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-BowiCO1z.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-Df-HS0DT.js","./graph-_80OeAYU.js","./_baseUniq-DXQms1uJ.js","./layout-sSswHT98.js","./min-Bzyu3TW9.js","./clone-BZsfBfGE.js","./cose-bilkent-S5V4N54A-Wa-FYjHx.js","./cytoscape.esm-D6E6cAed.js","./c4Diagram-AHTNJAMY-B57DWDB5.js","./chunk-YZCP3GAM-DG6A2gPT.js","./flowDiagram-DWJPFMVM-B5k0WctR.js","./chunk-FMBD7UC4-DzGM7STk.js","./chunk-55IACEB6-DjaH1FL_.js","./chunk-EDXVE4YY-K-LdDCd1.js","./channel-CK8jbeS3.js","./erDiagram-SMLLAGMA-CkzvnQaU.js","./gitGraphDiagram-UUTBAWPF-CJdXKPsy.js","./chunk-4BX2VUAB-DJhRXS5K.js","./chunk-QZHKN3VN-CbcXgYrp.js","./wardley-RL74JXVD-CQzndBZX.js","./ganttDiagram-T4ZO3ILL-C2pFdr_b.js","./linear-BglvYbbf.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-42DDH7IO-CUBNnXNy.js","./pieDiagram-DEJITSTG-LipgyJMA.js","./arc-BzUtcsT6.js","./ordinal-CxptdPJm.js","./quadrantDiagram-34T5L4WZ-BsvYEtIZ.js","./xychartDiagram-5P7HB3ND-CwTHSfES.js","./requirementDiagram-MS252O5E-BnabpcqK.js","./sequenceDiagram-FGHM5R23-CtGBoKet.js","./classDiagram-6PBFFD2Q-C516x-2x.js","./chunk-4TB4RGXK-BaFYK52i.js","./classDiagram-v2-HSJHXN6E-C516x-2x.js","./stateDiagram-FHFEXIEX-DYwbJ7V6.js","./chunk-OYMX7WX6-CLJ8M1Y6.js","./stateDiagram-v2-QKLJ7IA2-CtQIhDqi.js","./journeyDiagram-VCZTEJTY-CTytCzzg.js","./timeline-definition-GMOUNBTQ-Dg1mahK3.js","./mindmap-definition-QFDTVHPH-Dvudei3d.js","./kanban-definition-6JOO6SKY-CJ9BZQW-.js","./sankeyDiagram-XADWPNL6-BuCgq17Q.js","./diagram-TYMM5635-Dgy-yPsr.js","./diagram-MMDJMWI5-Byvl-KNj.js","./blockDiagram-DXYQGD6D-4chZr0B3.js","./diagram-5BDNPKRD-CaZsWnM2.js","./architectureDiagram-Q4EWVU46-DWhLXXBB.js","./diagram-G4DWMVQ6-0B-U8e4R.js","./wardleyDiagram-NUSXRM2D-BUhyPKXM.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function _mergeNamespaces(n2, m2) {
|
|
3
3
|
for (var i2 = 0; i2 < m2.length; i2++) {
|
|
4
4
|
const e2 = m2[i2];
|
|
@@ -16518,6 +16518,7 @@ const IPC_DELETE_DIRECT_SESSION = "DELETE_DIRECT_SESSION";
|
|
|
16518
16518
|
const IPC_ARCHIVE_DIRECT_SESSION = "ARCHIVE_DIRECT_SESSION";
|
|
16519
16519
|
const IPC_CREATE_GROUP = "CREATE_GROUP";
|
|
16520
16520
|
const IPC_GET_GROUP = "GET_GROUP";
|
|
16521
|
+
const IPC_LIST_GROUPS = "LIST_GROUPS";
|
|
16521
16522
|
const IPC_UPDATE_GROUP = "UPDATE_GROUP";
|
|
16522
16523
|
const IPC_DELETE_GROUP = "DELETE_GROUP";
|
|
16523
16524
|
const IPC_REMOVE_GROUP_AVATAR = "REMOVE_GROUP_AVATAR";
|
|
@@ -16591,6 +16592,12 @@ const IPC_TELEMETRY_FEEDBACK = "TELEMETRY_FEEDBACK";
|
|
|
16591
16592
|
const IPC_TELEMETRY_SET_ENABLED = "TELEMETRY_SET_ENABLED";
|
|
16592
16593
|
const IPC_TELEMETRY_IS_ENABLED = "TELEMETRY_IS_ENABLED";
|
|
16593
16594
|
const log$v = createLogger("http-transport");
|
|
16595
|
+
const INITIAL_RECONNECT_DELAY_MS = 1e3;
|
|
16596
|
+
const MAX_RECONNECT_DELAY_MS = 1e4;
|
|
16597
|
+
const RECONNECT_JITTER_MS = 300;
|
|
16598
|
+
const WS_CLOSE_UNAUTHORIZED = 1008;
|
|
16599
|
+
const WS_CLOSE_TRY_AGAIN_LATER = 1013;
|
|
16600
|
+
const DEFAULT_WS_CLOSE_CODE = 1006;
|
|
16594
16601
|
function createUnsupportedError(api) {
|
|
16595
16602
|
return new Error(`${api} is not available in browser mode`);
|
|
16596
16603
|
}
|
|
@@ -16611,10 +16618,11 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16611
16618
|
const memoryUpdateListeners = /* @__PURE__ */ new Set();
|
|
16612
16619
|
const reconnectListeners = /* @__PURE__ */ new Set();
|
|
16613
16620
|
const memoryProgressCache = new MemoryProgressCache();
|
|
16614
|
-
let reconnectDelay =
|
|
16621
|
+
let reconnectDelay = INITIAL_RECONNECT_DELAY_MS;
|
|
16615
16622
|
let reconnectTimer = null;
|
|
16616
16623
|
let ws = null;
|
|
16617
16624
|
let closed = false;
|
|
16625
|
+
let reconnectDisabled = false;
|
|
16618
16626
|
let isFirstConnect = true;
|
|
16619
16627
|
async function rpc(channel2, ...args) {
|
|
16620
16628
|
const response = await fetch(`${baseUrl}/api/rpc/${encodeURIComponent(channel2)}`, {
|
|
@@ -16649,12 +16657,13 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16649
16657
|
return result.data;
|
|
16650
16658
|
}
|
|
16651
16659
|
function scheduleReconnect() {
|
|
16652
|
-
if (closed || reconnectTimer !== null) return;
|
|
16660
|
+
if (closed || reconnectDisabled || reconnectTimer !== null) return;
|
|
16661
|
+
const delay = reconnectDelay + Math.floor(Math.random() * RECONNECT_JITTER_MS);
|
|
16653
16662
|
reconnectTimer = window.setTimeout(() => {
|
|
16654
16663
|
reconnectTimer = null;
|
|
16655
16664
|
connectEvents();
|
|
16656
|
-
},
|
|
16657
|
-
reconnectDelay = Math.min(reconnectDelay * 2,
|
|
16665
|
+
}, delay);
|
|
16666
|
+
reconnectDelay = Math.min(reconnectDelay * 2, MAX_RECONNECT_DELAY_MS);
|
|
16658
16667
|
}
|
|
16659
16668
|
function handleEvent(channel2, data) {
|
|
16660
16669
|
switch (channel2) {
|
|
@@ -16676,13 +16685,15 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16676
16685
|
}
|
|
16677
16686
|
}
|
|
16678
16687
|
function connectEvents() {
|
|
16679
|
-
if (closed) return;
|
|
16688
|
+
if (closed || reconnectDisabled) return;
|
|
16680
16689
|
const wsProtocol = baseUrl.startsWith("https://") ? "wss://" : "ws://";
|
|
16681
16690
|
const wsBase = baseUrl.replace(/^https?:\/\//, wsProtocol);
|
|
16682
|
-
|
|
16683
|
-
ws
|
|
16691
|
+
const socket = new WebSocket(`${wsBase}/api/events?token=${encodeURIComponent(token2)}`);
|
|
16692
|
+
ws = socket;
|
|
16693
|
+
socket.onopen = () => {
|
|
16694
|
+
if (ws !== socket || closed) return;
|
|
16684
16695
|
meta2.connected = true;
|
|
16685
|
-
reconnectDelay =
|
|
16696
|
+
reconnectDelay = INITIAL_RECONNECT_DELAY_MS;
|
|
16686
16697
|
if (!isFirstConnect) {
|
|
16687
16698
|
reconnectListeners.forEach((fn) => {
|
|
16688
16699
|
try {
|
|
@@ -16693,7 +16704,8 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16693
16704
|
}
|
|
16694
16705
|
isFirstConnect = false;
|
|
16695
16706
|
};
|
|
16696
|
-
|
|
16707
|
+
socket.onmessage = (event) => {
|
|
16708
|
+
if (ws !== socket || closed) return;
|
|
16697
16709
|
let payload;
|
|
16698
16710
|
try {
|
|
16699
16711
|
payload = JSON.parse(event.data);
|
|
@@ -16710,13 +16722,23 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16710
16722
|
payload.data
|
|
16711
16723
|
);
|
|
16712
16724
|
};
|
|
16713
|
-
|
|
16725
|
+
socket.onclose = (event) => {
|
|
16726
|
+
if (ws !== socket) return;
|
|
16727
|
+
const closeCode = event?.code ?? DEFAULT_WS_CLOSE_CODE;
|
|
16714
16728
|
meta2.connected = false;
|
|
16715
16729
|
ws = null;
|
|
16730
|
+
if (closeCode === WS_CLOSE_UNAUTHORIZED) {
|
|
16731
|
+
reconnectDisabled = true;
|
|
16732
|
+
log$v.error("websocket closed by server due to unauthorized token");
|
|
16733
|
+
return;
|
|
16734
|
+
}
|
|
16735
|
+
if (closeCode === WS_CLOSE_TRY_AGAIN_LATER) {
|
|
16736
|
+
reconnectDelay = Math.max(reconnectDelay, MAX_RECONNECT_DELAY_MS);
|
|
16737
|
+
}
|
|
16716
16738
|
scheduleReconnect();
|
|
16717
16739
|
};
|
|
16718
|
-
|
|
16719
|
-
|
|
16740
|
+
socket.onerror = () => {
|
|
16741
|
+
socket.close();
|
|
16720
16742
|
};
|
|
16721
16743
|
}
|
|
16722
16744
|
connectEvents();
|
|
@@ -16725,6 +16747,7 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16725
16747
|
close: () => {
|
|
16726
16748
|
if (closed) return;
|
|
16727
16749
|
closed = true;
|
|
16750
|
+
reconnectDisabled = true;
|
|
16728
16751
|
meta2.connected = false;
|
|
16729
16752
|
if (reconnectTimer !== null) {
|
|
16730
16753
|
clearTimeout(reconnectTimer);
|
|
@@ -16784,6 +16807,7 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16784
16807
|
getMessage: (messageId) => rpc(IPC_GET_MESSAGE, messageId),
|
|
16785
16808
|
createGroup: (name2, speakerId, memberIds, config2, avatar2) => rpc(IPC_CREATE_GROUP, name2, speakerId, memberIds, config2, avatar2),
|
|
16786
16809
|
getGroup: (id32) => rpc(IPC_GET_GROUP, id32),
|
|
16810
|
+
listGroups: () => rpc(IPC_LIST_GROUPS),
|
|
16787
16811
|
updateGroup: (id32, updates) => rpc(IPC_UPDATE_GROUP, id32, updates),
|
|
16788
16812
|
deleteGroup: (id32) => rpc(IPC_DELETE_GROUP, id32),
|
|
16789
16813
|
setGroupAvatar: (groupId, payload) => uploadBinary(`/api/avatar/group/${encodeURIComponent(groupId)}`, payload),
|
|
@@ -17687,6 +17711,7 @@ function cleanupLRUCache(state2, newLRU) {
|
|
|
17687
17711
|
const newActiveRunIdMap = new Map(state2.activeRunIdMap);
|
|
17688
17712
|
const newRetryingMap = new Map(state2.retryingMap);
|
|
17689
17713
|
const newCompletedMap = new Map(state2.completedMap);
|
|
17714
|
+
const newRunMetricsMap = new Map(state2.runMetricsMap);
|
|
17690
17715
|
for (const id32 of toRemove) {
|
|
17691
17716
|
newMessagesMap.delete(id32);
|
|
17692
17717
|
newLastEventSeqMap.delete(id32);
|
|
@@ -17700,6 +17725,7 @@ function cleanupLRUCache(state2, newLRU) {
|
|
|
17700
17725
|
newActiveRunIdMap.delete(id32);
|
|
17701
17726
|
newRetryingMap.delete(id32);
|
|
17702
17727
|
newCompletedMap.delete(id32);
|
|
17728
|
+
newRunMetricsMap.delete(id32);
|
|
17703
17729
|
}
|
|
17704
17730
|
return {
|
|
17705
17731
|
messagesMap: newMessagesMap,
|
|
@@ -17714,6 +17740,7 @@ function cleanupLRUCache(state2, newLRU) {
|
|
|
17714
17740
|
activeRunIdMap: newActiveRunIdMap,
|
|
17715
17741
|
retryingMap: newRetryingMap,
|
|
17716
17742
|
completedMap: newCompletedMap,
|
|
17743
|
+
runMetricsMap: newRunMetricsMap,
|
|
17717
17744
|
conversationLRU: newLRU
|
|
17718
17745
|
};
|
|
17719
17746
|
}
|
|
@@ -17748,9 +17775,9 @@ function projectEvents(events, state2) {
|
|
|
17748
17775
|
function projectSingleEvent(event, messagesMap, state2) {
|
|
17749
17776
|
switch (event.type) {
|
|
17750
17777
|
case "snapshot":
|
|
17751
|
-
return projectSnapshot(event, messagesMap);
|
|
17778
|
+
return projectSnapshot(event, messagesMap, state2);
|
|
17752
17779
|
case "message.accepted":
|
|
17753
|
-
return projectMessageAccepted(event, messagesMap);
|
|
17780
|
+
return projectMessageAccepted(event, messagesMap, state2);
|
|
17754
17781
|
case "run.started":
|
|
17755
17782
|
return projectRunStarted(event, messagesMap);
|
|
17756
17783
|
case "run.progress":
|
|
@@ -17769,6 +17796,10 @@ function projectSingleEvent(event, messagesMap, state2) {
|
|
|
17769
17796
|
return projectRunTerminal(event, messagesMap, state2);
|
|
17770
17797
|
case "queue.updated":
|
|
17771
17798
|
return projectQueueUpdated(event, state2);
|
|
17799
|
+
case "context.compaction":
|
|
17800
|
+
return projectContextCompaction(event, state2);
|
|
17801
|
+
case "context.status":
|
|
17802
|
+
return projectContextStatus(event, state2);
|
|
17772
17803
|
case "messages.revoked":
|
|
17773
17804
|
return projectMessagesRevoked(event, messagesMap);
|
|
17774
17805
|
default: {
|
|
@@ -17778,10 +17809,18 @@ function projectSingleEvent(event, messagesMap, state2) {
|
|
|
17778
17809
|
}
|
|
17779
17810
|
}
|
|
17780
17811
|
}
|
|
17781
|
-
function projectSnapshot(event, messagesMap) {
|
|
17812
|
+
function projectSnapshot(event, messagesMap, state2) {
|
|
17782
17813
|
const cid = event.sessionId;
|
|
17783
17814
|
const current = messagesMap.get(cid) ?? /* @__PURE__ */ new Map();
|
|
17784
17815
|
const msgMap = mergeMessageMaps(current, event.messages);
|
|
17816
|
+
const activeRunId = event.queue.activeRunId;
|
|
17817
|
+
const existingMetrics = state2.runMetricsMap.get(cid);
|
|
17818
|
+
const runMetricsMap = /* @__PURE__ */ new Map();
|
|
17819
|
+
if (activeRunId) {
|
|
17820
|
+
runMetricsMap.set(cid, existingMetrics ?? { startedAt: Date.now() });
|
|
17821
|
+
} else if (existingMetrics) {
|
|
17822
|
+
runMetricsMap.set(cid, void 0);
|
|
17823
|
+
}
|
|
17785
17824
|
return {
|
|
17786
17825
|
messagesMap: /* @__PURE__ */ new Map([[cid, msgMap]]),
|
|
17787
17826
|
conversationMap: /* @__PURE__ */ new Map([[cid, event.conversation]]),
|
|
@@ -17792,15 +17831,23 @@ function projectSnapshot(event, messagesMap) {
|
|
|
17792
17831
|
hasMoreMap: /* @__PURE__ */ new Map([[cid, event.hasMore]]),
|
|
17793
17832
|
activeRunIdMap: /* @__PURE__ */ new Map([[cid, event.queue.activeRunId]]),
|
|
17794
17833
|
retryingMap: /* @__PURE__ */ new Map([[cid, null]]),
|
|
17795
|
-
|
|
17796
|
-
runMetricsMap: /* @__PURE__ */ new Map()
|
|
17834
|
+
runMetricsMap
|
|
17797
17835
|
};
|
|
17798
17836
|
}
|
|
17799
|
-
function projectMessageAccepted(event, messagesMap) {
|
|
17837
|
+
function projectMessageAccepted(event, messagesMap, state2) {
|
|
17800
17838
|
const cid = event.sessionId;
|
|
17801
17839
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
17802
17840
|
current.set(event.message.id, event.message);
|
|
17803
|
-
|
|
17841
|
+
if (!event.message.isContextMarker) {
|
|
17842
|
+
return { messagesMap: /* @__PURE__ */ new Map([[cid, current]]) };
|
|
17843
|
+
}
|
|
17844
|
+
const existing = state2.contextCompactionMap.get(cid) ?? { totalCompactions: 0 };
|
|
17845
|
+
return {
|
|
17846
|
+
messagesMap: /* @__PURE__ */ new Map([[cid, current]]),
|
|
17847
|
+
contextCompactionMap: /* @__PURE__ */ new Map([[cid, {
|
|
17848
|
+
totalCompactions: existing.totalCompactions
|
|
17849
|
+
}]])
|
|
17850
|
+
};
|
|
17804
17851
|
}
|
|
17805
17852
|
function projectRunStarted(event, messagesMap) {
|
|
17806
17853
|
const cid = event.sessionId;
|
|
@@ -17830,8 +17877,7 @@ function projectRunStarted(event, messagesMap) {
|
|
|
17830
17877
|
}
|
|
17831
17878
|
function projectRunProgress(event, state2) {
|
|
17832
17879
|
const cid = event.sessionId;
|
|
17833
|
-
const existing = state2.runMetricsMap.get(cid);
|
|
17834
|
-
if (!existing) return null;
|
|
17880
|
+
const existing = state2.runMetricsMap.get(cid) ?? { startedAt: Date.now() };
|
|
17835
17881
|
const updated = {
|
|
17836
17882
|
...existing,
|
|
17837
17883
|
...event.model !== void 0 ? { model: event.model } : {},
|
|
@@ -17843,6 +17889,41 @@ function projectRunProgress(event, state2) {
|
|
|
17843
17889
|
newMap.set(cid, updated);
|
|
17844
17890
|
return { runMetricsMap: newMap };
|
|
17845
17891
|
}
|
|
17892
|
+
function projectContextCompaction(event, state2) {
|
|
17893
|
+
const cid = event.sessionId;
|
|
17894
|
+
const existing = state2.contextCompactionMap.get(cid) ?? { totalCompactions: 0 };
|
|
17895
|
+
const totalCompactions = event.phase === "completed" ? existing.totalCompactions + 1 : existing.totalCompactions;
|
|
17896
|
+
return {
|
|
17897
|
+
contextCompactionMap: /* @__PURE__ */ new Map([[cid, {
|
|
17898
|
+
totalCompactions,
|
|
17899
|
+
lastCompaction: {
|
|
17900
|
+
phase: event.phase,
|
|
17901
|
+
reason: event.reason,
|
|
17902
|
+
targetTokenLimit: event.targetTokenLimit,
|
|
17903
|
+
...event.triggerTokens !== void 0 ? { triggerTokens: event.triggerTokens } : {},
|
|
17904
|
+
beforeMessageCount: event.beforeMessageCount,
|
|
17905
|
+
...event.durableBeforeTokens !== void 0 ? { durableBeforeTokens: event.durableBeforeTokens } : {},
|
|
17906
|
+
...event.afterMessageCount !== void 0 ? { afterMessageCount: event.afterMessageCount } : {},
|
|
17907
|
+
...event.durableAfterTokens !== void 0 ? { durableAfterTokens: event.durableAfterTokens } : {},
|
|
17908
|
+
...event.durationMs !== void 0 ? { durationMs: event.durationMs } : {},
|
|
17909
|
+
...event.error?.message ? { errorMessage: event.error.message } : {},
|
|
17910
|
+
at: Date.now()
|
|
17911
|
+
}
|
|
17912
|
+
}]])
|
|
17913
|
+
};
|
|
17914
|
+
}
|
|
17915
|
+
function projectContextStatus(event, state2) {
|
|
17916
|
+
const cid = event.sessionId;
|
|
17917
|
+
const existing = state2.contextCompactionMap.get(cid) ?? { totalCompactions: 0 };
|
|
17918
|
+
return {
|
|
17919
|
+
contextCompactionMap: /* @__PURE__ */ new Map([[cid, {
|
|
17920
|
+
...existing,
|
|
17921
|
+
currentPreparedTokens: event.preparedTokens,
|
|
17922
|
+
inputTokenLimit: event.inputTokenLimit,
|
|
17923
|
+
thresholdRatio: event.thresholdRatio
|
|
17924
|
+
}]])
|
|
17925
|
+
};
|
|
17926
|
+
}
|
|
17846
17927
|
function projectBlockUpdated(event, messagesMap, state2) {
|
|
17847
17928
|
const cid = event.sessionId;
|
|
17848
17929
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
@@ -18010,6 +18091,7 @@ function patchState(state2, patch2) {
|
|
|
18010
18091
|
}
|
|
18011
18092
|
const simpleKeys = [
|
|
18012
18093
|
"messagesMap",
|
|
18094
|
+
"contextCompactionMap",
|
|
18013
18095
|
"activeRunIdMap",
|
|
18014
18096
|
"retryingMap",
|
|
18015
18097
|
"sendingMap",
|
|
@@ -18059,6 +18141,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18059
18141
|
completedMap: /* @__PURE__ */ new Map(),
|
|
18060
18142
|
conversationLRU: [],
|
|
18061
18143
|
runMetricsMap: /* @__PURE__ */ new Map(),
|
|
18144
|
+
contextCompactionMap: /* @__PURE__ */ new Map(),
|
|
18062
18145
|
messageUiStateMap: /* @__PURE__ */ new Map(),
|
|
18063
18146
|
streamRevisionMap: /* @__PURE__ */ new Map(),
|
|
18064
18147
|
pendingUserMsgMap: /* @__PURE__ */ new Map(),
|
|
@@ -18073,6 +18156,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18073
18156
|
getMemberAgentIds: (cid) => get2().memberAgentIdsMap.get(cid) ?? [],
|
|
18074
18157
|
getActiveRunId: (cid) => get2().activeRunIdMap.get(cid),
|
|
18075
18158
|
getRetrying: (cid) => get2().retryingMap.get(cid) ?? null,
|
|
18159
|
+
getContextCompaction: (cid) => get2().contextCompactionMap.get(cid),
|
|
18076
18160
|
getPhase: (cid) => {
|
|
18077
18161
|
const state2 = get2();
|
|
18078
18162
|
if (state2.loadingMap.get(cid)) return "loading";
|
|
@@ -18162,12 +18246,14 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18162
18246
|
const nextMemberAgentIdsMap = setArrayMapValueIfChanged(state2.memberAgentIdsMap, sessionId, memberIds);
|
|
18163
18247
|
const nextLoadingMap = setMapValueIfChanged(state2.loadingMap, sessionId, false);
|
|
18164
18248
|
const nextConversationLRU = cleanup.conversationLRU ?? newLRU;
|
|
18249
|
+
const nextRunMetricsMap = cleanup.runMetricsMap ?? state2.runMetricsMap;
|
|
18165
18250
|
return {
|
|
18166
18251
|
messagesMap: nextMessagesMap,
|
|
18167
18252
|
hasMoreMap: nextHasMoreMap,
|
|
18168
18253
|
conversationMap: nextConversationMap,
|
|
18169
18254
|
memberAgentIdsMap: nextMemberAgentIdsMap,
|
|
18170
18255
|
loadingMap: nextLoadingMap,
|
|
18256
|
+
runMetricsMap: nextRunMetricsMap,
|
|
18171
18257
|
conversationLRU: nextConversationLRU
|
|
18172
18258
|
};
|
|
18173
18259
|
});
|
|
@@ -18450,6 +18536,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18450
18536
|
retryingMap: clearMap(state2.retryingMap),
|
|
18451
18537
|
completedMap: clearMap(state2.completedMap),
|
|
18452
18538
|
runMetricsMap: clearMap(state2.runMetricsMap),
|
|
18539
|
+
contextCompactionMap: clearMap(state2.contextCompactionMap),
|
|
18453
18540
|
messageUiStateMap: clearMap(state2.messageUiStateMap),
|
|
18454
18541
|
streamRevisionMap: clearMap(state2.streamRevisionMap),
|
|
18455
18542
|
pendingUserMsgMap: clearMap(state2.pendingUserMsgMap),
|
|
@@ -18556,6 +18643,9 @@ function mergeProjectionUpdate(state2, result) {
|
|
|
18556
18643
|
});
|
|
18557
18644
|
merged.runMetricsMap = newMap;
|
|
18558
18645
|
}
|
|
18646
|
+
if (result.contextCompactionMap) {
|
|
18647
|
+
merged.contextCompactionMap = mergeMap(state2.contextCompactionMap, result.contextCompactionMap);
|
|
18648
|
+
}
|
|
18559
18649
|
if (result.messagesMap) {
|
|
18560
18650
|
merged.messagesMap = mergeMap(state2.messagesMap, result.messagesMap);
|
|
18561
18651
|
}
|
|
@@ -19100,14 +19190,14 @@ const confirmDialog = "_confirmDialog_s5v85_18";
|
|
|
19100
19190
|
const confirmTitle = "_confirmTitle_s5v85_28";
|
|
19101
19191
|
const confirmMessage = "_confirmMessage_s5v85_35";
|
|
19102
19192
|
const confirmActions = "_confirmActions_s5v85_42";
|
|
19103
|
-
const spin$
|
|
19193
|
+
const spin$4 = "_spin_s5v85_52";
|
|
19104
19194
|
const styles$1c = {
|
|
19105
19195
|
confirmOverlay,
|
|
19106
19196
|
confirmDialog,
|
|
19107
19197
|
confirmTitle,
|
|
19108
19198
|
confirmMessage,
|
|
19109
19199
|
confirmActions,
|
|
19110
|
-
spin: spin$
|
|
19200
|
+
spin: spin$4
|
|
19111
19201
|
};
|
|
19112
19202
|
function ConfirmDialog({
|
|
19113
19203
|
title: title2,
|
|
@@ -65068,12 +65158,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
65068
65158
|
registerLayoutLoaders([
|
|
65069
65159
|
{
|
|
65070
65160
|
name: "dagre",
|
|
65071
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-
|
|
65161
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-Df-HS0DT.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
|
|
65072
65162
|
},
|
|
65073
65163
|
...[
|
|
65074
65164
|
{
|
|
65075
65165
|
name: "cose-bilkent",
|
|
65076
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-
|
|
65166
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-Wa-FYjHx.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
|
|
65077
65167
|
}
|
|
65078
65168
|
]
|
|
65079
65169
|
]);
|
|
@@ -65529,7 +65619,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
65529
65619
|
}, "detector");
|
|
65530
65620
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
65531
65621
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65532
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-
|
|
65622
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-B57DWDB5.js");
|
|
65533
65623
|
return { diagram: diagram22 };
|
|
65534
65624
|
}, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
|
|
65535
65625
|
return { id, diagram: diagram2 };
|
|
@@ -65549,7 +65639,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65549
65639
|
}, "detector");
|
|
65550
65640
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
65551
65641
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65552
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65642
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-B5k0WctR.js");
|
|
65553
65643
|
return { diagram: diagram22 };
|
|
65554
65644
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65555
65645
|
return { id: id2, diagram: diagram2 };
|
|
@@ -65575,7 +65665,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65575
65665
|
}, "detector");
|
|
65576
65666
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
65577
65667
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65578
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65668
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-B5k0WctR.js");
|
|
65579
65669
|
return { diagram: diagram22 };
|
|
65580
65670
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65581
65671
|
return { id: id3, diagram: diagram2 };
|
|
@@ -65592,7 +65682,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
65592
65682
|
}, "detector");
|
|
65593
65683
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
65594
65684
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65595
|
-
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-
|
|
65685
|
+
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-CkzvnQaU.js");
|
|
65596
65686
|
return { diagram: diagram22 };
|
|
65597
65687
|
}, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
|
|
65598
65688
|
return { id: id4, diagram: diagram2 };
|
|
@@ -65609,7 +65699,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
65609
65699
|
}, "detector");
|
|
65610
65700
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
65611
65701
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65612
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-
|
|
65702
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-CJdXKPsy.js");
|
|
65613
65703
|
return { diagram: diagram22 };
|
|
65614
65704
|
}, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
|
|
65615
65705
|
return { id: id5, diagram: diagram2 };
|
|
@@ -65626,7 +65716,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
65626
65716
|
}, "detector");
|
|
65627
65717
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
65628
65718
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65629
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-
|
|
65719
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-C2pFdr_b.js");
|
|
65630
65720
|
return { diagram: diagram22 };
|
|
65631
65721
|
}, true ? __vite__mapDeps([20,21,22,23]) : void 0, import.meta.url);
|
|
65632
65722
|
return { id: id6, diagram: diagram2 };
|
|
@@ -65643,7 +65733,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
65643
65733
|
}, "detector");
|
|
65644
65734
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
65645
65735
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65646
|
-
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-
|
|
65736
|
+
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-CUBNnXNy.js");
|
|
65647
65737
|
return { diagram: diagram22 };
|
|
65648
65738
|
}, true ? __vite__mapDeps([24,19,4,2]) : void 0, import.meta.url);
|
|
65649
65739
|
return { id: id7, diagram: diagram2 };
|
|
@@ -65659,7 +65749,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
65659
65749
|
}, "detector");
|
|
65660
65750
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
65661
65751
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65662
|
-
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-
|
|
65752
|
+
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-LipgyJMA.js");
|
|
65663
65753
|
return { diagram: diagram22 };
|
|
65664
65754
|
}, true ? __vite__mapDeps([25,17,19,4,2,26,27,22]) : void 0, import.meta.url);
|
|
65665
65755
|
return { id: id8, diagram: diagram2 };
|
|
@@ -65675,7 +65765,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
65675
65765
|
}, "detector");
|
|
65676
65766
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
65677
65767
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65678
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-
|
|
65768
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-BsvYEtIZ.js");
|
|
65679
65769
|
return { diagram: diagram22 };
|
|
65680
65770
|
}, true ? __vite__mapDeps([28,21,22,23]) : void 0, import.meta.url);
|
|
65681
65771
|
return { id: id9, diagram: diagram2 };
|
|
@@ -65692,7 +65782,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
65692
65782
|
}, "detector");
|
|
65693
65783
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
65694
65784
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65695
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-
|
|
65785
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-CwTHSfES.js");
|
|
65696
65786
|
return { diagram: diagram22 };
|
|
65697
65787
|
}, true ? __vite__mapDeps([29,22,27,21,23]) : void 0, import.meta.url);
|
|
65698
65788
|
return { id: id10, diagram: diagram2 };
|
|
@@ -65709,7 +65799,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
65709
65799
|
}, "detector");
|
|
65710
65800
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
65711
65801
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65712
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-
|
|
65802
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-BnabpcqK.js");
|
|
65713
65803
|
return { diagram: diagram22 };
|
|
65714
65804
|
}, true ? __vite__mapDeps([30,12,13]) : void 0, import.meta.url);
|
|
65715
65805
|
return { id: id11, diagram: diagram2 };
|
|
@@ -65726,7 +65816,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
65726
65816
|
}, "detector");
|
|
65727
65817
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
65728
65818
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65729
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-
|
|
65819
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-CtGBoKet.js");
|
|
65730
65820
|
return { diagram: diagram22 };
|
|
65731
65821
|
}, true ? __vite__mapDeps([31,9,18]) : void 0, import.meta.url);
|
|
65732
65822
|
return { id: id12, diagram: diagram2 };
|
|
@@ -65746,7 +65836,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65746
65836
|
}, "detector");
|
|
65747
65837
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
65748
65838
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65749
|
-
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-
|
|
65839
|
+
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-C516x-2x.js");
|
|
65750
65840
|
return { diagram: diagram22 };
|
|
65751
65841
|
}, true ? __vite__mapDeps([32,33,11,9,12,13]) : void 0, import.meta.url);
|
|
65752
65842
|
return { id: id13, diagram: diagram2 };
|
|
@@ -65766,7 +65856,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65766
65856
|
}, "detector");
|
|
65767
65857
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
65768
65858
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65769
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-
|
|
65859
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-C516x-2x.js");
|
|
65770
65860
|
return { diagram: diagram22 };
|
|
65771
65861
|
}, true ? __vite__mapDeps([34,33,11,9,12,13]) : void 0, import.meta.url);
|
|
65772
65862
|
return { id: id14, diagram: diagram2 };
|
|
@@ -65786,7 +65876,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65786
65876
|
}, "detector");
|
|
65787
65877
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
65788
65878
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65789
|
-
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-
|
|
65879
|
+
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-DYwbJ7V6.js");
|
|
65790
65880
|
return { diagram: diagram22 };
|
|
65791
65881
|
}, true ? __vite__mapDeps([35,36,12,13,1,2,3,4]) : void 0, import.meta.url);
|
|
65792
65882
|
return { id: id15, diagram: diagram2 };
|
|
@@ -65809,7 +65899,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65809
65899
|
}, "detector");
|
|
65810
65900
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
65811
65901
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65812
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-
|
|
65902
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-CtQIhDqi.js");
|
|
65813
65903
|
return { diagram: diagram22 };
|
|
65814
65904
|
}, true ? __vite__mapDeps([37,36,12,13]) : void 0, import.meta.url);
|
|
65815
65905
|
return { id: id16, diagram: diagram2 };
|
|
@@ -65826,7 +65916,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
65826
65916
|
}, "detector");
|
|
65827
65917
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
65828
65918
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65829
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-
|
|
65919
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-CTytCzzg.js");
|
|
65830
65920
|
return { diagram: diagram22 };
|
|
65831
65921
|
}, true ? __vite__mapDeps([38,11,9,26]) : void 0, import.meta.url);
|
|
65832
65922
|
return { id: id17, diagram: diagram2 };
|
|
@@ -65896,7 +65986,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
65896
65986
|
}, "detector");
|
|
65897
65987
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
65898
65988
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65899
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65989
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-B5k0WctR.js");
|
|
65900
65990
|
return { diagram: diagram22 };
|
|
65901
65991
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65902
65992
|
return { id: id18, diagram: diagram2 };
|
|
@@ -65913,7 +66003,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
65913
66003
|
}, "detector");
|
|
65914
66004
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
65915
66005
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65916
|
-
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-
|
|
66006
|
+
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-Dg1mahK3.js");
|
|
65917
66007
|
return { diagram: diagram22 };
|
|
65918
66008
|
}, true ? __vite__mapDeps([39,26]) : void 0, import.meta.url);
|
|
65919
66009
|
return { id: id19, diagram: diagram2 };
|
|
@@ -65930,7 +66020,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
65930
66020
|
}, "detector");
|
|
65931
66021
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
65932
66022
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65933
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-
|
|
66023
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-Dvudei3d.js");
|
|
65934
66024
|
return { diagram: diagram22 };
|
|
65935
66025
|
}, true ? __vite__mapDeps([40,12,13]) : void 0, import.meta.url);
|
|
65936
66026
|
return { id: id20, diagram: diagram2 };
|
|
@@ -65947,7 +66037,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
65947
66037
|
}, "detector");
|
|
65948
66038
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
65949
66039
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65950
|
-
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-
|
|
66040
|
+
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-CJ9BZQW-.js");
|
|
65951
66041
|
return { diagram: diagram22 };
|
|
65952
66042
|
}, true ? __vite__mapDeps([41,11]) : void 0, import.meta.url);
|
|
65953
66043
|
return { id: id21, diagram: diagram2 };
|
|
@@ -65964,7 +66054,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
65964
66054
|
}, "detector");
|
|
65965
66055
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
65966
66056
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65967
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-
|
|
66057
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-BuCgq17Q.js");
|
|
65968
66058
|
return { diagram: diagram22 };
|
|
65969
66059
|
}, true ? __vite__mapDeps([42,27,22]) : void 0, import.meta.url);
|
|
65970
66060
|
return { id: id22, diagram: diagram2 };
|
|
@@ -65981,7 +66071,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
65981
66071
|
}, "detector");
|
|
65982
66072
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
65983
66073
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65984
|
-
const { diagram: diagram22 } = await import("./diagram-TYMM5635-
|
|
66074
|
+
const { diagram: diagram22 } = await import("./diagram-TYMM5635-Dgy-yPsr.js");
|
|
65985
66075
|
return { diagram: diagram22 };
|
|
65986
66076
|
}, true ? __vite__mapDeps([43,17,19,4,2]) : void 0, import.meta.url);
|
|
65987
66077
|
return { id: id23, diagram: diagram2 };
|
|
@@ -65997,7 +66087,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
65997
66087
|
}, "detector");
|
|
65998
66088
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
65999
66089
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66000
|
-
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-
|
|
66090
|
+
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-Byvl-KNj.js");
|
|
66001
66091
|
return { diagram: diagram22 };
|
|
66002
66092
|
}, true ? __vite__mapDeps([44,17,19,4,2]) : void 0, import.meta.url);
|
|
66003
66093
|
return { id: id24, diagram: diagram2 };
|
|
@@ -66013,7 +66103,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
66013
66103
|
}, "detector");
|
|
66014
66104
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
66015
66105
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66016
|
-
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-
|
|
66106
|
+
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-4chZr0B3.js");
|
|
66017
66107
|
return { diagram: diagram22 };
|
|
66018
66108
|
}, true ? __vite__mapDeps([45,11,5,1,2,14]) : void 0, import.meta.url);
|
|
66019
66109
|
return { id: id25, diagram: diagram2 };
|
|
@@ -66030,7 +66120,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
66030
66120
|
}, "detector");
|
|
66031
66121
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
66032
66122
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66033
|
-
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-
|
|
66123
|
+
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-CaZsWnM2.js");
|
|
66034
66124
|
return { diagram: diagram22 };
|
|
66035
66125
|
}, true ? __vite__mapDeps([46,17,18,19,4,2]) : void 0, import.meta.url);
|
|
66036
66126
|
return { id: id26, diagram: diagram2 };
|
|
@@ -66047,7 +66137,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
66047
66137
|
}, "detector");
|
|
66048
66138
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
66049
66139
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66050
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-
|
|
66140
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-DWhLXXBB.js");
|
|
66051
66141
|
return { diagram: diagram22 };
|
|
66052
66142
|
}, true ? __vite__mapDeps([47,17,19,4,2,7]) : void 0, import.meta.url);
|
|
66053
66143
|
return { id: id27, diagram: diagram2 };
|
|
@@ -66064,7 +66154,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
66064
66154
|
}, "detector");
|
|
66065
66155
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
66066
66156
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66067
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-
|
|
66157
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-Blfv83uV.js");
|
|
66068
66158
|
return { diagram: diagram22 };
|
|
66069
66159
|
}, true ? [] : void 0, import.meta.url);
|
|
66070
66160
|
return { id: id28, diagram: diagram2 };
|
|
@@ -66080,7 +66170,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
66080
66170
|
}, "detector");
|
|
66081
66171
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
66082
66172
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66083
|
-
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-
|
|
66173
|
+
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-CdFh8oWQ.js");
|
|
66084
66174
|
return { diagram: diagram22 };
|
|
66085
66175
|
}, true ? [] : void 0, import.meta.url);
|
|
66086
66176
|
return { id: id29, diagram: diagram2 };
|
|
@@ -66097,7 +66187,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
66097
66187
|
}, "detector");
|
|
66098
66188
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
66099
66189
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66100
|
-
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-
|
|
66190
|
+
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-0B-U8e4R.js");
|
|
66101
66191
|
return { diagram: diagram22 };
|
|
66102
66192
|
}, true ? __vite__mapDeps([48,13,17,19,4,2,23,27,22]) : void 0, import.meta.url);
|
|
66103
66193
|
return { id: id30, diagram: diagram2 };
|
|
@@ -66113,7 +66203,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
|
|
|
66113
66203
|
}, "detector");
|
|
66114
66204
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
66115
66205
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66116
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-
|
|
66206
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-BUhyPKXM.js");
|
|
66117
66207
|
return { diagram: diagram22 };
|
|
66118
66208
|
}, true ? __vite__mapDeps([49,17,19,4,2]) : void 0, import.meta.url);
|
|
66119
66209
|
return { id: id31, diagram: diagram2 };
|
|
@@ -76320,9 +76410,9 @@ const MarkdownMessage = reactExports.memo(function MarkdownMessage2({
|
|
|
76320
76410
|
)
|
|
76321
76411
|
] });
|
|
76322
76412
|
}, markdownPropsEqual);
|
|
76323
|
-
const header$j = "
|
|
76324
|
-
const chevron$4 = "
|
|
76325
|
-
const content$a = "
|
|
76413
|
+
const header$j = "_header_3tatz_1";
|
|
76414
|
+
const chevron$4 = "_chevron_3tatz_24";
|
|
76415
|
+
const content$a = "_content_3tatz_29";
|
|
76326
76416
|
const styles$15 = {
|
|
76327
76417
|
header: header$j,
|
|
76328
76418
|
chevron: chevron$4,
|
|
@@ -76335,12 +76425,14 @@ const Collapse = reactExports.memo(function Collapse2({
|
|
|
76335
76425
|
onToggle,
|
|
76336
76426
|
defaultExpanded = false,
|
|
76337
76427
|
className,
|
|
76338
|
-
iconPosition = "right"
|
|
76428
|
+
iconPosition = "right",
|
|
76429
|
+
collapsible = true
|
|
76339
76430
|
}) {
|
|
76340
76431
|
const isControlled = expanded2 !== void 0;
|
|
76341
76432
|
const [internalExpanded, setInternalExpanded] = reactExports.useState(defaultExpanded);
|
|
76342
76433
|
const isExpanded = isControlled ? expanded2 : internalExpanded;
|
|
76343
76434
|
const handleToggle = () => {
|
|
76435
|
+
if (!collapsible) return;
|
|
76344
76436
|
if (!isControlled) {
|
|
76345
76437
|
setInternalExpanded((prev2) => !prev2);
|
|
76346
76438
|
}
|
|
@@ -76348,10 +76440,10 @@ const Collapse = reactExports.memo(function Collapse2({
|
|
|
76348
76440
|
};
|
|
76349
76441
|
const iconElement = isExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { size: 14, className: styles$15.chevron }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { size: 14, className: styles$15.chevron });
|
|
76350
76442
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className, children: [
|
|
76351
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$15.header, onClick: handleToggle, children: [
|
|
76352
|
-
iconPosition === "left" && iconElement,
|
|
76443
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$15.header, "data-collapsible": collapsible, onClick: handleToggle, children: [
|
|
76444
|
+
collapsible && iconPosition === "left" && iconElement,
|
|
76353
76445
|
header2,
|
|
76354
|
-
iconPosition === "right" && iconElement
|
|
76446
|
+
collapsible && iconPosition === "right" && iconElement
|
|
76355
76447
|
] }),
|
|
76356
76448
|
isExpanded && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$15.content, children: children2 })
|
|
76357
76449
|
] });
|
|
@@ -77121,6 +77213,9 @@ function formatDurationMs(durationMs) {
|
|
|
77121
77213
|
const remainingSeconds = totalSeconds % 60;
|
|
77122
77214
|
return remainingSeconds > 0 ? `${minutes}m${remainingSeconds}s` : `${minutes}m`;
|
|
77123
77215
|
}
|
|
77216
|
+
function useRuntimeMetricsVisibility() {
|
|
77217
|
+
return !useIsMobile();
|
|
77218
|
+
}
|
|
77124
77219
|
const card$4 = "_card_10ysh_1";
|
|
77125
77220
|
const embedded$1 = "_embedded_10ysh_9";
|
|
77126
77221
|
const collapse$1 = "_collapse_10ysh_16";
|
|
@@ -77145,7 +77240,7 @@ const diffButton = "_diffButton_10ysh_174";
|
|
|
77145
77240
|
const diffSection = "_diffSection_10ysh_194";
|
|
77146
77241
|
const taskIdList = "_taskIdList_10ysh_198";
|
|
77147
77242
|
const spinning$2 = "_spinning_10ysh_204";
|
|
77148
|
-
const spin$
|
|
77243
|
+
const spin$3 = "_spin_10ysh_204";
|
|
77149
77244
|
const generatedImage = "_generatedImage_10ysh_215";
|
|
77150
77245
|
const generatedImageThumb = "_generatedImageThumb_10ysh_223";
|
|
77151
77246
|
const brokenImage = "_brokenImage_10ysh_231";
|
|
@@ -77176,7 +77271,7 @@ const styles$Z = {
|
|
|
77176
77271
|
diffSection,
|
|
77177
77272
|
taskIdList,
|
|
77178
77273
|
spinning: spinning$2,
|
|
77179
|
-
spin: spin$
|
|
77274
|
+
spin: spin$3,
|
|
77180
77275
|
generatedImage,
|
|
77181
77276
|
generatedImageThumb,
|
|
77182
77277
|
brokenImage,
|
|
@@ -77477,6 +77572,7 @@ function renderWaitTaskArgLinks(taskIds) {
|
|
|
77477
77572
|
}
|
|
77478
77573
|
function arePropsEqual(prev2, next2) {
|
|
77479
77574
|
if (prev2.variant !== next2.variant) return false;
|
|
77575
|
+
if (prev2.isOutputStreaming !== next2.isOutputStreaming) return false;
|
|
77480
77576
|
const p2 = prev2.toolCall;
|
|
77481
77577
|
const n2 = next2.toolCall;
|
|
77482
77578
|
return p2.id === n2.id && p2.name === n2.name && p2.status === n2.status && p2.result === n2.result && p2.error === n2.error && p2.args === n2.args && p2.startedAt === n2.startedAt && p2.endedAt === n2.endedAt && p2.durationMs === n2.durationMs;
|
|
@@ -77524,9 +77620,10 @@ function GenerateImageResult({ result }) {
|
|
|
77524
77620
|
)
|
|
77525
77621
|
] });
|
|
77526
77622
|
}
|
|
77527
|
-
const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, variant = "default" }) {
|
|
77623
|
+
const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, variant = "default", isOutputStreaming = false }) {
|
|
77528
77624
|
const { t: t2 } = useTranslation();
|
|
77529
77625
|
const { theme } = useTheme();
|
|
77626
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
77530
77627
|
const [showDiff, setShowDiff] = reactExports.useState(true);
|
|
77531
77628
|
const [pathCopied, setPathCopied] = reactExports.useState(false);
|
|
77532
77629
|
const isPatchTool = toolCall.name === "applyPatch" || toolCall.name === "patch";
|
|
@@ -77535,6 +77632,7 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77535
77632
|
const waitTaskResults = isWaitTaskResult ? toolCall.result.results : null;
|
|
77536
77633
|
const shouldAutoExpandWaitTask = !!waitTaskResults && waitTaskResults.length > 1;
|
|
77537
77634
|
const isSendFileWithAttachment = toolCall.name === "sendFile" && toolCall.status === "success" && typeof toolCall.result === "object" && !!toolCall.result?.attachment;
|
|
77635
|
+
const canExpand = toolCall.status !== "pending";
|
|
77538
77636
|
const autoExpand = !!diff || shouldAutoExpandWaitTask || isSendFileWithAttachment;
|
|
77539
77637
|
const [isExpanded, setIsExpanded] = reactExports.useState(autoExpand);
|
|
77540
77638
|
const hasAutoExpandedRef = reactExports.useRef(autoExpand);
|
|
@@ -77544,6 +77642,11 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77544
77642
|
hasAutoExpandedRef.current = true;
|
|
77545
77643
|
}
|
|
77546
77644
|
}, [autoExpand]);
|
|
77645
|
+
reactExports.useEffect(() => {
|
|
77646
|
+
if (!canExpand) {
|
|
77647
|
+
setIsExpanded(false);
|
|
77648
|
+
}
|
|
77649
|
+
}, [canExpand]);
|
|
77547
77650
|
const statusIcon2 = (() => {
|
|
77548
77651
|
const color2 = toolCall.status === "success" ? "var(--color-success)" : toolCall.status === "error" ? "var(--color-error)" : "var(--text-tertiary)";
|
|
77549
77652
|
const cls = toolCall.status === "pending" ? styles$Z.spinning : void 0;
|
|
@@ -77602,7 +77705,7 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77602
77705
|
};
|
|
77603
77706
|
const readContent = toolCall.status === "success" ? extractReadContent(toolCall.result) : null;
|
|
77604
77707
|
const durationMs = toolCall.durationMs ?? (toolCall.startedAt && toolCall.endedAt ? toolCall.endedAt - toolCall.startedAt : void 0);
|
|
77605
|
-
const duration2 = durationMs != null ? formatDurationMs(durationMs) : null;
|
|
77708
|
+
const duration2 = showRuntimeMetrics && durationMs != null ? formatDurationMs(durationMs) : null;
|
|
77606
77709
|
const readFilePath = toolCall.name === "readFile" || toolCall.name === "read" ? getToolArgSummary(toolCall.name, toolCall.args) : null;
|
|
77607
77710
|
const readLanguage = getReadFileLanguage(readFilePath);
|
|
77608
77711
|
const codeStyle = theme === "dark" ? atomOneDark : githubGist;
|
|
@@ -77611,8 +77714,9 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77611
77714
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$Z.card, styles$Z[toolCall.status], variant === "embedded" && styles$Z.embedded), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
77612
77715
|
Collapse,
|
|
77613
77716
|
{
|
|
77614
|
-
expanded: isExpanded,
|
|
77717
|
+
expanded: canExpand && isExpanded,
|
|
77615
77718
|
onToggle: () => setIsExpanded((v2) => !v2),
|
|
77719
|
+
collapsible: canExpand,
|
|
77616
77720
|
className: styles$Z.collapse,
|
|
77617
77721
|
header: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
77618
77722
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolIcon, { size: 14, className: styles$Z.toolIcon }),
|
|
@@ -77774,6 +77878,7 @@ function useElapsedTime({
|
|
|
77774
77878
|
}
|
|
77775
77879
|
const ReasoningBlock = reactExports.memo(function ReasoningBlock2({ content: content2, isStreaming, variant = "default", startedAt, durationMs }) {
|
|
77776
77880
|
const { t: t2 } = useTranslation();
|
|
77881
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
77777
77882
|
const [expanded2, setExpanded] = reactExports.useState(false);
|
|
77778
77883
|
const textRef = reactExports.useRef(null);
|
|
77779
77884
|
const userToggledRef = reactExports.useRef(false);
|
|
@@ -77829,7 +77934,7 @@ const ReasoningBlock = reactExports.memo(function ReasoningBlock2({ content: con
|
|
|
77829
77934
|
intervalMs: 200
|
|
77830
77935
|
});
|
|
77831
77936
|
if (!content2) return null;
|
|
77832
|
-
const displayDurationMs = isStreaming ? elapsedMs : durationMs;
|
|
77937
|
+
const displayDurationMs = showRuntimeMetrics ? isStreaming ? elapsedMs : durationMs : void 0;
|
|
77833
77938
|
const durationText = displayDurationMs != null ? formatDurationMs(displayDurationMs) : null;
|
|
77834
77939
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$Y.container, isStreaming ? styles$Y.streaming : "", variant === "embedded" && styles$Y.embedded), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77835
77940
|
Collapse,
|
|
@@ -78130,6 +78235,7 @@ const TaskBlock = reactExports.memo(function TaskBlock2({ block, delegatorId, de
|
|
|
78130
78235
|
const isBackground = task.background === true;
|
|
78131
78236
|
const [isExpanded, setIsExpanded] = reactExports.useState(false);
|
|
78132
78237
|
const { t: t2 } = useTranslation();
|
|
78238
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78133
78239
|
const participants = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
78134
78240
|
hasDelegatorContext && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
78135
78241
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -78162,7 +78268,7 @@ const TaskBlock = reactExports.memo(function TaskBlock2({ block, delegatorId, de
|
|
|
78162
78268
|
enabled: task.status === "running",
|
|
78163
78269
|
intervalMs: 1e3
|
|
78164
78270
|
});
|
|
78165
|
-
const displayDurationMs = task.status === "running" ? runningElapsedMs : task.durationMs;
|
|
78271
|
+
const displayDurationMs = showRuntimeMetrics ? task.status === "running" ? runningElapsedMs : task.durationMs : void 0;
|
|
78166
78272
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$U.anchor, ...{ [TASK_BLOCK_SELECTOR_ATTR]: task.id }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78167
78273
|
CollaborationShell,
|
|
78168
78274
|
{
|
|
@@ -78276,7 +78382,7 @@ const BroadcastCard = reactExports.memo(function BroadcastCard2({ broadcast }) {
|
|
|
78276
78382
|
const { t: t2 } = useTranslation();
|
|
78277
78383
|
const { responses, status: status2 } = broadcast;
|
|
78278
78384
|
const contentRef = reactExports.useRef(null);
|
|
78279
|
-
const
|
|
78385
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78280
78386
|
const initialTabId = responses.find((r2) => r2.status === "streaming")?.agentId ?? responses[0]?.agentId ?? "";
|
|
78281
78387
|
const [activeTabId, setActiveTabId] = reactExports.useState(initialTabId);
|
|
78282
78388
|
const [expanded2, setExpanded] = reactExports.useState(true);
|
|
@@ -78296,7 +78402,7 @@ const BroadcastCard = reactExports.memo(function BroadcastCard2({ broadcast }) {
|
|
|
78296
78402
|
enabled: status2 === "running",
|
|
78297
78403
|
intervalMs: 1e3
|
|
78298
78404
|
});
|
|
78299
|
-
const displayDurationMs = status2 === "running" &&
|
|
78405
|
+
const displayDurationMs = status2 === "running" && showRuntimeMetrics ? runningElapsedMs : void 0;
|
|
78300
78406
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78301
78407
|
CollaborationShell,
|
|
78302
78408
|
{
|
|
@@ -78357,65 +78463,70 @@ function TabBlocksRenderer({ blocks, agentId }) {
|
|
|
78357
78463
|
isUser: false
|
|
78358
78464
|
} });
|
|
78359
78465
|
}
|
|
78360
|
-
const message$4 = "
|
|
78361
|
-
const fullWidth = "
|
|
78362
|
-
const user = "
|
|
78363
|
-
const agent$2 = "
|
|
78364
|
-
const groupLayout = "
|
|
78365
|
-
const agentShellCompact = "
|
|
78366
|
-
const avatarCol$1 = "
|
|
78367
|
-
const senderHeader = "
|
|
78368
|
-
const contentCol = "
|
|
78369
|
-
const senderLabel = "
|
|
78370
|
-
const senderName = "
|
|
78371
|
-
const bubble = "
|
|
78372
|
-
const hasUsage = "
|
|
78373
|
-
const embeddedBubble = "
|
|
78374
|
-
const textBubble = "
|
|
78375
|
-
const textSection = "
|
|
78376
|
-
const embeddedBubbleContent = "
|
|
78377
|
-
const content$8 = "
|
|
78378
|
-
const messageFooter = "
|
|
78379
|
-
const groupMetaFooter = "
|
|
78380
|
-
const messageFooterActions = "
|
|
78381
|
-
const timestamp = "
|
|
78382
|
-
const copyButton$1 = "
|
|
78383
|
-
const errorBlock = "
|
|
78384
|
-
const errorHeader = "
|
|
78385
|
-
const errorType = "
|
|
78386
|
-
const errorMessage$1 = "
|
|
78387
|
-
const
|
|
78388
|
-
const
|
|
78389
|
-
const
|
|
78390
|
-
const
|
|
78391
|
-
const
|
|
78392
|
-
const
|
|
78393
|
-
const
|
|
78394
|
-
const
|
|
78395
|
-
const
|
|
78396
|
-
const
|
|
78397
|
-
const
|
|
78398
|
-
const
|
|
78399
|
-
const
|
|
78400
|
-
const
|
|
78401
|
-
const
|
|
78402
|
-
const
|
|
78403
|
-
const
|
|
78404
|
-
const
|
|
78405
|
-
const
|
|
78406
|
-
const
|
|
78407
|
-
const
|
|
78408
|
-
const
|
|
78409
|
-
const
|
|
78410
|
-
const
|
|
78411
|
-
const
|
|
78412
|
-
const
|
|
78413
|
-
const
|
|
78414
|
-
const
|
|
78415
|
-
const
|
|
78416
|
-
const
|
|
78417
|
-
const
|
|
78418
|
-
const
|
|
78466
|
+
const message$4 = "_message_185wk_1";
|
|
78467
|
+
const fullWidth = "_fullWidth_185wk_8";
|
|
78468
|
+
const user = "_user_185wk_12";
|
|
78469
|
+
const agent$2 = "_agent_185wk_17";
|
|
78470
|
+
const groupLayout = "_groupLayout_185wk_25";
|
|
78471
|
+
const agentShellCompact = "_agentShellCompact_185wk_33";
|
|
78472
|
+
const avatarCol$1 = "_avatarCol_185wk_38";
|
|
78473
|
+
const senderHeader = "_senderHeader_185wk_52";
|
|
78474
|
+
const contentCol = "_contentCol_185wk_58";
|
|
78475
|
+
const senderLabel = "_senderLabel_185wk_79";
|
|
78476
|
+
const senderName = "_senderName_185wk_96";
|
|
78477
|
+
const bubble = "_bubble_185wk_102";
|
|
78478
|
+
const hasUsage = "_hasUsage_185wk_128";
|
|
78479
|
+
const embeddedBubble = "_embeddedBubble_185wk_132";
|
|
78480
|
+
const textBubble = "_textBubble_185wk_138";
|
|
78481
|
+
const textSection = "_textSection_185wk_154";
|
|
78482
|
+
const embeddedBubbleContent = "_embeddedBubbleContent_185wk_173";
|
|
78483
|
+
const content$8 = "_content_185wk_58";
|
|
78484
|
+
const messageFooter = "_messageFooter_185wk_199";
|
|
78485
|
+
const groupMetaFooter = "_groupMetaFooter_185wk_207";
|
|
78486
|
+
const messageFooterActions = "_messageFooterActions_185wk_233";
|
|
78487
|
+
const timestamp = "_timestamp_185wk_245";
|
|
78488
|
+
const copyButton$1 = "_copyButton_185wk_256";
|
|
78489
|
+
const errorBlock = "_errorBlock_185wk_285";
|
|
78490
|
+
const errorHeader = "_errorHeader_185wk_293";
|
|
78491
|
+
const errorType = "_errorType_185wk_301";
|
|
78492
|
+
const errorMessage$1 = "_errorMessage_185wk_306";
|
|
78493
|
+
const errorDetails = "_errorDetails_185wk_312";
|
|
78494
|
+
const errorDetailsSummary = "_errorDetailsSummary_185wk_318";
|
|
78495
|
+
const errorDetailsSummaryRow = "_errorDetailsSummaryRow_185wk_326";
|
|
78496
|
+
const errorDetailsCopyButton = "_errorDetailsCopyButton_185wk_333";
|
|
78497
|
+
const errorDetailsContent = "_errorDetailsContent_185wk_355";
|
|
78498
|
+
const collapsedContent = "_collapsedContent_185wk_368";
|
|
78499
|
+
const expandedContent = "_expandedContent_185wk_386";
|
|
78500
|
+
const conclusionStrip = "_conclusionStrip_185wk_391";
|
|
78501
|
+
const conclusionLabel = "_conclusionLabel_185wk_405";
|
|
78502
|
+
const conclusionText = "_conclusionText_185wk_413";
|
|
78503
|
+
const expandButton$1 = "_expandButton_185wk_419";
|
|
78504
|
+
const messageMetrics = "_messageMetrics_185wk_446";
|
|
78505
|
+
const embeddedMessageMetrics = "_embeddedMessageMetrics_185wk_461";
|
|
78506
|
+
const fallbackTransitionBanner = "_fallbackTransitionBanner_185wk_474";
|
|
78507
|
+
const messageMetricsPrimary = "_messageMetricsPrimary_185wk_478";
|
|
78508
|
+
const embeddedMessageMetricsPrimary = "_embeddedMessageMetricsPrimary_185wk_486";
|
|
78509
|
+
const messageMetricsMeta = "_messageMetricsMeta_185wk_491";
|
|
78510
|
+
const metricsStreaming = "_metricsStreaming_185wk_519";
|
|
78511
|
+
const fallbackTransitionIcon = "_fallbackTransitionIcon_185wk_551";
|
|
78512
|
+
const fallbackTransitionText = "_fallbackTransitionText_185wk_556";
|
|
78513
|
+
const tokenUsage = "_tokenUsage_185wk_573";
|
|
78514
|
+
const duration = "_duration_185wk_582";
|
|
78515
|
+
const modelLabel = "_modelLabel_185wk_592";
|
|
78516
|
+
const modelLabelFallback = "_modelLabelFallback_185wk_602";
|
|
78517
|
+
const system = "_system_185wk_614";
|
|
78518
|
+
const systemBubble = "_systemBubble_185wk_621";
|
|
78519
|
+
const systemContent = "_systemContent_185wk_633";
|
|
78520
|
+
const loadingSpinner = "_loadingSpinner_185wk_640";
|
|
78521
|
+
const supervisorTag = "_supervisorTag_185wk_656";
|
|
78522
|
+
const memoryWriteButton = "_memoryWriteButton_185wk_690";
|
|
78523
|
+
const statusArea = "_statusArea_185wk_697";
|
|
78524
|
+
const statusDot$1 = "_statusDot_185wk_705";
|
|
78525
|
+
const dot$2 = "_dot_185wk_714";
|
|
78526
|
+
const dotSending = "_dotSending_185wk_722";
|
|
78527
|
+
const dotError = "_dotError_185wk_726";
|
|
78528
|
+
const retryButton = "_retryButton_185wk_731";
|
|
78529
|
+
const recallButton = "_recallButton_185wk_741";
|
|
78419
78530
|
const styles$S = {
|
|
78420
78531
|
message: message$4,
|
|
78421
78532
|
fullWidth,
|
|
@@ -78444,6 +78555,11 @@ const styles$S = {
|
|
|
78444
78555
|
errorHeader,
|
|
78445
78556
|
errorType,
|
|
78446
78557
|
errorMessage: errorMessage$1,
|
|
78558
|
+
errorDetails,
|
|
78559
|
+
errorDetailsSummary,
|
|
78560
|
+
errorDetailsSummaryRow,
|
|
78561
|
+
errorDetailsCopyButton,
|
|
78562
|
+
errorDetailsContent,
|
|
78447
78563
|
collapsedContent,
|
|
78448
78564
|
expandedContent,
|
|
78449
78565
|
conclusionStrip,
|
|
@@ -78452,11 +78568,11 @@ const styles$S = {
|
|
|
78452
78568
|
expandButton: expandButton$1,
|
|
78453
78569
|
messageMetrics,
|
|
78454
78570
|
embeddedMessageMetrics,
|
|
78571
|
+
fallbackTransitionBanner,
|
|
78455
78572
|
messageMetricsPrimary,
|
|
78456
78573
|
embeddedMessageMetricsPrimary,
|
|
78457
78574
|
messageMetricsMeta,
|
|
78458
78575
|
metricsStreaming,
|
|
78459
|
-
fallbackTransitionBanner,
|
|
78460
78576
|
fallbackTransitionIcon,
|
|
78461
78577
|
fallbackTransitionText,
|
|
78462
78578
|
tokenUsage,
|
|
@@ -78513,7 +78629,8 @@ function renderNonTextBlock(block, index2, context, variant) {
|
|
|
78513
78629
|
ToolCallCard,
|
|
78514
78630
|
{
|
|
78515
78631
|
toolCall: block.toolCall,
|
|
78516
|
-
variant: variant === "embedded" ? "embedded" : "default"
|
|
78632
|
+
variant: variant === "embedded" ? "embedded" : "default",
|
|
78633
|
+
isOutputStreaming: !!context.message.isStreaming
|
|
78517
78634
|
},
|
|
78518
78635
|
block.toolCall.id
|
|
78519
78636
|
) : null;
|
|
@@ -78686,18 +78803,60 @@ function getReadableChatErrorMessage(error2, t2) {
|
|
|
78686
78803
|
}
|
|
78687
78804
|
function MessageErrorBlock({ error: error2 }) {
|
|
78688
78805
|
const { t: t2 } = useTranslation();
|
|
78806
|
+
const [copied, setCopied] = reactExports.useState(false);
|
|
78689
78807
|
const message2 = getReadableErrorMessage(error2, t2);
|
|
78808
|
+
const diagnostic = formatErrorDiagnostic(error2.diagnostic);
|
|
78809
|
+
const handleCopyDiagnostic = async () => {
|
|
78810
|
+
if (!diagnostic) return;
|
|
78811
|
+
await copyToClipboard(diagnostic);
|
|
78812
|
+
setCopied(true);
|
|
78813
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
78814
|
+
};
|
|
78690
78815
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$S.errorBlock, children: [
|
|
78691
78816
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$S.errorHeader, children: [
|
|
78692
78817
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { size: 14 }),
|
|
78693
78818
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.errorType, children: t2(`message.error.${error2.type}`) })
|
|
78694
78819
|
] }),
|
|
78695
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$S.errorMessage, children: message2 })
|
|
78820
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$S.errorMessage, children: message2 }),
|
|
78821
|
+
diagnostic && /* @__PURE__ */ jsxRuntimeExports.jsxs("details", { className: styles$S.errorDetails, children: [
|
|
78822
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("summary", { className: styles$S.errorDetailsSummaryRow, children: [
|
|
78823
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.errorDetailsSummary, children: t2("message.errorDetails") }),
|
|
78824
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
78825
|
+
"button",
|
|
78826
|
+
{
|
|
78827
|
+
className: styles$S.errorDetailsCopyButton,
|
|
78828
|
+
onClick: (event) => {
|
|
78829
|
+
event.preventDefault();
|
|
78830
|
+
void handleCopyDiagnostic();
|
|
78831
|
+
},
|
|
78832
|
+
"aria-label": t2(copied ? "message.copied" : "message.copy"),
|
|
78833
|
+
type: "button",
|
|
78834
|
+
children: [
|
|
78835
|
+
copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { size: 12 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { size: 12 }),
|
|
78836
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2(copied ? "message.copied" : "message.copy") })
|
|
78837
|
+
]
|
|
78838
|
+
}
|
|
78839
|
+
)
|
|
78840
|
+
] }),
|
|
78841
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$S.errorDetailsContent, children: diagnostic })
|
|
78842
|
+
] })
|
|
78696
78843
|
] });
|
|
78697
78844
|
}
|
|
78698
78845
|
function getReadableErrorMessage(error2, t2) {
|
|
78699
78846
|
return getReadableChatErrorMessage(error2, t2);
|
|
78700
78847
|
}
|
|
78848
|
+
function formatErrorDiagnostic(diagnostic) {
|
|
78849
|
+
if (!diagnostic) return null;
|
|
78850
|
+
const lines = [
|
|
78851
|
+
diagnostic.name ? `name: ${diagnostic.name}` : null,
|
|
78852
|
+
diagnostic.code ? `code: ${diagnostic.code}` : null,
|
|
78853
|
+
diagnostic.message ? `message: ${diagnostic.message}` : null,
|
|
78854
|
+
diagnostic.cause ? `cause: ${diagnostic.cause}` : null,
|
|
78855
|
+
diagnostic.stack ? `stack:
|
|
78856
|
+
${diagnostic.stack}` : null
|
|
78857
|
+
].filter((line2) => Boolean(line2));
|
|
78858
|
+
return lines.length > 0 ? lines.join("\n") : null;
|
|
78859
|
+
}
|
|
78701
78860
|
const CONCLUSION_MAX_LENGTH = 120;
|
|
78702
78861
|
const FALLBACK_TRANSITION_BANNER_DURATION_MS = 2400;
|
|
78703
78862
|
function extractConclusion(text2) {
|
|
@@ -78763,6 +78922,7 @@ const MessageBubble = reactExports.memo(reactExports.forwardRef(function Message
|
|
|
78763
78922
|
embedRuntimeStatusInBubble = false,
|
|
78764
78923
|
onExpandChange
|
|
78765
78924
|
}, ref) {
|
|
78925
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78766
78926
|
const [isExpanded, setIsExpanded] = reactExports.useState(false);
|
|
78767
78927
|
const [needsCollapse, setNeedsCollapse] = reactExports.useState(false);
|
|
78768
78928
|
const contentRef = reactExports.useRef(null);
|
|
@@ -78825,11 +78985,10 @@ const MessageBubble = reactExports.memo(reactExports.forwardRef(function Message
|
|
|
78825
78985
|
return () => clearInterval(timer2);
|
|
78826
78986
|
}, [runMetrics?.startedAt]);
|
|
78827
78987
|
const displayModel = runMetrics?.model ?? message2.model;
|
|
78828
|
-
runMetrics?.fallback ?? message2.fallback;
|
|
78829
78988
|
const displayUsage = runMetrics?.usage ?? message2.usage;
|
|
78830
78989
|
const fallbackTransition = message2.isStreaming ? runMetrics?.fallbackTransition : void 0;
|
|
78831
78990
|
const displayDurationMs = message2.isStreaming && runMetrics ? elapsedMs : message2.durationMs;
|
|
78832
|
-
const hasMetrics = !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
78991
|
+
const hasMetrics = showRuntimeMetrics && !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
78833
78992
|
const embeddedRuntimeStatusVisible = embedRuntimeStatusInBubble && (showToolLoading || !!fallbackTransition);
|
|
78834
78993
|
const bubbleHasMetrics = !isEmbedded ? hasMetrics : embeddedRuntimeStatusVisible;
|
|
78835
78994
|
const showFooter = isEmbedded ? embeddedRuntimeStatusVisible : true;
|
|
@@ -78907,10 +79066,11 @@ function MessageRuntimeStatus({ fallbackTransition, loading: loading2, variant =
|
|
|
78907
79066
|
loading2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$S.messageMetricsPrimary, isEmbedded && styles$S.embeddedMessageMetricsPrimary), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.metricsStreaming, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingDots, { inline: true, variant: "status" }) }) })
|
|
78908
79067
|
] });
|
|
78909
79068
|
}
|
|
78910
|
-
function MessageMetrics({ usage, durationMs, model, fallback: fallback2,
|
|
79069
|
+
function MessageMetrics({ usage, durationMs, model, fallback: fallback2, loading: loading2, variant = "default" }) {
|
|
79070
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78911
79071
|
const hasDuration = durationMs != null && !isNaN(durationMs);
|
|
78912
79072
|
const isEmbedded = variant === "embedded";
|
|
78913
|
-
const hasMeta = !!(model || usage || hasDuration);
|
|
79073
|
+
const hasMeta = showRuntimeMetrics && !!(model || usage || hasDuration);
|
|
78914
79074
|
if (!loading2 && !hasMeta) return null;
|
|
78915
79075
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$S.messageMetrics, isEmbedded && styles$S.embeddedMessageMetrics), children: [
|
|
78916
79076
|
loading2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$S.messageMetricsPrimary, isEmbedded && styles$S.embeddedMessageMetricsPrimary), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.metricsStreaming, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingDots, { inline: true, variant: "status" }) }) }),
|
|
@@ -78950,13 +79110,24 @@ function ModelLabel({ model, fallback: fallback2 }) {
|
|
|
78950
79110
|
const shortName = shortModelName(model);
|
|
78951
79111
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: model, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx(styles$S.modelLabel, fallback2 ? styles$S.modelLabelFallback : ""), children: shortName }) });
|
|
78952
79112
|
}
|
|
79113
|
+
function formatTokenCount(n2, t2) {
|
|
79114
|
+
if (!n2) return "0";
|
|
79115
|
+
if (n2 >= 1e6) return t2("message.mTokens", { count: parseFloat((n2 / 1e6).toFixed(1)) });
|
|
79116
|
+
if (n2 >= 1e3) return t2("message.kTokens", { count: parseFloat((n2 / 1e3).toFixed(1)) });
|
|
79117
|
+
return `${n2} ${t2("message.tokens")}`;
|
|
79118
|
+
}
|
|
78953
79119
|
function TokenUsage({ usage }) {
|
|
78954
79120
|
const { t: t2 } = useTranslation();
|
|
78955
|
-
const
|
|
78956
|
-
|
|
78957
|
-
|
|
79121
|
+
const cached = usage.cachedInputTokens;
|
|
79122
|
+
const tooltip = cached ? t2("message.tokenUsageWithCache", {
|
|
79123
|
+
input: formatTokenCount(usage.inputTokens, t2),
|
|
79124
|
+
output: formatTokenCount(usage.outputTokens, t2),
|
|
79125
|
+
cached: formatTokenCount(cached, t2)
|
|
79126
|
+
}) : t2("message.tokenUsage", {
|
|
79127
|
+
input: formatTokenCount(usage.inputTokens, t2),
|
|
79128
|
+
output: formatTokenCount(usage.outputTokens, t2)
|
|
78958
79129
|
});
|
|
78959
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.tokenUsage, children:
|
|
79130
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.tokenUsage, children: formatTokenCount(usage.totalTokens, t2) }) });
|
|
78960
79131
|
}
|
|
78961
79132
|
function Duration({ durationMs }) {
|
|
78962
79133
|
const text2 = formatDurationMs(durationMs);
|
|
@@ -79045,7 +79216,6 @@ const MessageItem = reactExports.memo(function MessageItem2({
|
|
|
79045
79216
|
message: message2,
|
|
79046
79217
|
agents,
|
|
79047
79218
|
isGroupChat,
|
|
79048
|
-
isLastMessage = false,
|
|
79049
79219
|
isLastAgentMessage = false,
|
|
79050
79220
|
autoCollapsed = false,
|
|
79051
79221
|
scrollContainerRef,
|
|
@@ -79194,6 +79364,7 @@ function AgentBlockMessage({
|
|
|
79194
79364
|
onWriteMemory
|
|
79195
79365
|
}) {
|
|
79196
79366
|
const { t: t2 } = useTranslation();
|
|
79367
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
79197
79368
|
const bubbleContentRef = reactExports.useRef(null);
|
|
79198
79369
|
const [showScrollToTop, setShowScrollToTop] = reactExports.useState(false);
|
|
79199
79370
|
const runMetrics = useMessageStore(
|
|
@@ -79220,7 +79391,7 @@ function AgentBlockMessage({
|
|
|
79220
79391
|
const displayFallback = runMetrics?.fallback ?? message2.fallback;
|
|
79221
79392
|
const displayUsage = runMetrics?.usage ?? message2.usage;
|
|
79222
79393
|
const displayDurationMs = message2.isStreaming && runMetrics ? elapsedMs : message2.durationMs;
|
|
79223
|
-
const showFooterMetrics = !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
79394
|
+
const showFooterMetrics = showRuntimeMetrics && !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
79224
79395
|
const [manuallyExpanded, setManuallyExpanded] = reactExports.useState(false);
|
|
79225
79396
|
const isExpanded = !autoCollapsed || manuallyExpanded;
|
|
79226
79397
|
reactExports.useEffect(() => {
|
|
@@ -79634,18 +79805,20 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
79634
79805
|
handleLoadMoreClick
|
|
79635
79806
|
};
|
|
79636
79807
|
}
|
|
79637
|
-
const container$e = "
|
|
79638
|
-
const loadMoreButton = "
|
|
79639
|
-
const messageWrapper = "
|
|
79640
|
-
const
|
|
79641
|
-
const
|
|
79642
|
-
const
|
|
79643
|
-
const
|
|
79644
|
-
const
|
|
79808
|
+
const container$e = "_container_1qvmg_1";
|
|
79809
|
+
const loadMoreButton = "_loadMoreButton_1qvmg_8";
|
|
79810
|
+
const messageWrapper = "_messageWrapper_1qvmg_25";
|
|
79811
|
+
const contextStatusRow = "_contextStatusRow_1qvmg_32";
|
|
79812
|
+
const loadingMore = "_loadingMore_1qvmg_41";
|
|
79813
|
+
const noMoreMessages$2 = "_noMoreMessages_1qvmg_42";
|
|
79814
|
+
const centerState = "_centerState_1qvmg_43";
|
|
79815
|
+
const newMessageHint = "_newMessageHint_1qvmg_57";
|
|
79816
|
+
const scrollToBottom$2 = "_scrollToBottom_1qvmg_77";
|
|
79645
79817
|
const styles$O = {
|
|
79646
79818
|
container: container$e,
|
|
79647
79819
|
loadMoreButton,
|
|
79648
79820
|
messageWrapper,
|
|
79821
|
+
contextStatusRow,
|
|
79649
79822
|
loadingMore,
|
|
79650
79823
|
noMoreMessages: noMoreMessages$2,
|
|
79651
79824
|
centerState,
|
|
@@ -79677,11 +79850,22 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
79677
79850
|
const conversation2 = useMessageStore(
|
|
79678
79851
|
reactExports.useMemo(() => (s2) => s2.conversationMap.get(sessionId) ?? null, [sessionId])
|
|
79679
79852
|
);
|
|
79853
|
+
const contextCompaction = useMessageStore(
|
|
79854
|
+
reactExports.useMemo(() => (s2) => s2.contextCompactionMap.get(sessionId), [sessionId])
|
|
79855
|
+
);
|
|
79680
79856
|
const messages = reactExports.useMemo(() => getSortedMessages(msgMap), [msgMap]);
|
|
79681
79857
|
const streamRevision = useMessageStore(
|
|
79682
79858
|
reactExports.useMemo(() => (s2) => s2.streamRevisionMap.get(sessionId) ?? 0, [sessionId])
|
|
79683
79859
|
);
|
|
79684
79860
|
const isGroupChat = conversation2?.type === "group";
|
|
79861
|
+
const contextStatusRow2 = reactExports.useMemo(() => {
|
|
79862
|
+
const last = contextCompaction?.lastCompaction;
|
|
79863
|
+
if (!last || last.phase === "started" || last.phase === "completed") return null;
|
|
79864
|
+
if (last.phase === "failed") {
|
|
79865
|
+
return t2("contextHealth.statusRowFailed", "上下文压缩失败 · 可考虑新开 Session");
|
|
79866
|
+
}
|
|
79867
|
+
return null;
|
|
79868
|
+
}, [contextCompaction, t2]);
|
|
79685
79869
|
const { autoCollapsedSet, lastAgentIndex } = reactExports.useMemo(() => {
|
|
79686
79870
|
const agentIndices = [];
|
|
79687
79871
|
for (let i2 = 0; i2 < messages.length; i2++) {
|
|
@@ -79754,6 +79938,7 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
79754
79938
|
},
|
|
79755
79939
|
message2.id
|
|
79756
79940
|
)) }),
|
|
79941
|
+
contextStatusRow2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$O.contextStatusRow, role: "status", "aria-live": "polite", children: contextStatusRow2 }),
|
|
79757
79942
|
maintenanceEvent,
|
|
79758
79943
|
scroll.showNewMessageHint && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: styles$O.newMessageHint, onClick: scroll.handleNewMessageClick, children: t2("chat.newMessages") }),
|
|
79759
79944
|
scroll.showScrollToBottom && !scroll.showNewMessageHint && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -79769,20 +79954,17 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
79769
79954
|
}
|
|
79770
79955
|
);
|
|
79771
79956
|
});
|
|
79772
|
-
const row = "
|
|
79773
|
-
const card$3 = "
|
|
79774
|
-
const iconWrap = "
|
|
79775
|
-
const body$2 = "
|
|
79776
|
-
const title$b = "
|
|
79777
|
-
const description$6 = "
|
|
79778
|
-
const actions$7 = "
|
|
79779
|
-
const
|
|
79780
|
-
const
|
|
79781
|
-
const
|
|
79782
|
-
const
|
|
79783
|
-
const secondaryButton$1 = "_secondaryButton_cucmf_69";
|
|
79784
|
-
const textButton$1 = "_textButton_cucmf_70";
|
|
79785
|
-
const spin$1 = "_spin_cucmf_124";
|
|
79957
|
+
const row = "_row_1nn16_1";
|
|
79958
|
+
const card$3 = "_card_1nn16_7";
|
|
79959
|
+
const iconWrap = "_iconWrap_1nn16_19";
|
|
79960
|
+
const body$2 = "_body_1nn16_29";
|
|
79961
|
+
const title$b = "_title_1nn16_34";
|
|
79962
|
+
const description$6 = "_description_1nn16_41";
|
|
79963
|
+
const actions$7 = "_actions_1nn16_48";
|
|
79964
|
+
const primaryButton$1 = "_primaryButton_1nn16_57";
|
|
79965
|
+
const secondaryButton$1 = "_secondaryButton_1nn16_58";
|
|
79966
|
+
const textButton$1 = "_textButton_1nn16_91";
|
|
79967
|
+
const spin$2 = "_spin_1nn16_111";
|
|
79786
79968
|
const styles$N = {
|
|
79787
79969
|
row,
|
|
79788
79970
|
card: card$3,
|
|
@@ -79791,21 +79973,17 @@ const styles$N = {
|
|
|
79791
79973
|
title: title$b,
|
|
79792
79974
|
description: description$6,
|
|
79793
79975
|
actions: actions$7,
|
|
79794
|
-
primaryActions,
|
|
79795
|
-
secondaryActions,
|
|
79796
79976
|
primaryButton: primaryButton$1,
|
|
79797
|
-
dangerButton,
|
|
79798
79977
|
secondaryButton: secondaryButton$1,
|
|
79799
79978
|
textButton: textButton$1,
|
|
79800
|
-
spin: spin$
|
|
79979
|
+
spin: spin$2
|
|
79801
79980
|
};
|
|
79802
79981
|
function ContextCompactSuggestion({
|
|
79803
79982
|
disabled: disabled2,
|
|
79804
79983
|
status: status2 = "idle",
|
|
79805
79984
|
onAccept,
|
|
79806
|
-
onClearContext,
|
|
79807
79985
|
onDismiss,
|
|
79808
|
-
|
|
79986
|
+
onRemindLater
|
|
79809
79987
|
}) {
|
|
79810
79988
|
const { t: t2 } = useTranslation();
|
|
79811
79989
|
const isIdle = status2 === "idle";
|
|
@@ -79815,7 +79993,7 @@ function ContextCompactSuggestion({
|
|
|
79815
79993
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.title, children: t2("contextSuggestion.title") }),
|
|
79816
79994
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.description, children: status2 === "running" ? t2("contextSuggestion.running") : status2 === "completed" ? t2("contextSuggestion.completed") : status2 === "failed" ? t2("contextSuggestion.failed") : t2("contextSuggestion.description") }),
|
|
79817
79995
|
isIdle && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$N.actions, children: [
|
|
79818
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79996
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79819
79997
|
"button",
|
|
79820
79998
|
{
|
|
79821
79999
|
type: "button",
|
|
@@ -79824,36 +80002,25 @@ function ContextCompactSuggestion({
|
|
|
79824
80002
|
disabled: disabled2,
|
|
79825
80003
|
children: t2("contextSuggestion.accept")
|
|
79826
80004
|
}
|
|
79827
|
-
)
|
|
79828
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
79829
|
-
|
|
79830
|
-
|
|
79831
|
-
|
|
79832
|
-
|
|
79833
|
-
|
|
79834
|
-
|
|
79835
|
-
|
|
79836
|
-
|
|
79837
|
-
|
|
79838
|
-
|
|
79839
|
-
|
|
79840
|
-
|
|
79841
|
-
|
|
79842
|
-
|
|
79843
|
-
|
|
79844
|
-
|
|
79845
|
-
|
|
79846
|
-
),
|
|
79847
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79848
|
-
"button",
|
|
79849
|
-
{
|
|
79850
|
-
type: "button",
|
|
79851
|
-
className: styles$N.textButton,
|
|
79852
|
-
onClick: onSnoozeToday,
|
|
79853
|
-
children: t2("contextSuggestion.snoozeToday")
|
|
79854
|
-
}
|
|
79855
|
-
)
|
|
79856
|
-
] })
|
|
80005
|
+
),
|
|
80006
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
80007
|
+
"button",
|
|
80008
|
+
{
|
|
80009
|
+
type: "button",
|
|
80010
|
+
className: styles$N.secondaryButton,
|
|
80011
|
+
onClick: onRemindLater,
|
|
80012
|
+
children: t2("contextSuggestion.remindLater")
|
|
80013
|
+
}
|
|
80014
|
+
),
|
|
80015
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
80016
|
+
"button",
|
|
80017
|
+
{
|
|
80018
|
+
type: "button",
|
|
80019
|
+
className: styles$N.textButton,
|
|
80020
|
+
onClick: onDismiss,
|
|
80021
|
+
children: t2("contextSuggestion.dismiss")
|
|
80022
|
+
}
|
|
80023
|
+
)
|
|
79857
80024
|
] })
|
|
79858
80025
|
] })
|
|
79859
80026
|
] }) });
|
|
@@ -79861,6 +80028,7 @@ function ContextCompactSuggestion({
|
|
|
79861
80028
|
const IDLE_THRESHOLD_MS = 4 * 60 * 60 * 1e3;
|
|
79862
80029
|
const MESSAGE_THRESHOLD = 30;
|
|
79863
80030
|
const LARGE_TEXT_THRESHOLD = 16e3;
|
|
80031
|
+
const TOKEN_SUGGESTION_RATIO = 0.85;
|
|
79864
80032
|
function getTodayKey() {
|
|
79865
80033
|
const now2 = /* @__PURE__ */ new Date();
|
|
79866
80034
|
const year = now2.getFullYear();
|
|
@@ -79868,7 +80036,7 @@ function getTodayKey() {
|
|
|
79868
80036
|
const day = String(now2.getDate()).padStart(2, "0");
|
|
79869
80037
|
return `${year}-${month}-${day}`;
|
|
79870
80038
|
}
|
|
79871
|
-
function
|
|
80039
|
+
function getRemindLaterKey(sessionId) {
|
|
79872
80040
|
return `context_compact_snooze_${sessionId}_${getTodayKey()}`;
|
|
79873
80041
|
}
|
|
79874
80042
|
function getDismissKey(sessionId) {
|
|
@@ -79880,6 +80048,10 @@ function getMessageTextSize(message2) {
|
|
|
79880
80048
|
return sum + block.text.length;
|
|
79881
80049
|
}, 0);
|
|
79882
80050
|
}
|
|
80051
|
+
function getMessagesAfterLastContextClear(messages) {
|
|
80052
|
+
const markerIndex = messages.findLastIndex((message2) => message2.isContextMarker);
|
|
80053
|
+
return markerIndex >= 0 ? messages.slice(markerIndex + 1) : messages;
|
|
80054
|
+
}
|
|
79883
80055
|
function shouldSuggest(messages, sending) {
|
|
79884
80056
|
if (sending || messages.length < MESSAGE_THRESHOLD) return false;
|
|
79885
80057
|
const lastMessage = messages[messages.length - 1];
|
|
@@ -79889,9 +80061,23 @@ function shouldSuggest(messages, sending) {
|
|
|
79889
80061
|
const textSize = messages.reduce((sum, message2) => sum + getMessageTextSize(message2), 0);
|
|
79890
80062
|
return textSize >= LARGE_TEXT_THRESHOLD || messages.length >= MESSAGE_THRESHOLD * 2;
|
|
79891
80063
|
}
|
|
79892
|
-
function
|
|
79893
|
-
|
|
79894
|
-
const
|
|
80064
|
+
function shouldSuggestFromContextStatus(compaction, sending, isRunning) {
|
|
80065
|
+
if (sending || isRunning) return false;
|
|
80066
|
+
const preparedTokens = compaction?.currentPreparedTokens;
|
|
80067
|
+
const inputTokenLimit = compaction?.inputTokenLimit;
|
|
80068
|
+
const thresholdRatio = compaction?.thresholdRatio;
|
|
80069
|
+
if (preparedTokens === void 0 || inputTokenLimit === void 0 || thresholdRatio === void 0 || inputTokenLimit <= 0) {
|
|
80070
|
+
return void 0;
|
|
80071
|
+
}
|
|
80072
|
+
return preparedTokens / inputTokenLimit >= thresholdRatio * TOKEN_SUGGESTION_RATIO;
|
|
80073
|
+
}
|
|
80074
|
+
function useContextCompactSuggestion(sessionId, messages, sending, compaction, isRunning = false) {
|
|
80075
|
+
const eligible = reactExports.useMemo(() => {
|
|
80076
|
+
const tokenAware = shouldSuggestFromContextStatus(compaction, sending, isRunning);
|
|
80077
|
+
if (tokenAware !== void 0) return tokenAware;
|
|
80078
|
+
return shouldSuggest(getMessagesAfterLastContextClear(messages), sending);
|
|
80079
|
+
}, [compaction, isRunning, messages, sending]);
|
|
80080
|
+
const isHidden = reactExports.useCallback(() => sessionStorage.getItem(getRemindLaterKey(sessionId)) === "1" || sessionStorage.getItem(getDismissKey(sessionId)) === "1", [sessionId]);
|
|
79895
80081
|
const [hidden, setHidden] = reactExports.useState(isHidden);
|
|
79896
80082
|
reactExports.useEffect(() => {
|
|
79897
80083
|
setHidden(isHidden());
|
|
@@ -79900,26 +80086,26 @@ function useContextCompactSuggestion(sessionId, messages, sending) {
|
|
|
79900
80086
|
sessionStorage.setItem(getDismissKey(sessionId), "1");
|
|
79901
80087
|
setHidden(true);
|
|
79902
80088
|
}, [sessionId]);
|
|
79903
|
-
const
|
|
79904
|
-
sessionStorage.setItem(
|
|
80089
|
+
const remindLater = reactExports.useCallback(() => {
|
|
80090
|
+
sessionStorage.setItem(getRemindLaterKey(sessionId), "1");
|
|
79905
80091
|
setHidden(true);
|
|
79906
80092
|
}, [sessionId]);
|
|
79907
80093
|
return {
|
|
79908
80094
|
visible: eligible && !hidden,
|
|
79909
80095
|
dismiss,
|
|
79910
|
-
|
|
80096
|
+
remindLater
|
|
79911
80097
|
};
|
|
79912
80098
|
}
|
|
79913
80099
|
const log$l = createLogger("useChatActions");
|
|
79914
|
-
function
|
|
80100
|
+
function getMemoryUpdateSources$1(result) {
|
|
80101
|
+
const sources = result.sources ?? {};
|
|
79915
80102
|
return {
|
|
79916
|
-
|
|
79917
|
-
|
|
79918
|
-
|
|
79919
|
-
|
|
79920
|
-
|
|
79921
|
-
|
|
79922
|
-
updatedAt: Date.now()
|
|
80103
|
+
date: sources.date ?? "",
|
|
80104
|
+
directSessionCount: sources.directSessionCount ?? 0,
|
|
80105
|
+
totalMessages: sources.totalMessages ?? 0,
|
|
80106
|
+
directSessionTitles: sources.directSessionTitles ?? [],
|
|
80107
|
+
groupDigestCount: sources.groupDigestCount ?? 0,
|
|
80108
|
+
groupDigestNames: sources.groupDigestNames ?? []
|
|
79923
80109
|
};
|
|
79924
80110
|
}
|
|
79925
80111
|
function createSystemMessage(sessionId, id32, blocks) {
|
|
@@ -79935,12 +80121,12 @@ function createSystemMessage(sessionId, id32, blocks) {
|
|
|
79935
80121
|
}
|
|
79936
80122
|
function buildMemoryUpdateProgressText(progress2) {
|
|
79937
80123
|
if (progress2.stage === "preparing") {
|
|
79938
|
-
return "⏳
|
|
80124
|
+
return "⏳ 正在从近期对话整理长期记忆…";
|
|
79939
80125
|
}
|
|
79940
80126
|
if (progress2.total <= 1) {
|
|
79941
80127
|
return `⏳ 正在更新「${progress2.currentAgent}」的长期记忆…`;
|
|
79942
80128
|
}
|
|
79943
|
-
return `⏳
|
|
80129
|
+
return `⏳ 正在整理长期记忆…(${Math.min(progress2.completed + 1, progress2.total)}/${progress2.total})当前:${progress2.currentAgent}`;
|
|
79944
80130
|
}
|
|
79945
80131
|
function buildMemoryUpdateResultBlocks(result) {
|
|
79946
80132
|
const title2 = result.status === "success" ? "记忆更新完成" : result.status === "partial" ? `记忆更新部分完成(${result.succeededAgents}/${result.totalAgents})` : "记忆更新未完成";
|
|
@@ -79948,6 +80134,10 @@ function buildMemoryUpdateResultBlocks(result) {
|
|
|
79948
80134
|
result.results.forEach((agentResult) => {
|
|
79949
80135
|
const statusLabel2 = agentResult.status === "success" ? "成功" : agentResult.status === "no-changes" ? "无变更" : "失败";
|
|
79950
80136
|
lines.push(`### ${agentResult.agentName} · ${statusLabel2}`);
|
|
80137
|
+
const sources = getMemoryUpdateSources$1(agentResult);
|
|
80138
|
+
if (sources.directSessionCount > 0) {
|
|
80139
|
+
lines.push(`- 来源:${sources.directSessionCount} 个 direct sessions,${sources.totalMessages} 条消息`);
|
|
80140
|
+
}
|
|
79951
80141
|
if (agentResult.changedFiles.length > 0) {
|
|
79952
80142
|
lines.push(...agentResult.changedFiles.map((file) => {
|
|
79953
80143
|
const fileStatus = file.status === "created" ? "新增" : file.status === "updated" ? "更新" : file.status === "unchanged" ? "无变化" : "失败";
|
|
@@ -79978,64 +80168,6 @@ function useChatActions({ sessionId, conversation: conversation2, primaryAgent }
|
|
|
79978
80168
|
}, [sessionId]);
|
|
79979
80169
|
const handleSendMessage = reactExports.useCallback(
|
|
79980
80170
|
async (message2) => {
|
|
79981
|
-
if (message2.content === "/clear") {
|
|
79982
|
-
const localMsg = createLocalUserMessage(sessionId, message2.content);
|
|
79983
|
-
const store = useMessageStore.getState();
|
|
79984
|
-
store.addFetchedMessage(sessionId, localMsg);
|
|
79985
|
-
await getTransport().createNewSession(sessionId);
|
|
79986
|
-
await getTransport().requestConversationSnapshot(sessionId);
|
|
79987
|
-
return null;
|
|
79988
|
-
}
|
|
79989
|
-
if (message2.content === "/compact" || message2.content.startsWith("/compact ")) {
|
|
79990
|
-
const compactTips = message2.content.startsWith("/compact ") ? message2.content.slice("/compact ".length).trim() || void 0 : void 0;
|
|
79991
|
-
const localMsg = createLocalUserMessage(sessionId, message2.content);
|
|
79992
|
-
const store = useMessageStore.getState();
|
|
79993
|
-
store.addFetchedMessage(sessionId, localMsg);
|
|
79994
|
-
const systemId = `system-compact-${sessionId}`;
|
|
79995
|
-
const systemMsg = createSystemMessage(sessionId, systemId, [
|
|
79996
|
-
{ type: "text", text: `⏳ ${t2("compactLoading", "正在整理关键上下文...")}` }
|
|
79997
|
-
]);
|
|
79998
|
-
systemMsg.createdAt = localMsg.createdAt + 1;
|
|
79999
|
-
systemMsg.updatedAt = localMsg.createdAt + 1;
|
|
80000
|
-
store.addFetchedMessage(sessionId, systemMsg);
|
|
80001
|
-
useMessageStore.setState((state2) => ({
|
|
80002
|
-
sendingMap: new Map(state2.sendingMap).set(sessionId, true)
|
|
80003
|
-
}));
|
|
80004
|
-
try {
|
|
80005
|
-
await getTransport().compactConversation(sessionId, compactTips);
|
|
80006
|
-
await getTransport().requestConversationSnapshot(sessionId);
|
|
80007
|
-
store.addFetchedMessage(sessionId, {
|
|
80008
|
-
id: systemId,
|
|
80009
|
-
sessionId,
|
|
80010
|
-
senderRole: "system",
|
|
80011
|
-
senderId: "system",
|
|
80012
|
-
blocks: [{ type: "text", text: t2("contextCompacted") }],
|
|
80013
|
-
createdAt: Date.now(),
|
|
80014
|
-
updatedAt: Date.now()
|
|
80015
|
-
});
|
|
80016
|
-
return null;
|
|
80017
|
-
} catch (e2) {
|
|
80018
|
-
const errMsg = e2 instanceof Error ? e2.message : t2("compactFailed", "整理失败");
|
|
80019
|
-
store.addFetchedMessage(sessionId, {
|
|
80020
|
-
id: systemId,
|
|
80021
|
-
sessionId,
|
|
80022
|
-
senderRole: "system",
|
|
80023
|
-
senderId: "system",
|
|
80024
|
-
blocks: [{ type: "text", text: errMsg }],
|
|
80025
|
-
createdAt: Date.now(),
|
|
80026
|
-
updatedAt: Date.now()
|
|
80027
|
-
});
|
|
80028
|
-
return null;
|
|
80029
|
-
} finally {
|
|
80030
|
-
useMessageStore.setState((state2) => {
|
|
80031
|
-
const val = state2.sendingMap.get(sessionId);
|
|
80032
|
-
if (val) {
|
|
80033
|
-
return { sendingMap: new Map(state2.sendingMap).set(sessionId, false) };
|
|
80034
|
-
}
|
|
80035
|
-
return {};
|
|
80036
|
-
});
|
|
80037
|
-
}
|
|
80038
|
-
}
|
|
80039
80171
|
const conv = getConversation();
|
|
80040
80172
|
const metadata = {
|
|
80041
80173
|
supervisorId: message2.supervisor,
|
|
@@ -80089,7 +80221,7 @@ function useChatActions({ sessionId, conversation: conversation2, primaryAgent }
|
|
|
80089
80221
|
const store = useMessageStore.getState();
|
|
80090
80222
|
const startedAt = Date.now();
|
|
80091
80223
|
const pendingMsg = createSystemMessage(sessionId, systemId, [
|
|
80092
|
-
{ type: "text", text: "⏳
|
|
80224
|
+
{ type: "text", text: "⏳ 正在从近期对话整理长期记忆…" }
|
|
80093
80225
|
]);
|
|
80094
80226
|
pendingMsg.createdAt = startedAt;
|
|
80095
80227
|
pendingMsg.updatedAt = startedAt;
|
|
@@ -81040,33 +81172,41 @@ function CreateDirectSessionDialog({
|
|
|
81040
81172
|
] })
|
|
81041
81173
|
] }) });
|
|
81042
81174
|
}
|
|
81043
|
-
const wrapper$4 = "
|
|
81044
|
-
const headerTop = "
|
|
81045
|
-
const avatarCol = "
|
|
81046
|
-
const groupIcon = "
|
|
81047
|
-
const infoCol = "
|
|
81048
|
-
const nameRow = "
|
|
81049
|
-
const titleWrap = "
|
|
81050
|
-
const headerTitleGroup = "
|
|
81051
|
-
const title$a = "
|
|
81052
|
-
const sessionTitle = "
|
|
81053
|
-
const healthDot = "
|
|
81054
|
-
const
|
|
81055
|
-
const
|
|
81056
|
-
const
|
|
81057
|
-
const
|
|
81058
|
-
const
|
|
81059
|
-
const
|
|
81060
|
-
const
|
|
81061
|
-
const
|
|
81062
|
-
const
|
|
81063
|
-
const
|
|
81064
|
-
const
|
|
81065
|
-
const
|
|
81066
|
-
const
|
|
81067
|
-
const
|
|
81068
|
-
const
|
|
81069
|
-
const
|
|
81175
|
+
const wrapper$4 = "_wrapper_1ga1n_10";
|
|
81176
|
+
const headerTop = "_headerTop_1ga1n_19";
|
|
81177
|
+
const avatarCol = "_avatarCol_1ga1n_27";
|
|
81178
|
+
const groupIcon = "_groupIcon_1ga1n_44";
|
|
81179
|
+
const infoCol = "_infoCol_1ga1n_55";
|
|
81180
|
+
const nameRow = "_nameRow_1ga1n_63";
|
|
81181
|
+
const titleWrap = "_titleWrap_1ga1n_72";
|
|
81182
|
+
const headerTitleGroup = "_headerTitleGroup_1ga1n_80";
|
|
81183
|
+
const title$a = "_title_1ga1n_72";
|
|
81184
|
+
const sessionTitle = "_sessionTitle_1ga1n_101";
|
|
81185
|
+
const healthDot = "_healthDot_1ga1n_111";
|
|
81186
|
+
const contextHealthPill = "_contextHealthPill_1ga1n_119";
|
|
81187
|
+
const contextHealthPillWarning = "_contextHealthPillWarning_1ga1n_132";
|
|
81188
|
+
const contextHealthPillFailed = "_contextHealthPillFailed_1ga1n_137";
|
|
81189
|
+
const contextHealthPillLoading = "_contextHealthPillLoading_1ga1n_142";
|
|
81190
|
+
const contextHealthPillSuccess = "_contextHealthPillSuccess_1ga1n_148";
|
|
81191
|
+
const contextHealthSpinner = "_contextHealthSpinner_1ga1n_153";
|
|
81192
|
+
const contextHealthTooltip = "_contextHealthTooltip_1ga1n_168";
|
|
81193
|
+
const contextHealthTooltipTitle = "_contextHealthTooltipTitle_1ga1n_175";
|
|
81194
|
+
const menuIcon = "_menuIcon_1ga1n_183";
|
|
81195
|
+
const subtitleRow = "_subtitleRow_1ga1n_194";
|
|
81196
|
+
const memberRow = "_memberRow_1ga1n_205";
|
|
81197
|
+
const chip = "_chip_1ga1n_235";
|
|
81198
|
+
const chipAvatarWrap = "_chipAvatarWrap_1ga1n_252";
|
|
81199
|
+
const chipName = "_chipName_1ga1n_257";
|
|
81200
|
+
const channelList$1 = "_channelList_1ga1n_265";
|
|
81201
|
+
const channelItem = "_channelItem_1ga1n_270";
|
|
81202
|
+
const channelItemActive = "_channelItemActive_1ga1n_284";
|
|
81203
|
+
const channelDot = "_channelDot_1ga1n_288";
|
|
81204
|
+
const channelName = "_channelName_1ga1n_295";
|
|
81205
|
+
const channelBadge = "_channelBadge_1ga1n_305";
|
|
81206
|
+
const channelLock = "_channelLock_1ga1n_315";
|
|
81207
|
+
const channelArrow = "_channelArrow_1ga1n_320";
|
|
81208
|
+
const hamburgerBtn = "_hamburgerBtn_1ga1n_326";
|
|
81209
|
+
const newThreadBtn = "_newThreadBtn_1ga1n_353";
|
|
81070
81210
|
const styles$I = {
|
|
81071
81211
|
wrapper: wrapper$4,
|
|
81072
81212
|
headerTop,
|
|
@@ -81079,6 +81219,14 @@ const styles$I = {
|
|
|
81079
81219
|
title: title$a,
|
|
81080
81220
|
sessionTitle,
|
|
81081
81221
|
healthDot,
|
|
81222
|
+
contextHealthPill,
|
|
81223
|
+
contextHealthPillWarning,
|
|
81224
|
+
contextHealthPillFailed,
|
|
81225
|
+
contextHealthPillLoading,
|
|
81226
|
+
contextHealthPillSuccess,
|
|
81227
|
+
contextHealthSpinner,
|
|
81228
|
+
contextHealthTooltip,
|
|
81229
|
+
contextHealthTooltipTitle,
|
|
81082
81230
|
menuIcon,
|
|
81083
81231
|
subtitleRow,
|
|
81084
81232
|
memberRow,
|
|
@@ -81102,6 +81250,87 @@ const HEALTH_COLORS = {
|
|
|
81102
81250
|
unhealthy: "#ef4444",
|
|
81103
81251
|
unknown: "#94a3b8"
|
|
81104
81252
|
};
|
|
81253
|
+
function formatCompactTokenCount(value2) {
|
|
81254
|
+
if (value2 === void 0) return "—";
|
|
81255
|
+
if (value2 >= 1e6) return `${(value2 / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
81256
|
+
if (value2 >= 1e3) return `${(value2 / 1e3).toFixed(1).replace(/\.0$/, "")}k`;
|
|
81257
|
+
return `${value2}`;
|
|
81258
|
+
}
|
|
81259
|
+
function getContextHealthReasonLabel(reason, t2) {
|
|
81260
|
+
if (reason === "manual") return t2("contextHealth.reasonManual", "手动整理");
|
|
81261
|
+
if (reason === "reactive_context_overflow") return t2("contextHealth.reasonReactive", "溢出修复");
|
|
81262
|
+
if (reason === "step_boundary_budget") return t2("contextHealth.reasonStepBoundary", "步骤间压缩");
|
|
81263
|
+
return t2("contextHealth.reasonProactive", "主动整理");
|
|
81264
|
+
}
|
|
81265
|
+
function getContextHealthTone(input2) {
|
|
81266
|
+
if (input2.isFailed) return "danger";
|
|
81267
|
+
if (input2.currentPreparedTokens === void 0 || input2.inputTokenLimit === void 0 || input2.thresholdRatio === void 0 || input2.inputTokenLimit <= 0) {
|
|
81268
|
+
return "default";
|
|
81269
|
+
}
|
|
81270
|
+
const usageRatio = input2.currentPreparedTokens / input2.inputTokenLimit;
|
|
81271
|
+
if (usageRatio >= input2.thresholdRatio) return "danger";
|
|
81272
|
+
if (usageRatio >= input2.thresholdRatio * 0.875) return "warning";
|
|
81273
|
+
return "default";
|
|
81274
|
+
}
|
|
81275
|
+
function ContextHealthPill({
|
|
81276
|
+
compaction,
|
|
81277
|
+
t: t2
|
|
81278
|
+
}) {
|
|
81279
|
+
const [now2, setNow] = reactExports.useState(() => Date.now());
|
|
81280
|
+
const hasUsage2 = compaction?.currentPreparedTokens !== void 0 && compaction.inputTokenLimit !== void 0 && compaction.inputTokenLimit > 0;
|
|
81281
|
+
const last = compaction?.lastCompaction;
|
|
81282
|
+
const isStarted = last?.phase === "started";
|
|
81283
|
+
const isFailed = last?.phase === "failed";
|
|
81284
|
+
const showManualCompletedReceipt = Boolean(
|
|
81285
|
+
last?.phase === "completed" && last.reason === "manual" && now2 - last.at < 3e3
|
|
81286
|
+
);
|
|
81287
|
+
reactExports.useEffect(() => {
|
|
81288
|
+
if (!showManualCompletedReceipt || !last) return;
|
|
81289
|
+
const remainingMs = Math.max(0, 3e3 - (Date.now() - last.at));
|
|
81290
|
+
const timer2 = window.setTimeout(() => setNow(Date.now()), remainingMs + 50);
|
|
81291
|
+
return () => window.clearTimeout(timer2);
|
|
81292
|
+
}, [last, showManualCompletedReceipt]);
|
|
81293
|
+
if (!compaction || !hasUsage2 && !last) return null;
|
|
81294
|
+
const currentPrepared = formatCompactTokenCount(compaction.currentPreparedTokens);
|
|
81295
|
+
const currentLimit = formatCompactTokenCount(compaction.inputTokenLimit);
|
|
81296
|
+
const tone = getContextHealthTone({
|
|
81297
|
+
currentPreparedTokens: compaction.currentPreparedTokens,
|
|
81298
|
+
inputTokenLimit: compaction.inputTokenLimit,
|
|
81299
|
+
thresholdRatio: compaction.thresholdRatio,
|
|
81300
|
+
isFailed
|
|
81301
|
+
});
|
|
81302
|
+
const before = formatCompactTokenCount(last?.durableBeforeTokens ?? last?.triggerTokens);
|
|
81303
|
+
const after = formatCompactTokenCount(last?.durableAfterTokens);
|
|
81304
|
+
const reasonLabel = getContextHealthReasonLabel(last?.reason, t2);
|
|
81305
|
+
const tooltip = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$I.contextHealthTooltip, children: [
|
|
81306
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$I.contextHealthTooltipTitle, children: t2("contextHealth.title", "上下文状态") }),
|
|
81307
|
+
hasUsage2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.currentUsage", "当前估算:{{current}} / {{limit}}", { current: currentPrepared, limit: currentLimit }) }),
|
|
81308
|
+
compaction.thresholdRatio !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.thresholdRatio", "整理阈值:{{percent}}", { percent: `${Math.round(compaction.thresholdRatio * 100)}%` }) }),
|
|
81309
|
+
last && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
81310
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.lastCompaction", "最近整理:{{value}}", { value: isStarted ? t2("contextHealth.compacting", "整理中") : isFailed ? t2("contextHealth.failed", "失败") : reasonLabel }) }),
|
|
81311
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.lastResult", "最近结果:{{value}}", { value: isStarted ? t2("contextHealth.compacting", "整理中") : isFailed ? last.errorMessage || t2("compactFailed", "整理失败") : `${before} → ${after}` }) }),
|
|
81312
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.totalCompactions", "累计整理:{{count}} 次", { count: compaction.totalCompactions }) }),
|
|
81313
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.targetLimit", "目标阈值:{{value}}", { value: formatCompactTokenCount(last.targetTokenLimit) }) })
|
|
81314
|
+
] })
|
|
81315
|
+
] });
|
|
81316
|
+
const label2 = isStarted ? t2("contextHealth.compacting", "整理中") : isFailed ? t2("contextHealth.failed", "整理失败") : showManualCompletedReceipt ? t2("contextHealth.compacted", "已整理") : hasUsage2 ? `${currentPrepared} / ${currentLimit}` : `${t2("contextHealth.title", "上下文状态")} ${before} → ${after}`;
|
|
81317
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: tooltip, side: "bottom", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
81318
|
+
"span",
|
|
81319
|
+
{
|
|
81320
|
+
className: clsx(
|
|
81321
|
+
styles$I.contextHealthPill,
|
|
81322
|
+
isStarted && styles$I.contextHealthPillLoading,
|
|
81323
|
+
showManualCompletedReceipt && styles$I.contextHealthPillSuccess,
|
|
81324
|
+
tone === "warning" && styles$I.contextHealthPillWarning,
|
|
81325
|
+
tone === "danger" && styles$I.contextHealthPillFailed
|
|
81326
|
+
),
|
|
81327
|
+
children: [
|
|
81328
|
+
isStarted && /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { size: 11, className: styles$I.contextHealthSpinner, "aria-hidden": "true" }),
|
|
81329
|
+
label2
|
|
81330
|
+
]
|
|
81331
|
+
}
|
|
81332
|
+
) });
|
|
81333
|
+
}
|
|
81105
81334
|
function renderHeaderAvatar({
|
|
81106
81335
|
isGroup,
|
|
81107
81336
|
primaryAgent,
|
|
@@ -81164,6 +81393,8 @@ function ChatHeaderBar({
|
|
|
81164
81393
|
const updateDirectSessionTitle = useConversationStore((s2) => s2.updateDirectSessionTitle);
|
|
81165
81394
|
const archiveDirectSession = useConversationStore((s2) => s2.archiveDirectSession);
|
|
81166
81395
|
const activeSessionId = useConversationStore((s2) => s2.activeSessionId);
|
|
81396
|
+
const currentSessionId = activeSessionId ?? conversation2.id;
|
|
81397
|
+
const contextCompaction = useMessageStore((s2) => s2.contextCompactionMap.get(currentSessionId));
|
|
81167
81398
|
const [createDialogOpen, setCreateDialogOpen] = reactExports.useState(false);
|
|
81168
81399
|
const [pendingArchiveId, setPendingArchiveId] = reactExports.useState(null);
|
|
81169
81400
|
const [optimisticArchived, setOptimisticArchived] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
@@ -81395,7 +81626,8 @@ function ChatHeaderBar({
|
|
|
81395
81626
|
style: { backgroundColor: HEALTH_COLORS[status2] }
|
|
81396
81627
|
}
|
|
81397
81628
|
) });
|
|
81398
|
-
})()
|
|
81629
|
+
})(),
|
|
81630
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextHealthPill, { compaction: contextCompaction, t: t2 })
|
|
81399
81631
|
] }),
|
|
81400
81632
|
menuItems.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81401
81633
|
DropdownMenu,
|
|
@@ -81682,54 +81914,52 @@ const useQuickReplyStore = create$3((set2, get2) => ({
|
|
|
81682
81914
|
}
|
|
81683
81915
|
}
|
|
81684
81916
|
}));
|
|
81685
|
-
const picker = "
|
|
81686
|
-
const
|
|
81687
|
-
const
|
|
81688
|
-
const title$9 = "
|
|
81689
|
-
const
|
|
81690
|
-
const
|
|
81691
|
-
const
|
|
81692
|
-
const
|
|
81693
|
-
const
|
|
81694
|
-
const
|
|
81695
|
-
const itemText = "
|
|
81696
|
-
const
|
|
81697
|
-
const
|
|
81698
|
-
const
|
|
81699
|
-
const
|
|
81700
|
-
const
|
|
81701
|
-
const state = "
|
|
81702
|
-
const emptyState$3 = "
|
|
81703
|
-
const emptyTitle$1 = "
|
|
81704
|
-
const emptyDescription = "
|
|
81705
|
-
const
|
|
81706
|
-
const
|
|
81707
|
-
const
|
|
81708
|
-
const
|
|
81709
|
-
const
|
|
81710
|
-
const secondaryAction = "_secondaryAction_wowm2_247";
|
|
81917
|
+
const picker = "_picker_1agw9_1";
|
|
81918
|
+
const editor$1 = "_editor_1agw9_17";
|
|
81919
|
+
const header$c = "_header_1agw9_21";
|
|
81920
|
+
const title$9 = "_title_1agw9_29";
|
|
81921
|
+
const textButton = "_textButton_1agw9_35";
|
|
81922
|
+
const list$5 = "_list_1agw9_51";
|
|
81923
|
+
const item$7 = "_item_1agw9_56";
|
|
81924
|
+
const itemActive$1 = "_itemActive_1agw9_68";
|
|
81925
|
+
const itemPreview = "_itemPreview_1agw9_72";
|
|
81926
|
+
const activeRail = "_activeRail_1agw9_76";
|
|
81927
|
+
const itemText = "_itemText_1agw9_91";
|
|
81928
|
+
const moreButton = "_moreButton_1agw9_106";
|
|
81929
|
+
const itemMenu = "_itemMenu_1agw9_132";
|
|
81930
|
+
const dangerAction = "_dangerAction_1agw9_159";
|
|
81931
|
+
const footer$5 = "_footer_1agw9_163";
|
|
81932
|
+
const manageButton = "_manageButton_1agw9_174";
|
|
81933
|
+
const state = "_state_1agw9_194";
|
|
81934
|
+
const emptyState$3 = "_emptyState_1agw9_195";
|
|
81935
|
+
const emptyTitle$1 = "_emptyTitle_1agw9_205";
|
|
81936
|
+
const emptyDescription = "_emptyDescription_1agw9_212";
|
|
81937
|
+
const field$8 = "_field_1agw9_225";
|
|
81938
|
+
const editorActions$1 = "_editorActions_1agw9_257";
|
|
81939
|
+
const editorHint = "_editorHint_1agw9_263";
|
|
81940
|
+
const primaryAction = "_primaryAction_1agw9_269";
|
|
81941
|
+
const secondaryAction = "_secondaryAction_1agw9_270";
|
|
81711
81942
|
const styles$H = {
|
|
81712
81943
|
picker,
|
|
81944
|
+
editor: editor$1,
|
|
81713
81945
|
header: header$c,
|
|
81714
|
-
listHeader,
|
|
81715
81946
|
title: title$9,
|
|
81716
|
-
headerActions: headerActions$3,
|
|
81717
|
-
iconButton,
|
|
81718
81947
|
textButton,
|
|
81719
81948
|
list: list$5,
|
|
81720
81949
|
item: item$7,
|
|
81721
81950
|
itemActive: itemActive$1,
|
|
81722
|
-
itemText,
|
|
81723
81951
|
itemPreview,
|
|
81952
|
+
activeRail,
|
|
81953
|
+
itemText,
|
|
81724
81954
|
moreButton,
|
|
81725
81955
|
itemMenu,
|
|
81726
81956
|
dangerAction,
|
|
81727
81957
|
footer: footer$5,
|
|
81958
|
+
manageButton,
|
|
81728
81959
|
state,
|
|
81729
81960
|
emptyState: emptyState$3,
|
|
81730
81961
|
emptyTitle: emptyTitle$1,
|
|
81731
81962
|
emptyDescription,
|
|
81732
|
-
editor: editor$1,
|
|
81733
81963
|
field: field$8,
|
|
81734
81964
|
editorActions: editorActions$1,
|
|
81735
81965
|
editorHint,
|
|
@@ -81741,8 +81971,7 @@ function QuickReplyPicker({
|
|
|
81741
81971
|
onActiveIndexChange,
|
|
81742
81972
|
onSelect,
|
|
81743
81973
|
onClose,
|
|
81744
|
-
style
|
|
81745
|
-
sendMode = false
|
|
81974
|
+
style
|
|
81746
81975
|
}) {
|
|
81747
81976
|
const { t: t2 } = useTranslation();
|
|
81748
81977
|
const { showToast } = useToast();
|
|
@@ -81833,39 +82062,43 @@ function QuickReplyPicker({
|
|
|
81833
82062
|
if (quickReplies.length === 0) {
|
|
81834
82063
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.emptyState, children: [
|
|
81835
82064
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.emptyTitle, children: t2("quickReply.emptyTitle", "还没有快捷回复") }),
|
|
81836
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.emptyDescription, children: t2("quickReply.emptyDescription", "
|
|
82065
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.emptyDescription, children: t2("quickReply.emptyDescription", "把常用的话保存下来,下次一键发送。") }),
|
|
81837
82066
|
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: styles$H.primaryAction, onClick: () => setMode({ type: "create" }), children: t2("quickReply.addFirst", "添加第一条") })
|
|
81838
82067
|
] });
|
|
81839
82068
|
}
|
|
81840
82069
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.list, role: "listbox", "aria-label": t2("quickReply.title", "快捷回复"), children: [
|
|
81841
|
-
quickReplies.map((reply, index2) =>
|
|
81842
|
-
|
|
81843
|
-
|
|
81844
|
-
|
|
81845
|
-
|
|
81846
|
-
|
|
81847
|
-
|
|
81848
|
-
|
|
81849
|
-
|
|
81850
|
-
|
|
81851
|
-
|
|
81852
|
-
"
|
|
81853
|
-
{
|
|
81854
|
-
|
|
81855
|
-
|
|
81856
|
-
|
|
81857
|
-
|
|
81858
|
-
|
|
81859
|
-
|
|
81860
|
-
|
|
81861
|
-
|
|
81862
|
-
|
|
81863
|
-
|
|
81864
|
-
|
|
81865
|
-
|
|
81866
|
-
|
|
81867
|
-
|
|
81868
|
-
|
|
82070
|
+
quickReplies.map((reply, index2) => {
|
|
82071
|
+
const active2 = index2 === activeIndex;
|
|
82072
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
82073
|
+
"div",
|
|
82074
|
+
{
|
|
82075
|
+
role: "option",
|
|
82076
|
+
"aria-selected": active2,
|
|
82077
|
+
className: clsx(styles$H.item, active2 && styles$H.itemActive),
|
|
82078
|
+
onMouseEnter: () => onActiveIndexChange(index2),
|
|
82079
|
+
onClick: () => onSelect(reply),
|
|
82080
|
+
children: [
|
|
82081
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.activeRail, "aria-hidden": "true" }),
|
|
82082
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.itemText, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.itemPreview, children: reply.content }) }),
|
|
82083
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82084
|
+
"button",
|
|
82085
|
+
{
|
|
82086
|
+
type: "button",
|
|
82087
|
+
className: styles$H.moreButton,
|
|
82088
|
+
"aria-label": t2("quickReply.moreActions", "更多操作"),
|
|
82089
|
+
onClick: (event) => {
|
|
82090
|
+
event.stopPropagation();
|
|
82091
|
+
const rect2 = event.currentTarget.getBoundingClientRect();
|
|
82092
|
+
setOpenMenu((current) => current?.reply.id === reply.id ? null : { reply, rect: rect2 });
|
|
82093
|
+
},
|
|
82094
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Ellipsis, { size: 15, "aria-hidden": "true" })
|
|
82095
|
+
}
|
|
82096
|
+
)
|
|
82097
|
+
]
|
|
82098
|
+
},
|
|
82099
|
+
reply.id
|
|
82100
|
+
);
|
|
82101
|
+
}),
|
|
81869
82102
|
openMenu && reactDomExports.createPortal(
|
|
81870
82103
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
81871
82104
|
"div",
|
|
@@ -81942,47 +82175,32 @@ function QuickReplyPicker({
|
|
|
81942
82175
|
updateQuickReply
|
|
81943
82176
|
]);
|
|
81944
82177
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.picker, style, ref: pickerRef, children: [
|
|
81945
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className:
|
|
81946
|
-
|
|
81947
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
81948
|
-
|
|
81949
|
-
|
|
81950
|
-
|
|
81951
|
-
|
|
81952
|
-
|
|
81953
|
-
|
|
81954
|
-
|
|
81955
|
-
|
|
81956
|
-
}
|
|
81957
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81958
|
-
"button",
|
|
81959
|
-
{
|
|
81960
|
-
type: "button",
|
|
81961
|
-
className: styles$H.textButton,
|
|
81962
|
-
onClick: () => setMode({ type: "list" }),
|
|
81963
|
-
children: t2("common.cancel", "取消")
|
|
81964
|
-
}
|
|
81965
|
-
),
|
|
81966
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81967
|
-
"button",
|
|
81968
|
-
{
|
|
81969
|
-
type: "button",
|
|
81970
|
-
className: styles$H.iconButton,
|
|
81971
|
-
"aria-label": t2("common.close", "关闭"),
|
|
81972
|
-
onClick: onClose,
|
|
81973
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X$2, { size: 16, "aria-hidden": "true" })
|
|
81974
|
-
}
|
|
81975
|
-
)
|
|
81976
|
-
] })
|
|
82178
|
+
mode2.type !== "list" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.header, children: [
|
|
82179
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.title, children: mode2.type === "create" ? t2("quickReply.addTitle", "添加快捷回复") : t2("quickReply.editTitle", "编辑快捷回复") }),
|
|
82180
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82181
|
+
"button",
|
|
82182
|
+
{
|
|
82183
|
+
type: "button",
|
|
82184
|
+
className: styles$H.textButton,
|
|
82185
|
+
onClick: () => setMode({ type: "list" }),
|
|
82186
|
+
children: t2("common.cancel", "取消")
|
|
82187
|
+
}
|
|
82188
|
+
)
|
|
81977
82189
|
] }),
|
|
81978
82190
|
content2,
|
|
81979
82191
|
mode2.type === "list" && quickReplies.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.footer, children: [
|
|
81980
|
-
|
|
81981
|
-
|
|
81982
|
-
|
|
81983
|
-
|
|
81984
|
-
|
|
81985
|
-
|
|
82192
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
82193
|
+
"↑↓ ",
|
|
82194
|
+
t2("quickReply.selectHint", "选择"),
|
|
82195
|
+
" · Enter ",
|
|
82196
|
+
t2("quickReply.sendHint", "发送"),
|
|
82197
|
+
" · Esc ",
|
|
82198
|
+
t2("common.close", "关闭")
|
|
82199
|
+
] }),
|
|
82200
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: styles$H.manageButton, onClick: () => setMode({ type: "create" }), children: [
|
|
82201
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 12, "aria-hidden": "true" }),
|
|
82202
|
+
t2("quickReply.manage", "管理")
|
|
82203
|
+
] })
|
|
81986
82204
|
] })
|
|
81987
82205
|
] });
|
|
81988
82206
|
}
|
|
@@ -82696,9 +82914,6 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
82696
82914
|
onSend,
|
|
82697
82915
|
isLoading,
|
|
82698
82916
|
onStop,
|
|
82699
|
-
onCompact,
|
|
82700
|
-
onClearRequest,
|
|
82701
|
-
onCommandExecute,
|
|
82702
82917
|
className,
|
|
82703
82918
|
initialValue,
|
|
82704
82919
|
sessionId,
|
|
@@ -82916,6 +83131,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
82916
83131
|
const updateDropdownPosition = reactExports.useCallback(() => {
|
|
82917
83132
|
dropdownPosition.updateFromInputWrapper(inputWrapperRef.current);
|
|
82918
83133
|
}, [dropdownPosition]);
|
|
83134
|
+
const sendingRef = reactExports.useRef(false);
|
|
82919
83135
|
const handleSelectAll = () => {
|
|
82920
83136
|
const before = input2.slice(0, mentionStartPos);
|
|
82921
83137
|
const after = input2.slice(textareaRef.current?.selectionStart || 0);
|
|
@@ -82933,64 +83149,60 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
82933
83149
|
setMentions((mentions) => [...mentions, agent2]);
|
|
82934
83150
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82935
83151
|
};
|
|
82936
|
-
const
|
|
83152
|
+
const handleCompleteCommand = (command2) => {
|
|
82937
83153
|
setShowCommandDropdown(false);
|
|
82938
|
-
if (command2.name === "/compact") {
|
|
82939
|
-
if (onCommandExecute) {
|
|
82940
|
-
onCommandExecute("compact");
|
|
82941
|
-
} else {
|
|
82942
|
-
onCompact?.();
|
|
82943
|
-
}
|
|
82944
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82945
|
-
return;
|
|
82946
|
-
}
|
|
82947
|
-
if (command2.name === "/clear") {
|
|
82948
|
-
if (onCommandExecute) {
|
|
82949
|
-
onCommandExecute("clear");
|
|
82950
|
-
} else {
|
|
82951
|
-
onClearRequest?.();
|
|
82952
|
-
}
|
|
82953
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82954
|
-
return;
|
|
82955
|
-
}
|
|
82956
83154
|
const before = input2.slice(0, commandStartPos);
|
|
82957
83155
|
const after = input2.slice(textareaRef.current?.selectionStart || 0);
|
|
82958
83156
|
updateInput(`${before}${command2.name} ${after}`);
|
|
82959
83157
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82960
83158
|
};
|
|
83159
|
+
const handleSendCommand = reactExports.useCallback(async (command2) => {
|
|
83160
|
+
setShowCommandDropdown(false);
|
|
83161
|
+
if (sendingRef.current || isLoading) {
|
|
83162
|
+
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
83163
|
+
return;
|
|
83164
|
+
}
|
|
83165
|
+
sendingRef.current = true;
|
|
83166
|
+
try {
|
|
83167
|
+
await onSend({ content: command2.name, attachments: [], mentions: [] });
|
|
83168
|
+
} finally {
|
|
83169
|
+
sendingRef.current = false;
|
|
83170
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
83171
|
+
}
|
|
83172
|
+
}, [isLoading, onSend, showToast, t2]);
|
|
83173
|
+
const buildMessageTarget = reactExports.useCallback((rawInput) => {
|
|
83174
|
+
const mentionIds = [];
|
|
83175
|
+
for (const agent2 of mentionAgents) {
|
|
83176
|
+
if (rawInput.includes("@" + agent2.name)) {
|
|
83177
|
+
mentionIds.push(agent2.id);
|
|
83178
|
+
}
|
|
83179
|
+
}
|
|
83180
|
+
const hasAll = conversationType === "group" && /\B@all\b/i.test(rawInput);
|
|
83181
|
+
const { mentions, broadcast } = buildBroadcastTarget(mentionIds, hasAll);
|
|
83182
|
+
const supervisor2 = supervisionMode && supervisorId ? supervisorId : void 0;
|
|
83183
|
+
if (supervisor2) {
|
|
83184
|
+
persistSupervisor(supervisor2);
|
|
83185
|
+
}
|
|
83186
|
+
return { mentions, broadcast, supervisor: supervisor2 };
|
|
83187
|
+
}, [conversationType, mentionAgents, persistSupervisor, supervisionMode, supervisorId]);
|
|
82961
83188
|
const handleSelectQuickReply = reactExports.useCallback(async (reply) => {
|
|
82962
83189
|
setShowQuickReplyPicker(false);
|
|
82963
|
-
if (
|
|
82964
|
-
|
|
82965
|
-
|
|
82966
|
-
|
|
82967
|
-
|
|
82968
|
-
|
|
82969
|
-
|
|
82970
|
-
|
|
83190
|
+
if (sendingRef.current) return;
|
|
83191
|
+
const content2 = reply.content.trim();
|
|
83192
|
+
if (!content2) return;
|
|
83193
|
+
sendingRef.current = true;
|
|
83194
|
+
try {
|
|
83195
|
+
const { mentions, broadcast, supervisor: supervisor2 } = buildMessageTarget(content2);
|
|
83196
|
+
await onSend({ content: content2, attachments: [], supervisor: supervisor2, mentions, broadcast });
|
|
83197
|
+
} finally {
|
|
83198
|
+
sendingRef.current = false;
|
|
83199
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82971
83200
|
}
|
|
82972
|
-
|
|
82973
|
-
const before = input2.slice(0, cursorPos);
|
|
82974
|
-
const after = input2.slice(cursorPos);
|
|
82975
|
-
const nextInput = `${before}${reply.content}${after}`;
|
|
82976
|
-
const nextCursor = before.length + reply.content.length;
|
|
82977
|
-
updateInput(nextInput);
|
|
82978
|
-
setTimeout(() => {
|
|
82979
|
-
textareaRef.current?.focus();
|
|
82980
|
-
textareaRef.current?.setSelectionRange(nextCursor, nextCursor);
|
|
82981
|
-
}, 0);
|
|
82982
|
-
}, [input2, attachments.length, updateInput, onSend]);
|
|
83201
|
+
}, [buildMessageTarget, onSend]);
|
|
82983
83202
|
const closeQuickReplyPicker = reactExports.useCallback(() => {
|
|
82984
83203
|
setShowQuickReplyPicker(false);
|
|
82985
83204
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82986
83205
|
}, []);
|
|
82987
|
-
const handleCompleteCommand = (command2) => {
|
|
82988
|
-
setShowCommandDropdown(false);
|
|
82989
|
-
const before = input2.slice(0, commandStartPos);
|
|
82990
|
-
const after = input2.slice(textareaRef.current?.selectionStart || 0);
|
|
82991
|
-
updateInput(`${before}${command2.name} ${after}`);
|
|
82992
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82993
|
-
};
|
|
82994
83206
|
const handleSlashCommandClick = reactExports.useCallback(() => {
|
|
82995
83207
|
setShowCommandDropdown((prev2) => {
|
|
82996
83208
|
if (prev2) return false;
|
|
@@ -83013,7 +83225,6 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83013
83225
|
requestAnimationFrame(updateDropdownPosition);
|
|
83014
83226
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
83015
83227
|
}, [updateDropdownPosition]);
|
|
83016
|
-
const sendingRef = reactExports.useRef(false);
|
|
83017
83228
|
const clearSentDraft = reactExports.useCallback((snapshot, sentConvId) => {
|
|
83018
83229
|
if (sentConvId === sessionId) {
|
|
83019
83230
|
commitInput((prev2) => {
|
|
@@ -83035,22 +83246,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83035
83246
|
try {
|
|
83036
83247
|
const rawInput = input2;
|
|
83037
83248
|
const trimmedInput = rawInput.trim();
|
|
83038
|
-
|
|
83039
|
-
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
83040
|
-
return;
|
|
83041
|
-
}
|
|
83042
|
-
const mentionIds = [];
|
|
83043
|
-
for (const agent2 of mentionAgents) {
|
|
83044
|
-
if (rawInput.includes("@" + agent2.name)) {
|
|
83045
|
-
mentionIds.push(agent2.id);
|
|
83046
|
-
}
|
|
83047
|
-
}
|
|
83048
|
-
const hasAll = conversationType === "group" && /\B@all\b/i.test(rawInput);
|
|
83049
|
-
const { mentions, broadcast } = buildBroadcastTarget(mentionIds, hasAll);
|
|
83050
|
-
const supervisor2 = supervisionMode && supervisorId ? supervisorId : void 0;
|
|
83051
|
-
if (supervisor2) {
|
|
83052
|
-
persistSupervisor(supervisor2);
|
|
83053
|
-
}
|
|
83249
|
+
const { mentions, broadcast, supervisor: supervisor2 } = buildMessageTarget(rawInput);
|
|
83054
83250
|
const snapshot = rawInput;
|
|
83055
83251
|
const sentConvId = sessionId;
|
|
83056
83252
|
const success2 = await onSend({ content: trimmedInput, attachments, supervisor: supervisor2, mentions, broadcast });
|
|
@@ -83070,7 +83266,9 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83070
83266
|
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
83071
83267
|
return;
|
|
83072
83268
|
}
|
|
83073
|
-
|
|
83269
|
+
onSend({ content: "/compact", attachments: [], mentions: [] }).catch((error2) => {
|
|
83270
|
+
log$h.warn("Failed to send /compact command:", error2);
|
|
83271
|
+
});
|
|
83074
83272
|
return;
|
|
83075
83273
|
}
|
|
83076
83274
|
if (mod && e2.shiftKey && e2.key === "Backspace") {
|
|
@@ -83124,7 +83322,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83124
83322
|
} else if (e2.key === "Enter" && !e2.shiftKey) {
|
|
83125
83323
|
e2.preventDefault();
|
|
83126
83324
|
if (filteredCommands[activeIndex]) {
|
|
83127
|
-
|
|
83325
|
+
handleCompleteCommand(filteredCommands[activeIndex]);
|
|
83128
83326
|
}
|
|
83129
83327
|
return;
|
|
83130
83328
|
} else if (e2.key === "Escape") {
|
|
@@ -83166,6 +83364,8 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83166
83364
|
};
|
|
83167
83365
|
const isDropdownOpen = showCommandDropdown || showMentionDropdown || showSupervisorMenu || showQuickReplyPicker;
|
|
83168
83366
|
useRepositionWhileOpen(isDropdownOpen, updateDropdownPosition, [input2, attachments.length, supervisionMode]);
|
|
83367
|
+
const hasDraft = input2.trim().length > 0 || attachments.length > 0;
|
|
83368
|
+
const sendButtonActsAsStop = isLoading && !hasDraft;
|
|
83169
83369
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$F.container, isDropdownOpen && styles$F.containerDropdownOpen, className), children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$F.wrapper, children: [
|
|
83170
83370
|
attachments.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$F.attachmentSection, children: attachments.map((file, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83171
83371
|
AttachmentItem,
|
|
@@ -83200,7 +83400,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83200
83400
|
{
|
|
83201
83401
|
commands: filteredCommands,
|
|
83202
83402
|
activeIndex,
|
|
83203
|
-
onSelect:
|
|
83403
|
+
onSelect: handleSendCommand,
|
|
83204
83404
|
onClose: () => setShowCommandDropdown(false),
|
|
83205
83405
|
style: dropdownPosition.style,
|
|
83206
83406
|
portal: true
|
|
@@ -83231,8 +83431,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83231
83431
|
onActiveIndexChange: setActiveIndex,
|
|
83232
83432
|
onSelect: handleSelectQuickReply,
|
|
83233
83433
|
onClose: closeQuickReplyPicker,
|
|
83234
|
-
style: dropdownPosition.style
|
|
83235
|
-
sendMode: input2.trim().length === 0 && attachments.length === 0
|
|
83434
|
+
style: dropdownPosition.style
|
|
83236
83435
|
}
|
|
83237
83436
|
),
|
|
83238
83437
|
document.body
|
|
@@ -83340,13 +83539,13 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83340
83539
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83341
83540
|
Button,
|
|
83342
83541
|
{
|
|
83343
|
-
variant:
|
|
83542
|
+
variant: sendButtonActsAsStop ? "stop" : "send",
|
|
83344
83543
|
size: "icon",
|
|
83345
|
-
onClick:
|
|
83544
|
+
onClick: sendButtonActsAsStop ? onStop : handleSend,
|
|
83346
83545
|
onMouseDown: (e2) => e2.preventDefault(),
|
|
83347
|
-
disabled: !
|
|
83348
|
-
"data-testid":
|
|
83349
|
-
children:
|
|
83546
|
+
disabled: !hasDraft && !isLoading,
|
|
83547
|
+
"data-testid": sendButtonActsAsStop ? "stop-button" : "send-button",
|
|
83548
|
+
children: sendButtonActsAsStop ? /* @__PURE__ */ jsxRuntimeExports.jsx(Square, { className: styles$F.icon }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { className: styles$F.icon })
|
|
83350
83549
|
}
|
|
83351
83550
|
)
|
|
83352
83551
|
] }),
|
|
@@ -83386,9 +83585,6 @@ function ChatFooter({
|
|
|
83386
83585
|
onSend,
|
|
83387
83586
|
onStop,
|
|
83388
83587
|
onCancelQueue,
|
|
83389
|
-
onCompact,
|
|
83390
|
-
onClearRequest,
|
|
83391
|
-
onClearCommand,
|
|
83392
83588
|
memberAgentIds,
|
|
83393
83589
|
placeholder: placeholder2
|
|
83394
83590
|
}) {
|
|
@@ -83444,12 +83640,6 @@ function ChatFooter({
|
|
|
83444
83640
|
onSend,
|
|
83445
83641
|
isLoading: sending,
|
|
83446
83642
|
onStop,
|
|
83447
|
-
onCommandExecute: (command2) => {
|
|
83448
|
-
if (command2 === "compact") onCompact?.();
|
|
83449
|
-
if (command2 === "clear") onClearCommand();
|
|
83450
|
-
},
|
|
83451
|
-
onCompact,
|
|
83452
|
-
onClearRequest,
|
|
83453
83643
|
sessionId,
|
|
83454
83644
|
conversationType,
|
|
83455
83645
|
memberAgentIds,
|
|
@@ -84645,20 +84835,20 @@ const onboarding$1 = { "title": "为智能体注入灵魂", "description": "只
|
|
|
84645
84835
|
const channelGuide$1 = { "title": "为智能体注入灵魂", "description": "连接 AI 模型,智能体才能思考和回答", "configure": "连接 AI", "dismiss": "跳过" };
|
|
84646
84836
|
const agentChannelCheck$1 = { "title": "智能体还没有灵魂", "description": "连接 AI 模型后才能开始对话", "configure": "连接 AI", "skip": "仍要创建" };
|
|
84647
84837
|
const welcome$1 = { "description": "选择一个智能体开始对话,或叫上所有人一起讨论", "title": "开启一段思考", "subtitle": "从左侧选择一位伙伴开始对话", "or": "或", "createGroup": "叫上所有人一起讨论" };
|
|
84648
|
-
const settings$1 = { "title": "设置", "nav": { "app": "应用", "capabilities": "能力", "automation": "自动化", "agents": "Agent", "connection": "连接" }, "tabs": { "llm": "模型通道", "agent": "智能体", "skill": "Skills", "appearance": "外观设置", "remote": "远程访问", "mcp": "MCP 服务", "search": "搜索引擎", "integration": "Bot接入", "about": "关于" }, "panels": { "integration": { "title": "外部接入", "description": "连接外部平台,让 Agent 通过这些接入与你对话", "addNew": "接入新平台", "empty": "还没有连接任何外部平台。绑定后,Agent 可以在对应平台接收和回复消息。", "connected": "已连接", "disconnected": "未连接", "connecting": "连接中", "reconnecting": "重连中", "authFailed": "鉴权失败", "testConnection": "测试连接", "disconnect": "断开", "reconnect": "重新连接", "bind": { "step1Title": "获取凭证", "step2Title": "选择绑定目标", "step3Title": "验证连接", "botId": "Bot ID", "botIdPlaceholder": "输入企业微信机器人 Bot ID", "secret": "Secret", "secretPlaceholder": "输入机器人 Secret", "targetAgent": "Agent", "targetAgentDesc": "Bot 作为 Agent 的化身", "targetThread": "群组
|
|
84649
|
-
const agent$1 = { "name": "名称", "namePlaceholder": "例如:代码助手", "channel": "通道", "model": "模型", "description": "描述", "descriptionPlaceholder": "描述智能体的能力和用途...", "temperature": "Temperature", "temperature.description": "控制输出随机性,值越高越随机 (0-2,默认 0.7)", "topP": "Top P", "topP.description": "核采样阈值,控制词汇多样性 (0-1,默认 1)", "maxTokens": "最大 Token 数", "maxTokens.description": "单次响应的最大输出长度,留空则不限", "maxTokens.unlimited": "不限制", "enableThinking": "启用思考模式", "enableThinking.description": "开启后 AI 会进行深度思考,提供更准确的回答(部分模型支持)", "notifyOnDegraded": "通道异常时通知我", "notifyOnDegraded.description": "当通道响应变慢或不可用时,显示提示", "autoFallback": "自动切换到备用通道", "autoFallback.description": "通道故障时自动尝试备用通道,无需确认(谨慎开启)", "optimizeDescription": "AI 优化描述", "optimizeFailed": "优化失败,请稍后重试", "create": "创建 Agent", "editTitle": "编辑 Agent", "confirmDelete": "确定删除此 Agent?", "deleteTitle": "删除 Agent", "emptyTitle": "还没有 Agent", "emptyDesc": "创建第一个 Agent,把模型和能力组合成一个角色", "createFirst": "创建你的第一个 Agent", "searchPlaceholder": "搜索 Agent", "noDescription": "暂无描述", "noResults": "未找到匹配「{{query}}」的 Agent,按 Esc 清空搜索", "discardTitle": "放弃修改?", "discardMessage": "你有未保存的修改,离开后将丢失这些修改。", "configured": "已配置", "incomplete": "待完善", "unconfigured": "未配置", "noModel": "未选择模型", "justNow": "刚刚", "minutesAgo": "{{count}}分钟前", "hoursAgo": "{{count}}小时前", "daysAgo": "{{count}}天前", "updatedAt": "更新于 {{time}}", "templateCopied": "已从模板「{{name}}」创建", "templateSystemPrefix": "你是{{name}}。", "edit": "编辑", "delete": "删除", "add": "添加", "update": "更新", "advanced": "高级功能", "configure": "配置智能体", "avatar": { "label": "Agent 头像", "hint": "点击头像上传或移除自定义头像" }, "summarizeConversation": "总结本次对话", "updateMemory": "
|
|
84838
|
+
const settings$1 = { "title": "设置", "nav": { "app": "应用", "capabilities": "能力", "automation": "自动化", "agents": "Agent", "connection": "连接" }, "tabs": { "llm": "模型通道", "agent": "智能体", "skill": "Skills", "appearance": "外观设置", "remote": "远程访问", "mcp": "MCP 服务", "search": "搜索引擎", "integration": "Bot接入", "about": "关于" }, "panels": { "integration": { "title": "外部接入", "description": "连接外部平台,让 Agent 通过这些接入与你对话", "addNew": "接入新平台", "empty": "还没有连接任何外部平台。绑定后,Agent 可以在对应平台接收和回复消息。", "connected": "已连接", "disconnected": "未连接", "connecting": "连接中", "reconnecting": "重连中", "authFailed": "鉴权失败", "testConnection": "测试连接", "disconnect": "断开", "reconnect": "重新连接", "bind": { "step1Title": "获取凭证", "step2Title": "选择绑定目标", "step3Title": "验证连接", "botId": "Bot ID", "botIdPlaceholder": "输入企业微信机器人 Bot ID", "secret": "Secret", "secretPlaceholder": "输入机器人 Secret", "targetAgent": "Agent", "targetAgentDesc": "Bot 作为 Agent 的化身", "targetThread": "群组 Session", "targetThreadDesc": "Bot 接入群组的某个 Session", "selectAgent": "选择 Agent", "selectGroup": "选择群组", "selectThread": "选择 Session", "next": "下一步", "prev": "上一步", "cancel": "取消", "done": "完成", "testSuccess": "连接成功!WebSocket 通道已建立。", "testFailed": "连接失败", "summaryPlatform": "平台", "summaryBotId": "Bot ID", "summaryTarget": "绑定目标" }, "confirmUnbind": "确定断开此接入?", "unbindTitle": "断开接入", "hint": "外部接入仅在应用运行时可用。关闭应用后,Bot 将自动离线。", "wecomBot": "企业微信", "methodQrcode": "扫码绑定", "methodQrcodeDesc": "用企业微信扫描二维码,自动获取凭证", "methodManual": "手动输入", "methodManualDesc": "输入 Bot ID 和 Secret", "qrLoading": "正在获取二维码...", "qrHint": "请打开企业微信,扫描上方二维码", "qrTimeout": "扫码超时(5 分钟),请重试" }, "appearance": { "title": "外观", "description": "自定义主题、语言与界面显示方式" }, "channel": { "title": "模型通道", "description": "管理用于连接 AI 服务的模型通道与默认模型" }, "multimodal": { "title": "多模态能力", "description": "配置图片、视频、语音等多模态能力的分析与生成" }, "mcp": { "title": "扩展服务", "description": "配置 MCP 服务以扩展 Agent 能力" }, "skill": { "title": "技能", "description": "管理 Agent 可使用的技能模块" }, "search": { "title": "搜索", "description": "配置联网搜索引擎与默认搜索行为" }, "remote": { "title": "远程访问", "description": "开启后可通过手机浏览器访问 KAi,所有连接使用加密 token 认证" }, "agent": { "title": "Agents", "description": "创建和管理自定义 Agent" }, "memoryGrowth": { "title": "记忆成长", "description": "配置记忆如何随着时间自动更新与整理" }, "scheduler": { "title": "定时任务", "description": "创建和管理定时执行的自动化任务" }, "about": { "title": "关于 KAi", "description": "多 AI Agent 协作桌面应用" } }, "channel": { "title": "模型通道", "add": "添加通道", "addTitle": "添加通道", "editTitle": "编辑通道", "name": "通道名称", "namePlaceholder": "例如:OpenAI、Azure", "apiType": "接口类型", "apiTypeOpenai": "OpenAI Compatible", "apiTypeOfficialOpenai": "OpenAI", "apiTypeAnthropic": "Anthropic", "apiTypeGoogle": "Google Gemini", "apiTypeAuto": "自动检测", "baseUrl": "Base URL", "apiKey": "API Key", "defaultModel": "默认模型", "selectModel": "选择模型...", "enterUrlAndKey": "请先填写 Base URL 和 API Key", "loadingModels": "加载模型中...", "searchOrType": "搜索或输入模型名称…", "useCustom": "自定义", "isDefault": "默认通道", "setAsDefault": "设为默认通道", "default": "默认", "setDefault": "设为默认", "edit": "编辑", "delete": "删除", "confirmDelete": "确定删除此通道?", "deleteTitle": "删除通道", "showApiKey": "显示 API Key", "hideApiKey": "隐藏 API Key", "empty": "暂无通道,点击下方按钮创建", "deleted": "通道已删除", "setDefaultDone": "已将「{{name}}」设为默认通道", "actions": "「{{name}}」操作", "confirmDeleteMm": "此通道正用于多模态图片分析(analyzeImage 工具),删除后该功能将停用。确定删除「{{name}}」?", "tabChannels": "通道", "tabMultimodal": "多模态" }, "llm": { "title": "LLM 配置", "model": "模型名称", "modelPreset": "模型预设", "customModel": "自定义模型", "apiKey": "API Key", "baseUrl": "Base URL", "temperature": "温度", "maxTokens": "最大令牌数", "topP": "Top P", "loadingModels": "加载模型中...", "errors": { "network_error": "无法连接到 API 服务器,请检查 Base URL 和网络连接", "auth_failed": "API Key 验证失败,请检查您的密钥", "api_error": "API 请求失败,请检查服务器状态" } }, "remote": { "title": "远程访问", "description": "开启后可通过手机浏览器访问 KAi。\n所有连接使用加密 token 认证。", "on": "开启", "off": "关闭", "copyLink": "复制链接", "rotateLink": "重新生成链接", "stopLink": "停止远程访问", "rotateSuccess": "已生成新链接,旧链接已失效", "linkTitle": "稳定访问链接", "linkDescription": "链接会在下次启动时自动恢复,除非你手动停止或重新生成。", "restoreMode": "启动恢复", "restoreEnabled": "自动恢复", "restoreDisabled": "不自动恢复", "lastGenerated": "最近生成时间", "notGeneratedYet": "尚未生成", "restoreFailedTitle": "恢复失败", "status": { "disabled": "未开启", "enabling": "开启中", "enabled": "已开启", "restoring": "恢复中", "rotating": "生成新链接中", "stopping": "停止中", "error": "恢复失败" }, "qrCodeAlt": "远程访问二维码", "tokenPending": "正在等待访问 token...", "portValue": "端口: {{port}}", "connectionsValue": "连接: {{current}}/{{max}}", "addresses": "可用地址", "connectedClients": "已连接设备", "errors": { "toggleFailed": "更新远程访问状态失败", "copyFailed": "复制远程访问链接失败", "rotateFailed": "重新生成远程访问链接失败" } }, "search": { "engines": "搜索引擎列表", "builtIn": "内置", "default": "默认", "setDefault": "设为默认", "addCustom": "添加自定义引擎", "addEngine": "添加搜索引擎", "editEngine": "编辑搜索引擎", "name": "引擎名称", "namePlaceholder": "例如:Google Scholar", "urlTemplate": "URL 模板", "urlTemplateHint": "使用 {query} 作为搜索关键词占位符", "urlTemplateError": "URL 模板必须包含 {query} 占位符", "showWindow": "显示搜索窗口(调试用)", "confirmDelete": "确定删除此搜索引擎?", "deleteTitle": "删除搜索引擎", "delete": "删除" }, "language": "语言", "appearance": { "theme": "主题", "themeLight": "亮色", "themeDark": "暗色", "themeSystem": "跟随系统" }, "save": "保存", "cancel": "取消", "saveFailed": "保存设置失败,请重试", "saveSuccess": "保存成功", "mcp": { "title": "MCP 服务", "add": "添加服务", "addServer": "添加服务", "addTitle": "添加服务", "editTitle": "编辑服务", "empty": "暂无 MCP 服务", "confirmDelete": "确定要删除此服务吗?", "deleteTitle": "删除服务", "serverName": "服务名称", "serverType": "类型", "command": "命令", "args": "参数", "url": "WebSocket 地址", "enabled": "启用", "testConnection": "测试连接", "connected": "已连接", "disconnected": "未连接", "error": "连接错误", "edit": "编辑", "delete": "删除", "typeStdio": "Stdio", "typeCommand": "命令", "typeStreamableHttp": "Streamable HTTP", "typeWebsocket": "WebSocket", "toolCount": "工具数量", "testing": "测试中...", "testSuccess": "连接成功", "testFailed": "连接失败", "applyToAgent": "应用到 Agent", "appliedToAgents": "已应用到 {{count}} 个 Agent", "notAppliedToAnyAgent": "未应用到任何 Agent", "globallyDisabled": "全局停用", "selectedCount": "已选择 {{count}} 个", "searchAgent": "搜索 Agent", "noMatchingAgents": "未找到匹配的 Agent", "drawerDisabledWarning": "此 MCP 服务当前全局停用,Agent 无法实际使用", "filteredCount": "找到 {{count}} 个 Agent", "selectAll": "全选", "clearAll": "清空", "selectFiltered": "选中当前结果", "clearFiltered": "清空当前结果" }, "about": { "releaseNotes": "更新日志", "versionCopied": "已复制", "autoCheckForUpdates": "每天自动检查更新", "checkForUpdates": "检查更新", "checking": "正在检查更新", "goDownload": "前往下载", "newVersion": "发现新版本", "updateHighlights": "本次更新", "viewFullReleaseNotes": "查看完整更新日志", "retry": "重新检查", "upToDate": "当前已是最新版本", "updateError": "检查更新失败", "feedback": { "title": "反馈", "placeholder": "告诉我们在想什么...", "bug": "Bug", "feature": "功能建议", "other": "其他", "submit": "提交反馈", "showContact": "留下联系方式", "contactPlaceholder": "邮箱或其他联系方式", "success": "感谢反馈!", "error": "提交失败,请稍后再试。" } }, "multimodal": { "saved": "多模态配置已保存", "saveFailed": "保存失败", "saving": "保存中…", "noChannels": "暂无可用通道,请先在模型通道中添加", "goToChannels": "前往模型通道", "tabImageAnalysis": "图片分析", "tabImageGeneration": "图片生成", "tabVideo": "视频能力", "tabVoice": "语音能力", "comingSoon": "即将推出", "badgeOn": "ON", "badgeOff": "OFF", "analysis": { "title": "图片分析", "summary": "{channel} · {model} · {size}px", "summaryDefault": "未配置", "hint": "启用后,Agent 可使用 analyzeImage 工具识别和理解图片内容", "channel": "通道", "selectChannel": "请选择通道", "modelLabel": "指定模型(可选)", "modelHint": "留空使用通道默认模型", "maxImageEdge": "最大图片长边", "maxImageEdgeHint": "超出时自动缩放,越小成本越低", "inactive": "已关闭", "channelDeleted": "通道已失效", "incomplete": "未完成配置 · 请选择通道" }, "generation": { "title": "图片生成", "summary": "{channel} · {model} · {size}", "summaryDefault": "未配置", "hint": "启用后,Agent 可使用 generateImage 工具根据文字描述生成图片", "channel": "通道", "selectChannel": "请选择通道", "modelLabel": "指定模型(可选)", "modelHint": "留空使用通道默认模型", "defaultSize": "默认尺寸(可选)", "modelDefaultSize": "使用模型默认尺寸", "inactive": "已关闭", "channelDeleted": "通道已失效", "incomplete": "未完成配置 · 请选择通道" }, "fallback": { "title": "备用模型", "add": "添加备用", "remove": "删除", "selectChannel": "选择通道", "hint": "主模型失败时,按顺序依次尝试备用模型" } }, "integration": { "title": "外部接入", "description": "连接外部平台,让 Agent 通过这些接入与你对话", "addNew": "接入新平台", "empty": "还没有连接任何外部平台。绑定后,Agent 可以在对应平台接收和回复消息。", "connected": "已连接", "disconnected": "未连接", "connecting": "连接中", "reconnecting": "重连中", "authFailed": "鉴权失败", "testConnection": "测试连接", "editTarget": "编辑", "editTargetTitle": "修改绑定目标", "editTargetSuccess": "绑定目标已更新", "disconnect": "断开", "reconnect": "重新连接", "createdAt": "创建于 {{time}}", "bind": { "step0Title": "选择平台", "stepMethodTitle": "接入方式", "step1Title": "获取凭证", "step2Title": "选择绑定目标", "step3Title": "验证连接", "botId": "Bot ID", "botIdPlaceholder": "输入企业微信机器人 Bot ID", "secret": "Secret", "secretPlaceholder": "输入机器人 Secret", "targetAgent": "Agent", "targetAgentDesc": "Bot 作为 Agent 的化身", "targetThread": "群组 Session", "targetThreadDesc": "Bot 接入群组的某个 Session", "selectAgent": "选择 Agent", "selectGroup": "选择群组", "selectThread": "选择 Session", "next": "下一步", "prev": "上一步", "cancel": "取消", "done": "完成", "testSuccess": "连接成功!WebSocket 通道已建立。", "testFailed": "连接失败", "summaryPlatform": "平台", "summaryBotId": "Bot ID", "summaryTarget": "绑定目标" }, "confirmUnbind": "确定断开此接入?", "unbindTitle": "断开接入", "hint": "外部接入仅在应用运行时可用。关闭应用后,Bot 将自动离线。", "wecomBot": "企业微信", "wecomBotDesc": "通过企业微信 Bot 接入,需要 Bot ID 和 Secret", "wechatPersonal": "微信", "wechatPersonalDesc": "通过微信个人 Bot(ClawBot)接入,扫码登录即可", "methodQrcode": "扫码绑定", "methodQrcodeDesc": "用企业微信扫描二维码,自动获取凭证", "methodManual": "手动输入", "methodManualDesc": "输入 Bot ID 和 Secret", "qrLoading": "正在获取二维码...", "qrHint": "请打开企业微信,扫描上方二维码", "wpQrHint": "请打开微信,扫描上方二维码登录 Bot", "qrTimeout": "扫码超时(5 分钟),请重试" } };
|
|
84839
|
+
const agent$1 = { "name": "名称", "namePlaceholder": "例如:代码助手", "channel": "通道", "model": "模型", "description": "描述", "descriptionPlaceholder": "描述智能体的能力和用途...", "temperature": "Temperature", "temperature.description": "控制输出随机性,值越高越随机 (0-2,默认 0.7)", "topP": "Top P", "topP.description": "核采样阈值,控制词汇多样性 (0-1,默认 1)", "maxTokens": "最大 Token 数", "maxTokens.description": "单次响应的最大输出长度,留空则不限", "maxTokens.unlimited": "不限制", "enableThinking": "启用思考模式", "enableThinking.description": "开启后 AI 会进行深度思考,提供更准确的回答(部分模型支持)", "notifyOnDegraded": "通道异常时通知我", "notifyOnDegraded.description": "当通道响应变慢或不可用时,显示提示", "autoFallback": "自动切换到备用通道", "autoFallback.description": "通道故障时自动尝试备用通道,无需确认(谨慎开启)", "optimizeDescription": "AI 优化描述", "optimizeFailed": "优化失败,请稍后重试", "create": "创建 Agent", "editTitle": "编辑 Agent", "confirmDelete": "确定删除此 Agent?", "deleteTitle": "删除 Agent", "emptyTitle": "还没有 Agent", "emptyDesc": "创建第一个 Agent,把模型和能力组合成一个角色", "createFirst": "创建你的第一个 Agent", "searchPlaceholder": "搜索 Agent", "noDescription": "暂无描述", "noResults": "未找到匹配「{{query}}」的 Agent,按 Esc 清空搜索", "discardTitle": "放弃修改?", "discardMessage": "你有未保存的修改,离开后将丢失这些修改。", "configured": "已配置", "incomplete": "待完善", "unconfigured": "未配置", "noModel": "未选择模型", "justNow": "刚刚", "minutesAgo": "{{count}}分钟前", "hoursAgo": "{{count}}小时前", "daysAgo": "{{count}}天前", "updatedAt": "更新于 {{time}}", "templateCopied": "已从模板「{{name}}」创建", "templateSystemPrefix": "你是{{name}}。", "edit": "编辑", "delete": "删除", "add": "添加", "update": "更新", "advanced": "高级功能", "configure": "配置智能体", "avatar": { "label": "Agent 头像", "hint": "点击头像上传或移除自定义头像" }, "summarizeConversation": "总结本次对话", "updateMemory": "整理长期记忆", "writeToMemory": "写入记忆", "writingMemory": "写入中...", "memoryWritten": "已写入", "summarizePrompt": "请对本次对话做结构化总结。只输出以下四个部分:关键结论、已做决策、待办事项、未决问题。即使某部分为空,也写“暂无”。不要更新任何 workspace 文件。", "primary": "主要", "healthy": "正常", "degraded": "缓慢", "unhealthy": "离线", "unknown": "未知", "advancedConfig": "高级配置", "reasoningEffort": "推理强度", "reasoningEffortLevels": { "off": "关闭", "low": "低", "medium": "中", "high": "高" }, "reasoningEffort.description": "控制模型在回答前投入的推理强度。级别越高,通常更稳,但也可能更慢。", "selected": "已选", "tab": { "basic": "基础", "identity": "身份", "model": "模型", "brain": "模型", "capabilities": "能力", "workspace": "工作空间", "memory": "记忆" }, "summary": { "model": "模型", "skills": "Skills", "mcp": "MCP", "thinking": "Thinking" }, "notSelected": "未选择", "mention": { "placeholder": "选择智能体...", "noAgents": "暂无智能体配置", "allDesc": "通知所有成员" }, "skill": { "title": "Skills", "empty": "暂无 Skill。请在 ~/.kai/skills/ 目录手动创建。", "back": "返回" }, "mcpServers": { "title": "MCP 服务", "empty": "暂无已启用的 MCP 服务,请先在「MCP 服务」中配置", "connected": "已连接", "disconnected": "未连接", "tools": " 个工具" }, "toolLimit": { "title": "内置工具权限", "summaryNone": "未限制", "summaryCount": "已禁用 {{count}} 项", "summaryCountWithCritical": "已禁用 {{count}} 项,含关键工具 {{tool}}", "groupFile": "文件", "groupSystem": "系统", "groupNetwork": "网络", "groupData": "数据", "groupAux": "辅助", "disabled": "已禁用", "hint": "关闭工具后,该 Agent 将无法在运行时调用对应能力。谨慎禁用读写文件、编辑文件或 Shell 等关键工具。", "warningCritical": "已禁用关键工具 {{tool}},Agent 可能无法{{consequence}}。", "warningNearAll": "当前仅剩 {{count}} 项工具可用,Agent 可能几乎无法执行实际任务。", "warningCriticalTools": { "readFile": "读取工作区内容", "writeFile": "写入文件", "editFile": "修改现有文件", "shell": "执行命令或验证结果" }, "toolDesc": { "readFile": "读取本地文件或目录内容", "writeFile": "创建或覆盖写入本地文件", "editFile": "对文件做精确文本替换", "shell": "执行终端命令", "webFetch": "抓取指定网页或接口内容", "webSearch": "联网搜索实时信息", "sqlQuery": "执行只读 SQL 查询", "analyzeImage": "分析图片内容或提取文字", "generateImage": "根据文字描述生成图片", "skill": "加载并使用预定义 Skill", "createCronJob": "创建定时任务", "listCronJobs": "查看定时任务列表", "updateCronJob": "更新定时任务", "deleteCronJob": "删除定时任务" } }, "workspace": { "hide": "隐藏", "edit": "编辑", "openDir": "打开目录" }, "errors": { "duplicateName": "已存在同名智能体,请使用其他名称", "nameRequired": "智能体名称不能为空" }, "initMessage": { "greeting": "你好!我是你的创建者。", "instruction": "请根据以下信息完善你的身份文件:", "name": "名称", "description": "功能描述", "tasks": "请执行以下任务:", "task1": "阅读 IDENTITY.md 和 SOUL.md 的模板内容", "task2": "根据你的名称和功能描述,为自己设计一个合适的身份:", "task2a": "在 IDENTITY.md 中填写你的名字、类型、气质和 Emoji", "task2b": "在 SOUL.md 中根据你的功能定位,调整你的核心真理、边界和风格", "task3": "完成后简要告诉我你是谁,以及你能做什么", "reminder": "记住:这是你的第一次对话,也是你定义自己的机会。" } };
|
|
84650
84840
|
const skill$1 = { "title": "Skills", "empty": "暂无 Skills", "add": "添加 Skill", "edit": "编辑", "delete": "删除", "back": "返回", "name": "Skill 名称", "namePlaceholder": "例如:pdf-processing", "description": "描述", "descriptionPlaceholder": "简要描述此 Skill 的用途", "content": "内容(Markdown)", "contentPlaceholder": "用 Markdown 编写 Skill 的详细指令...", "deleteConfirm": "确定删除此 Skill?", "nameInvalid": "名称只能包含小写字母、数字和连字符,不能以连字符开头/结尾,不能有连续连字符,最多 64 字符", "selectTitle": "选择 Skills", "permissionHint": "为该 Agent 选择可用 Skills。未选择任何 Skill = 不授予 Skill 权限。", "noSkills": "暂无可用 Skills", "noSkillsSelected": "未选择任何 Skill", "manageSkills": "管理", "searchPlaceholder": "搜索 Skill", "noMatchingSkills": "未找到匹配的 Skill", "selectedCount": "已选择 {{count}} 个", "done": "完成", "remove": "移除", "notAppliedToAnyAgent": "未应用到任何 Agent", "appliedToAgents": "已应用到 {{count}} 个 Agent", "globallyDisabled": "已全局停用", "applyToAgent": "应用到 Agent", "searchAgent": "搜索 Agent", "noMatchingAgents": "未找到匹配的 Agent", "drawerDisabledWarning": "此 Skill 当前全局停用,Agent 无法实际使用", "filteredCount": "找到 {{count}} 个 Agent", "selectAll": "全选", "clearAll": "清空" };
|
|
84651
84841
|
const session$1 = { "openDir": "打开目录" };
|
|
84652
84842
|
const error$6 = { "network": "网络错误,请检查您的连接。", "rate_limit": "请求频率超限,请稍后再试。", "api_error": "API 错误,请检查您的设置。", "unknown": "发生错误,请重试。", "retry": "重试", "boundary": { "title": "出错了", "message": "应用遇到了一个错误", "reload": "重新加载", "report": "报告问题", "copyError": "复制错误", "errorCopied": "已复制" }, "descriptionRequired": "描述不能为空", "noDefaultChannel": "未配置默认 LLM 通道", "channelNeedsBaseUrl": "通道必须配置 baseUrl", "agentNotInConversation": "Agent {{agentId}} 不在当前对话中", "contentTooLong": "内容超过 3000 字符限制", "tooManyConcurrentSearches": "搜索请求过多,请稍后重试", "invalidUrl": "无效或不安全的 URL", "noCustomEngines": "未找到自定义搜索引擎", "commandRequired": "命令行 MCP 服务需要 command 参数", "clientNotConnected": "客户端未连接", "agentExecutionNotImplemented": "Agent 执行功能尚未实现", "agentIdRequired": "agent_review 任务需要 agentId", "invalidCiphertext": "密文格式无效:需要 3 个部分", "emptySummary": "摘要响应为空" };
|
|
84653
84843
|
const network$1 = { "offline": "无网络连接" };
|
|
84654
|
-
const message$3 = { "copy": "复制", "copied": "已复制", "edit": "编辑", "regenerate": "重新生成", "delete": "删除", "confirmDelete": "确定删除此消息及之后的所有消息?", "contextCleared": "上下文已清理", "contextCompacted": "
|
|
84844
|
+
const message$3 = { "copy": "复制", "copied": "已复制", "errorDetails": "错误详情", "edit": "编辑", "regenerate": "重新生成", "delete": "删除", "confirmDelete": "确定删除此消息及之后的所有消息?", "contextCleared": "上下文已清理", "contextCompacted": "上下文已压缩", "imageLoadFailed": "图片加载失败", "openImageViewerHint": "点击打开图片查看器", "imageViewerHint": "双击图片切换大小,Ctrl/⌘ + 滚轮缩放,Esc 关闭", "imageLoadError": "图片加载失败", "copyImage": "复制图片", "imageCopied": "图片已复制", "imageCopyFailed": "图片复制失败", "closeImageViewer": "关闭图片查看器", "zoomInImage": "放大 (+)", "zoomOutImage": "缩小 (-)", "resetImageZoom": "适配窗口", "switchToCode": "切换到代码", "switchToPreview": "切换到预览", "preview": "预览", "previewHtml": "预览 HTML", "htmlPreviewTitle": "HTML 预览", "error": { "network": "网络错误", "rate_limit": "请求频率限制", "api_error": "API 错误", "unknown": "未知错误" }, "errorMessage": { "network": "网络连接出了点问题,请检查连接后再试。", "rateLimit": "系统现在有点忙,请稍后再试。", "rateLimitConcurrency": "系统现在有点忙,正在同时处理较多请求,请稍后再试。", "apiError": "模型服务暂时不可用,请稍后再试。", "unknown": "出了点问题,请稍后再试。" }, "fallback": { "transition": "当前模型繁忙,正在切换备用模型…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "请求繁忙", "timeout": "响应超时", "apiError": "服务暂时不可用", "contextOverflow": "上下文过长", "unknown": "未知原因" } }, "handoff": "协作转交", "broadcast": "协作咨询", "expand": "展开", "collapse": "收起", "lines": "行", "userMessage": "用户消息", "agentMessage": "{{name}} 的回复", "generating": "生成中", "sending": "发送中", "waiting": "等待处理", "sendFailed": "发送失败", "retrySend": "重试", "recall": "撤回", "tokenUsage": "输入:{{input}} | 输出:{{output}}", "tokenUsageWithCache": "输入:{{input}} | 输出:{{output}} | 缓存命中:{{cached}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "完成 {{completed}}/{{total}}", "broadcastStatusPending": "等待中", "broadcastStatusThinking": "思考中", "broadcastStatusStreaming": "回复中", "broadcastStatusDone": "已完成", "broadcastStatusFailed": "失败", "broadcastWaiting": "等待响应…", "broadcastNoContent": "无内容", "broadcastFailed": "响应失败", "broadcastComplete": "协作咨询已结束", "broadcastAllReplied": "所有成员都已回复", "taskAssign": "已发起协作任务", "taskAssignedTo": "已交给 {{name}} 处理", "taskDetail": "查看执行过程", "taskDetailCollapse": "收起执行过程", "taskEmpty": "暂无执行内容", "taskQueued": "排队中", "taskRunning": "进行中", "taskCompleted": "已完成", "taskFailed": "执行失败", "taskKilled": "已结束", "taskBackgroundQueued": "后台排队中", "taskBackgroundRunning": "后台运行中", "taskBackgroundCompleted": "后台完成", "taskBackgroundFailed": "后台失败", "taskBackgroundKilled": "后台结束", "broadcastWaitingMembers": "还有 {{count}} 位成员待回复" };
|
|
84655
84845
|
const channel$1 = { "primary": "主要", "healthy": "正常", "degraded": "缓慢", "unhealthy": "离线", "unknown": "未知", "switch": "切换到 {{name}}", "slow": "响应缓慢", "error": "连接异常", "viewStatus": "查看通道状态", "alertDegraded": "{{channel}} 响应缓慢", "alertUnhealthy": "{{channel}} 连接异常", "unknownChannel": "未知通道", "fallback": "备用模型", "fallbackSummary": "已配置 {{count}} 个", "fallbackEmpty": "暂无备用模型", "addFallback": "添加备用通道" };
|
|
84656
84846
|
const thread$1 = { "tabs": { "label": "讨论线程", "newThread": "新建讨论", "streaming": "回复中…", "completed": "回复完成", "paused": "已暂停", "archive": "归档讨论", "renameHint": "双击重命名" }, "context": { "discussion": "讨论" }, "createTitle": "新建讨论", "createSubtitle": "在「{{groupName}}」中创建新讨论", "members": "参与成员:", "memberCount": "{{count}} 位成员将参与", "memberCountShort": "{{count}} 位成员将参与", "titlePlaceholder": "讨论主题(必填)", "titleTooLong": "标题不能超过 100 个字符", "createHint": "群组成员将自动加入此讨论。建完后发送第一条消息开始", "create": "创建", "inGroup": "在「{{groupName}}」中发起的讨论", "sendFirst": "发送第一条消息开始讨论", "placeholder": { "default": "在「{{group}}」中跟 {{speaker}} 讨论…", "thread": "跟 {{speaker}} 讨论 {{title}}…" }, "badge": { "tooltip": "{{count}} 个活跃讨论" }, "archiveToast": "讨论已归档", "archiveUndo": "撤销", "archiveConfirm": "归档此讨论?", "archiveTitle": "归档讨论" };
|
|
84657
84847
|
const mention$1 = { "allDesc": "通知所有成员" };
|
|
84658
84848
|
const chat$1 = { "members": "成员", "active": "{{count}}人响应中", "moreMembers": "更多", "untitled": "未命名对话", "noMoreMessages": "没有更多消息了", "newMessages": "有新消息", "scrollToBottom": "滚动到底部", "loadMore": "加载更多消息", "noMessages": "暂无消息", "agentThinking": "{{name}} 正在思考…", "agentSpeaking": "{{name}} 正在回复…", "thinking": "思考中", "replying": "回复中", "handoffTo": "转交给", "groupReady": "群已准备就绪", "groupReadyHint": "你可以先发一个问题、目标,或待办事项" };
|
|
84659
84849
|
const supervisor$1 = { "evaluating": "{{name}} 正在评估…(第 {{current}}/{{max}} 轮)", "evaluatingShort": "{{name}} 正在评估", "improving": "{{name}} 正在根据反馈改进…(第 {{current}}/{{max}} 轮)", "improvingShort": "{{name}} 正在改进", "completed": "{{name}} 确认达标(共 {{rounds}} 轮)", "completedShort": "{{name}} 确认达标", "ended": "监督结束(共 {{rounds}} 轮)", "endedShort": "已结束", "endedWithReason": "监督结束(共 {{rounds}} 轮):{{reason}}", "roundLabel": "第 {{current}}/{{max}} 轮评估", "roundPassed": "通过", "roundNotPassed": "未通过", "roundNotPassedFeedback": "未通过:{{feedback}}", "viewRounds": "查看评估过程", "hideRounds": "收起评估过程", "viewReview": "查看评估过程", "hideReview": "收起评估过程", "reviewProcessTitle": "评估过程", "resultTitle": "评估结论", "resultStatus": "结果", "feedbackTitle": "反馈", "nextTaskTitle": "下一步", "taskKey": { "eval_first": "检查执行结果", "eval_improve": "检查改进结果", "improve_from_feedback": "根据反馈改进", "noEvaluateTool": "未调用评估工具" }, "reasonKey": { "max_iterations_reached": "达到最大迭代次数", "supervisor.noEvaluateTool": "未调用评估工具" } };
|
|
84660
|
-
const command$1 = { "clearDescription": "清理上下文历史", "compactDescription": "
|
|
84661
|
-
const quickReply$1 = { "title": "快捷回复", "add": "添加快捷回复", "addTitle": "添加快捷回复", "editTitle": "编辑快捷回复", "emptyTitle": "还没有快捷回复", "emptyDescription": "
|
|
84850
|
+
const command$1 = { "clearDescription": "清理上下文历史", "compactDescription": "压缩当前对话上下文,可补充保留重点", "quickReplyDescription": "打开快捷回复选择器" };
|
|
84851
|
+
const quickReply$1 = { "title": "快捷回复", "add": "添加快捷回复", "addTitle": "添加快捷回复", "editTitle": "编辑快捷回复", "emptyTitle": "还没有快捷回复", "emptyDescription": "把常用的话保存下来,下次一键发送。", "addFirst": "添加第一条", "titleLabel": "标题,可选", "titlePlaceholder": "例如:Review 这次改动", "contentLabel": "内容", "contentPlaceholder": "输入要复用的话", "selectHint": "选择", "insertHint": "插入", "sendHint": "发送", "moreActions": "更多操作", "manage": "管理", "delete": "删除", "deleted": "已删除快捷回复", "undo": "撤销", "loadFailed": "快捷回复加载失败", "saveFailed": "快捷回复保存失败", "editorHint": "Enter 换行 · Cmd/Ctrl + Enter 保存 · Esc 返回列表" };
|
|
84662
84852
|
const tool$1 = { "executing": "执行中", "success": "成功", "error": "失败", "arguments": "参数", "result": "结果", "expand": "展开", "collapse": "收起", "viewChanges": "查看变更", "viewDetails": "查看详情", "changes": "变更" };
|
|
84663
84853
|
const reasoning$1 = { "title": "思考过程" };
|
|
84664
84854
|
const common$1 = { "loading": "加载中...", "create": "创建", "save": "保存", "saving": "保存中...", "cancel": "取消", "close": "关闭", "back": "返回", "confirm": "确认", "openMenu": "打开菜单", "expand": "展开", "collapse": "收起", "unsavedChanges": "有未保存的更改,确定离开吗?", "edit": "编辑" };
|
|
@@ -84670,20 +84860,21 @@ const queue$1 = { "waiting": "{{count}} 条消息待发送", "clearAll": "清空
|
|
|
84670
84860
|
const memoryConsolidated$1 = "记忆已整合";
|
|
84671
84861
|
const memoryConsolidationSkipped$1 = "无需整合记忆";
|
|
84672
84862
|
const contextCleared$1 = "上下文已清理";
|
|
84673
|
-
const contextCompacted$1 = "
|
|
84674
|
-
const compactLoading$1 = "
|
|
84863
|
+
const contextCompacted$1 = "上下文已整理";
|
|
84864
|
+
const compactLoading$1 = "正在整理上下文...";
|
|
84675
84865
|
const compactFailed$1 = "整理失败";
|
|
84866
|
+
const contextHealth$1 = { "title": "上下文状态", "failed": "整理失败", "compacting": "整理中", "compacted": "已整理", "reasonProactive": "主动整理", "reasonStepBoundary": "步骤间压缩", "reasonReactive": "溢出修复", "reasonManual": "手动整理", "statusRowCompleted": "已整理上下文 · {{reason}} · {{before}} → {{after}}", "statusRowFailed": "上下文整理失败 · 可考虑新开 Session", "currentUsage": "当前估算:{{current}} / {{limit}}", "thresholdRatio": "整理阈值:{{percent}}", "lastCompaction": "最近整理:{{value}}", "lastResult": "最近结果:{{value}}", "totalCompactions": "累计整理:{{count}} 次", "targetLimit": "目标阈值:{{value}}" };
|
|
84676
84867
|
const retrying$1 = "重试中... {{attempt}}/{{maxAttempts}}";
|
|
84677
84868
|
const noMoreMessages$1 = "没有更多消息了";
|
|
84678
84869
|
const newMessages$1 = "有新消息";
|
|
84679
84870
|
const scrollToBottom$1 = "滚动到底部";
|
|
84680
84871
|
const time$1 = { "yesterday": "昨天", "monday": "周一", "tuesday": "周二", "wednesday": "周三", "thursday": "周四", "friday": "周五", "saturday": "周六", "sunday": "周日" };
|
|
84681
|
-
const scheduler$1 = { "title": "定时任务", "createTask": "创建任务", "editTask": "编辑任务", "taskName": "任务名称", "taskType": "任务类型", "cronExpression": "Cron 表达式", "enabled": "启用", "disabled": "禁用", "agentConversation": "Agent 对话", "conversation": "对话", "agent": "智能体", "group": "群组", "message": "消息内容", "lastRunAt": "上次运行", "nextRunAt": "下次运行", "never": "从未", "actions": "操作", "edit": "编辑", "delete": "删除", "toggle": "切换", "executions": "执行历史", "status": "状态", "running": "运行中", "success": "成功", "failed": "失败", "output": "输出", "error": "错误", "startedAt": "开始时间", "completedAt": "完成时间", "duration": "耗时", "noExecutions": "暂无执行记录", "noTasks": "暂无定时任务", "createFirst": "创建你的第一个定时任务", "deleteConfirm": "确定要删除此任务吗?", "deleteTitle": "删除任务", "cronHelp": "例如:0 9 * * * (每天上午9点)", "selectConversation": "选择对话", "selectAgent": "选择智能体", "enterMessage": "输入消息内容", "noConversations": "暂无对话", "createTaskFailed": "创建任务失败:", "updateTaskFailed": "更新任务失败:", "deletedConversation": "已删除的对话", "conversationDeletedWarning": "此任务关联的对话已被删除,请选择新的对话", "review": "夜间整理", "allAgents": "所有智能体", "reviewing": "
|
|
84682
|
-
const memoryGrowth$1 = { "title": "记忆成长", "nightly": { "title": "夜间整理", "description": "
|
|
84872
|
+
const scheduler$1 = { "title": "定时任务", "createTask": "创建任务", "editTask": "编辑任务", "taskName": "任务名称", "taskType": "任务类型", "cronExpression": "Cron 表达式", "enabled": "启用", "disabled": "禁用", "agentConversation": "Agent 对话", "conversation": "对话", "agent": "智能体", "group": "群组", "message": "消息内容", "lastRunAt": "上次运行", "nextRunAt": "下次运行", "never": "从未", "actions": "操作", "edit": "编辑", "delete": "删除", "toggle": "切换", "executions": "执行历史", "status": "状态", "running": "运行中", "success": "成功", "failed": "失败", "output": "输出", "error": "错误", "startedAt": "开始时间", "completedAt": "完成时间", "duration": "耗时", "noExecutions": "暂无执行记录", "noTasks": "暂无定时任务", "createFirst": "创建你的第一个定时任务", "deleteConfirm": "确定要删除此任务吗?", "deleteTitle": "删除任务", "cronHelp": "例如:0 9 * * * (每天上午9点)", "selectConversation": "选择对话", "selectAgent": "选择智能体", "enterMessage": "输入消息内容", "noConversations": "暂无对话", "createTaskFailed": "创建任务失败:", "updateTaskFailed": "更新任务失败:", "deletedConversation": "已删除的对话", "conversationDeletedWarning": "此任务关联的对话已被删除,请选择新的对话", "review": "夜间整理", "allAgents": "所有智能体", "reviewing": "正在整理记忆", "singleConversations": "单人对话", "groupConversations": "群组对话", "cronPresets": { "everyHour": "每小时", "everyDay9am": "每天上午9点", "everyWeekday9am": "工作日上午9点", "everyMonday9am": "每周一上午9点", "custom": "自定义" } };
|
|
84873
|
+
const memoryGrowth$1 = { "title": "记忆成长", "nightly": { "title": "夜间整理", "description": "每天在固定时间整理长期记忆,可能更新 Agent 或群组的记忆文件;不会清理或压缩当前聊天。", "timeLabel": "执行时间", "scopeLabel": "整理范围", "scopeAll": "所有 Agent", "scopeAgent": "指定 Agent", "scopeGroup": "指定群组", "scopeAgentValue": "指定 Agent · {{agentName}}", "agentLabel": "选择 Agent", "selectAgent": "请选择 Agent", "selectAgentFirst": "请先选择要整理的 Agent", "groupLabel": "选择群组", "selectGroup": "请选择群组", "selectGroupFirst": "请先选择要整理的群组", "saved": "夜间整理已更新", "runNow": "立即整理记忆", "runNowDone": "记忆更新完成:{{succeeded}}/{{total}} 个智能体成功", "runNowFailed": "记忆更新失败", "runningProgress": "正在整理记忆", "nextMode": "自动模式", "enabledAt": "已启用 · 每天 {{time}} 执行", "disabled": "未启用", "lastRun": "上次运行", "neverRun": "从未运行", "memoryFiles": "记忆文件", "topicFiles": "专题文件入口", "topicFilesDescription": "这些细节已下沉到专题文件,长期记忆只保留摘要和入口。", "noRecentFiles": "最近没有文件变更", "openMemoryDir": "打开记忆目录", "openMemoryDirHint": "先选择一个 Agent,才能直接打开它的记忆目录。", "openMemoryDirUnavailable": "当前未选择 Agent,无法打开记忆目录", "recentExecutions": "最近整理记录", "noExecutions": "暂无执行历史", "unknownTime": "未知时间", "executionRunning": "记忆更新进行中", "executionFailed": "执行失败", "executionFinished": "执行完成", "executionSummary": "记录结果:{{succeeded}}/{{total}} 个智能体成功", "executionSummaryCompact": "{{succeeded}}/{{total}} 个 Agent", "groupExecutionSummary": "群组 {{groupName}}:更新 {{changedFiles}} 个文件", "groupExecutionSummaryCompact": "{{changedFiles}} 个文件", "noChanges": "无新内容", "candidates": "候选结果", "candidateDisposition": { "promoted": "已晋升", "duplicate": "重复", "deferred": "待定", "skipped": "已跳过" }, "candidateSource": { "direct": "对话", "group": "群摘要" }, "candidateTarget": { "memory": "长期记忆", "user": "用户画像", "group": "群记忆", "tools": "工具配置", "topic": "专题文件", "dailyOnly": "每日记录" }, "budgetStatus": "长期记忆预算", "budget": { "healthy": "健康", "warning": "接近上限", "over": "已超限" }, "budgetPolicy": { "conservative": "保守晋升", "overBudget": "超限保护" }, "enableConfirmTitle": "开启夜间整理?", "enableConfirmMessage": "开启后,系统将在每天指定时间整理长期记忆,可能更新 Agent 或群组的记忆文件;不会清理或压缩当前聊天。\n\n你可以随时关闭,也可以查看每次整理的详细记录。", "enableConfirmAction": "开启", "executionStatus": { "running": "运行中", "success": "成功", "failed": "失败", "no-changes": "无变更" }, "autoTitle": "自动整理记忆", "autoEnableConfirmTitle": "开启自动整理记忆?", "autoEnableConfirmMessage": "开启后,系统将在每天指定时间整理长期记忆,可能更新 Agent 或群组的记忆文件;不会清理或压缩当前聊天。\n\n你可以随时关闭,也可以查看每次整理的详细记录。", "sources": "来源", "sourcesEmpty": "无可用来源", "sourceDirect": "{{count}} 个对话 · {{messages}} 条消息", "sourceGroupDigest": "{{count}} 个群摘要" } };
|
|
84683
84874
|
const clear$1 = { "confirmTitle": "清理上下文?", "confirmDesc": "当前对话消息会保留,只会清理后续回复使用的上下文。", "confirmBtn": "清理" };
|
|
84684
84875
|
const filePreview$1 = { "source": "源码", "preview": "预览", "nonTextTitle": "非文本文件", "nonTextDesc": "此文件无法以文本方式预览。", "openWithSystem": "用系统应用打开", "loadError": "加载失败", "tooLargeTitle": "文件过大", "tooLargeDesc": "文件大小 {{size}},超出预览限制。请用系统应用打开。", "showInFolder": "在文件夹中显示", "download": "下载", "close": "关闭" };
|
|
84685
84876
|
const cancel$1 = "取消";
|
|
84686
|
-
const contextSuggestion$1 = { "title": "
|
|
84877
|
+
const contextSuggestion$1 = { "title": "建议整理上下文", "description": "这段会话有点长了。整理后会保留重点,让后续回复更连贯。聊天记录不会删除。", "accept": "整理上下文", "dismiss": "本会话不再提示", "remindLater": "稍后再说", "close": "关闭", "running": "正在整理会话…", "completed": "会话已整理,后续回复会参考整理后的关键内容。", "failed": "暂时无法整理会话,请稍后再试。" };
|
|
84687
84878
|
const zh = {
|
|
84688
84879
|
header: header$b,
|
|
84689
84880
|
input: input$5,
|
|
@@ -84721,6 +84912,7 @@ const zh = {
|
|
|
84721
84912
|
contextCompacted: contextCompacted$1,
|
|
84722
84913
|
compactLoading: compactLoading$1,
|
|
84723
84914
|
compactFailed: compactFailed$1,
|
|
84915
|
+
contextHealth: contextHealth$1,
|
|
84724
84916
|
retrying: retrying$1,
|
|
84725
84917
|
noMoreMessages: noMoreMessages$1,
|
|
84726
84918
|
newMessages: newMessages$1,
|
|
@@ -84741,20 +84933,20 @@ const onboarding = { "title": "Bring Your Agents to Life", "description": "One s
|
|
|
84741
84933
|
const channelGuide = { "title": "Bring Your Agents to Life", "description": "Connect an AI model so agents can think and respond", "configure": "Connect AI", "dismiss": "Skip" };
|
|
84742
84934
|
const agentChannelCheck = { "title": "This agent needs a spark", "description": "Connect an AI model before starting a conversation", "configure": "Connect AI", "skip": "Create anyway" };
|
|
84743
84935
|
const welcome = { "description": "Chat with an agent or bring everyone together", "title": "Start a conversation", "subtitle": "Pick a partner from the sidebar to begin", "or": "or", "createGroup": "Bring everyone together" };
|
|
84744
|
-
const settings = /* @__PURE__ */ JSON.parse(`{"title":"Settings","nav":{"app":"App","capabilities":"Capabilities","automation":"Automation","agents":"Agent","connection":"Connectivity"},"tabs":{"llm":"Model Channels","agent":"Agent","skill":"Skills","appearance":"Appearance","remote":"Remote Access","mcp":"MCP Servers","search":"Search Engine","about":"About","integration":"Integration"},"panels":{"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","disconnect":"Disconnect","reconnect":"Reconnect","bind":{"step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group / Topic","targetThreadDesc":"Bot connects to a group topic","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Topic","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","qrTimeout":"QR code scan timed out (5 min), please retry"},"appearance":{"title":"Appearance","description":"Customize theme, language and display preferences"},"channel":{"title":"Model Channels","description":"Manage AI service channels and default models"},"mcp":{"title":"Extension Services","description":"Configure MCP services to extend Agent capabilities"},"skill":{"title":"Skills","description":"Manage skill modules available to Agents"},"search":{"title":"Search","description":"Configure web search engines and default behavior"},"remote":{"title":"Remote Access","description":"Access KAi from your phone browser with an encrypted token"},"agent":{"title":"Agents","description":"Create and manage custom Agents"},"memoryGrowth":{"title":"Memory Growth","description":"Configure how memory updates grow automatically over time"},"scheduler":{"title":"Scheduled Tasks","description":"Create and manage automated tasks on a schedule"},"about":{"title":"About KAi","description":"Multi AI Agent Collaborative Desktop App"},"multimodal":{"title":"Multimodal Capabilities","description":"Configure image, video, and voice capabilities for analysis and generation"}},"channel":{"title":"Model Channels","add":"Add Channel","addTitle":"Add Channel","editTitle":"Edit Channel","name":"Channel Name","namePlaceholder":"e.g. OpenAI, Azure","apiType":"API Type","apiTypeOpenai":"OpenAI Compatible","apiTypeOfficialOpenai":"OpenAI","apiTypeAnthropic":"Anthropic","apiTypeGoogle":"Google Gemini","apiTypeAuto":"Auto Detect","baseUrl":"Base URL","apiKey":"API Key","defaultModel":"Default Model","selectModel":"Select model...","enterUrlAndKey":"Enter Base URL and API Key first","loadingModels":"Loading models...","searchOrType":"Search or type model name…","useCustom":"Custom","isDefault":"Default Channel","setAsDefault":"Set as default channel","default":"Default","setDefault":"Set Default","edit":"Edit","delete":"Delete","confirmDelete":"Delete this channel?","deleteTitle":"Delete Channel","showApiKey":"Show API Key","hideApiKey":"Hide API Key","empty":"No channels yet. Click the button below to create one.","deleted":"Channel deleted","setDefaultDone":"\\"{{name}}\\" is now the default channel","actions":"Actions for {{name}}","confirmDeleteMm":"This channel is used for multimodal image analysis (analyzeImage tool). Deleting it will disable that feature. Delete \\"{{name}}\\"?","tabChannels":"Channels","tabMultimodal":"Multimodal"},"llm":{"title":"LLM Configuration","model":"Model Name","modelPreset":"Model Preset","customModel":"Custom Model","apiKey":"API Key","baseUrl":"Base URL","temperature":"Temperature","maxTokens":"Max Tokens","topP":"Top P","loadingModels":"Loading models...","errors":{"network_error":"Cannot connect to API server. Please check Base URL and network connection","auth_failed":"API Key authentication failed. Please check your key","api_error":"API request failed. Please check server status"}},"remote":{"title":"Remote Access","description":"Enable it to access KAi from your phone browser.\\nAll connections use encrypted token authentication.","on":"On","off":"Off","copyLink":"Copy Link","rotateLink":"Regenerate Link","stopLink":"Stop Remote Access","rotateSuccess":"A new link is ready. The old link is no longer valid.","linkTitle":"Stable access link","linkDescription":"This link is restored automatically on next launch unless you stop it or regenerate it.","restoreMode":"Startup recovery","restoreEnabled":"Auto restore","restoreDisabled":"Do not auto restore","lastGenerated":"Last generated","notGeneratedYet":"Not generated yet","restoreFailedTitle":"Restore failed","status":{"disabled":"Off","enabling":"Starting","enabled":"On","restoring":"Restoring","rotating":"Generating new link","stopping":"Stopping","error":"Restore failed"},"qrCodeAlt":"Remote access QR code","tokenPending":"Waiting for access token...","portValue":"Port: {{port}}","connectionsValue":"Connections: {{current}}/{{max}}","addresses":"Available Addresses","connectedClients":"Connected Devices","errors":{"toggleFailed":"Failed to update remote access status.","copyFailed":"Failed to copy remote access link.","rotateFailed":"Failed to regenerate remote access link."}},"search":{"engines":"Search Engines","builtIn":"Built-in","default":"Default","setDefault":"Set as Default","addCustom":"Add Custom Engine","addEngine":"Add Search Engine","editEngine":"Edit Search Engine","name":"Engine Name","namePlaceholder":"e.g., Google Scholar","urlTemplate":"URL Template","urlTemplateHint":"Use {query} as search keyword placeholder","urlTemplateError":"URL template must contain {query} placeholder","showWindow":"Show Search Window (Debug)","confirmDelete":"Delete this search engine?","deleteTitle":"Delete Search Engine","delete":"Delete"},"language":"Language","appearance":{"theme":"Theme","themeLight":"Light","themeDark":"Dark","themeSystem":"System"},"save":"Save","cancel":"Cancel","saveFailed":"Failed to save settings. Please try again.","saveSuccess":"Saved successfully","mcp":{"title":"MCP Servers","add":"Add Server","addServer":"Add Server","addTitle":"Add Server","editTitle":"Edit Server","empty":"No MCP servers yet","confirmDelete":"Are you sure you want to delete this server?","deleteTitle":"Delete Server","serverName":"Server Name","serverType":"Type","command":"Command","args":"Arguments","url":"WebSocket URL","enabled":"Enabled","testConnection":"Test Connection","connected":"Connected","disconnected":"Disconnected","error":"Connection Error","edit":"Edit","delete":"Delete","typeCommand":"Command","typeStreamableHttp":"Streamable HTTP","typeWebsocket":"WebSocket","toolCount":"Tools","testing":"Testing...","testSuccess":"Connection successful","testFailed":"Connection failed","applyToAgent":"Apply to Agent","appliedToAgents":"Applied to {{count}} Agents","notAppliedToAnyAgent":"Not applied to any Agent","globallyDisabled":"Globally disabled","selectedCount":"{{count}} selected","searchAgent":"Search Agent","noMatchingAgents":"No matching Agents found","drawerDisabledWarning":"This MCP server is globally disabled, Agents cannot use it","filteredCount":"{{count}} Agents found","selectAll":"Select All","clearAll":"Clear All","selectFiltered":"Select shown","clearFiltered":"Clear shown"},"about":{"releaseNotes":"Release Notes","versionCopied":"Copied","autoCheckForUpdates":"Check for updates daily","checkForUpdates":"Check for Updates","checking":"Checking for updates","goDownload":"Download","newVersion":"New version available","updateHighlights":"What’s new","viewFullReleaseNotes":"View full release notes","retry":"Check Again","upToDate":"You’re up to date","updateError":"Failed to check for updates","feedback":{"title":"Feedback","placeholder":"Tell us what’s on your mind...","bug":"Bug","feature":"Feature request","other":"Other","submit":"Submit feedback","showContact":"Leave contact info","contactPlaceholder":"Email or other contact info","success":"Thanks for the feedback!","error":"Submission failed. Please try again later."}},"multimodal":{"saved":"Multimodal configuration saved","saveFailed":"Save failed","saving":"Saving…","noChannels":"No channels available. Add one in Model Channels first.","goToChannels":"Go to Model Channels","tabImageAnalysis":"Image Analysis","tabImageGeneration":"Image Generation","tabVideo":"Video","tabVoice":"Voice","comingSoon":"Coming Soon","badgeOn":"ON","badgeOff":"OFF","analysis":{"title":"Image Analysis","summary":"{channel} · {model} · {size}px","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the analyzeImage tool to recognize and understand images","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","maxImageEdge":"Max Image Long Edge","maxImageEdgeHint":"Auto-scaled when exceeded. Lower = cheaper, higher = more detail","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"generation":{"title":"Image Generation","summary":"{channel} · {model} · {size}","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the generateImage tool to create images from text","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","defaultSize":"Default Size (optional)","modelDefaultSize":"Use model default size","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"fallback":{"title":"Fallback Models","add":"Add Fallback","remove":"Remove","selectChannel":"Select channel","hint":"When the primary model fails, fallback models are tried in order"}},"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","editTarget":"Edit","editTargetTitle":"Change Target","editTargetSuccess":"Target updated","disconnect":"Disconnect","reconnect":"Reconnect","createdAt":"Created {{time}}","bind":{"step0Title":"Choose Platform","stepMethodTitle":"Method","step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group / Topic","targetThreadDesc":"Bot connects to a group topic","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Topic","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","wecomBotDesc":"Connect via WeCom Bot, requires Bot ID and Secret","wechatPersonal":"WeChat","wechatPersonalDesc":"Connect via WeChat Personal Bot (ClawBot), scan QR to login","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","wpQrHint":"Open WeChat and scan the QR code above to login","qrTimeout":"QR code scan timed out (5 min), please retry"}}`);
|
|
84745
|
-
const agent = { "name": "Name", "namePlaceholder": "e.g. Code Assistant", "channel": "Channel", "model": "Model", "description": "Capabilities Description", "descriptionPlaceholder": "Describe the agent's capabilities and purpose...", "temperature": "Temperature", "temperature.description": "Controls randomness (0-2, default 0.7)", "topP": "Top P", "topP.description": "Nucleus sampling threshold (0-1, default 1)", "maxTokens": "Max Tokens", "maxTokens.description": "Maximum output length per response. Leave empty for unlimited.", "maxTokens.unlimited": "Unlimited", "enableThinking": "Enable Thinking", "enableThinking.description": "Enable deep reasoning for more accurate responses (supported by some models)", "notifyOnDegraded": "Notify on channel issues", "notifyOnDegraded.description": "Show alert when channel is slow or unavailable", "autoFallback": "Auto-switch to fallback channel", "autoFallback.description": "Automatically try fallback channels on failure (use with caution)", "optimizeDescription": "AI Optimize Description", "optimizeFailed": "Optimization failed, please try again", "create": "Create Agent", "editTitle": "Edit Agent", "confirmDelete": "Delete this agent?", "deleteTitle": "Delete Agent", "emptyTitle": "No Agents Yet", "emptyDesc": "Create your first Agent to combine models and capabilities into a role", "createFirst": "Create your first Agent", "searchPlaceholder": "Search Agents", "noDescription": "No description", "noResults": 'No agents matching "{{query}}". Press Esc to clear', "discardTitle": "Discard Changes?", "discardMessage": "You have unsaved changes that will be lost if you leave.", "configured": "Configured", "incomplete": "Incomplete", "unconfigured": "Not configured", "noModel": "No model selected", "justNow": "Just now", "minutesAgo": "{{count}} min ago", "hoursAgo": "{{count}}h ago", "daysAgo": "{{count}}d ago", "updatedAt": "Updated {{time}}", "templateCopied": 'Created from "{{name}}" template', "templateSystemPrefix": "You are {{name}}. ", "configure": "Configure Agent", "summarizeConversation": "Summarize This Conversation", "updateMemory": "Update Memory", "writeToMemory": "Write to Memory", "writingMemory": "Writing...", "memoryWritten": "Written", "summarizePrompt": 'Please produce a structured summary of this conversation. Output exactly these four sections: Key Conclusions, Decisions Made, Action Items, Open Questions. If a section is empty, write "None". Do not update any workspace files.', "primary": "Primary", "healthy": "Healthy", "degraded": "Slow", "unhealthy": "Offline", "unknown": "Unknown", "edit": "Edit", "delete": "Delete", "add": "Add", "update": "Update", "advanced": "Advanced", "avatar": { "label": "Agent avatar", "hint": "Click the avatar to upload or remove a custom image" }, "advancedConfig": "Advanced Config", "reasoningEffort": "Reasoning Effort", "reasoningEffortLevels": { "off": "Off", "low": "Low", "medium": "Medium", "high": "High" }, "reasoningEffort.description": "Controls how much reasoning effort the model spends before answering. Higher levels are usually more reliable, but may respond more slowly.", "selected": "selected", "tab": { "basic": "Basic", "identity": "Identity", "model": "Model", "brain": "Model", "capabilities": "Capabilities", "workspace": "Workspace", "memory": "Memory" }, "summary": { "model": "Model", "skills": "Skills", "mcp": "MCP", "thinking": "Thinking" }, "notSelected": "Not selected", "mention": { "placeholder": "Select agent...", "noAgents": "No agents configured", "allDesc": "Notify all members" }, "skill": { "title": "Skills", "empty": "No skills found. Create them manually in ~/.kai/skills/", "back": "Back" }, "mcpServers": { "title": "MCP Servers", "empty": 'No enabled MCP servers. Please configure them in "MCP Servers" settings.', "connected": "Connected", "disconnected": "Disconnected", "tools": " tools" }, "toolLimit": { "title": "Built-in Tool Permissions", "summaryNone": "No restrictions", "summaryCount": "{{count}} disabled", "summaryCountWithCritical": "{{count}} disabled, including critical tool {{tool}}", "groupFile": "Files", "groupSystem": "System", "groupNetwork": "Network", "groupData": "Data", "groupAux": "Auxiliary", "disabled": "Disabled", "hint": "When a tool is disabled, this Agent cannot call that capability at runtime. Be careful with critical tools like readFile, writeFile, editFile, and shell.", "warningCritical": "Critical tool {{tool}} is disabled. The Agent may be unable to {{consequence}}.", "warningNearAll": "Only {{count}} tools remain enabled. The Agent may become barely usable for real tasks.", "warningCriticalTools": { "readFile": "read workspace content", "writeFile": "write files", "editFile": "modify existing files", "shell": "run commands or verify results" }, "toolDesc": { "readFile": "Read local files or directory contents", "writeFile": "Create or overwrite local files", "editFile": "Apply exact text replacements in files", "shell": "Run terminal commands", "webFetch": "Fetch a specific webpage or API response", "webSearch": "Search the web for live information", "sqlQuery": "Run read-only SQL queries", "analyzeImage": "Analyze images or extract text", "skill": "Load and use predefined Skills", "createCronJob": "Create a scheduled task", "listCronJobs": "View scheduled tasks", "updateCronJob": "Update a scheduled task", "deleteCronJob": "Delete a scheduled task" } }, "workspace": { "hide": "Hide", "edit": "Edit", "openDir": "Open Directory" }, "errors": { "duplicateName": "An agent with the same name already exists. Please use a different name.", "nameRequired": "Agent name cannot be empty." }, "initMessage": { "greeting": "Hello! I am your creator.", "instruction": "Please complete your identity files based on the following information:", "name": "Name", "description": "Capabilities", "tasks": "Please complete the following tasks:", "task1": "Read the template content in IDENTITY.md and SOUL.md", "task2": "Design a suitable identity for yourself based on your name and capabilities:", "task2a": "Fill in your name, type, temperament, and Emoji in IDENTITY.md", "task2b": "Adjust your core truths, boundaries, and style in SOUL.md according to your functional positioning", "task3": "After completion, briefly tell me who you are and what you can do", "reminder": "Remember: This is your first conversation and your opportunity to define yourself." } };
|
|
84936
|
+
const settings = /* @__PURE__ */ JSON.parse(`{"title":"Settings","nav":{"app":"App","capabilities":"Capabilities","automation":"Automation","agents":"Agent","connection":"Connectivity"},"tabs":{"llm":"Model Channels","agent":"Agent","skill":"Skills","appearance":"Appearance","remote":"Remote Access","mcp":"MCP Servers","search":"Search Engine","about":"About","integration":"Integration"},"panels":{"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","disconnect":"Disconnect","reconnect":"Reconnect","bind":{"step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group Session","targetThreadDesc":"Bot connects to a group session","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Session","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","qrTimeout":"QR code scan timed out (5 min), please retry"},"appearance":{"title":"Appearance","description":"Customize theme, language and display preferences"},"channel":{"title":"Model Channels","description":"Manage AI service channels and default models"},"mcp":{"title":"Extension Services","description":"Configure MCP services to extend Agent capabilities"},"skill":{"title":"Skills","description":"Manage skill modules available to Agents"},"search":{"title":"Search","description":"Configure web search engines and default behavior"},"remote":{"title":"Remote Access","description":"Access KAi from your phone browser with an encrypted token"},"agent":{"title":"Agents","description":"Create and manage custom Agents"},"memoryGrowth":{"title":"Memory Growth","description":"Configure how memory updates grow automatically over time"},"scheduler":{"title":"Scheduled Tasks","description":"Create and manage automated tasks on a schedule"},"about":{"title":"About KAi","description":"Multi AI Agent Collaborative Desktop App"},"multimodal":{"title":"Multimodal Capabilities","description":"Configure image, video, and voice capabilities for analysis and generation"}},"channel":{"title":"Model Channels","add":"Add Channel","addTitle":"Add Channel","editTitle":"Edit Channel","name":"Channel Name","namePlaceholder":"e.g. OpenAI, Azure","apiType":"API Type","apiTypeOpenai":"OpenAI Compatible","apiTypeOfficialOpenai":"OpenAI","apiTypeAnthropic":"Anthropic","apiTypeGoogle":"Google Gemini","apiTypeAuto":"Auto Detect","baseUrl":"Base URL","apiKey":"API Key","defaultModel":"Default Model","selectModel":"Select model...","enterUrlAndKey":"Enter Base URL and API Key first","loadingModels":"Loading models...","searchOrType":"Search or type model name…","useCustom":"Custom","isDefault":"Default Channel","setAsDefault":"Set as default channel","default":"Default","setDefault":"Set Default","edit":"Edit","delete":"Delete","confirmDelete":"Delete this channel?","deleteTitle":"Delete Channel","showApiKey":"Show API Key","hideApiKey":"Hide API Key","empty":"No channels yet. Click the button below to create one.","deleted":"Channel deleted","setDefaultDone":"\\"{{name}}\\" is now the default channel","actions":"Actions for {{name}}","confirmDeleteMm":"This channel is used for multimodal image analysis (analyzeImage tool). Deleting it will disable that feature. Delete \\"{{name}}\\"?","tabChannels":"Channels","tabMultimodal":"Multimodal"},"llm":{"title":"LLM Configuration","model":"Model Name","modelPreset":"Model Preset","customModel":"Custom Model","apiKey":"API Key","baseUrl":"Base URL","temperature":"Temperature","maxTokens":"Max Tokens","topP":"Top P","loadingModels":"Loading models...","errors":{"network_error":"Cannot connect to API server. Please check Base URL and network connection","auth_failed":"API Key authentication failed. Please check your key","api_error":"API request failed. Please check server status"}},"remote":{"title":"Remote Access","description":"Enable it to access KAi from your phone browser.\\nAll connections use encrypted token authentication.","on":"On","off":"Off","copyLink":"Copy Link","rotateLink":"Regenerate Link","stopLink":"Stop Remote Access","rotateSuccess":"A new link is ready. The old link is no longer valid.","linkTitle":"Stable access link","linkDescription":"This link is restored automatically on next launch unless you stop it or regenerate it.","restoreMode":"Startup recovery","restoreEnabled":"Auto restore","restoreDisabled":"Do not auto restore","lastGenerated":"Last generated","notGeneratedYet":"Not generated yet","restoreFailedTitle":"Restore failed","status":{"disabled":"Off","enabling":"Starting","enabled":"On","restoring":"Restoring","rotating":"Generating new link","stopping":"Stopping","error":"Restore failed"},"qrCodeAlt":"Remote access QR code","tokenPending":"Waiting for access token...","portValue":"Port: {{port}}","connectionsValue":"Connections: {{current}}/{{max}}","addresses":"Available Addresses","connectedClients":"Connected Devices","errors":{"toggleFailed":"Failed to update remote access status.","copyFailed":"Failed to copy remote access link.","rotateFailed":"Failed to regenerate remote access link."}},"search":{"engines":"Search Engines","builtIn":"Built-in","default":"Default","setDefault":"Set as Default","addCustom":"Add Custom Engine","addEngine":"Add Search Engine","editEngine":"Edit Search Engine","name":"Engine Name","namePlaceholder":"e.g., Google Scholar","urlTemplate":"URL Template","urlTemplateHint":"Use {query} as search keyword placeholder","urlTemplateError":"URL template must contain {query} placeholder","showWindow":"Show Search Window (Debug)","confirmDelete":"Delete this search engine?","deleteTitle":"Delete Search Engine","delete":"Delete"},"language":"Language","appearance":{"theme":"Theme","themeLight":"Light","themeDark":"Dark","themeSystem":"System"},"save":"Save","cancel":"Cancel","saveFailed":"Failed to save settings. Please try again.","saveSuccess":"Saved successfully","mcp":{"title":"MCP Servers","add":"Add Server","addServer":"Add Server","addTitle":"Add Server","editTitle":"Edit Server","empty":"No MCP servers yet","confirmDelete":"Are you sure you want to delete this server?","deleteTitle":"Delete Server","serverName":"Server Name","serverType":"Type","command":"Command","args":"Arguments","url":"WebSocket URL","enabled":"Enabled","testConnection":"Test Connection","connected":"Connected","disconnected":"Disconnected","error":"Connection Error","edit":"Edit","delete":"Delete","typeStdio":"Stdio","typeCommand":"Command","typeStreamableHttp":"Streamable HTTP","typeWebsocket":"WebSocket","toolCount":"Tools","testing":"Testing...","testSuccess":"Connection successful","testFailed":"Connection failed","applyToAgent":"Apply to Agent","appliedToAgents":"Applied to {{count}} Agents","notAppliedToAnyAgent":"Not applied to any Agent","globallyDisabled":"Globally disabled","selectedCount":"{{count}} selected","searchAgent":"Search Agent","noMatchingAgents":"No matching Agents found","drawerDisabledWarning":"This MCP server is globally disabled, Agents cannot use it","filteredCount":"{{count}} Agents found","selectAll":"Select All","clearAll":"Clear All","selectFiltered":"Select shown","clearFiltered":"Clear shown"},"about":{"releaseNotes":"Release Notes","versionCopied":"Copied","autoCheckForUpdates":"Check for updates daily","checkForUpdates":"Check for Updates","checking":"Checking for updates","goDownload":"Download","newVersion":"New version available","updateHighlights":"What’s new","viewFullReleaseNotes":"View full release notes","retry":"Check Again","upToDate":"You’re up to date","updateError":"Failed to check for updates","feedback":{"title":"Feedback","placeholder":"Tell us what’s on your mind...","bug":"Bug","feature":"Feature request","other":"Other","submit":"Submit feedback","showContact":"Leave contact info","contactPlaceholder":"Email or other contact info","success":"Thanks for the feedback!","error":"Submission failed. Please try again later."}},"multimodal":{"saved":"Multimodal configuration saved","saveFailed":"Save failed","saving":"Saving…","noChannels":"No channels available. Add one in Model Channels first.","goToChannels":"Go to Model Channels","tabImageAnalysis":"Image Analysis","tabImageGeneration":"Image Generation","tabVideo":"Video","tabVoice":"Voice","comingSoon":"Coming Soon","badgeOn":"ON","badgeOff":"OFF","analysis":{"title":"Image Analysis","summary":"{channel} · {model} · {size}px","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the analyzeImage tool to recognize and understand images","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","maxImageEdge":"Max Image Long Edge","maxImageEdgeHint":"Auto-scaled when exceeded. Lower = cheaper, higher = more detail","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"generation":{"title":"Image Generation","summary":"{channel} · {model} · {size}","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the generateImage tool to create images from text","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","defaultSize":"Default Size (optional)","modelDefaultSize":"Use model default size","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"fallback":{"title":"Fallback Models","add":"Add Fallback","remove":"Remove","selectChannel":"Select channel","hint":"When the primary model fails, fallback models are tried in order"}},"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","editTarget":"Edit","editTargetTitle":"Change Target","editTargetSuccess":"Target updated","disconnect":"Disconnect","reconnect":"Reconnect","createdAt":"Created {{time}}","bind":{"step0Title":"Choose Platform","stepMethodTitle":"Method","step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group Session","targetThreadDesc":"Bot connects to a group session","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Session","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","wecomBotDesc":"Connect via WeCom Bot, requires Bot ID and Secret","wechatPersonal":"WeChat","wechatPersonalDesc":"Connect via WeChat Personal Bot (ClawBot), scan QR to login","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","wpQrHint":"Open WeChat and scan the QR code above to login","qrTimeout":"QR code scan timed out (5 min), please retry"}}`);
|
|
84937
|
+
const agent = { "name": "Name", "namePlaceholder": "e.g. Code Assistant", "channel": "Channel", "model": "Model", "description": "Capabilities Description", "descriptionPlaceholder": "Describe the agent's capabilities and purpose...", "temperature": "Temperature", "temperature.description": "Controls randomness (0-2, default 0.7)", "topP": "Top P", "topP.description": "Nucleus sampling threshold (0-1, default 1)", "maxTokens": "Max Tokens", "maxTokens.description": "Maximum output length per response. Leave empty for unlimited.", "maxTokens.unlimited": "Unlimited", "enableThinking": "Enable Thinking", "enableThinking.description": "Enable deep reasoning for more accurate responses (supported by some models)", "notifyOnDegraded": "Notify on channel issues", "notifyOnDegraded.description": "Show alert when channel is slow or unavailable", "autoFallback": "Auto-switch to fallback channel", "autoFallback.description": "Automatically try fallback channels on failure (use with caution)", "optimizeDescription": "AI Optimize Description", "optimizeFailed": "Optimization failed, please try again", "create": "Create Agent", "editTitle": "Edit Agent", "confirmDelete": "Delete this agent?", "deleteTitle": "Delete Agent", "emptyTitle": "No Agents Yet", "emptyDesc": "Create your first Agent to combine models and capabilities into a role", "createFirst": "Create your first Agent", "searchPlaceholder": "Search Agents", "noDescription": "No description", "noResults": 'No agents matching "{{query}}". Press Esc to clear', "discardTitle": "Discard Changes?", "discardMessage": "You have unsaved changes that will be lost if you leave.", "configured": "Configured", "incomplete": "Incomplete", "unconfigured": "Not configured", "noModel": "No model selected", "justNow": "Just now", "minutesAgo": "{{count}} min ago", "hoursAgo": "{{count}}h ago", "daysAgo": "{{count}}d ago", "updatedAt": "Updated {{time}}", "templateCopied": 'Created from "{{name}}" template', "templateSystemPrefix": "You are {{name}}. ", "configure": "Configure Agent", "summarizeConversation": "Summarize This Conversation", "updateMemory": "Update Memory", "writeToMemory": "Write to Memory", "writingMemory": "Writing...", "memoryWritten": "Written", "summarizePrompt": 'Please produce a structured summary of this conversation. Output exactly these four sections: Key Conclusions, Decisions Made, Action Items, Open Questions. If a section is empty, write "None". Do not update any workspace files.', "primary": "Primary", "healthy": "Healthy", "degraded": "Slow", "unhealthy": "Offline", "unknown": "Unknown", "edit": "Edit", "delete": "Delete", "add": "Add", "update": "Update", "advanced": "Advanced", "avatar": { "label": "Agent avatar", "hint": "Click the avatar to upload or remove a custom image" }, "advancedConfig": "Advanced Config", "reasoningEffort": "Reasoning Effort", "reasoningEffortLevels": { "off": "Off", "low": "Low", "medium": "Medium", "high": "High" }, "reasoningEffort.description": "Controls how much reasoning effort the model spends before answering. Higher levels are usually more reliable, but may respond more slowly.", "selected": "selected", "tab": { "basic": "Basic", "identity": "Identity", "model": "Model", "brain": "Model", "capabilities": "Capabilities", "workspace": "Workspace", "memory": "Memory" }, "summary": { "model": "Model", "skills": "Skills", "mcp": "MCP", "thinking": "Thinking" }, "notSelected": "Not selected", "mention": { "placeholder": "Select agent...", "noAgents": "No agents configured", "allDesc": "Notify all members" }, "skill": { "title": "Skills", "empty": "No skills found. Create them manually in ~/.kai/skills/", "back": "Back" }, "mcpServers": { "title": "MCP Servers", "empty": 'No enabled MCP servers. Please configure them in "MCP Servers" settings.', "connected": "Connected", "disconnected": "Disconnected", "tools": " tools" }, "toolLimit": { "title": "Built-in Tool Permissions", "summaryNone": "No restrictions", "summaryCount": "{{count}} disabled", "summaryCountWithCritical": "{{count}} disabled, including critical tool {{tool}}", "groupFile": "Files", "groupSystem": "System", "groupNetwork": "Network", "groupData": "Data", "groupAux": "Auxiliary", "disabled": "Disabled", "hint": "When a tool is disabled, this Agent cannot call that capability at runtime. Be careful with critical tools like readFile, writeFile, editFile, and shell.", "warningCritical": "Critical tool {{tool}} is disabled. The Agent may be unable to {{consequence}}.", "warningNearAll": "Only {{count}} tools remain enabled. The Agent may become barely usable for real tasks.", "warningCriticalTools": { "readFile": "read workspace content", "writeFile": "write files", "editFile": "modify existing files", "shell": "run commands or verify results" }, "toolDesc": { "readFile": "Read local files or directory contents", "writeFile": "Create or overwrite local files", "editFile": "Apply exact text replacements in files", "shell": "Run terminal commands", "webFetch": "Fetch a specific webpage or API response", "webSearch": "Search the web for live information", "sqlQuery": "Run read-only SQL queries", "analyzeImage": "Analyze images or extract text", "generateImage": "Generate images from text prompts", "skill": "Load and use predefined Skills", "createCronJob": "Create a scheduled task", "listCronJobs": "View scheduled tasks", "updateCronJob": "Update a scheduled task", "deleteCronJob": "Delete a scheduled task" } }, "workspace": { "hide": "Hide", "edit": "Edit", "openDir": "Open Directory" }, "errors": { "duplicateName": "An agent with the same name already exists. Please use a different name.", "nameRequired": "Agent name cannot be empty." }, "initMessage": { "greeting": "Hello! I am your creator.", "instruction": "Please complete your identity files based on the following information:", "name": "Name", "description": "Capabilities", "tasks": "Please complete the following tasks:", "task1": "Read the template content in IDENTITY.md and SOUL.md", "task2": "Design a suitable identity for yourself based on your name and capabilities:", "task2a": "Fill in your name, type, temperament, and Emoji in IDENTITY.md", "task2b": "Adjust your core truths, boundaries, and style in SOUL.md according to your functional positioning", "task3": "After completion, briefly tell me who you are and what you can do", "reminder": "Remember: This is your first conversation and your opportunity to define yourself." } };
|
|
84746
84938
|
const skill = { "title": "Skills", "empty": "No Skills available", "add": "Add Skill", "edit": "Edit", "delete": "Delete", "back": "Back", "name": "Skill Name", "namePlaceholder": "e.g. pdf-processing", "description": "Description", "descriptionPlaceholder": "Briefly describe what this skill does", "content": "Content (Markdown)", "contentPlaceholder": "Write detailed instructions for this skill in Markdown...", "deleteConfirm": "Delete this skill?", "nameInvalid": "Name must contain only lowercase letters, numbers, and hyphens, must not start or end with a hyphen, no consecutive hyphens, max 64 characters", "selectTitle": "Select Skills", "permissionHint": "Choose which Skills this agent can use. No Skills selected = no Skill access.", "noSkills": "No available Skills", "noSkillsSelected": "No Skills selected", "manageSkills": "Manage", "searchPlaceholder": "Search Skill", "noMatchingSkills": "No matching Skills found", "selectedCount": "{{count}} selected", "done": "Done", "remove": "Remove", "notAppliedToAnyAgent": "Not applied to any Agent", "appliedToAgents": "Applied to {{count}} Agents", "globallyDisabled": "Globally disabled", "applyToAgent": "Apply to Agent", "searchAgent": "Search Agent", "noMatchingAgents": "No matching Agents found", "drawerDisabledWarning": "This Skill is globally disabled, Agents cannot use it", "filteredCount": "{{count}} Agents found", "selectAll": "Select All", "clearAll": "Clear All" };
|
|
84747
84939
|
const session = { "openDir": "Open Directory" };
|
|
84748
84940
|
const error$5 = { "network": "Network error. Please check your connection.", "rate_limit": "Rate limit exceeded. Please try again later.", "api_error": "API error. Please check your settings.", "unknown": "An error occurred. Please try again.", "retry": "Retry", "boundary": { "title": "Something went wrong", "message": "The application encountered an error", "reload": "Reload", "report": "Report Issue", "copyError": "Copy Error", "errorCopied": "Copied" }, "descriptionRequired": "Description cannot be empty", "noDefaultChannel": "Default LLM channel not configured", "channelNeedsBaseUrl": "Channel must configure baseUrl", "agentNotInConversation": "Agent {{agentId}} not in current conversation", "contentTooLong": "Content exceeds 3000 character limit", "tooManyConcurrentSearches": "Too many concurrent searches. Please wait and try again.", "invalidUrl": "Invalid or unsafe URL", "noCustomEngines": "No custom engines found", "commandRequired": "Command is required for command-based MCP server", "clientNotConnected": "Client not connected", "agentExecutionNotImplemented": "Agent execution not implemented yet", "agentIdRequired": "Missing agentId for agent_review task", "invalidCiphertext": "Invalid ciphertext format: expected 3 parts", "emptySummary": "Empty summary response" };
|
|
84749
84941
|
const network = { "offline": "No internet connection" };
|
|
84750
|
-
const message$2 = { "copy": "Copy", "copied": "Copied", "edit": "Edit", "regenerate": "Regenerate", "delete": "Delete", "confirmDelete": "Delete this message and all messages after it?", "contextCleared": "Context Cleared", "contextCompacted": "Context compacted", "imageLoadFailed": "Image load failed", "openImageViewerHint": "Click to open image viewer", "imageViewerHint": "Double-click to toggle size, Ctrl/⌘ + wheel to zoom, Esc to close", "imageLoadError": "Failed to load image", "copyImage": "Copy image", "imageCopied": "Image copied", "imageCopyFailed": "Failed to copy image", "closeImageViewer": "Close image viewer", "zoomInImage": "Zoom in (+)", "zoomOutImage": "Zoom out (-)", "resetImageZoom": "Fit to window", "switchToCode": "Switch to code", "switchToPreview": "Switch to preview", "preview": "Preview", "previewHtml": "Preview HTML", "htmlPreviewTitle": "HTML Preview", "error": { "network": "Network Error", "rate_limit": "Rate Limit", "api_error": "API Error", "unknown": "Unknown Error" }, "errorMessage": { "network": "There was a network problem. Please check your connection and try again.", "rateLimit": "The system is busy right now. Please try again in a moment.", "rateLimitConcurrency": "The system is busy handling too many requests at once. Please try again in a moment.", "apiError": "The model service is temporarily unavailable. Please try again later.", "unknown": "Something went wrong. Please try again later." }, "fallback": { "transition": "Current model is busy. Switching to a fallback model…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "busy", "timeout": "timed out", "apiError": "temporarily unavailable", "contextOverflow": "context too long", "unknown": "unknown reason" } }, "handoff": "Collaboration Handoff", "broadcast": "Shared Consultation", "expand": "Expand", "collapse": "Collapse", "lines": "lines", "userMessage": "User message", "agentMessage": "{{name}} reply", "generating": "Generating", "sending": "Sending", "waiting": "Waiting", "sendFailed": "Send failed", "retrySend": "Retry", "recall": "Recall", "tokenUsage": "Input: {{input}} | Output: {{output}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "{{completed}}/{{total}} completed", "broadcastStatusPending": "Pending", "broadcastStatusThinking": "Thinking", "broadcastStatusStreaming": "Streaming", "broadcastStatusDone": "Done", "broadcastStatusFailed": "Failed", "broadcastWaiting": "Waiting for response…", "broadcastNoContent": "No content", "broadcastFailed": "Response failed", "broadcastComplete": "Shared consultation finished", "broadcastAllReplied": "Everyone replied", "taskAssign": "Collaboration task started", "taskAssignedTo": "Assigned to {{name}}", "taskDetail": "View execution", "taskDetailCollapse": "Hide execution", "taskEmpty": "No execution content", "taskQueued": "Queued", "taskRunning": "In progress", "taskCompleted": "Completed", "taskFailed": "Execution failed", "taskKilled": "Ended", "taskBackgroundQueued": "Queued in background", "taskBackgroundRunning": "Running in background", "taskBackgroundCompleted": "Background complete", "taskBackgroundFailed": "Background failed", "taskBackgroundKilled": "Background ended", "broadcastWaitingMembers": "Waiting on {{count}} more member(s)" };
|
|
84942
|
+
const message$2 = { "copy": "Copy", "copied": "Copied", "errorDetails": "Error Details", "edit": "Edit", "regenerate": "Regenerate", "delete": "Delete", "confirmDelete": "Delete this message and all messages after it?", "contextCleared": "Context Cleared", "contextCompacted": "Context compacted", "imageLoadFailed": "Image load failed", "openImageViewerHint": "Click to open image viewer", "imageViewerHint": "Double-click to toggle size, Ctrl/⌘ + wheel to zoom, Esc to close", "imageLoadError": "Failed to load image", "copyImage": "Copy image", "imageCopied": "Image copied", "imageCopyFailed": "Failed to copy image", "closeImageViewer": "Close image viewer", "zoomInImage": "Zoom in (+)", "zoomOutImage": "Zoom out (-)", "resetImageZoom": "Fit to window", "switchToCode": "Switch to code", "switchToPreview": "Switch to preview", "preview": "Preview", "previewHtml": "Preview HTML", "htmlPreviewTitle": "HTML Preview", "error": { "network": "Network Error", "rate_limit": "Rate Limit", "api_error": "API Error", "unknown": "Unknown Error" }, "errorMessage": { "network": "There was a network problem. Please check your connection and try again.", "rateLimit": "The system is busy right now. Please try again in a moment.", "rateLimitConcurrency": "The system is busy handling too many requests at once. Please try again in a moment.", "apiError": "The model service is temporarily unavailable. Please try again later.", "unknown": "Something went wrong. Please try again later." }, "fallback": { "transition": "Current model is busy. Switching to a fallback model…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "busy", "timeout": "timed out", "apiError": "temporarily unavailable", "contextOverflow": "context too long", "unknown": "unknown reason" } }, "handoff": "Collaboration Handoff", "broadcast": "Shared Consultation", "expand": "Expand", "collapse": "Collapse", "lines": "lines", "userMessage": "User message", "agentMessage": "{{name}} reply", "generating": "Generating", "sending": "Sending", "waiting": "Waiting", "sendFailed": "Send failed", "retrySend": "Retry", "recall": "Recall", "tokenUsage": "Input: {{input}} | Output: {{output}}", "tokenUsageWithCache": "Input: {{input}} | Output: {{output}} | Cache hit: {{cached}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "{{completed}}/{{total}} completed", "broadcastStatusPending": "Pending", "broadcastStatusThinking": "Thinking", "broadcastStatusStreaming": "Streaming", "broadcastStatusDone": "Done", "broadcastStatusFailed": "Failed", "broadcastWaiting": "Waiting for response…", "broadcastNoContent": "No content", "broadcastFailed": "Response failed", "broadcastComplete": "Shared consultation finished", "broadcastAllReplied": "Everyone replied", "taskAssign": "Collaboration task started", "taskAssignedTo": "Assigned to {{name}}", "taskDetail": "View execution", "taskDetailCollapse": "Hide execution", "taskEmpty": "No execution content", "taskQueued": "Queued", "taskRunning": "In progress", "taskCompleted": "Completed", "taskFailed": "Execution failed", "taskKilled": "Ended", "taskBackgroundQueued": "Queued in background", "taskBackgroundRunning": "Running in background", "taskBackgroundCompleted": "Background complete", "taskBackgroundFailed": "Background failed", "taskBackgroundKilled": "Background ended", "broadcastWaitingMembers": "Waiting on {{count}} more member(s)" };
|
|
84751
84943
|
const channel = { "primary": "Primary", "healthy": "Healthy", "degraded": "Slow", "unhealthy": "Offline", "unknown": "Unknown", "switch": "Switch to {{name}}", "slow": "Response is slow", "error": "Connection error", "viewStatus": "View channel status", "alertDegraded": "{{channel}} is slow", "alertUnhealthy": "{{channel}} is unavailable", "unknownChannel": "Unknown channel", "fallback": "Fallback Models", "fallbackSummary": "{{count}} configured", "fallbackEmpty": "No fallback models configured", "addFallback": "Add fallback channel" };
|
|
84752
84944
|
const thread = { "tabs": { "label": "Threads", "newThread": "New thread", "streaming": "Replying…", "completed": "Reply completed", "paused": "Paused", "archive": "Archive thread", "renameHint": "Double-click to rename" }, "context": { "discussion": "Discussion" }, "createTitle": "New Discussion", "createSubtitle": 'Create a new discussion in "{{groupName}}"', "members": "Participants:", "memberCount": "{{count}} members will join", "memberCountShort": "{{count}} members will join", "titlePlaceholder": "Discussion topic (required)", "titleTooLong": "Title must not exceed 100 characters", "createHint": "Group members will automatically join this discussion. Send the first message to begin.", "create": "Create", "inGroup": 'A discussion in "{{groupName}}"', "sendFirst": "Send your first message to start the discussion", "placeholder": { "default": 'Discuss with {{speaker}} in "{{group}}"…', "thread": "Discuss {{title}} with {{speaker}}…" }, "badge": { "tooltip": "{{count}} active discussions" }, "archiveToast": "Discussion archived", "archiveUndo": "Undo", "archiveConfirm": "Archive this discussion?", "archiveTitle": "Archive Discussion" };
|
|
84753
84945
|
const mention = { "allDesc": "Notify all members" };
|
|
84754
84946
|
const chat = { "members": "Members", "active": "{{count}} responding", "moreMembers": "more", "untitled": "Untitled Chat", "noMoreMessages": "No more messages", "newMessages": "New messages", "scrollToBottom": "Scroll to bottom", "loadMore": "Load More Messages", "noMessages": "No messages yet", "agentThinking": "{{name}} is thinking…", "agentSpeaking": "{{name}} is replying…", "thinking": "thinking", "replying": "replying", "handoffTo": "handoff to", "groupReady": "Group is ready", "groupReadyHint": "Start with a question, goal, or to-do item" };
|
|
84755
84947
|
const supervisor = { "evaluating": "{{name}} is evaluating… (round {{current}}/{{max}})", "evaluatingShort": "{{name}} is evaluating", "improving": "{{name}} is improving based on feedback… (round {{current}}/{{max}})", "improvingShort": "{{name}} is improving", "completed": "{{name}} confirmed goal met ({{rounds}} rounds)", "completedShort": "{{name}} confirmed goal met", "ended": "Supervision ended ({{rounds}} rounds)", "endedShort": "Ended", "endedWithReason": "Supervision ended ({{rounds}} rounds): {{reason}}", "roundLabel": "Round {{current}}/{{max}} review", "roundPassed": "Passed", "roundNotPassed": "Not passed", "roundNotPassedFeedback": "Not passed: {{feedback}}", "viewRounds": "View evaluation details", "hideRounds": "Hide evaluation details", "viewReview": "View evaluation process", "hideReview": "Hide evaluation process", "reviewProcessTitle": "Evaluation process", "resultTitle": "Evaluation result", "resultStatus": "Result", "feedbackTitle": "Feedback", "nextTaskTitle": "Next step", "taskKey": { "eval_first": "Review execution result", "eval_improve": "Review improvement result", "improve_from_feedback": "Improve based on feedback", "noEvaluateTool": "Evaluate tool not called" }, "reasonKey": { "max_iterations_reached": "Maximum iterations reached", "supervisor.noEvaluateTool": "Evaluate tool not called" } };
|
|
84756
|
-
const command = { "clearDescription": "Clear context for future replies", "compactDescription": "
|
|
84757
|
-
const quickReply = { "title": "Quick Replies", "add": "Add quick reply", "addTitle": "Add Quick Reply", "editTitle": "Edit Quick Reply", "emptyTitle": "No quick replies yet", "emptyDescription": "Save common phrases and
|
|
84948
|
+
const command = { "clearDescription": "Clear context for future replies", "compactDescription": "Compress this conversation context; add notes to preserve key points", "quickReplyDescription": "Open quick replies" };
|
|
84949
|
+
const quickReply = { "title": "Quick Replies", "add": "Add quick reply", "addTitle": "Add Quick Reply", "editTitle": "Edit Quick Reply", "emptyTitle": "No quick replies yet", "emptyDescription": "Save common phrases and send them next time.", "addFirst": "Add first one", "titleLabel": "Title, optional", "titlePlaceholder": "For example: Review this change", "contentLabel": "Content", "contentPlaceholder": "Enter reusable text", "selectHint": "Select", "insertHint": "Insert", "sendHint": "Send", "moreActions": "More actions", "manage": "Manage", "delete": "Delete", "deleted": "Quick reply deleted", "undo": "Undo", "loadFailed": "Failed to load quick replies", "saveFailed": "Failed to save quick reply", "editorHint": "Enter for newline · Cmd/Ctrl + Enter to save · Esc back to list" };
|
|
84758
84950
|
const tool = { "executing": "Executing", "success": "Success", "error": "Error", "arguments": "Arguments", "result": "Result", "expand": "Expand", "collapse": "Collapse", "viewChanges": "View Changes", "viewDetails": "View Details", "changes": "Changes" };
|
|
84759
84951
|
const reasoning = { "title": "Thinking" };
|
|
84760
84952
|
const common = { "loading": "Loading...", "create": "Create", "save": "Save", "saving": "Saving...", "cancel": "Cancel", "close": "Close", "back": "Back", "confirm": "Confirm", "openMenu": "Open menu", "expand": "Expand", "collapse": "Collapse", "unsavedChanges": "You have unsaved changes. Leave anyway?", "edit": "Edit" };
|
|
@@ -84768,18 +84960,19 @@ const memoryConsolidationSkipped = "Memory consolidation skipped";
|
|
|
84768
84960
|
const contextCleared = "Context cleared";
|
|
84769
84961
|
const contextCompacted = "Context compacted";
|
|
84770
84962
|
const compactLoading = "Compacting context...";
|
|
84771
|
-
const compactFailed = "
|
|
84963
|
+
const compactFailed = "Compaction failed";
|
|
84964
|
+
const contextHealth = { "title": "Context Health", "failed": "Compaction failed", "compacting": "Compacting", "compacted": "Compacted", "reasonProactive": "Proactive compaction", "reasonStepBoundary": "Step-boundary compaction", "reasonReactive": "Overflow repair", "reasonManual": "Manual compaction", "statusRowCompleted": "Context compacted · {{reason}} · {{before}} → {{after}}", "statusRowFailed": "Context compaction failed · Consider starting a new Session", "currentUsage": "Current estimate: {{current}} / {{limit}}", "thresholdRatio": "Compaction threshold: {{percent}}", "lastCompaction": "Last compaction: {{value}}", "lastResult": "Last result: {{value}}", "totalCompactions": "Total compactions: {{count}}", "targetLimit": "Target limit: {{value}}" };
|
|
84772
84965
|
const retrying = "Retrying... {{attempt}}/{{maxAttempts}}";
|
|
84773
84966
|
const noMoreMessages = "No more messages";
|
|
84774
84967
|
const newMessages = "New messages";
|
|
84775
84968
|
const scrollToBottom = "Scroll to bottom";
|
|
84776
84969
|
const time = { "yesterday": "Yesterday", "monday": "Mon", "tuesday": "Tue", "wednesday": "Wed", "thursday": "Thu", "friday": "Fri", "saturday": "Sat", "sunday": "Sun" };
|
|
84777
84970
|
const scheduler = { "title": "Scheduled Tasks", "createTask": "Create Task", "editTask": "Edit Task", "taskName": "Task Name", "taskType": "Task Type", "cronExpression": "Cron Expression", "enabled": "Enabled", "disabled": "Disabled", "agentConversation": "Agent Conversation", "conversation": "Conversation", "agent": "Agent", "group": "Group", "message": "Message", "lastRunAt": "Last Run", "nextRunAt": "Next Run", "never": "Never", "actions": "Actions", "edit": "Edit", "delete": "Delete", "toggle": "Toggle", "executions": "Execution History", "status": "Status", "running": "Running", "success": "Success", "failed": "Failed", "output": "Output", "error": "Error", "startedAt": "Started At", "completedAt": "Completed At", "duration": "Duration", "noExecutions": "No execution records", "noTasks": "No scheduled tasks", "createFirst": "Create your first scheduled task", "deleteConfirm": "Are you sure you want to delete this task?", "deleteTitle": "Delete Task", "cronHelp": "e.g., 0 9 * * * (daily at 9am)", "selectConversation": "Select Conversation", "selectAgent": "Select Agent", "enterMessage": "Enter message content", "noConversations": "No conversations", "createTaskFailed": "Failed to create task: ", "updateTaskFailed": "Failed to update task: ", "deletedConversation": "Deleted Conversation", "conversationDeletedWarning": "The conversation associated with this task has been deleted. Please select a new conversation.", "review": "Nightly Memory Consolidation", "allAgents": "All Agents", "reviewing": "Updating memory", "singleConversations": "Single Conversations", "groupConversations": "Group Conversations", "cronPresets": { "everyHour": "Every hour", "everyDay9am": "Every day at 9 AM", "everyWeekday9am": "Weekdays at 9 AM", "everyMonday9am": "Every Monday at 9 AM", "custom": "Custom" } };
|
|
84778
|
-
const memoryGrowth = { "title": "Memory Growth", "nightly": { "title": "Nightly organization", "description": "
|
|
84971
|
+
const memoryGrowth = { "title": "Memory Growth", "nightly": { "title": "Nightly organization", "description": "Consolidate long-term memory at a fixed time every day. This may update Agent or Group memory files; it will not clear or compress the current chat.", "timeLabel": "Run time", "scopeLabel": "Scope", "scopeAll": "All Agents", "scopeAgent": "Specific Agent", "scopeGroup": "Specific Group", "scopeAgentValue": "Specific Agent · {{agentName}}", "agentLabel": "Agent", "selectAgent": "Select an agent", "selectAgentFirst": "Select an agent first", "groupLabel": "Group", "selectGroup": "Select a group", "selectGroupFirst": "Select a group first", "saved": "Nightly organization updated", "runNow": "Run update now", "runNowDone": "Memory update finished: {{succeeded}}/{{total}} agents succeeded", "runNowFailed": "Memory update failed", "runningProgress": "Updating memory", "nextMode": "Automatic mode", "enabledAt": "Enabled · runs daily at {{time}}", "disabled": "Disabled", "lastRun": "Last run", "neverRun": "Never run", "memoryFiles": "Memory files", "topicFiles": "Topic file entries", "topicFilesDescription": "These details were moved into topic files; long-term memory keeps only the summary and entry points.", "noRecentFiles": "No recent file changes", "openMemoryDir": "Open memory directory", "openMemoryDirHint": "Select an agent first to open that agent's memory directory.", "openMemoryDirUnavailable": "No agent selected. Cannot open memory directory.", "recentExecutions": "Recent organization records", "noExecutions": "No execution history yet", "unknownTime": "Unknown time", "executionRunning": "Memory update is running", "executionFailed": "Execution failed", "executionFinished": "Execution finished", "executionSummary": "Recorded result: {{succeeded}}/{{total}} agents succeeded", "executionSummaryCompact": "{{succeeded}}/{{total}} agents", "groupExecutionSummary": "Group {{groupName}}: {{changedFiles}} files changed", "groupExecutionSummaryCompact": "{{changedFiles}} files", "noChanges": "No new content", "candidates": "Candidate results", "candidateDisposition": { "promoted": "Promoted", "duplicate": "Duplicate", "deferred": "Deferred", "skipped": "Skipped" }, "candidateSource": { "direct": "Conversation", "group": "Group digest" }, "candidateTarget": { "memory": "Long-term memory", "user": "User profile", "group": "Group memory", "tools": "Tool config", "topic": "Topic file", "dailyOnly": "Daily record" }, "budgetStatus": "Long-term memory budget", "budget": { "healthy": "Healthy", "warning": "Near limit", "over": "Over limit" }, "budgetPolicy": { "conservative": "Conservative promotion", "overBudget": "Over-budget protection" }, "enableConfirmTitle": "Enable nightly organization?", "enableConfirmMessage": "After enabling it, the system will automatically organize the Agent's memory files every day at the specified time.\n\nYou can turn it off at any time and review the detailed record of each run.", "enableConfirmAction": "Enable", "executionStatus": { "running": "Running", "success": "Success", "failed": "Failed", "no-changes": "No changes" }, "autoTitle": "Auto Update", "autoEnableConfirmTitle": "Enable Auto Update?", "autoEnableConfirmMessage": "Once enabled, the system will automatically update agent memory files at the specified time each day.\n\nYou can disable it anytime and view detailed execution history.", "sources": "Sources", "sourcesEmpty": "No sources available", "sourceDirect": "{{count}} sessions · {{messages}} messages", "sourceGroupDigest": "{{count}} group digests" } };
|
|
84779
84972
|
const clear = { "confirmTitle": "Clear context?", "confirmDesc": "Messages in this conversation will stay. Only the context used for future replies will be cleared.", "confirmBtn": "Clear" };
|
|
84780
84973
|
const filePreview = { "source": "Source", "preview": "Preview", "nonTextTitle": "Non-text file", "nonTextDesc": "This file cannot be previewed as text.", "openWithSystem": "Open with system app", "loadError": "Failed to load", "tooLargeTitle": "File too large", "tooLargeDesc": "File size {{size}} exceeds preview limit. Please open with system app.", "showInFolder": "Show in Folder", "download": "Download", "close": "Close" };
|
|
84781
84974
|
const cancel = "Cancel";
|
|
84782
|
-
const contextSuggestion = { "title": "
|
|
84975
|
+
const contextSuggestion = { "title": "Consider compacting context", "description": "This session is getting long. Compacting keeps the key points so future replies stay coherent. Your chat history won't be deleted.", "accept": "Compact context", "dismiss": "Don't suggest again for this session", "remindLater": "Remind me later", "close": "Close", "running": "Tidying up this session…", "completed": "Session tidied up. Future replies will use the key points from the summary.", "failed": "Could not tidy up this session. Try again later." };
|
|
84783
84976
|
const en = {
|
|
84784
84977
|
header: header$a,
|
|
84785
84978
|
input: input$4,
|
|
@@ -84817,6 +85010,7 @@ const en = {
|
|
|
84817
85010
|
contextCompacted,
|
|
84818
85011
|
compactLoading,
|
|
84819
85012
|
compactFailed,
|
|
85013
|
+
contextHealth,
|
|
84820
85014
|
retrying,
|
|
84821
85015
|
noMoreMessages,
|
|
84822
85016
|
newMessages,
|
|
@@ -88090,7 +88284,6 @@ function AgentSummaryBar({
|
|
|
88090
88284
|
model,
|
|
88091
88285
|
skillCount,
|
|
88092
88286
|
mcpCount,
|
|
88093
|
-
enableThinking,
|
|
88094
88287
|
reasoningEffort,
|
|
88095
88288
|
channels: channels2
|
|
88096
88289
|
}) {
|
|
@@ -88374,14 +88567,12 @@ function BrainTab({
|
|
|
88374
88567
|
temperature,
|
|
88375
88568
|
topP,
|
|
88376
88569
|
maxTokens,
|
|
88377
|
-
enableThinking,
|
|
88378
88570
|
reasoningEffort,
|
|
88379
88571
|
onChannelIdChange,
|
|
88380
88572
|
onModelChange,
|
|
88381
88573
|
onTemperatureChange,
|
|
88382
88574
|
onTopPChange,
|
|
88383
88575
|
onMaxTokensChange,
|
|
88384
|
-
onEnableThinkingChange,
|
|
88385
88576
|
onReasoningEffortChange,
|
|
88386
88577
|
notifyOnDegraded,
|
|
88387
88578
|
autoFallback,
|
|
@@ -88691,7 +88882,7 @@ const BUILTIN_TOOL_GROUPS = [
|
|
|
88691
88882
|
{ key: "system", tools: ["shell"] },
|
|
88692
88883
|
{ key: "network", tools: ["webFetch", "webSearch"] },
|
|
88693
88884
|
{ key: "data", tools: ["sqlQuery"] },
|
|
88694
|
-
{ key: "aux", tools: ["analyzeImage", "skill", "createCronJob", "listCronJobs", "updateCronJob", "deleteCronJob"] }
|
|
88885
|
+
{ key: "aux", tools: ["analyzeImage", "generateImage", "skill", "createCronJob", "listCronJobs", "updateCronJob", "deleteCronJob"] }
|
|
88695
88886
|
];
|
|
88696
88887
|
const CRITICAL_TOOLS = ["readFile", "writeFile", "editFile", "shell"];
|
|
88697
88888
|
const ALL_TOOLS = BUILTIN_TOOL_GROUPS.flatMap((g2) => g2.tools);
|
|
@@ -92382,34 +92573,34 @@ const FeedbackSection = reactExports.forwardRef(function FeedbackSection2(_2, re
|
|
|
92382
92573
|
] })
|
|
92383
92574
|
] });
|
|
92384
92575
|
});
|
|
92385
|
-
const panel = "
|
|
92386
|
-
const content$3 = "
|
|
92387
|
-
const feedbackTrigger = "
|
|
92388
|
-
const version$1 = "
|
|
92389
|
-
const copiedHint = "
|
|
92390
|
-
const updateRow = "
|
|
92391
|
-
const updateColumn = "
|
|
92392
|
-
const autoCheckRow = "
|
|
92393
|
-
const rightArea = "
|
|
92394
|
-
const updateAvailableBlock = "
|
|
92395
|
-
const updateAvailableHeader = "
|
|
92396
|
-
const newVersionLabel = "
|
|
92397
|
-
const updateNotesPreview = "
|
|
92398
|
-
const updateNotesTitle = "
|
|
92399
|
-
const updateNotesList = "
|
|
92400
|
-
const releaseNotesLink = "
|
|
92401
|
-
const metaLine = "
|
|
92402
|
-
const metaSuccess = "
|
|
92403
|
-
const metaError = "
|
|
92404
|
-
const releaseNotes = "
|
|
92405
|
-
const releaseTitle = "
|
|
92406
|
-
const section = "
|
|
92407
|
-
const sectionHeader = "
|
|
92408
|
-
const sectionBody = "
|
|
92409
|
-
const sectionBodyOpen = "
|
|
92410
|
-
const techStack = "
|
|
92411
|
-
const spinner$2 = "
|
|
92412
|
-
const metaUpdate = "
|
|
92576
|
+
const panel = "_panel_18zuy_1";
|
|
92577
|
+
const content$3 = "_content_18zuy_9";
|
|
92578
|
+
const feedbackTrigger = "_feedbackTrigger_18zuy_18";
|
|
92579
|
+
const version$1 = "_version_18zuy_39";
|
|
92580
|
+
const copiedHint = "_copiedHint_18zuy_68";
|
|
92581
|
+
const updateRow = "_updateRow_18zuy_74";
|
|
92582
|
+
const updateColumn = "_updateColumn_18zuy_81";
|
|
92583
|
+
const autoCheckRow = "_autoCheckRow_18zuy_87";
|
|
92584
|
+
const rightArea = "_rightArea_18zuy_100";
|
|
92585
|
+
const updateAvailableBlock = "_updateAvailableBlock_18zuy_110";
|
|
92586
|
+
const updateAvailableHeader = "_updateAvailableHeader_18zuy_119";
|
|
92587
|
+
const newVersionLabel = "_newVersionLabel_18zuy_126";
|
|
92588
|
+
const updateNotesPreview = "_updateNotesPreview_18zuy_134";
|
|
92589
|
+
const updateNotesTitle = "_updateNotesTitle_18zuy_142";
|
|
92590
|
+
const updateNotesList = "_updateNotesList_18zuy_149";
|
|
92591
|
+
const releaseNotesLink = "_releaseNotesLink_18zuy_163";
|
|
92592
|
+
const metaLine = "_metaLine_18zuy_178";
|
|
92593
|
+
const metaSuccess = "_metaSuccess_18zuy_185";
|
|
92594
|
+
const metaError = "_metaError_18zuy_189";
|
|
92595
|
+
const releaseNotes = "_releaseNotes_18zuy_163";
|
|
92596
|
+
const releaseTitle = "_releaseTitle_18zuy_205";
|
|
92597
|
+
const section = "_section_18zuy_212";
|
|
92598
|
+
const sectionHeader = "_sectionHeader_18zuy_219";
|
|
92599
|
+
const sectionBody = "_sectionBody_18zuy_239";
|
|
92600
|
+
const sectionBodyOpen = "_sectionBodyOpen_18zuy_245";
|
|
92601
|
+
const techStack = "_techStack_18zuy_253";
|
|
92602
|
+
const spinner$2 = "_spinner_18zuy_262";
|
|
92603
|
+
const metaUpdate = "_metaUpdate_18zuy_279";
|
|
92413
92604
|
const styles$e = {
|
|
92414
92605
|
panel,
|
|
92415
92606
|
content: content$3,
|
|
@@ -92922,7 +93113,7 @@ const styles$d = {
|
|
|
92922
93113
|
dialogActions
|
|
92923
93114
|
};
|
|
92924
93115
|
const log$8 = createLogger("SchedulerPanel");
|
|
92925
|
-
function SchedulerPanel({
|
|
93116
|
+
function SchedulerPanel({}) {
|
|
92926
93117
|
const { t: t2 } = useTranslation();
|
|
92927
93118
|
const { showToast } = useToast();
|
|
92928
93119
|
const { tasks, loading: loading2, loadTasks, deleteTask, toggleTask, createTask, updateTask } = useScheduledTaskStore();
|
|
@@ -93119,7 +93310,7 @@ function SchedulerPanel({ sessionId }) {
|
|
|
93119
93310
|
] }),
|
|
93120
93311
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$d.target, children: getTaskTarget(task) })
|
|
93121
93312
|
] }),
|
|
93122
|
-
task.message && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.taskMessage, children: [
|
|
93313
|
+
"message" in task && task.message && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.taskMessage, children: [
|
|
93123
93314
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93124
93315
|
MessageSquare,
|
|
93125
93316
|
{
|
|
@@ -93520,51 +93711,95 @@ function EditTaskDialog({
|
|
|
93520
93711
|
] })
|
|
93521
93712
|
] }) });
|
|
93522
93713
|
}
|
|
93523
|
-
const container$6 = "
|
|
93524
|
-
const progress = "
|
|
93525
|
-
const card$1 = "
|
|
93526
|
-
const cardHeader$1 = "
|
|
93527
|
-
const cardTitleRow = "
|
|
93528
|
-
const cardDescription = "
|
|
93529
|
-
const formGrid = "
|
|
93530
|
-
const field$1 = "
|
|
93531
|
-
const label = "
|
|
93532
|
-
const timeInput = "
|
|
93533
|
-
const actionsRow = "
|
|
93534
|
-
const helperText$1 = "
|
|
93535
|
-
const empty$2 = "
|
|
93536
|
-
const executionList = "
|
|
93537
|
-
const executionItem = "
|
|
93538
|
-
const executionToggle = "
|
|
93539
|
-
const executionHeader = "
|
|
93540
|
-
const executionHeaderLeft = "
|
|
93541
|
-
const executionTime = "
|
|
93542
|
-
const executionCount = "
|
|
93543
|
-
const executionSummary = "
|
|
93544
|
-
const executionDetailList = "
|
|
93545
|
-
const executionDetailItem = "
|
|
93546
|
-
const executionDetailHeader = "
|
|
93547
|
-
const executionDetailName = "
|
|
93548
|
-
const executionDetailSummary = "
|
|
93549
|
-
const
|
|
93550
|
-
const
|
|
93551
|
-
const
|
|
93552
|
-
const
|
|
93553
|
-
const
|
|
93554
|
-
const
|
|
93555
|
-
const
|
|
93556
|
-
const
|
|
93557
|
-
const
|
|
93558
|
-
const
|
|
93559
|
-
const
|
|
93560
|
-
const
|
|
93561
|
-
const
|
|
93562
|
-
const
|
|
93563
|
-
const
|
|
93564
|
-
const
|
|
93565
|
-
const
|
|
93566
|
-
const
|
|
93567
|
-
const
|
|
93714
|
+
const container$6 = "_container_5aqf4_1";
|
|
93715
|
+
const progress = "_progress_5aqf4_8";
|
|
93716
|
+
const card$1 = "_card_5aqf4_21";
|
|
93717
|
+
const cardHeader$1 = "_cardHeader_5aqf4_32";
|
|
93718
|
+
const cardTitleRow = "_cardTitleRow_5aqf4_39";
|
|
93719
|
+
const cardDescription = "_cardDescription_5aqf4_52";
|
|
93720
|
+
const formGrid = "_formGrid_5aqf4_59";
|
|
93721
|
+
const field$1 = "_field_5aqf4_65";
|
|
93722
|
+
const label = "_label_5aqf4_71";
|
|
93723
|
+
const timeInput = "_timeInput_5aqf4_76";
|
|
93724
|
+
const actionsRow = "_actionsRow_5aqf4_86";
|
|
93725
|
+
const helperText$1 = "_helperText_5aqf4_93";
|
|
93726
|
+
const empty$2 = "_empty_5aqf4_98";
|
|
93727
|
+
const executionList = "_executionList_5aqf4_103";
|
|
93728
|
+
const executionItem = "_executionItem_5aqf4_109";
|
|
93729
|
+
const executionToggle = "_executionToggle_5aqf4_115";
|
|
93730
|
+
const executionHeader = "_executionHeader_5aqf4_124";
|
|
93731
|
+
const executionHeaderLeft = "_executionHeaderLeft_5aqf4_131";
|
|
93732
|
+
const executionTime = "_executionTime_5aqf4_137";
|
|
93733
|
+
const executionCount = "_executionCount_5aqf4_138";
|
|
93734
|
+
const executionSummary = "_executionSummary_5aqf4_143";
|
|
93735
|
+
const executionDetailList = "_executionDetailList_5aqf4_150";
|
|
93736
|
+
const executionDetailItem = "_executionDetailItem_5aqf4_157";
|
|
93737
|
+
const executionDetailHeader = "_executionDetailHeader_5aqf4_162";
|
|
93738
|
+
const executionDetailName = "_executionDetailName_5aqf4_169";
|
|
93739
|
+
const executionDetailSummary = "_executionDetailSummary_5aqf4_175";
|
|
93740
|
+
const candidateList = "_candidateList_5aqf4_182";
|
|
93741
|
+
const candidateTitle = "_candidateTitle_5aqf4_189";
|
|
93742
|
+
const candidateSummary = "_candidateSummary_5aqf4_195";
|
|
93743
|
+
const candidateTargetSummary = "_candidateTargetSummary_5aqf4_202";
|
|
93744
|
+
const candidateSummaryChip = "_candidateSummaryChip_5aqf4_208";
|
|
93745
|
+
const candidateTargetChip = "_candidateTargetChip_5aqf4_219";
|
|
93746
|
+
const candidateTarget_topic = "_candidateTarget_topic_5aqf4_230";
|
|
93747
|
+
const budgetStatusList = "_budgetStatusList_5aqf4_236";
|
|
93748
|
+
const budgetChips = "_budgetChips_5aqf4_240";
|
|
93749
|
+
const budgetChip = "_budgetChip_5aqf4_240";
|
|
93750
|
+
const budgetStatus_healthy = "_budgetStatus_healthy_5aqf4_258";
|
|
93751
|
+
const budgetStatus_warning = "_budgetStatus_warning_5aqf4_263";
|
|
93752
|
+
const budgetStatus_over = "_budgetStatus_over_5aqf4_269";
|
|
93753
|
+
const budgetPolicyNotice = "_budgetPolicyNotice_5aqf4_275";
|
|
93754
|
+
const budgetPolicyMode = "_budgetPolicyMode_5aqf4_289";
|
|
93755
|
+
const budgetPolicy_conservative = "_budgetPolicy_conservative_5aqf4_294";
|
|
93756
|
+
const budgetPolicy_overBudget = "_budgetPolicy_overBudget_5aqf4_299";
|
|
93757
|
+
const candidateItem = "_candidateItem_5aqf4_304";
|
|
93758
|
+
const candidateHeader = "_candidateHeader_5aqf4_311";
|
|
93759
|
+
const candidateText = "_candidateText_5aqf4_318";
|
|
93760
|
+
const candidateDisposition = "_candidateDisposition_5aqf4_324";
|
|
93761
|
+
const candidateDisposition_promoted = "_candidateDisposition_promoted_5aqf4_333";
|
|
93762
|
+
const candidateDisposition_deferred = "_candidateDisposition_deferred_5aqf4_338";
|
|
93763
|
+
const candidateDisposition_skipped = "_candidateDisposition_skipped_5aqf4_343";
|
|
93764
|
+
const candidateDisposition_duplicate = "_candidateDisposition_duplicate_5aqf4_344";
|
|
93765
|
+
const candidateMeta = "_candidateMeta_5aqf4_348";
|
|
93766
|
+
const candidateReason = "_candidateReason_5aqf4_349";
|
|
93767
|
+
const fileChipList = "_fileChipList_5aqf4_362";
|
|
93768
|
+
const fileChip = "_fileChip_5aqf4_362";
|
|
93769
|
+
const fileChipActive = "_fileChipActive_5aqf4_381";
|
|
93770
|
+
const fileChipDisabled = "_fileChipDisabled_5aqf4_387";
|
|
93771
|
+
const topicEntry = "_topicEntry_5aqf4_392";
|
|
93772
|
+
const topicEntryHeader = "_topicEntryHeader_5aqf4_399";
|
|
93773
|
+
const topicEntryTitle = "_topicEntryTitle_5aqf4_405";
|
|
93774
|
+
const topicEntryCount = "_topicEntryCount_5aqf4_411";
|
|
93775
|
+
const topicEntryDescription = "_topicEntryDescription_5aqf4_425";
|
|
93776
|
+
const topicEntryList = "_topicEntryList_5aqf4_432";
|
|
93777
|
+
const topicEntryPath = "_topicEntryPath_5aqf4_439";
|
|
93778
|
+
const diffHeader = "_diffHeader_5aqf4_449";
|
|
93779
|
+
const diffHeaderPath = "_diffHeaderPath_5aqf4_456";
|
|
93780
|
+
const diffCloseButton = "_diffCloseButton_5aqf4_462";
|
|
93781
|
+
const fileList = "_fileList_5aqf4_472";
|
|
93782
|
+
const fileItem = "_fileItem_5aqf4_478";
|
|
93783
|
+
const filePath$1 = "_filePath_5aqf4_489";
|
|
93784
|
+
const fileSummary = "_fileSummary_5aqf4_494";
|
|
93785
|
+
const diffToggle = "_diffToggle_5aqf4_500";
|
|
93786
|
+
const diffBlock = "_diffBlock_5aqf4_510";
|
|
93787
|
+
const diffContent = "_diffContent_5aqf4_521";
|
|
93788
|
+
const diffLineAdd = "_diffLineAdd_5aqf4_530";
|
|
93789
|
+
const diffLineRemove = "_diffLineRemove_5aqf4_534";
|
|
93790
|
+
const diffLineMeta = "_diffLineMeta_5aqf4_538";
|
|
93791
|
+
const spinningIcon = "_spinningIcon_5aqf4_543";
|
|
93792
|
+
const spin$1 = "_spin_5aqf4_543";
|
|
93793
|
+
const statusInline = "_statusInline_5aqf4_547";
|
|
93794
|
+
const progressDone = "_progressDone_5aqf4_553";
|
|
93795
|
+
const sourceSection = "_sourceSection_5aqf4_562";
|
|
93796
|
+
const sourceTitle = "_sourceTitle_5aqf4_566";
|
|
93797
|
+
const sourceText = "_sourceText_5aqf4_572";
|
|
93798
|
+
const sourceDate = "_sourceDate_5aqf4_578";
|
|
93799
|
+
const sourceChips = "_sourceChips_5aqf4_584";
|
|
93800
|
+
const sourceChip = "_sourceChip_5aqf4_584";
|
|
93801
|
+
const sourceChipGroup = "_sourceChipGroup_5aqf4_603";
|
|
93802
|
+
const sourceChipDetail = "_sourceChipDetail_5aqf4_614";
|
|
93568
93803
|
const styles$c = {
|
|
93569
93804
|
container: container$6,
|
|
93570
93805
|
progress,
|
|
@@ -93592,10 +93827,44 @@ const styles$c = {
|
|
|
93592
93827
|
executionDetailHeader,
|
|
93593
93828
|
executionDetailName,
|
|
93594
93829
|
executionDetailSummary,
|
|
93830
|
+
candidateList,
|
|
93831
|
+
candidateTitle,
|
|
93832
|
+
candidateSummary,
|
|
93833
|
+
candidateTargetSummary,
|
|
93834
|
+
candidateSummaryChip,
|
|
93835
|
+
candidateTargetChip,
|
|
93836
|
+
candidateTarget_topic,
|
|
93837
|
+
budgetStatusList,
|
|
93838
|
+
budgetChips,
|
|
93839
|
+
budgetChip,
|
|
93840
|
+
budgetStatus_healthy,
|
|
93841
|
+
budgetStatus_warning,
|
|
93842
|
+
budgetStatus_over,
|
|
93843
|
+
budgetPolicyNotice,
|
|
93844
|
+
budgetPolicyMode,
|
|
93845
|
+
budgetPolicy_conservative,
|
|
93846
|
+
budgetPolicy_overBudget,
|
|
93847
|
+
candidateItem,
|
|
93848
|
+
candidateHeader,
|
|
93849
|
+
candidateText,
|
|
93850
|
+
candidateDisposition,
|
|
93851
|
+
candidateDisposition_promoted,
|
|
93852
|
+
candidateDisposition_deferred,
|
|
93853
|
+
candidateDisposition_skipped,
|
|
93854
|
+
candidateDisposition_duplicate,
|
|
93855
|
+
candidateMeta,
|
|
93856
|
+
candidateReason,
|
|
93595
93857
|
fileChipList,
|
|
93596
93858
|
fileChip,
|
|
93597
93859
|
fileChipActive,
|
|
93598
93860
|
fileChipDisabled,
|
|
93861
|
+
topicEntry,
|
|
93862
|
+
topicEntryHeader,
|
|
93863
|
+
topicEntryTitle,
|
|
93864
|
+
topicEntryCount,
|
|
93865
|
+
topicEntryDescription,
|
|
93866
|
+
topicEntryList,
|
|
93867
|
+
topicEntryPath,
|
|
93599
93868
|
diffHeader,
|
|
93600
93869
|
diffHeaderPath,
|
|
93601
93870
|
diffCloseButton,
|
|
@@ -93603,36 +93872,99 @@ const styles$c = {
|
|
|
93603
93872
|
fileItem,
|
|
93604
93873
|
filePath: filePath$1,
|
|
93605
93874
|
fileSummary,
|
|
93875
|
+
diffToggle,
|
|
93606
93876
|
diffBlock,
|
|
93607
93877
|
diffContent,
|
|
93608
93878
|
diffLineAdd,
|
|
93609
93879
|
diffLineRemove,
|
|
93610
93880
|
diffLineMeta,
|
|
93611
93881
|
spinningIcon,
|
|
93882
|
+
spin: spin$1,
|
|
93612
93883
|
statusInline,
|
|
93613
|
-
progressDone
|
|
93884
|
+
progressDone,
|
|
93885
|
+
sourceSection,
|
|
93886
|
+
sourceTitle,
|
|
93887
|
+
sourceText,
|
|
93888
|
+
sourceDate,
|
|
93889
|
+
sourceChips,
|
|
93890
|
+
sourceChip,
|
|
93891
|
+
sourceChipGroup,
|
|
93892
|
+
sourceChipDetail
|
|
93614
93893
|
};
|
|
93615
93894
|
function formatDateTime(value2, fallback2) {
|
|
93616
93895
|
if (!value2) return fallback2;
|
|
93617
93896
|
return new Date(value2).toLocaleString();
|
|
93618
93897
|
}
|
|
93898
|
+
const CANDIDATE_DISPOSITIONS = ["promoted", "deferred", "skipped", "duplicate"];
|
|
93899
|
+
const CANDIDATE_TARGETS = ["memory", "user", "group", "tools", "topic", "dailyOnly"];
|
|
93619
93900
|
function parseExecutionOutput(execution) {
|
|
93620
93901
|
if (!execution.output) return null;
|
|
93621
93902
|
try {
|
|
93622
|
-
|
|
93903
|
+
const parsed = JSON.parse(execution.output);
|
|
93904
|
+
if (isMemoryUpdateResult(parsed)) return { kind: "agent", result: parsed };
|
|
93905
|
+
if (isGroupMemoryUpdateResult(parsed)) return { kind: "group", result: parsed };
|
|
93906
|
+
return null;
|
|
93623
93907
|
} catch {
|
|
93624
93908
|
return null;
|
|
93625
93909
|
}
|
|
93626
93910
|
}
|
|
93911
|
+
function isMemoryUpdateResult(value2) {
|
|
93912
|
+
return typeof value2 === "object" && value2 !== null && Array.isArray(value2.results) && typeof value2.totalAgents === "number" && typeof value2.succeededAgents === "number";
|
|
93913
|
+
}
|
|
93914
|
+
function isGroupMemoryUpdateResult(value2) {
|
|
93915
|
+
return typeof value2 === "object" && value2 !== null && typeof value2.groupId === "string" && typeof value2.groupName === "string" && Array.isArray(value2.changedFiles);
|
|
93916
|
+
}
|
|
93917
|
+
function getMemoryUpdateSources(result) {
|
|
93918
|
+
const sources = result.sources ?? {};
|
|
93919
|
+
return {
|
|
93920
|
+
date: sources.date ?? "",
|
|
93921
|
+
directSessionCount: sources.directSessionCount ?? 0,
|
|
93922
|
+
totalMessages: sources.totalMessages ?? 0,
|
|
93923
|
+
directSessionTitles: sources.directSessionTitles ?? [],
|
|
93924
|
+
groupDigestCount: sources.groupDigestCount ?? 0,
|
|
93925
|
+
groupDigestNames: sources.groupDigestNames ?? []
|
|
93926
|
+
};
|
|
93927
|
+
}
|
|
93627
93928
|
function inferExecutionSummary(execution, parsed, t2) {
|
|
93628
93929
|
if (execution.status === "running") return t2("memoryGrowth.nightly.executionRunning");
|
|
93629
93930
|
if (execution.status === "failed") return execution.error || t2("memoryGrowth.nightly.executionFailed");
|
|
93630
93931
|
if (!parsed) return t2("memoryGrowth.nightly.executionFinished");
|
|
93932
|
+
if (parsed.kind === "group") {
|
|
93933
|
+
return t2("memoryGrowth.nightly.groupExecutionSummary", {
|
|
93934
|
+
groupName: parsed.result.groupName,
|
|
93935
|
+
changedFiles: parsed.result.changedFiles.length
|
|
93936
|
+
});
|
|
93937
|
+
}
|
|
93631
93938
|
return t2("memoryGrowth.nightly.executionSummary", {
|
|
93632
|
-
succeeded: parsed.succeededAgents,
|
|
93633
|
-
total: parsed.totalAgents
|
|
93939
|
+
succeeded: parsed.result.succeededAgents,
|
|
93940
|
+
total: parsed.result.totalAgents
|
|
93634
93941
|
});
|
|
93635
93942
|
}
|
|
93943
|
+
function SourceSummarySection({ result, t: t2 }) {
|
|
93944
|
+
const sources = getMemoryUpdateSources(result);
|
|
93945
|
+
const hasDirect = sources.directSessionCount > 0;
|
|
93946
|
+
const hasGroup = sources.groupDigestCount > 0;
|
|
93947
|
+
if (!hasDirect && !hasGroup) {
|
|
93948
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.sourceSection, children: [
|
|
93949
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceTitle, children: t2("memoryGrowth.nightly.sources") }),
|
|
93950
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceText, children: t2("memoryGrowth.nightly.sourcesEmpty") }),
|
|
93951
|
+
sources.date && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceDate, children: sources.date })
|
|
93952
|
+
] });
|
|
93953
|
+
}
|
|
93954
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.sourceSection, children: [
|
|
93955
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceTitle, children: t2("memoryGrowth.nightly.sources") }),
|
|
93956
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.sourceChips, children: [
|
|
93957
|
+
sources.date && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChip, children: sources.date }),
|
|
93958
|
+
hasDirect && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChip, children: t2("memoryGrowth.nightly.sourceDirect", { count: sources.directSessionCount, messages: sources.totalMessages }) }),
|
|
93959
|
+
sources.directSessionTitles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$c.sourceChipDetail, children: [
|
|
93960
|
+
sources.directSessionTitles.slice(0, 5).join("、"),
|
|
93961
|
+
sources.directSessionTitles.length > 5 ? "…" : ""
|
|
93962
|
+
] }),
|
|
93963
|
+
hasGroup && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChipGroup, children: t2("memoryGrowth.nightly.sourceGroupDigest", { count: sources.groupDigestCount }) }),
|
|
93964
|
+
hasGroup && sources.groupDigestNames.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChipDetail, children: sources.groupDigestNames.join("、") })
|
|
93965
|
+
] })
|
|
93966
|
+
] });
|
|
93967
|
+
}
|
|
93636
93968
|
function summarizeAgentResult(result, t2) {
|
|
93637
93969
|
if (result.status === "failed") return result.error || t2("memoryGrowth.nightly.executionFailed");
|
|
93638
93970
|
if (result.changedFiles.length === 0) return t2("memoryGrowth.nightly.noChanges");
|
|
@@ -93646,7 +93978,15 @@ function collectRecentFiles(executions) {
|
|
|
93646
93978
|
for (const execution of executions) {
|
|
93647
93979
|
const parsed = parseExecutionOutput(execution);
|
|
93648
93980
|
if (!parsed) continue;
|
|
93649
|
-
|
|
93981
|
+
if (parsed.kind === "group") {
|
|
93982
|
+
for (const file of parsed.result.changedFiles) {
|
|
93983
|
+
if (!files.has(file.path)) {
|
|
93984
|
+
files.set(file.path, file);
|
|
93985
|
+
}
|
|
93986
|
+
}
|
|
93987
|
+
continue;
|
|
93988
|
+
}
|
|
93989
|
+
for (const result of parsed.result.results) {
|
|
93650
93990
|
for (const file of result.changedFiles) {
|
|
93651
93991
|
if (!files.has(file.path)) {
|
|
93652
93992
|
files.set(file.path, file);
|
|
@@ -93656,6 +93996,85 @@ function collectRecentFiles(executions) {
|
|
|
93656
93996
|
}
|
|
93657
93997
|
return Array.from(files.values()).slice(0, 8);
|
|
93658
93998
|
}
|
|
93999
|
+
function isTopicFile(path2) {
|
|
94000
|
+
return /^memory\/topics\/[^/]+\.md$/.test(path2);
|
|
94001
|
+
}
|
|
94002
|
+
function collectTopicFiles(files) {
|
|
94003
|
+
return files.filter((file) => isTopicFile(file.path));
|
|
94004
|
+
}
|
|
94005
|
+
function summarizeGroupResult(result, t2) {
|
|
94006
|
+
if (result.status === "failed") return result.error || t2("memoryGrowth.nightly.executionFailed");
|
|
94007
|
+
if (result.changedFiles.length === 0) return result.detail || t2("memoryGrowth.nightly.noChanges");
|
|
94008
|
+
const fileSummary2 = result.changedFiles.map((file) => {
|
|
94009
|
+
if (!file.summary) return file.path;
|
|
94010
|
+
return `${file.path} · ${file.summary}`;
|
|
94011
|
+
}).join(";");
|
|
94012
|
+
return result.detail ? `${result.detail};${fileSummary2}` : fileSummary2;
|
|
94013
|
+
}
|
|
94014
|
+
function summarizeCandidates(candidates) {
|
|
94015
|
+
const summary2 = { promoted: 0, deferred: 0, skipped: 0, duplicate: 0 };
|
|
94016
|
+
for (const candidate of candidates ?? []) {
|
|
94017
|
+
summary2[candidate.disposition] += 1;
|
|
94018
|
+
}
|
|
94019
|
+
return summary2;
|
|
94020
|
+
}
|
|
94021
|
+
function summarizeCandidateTargets(candidates) {
|
|
94022
|
+
const summary2 = { memory: 0, user: 0, group: 0, tools: 0, topic: 0, dailyOnly: 0 };
|
|
94023
|
+
for (const candidate of candidates ?? []) {
|
|
94024
|
+
summary2[candidate.suggestedTarget] += 1;
|
|
94025
|
+
}
|
|
94026
|
+
return summary2;
|
|
94027
|
+
}
|
|
94028
|
+
function summarizeExecutionCandidates(parsed) {
|
|
94029
|
+
if (parsed.kind === "group") return summarizeCandidates(parsed.result.candidates);
|
|
94030
|
+
return parsed.result.results.reduce((summary2, result) => {
|
|
94031
|
+
const resultSummary = summarizeCandidates(result.candidates);
|
|
94032
|
+
for (const disposition of CANDIDATE_DISPOSITIONS) {
|
|
94033
|
+
summary2[disposition] += resultSummary[disposition];
|
|
94034
|
+
}
|
|
94035
|
+
return summary2;
|
|
94036
|
+
}, { promoted: 0, deferred: 0, skipped: 0, duplicate: 0 });
|
|
94037
|
+
}
|
|
94038
|
+
function CandidateSummaryChips({ summary: summary2, t: t2 }) {
|
|
94039
|
+
const total = CANDIDATE_DISPOSITIONS.reduce((sum, disposition) => sum + summary2[disposition], 0);
|
|
94040
|
+
if (total === 0) return null;
|
|
94041
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateSummary, children: CANDIDATE_DISPOSITIONS.filter((disposition) => summary2[disposition] > 0).map((disposition) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$c.candidateSummaryChip, styles$c[`candidateDisposition_${disposition}`]), children: [
|
|
94042
|
+
t2(`memoryGrowth.nightly.candidateDisposition.${disposition}`),
|
|
94043
|
+
" ",
|
|
94044
|
+
summary2[disposition]
|
|
94045
|
+
] }, disposition)) });
|
|
94046
|
+
}
|
|
94047
|
+
function CandidateTargetChips({ summary: summary2, t: t2 }) {
|
|
94048
|
+
const total = CANDIDATE_TARGETS.reduce((sum, target2) => sum + summary2[target2], 0);
|
|
94049
|
+
if (total === 0) return null;
|
|
94050
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateTargetSummary, children: CANDIDATE_TARGETS.filter((target2) => summary2[target2] > 0).map((target2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$c.candidateTargetChip, styles$c[`candidateTarget_${target2}`]), children: [
|
|
94051
|
+
t2(`memoryGrowth.nightly.candidateTarget.${target2}`),
|
|
94052
|
+
" ",
|
|
94053
|
+
summary2[target2]
|
|
94054
|
+
] }, target2)) });
|
|
94055
|
+
}
|
|
94056
|
+
function BudgetStatusChips({ budgetStatus, t: t2 }) {
|
|
94057
|
+
if (!budgetStatus || budgetStatus.length === 0) return null;
|
|
94058
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.budgetStatusList, children: [
|
|
94059
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateTitle, children: t2("memoryGrowth.nightly.budgetStatus") }),
|
|
94060
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.budgetChips, children: budgetStatus.map((item2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$c.budgetChip, styles$c[`budgetStatus_${item2.status}`]), children: [
|
|
94061
|
+
item2.file,
|
|
94062
|
+
" · ",
|
|
94063
|
+
item2.lineCount,
|
|
94064
|
+
"/",
|
|
94065
|
+
item2.hardLimit,
|
|
94066
|
+
" · ",
|
|
94067
|
+
t2(`memoryGrowth.nightly.budget.${item2.status}`)
|
|
94068
|
+
] }, item2.file)) })
|
|
94069
|
+
] });
|
|
94070
|
+
}
|
|
94071
|
+
function BudgetPolicyNotice({ policy, t: t2 }) {
|
|
94072
|
+
if (!policy || policy.mode === "normal") return null;
|
|
94073
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$c.budgetPolicyNotice, styles$c[`budgetPolicy_${policy.mode}`]), children: [
|
|
94074
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.budgetPolicyMode, children: t2(`memoryGrowth.nightly.budgetPolicy.${policy.mode}`) }),
|
|
94075
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: policy.reason })
|
|
94076
|
+
] });
|
|
94077
|
+
}
|
|
93659
94078
|
function renderDiffLines(diff) {
|
|
93660
94079
|
const lines = diff.split("\n");
|
|
93661
94080
|
return lines.map((line2, i2) => {
|
|
@@ -93699,6 +94118,31 @@ function DiffFileChip({ file }) {
|
|
|
93699
94118
|
] })
|
|
93700
94119
|
] });
|
|
93701
94120
|
}
|
|
94121
|
+
function CandidateList({ candidates, t: t2 }) {
|
|
94122
|
+
if (!candidates || candidates.length === 0) return null;
|
|
94123
|
+
const summary2 = summarizeCandidates(candidates);
|
|
94124
|
+
const targetSummary = summarizeCandidateTargets(candidates);
|
|
94125
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateList, children: [
|
|
94126
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateTitle, children: t2("memoryGrowth.nightly.candidates") }),
|
|
94127
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateSummaryChips, { summary: summary2, t: t2 }),
|
|
94128
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateTargetChips, { summary: targetSummary, t: t2 }),
|
|
94129
|
+
candidates.map((candidate, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateItem, children: [
|
|
94130
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateHeader, children: [
|
|
94131
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.candidateText, children: candidate.candidateText }),
|
|
94132
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx(styles$c.candidateDisposition, styles$c[`candidateDisposition_${candidate.disposition}`]), children: t2(`memoryGrowth.nightly.candidateDisposition.${candidate.disposition}`) })
|
|
94133
|
+
] }),
|
|
94134
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateMeta, children: [
|
|
94135
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2(`memoryGrowth.nightly.candidateSource.${candidate.sourceKind}`) }),
|
|
94136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
94137
|
+
"→ ",
|
|
94138
|
+
t2(`memoryGrowth.nightly.candidateTarget.${candidate.suggestedTarget}`)
|
|
94139
|
+
] }),
|
|
94140
|
+
candidate.sourceRefs.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: candidate.sourceRefs.join(", ") })
|
|
94141
|
+
] }),
|
|
94142
|
+
candidate.reason && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateReason, children: candidate.reason })
|
|
94143
|
+
] }, [candidate.sourceKind, candidate.candidateText, index2].join(":")))
|
|
94144
|
+
] });
|
|
94145
|
+
}
|
|
93702
94146
|
function MemoryGrowthPanel() {
|
|
93703
94147
|
const { t: t2 } = useTranslation();
|
|
93704
94148
|
const { showToast } = useToast();
|
|
@@ -93710,7 +94154,9 @@ function MemoryGrowthPanel() {
|
|
|
93710
94154
|
const [time2, setTime] = reactExports.useState("01:00");
|
|
93711
94155
|
const [scope, setScope] = reactExports.useState("all");
|
|
93712
94156
|
const [selectedAgentId, setSelectedAgentId] = reactExports.useState("");
|
|
94157
|
+
const [selectedGroupId, setSelectedGroupId] = reactExports.useState("");
|
|
93713
94158
|
const [agents, setAgents] = reactExports.useState([]);
|
|
94159
|
+
const [groups, setGroups] = reactExports.useState([]);
|
|
93714
94160
|
const [executions, setExecutions] = reactExports.useState([]);
|
|
93715
94161
|
const [expandedExecutionIds, setExpandedExecutionIds] = reactExports.useState([]);
|
|
93716
94162
|
const [showEnableConfirm, setShowEnableConfirm] = reactExports.useState(false);
|
|
@@ -93721,17 +94167,20 @@ function MemoryGrowthPanel() {
|
|
|
93721
94167
|
const load2 = async () => {
|
|
93722
94168
|
setLoading(true);
|
|
93723
94169
|
try {
|
|
93724
|
-
const [nightlyConfig, recentExecutions, allAgents] = await Promise.all([
|
|
94170
|
+
const [nightlyConfig, recentExecutions, allAgents, allGroups] = await Promise.all([
|
|
93725
94171
|
transport.getNightlyMemoryConfig(),
|
|
93726
94172
|
transport.listNightlyMemoryExecutions(8),
|
|
93727
|
-
transport.listAgents()
|
|
94173
|
+
transport.listAgents(),
|
|
94174
|
+
transport.listGroups()
|
|
93728
94175
|
]);
|
|
93729
94176
|
setConfig3(nightlyConfig);
|
|
93730
94177
|
setTime(nightlyConfig.time);
|
|
93731
|
-
setScope(nightlyConfig.
|
|
94178
|
+
setScope(nightlyConfig.scope);
|
|
93732
94179
|
setSelectedAgentId(nightlyConfig.agentId || "");
|
|
94180
|
+
setSelectedGroupId(nightlyConfig.groupId || "");
|
|
93733
94181
|
setExecutions(recentExecutions);
|
|
93734
94182
|
setAgents(allAgents);
|
|
94183
|
+
setGroups(allGroups);
|
|
93735
94184
|
if (recentExecutions.length > 0) {
|
|
93736
94185
|
setExpandedExecutionIds([recentExecutions[0].id]);
|
|
93737
94186
|
}
|
|
@@ -93762,23 +94211,27 @@ function MemoryGrowthPanel() {
|
|
|
93762
94211
|
};
|
|
93763
94212
|
}, [memoryUpdateProgress, transport]);
|
|
93764
94213
|
const effectiveAgentId = scope === "agent" ? selectedAgentId : void 0;
|
|
93765
|
-
const
|
|
94214
|
+
const effectiveGroupId = scope === "group" ? selectedGroupId : void 0;
|
|
94215
|
+
const memoryDirAgentId = scope === "agent" ? selectedAgentId : scope === "group" ? "" : agents[0]?.id ?? "";
|
|
93766
94216
|
const hasChanges = reactExports.useMemo(
|
|
93767
|
-
() => config2 !== null && (time2 !== config2.time || effectiveAgentId !== config2.agentId),
|
|
93768
|
-
[config2, effectiveAgentId, time2]
|
|
94217
|
+
() => config2 !== null && (time2 !== config2.time || effectiveAgentId !== config2.agentId || effectiveGroupId !== config2.groupId || scope !== config2.scope),
|
|
94218
|
+
[config2, effectiveAgentId, effectiveGroupId, scope, time2]
|
|
93769
94219
|
);
|
|
93770
94220
|
const recentFiles = reactExports.useMemo(() => collectRecentFiles(executions), [executions]);
|
|
94221
|
+
const topicFiles = reactExports.useMemo(() => collectTopicFiles(recentFiles), [recentFiles]);
|
|
93771
94222
|
const persistConfig = async (enabled) => {
|
|
93772
94223
|
const updated = await transport.updateNightlyMemoryConfig({
|
|
93773
94224
|
enabled,
|
|
93774
94225
|
time: time2,
|
|
93775
94226
|
agentId: effectiveAgentId,
|
|
94227
|
+
groupId: effectiveGroupId,
|
|
93776
94228
|
scope
|
|
93777
94229
|
});
|
|
93778
94230
|
setConfig3(updated);
|
|
93779
94231
|
setTime(updated.time);
|
|
93780
|
-
setScope(updated.
|
|
94232
|
+
setScope(updated.scope);
|
|
93781
94233
|
setSelectedAgentId(updated.agentId || "");
|
|
94234
|
+
setSelectedGroupId(updated.groupId || "");
|
|
93782
94235
|
showToast(t2("memoryGrowth.nightly.saved"), "success");
|
|
93783
94236
|
};
|
|
93784
94237
|
const handleToggle = async (enabled) => {
|
|
@@ -93813,6 +94266,10 @@ function MemoryGrowthPanel() {
|
|
|
93813
94266
|
showToast(t2("memoryGrowth.nightly.selectAgentFirst"), "info");
|
|
93814
94267
|
return;
|
|
93815
94268
|
}
|
|
94269
|
+
if (scope === "group" && !selectedGroupId) {
|
|
94270
|
+
showToast(t2("memoryGrowth.nightly.selectGroupFirst"), "info");
|
|
94271
|
+
return;
|
|
94272
|
+
}
|
|
93816
94273
|
setSaving(true);
|
|
93817
94274
|
try {
|
|
93818
94275
|
await persistConfig(config2.enabled);
|
|
@@ -93841,6 +94298,18 @@ function MemoryGrowthPanel() {
|
|
|
93841
94298
|
setExpandedExecutionIds((current) => current.includes(executionId) ? current.filter((id32) => id32 !== executionId) : [...current, executionId]);
|
|
93842
94299
|
};
|
|
93843
94300
|
const handleOpenMemoryDir = async () => {
|
|
94301
|
+
if (scope === "group") {
|
|
94302
|
+
if (!selectedGroupId) {
|
|
94303
|
+
showToast(t2("memoryGrowth.nightly.openMemoryDirUnavailable"), "error");
|
|
94304
|
+
return;
|
|
94305
|
+
}
|
|
94306
|
+
try {
|
|
94307
|
+
await transport.openChatDataDir({ type: "group", groupId: selectedGroupId });
|
|
94308
|
+
} catch (error2) {
|
|
94309
|
+
showToast(getErrorMessage(error2), "error");
|
|
94310
|
+
}
|
|
94311
|
+
return;
|
|
94312
|
+
}
|
|
93844
94313
|
if (!memoryDirAgentId) {
|
|
93845
94314
|
showToast(t2("memoryGrowth.nightly.openMemoryDirUnavailable"), "error");
|
|
93846
94315
|
return;
|
|
@@ -93908,9 +94377,10 @@ function MemoryGrowthPanel() {
|
|
|
93908
94377
|
] }),
|
|
93909
94378
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$c.field, children: [
|
|
93910
94379
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.label, children: t2("memoryGrowth.nightly.scopeLabel") }),
|
|
93911
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: scope, onChange: (value2) => setScope(value2 === "agent" ? "agent" : "all"), disabled: saving, children: [
|
|
94380
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: scope, onChange: (value2) => setScope(value2 === "agent" ? "agent" : value2 === "group" ? "group" : "all"), disabled: saving, children: [
|
|
93912
94381
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "all", children: t2("memoryGrowth.nightly.scopeAll") }),
|
|
93913
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "agent", children: t2("memoryGrowth.nightly.scopeAgent") })
|
|
94382
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "agent", children: t2("memoryGrowth.nightly.scopeAgent") }),
|
|
94383
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "group", children: t2("memoryGrowth.nightly.scopeGroup") })
|
|
93914
94384
|
] })
|
|
93915
94385
|
] }),
|
|
93916
94386
|
scope === "agent" && /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$c.field, children: [
|
|
@@ -93919,6 +94389,13 @@ function MemoryGrowthPanel() {
|
|
|
93919
94389
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: t2("memoryGrowth.nightly.selectAgent") }),
|
|
93920
94390
|
agents.map((agent2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: agent2.id, children: agent2.name }, agent2.id))
|
|
93921
94391
|
] })
|
|
94392
|
+
] }),
|
|
94393
|
+
scope === "group" && /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$c.field, children: [
|
|
94394
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.label, children: t2("memoryGrowth.nightly.groupLabel") }),
|
|
94395
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: selectedGroupId, onChange: setSelectedGroupId, disabled: saving, children: [
|
|
94396
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: t2("memoryGrowth.nightly.selectGroup") }),
|
|
94397
|
+
groups.map((group2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: group2.id, children: group2.name }, group2.id))
|
|
94398
|
+
] })
|
|
93922
94399
|
] })
|
|
93923
94400
|
] }),
|
|
93924
94401
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.actionsRow, children: [
|
|
@@ -93944,6 +94421,7 @@ function MemoryGrowthPanel() {
|
|
|
93944
94421
|
executions.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.empty, children: t2("memoryGrowth.nightly.noExecutions") }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionList, children: executions.map((execution) => {
|
|
93945
94422
|
const parsed = parseExecutionOutput(execution);
|
|
93946
94423
|
const expanded2 = expandedExecutionIds.includes(execution.id);
|
|
94424
|
+
const candidateSummary2 = parsed ? summarizeExecutionCandidates(parsed) : null;
|
|
93947
94425
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionItem, children: [
|
|
93948
94426
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
93949
94427
|
"button",
|
|
@@ -93958,29 +94436,52 @@ function MemoryGrowthPanel() {
|
|
|
93958
94436
|
/* @__PURE__ */ jsxRuntimeExports.jsx(StatusPill, { status: toPillStatus(execution.status), children: t2(`memoryGrowth.nightly.executionStatus.${execution.status}`) }),
|
|
93959
94437
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionTime, children: formatDateTime(execution.startedAt, t2("memoryGrowth.nightly.unknownTime")) })
|
|
93960
94438
|
] }),
|
|
93961
|
-
parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionCount, children: t2("memoryGrowth.nightly.executionSummaryCompact", {
|
|
93962
|
-
succeeded: parsed.succeededAgents,
|
|
93963
|
-
total: parsed.totalAgents
|
|
94439
|
+
parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionCount, children: parsed.kind === "agent" ? t2("memoryGrowth.nightly.executionSummaryCompact", {
|
|
94440
|
+
succeeded: parsed.result.succeededAgents,
|
|
94441
|
+
total: parsed.result.totalAgents
|
|
94442
|
+
}) : t2("memoryGrowth.nightly.groupExecutionSummaryCompact", {
|
|
94443
|
+
changedFiles: parsed.result.changedFiles.length
|
|
93964
94444
|
}) })
|
|
93965
94445
|
] }),
|
|
93966
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionSummary, children: inferExecutionSummary(execution, parsed, t2) })
|
|
94446
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionSummary, children: inferExecutionSummary(execution, parsed, t2) }),
|
|
94447
|
+
candidateSummary2 && /* @__PURE__ */ jsxRuntimeExports.jsx(CandidateSummaryChips, { summary: candidateSummary2, t: t2 })
|
|
93967
94448
|
]
|
|
93968
94449
|
}
|
|
93969
94450
|
),
|
|
93970
|
-
expanded2 && parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailList, children: parsed.results.map((result) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailItem, children: [
|
|
94451
|
+
expanded2 && parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailList, children: parsed.kind === "agent" ? parsed.result.results.map((result) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailItem, children: [
|
|
93971
94452
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailHeader, children: [
|
|
93972
94453
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionDetailName, children: result.agentName }),
|
|
93973
94454
|
/* @__PURE__ */ jsxRuntimeExports.jsx(StatusPill, { status: toPillStatus(result.status), children: t2(`memoryGrowth.nightly.executionStatus.${result.status}`) })
|
|
93974
94455
|
] }),
|
|
94456
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SourceSummarySection, { result, t: t2 }),
|
|
93975
94457
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailSummary, children: summarizeAgentResult(result, t2) }),
|
|
94458
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetStatusChips, { budgetStatus: result.budgetStatus, t: t2 }),
|
|
94459
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetPolicyNotice, { policy: result.budgetPolicy, t: t2 }),
|
|
93976
94460
|
result.changedFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileChipList, children: result.changedFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93977
94461
|
DiffFileChip,
|
|
93978
94462
|
{
|
|
93979
94463
|
file
|
|
93980
94464
|
},
|
|
93981
94465
|
[result.agentId, file.path].join(":")
|
|
93982
|
-
)) })
|
|
93983
|
-
|
|
94466
|
+
)) }),
|
|
94467
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateList, { candidates: result.candidates, t: t2 })
|
|
94468
|
+
] }, result.agentId)) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailItem, children: [
|
|
94469
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailHeader, children: [
|
|
94470
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionDetailName, children: parsed.result.groupName }),
|
|
94471
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StatusPill, { status: toPillStatus(parsed.result.status), children: t2(`memoryGrowth.nightly.executionStatus.${parsed.result.status}`) })
|
|
94472
|
+
] }),
|
|
94473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailSummary, children: summarizeGroupResult(parsed.result, t2) }),
|
|
94474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetStatusChips, { budgetStatus: parsed.result.budgetStatus, t: t2 }),
|
|
94475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetPolicyNotice, { policy: parsed.result.budgetPolicy, t: t2 }),
|
|
94476
|
+
parsed.result.changedFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileChipList, children: parsed.result.changedFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
94477
|
+
DiffFileChip,
|
|
94478
|
+
{
|
|
94479
|
+
file
|
|
94480
|
+
},
|
|
94481
|
+
[parsed.result.groupId, file.path].join(":")
|
|
94482
|
+
)) }),
|
|
94483
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateList, { candidates: parsed.result.candidates, t: t2 })
|
|
94484
|
+
] }) })
|
|
93984
94485
|
] }, execution.id);
|
|
93985
94486
|
}) })
|
|
93986
94487
|
] }),
|
|
@@ -93989,6 +94490,14 @@ function MemoryGrowthPanel() {
|
|
|
93989
94490
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { size: 16 }),
|
|
93990
94491
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: t2("memoryGrowth.nightly.memoryFiles") })
|
|
93991
94492
|
] }),
|
|
94493
|
+
topicFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.topicEntry, children: [
|
|
94494
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.topicEntryHeader, children: [
|
|
94495
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.topicEntryTitle, children: t2("memoryGrowth.nightly.topicFiles") }),
|
|
94496
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.topicEntryCount, children: topicFiles.length })
|
|
94497
|
+
] }),
|
|
94498
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.topicEntryDescription, children: t2("memoryGrowth.nightly.topicFilesDescription") }),
|
|
94499
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.topicEntryList, children: topicFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.topicEntryPath, children: file.path }, file.path)) })
|
|
94500
|
+
] }),
|
|
93992
94501
|
recentFiles.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.empty, children: t2("memoryGrowth.nightly.noRecentFiles") }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileList, children: recentFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileItem, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
93993
94502
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.filePath, children: file.path }),
|
|
93994
94503
|
file.summary ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileSummary, children: file.summary }) : null
|
|
@@ -95340,57 +95849,57 @@ const useChannelStore = create$3((set2, get2) => ({
|
|
|
95340
95849
|
},
|
|
95341
95850
|
stopQrPolling: () => set2((state2) => ({ qrPolling: false, qrRequestId: state2.qrRequestId + 1 }))
|
|
95342
95851
|
}));
|
|
95343
|
-
const container$5 = "
|
|
95344
|
-
const content$2 = "
|
|
95345
|
-
const loading$2 = "
|
|
95346
|
-
const hint = "
|
|
95347
|
-
const empty$1 = "
|
|
95348
|
-
const emptyIcon$1 = "
|
|
95349
|
-
const emptyText$1 = "
|
|
95350
|
-
const channelList = "
|
|
95351
|
-
const channelCard = "
|
|
95352
|
-
const cardHeader = "
|
|
95353
|
-
const platformIcon$1 = "
|
|
95354
|
-
const platformIconWechat = "
|
|
95355
|
-
const platformIconWecom = "
|
|
95356
|
-
const cardInfo = "
|
|
95357
|
-
const platformName = "
|
|
95358
|
-
const targetLabel = "
|
|
95359
|
-
const createdAt = "
|
|
95360
|
-
const statusBadge = "
|
|
95361
|
-
const cardActions = "
|
|
95362
|
-
const editTargetCard = "
|
|
95363
|
-
const bindFlow = "
|
|
95364
|
-
const stepsIndicator = "
|
|
95365
|
-
const stepDot = "
|
|
95366
|
-
const stepDotActive = "
|
|
95367
|
-
const stepNum = "
|
|
95368
|
-
const stepTitle$1 = "
|
|
95369
|
-
const stepContent$1 = "
|
|
95370
|
-
const field = "
|
|
95371
|
-
const stepActions = "
|
|
95372
|
-
const targetKind = "
|
|
95373
|
-
const kindBtn = "
|
|
95374
|
-
const kindBtnActive = "
|
|
95375
|
-
const summary = "
|
|
95376
|
-
const summaryRow = "
|
|
95377
|
-
const summaryLabel = "
|
|
95378
|
-
const mono = "
|
|
95379
|
-
const testResult = "
|
|
95380
|
-
const testing = "
|
|
95381
|
-
const testSuccess = "
|
|
95382
|
-
const testFailed = "
|
|
95383
|
-
const methodChoice = "
|
|
95384
|
-
const methodCard = "
|
|
95385
|
-
const methodCardDisabled = "
|
|
95386
|
-
const methodIcon = "
|
|
95387
|
-
const methodTitle = "
|
|
95388
|
-
const methodDesc = "
|
|
95389
|
-
const qrcodeSection = "
|
|
95390
|
-
const qrImage = "
|
|
95391
|
-
const qrHint = "
|
|
95392
|
-
const qrLoading = "
|
|
95393
|
-
const error$2 = "
|
|
95852
|
+
const container$5 = "_container_1j25l_1";
|
|
95853
|
+
const content$2 = "_content_1j25l_7";
|
|
95854
|
+
const loading$2 = "_loading_1j25l_16";
|
|
95855
|
+
const hint = "_hint_1j25l_26";
|
|
95856
|
+
const empty$1 = "_empty_1j25l_43";
|
|
95857
|
+
const emptyIcon$1 = "_emptyIcon_1j25l_52";
|
|
95858
|
+
const emptyText$1 = "_emptyText_1j25l_57";
|
|
95859
|
+
const channelList = "_channelList_1j25l_68";
|
|
95860
|
+
const channelCard = "_channelCard_1j25l_74";
|
|
95861
|
+
const cardHeader = "_cardHeader_1j25l_88";
|
|
95862
|
+
const platformIcon$1 = "_platformIcon_1j25l_94";
|
|
95863
|
+
const platformIconWechat = "_platformIconWechat_1j25l_104";
|
|
95864
|
+
const platformIconWecom = "_platformIconWecom_1j25l_109";
|
|
95865
|
+
const cardInfo = "_cardInfo_1j25l_114";
|
|
95866
|
+
const platformName = "_platformName_1j25l_122";
|
|
95867
|
+
const targetLabel = "_targetLabel_1j25l_128";
|
|
95868
|
+
const createdAt = "_createdAt_1j25l_136";
|
|
95869
|
+
const statusBadge = "_statusBadge_1j25l_148";
|
|
95870
|
+
const cardActions = "_cardActions_1j25l_185";
|
|
95871
|
+
const editTargetCard = "_editTargetCard_1j25l_196";
|
|
95872
|
+
const bindFlow = "_bindFlow_1j25l_208";
|
|
95873
|
+
const stepsIndicator = "_stepsIndicator_1j25l_215";
|
|
95874
|
+
const stepDot = "_stepDot_1j25l_221";
|
|
95875
|
+
const stepDotActive = "_stepDotActive_1j25l_232";
|
|
95876
|
+
const stepNum = "_stepNum_1j25l_238";
|
|
95877
|
+
const stepTitle$1 = "_stepTitle_1j25l_255";
|
|
95878
|
+
const stepContent$1 = "_stepContent_1j25l_260";
|
|
95879
|
+
const field = "_field_1j25l_266";
|
|
95880
|
+
const stepActions = "_stepActions_1j25l_278";
|
|
95881
|
+
const targetKind = "_targetKind_1j25l_289";
|
|
95882
|
+
const kindBtn = "_kindBtn_1j25l_294";
|
|
95883
|
+
const kindBtnActive = "_kindBtnActive_1j25l_313";
|
|
95884
|
+
const summary = "_summary_1j25l_348";
|
|
95885
|
+
const summaryRow = "_summaryRow_1j25l_358";
|
|
95886
|
+
const summaryLabel = "_summaryLabel_1j25l_365";
|
|
95887
|
+
const mono = "_mono_1j25l_371";
|
|
95888
|
+
const testResult = "_testResult_1j25l_380";
|
|
95889
|
+
const testing = "_testing_1j25l_384";
|
|
95890
|
+
const testSuccess = "_testSuccess_1j25l_393";
|
|
95891
|
+
const testFailed = "_testFailed_1j25l_404";
|
|
95892
|
+
const methodChoice = "_methodChoice_1j25l_425";
|
|
95893
|
+
const methodCard = "_methodCard_1j25l_430";
|
|
95894
|
+
const methodCardDisabled = "_methodCardDisabled_1j25l_451";
|
|
95895
|
+
const methodIcon = "_methodIcon_1j25l_462";
|
|
95896
|
+
const methodTitle = "_methodTitle_1j25l_471";
|
|
95897
|
+
const methodDesc = "_methodDesc_1j25l_477";
|
|
95898
|
+
const qrcodeSection = "_qrcodeSection_1j25l_487";
|
|
95899
|
+
const qrImage = "_qrImage_1j25l_494";
|
|
95900
|
+
const qrHint = "_qrHint_1j25l_503";
|
|
95901
|
+
const qrLoading = "_qrLoading_1j25l_509";
|
|
95902
|
+
const error$2 = "_error_1j25l_518";
|
|
95394
95903
|
const styles$a = {
|
|
95395
95904
|
container: container$5,
|
|
95396
95905
|
content: content$2,
|
|
@@ -95410,12 +95919,12 @@ const styles$a = {
|
|
|
95410
95919
|
targetLabel,
|
|
95411
95920
|
createdAt,
|
|
95412
95921
|
statusBadge,
|
|
95413
|
-
"status-connected": "_status-
|
|
95414
|
-
"status-disconnected": "_status-
|
|
95415
|
-
"status-idle": "_status-
|
|
95416
|
-
"status-connecting": "_status-
|
|
95417
|
-
"status-reconnecting": "_status-
|
|
95418
|
-
"status-auth_failed": "_status-
|
|
95922
|
+
"status-connected": "_status-connected_1j25l_159",
|
|
95923
|
+
"status-disconnected": "_status-disconnected_1j25l_164",
|
|
95924
|
+
"status-idle": "_status-idle_1j25l_165",
|
|
95925
|
+
"status-connecting": "_status-connecting_1j25l_170",
|
|
95926
|
+
"status-reconnecting": "_status-reconnecting_1j25l_171",
|
|
95927
|
+
"status-auth_failed": "_status-auth_failed_1j25l_176",
|
|
95419
95928
|
cardActions,
|
|
95420
95929
|
editTargetCard,
|
|
95421
95930
|
bindFlow,
|
|
@@ -95492,9 +96001,7 @@ function IntegrationPanel({ onClose: _onClose }) {
|
|
|
95492
96001
|
loading: loading2,
|
|
95493
96002
|
bindStep,
|
|
95494
96003
|
fetchChannels,
|
|
95495
|
-
startBind
|
|
95496
|
-
cancelBind,
|
|
95497
|
-
doneBind
|
|
96004
|
+
startBind
|
|
95498
96005
|
} = useChannelStore();
|
|
95499
96006
|
const [confirmUnbindId, setConfirmUnbindId] = reactExports.useState(null);
|
|
95500
96007
|
reactExports.useEffect(() => {
|
|
@@ -95919,7 +96426,6 @@ function BindFlow() {
|
|
|
95919
96426
|
bindBotId,
|
|
95920
96427
|
bindSecret,
|
|
95921
96428
|
bindTarget,
|
|
95922
|
-
bindConnectionId,
|
|
95923
96429
|
testResult: testResult2,
|
|
95924
96430
|
testing: testing2,
|
|
95925
96431
|
qrCodeUrl,
|
|
@@ -95935,7 +96441,6 @@ function BindFlow() {
|
|
|
95935
96441
|
doneBind,
|
|
95936
96442
|
chooseManual,
|
|
95937
96443
|
startQrLogin,
|
|
95938
|
-
pollQrStatus,
|
|
95939
96444
|
stopQrPolling
|
|
95940
96445
|
} = useChannelStore();
|
|
95941
96446
|
const [agents, setAgents] = reactExports.useState([]);
|
|
@@ -96134,11 +96639,12 @@ function BindFlow() {
|
|
|
96134
96639
|
bindStep === "method" && bindChannelType === "wecom-bot" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$a.stepContent, children: [
|
|
96135
96640
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$a.methodChoice, children: [
|
|
96136
96641
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
96137
|
-
"
|
|
96642
|
+
"button",
|
|
96138
96643
|
{
|
|
96644
|
+
type: "button",
|
|
96139
96645
|
className: `${styles$a.methodCard} ${qrStarting ? styles$a.methodCardDisabled : ""}`,
|
|
96140
96646
|
onClick: handleStartQrLogin,
|
|
96141
|
-
|
|
96647
|
+
disabled: qrStarting,
|
|
96142
96648
|
children: [
|
|
96143
96649
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodIcon, children: qrStarting ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { size: 28, className: "kai-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScanQrCode, { size: 28 }) }),
|
|
96144
96650
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodTitle, children: t2("settings.integration.methodQrcode") }),
|
|
@@ -96146,7 +96652,7 @@ function BindFlow() {
|
|
|
96146
96652
|
]
|
|
96147
96653
|
}
|
|
96148
96654
|
),
|
|
96149
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("
|
|
96655
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: styles$a.methodCard, onClick: chooseManual, children: [
|
|
96150
96656
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodIcon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Keyboard, { size: 28 }) }),
|
|
96151
96657
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodTitle, children: t2("settings.integration.methodManual") }),
|
|
96152
96658
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodDesc, children: t2("settings.integration.methodManualDesc") })
|
|
@@ -96581,6 +97087,7 @@ function useConversationView(sessionId) {
|
|
|
96581
97087
|
);
|
|
96582
97088
|
}
|
|
96583
97089
|
const log$5 = createLogger("ChatBox");
|
|
97090
|
+
const COMPACT_SUGGESTION_COMPLETE_VISIBLE_MS = 2e3;
|
|
96584
97091
|
const EMPTY_IDS = [];
|
|
96585
97092
|
function ChatBox({
|
|
96586
97093
|
sessionId,
|
|
@@ -96658,8 +97165,17 @@ function ChatBox({
|
|
|
96658
97165
|
}, [sessionContext, activeView, agents, t2]);
|
|
96659
97166
|
const [dialog2, setDialog] = reactExports.useState(null);
|
|
96660
97167
|
const { notification: notification2, setNotification } = useNotification(sessionId, retryInfo);
|
|
96661
|
-
const
|
|
97168
|
+
const contextCompaction = useMessageStore(
|
|
97169
|
+
reactExports.useMemo(() => (s2) => s2.getContextCompaction(sessionId), [sessionId])
|
|
97170
|
+
);
|
|
96662
97171
|
const [compactSuggestionStatus, setCompactSuggestionStatus] = reactExports.useState("idle");
|
|
97172
|
+
const compactSuggestion = useContextCompactSuggestion(
|
|
97173
|
+
sessionId,
|
|
97174
|
+
messages,
|
|
97175
|
+
sending,
|
|
97176
|
+
contextCompaction,
|
|
97177
|
+
compactSuggestionStatus === "running"
|
|
97178
|
+
);
|
|
96663
97179
|
const { showToast } = useToast();
|
|
96664
97180
|
const [deleteConfirm, setDeleteConfirm] = reactExports.useState(false);
|
|
96665
97181
|
const isGroupConversation = conversation2?.type === "group";
|
|
@@ -96792,34 +97308,28 @@ function ChatBox({
|
|
|
96792
97308
|
return "";
|
|
96793
97309
|
}
|
|
96794
97310
|
}, [sessionId]);
|
|
96795
|
-
const handleCompact = reactExports.useCallback(async () => {
|
|
96796
|
-
messageListRef.current?.scrollToBottom();
|
|
96797
|
-
const result = await handleSendMessage({ content: "/compact", attachments: [], mentions: [] });
|
|
96798
|
-
if (result) setNotification(result);
|
|
96799
|
-
return result;
|
|
96800
|
-
}, [handleSendMessage, setNotification]);
|
|
96801
|
-
const handleClearRequest = reactExports.useCallback(() => {
|
|
96802
|
-
setDialog({ type: "confirmClear" });
|
|
96803
|
-
}, []);
|
|
96804
97311
|
const handleAcceptCompactSuggestion = reactExports.useCallback(() => {
|
|
96805
97312
|
setCompactSuggestionStatus("running");
|
|
96806
97313
|
getTransport().compactConversation(sessionId).then(async () => {
|
|
96807
97314
|
await getTransport().requestConversationSnapshot(sessionId);
|
|
96808
97315
|
setCompactSuggestionStatus("completed");
|
|
97316
|
+
compactSuggestion.dismiss();
|
|
97317
|
+
window.setTimeout(() => {
|
|
97318
|
+
setCompactSuggestionStatus((current) => current === "completed" ? "idle" : current);
|
|
97319
|
+
}, COMPACT_SUGGESTION_COMPLETE_VISIBLE_MS);
|
|
96809
97320
|
}).catch((error2) => {
|
|
96810
97321
|
log$5.error("Failed to compact from suggestion:", error2);
|
|
96811
97322
|
setCompactSuggestionStatus("failed");
|
|
96812
97323
|
});
|
|
96813
|
-
}, [sessionId]);
|
|
97324
|
+
}, [compactSuggestion, sessionId]);
|
|
96814
97325
|
const maintenanceEvent = compactSuggestion.visible || compactSuggestionStatus !== "idle" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
96815
97326
|
ContextCompactSuggestion,
|
|
96816
97327
|
{
|
|
96817
97328
|
disabled: sending || compactSuggestionStatus === "running",
|
|
96818
97329
|
status: compactSuggestionStatus,
|
|
96819
97330
|
onAccept: handleAcceptCompactSuggestion,
|
|
96820
|
-
onClearContext: handleClearRequest,
|
|
96821
97331
|
onDismiss: compactSuggestion.dismiss,
|
|
96822
|
-
|
|
97332
|
+
onRemindLater: compactSuggestion.remindLater
|
|
96823
97333
|
}
|
|
96824
97334
|
) : null;
|
|
96825
97335
|
const sendClearCommand = reactExports.useCallback(() => {
|
|
@@ -96911,9 +97421,6 @@ function ChatBox({
|
|
|
96911
97421
|
onSend,
|
|
96912
97422
|
onStop: handleStopChat,
|
|
96913
97423
|
onCancelQueue: handleCancelQueue,
|
|
96914
|
-
onCompact: handleCompact,
|
|
96915
|
-
onClearRequest: handleClearRequest,
|
|
96916
|
-
onClearCommand: sendClearCommand,
|
|
96917
97424
|
memberAgentIds,
|
|
96918
97425
|
placeholder: sessionPlaceholder
|
|
96919
97426
|
}
|
|
@@ -97478,7 +97985,7 @@ function useSidebarSearch() {
|
|
|
97478
97985
|
searchInputRef
|
|
97479
97986
|
};
|
|
97480
97987
|
}
|
|
97481
|
-
const version = "1.10.
|
|
97988
|
+
const version = "1.10.2";
|
|
97482
97989
|
const pkg = {
|
|
97483
97990
|
version
|
|
97484
97991
|
};
|
|
@@ -97841,7 +98348,7 @@ const styles$4 = {
|
|
|
97841
98348
|
emptyIcon,
|
|
97842
98349
|
emptyText
|
|
97843
98350
|
};
|
|
97844
|
-
function WelcomeState({
|
|
98351
|
+
function WelcomeState({ onCreateGroup }) {
|
|
97845
98352
|
const { t: t2 } = useTranslation();
|
|
97846
98353
|
const { agents } = useAgentStore();
|
|
97847
98354
|
if (agents.length === 0) {
|