@sinm/kai 1.11.13 → 1.11.14
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/RELEASE_NOTES.md +34 -0
- package/dist-cli/kai-cli.js +536 -224
- package/dist-electron/renderer/assets/{_baseUniq-CRj376uR.js → _baseUniq-CerLXXIi.js} +1 -1
- package/dist-electron/renderer/assets/_baseUniq-CerLXXIi.js.gz +0 -0
- package/dist-electron/renderer/assets/{arc-DIwTm3t_.js → arc-Dj-GOZZ3.js} +1 -1
- package/dist-electron/renderer/assets/arc-Dj-GOZZ3.js.gz +0 -0
- package/dist-electron/renderer/assets/{architectureDiagram-Q4EWVU46-bDRbpaRf.js → architectureDiagram-Q4EWVU46-BcL3ZlRm.js} +5 -5
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-BcL3ZlRm.js.gz +0 -0
- package/dist-electron/renderer/assets/{blockDiagram-DXYQGD6D-zvfZ8nzt.js → blockDiagram-DXYQGD6D-BwjfgwxW.js} +6 -6
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-BwjfgwxW.js.gz +0 -0
- package/dist-electron/renderer/assets/{c4Diagram-AHTNJAMY-B_32vDMN.js → c4Diagram-AHTNJAMY-TLOk2Rzr.js} +2 -2
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-TLOk2Rzr.js.gz +0 -0
- package/dist-electron/renderer/assets/{channel-Cjy8czCT.js → channel-BccHmWUB.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4BX2VUAB-BFWxl8Ub.js → chunk-4BX2VUAB-CzgkShqk.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4TB4RGXK-N10-DQGl.js → chunk-4TB4RGXK-DFtDEeLH.js} +5 -5
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-DFtDEeLH.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-55IACEB6-l5MgCsYo.js → chunk-55IACEB6-BqF2qK9M.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-EDXVE4YY-zH-9nazD.js → chunk-EDXVE4YY-DChUanCz.js} +1 -1
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-DChUanCz.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-FMBD7UC4-Ci9BhV6d.js → chunk-FMBD7UC4-BbPyo3BZ.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-OYMX7WX6-B1YSVlfE.js → chunk-OYMX7WX6-BEKYZKQi.js} +3 -3
- package/dist-electron/renderer/assets/{chunk-OYMX7WX6-B1YSVlfE.js.gz → chunk-OYMX7WX6-BEKYZKQi.js.gz} +0 -0
- package/dist-electron/renderer/assets/{chunk-QZHKN3VN-3Y6e6EIO.js → chunk-QZHKN3VN-C3Cgd7gN.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-YZCP3GAM-pOR6xBBq.js → chunk-YZCP3GAM-Dl_uZrkl.js} +1 -1
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-Dl_uZrkl.js.gz +0 -0
- package/dist-electron/renderer/assets/{classDiagram-6PBFFD2Q-BXb_JPfw.js → classDiagram-6PBFFD2Q-LFmnKQkc.js} +6 -6
- package/dist-electron/renderer/assets/{classDiagram-v2-HSJHXN6E-BXb_JPfw.js → classDiagram-v2-HSJHXN6E-LFmnKQkc.js} +6 -6
- package/dist-electron/renderer/assets/{clone-B0vkqCGp.js → clone-CecjPsGH.js} +1 -1
- package/dist-electron/renderer/assets/{cose-bilkent-S5V4N54A-BbW17dU-.js → cose-bilkent-S5V4N54A-DPPsXyV-.js} +1 -1
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-DPPsXyV-.js.gz +0 -0
- package/dist-electron/renderer/assets/{dagre-KV5264BT-MwrWb2uf.js → dagre-KV5264BT-BSQoV8v0.js} +6 -6
- package/dist-electron/renderer/assets/dagre-KV5264BT-BSQoV8v0.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-5BDNPKRD-BLyeFlAj.js → diagram-5BDNPKRD-MkmKHw6a.js} +6 -6
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-MkmKHw6a.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-G4DWMVQ6-CBVExMBo.js → diagram-G4DWMVQ6-YCtrBght.js} +6 -6
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-YCtrBght.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-MMDJMWI5-B9fEWVY2.js → diagram-MMDJMWI5-D0o4g7zX.js} +5 -5
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-D0o4g7zX.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-TYMM5635-Bq5cwF4J.js → diagram-TYMM5635-D5gIbCxB.js} +5 -5
- package/dist-electron/renderer/assets/diagram-TYMM5635-D5gIbCxB.js.gz +0 -0
- package/dist-electron/renderer/assets/{erDiagram-SMLLAGMA-Dn4wLlAp.js → erDiagram-SMLLAGMA-XyfKI1qN.js} +4 -4
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-XyfKI1qN.js.gz +0 -0
- package/dist-electron/renderer/assets/{flowDiagram-DWJPFMVM-DDh9pAiI.js → flowDiagram-DWJPFMVM-mgrC9EbC.js} +6 -6
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-mgrC9EbC.js.gz +0 -0
- package/dist-electron/renderer/assets/{ganttDiagram-T4ZO3ILL-CEY94FIO.js → ganttDiagram-T4ZO3ILL-ZWffbcZQ.js} +2 -2
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-ZWffbcZQ.js.gz +0 -0
- package/dist-electron/renderer/assets/{gitGraphDiagram-UUTBAWPF-5Yd5Dgfe.js → gitGraphDiagram-UUTBAWPF-DbUEFZOK.js} +6 -6
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-DbUEFZOK.js.gz +0 -0
- package/dist-electron/renderer/assets/{graph-78da7eS0.js → graph-B-JKwWZb.js} +2 -2
- package/dist-electron/renderer/assets/graph-B-JKwWZb.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-BykJ73S2.js → index-Cs8g_myB.js} +1190 -504
- package/dist-electron/renderer/assets/index-Cs8g_myB.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-CvjdhG02.css → index-Dz3R2cd-.css} +614 -452
- package/dist-electron/renderer/assets/index-Dz3R2cd-.css.gz +0 -0
- package/dist-electron/renderer/assets/{infoDiagram-42DDH7IO-DNMARZQz.js → infoDiagram-42DDH7IO-D6Ue_jvi.js} +4 -4
- package/dist-electron/renderer/assets/{ishikawaDiagram-UXIWVN3A-CxXJpYyf.js → ishikawaDiagram-UXIWVN3A-DrIlMxS-.js} +1 -1
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-DrIlMxS-.js.gz +0 -0
- package/dist-electron/renderer/assets/{journeyDiagram-VCZTEJTY-UEIeFGlP.js → journeyDiagram-VCZTEJTY-Ddl0Xi1J.js} +4 -4
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-Ddl0Xi1J.js.gz +0 -0
- package/dist-electron/renderer/assets/{kanban-definition-6JOO6SKY-CK3GNpav.js → kanban-definition-6JOO6SKY--HctbUTU.js} +2 -2
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY--HctbUTU.js.gz +0 -0
- package/dist-electron/renderer/assets/{layout-Dz36l4_v.js → layout-Bp_X7Z4O.js} +4 -4
- package/dist-electron/renderer/assets/layout-Bp_X7Z4O.js.gz +0 -0
- package/dist-electron/renderer/assets/{linear-B7q_D9zY.js → linear-2qY8IJpz.js} +1 -1
- package/dist-electron/renderer/assets/linear-2qY8IJpz.js.gz +0 -0
- package/dist-electron/renderer/assets/{min-CxUZyGqg.js → min-DA_SGn1t.js} +2 -2
- package/dist-electron/renderer/assets/min-DA_SGn1t.js.gz +0 -0
- package/dist-electron/renderer/assets/{mindmap-definition-QFDTVHPH-DqcK_9Qf.js → mindmap-definition-QFDTVHPH-C6tovAgS.js} +3 -3
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-C6tovAgS.js.gz +0 -0
- package/dist-electron/renderer/assets/{pieDiagram-DEJITSTG-B1KsaGsG.js → pieDiagram-DEJITSTG-CwNwfqQB.js} +6 -6
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-CwNwfqQB.js.gz +0 -0
- package/dist-electron/renderer/assets/{quadrantDiagram-34T5L4WZ-BD2T705a.js → quadrantDiagram-34T5L4WZ-C910cPss.js} +2 -2
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-C910cPss.js.gz +0 -0
- package/dist-electron/renderer/assets/{requirementDiagram-MS252O5E-BDdmAxXD.js → requirementDiagram-MS252O5E-D-d3ff1p.js} +3 -3
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-D-d3ff1p.js.gz +0 -0
- package/dist-electron/renderer/assets/{sankeyDiagram-XADWPNL6-V3eFjuxj.js → sankeyDiagram-XADWPNL6-Brry3E6B.js} +1 -1
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-Brry3E6B.js.gz +0 -0
- package/dist-electron/renderer/assets/{sequenceDiagram-FGHM5R23-BfoTolQ-.js → sequenceDiagram-FGHM5R23-DSVuyveR.js} +3 -3
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-DSVuyveR.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-FHFEXIEX-CX_kyH3O.js → stateDiagram-FHFEXIEX-DSYTn62B.js} +8 -8
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-DSYTn62B.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-v2-QKLJ7IA2-BK2tu0qC.js → stateDiagram-v2-QKLJ7IA2-DQMP9Qap.js} +4 -4
- package/dist-electron/renderer/assets/{timeline-definition-GMOUNBTQ-CBt5eSpj.js → timeline-definition-GMOUNBTQ-DGyTh_MD.js} +2 -2
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-DGyTh_MD.js.gz +0 -0
- package/dist-electron/renderer/assets/{vennDiagram-DHZGUBPP-CWiWOiiN.js → vennDiagram-DHZGUBPP-DQrYqDXp.js} +1 -1
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-DQrYqDXp.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardley-RL74JXVD-DAa2tsnZ.js → wardley-RL74JXVD-CU0rey2n.js} +3 -3
- package/dist-electron/renderer/assets/wardley-RL74JXVD-CU0rey2n.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardleyDiagram-NUSXRM2D-DO0JkIp0.js → wardleyDiagram-NUSXRM2D-Bv13mYfJ.js} +5 -5
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-Bv13mYfJ.js.gz +0 -0
- package/dist-electron/renderer/assets/{xychartDiagram-5P7HB3ND-Je5kScAr.js → xychartDiagram-5P7HB3ND-nf0jRPUz.js} +2 -2
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-nf0jRPUz.js.gz +0 -0
- package/dist-electron/renderer/index.html +2 -2
- package/package.json +1 -1
- package/dist-electron/renderer/assets/_baseUniq-CRj376uR.js.gz +0 -0
- package/dist-electron/renderer/assets/arc-DIwTm3t_.js.gz +0 -0
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-bDRbpaRf.js.gz +0 -0
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-zvfZ8nzt.js.gz +0 -0
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-B_32vDMN.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-N10-DQGl.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-zH-9nazD.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-pOR6xBBq.js.gz +0 -0
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-BbW17dU-.js.gz +0 -0
- package/dist-electron/renderer/assets/dagre-KV5264BT-MwrWb2uf.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-BLyeFlAj.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-CBVExMBo.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-B9fEWVY2.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-TYMM5635-Bq5cwF4J.js.gz +0 -0
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-Dn4wLlAp.js.gz +0 -0
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-DDh9pAiI.js.gz +0 -0
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-CEY94FIO.js.gz +0 -0
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-5Yd5Dgfe.js.gz +0 -0
- package/dist-electron/renderer/assets/graph-78da7eS0.js.gz +0 -0
- package/dist-electron/renderer/assets/index-BykJ73S2.js.gz +0 -0
- package/dist-electron/renderer/assets/index-CvjdhG02.css.gz +0 -0
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-CxXJpYyf.js.gz +0 -0
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-UEIeFGlP.js.gz +0 -0
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-CK3GNpav.js.gz +0 -0
- package/dist-electron/renderer/assets/layout-Dz36l4_v.js.gz +0 -0
- package/dist-electron/renderer/assets/linear-B7q_D9zY.js.gz +0 -0
- package/dist-electron/renderer/assets/min-CxUZyGqg.js.gz +0 -0
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-DqcK_9Qf.js.gz +0 -0
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-B1KsaGsG.js.gz +0 -0
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-BD2T705a.js.gz +0 -0
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-BDdmAxXD.js.gz +0 -0
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-V3eFjuxj.js.gz +0 -0
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-BfoTolQ-.js.gz +0 -0
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-CX_kyH3O.js.gz +0 -0
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-CBt5eSpj.js.gz +0 -0
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-CWiWOiiN.js.gz +0 -0
- package/dist-electron/renderer/assets/wardley-RL74JXVD-DAa2tsnZ.js.gz +0 -0
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-DO0JkIp0.js.gz +0 -0
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-Je5kScAr.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-BSQoV8v0.js","./graph-B-JKwWZb.js","./_baseUniq-CerLXXIi.js","./layout-Bp_X7Z4O.js","./min-DA_SGn1t.js","./clone-CecjPsGH.js","./cose-bilkent-S5V4N54A-DPPsXyV-.js","./cytoscape.esm-D6E6cAed.js","./c4Diagram-AHTNJAMY-TLOk2Rzr.js","./chunk-YZCP3GAM-Dl_uZrkl.js","./flowDiagram-DWJPFMVM-mgrC9EbC.js","./chunk-FMBD7UC4-BbPyo3BZ.js","./chunk-55IACEB6-BqF2qK9M.js","./chunk-EDXVE4YY-DChUanCz.js","./channel-BccHmWUB.js","./erDiagram-SMLLAGMA-XyfKI1qN.js","./gitGraphDiagram-UUTBAWPF-DbUEFZOK.js","./chunk-4BX2VUAB-CzgkShqk.js","./chunk-QZHKN3VN-C3Cgd7gN.js","./wardley-RL74JXVD-CU0rey2n.js","./ganttDiagram-T4ZO3ILL-ZWffbcZQ.js","./linear-2qY8IJpz.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-42DDH7IO-D6Ue_jvi.js","./pieDiagram-DEJITSTG-CwNwfqQB.js","./arc-Dj-GOZZ3.js","./ordinal-CxptdPJm.js","./quadrantDiagram-34T5L4WZ-C910cPss.js","./xychartDiagram-5P7HB3ND-nf0jRPUz.js","./requirementDiagram-MS252O5E-D-d3ff1p.js","./sequenceDiagram-FGHM5R23-DSVuyveR.js","./classDiagram-6PBFFD2Q-LFmnKQkc.js","./chunk-4TB4RGXK-DFtDEeLH.js","./classDiagram-v2-HSJHXN6E-LFmnKQkc.js","./stateDiagram-FHFEXIEX-DSYTn62B.js","./chunk-OYMX7WX6-BEKYZKQi.js","./stateDiagram-v2-QKLJ7IA2-DQMP9Qap.js","./journeyDiagram-VCZTEJTY-Ddl0Xi1J.js","./timeline-definition-GMOUNBTQ-DGyTh_MD.js","./mindmap-definition-QFDTVHPH-C6tovAgS.js","./kanban-definition-6JOO6SKY--HctbUTU.js","./sankeyDiagram-XADWPNL6-Brry3E6B.js","./diagram-TYMM5635-D5gIbCxB.js","./diagram-MMDJMWI5-D0o4g7zX.js","./blockDiagram-DXYQGD6D-BwjfgwxW.js","./diagram-5BDNPKRD-MkmKHw6a.js","./architectureDiagram-Q4EWVU46-BcL3ZlRm.js","./diagram-G4DWMVQ6-YCtrBght.js","./wardleyDiagram-NUSXRM2D-Bv13mYfJ.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];
|
|
@@ -18336,7 +18336,7 @@ function projectSingleEvent(event, messagesMap, state2) {
|
|
|
18336
18336
|
case "message.accepted":
|
|
18337
18337
|
return projectMessageAccepted(event, messagesMap, state2);
|
|
18338
18338
|
case "run.started":
|
|
18339
|
-
return projectRunStarted(event, messagesMap);
|
|
18339
|
+
return projectRunStarted(event, messagesMap, state2);
|
|
18340
18340
|
case "run.progress":
|
|
18341
18341
|
return projectRunProgress(event, state2);
|
|
18342
18342
|
case "message.block.updated":
|
|
@@ -18392,6 +18392,23 @@ function projectSnapshot(event, messagesMap, state2) {
|
|
|
18392
18392
|
event.runtime?.guidanceRequests,
|
|
18393
18393
|
state2.messageUiStateMap
|
|
18394
18394
|
);
|
|
18395
|
+
let snapshotUiChanged = !!messageUiStateMap;
|
|
18396
|
+
const finalUiMap = messageUiStateMap ?? new Map(state2.messageUiStateMap);
|
|
18397
|
+
const sessionUiState = finalUiMap.get(cid);
|
|
18398
|
+
if (sessionUiState) {
|
|
18399
|
+
const updatedSessionUiState = new Map(sessionUiState);
|
|
18400
|
+
for (const msg of snapshotWindow.messages) {
|
|
18401
|
+
const existing = updatedSessionUiState.get(msg.id);
|
|
18402
|
+
if (existing?.pendingBlockReset) {
|
|
18403
|
+
const { pendingBlockReset: _2, ...rest } = existing;
|
|
18404
|
+
updatedSessionUiState.set(msg.id, rest);
|
|
18405
|
+
snapshotUiChanged = true;
|
|
18406
|
+
}
|
|
18407
|
+
}
|
|
18408
|
+
if (snapshotUiChanged) {
|
|
18409
|
+
finalUiMap.set(cid, updatedSessionUiState);
|
|
18410
|
+
}
|
|
18411
|
+
}
|
|
18395
18412
|
if (activeRun) {
|
|
18396
18413
|
runMetricsMap.set(cid, {
|
|
18397
18414
|
startedAt: activeRun.startedAt,
|
|
@@ -18412,7 +18429,7 @@ function projectSnapshot(event, messagesMap, state2) {
|
|
|
18412
18429
|
memberAgentIdsMap: /* @__PURE__ */ new Map([[cid, event.memberAgentIds]]),
|
|
18413
18430
|
queueCountMap: /* @__PURE__ */ new Map([[cid, event.queue.pending]]),
|
|
18414
18431
|
queuedMessageIdsMap: /* @__PURE__ */ new Map([[cid, new Set(event.queue.pendingMessageIds ?? [])]]),
|
|
18415
|
-
...
|
|
18432
|
+
...snapshotUiChanged ? { messageUiStateMap: finalUiMap } : {},
|
|
18416
18433
|
sendingMap: /* @__PURE__ */ new Map([[cid, event.queue.running]]),
|
|
18417
18434
|
loadingMap: /* @__PURE__ */ new Map([[cid, false]]),
|
|
18418
18435
|
hasMoreMap: /* @__PURE__ */ new Map([[cid, snapshotWindow.hasMore]]),
|
|
@@ -18613,13 +18630,16 @@ function projectMessageAccepted(event, messagesMap, state2) {
|
|
|
18613
18630
|
contextCompactionMap: updates
|
|
18614
18631
|
};
|
|
18615
18632
|
}
|
|
18616
|
-
function projectRunStarted(event, messagesMap) {
|
|
18633
|
+
function projectRunStarted(event, messagesMap, state2) {
|
|
18617
18634
|
const cid = event.sessionId;
|
|
18618
18635
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
18619
18636
|
const existing = current.get(event.messageId);
|
|
18620
18637
|
if (existing && isStaleRunEventForTerminalMessage(existing, event.runId)) {
|
|
18621
18638
|
return {};
|
|
18622
18639
|
}
|
|
18640
|
+
const isRetry = !!state2.retryingMap.get(cid);
|
|
18641
|
+
const isCrossRun = !!existing && existing.runId !== void 0 && existing.runId !== event.runId;
|
|
18642
|
+
const hasContent = !!(existing && existing.blocks.length > 0);
|
|
18623
18643
|
if (!existing) {
|
|
18624
18644
|
current.set(event.messageId, withStreamingLifecycle({
|
|
18625
18645
|
id: event.messageId,
|
|
@@ -18631,7 +18651,14 @@ function projectRunStarted(event, messagesMap) {
|
|
|
18631
18651
|
updatedAt: event.createdAt,
|
|
18632
18652
|
runId: event.runId
|
|
18633
18653
|
}));
|
|
18634
|
-
} else if (
|
|
18654
|
+
} else if (isCrossRun && isRetry && hasContent) {
|
|
18655
|
+
current.set(event.messageId, withStreamingLifecycle({
|
|
18656
|
+
...existing,
|
|
18657
|
+
runId: event.runId,
|
|
18658
|
+
error: void 0,
|
|
18659
|
+
updatedAt: event.createdAt
|
|
18660
|
+
}));
|
|
18661
|
+
} else if (isCrossRun) {
|
|
18635
18662
|
current.set(event.messageId, withStreamingLifecycle({
|
|
18636
18663
|
...existing,
|
|
18637
18664
|
runId: event.runId,
|
|
@@ -18647,12 +18674,16 @@ function projectRunStarted(event, messagesMap) {
|
|
|
18647
18674
|
updatedAt: event.createdAt
|
|
18648
18675
|
}));
|
|
18649
18676
|
}
|
|
18650
|
-
|
|
18677
|
+
const result = {
|
|
18651
18678
|
messagesMap: /* @__PURE__ */ new Map([[cid, current]]),
|
|
18652
18679
|
activeRunIdMap: /* @__PURE__ */ new Map([[cid, event.runId]]),
|
|
18653
18680
|
retryingMap: /* @__PURE__ */ new Map([[cid, null]]),
|
|
18654
18681
|
runMetricsMap: /* @__PURE__ */ new Map([[cid, { startedAt: event.createdAt }]])
|
|
18655
18682
|
};
|
|
18683
|
+
if (isCrossRun && isRetry && hasContent) {
|
|
18684
|
+
Object.assign(result, patchMessageUiState(state2, cid, event.messageId, { pendingBlockReset: true }));
|
|
18685
|
+
}
|
|
18686
|
+
return result;
|
|
18656
18687
|
}
|
|
18657
18688
|
function projectRunProgress(event, state2) {
|
|
18658
18689
|
const cid = event.sessionId;
|
|
@@ -18736,7 +18767,11 @@ function projectBlockUpdated(event, messagesMap, state2) {
|
|
|
18736
18767
|
pendingFetches: [{ sessionId: cid, messageId: event.messageId, block: event.block }]
|
|
18737
18768
|
};
|
|
18738
18769
|
}
|
|
18739
|
-
const
|
|
18770
|
+
const sessionUiState = state2.messageUiStateMap.get(cid);
|
|
18771
|
+
const msgUiState = sessionUiState?.get(event.messageId);
|
|
18772
|
+
const pendingBlockReset = msgUiState?.pendingBlockReset;
|
|
18773
|
+
const baseBlocks = pendingBlockReset ? [] : previous2.blocks;
|
|
18774
|
+
const nextBlocks = applyBlockUpdate(baseBlocks, event.block);
|
|
18740
18775
|
const hasActiveRun = !!state2.activeRunIdMap.get(cid);
|
|
18741
18776
|
current.set(event.messageId, withLegacyStreamingFlag({
|
|
18742
18777
|
...previous2,
|
|
@@ -18746,10 +18781,15 @@ function projectBlockUpdated(event, messagesMap, state2) {
|
|
|
18746
18781
|
const newRevision = (state2.streamRevisionMap.get(cid) ?? 0) + 1;
|
|
18747
18782
|
const newRevisionMap = new Map(state2.streamRevisionMap);
|
|
18748
18783
|
newRevisionMap.set(cid, newRevision);
|
|
18749
|
-
|
|
18784
|
+
const result = {
|
|
18750
18785
|
messagesMap: /* @__PURE__ */ new Map([[cid, current]]),
|
|
18751
18786
|
streamRevisionMap: newRevisionMap
|
|
18752
18787
|
};
|
|
18788
|
+
if (pendingBlockReset) {
|
|
18789
|
+
const uiUpdate = clearMessageUiStateField(state2, cid, event.messageId, "pendingBlockReset");
|
|
18790
|
+
if (uiUpdate) Object.assign(result, uiUpdate);
|
|
18791
|
+
}
|
|
18792
|
+
return result;
|
|
18753
18793
|
}
|
|
18754
18794
|
function projectMessageMetadataUpdated(event, messagesMap, state2) {
|
|
18755
18795
|
const cid = event.sessionId;
|
|
@@ -18899,12 +18939,15 @@ function projectRunTerminal(event, messagesMap, state2) {
|
|
|
18899
18939
|
}
|
|
18900
18940
|
const newMetricsMap = new Map(state2.runMetricsMap);
|
|
18901
18941
|
newMetricsMap.set(cid, void 0);
|
|
18902
|
-
|
|
18942
|
+
const result = {
|
|
18903
18943
|
messagesMap: /* @__PURE__ */ new Map([[cid, current]]),
|
|
18904
18944
|
activeRunIdMap: /* @__PURE__ */ new Map([[cid, void 0]]),
|
|
18905
18945
|
retryingMap: /* @__PURE__ */ new Map([[cid, null]]),
|
|
18906
18946
|
runMetricsMap: newMetricsMap
|
|
18907
18947
|
};
|
|
18948
|
+
const terminalUiUpdate = clearMessageUiStateField(state2, cid, event.messageId, "pendingBlockReset");
|
|
18949
|
+
if (terminalUiUpdate) Object.assign(result, terminalUiUpdate);
|
|
18950
|
+
return result;
|
|
18908
18951
|
}
|
|
18909
18952
|
function statusForTerminalEvent(event) {
|
|
18910
18953
|
switch (event.type) {
|
|
@@ -18953,13 +18996,37 @@ function isStaleRunEventForTerminalMessage(message2, runId) {
|
|
|
18953
18996
|
if (!isEventForDifferentRun(message2, runId)) return false;
|
|
18954
18997
|
return message2.status === "completed" || message2.status === "failed" || message2.status === "cancelled";
|
|
18955
18998
|
}
|
|
18999
|
+
function patchMessageUiState(state2, sessionId, messageId, patch2) {
|
|
19000
|
+
const uiMap = new Map(state2.messageUiStateMap);
|
|
19001
|
+
const sessionUiMap = new Map(uiMap.get(sessionId) ?? []);
|
|
19002
|
+
const existing = sessionUiMap.get(messageId) ?? {};
|
|
19003
|
+
sessionUiMap.set(messageId, { ...existing, ...patch2 });
|
|
19004
|
+
uiMap.set(sessionId, sessionUiMap);
|
|
19005
|
+
return { messageUiStateMap: uiMap };
|
|
19006
|
+
}
|
|
19007
|
+
function clearMessageUiStateField(state2, sessionId, messageId, field2) {
|
|
19008
|
+
const sessionUiState = state2.messageUiStateMap.get(sessionId);
|
|
19009
|
+
const existing = sessionUiState?.get(messageId);
|
|
19010
|
+
if (!existing || !(field2 in existing)) return null;
|
|
19011
|
+
const uiMap = new Map(state2.messageUiStateMap);
|
|
19012
|
+
const sessionUiMap = new Map(uiMap.get(sessionId) ?? []);
|
|
19013
|
+
const { [field2]: _2, ...rest } = existing;
|
|
19014
|
+
sessionUiMap.set(messageId, rest);
|
|
19015
|
+
uiMap.set(sessionId, sessionUiMap);
|
|
19016
|
+
return { messageUiStateMap: uiMap };
|
|
19017
|
+
}
|
|
18956
19018
|
function projectQueueUpdated(event, state2) {
|
|
18957
19019
|
const wasRunning = state2.sendingMap.get(event.sessionId) ?? false;
|
|
18958
19020
|
const isRunning = event.queue.running;
|
|
18959
19021
|
const update2 = {
|
|
18960
19022
|
queueCountMap: /* @__PURE__ */ new Map([[event.sessionId, event.queue.pending]]),
|
|
18961
19023
|
queuedMessageIdsMap: /* @__PURE__ */ new Map([[event.sessionId, new Set(event.queue.pendingMessageIds ?? [])]]),
|
|
18962
|
-
sendingMap: /* @__PURE__ */ new Map([[event.sessionId, isRunning]])
|
|
19024
|
+
sendingMap: /* @__PURE__ */ new Map([[event.sessionId, isRunning]]),
|
|
19025
|
+
activeRunIdMap: /* @__PURE__ */ new Map([[event.sessionId, isRunning ? event.queue.activeRunId : void 0]]),
|
|
19026
|
+
...!isRunning ? {
|
|
19027
|
+
retryingMap: /* @__PURE__ */ new Map([[event.sessionId, null]]),
|
|
19028
|
+
runMetricsMap: /* @__PURE__ */ new Map([[event.sessionId, void 0]])
|
|
19029
|
+
} : {}
|
|
18963
19030
|
};
|
|
18964
19031
|
if (wasRunning && !isRunning) {
|
|
18965
19032
|
update2.completedMap = /* @__PURE__ */ new Map([[event.sessionId, true]]);
|
|
@@ -19777,6 +19844,7 @@ function pickDirectRepresentative(sessions) {
|
|
|
19777
19844
|
const useConversationStore = create$3((set2, get2) => ({
|
|
19778
19845
|
activeSessionId: null,
|
|
19779
19846
|
activeSessionEpoch: 0,
|
|
19847
|
+
pendingSwitchSessionId: null,
|
|
19780
19848
|
agentConversations: /* @__PURE__ */ new Map(),
|
|
19781
19849
|
directSessionsByAgentId: /* @__PURE__ */ new Map(),
|
|
19782
19850
|
groupChats: [],
|
|
@@ -19790,7 +19858,8 @@ const useConversationStore = create$3((set2, get2) => ({
|
|
|
19790
19858
|
const state2 = get2();
|
|
19791
19859
|
const updates = {
|
|
19792
19860
|
activeSessionId: id32,
|
|
19793
|
-
activeSessionEpoch: id32 ? state2.activeSessionEpoch + 1 : state2.activeSessionEpoch
|
|
19861
|
+
activeSessionEpoch: id32 ? state2.activeSessionEpoch + 1 : state2.activeSessionEpoch,
|
|
19862
|
+
pendingSwitchSessionId: id32 && id32 !== state2.activeSessionId ? id32 : id32 ? null : null
|
|
19794
19863
|
};
|
|
19795
19864
|
if (id32) {
|
|
19796
19865
|
const view = deriveActiveView(
|
|
@@ -19815,6 +19884,11 @@ const useConversationStore = create$3((set2, get2) => ({
|
|
|
19815
19884
|
}
|
|
19816
19885
|
}
|
|
19817
19886
|
},
|
|
19887
|
+
clearPendingSwitchSessionId: (sessionId) => {
|
|
19888
|
+
set2(
|
|
19889
|
+
(state2) => state2.pendingSwitchSessionId === sessionId ? { pendingSwitchSessionId: null } : {}
|
|
19890
|
+
);
|
|
19891
|
+
},
|
|
19818
19892
|
resolveGroupSession: (groupId) => {
|
|
19819
19893
|
const state2 = get2();
|
|
19820
19894
|
const remembered = state2.lastActiveSessionByGroup.get(groupId);
|
|
@@ -29098,9 +29172,9 @@ function extractWorkdirFromBlock(block) {
|
|
|
29098
29172
|
async function resolveDefaultCwd(messages2, conversationType, ownerId) {
|
|
29099
29173
|
const lastWorkdir = getLastToolWorkdir(messages2);
|
|
29100
29174
|
if (lastWorkdir) return lastWorkdir;
|
|
29175
|
+
if (conversationType !== "single") return void 0;
|
|
29101
29176
|
try {
|
|
29102
|
-
|
|
29103
|
-
return await getTransport().getWorkspaceDir(target2);
|
|
29177
|
+
return await getTransport().getWorkspaceDir({ type: "agent", agentId: ownerId });
|
|
29104
29178
|
} catch {
|
|
29105
29179
|
return void 0;
|
|
29106
29180
|
}
|
|
@@ -29133,9 +29207,14 @@ function mountPtyEventListeners() {
|
|
|
29133
29207
|
}
|
|
29134
29208
|
s16.updateSessionState(ptyId, state2, exitCode);
|
|
29135
29209
|
});
|
|
29210
|
+
const unsubOwnership = transport.onPtyOwnership((payload) => {
|
|
29211
|
+
const { ptyId, source } = payload;
|
|
29212
|
+
store().setOwnership(ptyId, source);
|
|
29213
|
+
});
|
|
29136
29214
|
return () => {
|
|
29137
29215
|
unsubData();
|
|
29138
29216
|
unsubState();
|
|
29217
|
+
unsubOwnership();
|
|
29139
29218
|
};
|
|
29140
29219
|
}
|
|
29141
29220
|
let globalListenerRefCount = 0;
|
|
@@ -29161,8 +29240,14 @@ function usePtySession() {
|
|
|
29161
29240
|
}, []);
|
|
29162
29241
|
reactExports.useEffect(() => {
|
|
29163
29242
|
let cancelled = false;
|
|
29164
|
-
|
|
29165
|
-
|
|
29243
|
+
const api = window.__kai_transport__ ?? window.api;
|
|
29244
|
+
if (typeof api?.getSettings !== "function") return;
|
|
29245
|
+
api.getSettings().then((settings2) => {
|
|
29246
|
+
const enabled = settings2?.experimental?.ptyTerminal === true;
|
|
29247
|
+
if (cancelled || !enabled) return;
|
|
29248
|
+
return getTransport().ptyList();
|
|
29249
|
+
}).then((sessions2) => {
|
|
29250
|
+
if (cancelled || !sessions2?.length) return;
|
|
29166
29251
|
usePtySessionStore.getState().setSessions(sessions2);
|
|
29167
29252
|
}).catch(() => {
|
|
29168
29253
|
});
|
|
@@ -29342,30 +29427,32 @@ function resolveTerminalTheme() {
|
|
|
29342
29427
|
}
|
|
29343
29428
|
};
|
|
29344
29429
|
}
|
|
29345
|
-
const pane = "
|
|
29346
|
-
const titleBar = "
|
|
29347
|
-
const titleBarAgent = "
|
|
29348
|
-
const titleBarAgentFade = "
|
|
29349
|
-
const titleBarUser = "
|
|
29350
|
-
const titleBarUserFade = "
|
|
29351
|
-
const titleRight = "
|
|
29352
|
-
const titleButton = "
|
|
29353
|
-
const restartButton = "
|
|
29354
|
-
const closeIcon = "
|
|
29355
|
-
const restartIcon = "
|
|
29356
|
-
const terminalContainer = "
|
|
29357
|
-
const
|
|
29358
|
-
const
|
|
29359
|
-
const
|
|
29360
|
-
const
|
|
29361
|
-
const
|
|
29362
|
-
const
|
|
29363
|
-
const
|
|
29364
|
-
const
|
|
29365
|
-
const
|
|
29366
|
-
const
|
|
29367
|
-
const
|
|
29368
|
-
const
|
|
29430
|
+
const pane = "_pane_6iaq4_7";
|
|
29431
|
+
const titleBar = "_titleBar_6iaq4_18";
|
|
29432
|
+
const titleBarAgent = "_titleBarAgent_6iaq4_30";
|
|
29433
|
+
const titleBarAgentFade = "_titleBarAgentFade_6iaq4_34";
|
|
29434
|
+
const titleBarUser = "_titleBarUser_6iaq4_43";
|
|
29435
|
+
const titleBarUserFade = "_titleBarUserFade_6iaq4_47";
|
|
29436
|
+
const titleRight = "_titleRight_6iaq4_91";
|
|
29437
|
+
const titleButton = "_titleButton_6iaq4_102";
|
|
29438
|
+
const restartButton = "_restartButton_6iaq4_141";
|
|
29439
|
+
const closeIcon = "_closeIcon_6iaq4_153";
|
|
29440
|
+
const restartIcon = "_restartIcon_6iaq4_179";
|
|
29441
|
+
const terminalContainer = "_terminalContainer_6iaq4_187";
|
|
29442
|
+
const mobileControlBar = "_mobileControlBar_6iaq4_210";
|
|
29443
|
+
const mobileControlButton = "_mobileControlButton_6iaq4_214";
|
|
29444
|
+
const exitFooter = "_exitFooter_6iaq4_260";
|
|
29445
|
+
const exitFooterText = "_exitFooterText_6iaq4_270";
|
|
29446
|
+
const restartFooterButton = "_restartFooterButton_6iaq4_275";
|
|
29447
|
+
const newButton = "_newButton_6iaq4_292";
|
|
29448
|
+
const tabs$4 = "_tabs_6iaq4_299";
|
|
29449
|
+
const tab$7 = "_tab_6iaq4_299";
|
|
29450
|
+
const tabActive$6 = "_tabActive_6iaq4_336";
|
|
29451
|
+
const tabDot = "_tabDot_6iaq4_341";
|
|
29452
|
+
const tabDotActive = "_tabDotActive_6iaq4_348";
|
|
29453
|
+
const tabDotExited = "_tabDotExited_6iaq4_352";
|
|
29454
|
+
const tabLabel = "_tabLabel_6iaq4_356";
|
|
29455
|
+
const tabClose$1 = "_tabClose_6iaq4_362";
|
|
29369
29456
|
const styles$1r = {
|
|
29370
29457
|
pane,
|
|
29371
29458
|
titleBar,
|
|
@@ -29379,6 +29466,8 @@ const styles$1r = {
|
|
|
29379
29466
|
closeIcon,
|
|
29380
29467
|
restartIcon,
|
|
29381
29468
|
terminalContainer,
|
|
29469
|
+
mobileControlBar,
|
|
29470
|
+
mobileControlButton,
|
|
29382
29471
|
exitFooter,
|
|
29383
29472
|
exitFooterText,
|
|
29384
29473
|
restartFooterButton,
|
|
@@ -29396,6 +29485,16 @@ const OWNER_FADE_MS = 2e3;
|
|
|
29396
29485
|
const TERMINAL_SNAPSHOT_MAX_LENGTH = 12e4;
|
|
29397
29486
|
const DIMENSION_SYNC_DEBOUNCE_MS = 100;
|
|
29398
29487
|
const MAX_LIVE_BUFFER_BYTES = 512 * 1024;
|
|
29488
|
+
const MOBILE_CONTROL_KEYS = [
|
|
29489
|
+
{ labelKey: "escape", fallback: "ESC", value: "\x1B" },
|
|
29490
|
+
{ labelKey: "tab", fallback: "Tab", value: " " },
|
|
29491
|
+
{ labelKey: "ctrlC", fallback: "Ctrl+C", value: "" },
|
|
29492
|
+
{ labelKey: "left", fallback: "←", value: "\x1B[D" },
|
|
29493
|
+
{ labelKey: "up", fallback: "↑", value: "\x1B[A" },
|
|
29494
|
+
{ labelKey: "down", fallback: "↓", value: "\x1B[B" },
|
|
29495
|
+
{ labelKey: "right", fallback: "→", value: "\x1B[C" },
|
|
29496
|
+
{ labelKey: "enter", fallback: "Enter", value: "\r" }
|
|
29497
|
+
];
|
|
29399
29498
|
const ACTIVE_STATES = /* @__PURE__ */ new Set(["creating", "running", "killing"]);
|
|
29400
29499
|
const TerminalPane = reactExports.memo(function TerminalPane2({
|
|
29401
29500
|
ptyId,
|
|
@@ -29437,6 +29536,7 @@ const TerminalPane = reactExports.memo(function TerminalPane2({
|
|
|
29437
29536
|
terminal2.resize(session2?.cols ?? 80, session2?.rows ?? 24);
|
|
29438
29537
|
let snapshotReplayed = false;
|
|
29439
29538
|
let unmounted = false;
|
|
29539
|
+
let layoutObserver = null;
|
|
29440
29540
|
const liveBuffer = [];
|
|
29441
29541
|
let liveBufferBytes = 0;
|
|
29442
29542
|
const dataDisposable = terminal2.onData((data) => {
|
|
@@ -29476,10 +29576,29 @@ const TerminalPane = reactExports.memo(function TerminalPane2({
|
|
|
29476
29576
|
snapshotReplayed = true;
|
|
29477
29577
|
});
|
|
29478
29578
|
};
|
|
29479
|
-
|
|
29579
|
+
if (container2.clientWidth > 0 && container2.clientHeight > 0) {
|
|
29580
|
+
requestAnimationFrame(replaySnapshot);
|
|
29581
|
+
} else {
|
|
29582
|
+
layoutObserver = new ResizeObserver((entries2) => {
|
|
29583
|
+
for (const entry of entries2) {
|
|
29584
|
+
if (entry.contentRect.width > 0 && entry.contentRect.height > 0) {
|
|
29585
|
+
layoutObserver?.disconnect();
|
|
29586
|
+
layoutObserver = null;
|
|
29587
|
+
if (!unmounted && !snapshotReplayed) {
|
|
29588
|
+
terminal2.resize(terminal2.cols, terminal2.rows);
|
|
29589
|
+
requestAnimationFrame(replaySnapshot);
|
|
29590
|
+
}
|
|
29591
|
+
return;
|
|
29592
|
+
}
|
|
29593
|
+
}
|
|
29594
|
+
});
|
|
29595
|
+
layoutObserver.observe(container2);
|
|
29596
|
+
}
|
|
29480
29597
|
terminal2.focus();
|
|
29481
29598
|
return () => {
|
|
29482
29599
|
unmounted = true;
|
|
29600
|
+
layoutObserver?.disconnect();
|
|
29601
|
+
layoutObserver = null;
|
|
29483
29602
|
dataDisposable.dispose();
|
|
29484
29603
|
unsubData();
|
|
29485
29604
|
terminal2.dispose();
|
|
@@ -29615,6 +29734,10 @@ const TerminalPane = reactExports.memo(function TerminalPane2({
|
|
|
29615
29734
|
const handleTerminalClick = reactExports.useCallback(() => {
|
|
29616
29735
|
terminalRef.current?.focus();
|
|
29617
29736
|
}, []);
|
|
29737
|
+
const handleMobileControlKey = reactExports.useCallback((data) => {
|
|
29738
|
+
writeSession({ ptyId, data });
|
|
29739
|
+
terminalRef.current?.focus();
|
|
29740
|
+
}, [ptyId, writeSession]);
|
|
29618
29741
|
const handleCreate = reactExports.useCallback(async () => {
|
|
29619
29742
|
setCreating(true);
|
|
29620
29743
|
try {
|
|
@@ -29726,6 +29849,28 @@ const TerminalPane = reactExports.memo(function TerminalPane2({
|
|
|
29726
29849
|
onClick: handleTerminalClick
|
|
29727
29850
|
}
|
|
29728
29851
|
),
|
|
29852
|
+
!isExited && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29853
|
+
"div",
|
|
29854
|
+
{
|
|
29855
|
+
className: styles$1r.mobileControlBar,
|
|
29856
|
+
"aria-label": t2("pty.mobileControls.label", "Terminal control keys"),
|
|
29857
|
+
children: MOBILE_CONTROL_KEYS.map((key) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29858
|
+
"button",
|
|
29859
|
+
{
|
|
29860
|
+
className: styles$1r.mobileControlButton,
|
|
29861
|
+
type: "button",
|
|
29862
|
+
onPointerDown: (event) => event.preventDefault(),
|
|
29863
|
+
onClick: () => handleMobileControlKey(key.value),
|
|
29864
|
+
"aria-label": t2(
|
|
29865
|
+
`pty.mobileControls.keys.${key.labelKey}`,
|
|
29866
|
+
`Send ${key.fallback}`
|
|
29867
|
+
),
|
|
29868
|
+
children: key.fallback
|
|
29869
|
+
},
|
|
29870
|
+
key.labelKey
|
|
29871
|
+
))
|
|
29872
|
+
}
|
|
29873
|
+
),
|
|
29729
29874
|
isExited && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1r.exitFooter, "data-testid": "terminal-exit-footer", children: [
|
|
29730
29875
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1r.exitFooterText, children: t2("pty.status.exited", { code: session2?.exitCode ?? "?" }) }),
|
|
29731
29876
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -29975,6 +30120,123 @@ function PtyResetToast() {
|
|
|
29975
30120
|
}, [showToast, t2]);
|
|
29976
30121
|
return null;
|
|
29977
30122
|
}
|
|
30123
|
+
const BACK_DISMISS_HISTORY_STATE_KEY = "__kaiBackDismiss";
|
|
30124
|
+
const BACK_DISMISS_PRIORITY = {
|
|
30125
|
+
mobileSidebar: 10,
|
|
30126
|
+
modal: 100,
|
|
30127
|
+
drawer: 120,
|
|
30128
|
+
imageViewer: 140
|
|
30129
|
+
};
|
|
30130
|
+
let nextOrder = 1;
|
|
30131
|
+
const overlays = /* @__PURE__ */ new Map();
|
|
30132
|
+
let hasActiveHistorySentinel = false;
|
|
30133
|
+
let isClosingFromPopState = false;
|
|
30134
|
+
let isRemovingHistorySentinel = false;
|
|
30135
|
+
let releaseSentinelTimer = null;
|
|
30136
|
+
let isPopStateListenerInstalled = false;
|
|
30137
|
+
function getHistoryStateObject() {
|
|
30138
|
+
const state2 = window.history.state;
|
|
30139
|
+
return state2 && typeof state2 === "object" ? state2 : {};
|
|
30140
|
+
}
|
|
30141
|
+
function canUseHistory() {
|
|
30142
|
+
return typeof window !== "undefined" && !!window.history && !!window.location;
|
|
30143
|
+
}
|
|
30144
|
+
function installPopStateListener() {
|
|
30145
|
+
if (isPopStateListenerInstalled || typeof window === "undefined") return;
|
|
30146
|
+
window.addEventListener("popstate", handlePopState);
|
|
30147
|
+
isPopStateListenerInstalled = true;
|
|
30148
|
+
}
|
|
30149
|
+
function uninstallPopStateListenerIfIdle() {
|
|
30150
|
+
if (!isPopStateListenerInstalled || typeof window === "undefined") return;
|
|
30151
|
+
if (overlays.size > 0 || hasActiveHistorySentinel || releaseSentinelTimer) return;
|
|
30152
|
+
window.removeEventListener("popstate", handlePopState);
|
|
30153
|
+
isPopStateListenerInstalled = false;
|
|
30154
|
+
}
|
|
30155
|
+
function cancelPendingSentinelRelease() {
|
|
30156
|
+
if (!releaseSentinelTimer) return;
|
|
30157
|
+
clearTimeout(releaseSentinelTimer);
|
|
30158
|
+
releaseSentinelTimer = null;
|
|
30159
|
+
}
|
|
30160
|
+
function getTopOverlay() {
|
|
30161
|
+
let top = null;
|
|
30162
|
+
for (const overlay2 of overlays.values()) {
|
|
30163
|
+
if (!top || overlay2.priority > top.priority || overlay2.priority === top.priority && overlay2.order > top.order) {
|
|
30164
|
+
top = overlay2;
|
|
30165
|
+
}
|
|
30166
|
+
}
|
|
30167
|
+
return top;
|
|
30168
|
+
}
|
|
30169
|
+
function pushSentinelIfNeeded() {
|
|
30170
|
+
cancelPendingSentinelRelease();
|
|
30171
|
+
installPopStateListener();
|
|
30172
|
+
if (hasActiveHistorySentinel || overlays.size === 0 || !canUseHistory()) return;
|
|
30173
|
+
window.history.pushState(
|
|
30174
|
+
{ ...getHistoryStateObject(), [BACK_DISMISS_HISTORY_STATE_KEY]: true },
|
|
30175
|
+
"",
|
|
30176
|
+
window.location.href
|
|
30177
|
+
);
|
|
30178
|
+
hasActiveHistorySentinel = true;
|
|
30179
|
+
}
|
|
30180
|
+
function scheduleSentinelReleaseIfNeeded() {
|
|
30181
|
+
if (!hasActiveHistorySentinel || overlays.size > 0 || !canUseHistory() || isClosingFromPopState || releaseSentinelTimer) return;
|
|
30182
|
+
releaseSentinelTimer = setTimeout(() => {
|
|
30183
|
+
releaseSentinelTimer = null;
|
|
30184
|
+
if (!hasActiveHistorySentinel || overlays.size > 0 || isClosingFromPopState) return;
|
|
30185
|
+
isRemovingHistorySentinel = true;
|
|
30186
|
+
hasActiveHistorySentinel = false;
|
|
30187
|
+
window.history.back();
|
|
30188
|
+
setTimeout(() => {
|
|
30189
|
+
isRemovingHistorySentinel = false;
|
|
30190
|
+
uninstallPopStateListenerIfIdle();
|
|
30191
|
+
}, 0);
|
|
30192
|
+
}, 0);
|
|
30193
|
+
}
|
|
30194
|
+
function handlePopState() {
|
|
30195
|
+
if (isRemovingHistorySentinel) return;
|
|
30196
|
+
if (!hasActiveHistorySentinel) return;
|
|
30197
|
+
const topOverlay = getTopOverlay();
|
|
30198
|
+
if (!topOverlay) {
|
|
30199
|
+
hasActiveHistorySentinel = false;
|
|
30200
|
+
uninstallPopStateListenerIfIdle();
|
|
30201
|
+
return;
|
|
30202
|
+
}
|
|
30203
|
+
isClosingFromPopState = true;
|
|
30204
|
+
hasActiveHistorySentinel = false;
|
|
30205
|
+
topOverlay.onClose();
|
|
30206
|
+
setTimeout(() => {
|
|
30207
|
+
isClosingFromPopState = false;
|
|
30208
|
+
pushSentinelIfNeeded();
|
|
30209
|
+
uninstallPopStateListenerIfIdle();
|
|
30210
|
+
}, 0);
|
|
30211
|
+
}
|
|
30212
|
+
function registerBackDismiss(registration) {
|
|
30213
|
+
const existing = overlays.get(registration.id);
|
|
30214
|
+
overlays.set(registration.id, {
|
|
30215
|
+
id: registration.id,
|
|
30216
|
+
priority: registration.priority ?? BACK_DISMISS_PRIORITY.modal,
|
|
30217
|
+
order: existing?.order ?? nextOrder++,
|
|
30218
|
+
onClose: registration.onClose
|
|
30219
|
+
});
|
|
30220
|
+
pushSentinelIfNeeded();
|
|
30221
|
+
return () => {
|
|
30222
|
+
overlays.delete(registration.id);
|
|
30223
|
+
scheduleSentinelReleaseIfNeeded();
|
|
30224
|
+
};
|
|
30225
|
+
}
|
|
30226
|
+
function useBackDismiss({ open, id: id32, priority, onClose }) {
|
|
30227
|
+
const onCloseRef = reactExports.useRef(onClose);
|
|
30228
|
+
reactExports.useEffect(() => {
|
|
30229
|
+
onCloseRef.current = onClose;
|
|
30230
|
+
}, [onClose]);
|
|
30231
|
+
reactExports.useEffect(() => {
|
|
30232
|
+
if (!open) return void 0;
|
|
30233
|
+
return registerBackDismiss({
|
|
30234
|
+
id: id32,
|
|
30235
|
+
priority,
|
|
30236
|
+
onClose: () => onCloseRef.current()
|
|
30237
|
+
});
|
|
30238
|
+
}, [open, id32, priority]);
|
|
30239
|
+
}
|
|
29978
30240
|
const DEFAULT_AGENT_ID = "default";
|
|
29979
30241
|
function getFallbackKey(channelId, model) {
|
|
29980
30242
|
return `${channelId}:${model ?? ""}`;
|
|
@@ -30265,6 +30527,44 @@ function getPreservedScrollTopAfterPrepend({
|
|
|
30265
30527
|
}) {
|
|
30266
30528
|
return previousScrollTop + nextScrollHeight - previousScrollHeight;
|
|
30267
30529
|
}
|
|
30530
|
+
const RESTORE_SCROLL_MIN_DISTANCE_TO_BOTTOM = 600;
|
|
30531
|
+
function createDefaultScrollMode() {
|
|
30532
|
+
return { mode: "stickToBottom" };
|
|
30533
|
+
}
|
|
30534
|
+
function isStickToBottomMode(state2) {
|
|
30535
|
+
return state2.mode === "stickToBottom";
|
|
30536
|
+
}
|
|
30537
|
+
function isPreserveDistanceMode(state2) {
|
|
30538
|
+
return state2.mode === "preserveDistanceToBottom";
|
|
30539
|
+
}
|
|
30540
|
+
function enterStickToBottom() {
|
|
30541
|
+
return { mode: "stickToBottom" };
|
|
30542
|
+
}
|
|
30543
|
+
function enterFreeScroll() {
|
|
30544
|
+
return { mode: "freeScroll" };
|
|
30545
|
+
}
|
|
30546
|
+
function enterPreserveDistanceToBottom(snapshot) {
|
|
30547
|
+
return {
|
|
30548
|
+
mode: "preserveDistanceToBottom",
|
|
30549
|
+
distanceToBottom: getScrollSnapshotDistanceToBottom(snapshot)
|
|
30550
|
+
};
|
|
30551
|
+
}
|
|
30552
|
+
function getScrollSnapshotDistanceToBottom(snapshot) {
|
|
30553
|
+
return snapshot.scrollHeight - snapshot.scrollTop - snapshot.clientHeight;
|
|
30554
|
+
}
|
|
30555
|
+
function getScrollTopForDistanceToBottom(container2, distanceToBottom) {
|
|
30556
|
+
return Math.max(0, container2.scrollHeight - container2.clientHeight - distanceToBottom);
|
|
30557
|
+
}
|
|
30558
|
+
function isSnapshotPositionBelowViewport(viewport2, snapshot) {
|
|
30559
|
+
const maxScrollTop = Math.max(0, viewport2.scrollHeight - viewport2.clientHeight);
|
|
30560
|
+
const distanceFromSnapshotToBottom = viewport2.scrollHeight - Math.min(snapshot.scrollTop, maxScrollTop) - viewport2.clientHeight;
|
|
30561
|
+
return distanceFromSnapshotToBottom >= RESTORE_SCROLL_MIN_DISTANCE_TO_BOTTOM;
|
|
30562
|
+
}
|
|
30563
|
+
function shouldRestoreScrollSnapshot(viewport2, snapshot) {
|
|
30564
|
+
if (snapshot.isAtBottom) return false;
|
|
30565
|
+
if (getScrollSnapshotDistanceToBottom(snapshot) < RESTORE_SCROLL_MIN_DISTANCE_TO_BOTTOM) return false;
|
|
30566
|
+
return isSnapshotPositionBelowViewport(viewport2, snapshot);
|
|
30567
|
+
}
|
|
30268
30568
|
const SCROLL_ANCHOR_ATTR = "data-scroll-anchor";
|
|
30269
30569
|
const VIRTUAL_TAIL_ANCHOR_ATTR = "data-virtual-tail-anchor";
|
|
30270
30570
|
const VIRTUAL_TAIL_ANCHOR_VALUE = "true";
|
|
@@ -30359,16 +30659,17 @@ const RESET_SCROLL_STABLE_FRAME_COUNT = 3;
|
|
|
30359
30659
|
const RESET_VISUAL_BOTTOM_STABLE_THRESHOLD = 1;
|
|
30360
30660
|
const TOUCH_UP_INTENT_THRESHOLD = 4;
|
|
30361
30661
|
const USER_SCROLL_INTENT_WINDOW_MS = 1e3;
|
|
30362
|
-
const RESET_KEY_NOT_APPLIED = /* @__PURE__ */ Symbol("reset-key-not-applied");
|
|
30363
30662
|
const PROGRAMMATIC_SCROLL_LOCK_FRAME_COUNT = 1;
|
|
30364
30663
|
function useScrollAnchor(opts, loadMore) {
|
|
30365
30664
|
const {
|
|
30366
30665
|
itemCount,
|
|
30367
30666
|
tailItemIdentity,
|
|
30368
30667
|
tailRenderableRevision,
|
|
30668
|
+
isVirtualList = false,
|
|
30369
30669
|
localSendEpoch = 0,
|
|
30370
30670
|
isPrependingHistory,
|
|
30371
|
-
resetKey
|
|
30671
|
+
resetKey,
|
|
30672
|
+
initialScrollSnapshot
|
|
30372
30673
|
} = opts;
|
|
30373
30674
|
const containerRef = reactExports.useRef(null);
|
|
30374
30675
|
const [containerNode, setContainerNode] = reactExports.useState(null);
|
|
@@ -30383,18 +30684,21 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30383
30684
|
const isInitialMountRef = reactExports.useRef(true);
|
|
30384
30685
|
const preserveScrollRef = reactExports.useRef(null);
|
|
30385
30686
|
const preserveRafRef = reactExports.useRef(null);
|
|
30386
|
-
const
|
|
30687
|
+
const scrollModeRef = reactExports.useRef(createDefaultScrollMode());
|
|
30688
|
+
const stickyCorrectRafRef = reactExports.useRef(null);
|
|
30387
30689
|
const lastScrollTopRef = reactExports.useRef(0);
|
|
30388
30690
|
const forceScrollRafRef = reactExports.useRef(null);
|
|
30389
30691
|
const resetScrollRafRef = reactExports.useRef(null);
|
|
30390
|
-
const
|
|
30391
|
-
|
|
30692
|
+
const resetTransactionRef = reactExports.useRef({
|
|
30693
|
+
active: false,
|
|
30694
|
+
expectedScrollTop: null
|
|
30695
|
+
});
|
|
30392
30696
|
const programmaticScrollLockRef = reactExports.useRef(0);
|
|
30393
30697
|
const lastTouchYRef = reactExports.useRef(null);
|
|
30394
30698
|
const touchScrollAwayIntentRef = reactExports.useRef(false);
|
|
30395
30699
|
const userScrollIntentUntilRef = reactExports.useRef(0);
|
|
30396
30700
|
const userScrollTowardBottomIntentUntilRef = reactExports.useRef(0);
|
|
30397
|
-
const
|
|
30701
|
+
const appliedResetKeysRef = reactExports.useRef(/* @__PURE__ */ new Set());
|
|
30398
30702
|
latestItemCountRef.current = itemCount;
|
|
30399
30703
|
latestTailItemIdentityRef.current = tailItemIdentity;
|
|
30400
30704
|
const checkIsAtBottom = reactExports.useCallback((container2) => {
|
|
@@ -30404,6 +30708,9 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30404
30708
|
container2.scrollTop = value2;
|
|
30405
30709
|
lastScrollTopRef.current = container2.scrollTop;
|
|
30406
30710
|
}, []);
|
|
30711
|
+
const setScrollMode = reactExports.useCallback((nextMode) => {
|
|
30712
|
+
scrollModeRef.current = nextMode;
|
|
30713
|
+
}, []);
|
|
30407
30714
|
const cancelForceScroll = reactExports.useCallback(() => {
|
|
30408
30715
|
if (forceScrollRafRef.current !== null) {
|
|
30409
30716
|
cancelAnimationFrame(forceScrollRafRef.current);
|
|
@@ -30411,8 +30718,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30411
30718
|
}
|
|
30412
30719
|
}, []);
|
|
30413
30720
|
const cancelResetScroll = reactExports.useCallback(() => {
|
|
30414
|
-
|
|
30415
|
-
resetProgrammaticScrollTopRef.current = null;
|
|
30721
|
+
resetTransactionRef.current = { active: false, expectedScrollTop: null };
|
|
30416
30722
|
if (resetScrollRafRef.current !== null) {
|
|
30417
30723
|
cancelAnimationFrame(resetScrollRafRef.current);
|
|
30418
30724
|
resetScrollRafRef.current = null;
|
|
@@ -30420,7 +30726,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30420
30726
|
}, []);
|
|
30421
30727
|
const setResetScrollTop = reactExports.useCallback((container2, value2) => {
|
|
30422
30728
|
setScrollTop(container2, value2);
|
|
30423
|
-
|
|
30729
|
+
resetTransactionRef.current.expectedScrollTop = container2.scrollTop;
|
|
30424
30730
|
}, [setScrollTop]);
|
|
30425
30731
|
const cancelPreserveScroll = reactExports.useCallback(() => {
|
|
30426
30732
|
if (preserveRafRef.current !== null) {
|
|
@@ -30429,11 +30735,12 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30429
30735
|
}
|
|
30430
30736
|
}, []);
|
|
30431
30737
|
const markAtBottom = reactExports.useCallback(() => {
|
|
30432
|
-
|
|
30738
|
+
setScrollMode(enterStickToBottom());
|
|
30433
30739
|
setIsAtBottom(true);
|
|
30434
30740
|
setShowNewMessageHint(false);
|
|
30435
30741
|
setShowScrollToBottom(false);
|
|
30436
|
-
|
|
30742
|
+
userScrollIntentUntilRef.current = 0;
|
|
30743
|
+
}, [setScrollMode]);
|
|
30437
30744
|
const setContainerRef = reactExports.useCallback((node2) => {
|
|
30438
30745
|
containerRef.current = node2;
|
|
30439
30746
|
setContainerNode(node2);
|
|
@@ -30446,15 +30753,37 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30446
30753
|
prevItemCountRef.current = latestItemCountRef.current;
|
|
30447
30754
|
prevTailItemIdentityRef.current = latestTailItemIdentityRef.current;
|
|
30448
30755
|
}, []);
|
|
30756
|
+
const restoreInitialScrollSnapshot = reactExports.useCallback((container2) => {
|
|
30757
|
+
if (!initialScrollSnapshot) return false;
|
|
30758
|
+
if (!shouldRestoreScrollSnapshot(container2, initialScrollSnapshot)) return false;
|
|
30759
|
+
cancelResetScroll();
|
|
30760
|
+
markCurrentTailObserved();
|
|
30761
|
+
setScrollMode(enterPreserveDistanceToBottom(initialScrollSnapshot));
|
|
30762
|
+
touchScrollAwayIntentRef.current = false;
|
|
30763
|
+
resetTransactionRef.current = { active: false, expectedScrollTop: null };
|
|
30764
|
+
programmaticScrollLockRef.current = PROGRAMMATIC_SCROLL_LOCK_FRAME_COUNT;
|
|
30765
|
+
setScrollTop(
|
|
30766
|
+
container2,
|
|
30767
|
+
getScrollTopForDistanceToBottom(container2, getScrollSnapshotDistanceToBottom(initialScrollSnapshot))
|
|
30768
|
+
);
|
|
30769
|
+
const atBottom = checkIsAtBottom(container2);
|
|
30770
|
+
if (atBottom) {
|
|
30771
|
+
setScrollMode(enterStickToBottom());
|
|
30772
|
+
}
|
|
30773
|
+
setIsAtBottom(atBottom);
|
|
30774
|
+
setShowScrollToBottom(!atBottom);
|
|
30775
|
+
setShowNewMessageHint(false);
|
|
30776
|
+
return true;
|
|
30777
|
+
}, [cancelResetScroll, checkIsAtBottom, initialScrollSnapshot, markCurrentTailObserved, setScrollMode, setScrollTop]);
|
|
30449
30778
|
const leaveStickyBottomState = reactExports.useCallback(() => {
|
|
30450
|
-
|
|
30779
|
+
setScrollMode(enterFreeScroll());
|
|
30451
30780
|
cancelForceScroll();
|
|
30452
30781
|
cancelResetScroll();
|
|
30453
30782
|
setIsAtBottom(false);
|
|
30454
30783
|
setShowScrollToBottom(true);
|
|
30455
30784
|
setShowNewMessageHint(false);
|
|
30456
30785
|
markCurrentTailObserved();
|
|
30457
|
-
}, [cancelForceScroll, cancelResetScroll, markCurrentTailObserved]);
|
|
30786
|
+
}, [cancelForceScroll, cancelResetScroll, markCurrentTailObserved, setScrollMode]);
|
|
30458
30787
|
const markRecentUserScrollIntent = reactExports.useCallback(() => {
|
|
30459
30788
|
userScrollIntentUntilRef.current = Date.now() + USER_SCROLL_INTENT_WINDOW_MS;
|
|
30460
30789
|
}, []);
|
|
@@ -30464,33 +30793,48 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30464
30793
|
const atBottom = checkIsAtBottom(container2);
|
|
30465
30794
|
const scrollTop = container2.scrollTop;
|
|
30466
30795
|
const scrolledUp = scrollTop < lastScrollTopRef.current - 1;
|
|
30467
|
-
const isResetScrollActive =
|
|
30796
|
+
const isResetScrollActive = resetTransactionRef.current.active && resetTransactionRef.current.expectedScrollTop !== null && Math.abs(scrollTop - resetTransactionRef.current.expectedScrollTop) <= 1;
|
|
30468
30797
|
const isProgrammaticScroll = programmaticScrollLockRef.current > 0 || isResetScrollActive;
|
|
30469
30798
|
if (isProgrammaticScroll) {
|
|
30470
30799
|
programmaticScrollLockRef.current = Math.max(0, programmaticScrollLockRef.current - 1);
|
|
30471
30800
|
if (isResetScrollActive) {
|
|
30472
|
-
|
|
30801
|
+
resetTransactionRef.current.expectedScrollTop = null;
|
|
30473
30802
|
}
|
|
30474
30803
|
}
|
|
30475
30804
|
lastScrollTopRef.current = scrollTop;
|
|
30476
30805
|
setIsAtBottom(atBottom);
|
|
30477
30806
|
if (atBottom && !touchScrollAwayIntentRef.current) {
|
|
30478
|
-
if (
|
|
30479
|
-
|
|
30807
|
+
if (isStickToBottomMode(scrollModeRef.current) || Date.now() <= userScrollTowardBottomIntentUntilRef.current) {
|
|
30808
|
+
setScrollMode(enterStickToBottom());
|
|
30480
30809
|
}
|
|
30481
30810
|
setShowNewMessageHint(false);
|
|
30482
30811
|
setShowScrollToBottom(false);
|
|
30483
|
-
} else if (!
|
|
30812
|
+
} else if (!isStickToBottomMode(scrollModeRef.current) && !atBottom) {
|
|
30813
|
+
if (isPreserveDistanceMode(scrollModeRef.current) && !isProgrammaticScroll) {
|
|
30814
|
+
setScrollMode(enterFreeScroll());
|
|
30815
|
+
}
|
|
30484
30816
|
setShowScrollToBottom(true);
|
|
30485
|
-
} else if (
|
|
30817
|
+
} else if (isStickToBottomMode(scrollModeRef.current) && !isProgrammaticScroll && !touchScrollAwayIntentRef.current) {
|
|
30486
30818
|
if (Date.now() <= userScrollIntentUntilRef.current && (scrolledUp || !atBottom)) {
|
|
30487
30819
|
leaveStickyBottomState();
|
|
30488
30820
|
return;
|
|
30489
30821
|
}
|
|
30490
|
-
|
|
30822
|
+
if (isVirtualList) {
|
|
30823
|
+
if (stickyCorrectRafRef.current === null) {
|
|
30824
|
+
stickyCorrectRafRef.current = requestAnimationFrame(() => {
|
|
30825
|
+
stickyCorrectRafRef.current = null;
|
|
30826
|
+
const el2 = containerRef.current;
|
|
30827
|
+
if (el2 && isStickToBottomMode(scrollModeRef.current) && !touchScrollAwayIntentRef.current && !preserveScrollRef.current) {
|
|
30828
|
+
setScrollTop(el2, el2.scrollHeight);
|
|
30829
|
+
}
|
|
30830
|
+
});
|
|
30831
|
+
}
|
|
30832
|
+
} else {
|
|
30833
|
+
setScrollTop(container2, container2.scrollHeight);
|
|
30834
|
+
}
|
|
30491
30835
|
markAtBottom();
|
|
30492
30836
|
}
|
|
30493
|
-
}, [checkIsAtBottom, leaveStickyBottomState, markAtBottom, setScrollTop]);
|
|
30837
|
+
}, [checkIsAtBottom, isVirtualList, leaveStickyBottomState, markAtBottom, setScrollTop]);
|
|
30494
30838
|
const handleTouchStart = reactExports.useCallback((event) => {
|
|
30495
30839
|
touchScrollAwayIntentRef.current = false;
|
|
30496
30840
|
lastTouchYRef.current = getTouchClientY(event) ?? null;
|
|
@@ -30516,7 +30860,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30516
30860
|
if (event && !("deltaY" in event)) {
|
|
30517
30861
|
touchScrollAwayIntentRef.current = true;
|
|
30518
30862
|
}
|
|
30519
|
-
|
|
30863
|
+
setScrollMode(enterFreeScroll());
|
|
30520
30864
|
cancelResetScroll();
|
|
30521
30865
|
markCurrentTailObserved();
|
|
30522
30866
|
setIsAtBottom(false);
|
|
@@ -30526,11 +30870,14 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30526
30870
|
}
|
|
30527
30871
|
if (isDownwardScrollIntent(event, previousTouchY)) {
|
|
30528
30872
|
userScrollTowardBottomIntentUntilRef.current = Date.now() + USER_SCROLL_INTENT_WINDOW_MS;
|
|
30873
|
+
if (isPreserveDistanceMode(scrollModeRef.current)) {
|
|
30874
|
+
setScrollMode(enterFreeScroll());
|
|
30875
|
+
}
|
|
30529
30876
|
}
|
|
30530
30877
|
if (event) return;
|
|
30531
30878
|
if (checkIsAtBottom(container2)) return;
|
|
30532
30879
|
leaveStickyBottomState();
|
|
30533
|
-
}, [checkIsAtBottom, leaveStickyBottomState, markRecentUserScrollIntent]);
|
|
30880
|
+
}, [checkIsAtBottom, leaveStickyBottomState, markRecentUserScrollIntent, setScrollMode]);
|
|
30534
30881
|
const handleKeyboardScrollIntent = reactExports.useCallback((event) => {
|
|
30535
30882
|
if (!isContainerSelfEvent(event)) return;
|
|
30536
30883
|
if (!isUpwardKeyboardScrollIntent(event)) return;
|
|
@@ -30551,15 +30898,30 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30551
30898
|
}, []);
|
|
30552
30899
|
const maintainBottomIfSticky = reactExports.useCallback(() => {
|
|
30553
30900
|
const container2 = containerRef.current;
|
|
30554
|
-
if (!container2 || !
|
|
30901
|
+
if (!container2 || !isStickToBottomMode(scrollModeRef.current) || touchScrollAwayIntentRef.current || preserveScrollRef.current) return;
|
|
30555
30902
|
setScrollTop(container2, container2.scrollHeight);
|
|
30556
30903
|
markAtBottom();
|
|
30557
30904
|
}, [markAtBottom, setScrollTop]);
|
|
30905
|
+
const preserveDistanceToBottomIfNeeded = reactExports.useCallback(() => {
|
|
30906
|
+
const container2 = containerRef.current;
|
|
30907
|
+
const mode2 = scrollModeRef.current;
|
|
30908
|
+
if (!container2 || !isPreserveDistanceMode(mode2)) return false;
|
|
30909
|
+
setScrollTop(container2, getScrollTopForDistanceToBottom(container2, mode2.distanceToBottom));
|
|
30910
|
+
return true;
|
|
30911
|
+
}, [setScrollTop]);
|
|
30558
30912
|
const cancelProgrammaticScroll = reactExports.useCallback(() => {
|
|
30559
30913
|
programmaticScrollLockRef.current = 0;
|
|
30560
30914
|
cancelForceScroll();
|
|
30561
30915
|
cancelResetScroll();
|
|
30562
30916
|
}, [cancelForceScroll, cancelResetScroll]);
|
|
30917
|
+
const pinToBottom = reactExports.useCallback(() => {
|
|
30918
|
+
const container2 = containerRef.current;
|
|
30919
|
+
if (!container2) return;
|
|
30920
|
+
cancelForceScroll();
|
|
30921
|
+
programmaticScrollLockRef.current = PROGRAMMATIC_SCROLL_LOCK_FRAME_COUNT;
|
|
30922
|
+
setScrollTop(container2, container2.scrollHeight);
|
|
30923
|
+
markAtBottom();
|
|
30924
|
+
}, [cancelForceScroll, markAtBottom, setScrollTop]);
|
|
30563
30925
|
const scrollToTop = reactExports.useCallback(() => {
|
|
30564
30926
|
containerRef.current?.scrollTo({ top: 0, behavior: "smooth" });
|
|
30565
30927
|
}, []);
|
|
@@ -30596,7 +30958,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30596
30958
|
cancelResetScroll();
|
|
30597
30959
|
markCurrentTailObserved();
|
|
30598
30960
|
markAtBottom();
|
|
30599
|
-
|
|
30961
|
+
resetTransactionRef.current.active = true;
|
|
30600
30962
|
setResetScrollTop(container2, container2.scrollHeight);
|
|
30601
30963
|
let remainingFrames = RESET_SCROLL_MAX_RAF_COUNT;
|
|
30602
30964
|
let stableFrames = 0;
|
|
@@ -30604,8 +30966,8 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30604
30966
|
let lastVisualBottom = getScrollVisualBottom(container2);
|
|
30605
30967
|
const scrollAfterLayoutSettles = () => {
|
|
30606
30968
|
const next2 = containerRef.current;
|
|
30607
|
-
if (!next2 || !
|
|
30608
|
-
|
|
30969
|
+
if (!next2 || !isStickToBottomMode(scrollModeRef.current) || touchScrollAwayIntentRef.current || preserveScrollRef.current) {
|
|
30970
|
+
resetTransactionRef.current = { active: false, expectedScrollTop: null };
|
|
30609
30971
|
resetScrollRafRef.current = null;
|
|
30610
30972
|
return;
|
|
30611
30973
|
}
|
|
@@ -30620,7 +30982,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30620
30982
|
if (remainingFrames > 0 && stableFrames < RESET_SCROLL_STABLE_FRAME_COUNT) {
|
|
30621
30983
|
resetScrollRafRef.current = requestAnimationFrame(scrollAfterLayoutSettles);
|
|
30622
30984
|
} else {
|
|
30623
|
-
|
|
30985
|
+
resetTransactionRef.current = { active: false, expectedScrollTop: null };
|
|
30624
30986
|
resetScrollRafRef.current = null;
|
|
30625
30987
|
}
|
|
30626
30988
|
};
|
|
@@ -30651,15 +31013,15 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30651
31013
|
prevScrollTop: container2.scrollTop,
|
|
30652
31014
|
anchor: captureScrollPreserveAnchor(container2)
|
|
30653
31015
|
};
|
|
30654
|
-
|
|
31016
|
+
setScrollMode(enterFreeScroll());
|
|
30655
31017
|
markCurrentTailObserved();
|
|
30656
31018
|
loadMore();
|
|
30657
|
-
}, [cancelForceScroll, cancelPreserveScroll, cancelResetScroll, loadMore, markCurrentTailObserved]);
|
|
31019
|
+
}, [cancelForceScroll, cancelPreserveScroll, cancelResetScroll, loadMore, markCurrentTailObserved, setScrollMode]);
|
|
30658
31020
|
reactExports.useLayoutEffect(() => {
|
|
30659
|
-
if (
|
|
30660
|
-
|
|
31021
|
+
if (appliedResetKeysRef.current.has(resetKey) && !initialScrollSnapshot) return;
|
|
31022
|
+
appliedResetKeysRef.current.add(resetKey);
|
|
30661
31023
|
isInitialMountRef.current = true;
|
|
30662
|
-
|
|
31024
|
+
setScrollMode(enterStickToBottom());
|
|
30663
31025
|
touchScrollAwayIntentRef.current = false;
|
|
30664
31026
|
cancelForceScroll();
|
|
30665
31027
|
cancelResetScroll();
|
|
@@ -30677,6 +31039,12 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30677
31039
|
const container2 = containerRef.current;
|
|
30678
31040
|
const currentItemCount = latestItemCountRef.current;
|
|
30679
31041
|
if (!container2 || currentItemCount === 0) return;
|
|
31042
|
+
if (restoreInitialScrollSnapshot(container2)) {
|
|
31043
|
+
isInitialMountRef.current = false;
|
|
31044
|
+
prevItemCountRef.current = currentItemCount;
|
|
31045
|
+
prevTailItemIdentityRef.current = latestTailItemIdentityRef.current;
|
|
31046
|
+
return;
|
|
31047
|
+
}
|
|
30680
31048
|
resetScrollToBottom();
|
|
30681
31049
|
isInitialMountRef.current = false;
|
|
30682
31050
|
prevItemCountRef.current = currentItemCount;
|
|
@@ -30685,22 +31053,30 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30685
31053
|
cancelForceScroll,
|
|
30686
31054
|
cancelResetScroll,
|
|
30687
31055
|
cancelPreserveScroll,
|
|
31056
|
+
restoreInitialScrollSnapshot,
|
|
30688
31057
|
resetKey,
|
|
30689
31058
|
resetScrollToBottom
|
|
30690
31059
|
]);
|
|
30691
31060
|
reactExports.useLayoutEffect(() => {
|
|
30692
31061
|
const container2 = containerRef.current;
|
|
30693
31062
|
if (!container2 || !isInitialMountRef.current || itemCount === 0 || preserveScrollRef.current) return;
|
|
31063
|
+
if (restoreInitialScrollSnapshot(container2)) {
|
|
31064
|
+
isInitialMountRef.current = false;
|
|
31065
|
+
prevItemCountRef.current = itemCount;
|
|
31066
|
+
prevTailItemIdentityRef.current = tailItemIdentity;
|
|
31067
|
+
return;
|
|
31068
|
+
}
|
|
30694
31069
|
resetScrollToBottom();
|
|
30695
31070
|
isInitialMountRef.current = false;
|
|
30696
31071
|
prevItemCountRef.current = itemCount;
|
|
30697
31072
|
prevTailItemIdentityRef.current = tailItemIdentity;
|
|
30698
|
-
}, [itemCount, resetScrollToBottom, tailItemIdentity]);
|
|
31073
|
+
}, [itemCount, resetScrollToBottom, restoreInitialScrollSnapshot, tailItemIdentity]);
|
|
30699
31074
|
reactExports.useEffect(() => {
|
|
30700
31075
|
return () => {
|
|
30701
31076
|
cancelForceScroll();
|
|
30702
31077
|
cancelResetScroll();
|
|
30703
31078
|
cancelPreserveScroll();
|
|
31079
|
+
if (stickyCorrectRafRef.current !== null) cancelAnimationFrame(stickyCorrectRafRef.current);
|
|
30704
31080
|
};
|
|
30705
31081
|
}, [cancelForceScroll, cancelPreserveScroll, cancelResetScroll]);
|
|
30706
31082
|
const scrollToBottomAction = reactExports.useEffectEvent(() => {
|
|
@@ -30714,8 +31090,11 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30714
31090
|
const prevTailItemIdentity = prevTailItemIdentityRef.current;
|
|
30715
31091
|
const nextTailItemIdentity = tailItemIdentity;
|
|
30716
31092
|
const tailChanged = nextCount > 0 && prevCount > 0 && nextCount === prevCount && prevTailItemIdentity !== void 0 && nextTailItemIdentity !== void 0 && nextTailItemIdentity !== prevTailItemIdentity;
|
|
31093
|
+
if (isPreserveDistanceMode(scrollModeRef.current) && !preserveScrollRef.current) {
|
|
31094
|
+
preserveDistanceToBottomIfNeeded();
|
|
31095
|
+
}
|
|
30717
31096
|
if (nextCount > prevCount || tailChanged) {
|
|
30718
|
-
if (
|
|
31097
|
+
if (isStickToBottomMode(scrollModeRef.current) && !preserveScrollRef.current) {
|
|
30719
31098
|
scrollToBottomAction();
|
|
30720
31099
|
const rafId = requestAnimationFrame(() => {
|
|
30721
31100
|
scrollToBottomAction();
|
|
@@ -30734,7 +31113,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30734
31113
|
}
|
|
30735
31114
|
prevItemCountRef.current = nextCount;
|
|
30736
31115
|
prevTailItemIdentityRef.current = nextTailItemIdentity;
|
|
30737
|
-
}, [checkIsAtBottom, itemCount, markAtBottom, tailItemIdentity]);
|
|
31116
|
+
}, [checkIsAtBottom, itemCount, markAtBottom, preserveDistanceToBottomIfNeeded, tailItemIdentity]);
|
|
30738
31117
|
reactExports.useEffect(() => {
|
|
30739
31118
|
const container2 = containerRef.current;
|
|
30740
31119
|
if (!container2 || preserveScrollRef.current) return;
|
|
@@ -30742,7 +31121,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30742
31121
|
setScrollTop(container2, container2.scrollHeight);
|
|
30743
31122
|
const rafId = requestAnimationFrame(() => {
|
|
30744
31123
|
const next2 = containerRef.current;
|
|
30745
|
-
if (next2 &&
|
|
31124
|
+
if (next2 && isStickToBottomMode(scrollModeRef.current) && !preserveScrollRef.current) {
|
|
30746
31125
|
setScrollTop(next2, next2.scrollHeight);
|
|
30747
31126
|
}
|
|
30748
31127
|
});
|
|
@@ -30774,7 +31153,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30774
31153
|
const next2 = containerRef.current;
|
|
30775
31154
|
if (!next2) return;
|
|
30776
31155
|
const atBottom = checkIsAtBottom(next2);
|
|
30777
|
-
|
|
31156
|
+
setScrollMode(atBottom ? enterStickToBottom() : enterFreeScroll());
|
|
30778
31157
|
setIsAtBottom(atBottom);
|
|
30779
31158
|
setShowScrollToBottom(!atBottom);
|
|
30780
31159
|
if (atBottom) setShowNewMessageHint(false);
|
|
@@ -30782,7 +31161,8 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30782
31161
|
});
|
|
30783
31162
|
}, [cancelPreserveScroll, checkIsAtBottom, isPrependingHistory, itemCount, setScrollTop]);
|
|
30784
31163
|
reactExports.useEffect(() => {
|
|
30785
|
-
if (
|
|
31164
|
+
if (isVirtualList) return;
|
|
31165
|
+
if (!containerRef.current || !isStickToBottomMode(scrollModeRef.current) || touchScrollAwayIntentRef.current || preserveScrollRef.current) return;
|
|
30786
31166
|
let rafId1;
|
|
30787
31167
|
let rafId2;
|
|
30788
31168
|
rafId1 = requestAnimationFrame(() => {
|
|
@@ -30795,22 +31175,30 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30795
31175
|
if (rafId1 !== void 0) cancelAnimationFrame(rafId1);
|
|
30796
31176
|
if (rafId2 !== void 0) cancelAnimationFrame(rafId2);
|
|
30797
31177
|
};
|
|
30798
|
-
}, [itemCount, maintainBottomIfSticky, resetKey, tailItemIdentity, tailRenderableRevision]);
|
|
31178
|
+
}, [itemCount, isVirtualList, maintainBottomIfSticky, resetKey, tailItemIdentity, tailRenderableRevision]);
|
|
30799
31179
|
reactExports.useEffect(() => {
|
|
30800
31180
|
const bottomAnchor2 = bottomAnchorNode;
|
|
30801
31181
|
const container2 = containerNode;
|
|
30802
31182
|
if (!container2 || !bottomAnchor2 || typeof IntersectionObserver === "undefined") return;
|
|
31183
|
+
let rafId;
|
|
30803
31184
|
const observer = new IntersectionObserver(
|
|
30804
31185
|
(entries2) => {
|
|
30805
31186
|
const entry = entries2[0];
|
|
30806
31187
|
if (!entry) return;
|
|
30807
31188
|
if (entry.isIntersecting) return;
|
|
30808
|
-
|
|
31189
|
+
if (rafId !== void 0) return;
|
|
31190
|
+
rafId = requestAnimationFrame(() => {
|
|
31191
|
+
rafId = void 0;
|
|
31192
|
+
maintainBottomIfSticky();
|
|
31193
|
+
});
|
|
30809
31194
|
},
|
|
30810
31195
|
{ root: container2, threshold: 1 }
|
|
30811
31196
|
);
|
|
30812
31197
|
observer.observe(bottomAnchor2);
|
|
30813
|
-
return () =>
|
|
31198
|
+
return () => {
|
|
31199
|
+
observer.disconnect();
|
|
31200
|
+
if (rafId !== void 0) cancelAnimationFrame(rafId);
|
|
31201
|
+
};
|
|
30814
31202
|
}, [bottomAnchorNode, containerNode, maintainBottomIfSticky, resetKey]);
|
|
30815
31203
|
return {
|
|
30816
31204
|
containerRef,
|
|
@@ -30828,12 +31216,14 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
30828
31216
|
leaveStickyBottom,
|
|
30829
31217
|
markProgrammaticScroll,
|
|
30830
31218
|
cancelProgrammaticScroll,
|
|
31219
|
+
pinToBottom,
|
|
30831
31220
|
scrollToTop,
|
|
30832
31221
|
scrollToBottom: scrollToBottom2,
|
|
30833
31222
|
forceScrollToBottom,
|
|
30834
31223
|
handleNewMessageClick,
|
|
30835
31224
|
handleScrollToBottomClick,
|
|
30836
|
-
handleLoadMoreClick
|
|
31225
|
+
handleLoadMoreClick,
|
|
31226
|
+
scrollModeRef
|
|
30837
31227
|
};
|
|
30838
31228
|
}
|
|
30839
31229
|
function isUpwardScrollIntent(event, previousTouchY) {
|
|
@@ -34244,7 +34634,7 @@ function buildMessageSlices(message2, options) {
|
|
|
34244
34634
|
messageId: message2.id,
|
|
34245
34635
|
part: "footer"
|
|
34246
34636
|
});
|
|
34247
|
-
return withMessageVisualPositions(slices);
|
|
34637
|
+
return withMessageVisualPositions(slices, message2);
|
|
34248
34638
|
}
|
|
34249
34639
|
function appendBlockContainerSlices({
|
|
34250
34640
|
slices,
|
|
@@ -34452,10 +34842,24 @@ function createContainerShellSliceId(messageId, path2, part) {
|
|
|
34452
34842
|
function createContentSliceId(messageId, path2, startBlockIndex, endBlockIndex) {
|
|
34453
34843
|
return `message:${messageId}:content:${serializeBlockPath(path2)}:${startBlockIndex}-${endBlockIndex}`;
|
|
34454
34844
|
}
|
|
34455
|
-
function
|
|
34845
|
+
function hasRenderableContent(slice2, message2) {
|
|
34846
|
+
const blocks = resolveSliceBlocks(message2, slice2.path, slice2.startBlockIndex, slice2.endBlockIndex);
|
|
34847
|
+
if (!blocks) return true;
|
|
34848
|
+
return blocks.some((block) => {
|
|
34849
|
+
if (block.type === "text" || block.type === "reasoning") {
|
|
34850
|
+
return block.text.trim().length > 0;
|
|
34851
|
+
}
|
|
34852
|
+
return true;
|
|
34853
|
+
});
|
|
34854
|
+
}
|
|
34855
|
+
function withMessageVisualPositions(slices, message2) {
|
|
34456
34856
|
const contentIndices = slices.map((slice2, index2) => slice2.kind === "content-slice" ? index2 : -1).filter((index2) => index2 >= 0);
|
|
34457
|
-
const
|
|
34458
|
-
|
|
34857
|
+
const nonEmptyContentIndices = contentIndices.filter((index2) => {
|
|
34858
|
+
const slice2 = slices[index2];
|
|
34859
|
+
return slice2.kind === "content-slice" && hasRenderableContent(slice2, message2);
|
|
34860
|
+
});
|
|
34861
|
+
const firstContentIndex = nonEmptyContentIndices[0] ?? contentIndices[0] ?? -1;
|
|
34862
|
+
const lastContentIndex = nonEmptyContentIndices.at(-1) ?? contentIndices.at(-1) ?? -1;
|
|
34459
34863
|
return slices.map((slice2, index2) => ({
|
|
34460
34864
|
...slice2,
|
|
34461
34865
|
messageVisual: {
|
|
@@ -34724,6 +35128,7 @@ function useVirtualTailScrollTransaction({
|
|
|
34724
35128
|
markProgrammaticScroll,
|
|
34725
35129
|
resetScrollActiveRef,
|
|
34726
35130
|
scrollParent,
|
|
35131
|
+
scrollModeRef,
|
|
34727
35132
|
virtuosoRef
|
|
34728
35133
|
}) {
|
|
34729
35134
|
const scrollVirtualResetToTail = reactExports.useCallback(() => {
|
|
@@ -34757,8 +35162,23 @@ function useVirtualTailScrollTransaction({
|
|
|
34757
35162
|
scrollActiveVirtualTailTransaction();
|
|
34758
35163
|
return;
|
|
34759
35164
|
}
|
|
34760
|
-
if (resetScrollActiveRef.current)
|
|
34761
|
-
|
|
35165
|
+
if (resetScrollActiveRef.current) {
|
|
35166
|
+
scrollActiveVirtualTailTransaction();
|
|
35167
|
+
return;
|
|
35168
|
+
}
|
|
35169
|
+
if (isStickToBottomMode(scrollModeRef.current)) {
|
|
35170
|
+
if (scrollParent) {
|
|
35171
|
+
markProgrammaticScroll();
|
|
35172
|
+
alignVirtualTailAnchorToBottom(scrollParent);
|
|
35173
|
+
}
|
|
35174
|
+
return;
|
|
35175
|
+
}
|
|
35176
|
+
if (isPreserveDistanceMode(scrollModeRef.current) && scrollParent) {
|
|
35177
|
+
const mode2 = scrollModeRef.current;
|
|
35178
|
+
markProgrammaticScroll();
|
|
35179
|
+
scrollParent.scrollTop = getScrollTopForDistanceToBottom(scrollParent, mode2.distanceToBottom);
|
|
35180
|
+
}
|
|
35181
|
+
}, [markProgrammaticScroll, resetScrollActiveRef, scrollActiveVirtualTailTransaction, scrollModeRef, scrollParent, scrollVirtualResetToTail]);
|
|
34762
35182
|
return {
|
|
34763
35183
|
handleVirtualRangeChanged,
|
|
34764
35184
|
handleVirtualTotalListHeightChanged,
|
|
@@ -34900,89 +35320,89 @@ function getContainerFallbackLabel(slice2, t2) {
|
|
|
34900
35320
|
return t2(isOpeningPart ? "message.virtualTabFallbackStart" : "message.virtualTabFallbackEnd");
|
|
34901
35321
|
}
|
|
34902
35322
|
}
|
|
34903
|
-
const message$4 = "
|
|
34904
|
-
const user = "
|
|
34905
|
-
const agent$2 = "
|
|
34906
|
-
const virtualSliceMessage = "
|
|
34907
|
-
const virtualSliceFragment = "
|
|
34908
|
-
const virtualSliceHeader = "
|
|
34909
|
-
const virtualSliceContent = "
|
|
34910
|
-
const virtualSliceContainer = "
|
|
34911
|
-
const virtualSliceFooter = "
|
|
34912
|
-
const virtualCollabShell = "
|
|
34913
|
-
const contentCol = "
|
|
34914
|
-
const virtualCollabBodySlice = "
|
|
34915
|
-
const blockStack = "
|
|
34916
|
-
const virtualCollabBodyContent = "
|
|
34917
|
-
const groupLayout = "
|
|
34918
|
-
const agentShellCompact = "
|
|
34919
|
-
const avatarCol$1 = "
|
|
34920
|
-
const senderHeader = "
|
|
34921
|
-
const senderLabel = "
|
|
34922
|
-
const senderName = "
|
|
34923
|
-
const bubble = "
|
|
34924
|
-
const textBubble = "
|
|
34925
|
-
const content$f = "
|
|
34926
|
-
const activeSearchMatch = "
|
|
34927
|
-
const activeSearchMatchFocused = "
|
|
34928
|
-
const hasUsage = "
|
|
34929
|
-
const embeddedBubble = "
|
|
34930
|
-
const textSection = "
|
|
34931
|
-
const virtualSliceBubble = "
|
|
34932
|
-
const virtualSliceAgentBubble = "
|
|
34933
|
-
const virtualSliceBubbleContinued = "
|
|
34934
|
-
const virtualSliceBubbleContinues = "
|
|
34935
|
-
const virtualSliceUserBubble = "
|
|
34936
|
-
const virtualCollabShellBubble = "
|
|
34937
|
-
const virtualCollabShellToggle = "
|
|
34938
|
-
const virtualContainerChevron = "
|
|
34939
|
-
const virtualCollabShellIcon = "
|
|
34940
|
-
const virtualCollabShellTitle = "
|
|
34941
|
-
const virtualCollabShellParticipants = "
|
|
34942
|
-
const virtualCollabShellAction = "
|
|
34943
|
-
const virtualCollabShellMeta = "
|
|
34944
|
-
const virtualStreamingTail = "
|
|
34945
|
-
const embeddedBubbleContent = "
|
|
34946
|
-
const pendingPlaceholder = "
|
|
34947
|
-
const blockItem = "
|
|
34948
|
-
const messageFooter = "
|
|
34949
|
-
const groupMetaFooter = "
|
|
34950
|
-
const messageFooterActions = "
|
|
34951
|
-
const timestamp$1 = "
|
|
34952
|
-
const copyButton$3 = "
|
|
34953
|
-
const errorBlock = "
|
|
34954
|
-
const errorHeader = "
|
|
34955
|
-
const errorType = "
|
|
34956
|
-
const errorMessage$1 = "
|
|
34957
|
-
const errorDetails = "
|
|
34958
|
-
const errorDetailsSummary = "
|
|
34959
|
-
const errorDetailsSummaryRow = "
|
|
34960
|
-
const errorDetailsCopyButton = "
|
|
34961
|
-
const errorDetailsContent = "
|
|
34962
|
-
const messageMetrics = "
|
|
34963
|
-
const embeddedMessageMetrics = "
|
|
34964
|
-
const fallbackTransitionBanner = "
|
|
34965
|
-
const messageMetricsPrimary = "
|
|
34966
|
-
const embeddedMessageMetricsPrimary = "
|
|
34967
|
-
const messageMetricsMeta = "
|
|
34968
|
-
const metricsStreaming = "
|
|
34969
|
-
const fallbackTransitionIcon = "
|
|
34970
|
-
const fallbackTransitionText = "
|
|
34971
|
-
const tokenUsage = "
|
|
34972
|
-
const duration$2 = "
|
|
34973
|
-
const modelLabel = "
|
|
34974
|
-
const modelLabelFallback = "
|
|
34975
|
-
const system = "
|
|
34976
|
-
const systemBubble = "
|
|
34977
|
-
const systemContent = "
|
|
34978
|
-
const loadingSpinner$1 = "
|
|
34979
|
-
const memoryWriteButton = "
|
|
34980
|
-
const statusArea = "
|
|
34981
|
-
const statusDot$3 = "
|
|
34982
|
-
const dot$2 = "
|
|
34983
|
-
const dotSending = "
|
|
34984
|
-
const dotError = "
|
|
34985
|
-
const guidanceStatus = "
|
|
35323
|
+
const message$4 = "_message_pwz4e_1";
|
|
35324
|
+
const user = "_user_pwz4e_12";
|
|
35325
|
+
const agent$2 = "_agent_pwz4e_17";
|
|
35326
|
+
const virtualSliceMessage = "_virtualSliceMessage_pwz4e_27";
|
|
35327
|
+
const virtualSliceFragment = "_virtualSliceFragment_pwz4e_33";
|
|
35328
|
+
const virtualSliceHeader = "_virtualSliceHeader_pwz4e_44";
|
|
35329
|
+
const virtualSliceContent = "_virtualSliceContent_pwz4e_49";
|
|
35330
|
+
const virtualSliceContainer = "_virtualSliceContainer_pwz4e_50";
|
|
35331
|
+
const virtualSliceFooter = "_virtualSliceFooter_pwz4e_54";
|
|
35332
|
+
const virtualCollabShell = "_virtualCollabShell_pwz4e_59";
|
|
35333
|
+
const contentCol = "_contentCol_pwz4e_59";
|
|
35334
|
+
const virtualCollabBodySlice = "_virtualCollabBodySlice_pwz4e_67";
|
|
35335
|
+
const blockStack = "_blockStack_pwz4e_79";
|
|
35336
|
+
const virtualCollabBodyContent = "_virtualCollabBodyContent_pwz4e_83";
|
|
35337
|
+
const groupLayout = "_groupLayout_pwz4e_103";
|
|
35338
|
+
const agentShellCompact = "_agentShellCompact_pwz4e_111";
|
|
35339
|
+
const avatarCol$1 = "_avatarCol_pwz4e_116";
|
|
35340
|
+
const senderHeader = "_senderHeader_pwz4e_130";
|
|
35341
|
+
const senderLabel = "_senderLabel_pwz4e_157";
|
|
35342
|
+
const senderName = "_senderName_pwz4e_174";
|
|
35343
|
+
const bubble = "_bubble_pwz4e_180";
|
|
35344
|
+
const textBubble = "_textBubble_pwz4e_193";
|
|
35345
|
+
const content$f = "_content_pwz4e_59";
|
|
35346
|
+
const activeSearchMatch = "_activeSearchMatch_pwz4e_208";
|
|
35347
|
+
const activeSearchMatchFocused = "_activeSearchMatchFocused_pwz4e_212";
|
|
35348
|
+
const hasUsage = "_hasUsage_pwz4e_233";
|
|
35349
|
+
const embeddedBubble = "_embeddedBubble_pwz4e_237";
|
|
35350
|
+
const textSection = "_textSection_pwz4e_259";
|
|
35351
|
+
const virtualSliceBubble = "_virtualSliceBubble_pwz4e_278";
|
|
35352
|
+
const virtualSliceAgentBubble = "_virtualSliceAgentBubble_pwz4e_292";
|
|
35353
|
+
const virtualSliceBubbleContinued = "_virtualSliceBubbleContinued_pwz4e_300";
|
|
35354
|
+
const virtualSliceBubbleContinues = "_virtualSliceBubbleContinues_pwz4e_300";
|
|
35355
|
+
const virtualSliceUserBubble = "_virtualSliceUserBubble_pwz4e_308";
|
|
35356
|
+
const virtualCollabShellBubble = "_virtualCollabShellBubble_pwz4e_334";
|
|
35357
|
+
const virtualCollabShellToggle = "_virtualCollabShellToggle_pwz4e_355";
|
|
35358
|
+
const virtualContainerChevron = "_virtualContainerChevron_pwz4e_374";
|
|
35359
|
+
const virtualCollabShellIcon = "_virtualCollabShellIcon_pwz4e_383";
|
|
35360
|
+
const virtualCollabShellTitle = "_virtualCollabShellTitle_pwz4e_393";
|
|
35361
|
+
const virtualCollabShellParticipants = "_virtualCollabShellParticipants_pwz4e_404";
|
|
35362
|
+
const virtualCollabShellAction = "_virtualCollabShellAction_pwz4e_417";
|
|
35363
|
+
const virtualCollabShellMeta = "_virtualCollabShellMeta_pwz4e_430";
|
|
35364
|
+
const virtualStreamingTail = "_virtualStreamingTail_pwz4e_448";
|
|
35365
|
+
const embeddedBubbleContent = "_embeddedBubbleContent_pwz4e_458";
|
|
35366
|
+
const pendingPlaceholder = "_pendingPlaceholder_pwz4e_464";
|
|
35367
|
+
const blockItem = "_blockItem_pwz4e_495";
|
|
35368
|
+
const messageFooter = "_messageFooter_pwz4e_500";
|
|
35369
|
+
const groupMetaFooter = "_groupMetaFooter_pwz4e_510";
|
|
35370
|
+
const messageFooterActions = "_messageFooterActions_pwz4e_536";
|
|
35371
|
+
const timestamp$1 = "_timestamp_pwz4e_554";
|
|
35372
|
+
const copyButton$3 = "_copyButton_pwz4e_567";
|
|
35373
|
+
const errorBlock = "_errorBlock_pwz4e_596";
|
|
35374
|
+
const errorHeader = "_errorHeader_pwz4e_604";
|
|
35375
|
+
const errorType = "_errorType_pwz4e_612";
|
|
35376
|
+
const errorMessage$1 = "_errorMessage_pwz4e_617";
|
|
35377
|
+
const errorDetails = "_errorDetails_pwz4e_623";
|
|
35378
|
+
const errorDetailsSummary = "_errorDetailsSummary_pwz4e_629";
|
|
35379
|
+
const errorDetailsSummaryRow = "_errorDetailsSummaryRow_pwz4e_637";
|
|
35380
|
+
const errorDetailsCopyButton = "_errorDetailsCopyButton_pwz4e_644";
|
|
35381
|
+
const errorDetailsContent = "_errorDetailsContent_pwz4e_666";
|
|
35382
|
+
const messageMetrics = "_messageMetrics_pwz4e_678";
|
|
35383
|
+
const embeddedMessageMetrics = "_embeddedMessageMetrics_pwz4e_693";
|
|
35384
|
+
const fallbackTransitionBanner = "_fallbackTransitionBanner_pwz4e_706";
|
|
35385
|
+
const messageMetricsPrimary = "_messageMetricsPrimary_pwz4e_710";
|
|
35386
|
+
const embeddedMessageMetricsPrimary = "_embeddedMessageMetricsPrimary_pwz4e_718";
|
|
35387
|
+
const messageMetricsMeta = "_messageMetricsMeta_pwz4e_723";
|
|
35388
|
+
const metricsStreaming = "_metricsStreaming_pwz4e_751";
|
|
35389
|
+
const fallbackTransitionIcon = "_fallbackTransitionIcon_pwz4e_783";
|
|
35390
|
+
const fallbackTransitionText = "_fallbackTransitionText_pwz4e_788";
|
|
35391
|
+
const tokenUsage = "_tokenUsage_pwz4e_805";
|
|
35392
|
+
const duration$2 = "_duration_pwz4e_814";
|
|
35393
|
+
const modelLabel = "_modelLabel_pwz4e_824";
|
|
35394
|
+
const modelLabelFallback = "_modelLabelFallback_pwz4e_834";
|
|
35395
|
+
const system = "_system_pwz4e_846";
|
|
35396
|
+
const systemBubble = "_systemBubble_pwz4e_854";
|
|
35397
|
+
const systemContent = "_systemContent_pwz4e_866";
|
|
35398
|
+
const loadingSpinner$1 = "_loadingSpinner_pwz4e_873";
|
|
35399
|
+
const memoryWriteButton = "_memoryWriteButton_pwz4e_928";
|
|
35400
|
+
const statusArea = "_statusArea_pwz4e_948";
|
|
35401
|
+
const statusDot$3 = "_statusDot_pwz4e_956";
|
|
35402
|
+
const dot$2 = "_dot_pwz4e_965";
|
|
35403
|
+
const dotSending = "_dotSending_pwz4e_973";
|
|
35404
|
+
const dotError = "_dotError_pwz4e_977";
|
|
35405
|
+
const guidanceStatus = "_guidanceStatus_pwz4e_1012";
|
|
34986
35406
|
const styles$1l = {
|
|
34987
35407
|
message: message$4,
|
|
34988
35408
|
user,
|
|
@@ -51183,123 +51603,6 @@ function remarkGfm(options) {
|
|
|
51183
51603
|
fromMarkdownExtensions.push(gfmFromMarkdown());
|
|
51184
51604
|
toMarkdownExtensions.push(gfmToMarkdown(settings2));
|
|
51185
51605
|
}
|
|
51186
|
-
const BACK_DISMISS_HISTORY_STATE_KEY = "__kaiBackDismiss";
|
|
51187
|
-
const BACK_DISMISS_PRIORITY = {
|
|
51188
|
-
mobileSidebar: 10,
|
|
51189
|
-
modal: 100,
|
|
51190
|
-
drawer: 120,
|
|
51191
|
-
imageViewer: 140
|
|
51192
|
-
};
|
|
51193
|
-
let nextOrder = 1;
|
|
51194
|
-
const overlays = /* @__PURE__ */ new Map();
|
|
51195
|
-
let hasActiveHistorySentinel = false;
|
|
51196
|
-
let isClosingFromPopState = false;
|
|
51197
|
-
let isRemovingHistorySentinel = false;
|
|
51198
|
-
let releaseSentinelTimer = null;
|
|
51199
|
-
let isPopStateListenerInstalled = false;
|
|
51200
|
-
function getHistoryStateObject() {
|
|
51201
|
-
const state2 = window.history.state;
|
|
51202
|
-
return state2 && typeof state2 === "object" ? state2 : {};
|
|
51203
|
-
}
|
|
51204
|
-
function canUseHistory() {
|
|
51205
|
-
return typeof window !== "undefined" && !!window.history && !!window.location;
|
|
51206
|
-
}
|
|
51207
|
-
function installPopStateListener() {
|
|
51208
|
-
if (isPopStateListenerInstalled || typeof window === "undefined") return;
|
|
51209
|
-
window.addEventListener("popstate", handlePopState);
|
|
51210
|
-
isPopStateListenerInstalled = true;
|
|
51211
|
-
}
|
|
51212
|
-
function uninstallPopStateListenerIfIdle() {
|
|
51213
|
-
if (!isPopStateListenerInstalled || typeof window === "undefined") return;
|
|
51214
|
-
if (overlays.size > 0 || hasActiveHistorySentinel || releaseSentinelTimer) return;
|
|
51215
|
-
window.removeEventListener("popstate", handlePopState);
|
|
51216
|
-
isPopStateListenerInstalled = false;
|
|
51217
|
-
}
|
|
51218
|
-
function cancelPendingSentinelRelease() {
|
|
51219
|
-
if (!releaseSentinelTimer) return;
|
|
51220
|
-
clearTimeout(releaseSentinelTimer);
|
|
51221
|
-
releaseSentinelTimer = null;
|
|
51222
|
-
}
|
|
51223
|
-
function getTopOverlay() {
|
|
51224
|
-
let top = null;
|
|
51225
|
-
for (const overlay2 of overlays.values()) {
|
|
51226
|
-
if (!top || overlay2.priority > top.priority || overlay2.priority === top.priority && overlay2.order > top.order) {
|
|
51227
|
-
top = overlay2;
|
|
51228
|
-
}
|
|
51229
|
-
}
|
|
51230
|
-
return top;
|
|
51231
|
-
}
|
|
51232
|
-
function pushSentinelIfNeeded() {
|
|
51233
|
-
cancelPendingSentinelRelease();
|
|
51234
|
-
installPopStateListener();
|
|
51235
|
-
if (hasActiveHistorySentinel || overlays.size === 0 || !canUseHistory()) return;
|
|
51236
|
-
window.history.pushState(
|
|
51237
|
-
{ ...getHistoryStateObject(), [BACK_DISMISS_HISTORY_STATE_KEY]: true },
|
|
51238
|
-
"",
|
|
51239
|
-
window.location.href
|
|
51240
|
-
);
|
|
51241
|
-
hasActiveHistorySentinel = true;
|
|
51242
|
-
}
|
|
51243
|
-
function scheduleSentinelReleaseIfNeeded() {
|
|
51244
|
-
if (!hasActiveHistorySentinel || overlays.size > 0 || !canUseHistory() || isClosingFromPopState || releaseSentinelTimer) return;
|
|
51245
|
-
releaseSentinelTimer = setTimeout(() => {
|
|
51246
|
-
releaseSentinelTimer = null;
|
|
51247
|
-
if (!hasActiveHistorySentinel || overlays.size > 0 || isClosingFromPopState) return;
|
|
51248
|
-
isRemovingHistorySentinel = true;
|
|
51249
|
-
hasActiveHistorySentinel = false;
|
|
51250
|
-
window.history.back();
|
|
51251
|
-
setTimeout(() => {
|
|
51252
|
-
isRemovingHistorySentinel = false;
|
|
51253
|
-
uninstallPopStateListenerIfIdle();
|
|
51254
|
-
}, 0);
|
|
51255
|
-
}, 0);
|
|
51256
|
-
}
|
|
51257
|
-
function handlePopState() {
|
|
51258
|
-
if (isRemovingHistorySentinel) return;
|
|
51259
|
-
if (!hasActiveHistorySentinel) return;
|
|
51260
|
-
const topOverlay = getTopOverlay();
|
|
51261
|
-
if (!topOverlay) {
|
|
51262
|
-
hasActiveHistorySentinel = false;
|
|
51263
|
-
uninstallPopStateListenerIfIdle();
|
|
51264
|
-
return;
|
|
51265
|
-
}
|
|
51266
|
-
isClosingFromPopState = true;
|
|
51267
|
-
hasActiveHistorySentinel = false;
|
|
51268
|
-
topOverlay.onClose();
|
|
51269
|
-
setTimeout(() => {
|
|
51270
|
-
isClosingFromPopState = false;
|
|
51271
|
-
pushSentinelIfNeeded();
|
|
51272
|
-
uninstallPopStateListenerIfIdle();
|
|
51273
|
-
}, 0);
|
|
51274
|
-
}
|
|
51275
|
-
function registerBackDismiss(registration) {
|
|
51276
|
-
const existing = overlays.get(registration.id);
|
|
51277
|
-
overlays.set(registration.id, {
|
|
51278
|
-
id: registration.id,
|
|
51279
|
-
priority: registration.priority ?? BACK_DISMISS_PRIORITY.modal,
|
|
51280
|
-
order: existing?.order ?? nextOrder++,
|
|
51281
|
-
onClose: registration.onClose
|
|
51282
|
-
});
|
|
51283
|
-
pushSentinelIfNeeded();
|
|
51284
|
-
return () => {
|
|
51285
|
-
overlays.delete(registration.id);
|
|
51286
|
-
scheduleSentinelReleaseIfNeeded();
|
|
51287
|
-
};
|
|
51288
|
-
}
|
|
51289
|
-
function useBackDismiss({ open, id: id32, priority, onClose }) {
|
|
51290
|
-
const onCloseRef = reactExports.useRef(onClose);
|
|
51291
|
-
reactExports.useEffect(() => {
|
|
51292
|
-
onCloseRef.current = onClose;
|
|
51293
|
-
}, [onClose]);
|
|
51294
|
-
reactExports.useEffect(() => {
|
|
51295
|
-
if (!open) return void 0;
|
|
51296
|
-
return registerBackDismiss({
|
|
51297
|
-
id: id32,
|
|
51298
|
-
priority,
|
|
51299
|
-
onClose: () => onCloseRef.current()
|
|
51300
|
-
});
|
|
51301
|
-
}, [open, id32, priority]);
|
|
51302
|
-
}
|
|
51303
51606
|
const backdrop$2 = "_backdrop_13x7f_1";
|
|
51304
51607
|
const modal$1 = "_modal_13x7f_13";
|
|
51305
51608
|
const toolbar$1 = "_toolbar_13x7f_22";
|
|
@@ -84358,12 +84661,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
84358
84661
|
registerLayoutLoaders([
|
|
84359
84662
|
{
|
|
84360
84663
|
name: "dagre",
|
|
84361
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-
|
|
84664
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-BSQoV8v0.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
|
|
84362
84665
|
},
|
|
84363
84666
|
...[
|
|
84364
84667
|
{
|
|
84365
84668
|
name: "cose-bilkent",
|
|
84366
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-
|
|
84669
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-DPPsXyV-.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
|
|
84367
84670
|
}
|
|
84368
84671
|
]
|
|
84369
84672
|
]);
|
|
@@ -84819,7 +85122,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
84819
85122
|
}, "detector");
|
|
84820
85123
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
84821
85124
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84822
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-
|
|
85125
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-TLOk2Rzr.js");
|
|
84823
85126
|
return { diagram: diagram22 };
|
|
84824
85127
|
}, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
|
|
84825
85128
|
return { id, diagram: diagram2 };
|
|
@@ -84839,7 +85142,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
84839
85142
|
}, "detector");
|
|
84840
85143
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
84841
85144
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84842
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
85145
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-mgrC9EbC.js");
|
|
84843
85146
|
return { diagram: diagram22 };
|
|
84844
85147
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
84845
85148
|
return { id: id2, diagram: diagram2 };
|
|
@@ -84865,7 +85168,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
84865
85168
|
}, "detector");
|
|
84866
85169
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
84867
85170
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84868
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
85171
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-mgrC9EbC.js");
|
|
84869
85172
|
return { diagram: diagram22 };
|
|
84870
85173
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
84871
85174
|
return { id: id3, diagram: diagram2 };
|
|
@@ -84882,7 +85185,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
84882
85185
|
}, "detector");
|
|
84883
85186
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
84884
85187
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84885
|
-
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-
|
|
85188
|
+
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-XyfKI1qN.js");
|
|
84886
85189
|
return { diagram: diagram22 };
|
|
84887
85190
|
}, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
|
|
84888
85191
|
return { id: id4, diagram: diagram2 };
|
|
@@ -84899,7 +85202,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
84899
85202
|
}, "detector");
|
|
84900
85203
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
84901
85204
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84902
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-
|
|
85205
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-DbUEFZOK.js");
|
|
84903
85206
|
return { diagram: diagram22 };
|
|
84904
85207
|
}, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
|
|
84905
85208
|
return { id: id5, diagram: diagram2 };
|
|
@@ -84916,7 +85219,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
84916
85219
|
}, "detector");
|
|
84917
85220
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
84918
85221
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84919
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-
|
|
85222
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-ZWffbcZQ.js");
|
|
84920
85223
|
return { diagram: diagram22 };
|
|
84921
85224
|
}, true ? __vite__mapDeps([20,21,22,23]) : void 0, import.meta.url);
|
|
84922
85225
|
return { id: id6, diagram: diagram2 };
|
|
@@ -84933,7 +85236,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
84933
85236
|
}, "detector");
|
|
84934
85237
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
84935
85238
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84936
|
-
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-
|
|
85239
|
+
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-D6Ue_jvi.js");
|
|
84937
85240
|
return { diagram: diagram22 };
|
|
84938
85241
|
}, true ? __vite__mapDeps([24,19,4,2]) : void 0, import.meta.url);
|
|
84939
85242
|
return { id: id7, diagram: diagram2 };
|
|
@@ -84949,7 +85252,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
84949
85252
|
}, "detector");
|
|
84950
85253
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
84951
85254
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84952
|
-
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-
|
|
85255
|
+
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-CwNwfqQB.js");
|
|
84953
85256
|
return { diagram: diagram22 };
|
|
84954
85257
|
}, true ? __vite__mapDeps([25,17,19,4,2,26,27,22]) : void 0, import.meta.url);
|
|
84955
85258
|
return { id: id8, diagram: diagram2 };
|
|
@@ -84965,7 +85268,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
84965
85268
|
}, "detector");
|
|
84966
85269
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
84967
85270
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84968
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-
|
|
85271
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-C910cPss.js");
|
|
84969
85272
|
return { diagram: diagram22 };
|
|
84970
85273
|
}, true ? __vite__mapDeps([28,21,22,23]) : void 0, import.meta.url);
|
|
84971
85274
|
return { id: id9, diagram: diagram2 };
|
|
@@ -84982,7 +85285,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
84982
85285
|
}, "detector");
|
|
84983
85286
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
84984
85287
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
84985
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-
|
|
85288
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-nf0jRPUz.js");
|
|
84986
85289
|
return { diagram: diagram22 };
|
|
84987
85290
|
}, true ? __vite__mapDeps([29,22,27,21,23]) : void 0, import.meta.url);
|
|
84988
85291
|
return { id: id10, diagram: diagram2 };
|
|
@@ -84999,7 +85302,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
84999
85302
|
}, "detector");
|
|
85000
85303
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
85001
85304
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85002
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-
|
|
85305
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-D-d3ff1p.js");
|
|
85003
85306
|
return { diagram: diagram22 };
|
|
85004
85307
|
}, true ? __vite__mapDeps([30,12,13]) : void 0, import.meta.url);
|
|
85005
85308
|
return { id: id11, diagram: diagram2 };
|
|
@@ -85016,7 +85319,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
85016
85319
|
}, "detector");
|
|
85017
85320
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
85018
85321
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85019
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-
|
|
85322
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-DSVuyveR.js");
|
|
85020
85323
|
return { diagram: diagram22 };
|
|
85021
85324
|
}, true ? __vite__mapDeps([31,9,18]) : void 0, import.meta.url);
|
|
85022
85325
|
return { id: id12, diagram: diagram2 };
|
|
@@ -85036,7 +85339,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
85036
85339
|
}, "detector");
|
|
85037
85340
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
85038
85341
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85039
|
-
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-
|
|
85342
|
+
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-LFmnKQkc.js");
|
|
85040
85343
|
return { diagram: diagram22 };
|
|
85041
85344
|
}, true ? __vite__mapDeps([32,33,11,9,12,13]) : void 0, import.meta.url);
|
|
85042
85345
|
return { id: id13, diagram: diagram2 };
|
|
@@ -85056,7 +85359,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
85056
85359
|
}, "detector");
|
|
85057
85360
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
85058
85361
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85059
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-
|
|
85362
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-LFmnKQkc.js");
|
|
85060
85363
|
return { diagram: diagram22 };
|
|
85061
85364
|
}, true ? __vite__mapDeps([34,33,11,9,12,13]) : void 0, import.meta.url);
|
|
85062
85365
|
return { id: id14, diagram: diagram2 };
|
|
@@ -85076,7 +85379,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
85076
85379
|
}, "detector");
|
|
85077
85380
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
85078
85381
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85079
|
-
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-
|
|
85382
|
+
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-DSYTn62B.js");
|
|
85080
85383
|
return { diagram: diagram22 };
|
|
85081
85384
|
}, true ? __vite__mapDeps([35,36,12,13,1,2,3,4]) : void 0, import.meta.url);
|
|
85082
85385
|
return { id: id15, diagram: diagram2 };
|
|
@@ -85099,7 +85402,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
85099
85402
|
}, "detector");
|
|
85100
85403
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
85101
85404
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85102
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-
|
|
85405
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-DQMP9Qap.js");
|
|
85103
85406
|
return { diagram: diagram22 };
|
|
85104
85407
|
}, true ? __vite__mapDeps([37,36,12,13]) : void 0, import.meta.url);
|
|
85105
85408
|
return { id: id16, diagram: diagram2 };
|
|
@@ -85116,7 +85419,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
85116
85419
|
}, "detector");
|
|
85117
85420
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
85118
85421
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85119
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-
|
|
85422
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-Ddl0Xi1J.js");
|
|
85120
85423
|
return { diagram: diagram22 };
|
|
85121
85424
|
}, true ? __vite__mapDeps([38,11,9,26]) : void 0, import.meta.url);
|
|
85122
85425
|
return { id: id17, diagram: diagram2 };
|
|
@@ -85186,7 +85489,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
85186
85489
|
}, "detector");
|
|
85187
85490
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
85188
85491
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85189
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
85492
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-mgrC9EbC.js");
|
|
85190
85493
|
return { diagram: diagram22 };
|
|
85191
85494
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
85192
85495
|
return { id: id18, diagram: diagram2 };
|
|
@@ -85203,7 +85506,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
85203
85506
|
}, "detector");
|
|
85204
85507
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
85205
85508
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85206
|
-
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-
|
|
85509
|
+
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-DGyTh_MD.js");
|
|
85207
85510
|
return { diagram: diagram22 };
|
|
85208
85511
|
}, true ? __vite__mapDeps([39,26]) : void 0, import.meta.url);
|
|
85209
85512
|
return { id: id19, diagram: diagram2 };
|
|
@@ -85220,7 +85523,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
85220
85523
|
}, "detector");
|
|
85221
85524
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
85222
85525
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85223
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-
|
|
85526
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-C6tovAgS.js");
|
|
85224
85527
|
return { diagram: diagram22 };
|
|
85225
85528
|
}, true ? __vite__mapDeps([40,12,13]) : void 0, import.meta.url);
|
|
85226
85529
|
return { id: id20, diagram: diagram2 };
|
|
@@ -85237,7 +85540,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
85237
85540
|
}, "detector");
|
|
85238
85541
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
85239
85542
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85240
|
-
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY
|
|
85543
|
+
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY--HctbUTU.js");
|
|
85241
85544
|
return { diagram: diagram22 };
|
|
85242
85545
|
}, true ? __vite__mapDeps([41,11]) : void 0, import.meta.url);
|
|
85243
85546
|
return { id: id21, diagram: diagram2 };
|
|
@@ -85254,7 +85557,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
85254
85557
|
}, "detector");
|
|
85255
85558
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
85256
85559
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85257
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-
|
|
85560
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-Brry3E6B.js");
|
|
85258
85561
|
return { diagram: diagram22 };
|
|
85259
85562
|
}, true ? __vite__mapDeps([42,27,22]) : void 0, import.meta.url);
|
|
85260
85563
|
return { id: id22, diagram: diagram2 };
|
|
@@ -85271,7 +85574,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
85271
85574
|
}, "detector");
|
|
85272
85575
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
85273
85576
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85274
|
-
const { diagram: diagram22 } = await import("./diagram-TYMM5635-
|
|
85577
|
+
const { diagram: diagram22 } = await import("./diagram-TYMM5635-D5gIbCxB.js");
|
|
85275
85578
|
return { diagram: diagram22 };
|
|
85276
85579
|
}, true ? __vite__mapDeps([43,17,19,4,2]) : void 0, import.meta.url);
|
|
85277
85580
|
return { id: id23, diagram: diagram2 };
|
|
@@ -85287,7 +85590,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
85287
85590
|
}, "detector");
|
|
85288
85591
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
85289
85592
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85290
|
-
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-
|
|
85593
|
+
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-D0o4g7zX.js");
|
|
85291
85594
|
return { diagram: diagram22 };
|
|
85292
85595
|
}, true ? __vite__mapDeps([44,17,19,4,2]) : void 0, import.meta.url);
|
|
85293
85596
|
return { id: id24, diagram: diagram2 };
|
|
@@ -85303,7 +85606,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
85303
85606
|
}, "detector");
|
|
85304
85607
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
85305
85608
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85306
|
-
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-
|
|
85609
|
+
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-BwjfgwxW.js");
|
|
85307
85610
|
return { diagram: diagram22 };
|
|
85308
85611
|
}, true ? __vite__mapDeps([45,11,5,1,2,14]) : void 0, import.meta.url);
|
|
85309
85612
|
return { id: id25, diagram: diagram2 };
|
|
@@ -85320,7 +85623,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
85320
85623
|
}, "detector");
|
|
85321
85624
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
85322
85625
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85323
|
-
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-
|
|
85626
|
+
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-MkmKHw6a.js");
|
|
85324
85627
|
return { diagram: diagram22 };
|
|
85325
85628
|
}, true ? __vite__mapDeps([46,17,18,19,4,2]) : void 0, import.meta.url);
|
|
85326
85629
|
return { id: id26, diagram: diagram2 };
|
|
@@ -85337,7 +85640,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
85337
85640
|
}, "detector");
|
|
85338
85641
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
85339
85642
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85340
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-
|
|
85643
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-BcL3ZlRm.js");
|
|
85341
85644
|
return { diagram: diagram22 };
|
|
85342
85645
|
}, true ? __vite__mapDeps([47,17,19,4,2,7]) : void 0, import.meta.url);
|
|
85343
85646
|
return { id: id27, diagram: diagram2 };
|
|
@@ -85354,7 +85657,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
85354
85657
|
}, "detector");
|
|
85355
85658
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
85356
85659
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85357
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-
|
|
85660
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-DrIlMxS-.js");
|
|
85358
85661
|
return { diagram: diagram22 };
|
|
85359
85662
|
}, true ? [] : void 0, import.meta.url);
|
|
85360
85663
|
return { id: id28, diagram: diagram2 };
|
|
@@ -85370,7 +85673,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
85370
85673
|
}, "detector");
|
|
85371
85674
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
85372
85675
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85373
|
-
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-
|
|
85676
|
+
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-DQrYqDXp.js");
|
|
85374
85677
|
return { diagram: diagram22 };
|
|
85375
85678
|
}, true ? [] : void 0, import.meta.url);
|
|
85376
85679
|
return { id: id29, diagram: diagram2 };
|
|
@@ -85387,7 +85690,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
85387
85690
|
}, "detector");
|
|
85388
85691
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
85389
85692
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85390
|
-
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-
|
|
85693
|
+
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-YCtrBght.js");
|
|
85391
85694
|
return { diagram: diagram22 };
|
|
85392
85695
|
}, true ? __vite__mapDeps([48,13,17,19,4,2,23,27,22]) : void 0, import.meta.url);
|
|
85393
85696
|
return { id: id30, diagram: diagram2 };
|
|
@@ -85403,7 +85706,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
|
|
|
85403
85706
|
}, "detector");
|
|
85404
85707
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
85405
85708
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
85406
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-
|
|
85709
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-Bv13mYfJ.js");
|
|
85407
85710
|
return { diagram: diagram22 };
|
|
85408
85711
|
}, true ? __vite__mapDeps([49,17,19,4,2]) : void 0, import.meta.url);
|
|
85409
85712
|
return { id: id31, diagram: diagram2 };
|
|
@@ -92254,7 +92557,29 @@ const MarkdownMessage = reactExports.memo(function MarkdownMessage2({
|
|
|
92254
92557
|
const [copiedCode, setCopiedCode] = reactExports.useState(null);
|
|
92255
92558
|
const [copiedBlock, setCopiedBlock] = reactExports.useState(false);
|
|
92256
92559
|
const [viewerImage, setViewerImage] = reactExports.useState(null);
|
|
92257
|
-
const
|
|
92560
|
+
const latestContentRef = reactExports.useRef(content2);
|
|
92561
|
+
latestContentRef.current = content2;
|
|
92562
|
+
const [throttledContent, setThrottledContent] = reactExports.useState(content2);
|
|
92563
|
+
const rafRef = reactExports.useRef(null);
|
|
92564
|
+
reactExports.useEffect(() => {
|
|
92565
|
+
if (!isStreaming) {
|
|
92566
|
+
setThrottledContent(content2);
|
|
92567
|
+
return;
|
|
92568
|
+
}
|
|
92569
|
+
if (throttledContent === content2) return;
|
|
92570
|
+
if (rafRef.current !== null) return;
|
|
92571
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
92572
|
+
rafRef.current = null;
|
|
92573
|
+
setThrottledContent(latestContentRef.current);
|
|
92574
|
+
});
|
|
92575
|
+
});
|
|
92576
|
+
reactExports.useEffect(() => {
|
|
92577
|
+
return () => {
|
|
92578
|
+
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
92579
|
+
};
|
|
92580
|
+
}, []);
|
|
92581
|
+
const effectiveContent = isStreaming ? throttledContent : content2;
|
|
92582
|
+
const processedContent = effectiveContent.replace(/sandbox:\/\/mnt\/data\/([^\s)]+)/g, "$1");
|
|
92258
92583
|
const searchHighlightPlugin = createSearchHighlightPlugin(searchTerms, activeSearchRange);
|
|
92259
92584
|
const normalizedBlockText = processedContent.trim();
|
|
92260
92585
|
const estimatedLineCount = normalizedBlockText ? normalizedBlockText.split(/\r?\n/).length : 0;
|
|
@@ -95968,11 +96293,11 @@ function SearchHighlightedText({
|
|
|
95968
96293
|
if (cursor < text2.length) parts.push(text2.slice(cursor));
|
|
95969
96294
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: parts });
|
|
95970
96295
|
}
|
|
95971
|
-
const container$g = "
|
|
95972
|
-
const inline = "
|
|
95973
|
-
const status = "
|
|
95974
|
-
const dots = "
|
|
95975
|
-
const dot$1 = "
|
|
96296
|
+
const container$g = "_container_1hq28_1";
|
|
96297
|
+
const inline = "_inline_1hq28_7";
|
|
96298
|
+
const status = "_status_1hq28_12";
|
|
96299
|
+
const dots = "_dots_1hq28_17";
|
|
96300
|
+
const dot$1 = "_dot_1hq28_17";
|
|
95976
96301
|
const styles$_ = {
|
|
95977
96302
|
container: container$g,
|
|
95978
96303
|
inline,
|
|
@@ -97734,7 +98059,10 @@ const ContentSliceRenderer = reactExports.memo(function ContentSliceRenderer2({
|
|
|
97734
98059
|
const renderableBlocks = blocks.filter(isNonEmptyContentBlock);
|
|
97735
98060
|
const assistantPendingPlaceholder = isAssistantPendingPlaceholder(context.message);
|
|
97736
98061
|
const messageFailed = isMessageFailed(context.message);
|
|
97737
|
-
|
|
98062
|
+
const isStreamingAgent = isMessageStreaming(context.message) && context.message.senderRole === "agent";
|
|
98063
|
+
const showPending = assistantPendingPlaceholder || renderableBlocks.length === 0 && isStreamingAgent && slice2.isLastContentSliceOfMessage;
|
|
98064
|
+
const showStreamingTail = !showPending && isMessageStreaming(context.message) && context.message.senderRole === "agent" && slice2.isLastContentSliceOfMessage;
|
|
98065
|
+
if (renderableBlocks.length === 0 && !showPending && !showStreamingTail && !(messageFailed && context.message.error)) {
|
|
97738
98066
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
97739
98067
|
"div",
|
|
97740
98068
|
{
|
|
@@ -97744,7 +98072,6 @@ const ContentSliceRenderer = reactExports.memo(function ContentSliceRenderer2({
|
|
|
97744
98072
|
}
|
|
97745
98073
|
);
|
|
97746
98074
|
}
|
|
97747
|
-
const showStreamingTail = !assistantPendingPlaceholder && isMessageStreaming(context.message) && context.message.senderRole === "agent" && slice2.isLastContentSliceOfMessage;
|
|
97748
98075
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
97749
98076
|
BlockSliceRenderer,
|
|
97750
98077
|
{
|
|
@@ -97752,7 +98079,7 @@ const ContentSliceRenderer = reactExports.memo(function ContentSliceRenderer2({
|
|
|
97752
98079
|
blocks: renderableBlocks,
|
|
97753
98080
|
context: { ...context, searchMatch: sliceSearchMatch },
|
|
97754
98081
|
showStreamingTail,
|
|
97755
|
-
showPendingPlaceholder:
|
|
98082
|
+
showPendingPlaceholder: showPending,
|
|
97756
98083
|
showError: messageFailed && !!context.message.error && slice2.isLastContentSliceOfMessage
|
|
97757
98084
|
}
|
|
97758
98085
|
);
|
|
@@ -97950,30 +98277,33 @@ function SliceBlocksContent({
|
|
|
97950
98277
|
}
|
|
97951
98278
|
);
|
|
97952
98279
|
}
|
|
97953
|
-
const frame = "
|
|
97954
|
-
const container$f = "
|
|
97955
|
-
const
|
|
97956
|
-
const
|
|
97957
|
-
const
|
|
97958
|
-
const
|
|
97959
|
-
const
|
|
97960
|
-
const
|
|
97961
|
-
const
|
|
97962
|
-
const
|
|
97963
|
-
const
|
|
97964
|
-
const
|
|
97965
|
-
const
|
|
97966
|
-
const
|
|
97967
|
-
const
|
|
97968
|
-
const
|
|
97969
|
-
const
|
|
97970
|
-
const
|
|
97971
|
-
const
|
|
97972
|
-
const
|
|
97973
|
-
const
|
|
98280
|
+
const frame = "_frame_w0af7_1";
|
|
98281
|
+
const container$f = "_container_w0af7_7";
|
|
98282
|
+
const containerSwitching = "_containerSwitching_w0af7_18";
|
|
98283
|
+
const loadMoreButton = "_loadMoreButton_w0af7_32";
|
|
98284
|
+
const searchButton = "_searchButton_w0af7_53";
|
|
98285
|
+
const newMessageHint = "_newMessageHint_w0af7_54";
|
|
98286
|
+
const scrollToBottom$2 = "_scrollToBottom_w0af7_55";
|
|
98287
|
+
const quoteSelectionButton = "_quoteSelectionButton_w0af7_56";
|
|
98288
|
+
const bottomAnchor = "_bottomAnchor_w0af7_68";
|
|
98289
|
+
const virtualListItem = "_virtualListItem_w0af7_73";
|
|
98290
|
+
const virtualBottomReserve = "_virtualBottomReserve_w0af7_80";
|
|
98291
|
+
const virtualListItemMessageStart = "_virtualListItemMessageStart_w0af7_86";
|
|
98292
|
+
const virtualListItemMessageContinuation = "_virtualListItemMessageContinuation_w0af7_90";
|
|
98293
|
+
const virtualListItemFirst = "_virtualListItemFirst_w0af7_95";
|
|
98294
|
+
const virtualListItemLast = "_virtualListItemLast_w0af7_99";
|
|
98295
|
+
const searchBar = "_searchBar_w0af7_103";
|
|
98296
|
+
const searchInput$6 = "_searchInput_w0af7_119";
|
|
98297
|
+
const searchCount$1 = "_searchCount_w0af7_140";
|
|
98298
|
+
const contextStatusRow = "_contextStatusRow_w0af7_172";
|
|
98299
|
+
const maintenanceRow = "_maintenanceRow_w0af7_181";
|
|
98300
|
+
const noMoreMessages$2 = "_noMoreMessages_w0af7_186";
|
|
98301
|
+
const centerState = "_centerState_w0af7_187";
|
|
98302
|
+
const switchingPlaceholder = "_switchingPlaceholder_w0af7_201";
|
|
97974
98303
|
const styles$W = {
|
|
97975
98304
|
frame,
|
|
97976
98305
|
container: container$f,
|
|
98306
|
+
containerSwitching,
|
|
97977
98307
|
loadMoreButton,
|
|
97978
98308
|
searchButton,
|
|
97979
98309
|
newMessageHint,
|
|
@@ -97992,7 +98322,8 @@ const styles$W = {
|
|
|
97992
98322
|
contextStatusRow,
|
|
97993
98323
|
maintenanceRow,
|
|
97994
98324
|
noMoreMessages: noMoreMessages$2,
|
|
97995
|
-
centerState
|
|
98325
|
+
centerState,
|
|
98326
|
+
switchingPlaceholder
|
|
97996
98327
|
};
|
|
97997
98328
|
function MessageListRows(props) {
|
|
97998
98329
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(VirtualMessageRows, { ...props });
|
|
@@ -98012,7 +98343,7 @@ function VirtualBottomReserve({ context }) {
|
|
|
98012
98343
|
const VIRTUAL_LIST_COMPONENTS = { Footer: VirtualBottomReserve };
|
|
98013
98344
|
function VirtualMessageRows(props) {
|
|
98014
98345
|
const virtuosoRef = reactExports.useRef(null);
|
|
98015
|
-
const
|
|
98346
|
+
const appliedResetScrollKeysRef = reactExports.useRef(/* @__PURE__ */ new Set());
|
|
98016
98347
|
const resetScrollActiveRef = reactExports.useRef(false);
|
|
98017
98348
|
const resetScrollRunRef = reactExports.useRef(0);
|
|
98018
98349
|
const localSendScrollActiveRef = reactExports.useRef(false);
|
|
@@ -98057,6 +98388,7 @@ function VirtualMessageRows(props) {
|
|
|
98057
98388
|
markProgrammaticScroll,
|
|
98058
98389
|
resetScrollActiveRef,
|
|
98059
98390
|
scrollParent,
|
|
98391
|
+
scrollModeRef: props.scroll.scrollModeRef,
|
|
98060
98392
|
virtuosoRef
|
|
98061
98393
|
});
|
|
98062
98394
|
const {
|
|
@@ -98071,8 +98403,13 @@ function VirtualMessageRows(props) {
|
|
|
98071
98403
|
});
|
|
98072
98404
|
reactExports.useLayoutEffect(() => {
|
|
98073
98405
|
if (!scrollParent || items.length === 0) return;
|
|
98074
|
-
if (appliedResetScrollKeyRef.current === props.resetScrollToBottomKey) return;
|
|
98075
98406
|
const resetKey = props.resetScrollToBottomKey;
|
|
98407
|
+
if (appliedResetScrollKeysRef.current.has(resetKey)) return;
|
|
98408
|
+
if (props.skipResetToBottom) {
|
|
98409
|
+
appliedResetScrollKeysRef.current.add(resetKey);
|
|
98410
|
+
resetScrollActiveRef.current = false;
|
|
98411
|
+
return;
|
|
98412
|
+
}
|
|
98076
98413
|
clearVirtualPrependPreserveAnchor();
|
|
98077
98414
|
clearReservedBottomScrollSpace();
|
|
98078
98415
|
const resetRun = resetScrollRunRef.current + 1;
|
|
@@ -98097,7 +98434,7 @@ function VirtualMessageRows(props) {
|
|
|
98097
98434
|
remainingFrames,
|
|
98098
98435
|
tailVisible: measure.tailVisible
|
|
98099
98436
|
})) {
|
|
98100
|
-
|
|
98437
|
+
appliedResetScrollKeysRef.current.add(resetKey);
|
|
98101
98438
|
resetScrollActiveRef.current = false;
|
|
98102
98439
|
return;
|
|
98103
98440
|
}
|
|
@@ -98111,12 +98448,9 @@ function VirtualMessageRows(props) {
|
|
|
98111
98448
|
if (resetScrollRunRef.current === resetRun) {
|
|
98112
98449
|
resetScrollActiveRef.current = false;
|
|
98113
98450
|
}
|
|
98114
|
-
if (appliedResetScrollKeyRef.current !== resetKey) {
|
|
98115
|
-
appliedResetScrollKeyRef.current = void 0;
|
|
98116
|
-
}
|
|
98117
98451
|
if (rafId !== void 0) cancelAnimationFrame(rafId);
|
|
98118
98452
|
};
|
|
98119
|
-
}, [clearVirtualPrependPreserveAnchor, clearReservedBottomScrollSpace, items.length, props.resetScrollToBottomKey, scrollParent, scrollVirtualResetToTail]);
|
|
98453
|
+
}, [clearVirtualPrependPreserveAnchor, clearReservedBottomScrollSpace, items.length, props.skipResetToBottom, props.resetScrollToBottomKey, scrollParent, scrollVirtualResetToTail]);
|
|
98120
98454
|
useVirtualLocalSendTailScrollTransaction({
|
|
98121
98455
|
forceScrollToBottom,
|
|
98122
98456
|
itemCount: items.length,
|
|
@@ -98140,7 +98474,7 @@ function VirtualMessageRows(props) {
|
|
|
98140
98474
|
const handleVirtualLoadMoreClick = reactExports.useCallback((source = "manual") => {
|
|
98141
98475
|
if (source === "startReached" && resetScrollActiveRef.current) return;
|
|
98142
98476
|
if (props.loadingMore) return;
|
|
98143
|
-
|
|
98477
|
+
appliedResetScrollKeysRef.current.add(props.resetScrollToBottomKey);
|
|
98144
98478
|
resetScrollActiveRef.current = false;
|
|
98145
98479
|
resetScrollRunRef.current += 1;
|
|
98146
98480
|
cancelProgrammaticScroll();
|
|
@@ -98211,8 +98545,7 @@ function VirtualMessageRows(props) {
|
|
|
98211
98545
|
)
|
|
98212
98546
|
}
|
|
98213
98547
|
)
|
|
98214
|
-
}
|
|
98215
|
-
props.resetScrollToBottomKey
|
|
98548
|
+
}
|
|
98216
98549
|
);
|
|
98217
98550
|
}
|
|
98218
98551
|
function areSetsEqual(left2, right2) {
|
|
@@ -98329,10 +98662,10 @@ function VirtualMessageSliceItemRenderer({
|
|
|
98329
98662
|
}
|
|
98330
98663
|
}
|
|
98331
98664
|
function areVirtualMessageListItemRendererPropsEqual(previous2, next2) {
|
|
98332
|
-
return areVirtualMessageListItemsEqual(previous2.item, next2.item) && previous2.expandedContainerKeys === next2.expandedContainerKeys && previous2.onContainerToggle === next2.onContainerToggle && previous2.onLoadMoreClickOverride === next2.onLoadMoreClickOverride && previous2.onPrepareScrollToMessageTop === next2.onPrepareScrollToMessageTop && previous2.onScrollToMessageTop === next2.onScrollToMessageTop && previous2.agents === next2.agents && previous2.isGroupChat === next2.isGroupChat && previous2.lastAgentMessageId === next2.lastAgentMessageId && previous2.loadingMore === next2.loadingMore && previous2.searchMatchByMessageId === next2.searchMatchByMessageId && previous2.searchTerms === next2.searchTerms && previous2.activeSearchMessageId === next2.activeSearchMessageId && previous2.highlightedMessageId === next2.highlightedMessageId && areVirtualScrollPropsEqual(previous2.scroll, next2.scroll) && previous2.onLoadMore === next2.onLoadMore && previous2.onAgentClick === next2.onAgentClick && previous2.onWriteMemory === next2.onWriteMemory && previous2.t === next2.t;
|
|
98665
|
+
return areVirtualMessageListItemsEqual(previous2.item, next2.item) && previous2.expandedContainerKeys === next2.expandedContainerKeys && previous2.onContainerToggle === next2.onContainerToggle && previous2.onLoadMoreClickOverride === next2.onLoadMoreClickOverride && previous2.onPrepareScrollToMessageTop === next2.onPrepareScrollToMessageTop && previous2.onScrollToMessageTop === next2.onScrollToMessageTop && previous2.agents === next2.agents && previous2.isGroupChat === next2.isGroupChat && previous2.lastAgentMessageId === next2.lastAgentMessageId && previous2.loadingMore === next2.loadingMore && previous2.skipResetToBottom === next2.skipResetToBottom && previous2.searchMatchByMessageId === next2.searchMatchByMessageId && previous2.searchTerms === next2.searchTerms && previous2.activeSearchMessageId === next2.activeSearchMessageId && previous2.highlightedMessageId === next2.highlightedMessageId && areVirtualScrollPropsEqual(previous2.scroll, next2.scroll) && previous2.onLoadMore === next2.onLoadMore && previous2.onAgentClick === next2.onAgentClick && previous2.onWriteMemory === next2.onWriteMemory && previous2.t === next2.t;
|
|
98333
98666
|
}
|
|
98334
98667
|
function areVirtualScrollPropsEqual(previous2, next2) {
|
|
98335
|
-
return previous2.containerRef === next2.containerRef && previous2.leaveStickyBottom === next2.leaveStickyBottom && previous2.markProgrammaticScroll === next2.markProgrammaticScroll && previous2.cancelProgrammaticScroll === next2.cancelProgrammaticScroll && previous2.forceScrollToBottom === next2.forceScrollToBottom && previous2.handleLoadMoreClick === next2.handleLoadMoreClick && previous2.reserveBottomScrollSpace === next2.reserveBottomScrollSpace;
|
|
98668
|
+
return previous2.containerRef === next2.containerRef && previous2.leaveStickyBottom === next2.leaveStickyBottom && previous2.markProgrammaticScroll === next2.markProgrammaticScroll && previous2.cancelProgrammaticScroll === next2.cancelProgrammaticScroll && previous2.forceScrollToBottom === next2.forceScrollToBottom && previous2.handleLoadMoreClick === next2.handleLoadMoreClick && previous2.reserveBottomScrollSpace === next2.reserveBottomScrollSpace && previous2.scrollModeRef === next2.scrollModeRef;
|
|
98336
98669
|
}
|
|
98337
98670
|
function areVirtualMessageListItemsEqual(previous2, next2) {
|
|
98338
98671
|
if (previous2.type !== next2.type) return false;
|
|
@@ -98567,7 +98900,36 @@ function useMessageTextSelectionQuote(rootRef) {
|
|
|
98567
98900
|
hideSelection: quote.hideSelection
|
|
98568
98901
|
};
|
|
98569
98902
|
}
|
|
98903
|
+
const SESSION_SCROLL_SNAPSHOT_MAX_ENTRIES = 20;
|
|
98904
|
+
function createSessionScrollSnapshotStore() {
|
|
98905
|
+
const snapshots = /* @__PURE__ */ new Map();
|
|
98906
|
+
return {
|
|
98907
|
+
get(sessionId) {
|
|
98908
|
+
return snapshots.get(sessionId);
|
|
98909
|
+
},
|
|
98910
|
+
set(sessionId, snapshot) {
|
|
98911
|
+
snapshots.delete(sessionId);
|
|
98912
|
+
snapshots.set(sessionId, snapshot);
|
|
98913
|
+
if (snapshots.size > SESSION_SCROLL_SNAPSHOT_MAX_ENTRIES) {
|
|
98914
|
+
const oldestKey = snapshots.keys().next().value;
|
|
98915
|
+
if (oldestKey !== void 0) snapshots.delete(oldestKey);
|
|
98916
|
+
}
|
|
98917
|
+
},
|
|
98918
|
+
delete(sessionId) {
|
|
98919
|
+
snapshots.delete(sessionId);
|
|
98920
|
+
}
|
|
98921
|
+
};
|
|
98922
|
+
}
|
|
98923
|
+
const sessionScrollSnapshotStore = createSessionScrollSnapshotStore();
|
|
98924
|
+
function shouldRestoreSessionScrollSnapshot(snapshot) {
|
|
98925
|
+
return Boolean(
|
|
98926
|
+
snapshot && !snapshot.isAtBottom && getScrollSnapshotDistanceToBottom(snapshot) >= RESTORE_SCROLL_MIN_DISTANCE_TO_BOTTOM
|
|
98927
|
+
);
|
|
98928
|
+
}
|
|
98570
98929
|
const SEARCH_MATCH_SCROLL_OFFSET = 96;
|
|
98930
|
+
const SESSION_SWITCH_SETTLE_MAX_RAF_COUNT = 30;
|
|
98931
|
+
const SESSION_SWITCH_STABLE_FRAME_COUNT = 5;
|
|
98932
|
+
const SESSION_SWITCH_VISUAL_BOTTOM_STABLE_THRESHOLD = 1;
|
|
98571
98933
|
const EMPTY_SEARCH_MATCH_BY_MESSAGE_ID = /* @__PURE__ */ new Map();
|
|
98572
98934
|
const EMPTY_SEARCH_TERMS = [];
|
|
98573
98935
|
function getSortedMessages$1(msgMap) {
|
|
@@ -98586,7 +98948,7 @@ function scrollElementIntoMessageListView(container2, targetEl) {
|
|
|
98586
98948
|
const targetTop = targetRect.top - containerRect.top + container2.scrollTop;
|
|
98587
98949
|
container2.scrollTo({ top: Math.max(0, targetTop - SEARCH_MATCH_SCROLL_OFFSET), behavior: "smooth" });
|
|
98588
98950
|
}
|
|
98589
|
-
const MessageList = reactExports.forwardRef(function MessageList2({ sessionId,
|
|
98951
|
+
const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, scrollToMessageTarget, onScrollToMessageTargetConsumed, sending, onAgentClick, onWriteMemory, onQuoteText, maintenanceEvent, isSessionSwitchPending = false, onSessionSwitchSettled, sessionInfo }, ref) {
|
|
98590
98952
|
const { t: t2 } = useTranslation();
|
|
98591
98953
|
const { agents } = useAgentStore();
|
|
98592
98954
|
const [searchOpen, setSearchOpen] = reactExports.useState(false);
|
|
@@ -98595,6 +98957,9 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, a
|
|
|
98595
98957
|
const [scrollParent, setScrollParent] = reactExports.useState(null);
|
|
98596
98958
|
const [highlightedMessageId, setHighlightedMessageId] = reactExports.useState(null);
|
|
98597
98959
|
const searchInputRef = reactExports.useRef(null);
|
|
98960
|
+
const lastVisualScrollHeightRef = reactExports.useRef(0);
|
|
98961
|
+
const latestIsAtBottomRef = reactExports.useRef(true);
|
|
98962
|
+
const settleSessionSwitchRafRef = reactExports.useRef(null);
|
|
98598
98963
|
const msgMap = useMessageStore((s16) => s16.messagesMap.get(sessionId));
|
|
98599
98964
|
const loading2 = useMessageStore(
|
|
98600
98965
|
reactExports.useMemo(() => (s16) => s16.loadingMap.get(sessionId) ?? false, [sessionId])
|
|
@@ -98605,6 +98970,9 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, a
|
|
|
98605
98970
|
const loadingMore = useMessageStore(
|
|
98606
98971
|
reactExports.useMemo(() => (s16) => s16.loadingMoreMap.get(sessionId) ?? false, [sessionId])
|
|
98607
98972
|
);
|
|
98973
|
+
const isSessionLoaded = useMessageStore(
|
|
98974
|
+
reactExports.useMemo(() => (s16) => s16.conversationMap.has(sessionId), [sessionId])
|
|
98975
|
+
);
|
|
98608
98976
|
const conversation2 = useMessageStore(
|
|
98609
98977
|
reactExports.useMemo(() => (s16) => s16.conversationMap.get(sessionId) ?? null, [sessionId])
|
|
98610
98978
|
);
|
|
@@ -98692,23 +99060,30 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, a
|
|
|
98692
99060
|
const loadMoreMessages = reactExports.useCallback(() => {
|
|
98693
99061
|
useMessageStore.getState().loadMoreMessages(sessionId);
|
|
98694
99062
|
}, [sessionId]);
|
|
99063
|
+
const resetScrollToBottomKey = `${sessionId}:virtual`;
|
|
99064
|
+
const initialScrollSnapshot = sessionScrollSnapshotStore.get(sessionId);
|
|
99065
|
+
const shouldRestoreInitialScrollPosition = shouldRestoreSessionScrollSnapshot(initialScrollSnapshot);
|
|
99066
|
+
const isSwitchingToUnloadedSession = !hasMessages && !isSessionLoaded;
|
|
99067
|
+
const hideScrollDuringSessionSwitch = isSessionSwitchPending || isSwitchingToUnloadedSession;
|
|
98695
99068
|
const scroll = useScrollAnchor(
|
|
98696
99069
|
{
|
|
98697
99070
|
itemCount: messages2.length,
|
|
98698
99071
|
tailItemIdentity: tailMessageKey,
|
|
98699
99072
|
tailRenderableRevision,
|
|
99073
|
+
isVirtualList: true,
|
|
98700
99074
|
localSendEpoch,
|
|
98701
99075
|
isPrependingHistory: loadingMore,
|
|
98702
|
-
resetKey:
|
|
99076
|
+
resetKey: resetScrollToBottomKey,
|
|
99077
|
+
initialScrollSnapshot
|
|
98703
99078
|
},
|
|
98704
99079
|
loadMoreMessages
|
|
98705
99080
|
);
|
|
98706
|
-
const resetScrollToBottomKey = `${sessionId}:virtual:${activationEpoch}`;
|
|
98707
99081
|
const setScrollContainerRef = reactExports.useCallback((element2) => {
|
|
98708
99082
|
scroll.setContainerRef(element2);
|
|
98709
99083
|
setScrollParent(element2);
|
|
98710
99084
|
}, [scroll.setContainerRef]);
|
|
98711
99085
|
const quoteSelection = useMessageTextSelectionQuote(scroll.containerRef);
|
|
99086
|
+
latestIsAtBottomRef.current = scroll.isAtBottom;
|
|
98712
99087
|
const searchMatchByMessageId = reactExports.useMemo(() => {
|
|
98713
99088
|
const matchByMessageId = /* @__PURE__ */ new Map();
|
|
98714
99089
|
searchState.matches.forEach((match, index2) => {
|
|
@@ -98823,14 +99198,96 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, a
|
|
|
98823
99198
|
forceScrollToBottom: scroll.forceScrollToBottom,
|
|
98824
99199
|
scrollToMessage
|
|
98825
99200
|
}), [scroll.forceScrollToBottom, scroll.scrollToBottom, scroll.scrollToTop, scrollToMessage]);
|
|
98826
|
-
|
|
98827
|
-
|
|
98828
|
-
|
|
99201
|
+
reactExports.useLayoutEffect(() => {
|
|
99202
|
+
if (!hasMessages || !scrollParent) return;
|
|
99203
|
+
lastVisualScrollHeightRef.current = Math.max(
|
|
99204
|
+
scrollParent.scrollHeight,
|
|
99205
|
+
scrollParent.scrollTop + scrollParent.clientHeight,
|
|
99206
|
+
scrollParent.clientHeight
|
|
99207
|
+
);
|
|
99208
|
+
});
|
|
99209
|
+
reactExports.useLayoutEffect(() => {
|
|
99210
|
+
if (!initialScrollSnapshot) return;
|
|
99211
|
+
sessionScrollSnapshotStore.delete(sessionId);
|
|
99212
|
+
}, [initialScrollSnapshot, sessionId]);
|
|
99213
|
+
reactExports.useLayoutEffect(() => {
|
|
99214
|
+
if (!scrollParent || !hasMessages) return;
|
|
99215
|
+
return () => {
|
|
99216
|
+
sessionScrollSnapshotStore.set(sessionId, {
|
|
99217
|
+
scrollTop: scrollParent.scrollTop,
|
|
99218
|
+
scrollHeight: scrollParent.scrollHeight,
|
|
99219
|
+
clientHeight: scrollParent.clientHeight,
|
|
99220
|
+
isAtBottom: latestIsAtBottomRef.current
|
|
99221
|
+
});
|
|
99222
|
+
};
|
|
99223
|
+
}, [hasMessages, scrollParent, sessionId]);
|
|
99224
|
+
reactExports.useLayoutEffect(() => {
|
|
99225
|
+
if (!isSwitchingToUnloadedSession || !scrollParent) return;
|
|
99226
|
+
const placeholderHeight = lastVisualScrollHeightRef.current;
|
|
99227
|
+
if (placeholderHeight <= 0) return;
|
|
99228
|
+
scroll.markProgrammaticScroll();
|
|
99229
|
+
scrollParent.scrollTop = Math.max(0, placeholderHeight - scrollParent.clientHeight);
|
|
99230
|
+
}, [isSwitchingToUnloadedSession, scroll, scrollParent]);
|
|
99231
|
+
reactExports.useLayoutEffect(() => {
|
|
99232
|
+
if (!isSessionSwitchPending || !hasMessages || !scrollParent) return;
|
|
99233
|
+
if (shouldRestoreInitialScrollPosition) {
|
|
99234
|
+
onSessionSwitchSettled?.(sessionId);
|
|
99235
|
+
return;
|
|
99236
|
+
}
|
|
99237
|
+
let remainingFrames = SESSION_SWITCH_SETTLE_MAX_RAF_COUNT;
|
|
99238
|
+
let stableFrames = 0;
|
|
99239
|
+
let lastScrollHeight = scrollParent.scrollHeight;
|
|
99240
|
+
let lastVisualBottom = scrollParent.scrollTop + scrollParent.clientHeight;
|
|
99241
|
+
const settleAfterLayoutStabilizes = () => {
|
|
99242
|
+
const scrollHeight = scrollParent.scrollHeight;
|
|
99243
|
+
const visualBottom = scrollParent.scrollTop + scrollParent.clientHeight;
|
|
99244
|
+
const visualBottomStable = Math.abs(visualBottom - lastVisualBottom) <= SESSION_SWITCH_VISUAL_BOTTOM_STABLE_THRESHOLD;
|
|
99245
|
+
const hasContent = scrollHeight > scrollParent.clientHeight;
|
|
99246
|
+
const atBottom = hasContent && scrollHeight - visualBottom <= SESSION_SWITCH_VISUAL_BOTTOM_STABLE_THRESHOLD;
|
|
99247
|
+
stableFrames = scrollHeight === lastScrollHeight && visualBottomStable && atBottom ? stableFrames + 1 : 0;
|
|
99248
|
+
lastScrollHeight = scrollHeight;
|
|
99249
|
+
lastVisualBottom = visualBottom;
|
|
99250
|
+
remainingFrames -= 1;
|
|
99251
|
+
if (remainingFrames > 0 && stableFrames < SESSION_SWITCH_STABLE_FRAME_COUNT) {
|
|
99252
|
+
settleSessionSwitchRafRef.current = window.requestAnimationFrame(settleAfterLayoutStabilizes);
|
|
99253
|
+
} else {
|
|
99254
|
+
if (!atBottom) scroll.pinToBottom();
|
|
99255
|
+
settleSessionSwitchRafRef.current = null;
|
|
99256
|
+
onSessionSwitchSettled?.(sessionId);
|
|
99257
|
+
}
|
|
99258
|
+
};
|
|
99259
|
+
settleSessionSwitchRafRef.current = window.requestAnimationFrame(settleAfterLayoutStabilizes);
|
|
99260
|
+
return () => {
|
|
99261
|
+
if (settleSessionSwitchRafRef.current !== null) {
|
|
99262
|
+
window.cancelAnimationFrame(settleSessionSwitchRafRef.current);
|
|
99263
|
+
settleSessionSwitchRafRef.current = null;
|
|
99264
|
+
}
|
|
99265
|
+
};
|
|
99266
|
+
}, [hasMessages, isSessionSwitchPending, onSessionSwitchSettled, scroll, scrollParent, sessionId, shouldRestoreInitialScrollPosition]);
|
|
99267
|
+
reactExports.useEffect(() => {
|
|
99268
|
+
if (!isSessionSwitchPending || hasMessages || !isSessionLoaded) return;
|
|
99269
|
+
const rafId = requestAnimationFrame(() => {
|
|
99270
|
+
requestAnimationFrame(() => {
|
|
99271
|
+
requestAnimationFrame(() => {
|
|
99272
|
+
onSessionSwitchSettled?.(sessionId);
|
|
99273
|
+
});
|
|
99274
|
+
});
|
|
99275
|
+
});
|
|
99276
|
+
return () => cancelAnimationFrame(rafId);
|
|
99277
|
+
}, [hasMessages, isSessionLoaded, isSessionSwitchPending, onSessionSwitchSettled, sessionId]);
|
|
98829
99278
|
let listContent;
|
|
98830
99279
|
if (loading2 && !hasMessages) {
|
|
98831
99280
|
listContent = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$W.centerState, children: t2("common.loading") });
|
|
98832
|
-
} else if (
|
|
98833
|
-
listContent = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99281
|
+
} else if (isSwitchingToUnloadedSession) {
|
|
99282
|
+
listContent = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99283
|
+
"div",
|
|
99284
|
+
{
|
|
99285
|
+
"data-testid": "message-list-switching-placeholder",
|
|
99286
|
+
className: styles$W.switchingPlaceholder,
|
|
99287
|
+
style: { minHeight: lastVisualScrollHeightRef.current || void 0 },
|
|
99288
|
+
"aria-hidden": "true"
|
|
99289
|
+
}
|
|
99290
|
+
);
|
|
98834
99291
|
} else if (!hasMessages && sessionInfo && !sessionInfo.isDefault) {
|
|
98835
99292
|
listContent = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
98836
99293
|
EmptySessionGuide,
|
|
@@ -98859,6 +99316,7 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, a
|
|
|
98859
99316
|
activeSearchMessageId: visibleActiveSearchMessageId,
|
|
98860
99317
|
highlightedMessageId,
|
|
98861
99318
|
resetScrollToBottomKey,
|
|
99319
|
+
skipResetToBottom: shouldRestoreInitialScrollPosition,
|
|
98862
99320
|
localSendEpoch,
|
|
98863
99321
|
scroll,
|
|
98864
99322
|
onLoadMore: loadMoreMessages,
|
|
@@ -98875,7 +99333,7 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, a
|
|
|
98875
99333
|
"div",
|
|
98876
99334
|
{
|
|
98877
99335
|
"data-testid": "message-list-scroll-container",
|
|
98878
|
-
className: styles$W.container,
|
|
99336
|
+
className: clsx(styles$W.container, hideScrollDuringSessionSwitch && styles$W.containerSwitching),
|
|
98879
99337
|
ref: setScrollContainerRef,
|
|
98880
99338
|
tabIndex: 0,
|
|
98881
99339
|
onScroll: scroll.handleScroll,
|
|
@@ -99818,20 +100276,20 @@ function SessionTabItem({
|
|
|
99818
100276
|
);
|
|
99819
100277
|
return showTooltip ? /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: displayTitle, side: "bottom", delayDuration: 800, children: tabContent2 }) : tabContent2;
|
|
99820
100278
|
}
|
|
99821
|
-
const surface$1 = "
|
|
99822
|
-
const header$g = "
|
|
99823
|
-
const formBody$1 = "
|
|
99824
|
-
const subtitle$1 = "
|
|
99825
|
-
const memberRow = "
|
|
99826
|
-
const memberLabel = "
|
|
99827
|
-
const memberAvatars = "
|
|
99828
|
-
const memberAvatar$1 = "
|
|
99829
|
-
const memberCount = "
|
|
99830
|
-
const titleField$1 = "
|
|
99831
|
-
const titleInput$1 = "
|
|
99832
|
-
const titleError = "
|
|
99833
|
-
const hint$7 = "
|
|
99834
|
-
const actions$6 = "
|
|
100279
|
+
const surface$1 = "_surface_13clr_1";
|
|
100280
|
+
const header$g = "_header_13clr_7";
|
|
100281
|
+
const formBody$1 = "_formBody_13clr_22";
|
|
100282
|
+
const subtitle$1 = "_subtitle_13clr_30";
|
|
100283
|
+
const memberRow = "_memberRow_13clr_37";
|
|
100284
|
+
const memberLabel = "_memberLabel_13clr_45";
|
|
100285
|
+
const memberAvatars = "_memberAvatars_13clr_50";
|
|
100286
|
+
const memberAvatar$1 = "_memberAvatar_13clr_50";
|
|
100287
|
+
const memberCount = "_memberCount_13clr_65";
|
|
100288
|
+
const titleField$1 = "_titleField_13clr_76";
|
|
100289
|
+
const titleInput$1 = "_titleInput_13clr_80";
|
|
100290
|
+
const titleError = "_titleError_13clr_101";
|
|
100291
|
+
const hint$7 = "_hint_13clr_108";
|
|
100292
|
+
const actions$6 = "_actions_13clr_114";
|
|
99835
100293
|
const styles$S = {
|
|
99836
100294
|
surface: surface$1,
|
|
99837
100295
|
header: header$g,
|
|
@@ -99907,7 +100365,7 @@ function CreateSessionDialog({
|
|
|
99907
100365
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
99908
100366
|
Dialog,
|
|
99909
100367
|
{
|
|
99910
|
-
size: "
|
|
100368
|
+
size: "md",
|
|
99911
100369
|
surfaceAs: "form",
|
|
99912
100370
|
surfaceProps: { onSubmit: handleSubmit },
|
|
99913
100371
|
surfaceClassName: styles$S.surface,
|
|
@@ -102446,15 +102904,21 @@ const ChatFooter = reactExports.forwardRef(function ChatFooter2({
|
|
|
102446
102904
|
}
|
|
102447
102905
|
) });
|
|
102448
102906
|
});
|
|
102449
|
-
const container$c = "
|
|
102450
|
-
const mainShell = "
|
|
102451
|
-
const conversationPane = "
|
|
102452
|
-
const notification = "
|
|
102907
|
+
const container$c = "_container_flpnr_1";
|
|
102908
|
+
const mainShell = "_mainShell_flpnr_11";
|
|
102909
|
+
const conversationPane = "_conversationPane_flpnr_19";
|
|
102910
|
+
const notification = "_notification_flpnr_27";
|
|
102911
|
+
const mobileTerminalDialogOverlay = "_mobileTerminalDialogOverlay_flpnr_43";
|
|
102912
|
+
const mobileTerminalDialogSurface = "_mobileTerminalDialogSurface_flpnr_48";
|
|
102913
|
+
const mobileTerminalDialogBody = "_mobileTerminalDialogBody_flpnr_59";
|
|
102453
102914
|
const styles$M = {
|
|
102454
102915
|
container: container$c,
|
|
102455
102916
|
mainShell,
|
|
102456
102917
|
conversationPane,
|
|
102457
|
-
notification
|
|
102918
|
+
notification,
|
|
102919
|
+
mobileTerminalDialogOverlay,
|
|
102920
|
+
mobileTerminalDialogSurface,
|
|
102921
|
+
mobileTerminalDialogBody
|
|
102458
102922
|
};
|
|
102459
102923
|
function ChatNotification({ message: message2 }) {
|
|
102460
102924
|
if (!message2) return null;
|
|
@@ -103645,20 +104109,20 @@ const useWorkspaceStore = create$3((set2, get2) => ({
|
|
|
103645
104109
|
}
|
|
103646
104110
|
}));
|
|
103647
104111
|
const header$e = { "title": "KAi", "subtitle": "由 AI 驱动", "status": "在线" };
|
|
103648
|
-
const input$6 = { "placeholder": "在想什么…", "placeholderWithAttachments": "补充你的想法…", "placeholderDefaultGoal": "Goal 模式已开启,说说想做些什么…", "messageInput": "消息输入框", "send": "发送", "stopGenerating": "停止生成", "attachFile": "添加附件", "attachmentTooLarge": "{{names}} 超过 {{maxSizeMB}}MB 限制", "directoryAttachmentFailed": "目录打包失败", "directoryAttachmentSkipped": "部分文件无法读取,已跳过。", "unnamedAttachment": "未命名附件", "attachmentNameSeparator": "、", "removeAttachment": "移除附件", "slashCommandDisabledWhileStreaming": "输出中暂不支持斜杠命令", "footer": "由 AI 驱动 • 回复可能有所不同", "mentionAll": "@ 所有人", "mentionAllHint": "发送消息给所有成员", "broadcastModeAll": "广播给所有人", "broadcastModeMulti": "广播给 {{agents}}", "placeholderGroup": "提问,或 @ 某人…", "slashCommand": "斜杠命令", "commandMenu": "命令" };
|
|
104112
|
+
const input$6 = { "placeholder": "在想什么…", "placeholderWithAttachments": "补充你的想法…", "placeholderDefaultGoal": "Goal 模式已开启,说说想做些什么…", "messageInput": "消息输入框", "send": "发送", "stopGenerating": "停止生成", "attachFile": "添加附件", "attachmentTooLarge": "{{names}} 超过 {{maxSizeMB}}MB 限制", "directoryAttachmentFailed": "目录打包失败", "directoryAttachmentSkipped": "部分文件无法读取,已跳过。", "unnamedAttachment": "未命名附件", "attachmentNameSeparator": "、", "removeAttachment": "移除附件", "slashCommandDisabledWhileStreaming": "输出中暂不支持斜杠命令", "footer": "由 AI 驱动 • 回复可能有所不同", "mentionAll": "@ 所有人", "mentionAllHint": "发送消息给所有成员", "broadcastModeAll": "广播给所有人", "broadcastModeMulti": "广播给 {{agents}}", "placeholderGroup": "提问,或 @ 某人…", "slashCommand": "斜杠命令", "commandMenu": "命令", "quickReply": "快捷回复" };
|
|
103649
104113
|
const empty$8 = { "title": "开始对话", "description": "问我任何问题!我会帮助你解答疑问和完成任务。", "suggestions": ["你能做什么?", "帮我写代码", "解释一个概念", "总结这段文字"] };
|
|
103650
104114
|
const noAgent$1 = { "title": "还没有智能体", "description": "创建你的第一个智能体开始对话", "createButton": "创建智能体", "orGoSettings": "或前往设置" };
|
|
103651
104115
|
const onboarding$1 = { "title": "为智能体注入灵魂", "description": "只需一步:连接 AI 模型,智能体才能思考和回答。", "step1": { "title": "连接 AI 模型", "desc": "添加一个 LLM 通道,支持 OpenAI 兼容接口" }, "step2": { "title": "创建你的智能体", "desc": "赋予它个性和能力" }, "step3": { "title": "开始对话", "desc": "与智能体单独或群组交流" }, "startSetup": "连接 AI", "skip": "暂时跳过", "checking": "正在检查配置…" };
|
|
103652
104116
|
const channelGuide$1 = { "title": "为智能体注入灵魂", "description": "连接 AI 模型,智能体才能思考和回答", "configure": "连接 AI", "dismiss": "跳过" };
|
|
103653
104117
|
const agentChannelCheck$1 = { "title": "智能体还没有灵魂", "description": "连接 AI 模型后才能开始对话", "configure": "连接 AI", "skip": "仍要创建" };
|
|
103654
104118
|
const welcome$1 = { "description": "选择一个智能体开始对话,或叫上所有人一起讨论", "title": "开启一段思考", "subtitle": "从左侧选择一位伙伴开始对话", "or": "或", "createGroup": "叫上所有人一起讨论" };
|
|
103655
|
-
const settings$1 = /* @__PURE__ */ JSON.parse('{"title":"设置","nav":{"app":"应用","capabilities":"能力","automation":"自动化","agents":"Agent","connection":"连接"},"tabs":{"llm":"模型通道","agent":"智能体","skill":"Skills","appearance":"应用设置","remote":"远程访问","mcp":"MCP 服务","search":"搜索引擎","integration":"Bot接入","about":"关于","usage":"使用统计"},"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 协作桌面应用"},"usage":{"title":"使用统计","description":"查看本机 AI 工作、Token、群聊、模型和工具使用情况。"},"appSettings":{"title":"应用设置","description":"管理 KAi 的显示、实验能力和数据边界。"}},"channel":{"title":"模型通道","add":"添加通道","addTitle":"添加通道","editTitle":"编辑通道","name":"通道名称","namePlaceholder":"例如:OpenAI、Azure","apiType":"接口类型","apiTypeOpenai":"OpenAI Compatible","apiTypeOfficialOpenai":"OpenAI","apiTypeAnthropic":"Anthropic","apiTypeGoogle":"Google Gemini","apiTypeDeepSeek":"DeepSeek","apiTypeMoonshot":"Moonshot AI (Kimi)","apiTypeAlibaba":"Alibaba (Qwen)","apiTypeZhipu":"Zhipu AI (GLM)","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":"此通道正用于多模态图片分析(image_analyze 工具),删除后该功能将停用。确定删除「{{name}}」?","tabChannels":"通道","tabMultimodal":"多模态","contextTokenLimit":"上下文长度限制(仅对当前通道生效)","contextTokenLimitHint":"超过限制时自动压缩对话历史,减少 token 消耗"},"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":"清空当前结果","customHeaders":"自定义请求头","customHeadersDescription":"添加服务端要求的鉴权、API Key 或路由 Header。大多数服务不需要配置这里。","customHeadersEmpty":"尚未添加自定义请求头。只有服务端文档要求时才需要配置。","addAuthorization":"添加 Authorization","addApiKey":"添加 X-API-Key","addCustomHeader":"添加自定义 Header","headerName":"Header 名称","headerValue":"Header 值","headerEnabled":"启用","headerShow":"显示","headerHide":"隐藏","testUsesCurrentValues":"测试会使用当前填写的值,包括尚未保存的修改。","testSuccessWithDetails":"连接成功 · {{toolCount}} 个工具 · 已发送 {{count}} 个自定义 Header"},"about":{"releaseNotes":"更新日志","versionCopied":"已复制","checkForUpdates":"检查更新","checking":"正在检查更新","goDownload":"前往下载","newVersion":"发现新版本","updateHighlights":"本次更新","viewFullReleaseNotes":"查看完整更新日志","viewReleaseHistory":"查看历史更新记录","hideReleaseHistory":"收起历史更新记录","retry":"重新检查","upToDate":"当前已是最新版本","updateError":"检查更新失败","feedback":{"title":"反馈","trigger":"有问题或建议?发送反馈","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 可使用 image_analyze 工具识别和理解图片内容","channel":"通道","selectChannel":"请选择通道","modelLabel":"指定模型(可选)","modelHint":"留空使用通道默认模型","maxImageEdge":"最大图片长边","maxImageEdgeHint":"超出时自动缩放,越小成本越低","inactive":"已关闭","channelDeleted":"通道已失效","incomplete":"未完成配置 · 请选择通道"},"generation":{"title":"图片生成","summary":"{channel} · {model} · {size}","summaryDefault":"未配置","hint":"启用后,Agent 可使用 image_generate 工具根据文字描述生成图片","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":"群组","targetThreadDesc":"Bot 接入群组,再选择固定 Session 或自动分流","targetAutoSession":"按外部会话自动分流","targetAutoSessionDesc":"每个企业微信会话进入独立 Session","selectAgent":"选择 Agent","selectAgentSession":"选择 Agent Session","defaultSession":"使用 Agent 默认 Session","agentSessionHint":"不选择时,消息会发送到该 Agent 的默认会话。","selectGroup":"选择群组","selectThread":"选择 Session","selectAutoGroup":"自动 Session 所属群组","autoSessionHint":"每个企业微信外部会话会在该群组下创建 1 个 Session,后续消息继续进入同一个 Session。","autoSessionAgentHint":"每个企业微信外部会话会在所选 Agent 下创建 1 个 Direct Session;之后同一外部会话的消息会继续进入这个 Session。","autoSessionCardHint":"每个外部会话一个 Session","routingMode":"会话处理方式","routingFixed":"固定到指定 Session","routingAuto":"按外部会话自动分流","routingAutoLabel":"按外部会话自动分流","bindAndTest":"绑定并测试","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 分钟),请重试"},"usage":{"trustLine":"使用统计仅保存在本机,不记录对话内容,可随时清空。","clearConfirm":"确定清空全部使用统计吗?这个操作不可恢复。","empty":"还没有使用统计。开始一次对话后,这里会显示你的 AI 使用情况。","filters":{"range":"时间范围","scope":"统计范围"},"range":{"today":"今天","week":"本周","month":"本月"},"scope":{"all":"全部","direct":"单聊","group":"群聊"},"metrics":{"work":"AI 工作次数","tokens":"Token 用量","tools":"工具调用","messages":"消息数"},"insights":"洞察","noInsights":"数据还不够,继续使用后会出现洞察。","trend":"每日 Token 用量","activity":{"title":"Token 活动","hint":"按天显示 Token 使用强度,颜色越深表示用量越高。","summaryLabel":"Token 活动:峰值 {{peak}} Token,当前连续 {{current}} 天,最长连续 {{longest}} 天。","days":"{{count}} 天","tooltip":"{{label}} · {{tokens}} Token · {{runs}} 次 AI 工作","empty":"这个周期还没有 Token 活动。开始一次对话后,这里会显示每日使用强度。","legendLow":"少","legendHigh":"多","summary":{"peak":"峰值 {{value}}","longestDuration":"最长任务 {{value}}","streak":"连续 {{current}} 天,最长 {{longest}} 天"},"weekdays":{"sun":"日","mon":"一","tue":"二","wed":"三","thu":"四","fri":"五","sat":"六"}},"sections":{"models":"模型用量","agents":"Agent 用量","groups":"群聊用量","tools":"工具使用","sessions":"高消耗 Session","phrases":"常用话术"},"phrases":{"empty":"暂无足够高频的话术记录(至少出现 3 次)","count":"出现 {{count}} 次","alreadyExists":"已存在相同内容的快捷回复","added":"已加入快捷回复","addFailed":"添加失败","addToQuickReply":"加入快捷回复"},"retention":"Token 活动记录默认保留最近一年。","clear":"清空统计","loadError":"无法读取使用统计","sessionLabel":"会话 {{index}}","sessionFallback":"未知会话 {{index}}","callsValue":"{{count}} 次","insight":{"groupTokenShare":"本周期 {{rate}}% 的 Token 来自群聊协作。","unfinishedCallRate":"{{rate}}% 的模型或工具调用未完成。","unfinishedCallRateLessThan":"少于 {{rate}}% 的模型或工具调用未完成。","topTool":"{{name}} 是最常用工具,共调用 {{count}} 次。","topGroup":"{{name}} 是最活跃群聊,产生 {{count}} 次 AI 工作。"}},"appSettings":{"tabsLabel":"应用设置分类","tabs":{"appearance":"外观","behavior":"行为","privacy":"隐私","experimental":"实验"},"groups":{"display":"显示","window":"窗口","dataControl":"数据控制","network":"联网行为","usageDiagnostics":"使用数据与诊断","experimentalAgents":"Agent 实验"},"appearance":{"languageDescription":"改变菜单、按钮和提示文案的显示语言。","themeDescription":"使用系统、亮色或暗色主题。"},"behavior":{"windowCloseTitle":"关闭窗口时","windowCloseDescription":"选择 KAi 是每次询问、直接退出,还是继续在托盘中运行。","windowCloseAsk":"每次询问","windowCloseQuit":"退出应用","windowCloseMinimize":"最小化到托盘"},"privacy":{"localUsageTitle":"本机使用统计","localUsageDescription":"AI 使用统计仅保存在本机,不记录对话内容。","viewUsage":"查看","autoUpdateTitle":"自动检查更新","autoUpdateDescription":"每天启动后检查一次新版本。","telemetryTitle":"发送使用数据与诊断信息","telemetryDescription":"帮助改进 KAi 的稳定性和体验。不会上传聊天内容、文件内容、密钥或完整终端输出。"},"experimental":{"notice":"这些能力还在试验中。开启后可能改变 Agent 的工具列表和对话行为。","agentSessionTitleToolTitle":"自动生成 Session 标题","agentSessionTitleToolDescription":"开启后,系统会在用户发送消息后异步生成/更新当前 Session 的标题。","restartHint":"新一轮 Agent 执行会读取此开关","ptyTerminalTitle":"PTY 终端","ptyTerminalDescription":"允许 Agent 使用 PTY 终端工具,并显示终端事件卡片和浮动面板。"},"storage":{"title":"数据存储","dataDir":"数据目录","dataDirDescription":"KAi 存储所有数据(包括对话、配置和附件)的目录位置。","openDir":"打开目录","changeDir":"更改目录","default":"默认","confirmTitle":"更改数据目录","confirmMessage":"确认将数据目录更改为以下路径?更改将在重启后生效。","migrateData":"迁移现有数据到新目录","confirm":"确认更改","cancel":"取消","loading":"正在切换...","success":"数据目录已更改,请重启应用以生效。","failed":"更改数据目录失败:{{error}}","progressClosingDb":"正在关闭数据库...","progressCopying":"正在复制文件({{current}}/{{total}})...","progressWritingConfig":"正在写入配置...","restartNow":"立即重启","sameDir":"选择的目录与当前数据目录相同"}}}');
|
|
104119
|
+
const settings$1 = /* @__PURE__ */ JSON.parse('{"title":"设置","nav":{"app":"应用","capabilities":"能力","automation":"自动化","agents":"Agent","connection":"连接"},"tabs":{"llm":"模型通道","agent":"智能体","skill":"Skills","appearance":"应用设置","remote":"远程访问","mcp":"MCP 服务","search":"搜索引擎","integration":"Bot接入","about":"关于","usage":"使用统计"},"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 协作桌面应用"},"usage":{"title":"使用统计","description":"查看本机 AI 工作、Token、群聊、模型和工具使用情况。"},"appSettings":{"title":"应用设置","description":"管理 KAi 的显示、实验能力和数据边界。"}},"channel":{"title":"模型通道","add":"添加通道","addTitle":"添加通道","editTitle":"编辑通道","name":"通道名称","namePlaceholder":"例如:OpenAI、Azure","apiType":"接口类型","apiTypeOpenai":"OpenAI Compatible","apiTypeOfficialOpenai":"OpenAI","apiTypeAnthropic":"Anthropic","apiTypeGoogle":"Google Gemini","apiTypeDeepSeek":"DeepSeek","apiTypeMoonshot":"Moonshot AI (Kimi)","apiTypeAlibaba":"Alibaba (Qwen)","apiTypeZhipu":"Zhipu AI (GLM)","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":"此通道正用于多模态图片分析(image_analyze 工具),删除后该功能将停用。确定删除「{{name}}」?","tabChannels":"通道","tabMultimodal":"多模态","contextTokenLimit":"上下文长度限制(仅对当前通道生效)","contextTokenLimitHint":"超过限制时自动压缩对话历史,减少 token 消耗"},"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":"清空当前结果","customHeaders":"自定义请求头","customHeadersDescription":"添加服务端要求的鉴权、API Key 或路由 Header。大多数服务不需要配置这里。","customHeadersEmpty":"尚未添加自定义请求头。只有服务端文档要求时才需要配置。","addAuthorization":"添加 Authorization","addApiKey":"添加 X-API-Key","addCustomHeader":"添加自定义 Header","headerName":"Header 名称","headerValue":"Header 值","headerEnabled":"启用","headerShow":"显示","headerHide":"隐藏","testUsesCurrentValues":"测试会使用当前填写的值,包括尚未保存的修改。","testSuccessWithDetails":"连接成功 · {{toolCount}} 个工具 · 已发送 {{count}} 个自定义 Header","envVars":"环境变量","envVarsDescription":"环境变量将传递给启动命令(例如 API_KEY=xxx)。","envVarsEmpty":"尚未添加环境变量。","addEnvVar":"添加环境变量","envKey":"变量名","envValue":"值","envDuplicateKey":"存在同名变量(不区分大小写),请检查是否重复。","envInvalidKey":"变量名只能包含字母、数字和下划线,且以字母或下划线开头。"},"about":{"releaseNotes":"更新日志","versionCopied":"已复制","checkForUpdates":"检查更新","checking":"正在检查更新","goDownload":"前往下载","newVersion":"发现新版本","updateHighlights":"本次更新","viewFullReleaseNotes":"查看完整更新日志","viewReleaseHistory":"查看历史更新记录","hideReleaseHistory":"收起历史更新记录","retry":"重新检查","upToDate":"当前已是最新版本","updateError":"检查更新失败","copyVersion":"点击复制版本号","downloading":"正在下载更新","updateReady":"更新已准备好","installUpdate":"重启安装","feedback":{"title":"反馈","trigger":"有问题或建议?发送反馈","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 可使用 image_analyze 工具识别和理解图片内容","channel":"通道","selectChannel":"请选择通道","modelLabel":"指定模型(可选)","modelHint":"留空使用通道默认模型","maxImageEdge":"最大图片长边","maxImageEdgeHint":"超出时自动缩放,越小成本越低","inactive":"已关闭","channelDeleted":"通道已失效","incomplete":"未完成配置 · 请选择通道"},"generation":{"title":"图片生成","summary":"{channel} · {model} · {size}","summaryDefault":"未配置","hint":"启用后,Agent 可使用 image_generate 工具根据文字描述生成图片","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":"群组","targetThreadDesc":"Bot 接入群组,再选择固定 Session 或自动分流","targetAutoSession":"按外部会话自动分流","targetAutoSessionDesc":"每个企业微信会话进入独立 Session","selectAgent":"选择 Agent","selectAgentSession":"选择 Agent Session","defaultSession":"使用 Agent 默认 Session","agentSessionHint":"不选择时,消息会发送到该 Agent 的默认会话。","selectGroup":"选择群组","selectThread":"选择 Session","selectAutoGroup":"自动 Session 所属群组","autoSessionHint":"每个企业微信外部会话会在该群组下创建 1 个 Session,后续消息继续进入同一个 Session。","autoSessionAgentHint":"每个企业微信外部会话会在所选 Agent 下创建 1 个 Direct Session;之后同一外部会话的消息会继续进入这个 Session。","autoSessionCardHint":"每个外部会话一个 Session","routingMode":"会话处理方式","routingFixed":"固定到指定 Session","routingAuto":"按外部会话自动分流","routingAutoLabel":"按外部会话自动分流","bindAndTest":"绑定并测试","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 分钟),请重试"},"usage":{"trustLine":"使用统计仅保存在本机,不记录对话内容,可随时清空。","clearConfirm":"确定清空全部使用统计吗?这个操作不可恢复。","empty":"还没有使用统计。开始一次对话后,这里会显示你的 AI 使用情况。","filters":{"range":"时间范围","scope":"统计范围"},"range":{"today":"今天","week":"本周","month":"本月"},"scope":{"all":"全部","direct":"单聊","group":"群聊"},"metrics":{"work":"AI 工作次数","tokens":"Token 用量","tools":"工具调用","messages":"消息数"},"insights":"洞察","noInsights":"数据还不够,继续使用后会出现洞察。","trend":"每日 Token 用量","activity":{"title":"Token 活动","hint":"按天显示 Token 使用强度,颜色越深表示用量越高。","summaryLabel":"Token 活动:峰值 {{peak}} Token,当前连续 {{current}} 天,最长连续 {{longest}} 天。","days":"{{count}} 天","tooltip":"{{label}} · {{tokens}} Token · {{runs}} 次 AI 工作","empty":"这个周期还没有 Token 活动。开始一次对话后,这里会显示每日使用强度。","legendLow":"少","legendHigh":"多","summary":{"peak":"峰值 {{value}}","longestDuration":"最长任务 {{value}}","streak":"连续 {{current}} 天,最长 {{longest}} 天"},"weekdays":{"sun":"日","mon":"一","tue":"二","wed":"三","thu":"四","fri":"五","sat":"六"}},"sections":{"models":"模型用量","agents":"Agent 用量","groups":"群聊用量","tools":"工具使用","sessions":"高消耗 Session","phrases":"常用话术"},"phrases":{"empty":"暂无足够高频的话术记录(至少出现 3 次)","count":"出现 {{count}} 次","alreadyExists":"已存在相同内容的快捷回复","added":"已加入快捷回复","addFailed":"添加失败","addToQuickReply":"加入快捷回复"},"retention":"Token 活动记录默认保留最近一年。","clear":"清空统计","loadError":"无法读取使用统计","sessionLabel":"会话 {{index}}","sessionFallback":"未知会话 {{index}}","callsValue":"{{count}} 次","insight":{"groupTokenShare":"本周期 {{rate}}% 的 Token 来自群聊协作。","unfinishedCallRate":"{{rate}}% 的模型或工具调用未完成。","unfinishedCallRateLessThan":"少于 {{rate}}% 的模型或工具调用未完成。","topTool":"{{name}} 是最常用工具,共调用 {{count}} 次。","topGroup":"{{name}} 是最活跃群聊,产生 {{count}} 次 AI 工作。"}},"appSettings":{"tabsLabel":"应用设置分类","tabs":{"appearance":"外观","behavior":"行为","privacy":"隐私","experimental":"实验"},"groups":{"display":"显示","window":"窗口","dataControl":"数据控制","network":"联网行为","usageDiagnostics":"使用数据与诊断","experimentalAgents":"Agent 实验"},"appearance":{"languageDescription":"改变菜单、按钮和提示文案的显示语言。","themeDescription":"使用系统、亮色或暗色主题。"},"behavior":{"windowCloseTitle":"关闭窗口时","windowCloseDescription":"选择 KAi 是每次询问、直接退出,还是继续在托盘中运行。","windowCloseAsk":"每次询问","windowCloseQuit":"退出应用","windowCloseMinimize":"最小化到托盘"},"privacy":{"localUsageTitle":"本机使用统计","localUsageDescription":"AI 使用统计仅保存在本机,不记录对话内容。","viewUsage":"查看","autoUpdateTitle":"自动检查更新","autoUpdateDescription":"每天启动后检查一次新版本。","telemetryTitle":"发送使用数据与诊断信息","telemetryDescription":"帮助改进 KAi 的稳定性和体验。不会上传聊天内容、文件内容、密钥或完整终端输出。"},"experimental":{"notice":"这些能力还在试验中。开启后可能改变 Agent 的工具列表和对话行为。","agentSessionTitleToolTitle":"自动生成 Session 标题","agentSessionTitleToolDescription":"开启后,系统会在用户发送消息后异步生成/更新当前 Session 的标题。","restartHint":"新一轮 Agent 执行会读取此开关","ptyTerminalTitle":"PTY 终端","ptyTerminalDescription":"允许 Agent 使用 PTY 终端工具,并显示终端事件卡片和浮动面板。"},"storage":{"title":"数据存储","dataDir":"数据目录","dataDirDescription":"KAi 存储所有数据(包括对话、配置和附件)的目录位置。","openDir":"打开目录","changeDir":"更改目录","default":"默认","confirmTitle":"更改数据目录","confirmMessage":"确认将数据目录更改为以下路径?更改将在重启后生效。","migrateData":"迁移现有数据到新目录","confirm":"确认更改","cancel":"取消","loading":"正在切换...","success":"数据目录已更改,请重启应用以生效。","failed":"更改数据目录失败:{{error}}","progressClosingDb":"正在关闭数据库...","progressCopying":"正在复制文件({{current}}/{{total}})...","progressWritingConfig":"正在写入配置...","restartNow":"立即重启","sameDir":"选择的目录与当前数据目录相同"}}}');
|
|
103656
104120
|
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": { "file_read": "读取工作区内容", "file_write": "写入文件", "file_edit": "修改现有文件", "shell": "执行命令或验证结果" }, "toolDesc": { "file_read": "读取本地文件或目录内容", "file_write": "创建或覆盖写入本地文件", "file_edit": "对文件做精确文本替换", "file_patch": "批量应用多文件补丁", "shell": "执行终端命令", "web_fetch": "抓取指定网页或接口内容", "web_search": "联网搜索实时信息", "sql_query": "执行只读 SQL 查询", "image_analyze": "分析图片内容或提取文字", "image_generate": "根据文字描述生成图片", "skill": "加载并使用预定义 Skill", "cron_job_create": "创建定时任务", "cron_job_list": "查看定时任务列表", "cron_job_update": "更新定时任务", "cron_job_delete": "删除定时任务" } }, "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": "记住:这是你的第一次对话,也是你定义自己的机会。" } };
|
|
103657
104121
|
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", "noMatchingInstalledSkills": "未找到匹配的 Skill", "noMatchingAgents": "未找到匹配的 Agent", "drawerDisabledWarning": "此 Skill 当前全局停用,Agent 无法实际使用", "filteredCount": "找到 {{count}} 个 Agent", "selectAll": "全选", "clearAll": "清空", "tabInstalled": "已安装", "tabDiscover": "发现", "tabSources": "来源", "refreshInstalled": "刷新", "checkInstalledUpdates": "检查更新", "sourceLocal": "本地安装", "globalEnabled": "全局启用", "globalDisabled": "全局禁用", "assignToAgent": "分配给 Agent", "viewDetails": "查看详情", "viewUpdates": "查看更新", "status": "状态", "globalStatus": "全局状态", "agentAssignment": "Agent 分配", "source": "来源", "allowedTools": "允许工具", "installLocation": "安装位置", "discoverComingSoon": "发现页将在下一阶段接入", "discoverComingSoonDesc": "先完成已安装页重构,再接来源管理和远程搜索。", "sourcesComingSoon": "来源管理将在下一阶段接入", "sourcesComingSoonDesc": "这里之后用于配置和测试 Skill Hub Source。", "sourcesTitle": "Skill 来源", "sourcesDesc": "配置可用于发现和安装远程 Skill 的来源。已安装 Skill 不受删除来源影响。", "addSource": "添加来源", "editSource": "编辑来源", "deleteSource": "删除来源", "deleteSourceConfirm": "确定删除来源「{{name}}」?", "deleteSourceHint": "这只会删除来源配置,不会删除本地已安装的 Skill。", "sourceName": "来源名称", "sourceType": "来源类别", "sourceTypes": { "skillhub": "Skill Hub", "static-index": "静态索引", "github-repo": "GitHub 仓库" }, "sourceTypeHints": { "skillhub": "适用于提供搜索、详情和包下载 API 的 Skill Registry。", "static-index": "适用于一个静态 JSON 索引文件,索引中声明 Skill 包和下载地址。", "github-repo": "适用于以 GitHub 仓库组织的 SKILL.md 集合。" }, "sourceBaseUrl": "Base URL", "useAuth": "需要认证(Bearer Token)", "sourceToken": "Token", "sourceTokenHint": "在 SkillHub 注册中心生成的 API Token,用于访问私有命名空间。", "sourceEnabled": "已启用", "sourceDisabled": "已停用", "authNone": "无认证", "authBearer": "Bearer 认证", "testSource": "测试连接", "testingSource": "测试中", "testSourceSuccess": "连接成功", "testSourceFailed": "连接失败", "noSources": "还没有 Skill 来源。添加来源后,可在发现页搜索远程 Skill。", "sourceStatus": { "connected": "已连接", "unreachable": "无法连接", "auth_failed": "认证失败", "incompatible": "协议不兼容", "disabled": "已停用", "unknown": "未测试" }, "discoverSearchPlaceholder": "搜索远程 Skill,输入 partial / empty / fail 可预览状态", "searchCatalog": "搜索", "loadMore": "加载更多", "discoverNoSources": "还没有启用的来源。请先在“来源”页添加并启用 Skill Source。", "discoverInitial": "输入关键词,从已启用来源中发现可安装的 Skill。", "discoverNoResults": "没有找到匹配的 Skill。", "searchSuccess": "找到 {{count}} 个结果。", "searchPartialFailed": "{{succeeded}} 个来源成功,{{failed}} 个来源失败。", "searchAllFailed": "所有来源都搜索失败。", "installSkill": "安装", "installingSkill": "安装中", "installConfirm": "确定从「{{source}}」安装 Skill「{{name}}」?", "installSuccess": "已安装 Skill「{{name}}」", "installFailed": "安装失败", "installedState": "已安装", "openWebDetail": "网页详情", "loadCatalogDetailFailed": "加载 Skill 详情失败", "incompatibleSkill": "名称不兼容", "checkingInstalledUpdates": "检查中", "updateAvailableCount": "{{count}} 个更新可用", "noInstalledUpdates": "已安装 Skill 均为最新版本", "checkInstalledUpdatesFailed": "检查更新失败", "updateInstalledSkill": "更新", "updatingInstalledSkill": "更新中", "updateInstalledSkillSuccess": "已更新 Skill「{{name}}」", "updateInstalledSkillFailed": "更新失败", "updateVersionBadge": "{{current}} → {{latest}}", "latestVersion": "最新版本", "changelog": "更新说明", "riskHigh": "高风险", "riskFlags": "风险能力", "catalogInfo": "Catalog 信息", "version": "版本", "license": "许可证", "risk": { "shell": "Shell", "write_file": "写文件", "network": "网络访问", "dynamic_command": "动态命令" } };
|
|
103658
104122
|
const session$1 = { "openDir": "打开目录" };
|
|
103659
104123
|
const error$8 = { "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": "摘要响应为空" };
|
|
103660
104124
|
const network$1 = { "offline": "无网络连接" };
|
|
103661
|
-
const message$3 = { "copy": "复制", "copied": "已复制", "saveAsQuickReply": "存为快捷回复", "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}}", "usedLabel": "已使用备用模型 {{model}}", "usedTooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "请求繁忙", "timeout": "响应超时", "apiError": "服务暂时不可用", "contextOverflow": "上下文过长", "unknown": "未知原因" } }, "retry": { "rateLimitScheduled": "当前模型繁忙,{{seconds}} 秒后自动重试 · {{attempt}}/{{maxAttempts}}" }, "handoff": "协作转交", "broadcast": "协作咨询", "expand": "展开", "collapse": "收起", "lines": "行", "userMessage": "用户消息", "agentMessage": "{{name}} 的回复", "generating": "生成中", "sending": "发送中", "waiting": "等待处理", "sendFailed": "发送失败", "retrySend": "重试", "cancelSend": "取消发送", "cancelQueued": "取消排队", "withdraw": "撤回", "recallSend": "撤回发送", "queuedToSend": "待发送", "guidanceConsumed": "已进入当前任务", "guidancePending": "正在引导当前任务", "resend": "重发", "resendConfirmTitle": "确认重发这条消息?", "resendConfirmMessage": "确认后会立即重新发送:{{content}}", "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": "失败", "broadcastStatusCancelled": "已停止", "broadcastWaiting": "等待响应…", "broadcastCancelled": "已停止", "broadcastNoContent": "无内容", "broadcastFailed": "响应失败", "broadcastComplete": "协作咨询已结束", "broadcastAllReplied": "所有成员都已回复", "broadcastSummary": "向 {{total}} 位成员征求意见", "broadcastHeader": "广播咨询", "broadcastAction": "向 {{total}} 位成员征求意见", "broadcastBadgeAnswered": "{{completed}}/{{total}} 已回答", "broadcastBadgeAllAnswered": "{{total}}/{{total}} 已回答", "broadcastBadgeStopped": "已停止 · {{completed}}/{{total}} 已回答", "broadcastBadgeStoppedWithFailures": "已停止 · {{completed}}/{{total}} 已回答 · {{failed}} 失败", "broadcastBadgeAnsweredWithFailures": "{{completed}}/{{total}} 已回答 · {{failed}} 失败", "broadcastBadgeFailed": "失败 {{count}}/{{count}}", "broadcastQuestionLabel": "问题", "broadcastResponseSummaryLabel": "回应状态汇总", "broadcastResponsesLabel": "广播回应", "broadcastViewFullAnswer": "查看完整回答", "broadcastCollapseAnswer": "收起", "broadcastSummaryDone": "{{count}} 已完成", "broadcastSummaryActive": "{{count}} 进行中", "broadcastSummaryPending": "{{count}} 等待中", "broadcastSummaryCancelled": "{{count}} 已停止", "broadcastSummaryFailed": "{{count}} 失败", "taskAssign": "已发起协作任务", "taskAssignedTo": "已交给 {{name}} 处理", "taskDetail": "查看执行过程", "taskDetailCollapse": "收起执行过程", "taskEmpty": "暂无执行内容", "taskQueued": "排队中", "taskRunning": "进行中", "taskCompleted": "已完成", "taskFailed": "执行失败", "taskKilled": "已结束", "taskBackgroundQueued": "后台排队中", "taskBackgroundRunning": "后台运行中", "taskBackgroundCompleted": "后台完成", "taskBackgroundFailed": "后台失败", "taskBackgroundKilled": "后台结束", "broadcastWaitingMembers": "还有 {{count}} 位成员待回复", "virtualTaskStart": "任务 · {{description}}", "virtualTaskEnd": "任务完成 · {{description}}", "virtualTaskFallbackStart": "任务开始", "virtualTaskFallbackEnd": "任务结束", "virtualBroadcastStart": "广播", "virtualBroadcastEnd": "广播结束", "virtualBroadcastResponseStart": "{{name}} 响应", "virtualBroadcastResponseEnd": "{{name}} 响应结束", "virtualBroadcastResponseFallbackStart": "广播响应开始", "virtualBroadcastResponseFallbackEnd": "广播响应结束", "virtualTabStart": "标签 · {{title}}", "virtualTabEnd": "标签结束 · {{title}}", "virtualTabFallbackStart": "标签开始", "virtualTabFallbackEnd": "标签结束", "virtualTabsStart": "标签组", "virtualTabsEnd": "标签组结束", "virtualTabsCount": "{{count}} 个标签", "virtualContainerDetail": "{{name}} · {{status}}" };
|
|
104125
|
+
const message$3 = { "copy": "复制", "copied": "已复制", "saveAsQuickReply": "存为快捷回复", "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}}", "usedLabel": "已使用备用模型 {{model}}", "usedTooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "请求繁忙", "timeout": "响应超时", "apiError": "服务暂时不可用", "contextOverflow": "上下文过长", "unknown": "未知原因" } }, "retry": { "rateLimitScheduled": "当前模型繁忙,{{seconds}} 秒后自动重试 · {{attempt}}/{{maxAttempts}}" }, "handoff": "协作转交", "broadcast": "协作咨询", "expand": "展开", "collapse": "收起", "lines": "行", "userMessage": "用户消息", "agentMessage": "{{name}} 的回复", "generating": "生成中", "sending": "发送中", "waiting": "等待处理", "sendFailed": "发送失败", "retrySend": "重试", "cancelSend": "取消发送", "cancelQueued": "取消排队", "withdraw": "撤回", "recallSend": "撤回发送", "save": "收藏", "unsave": "取消收藏", "guideCurrentTask": "引导当前任务", "queuedToSend": "待发送", "guidanceConsumed": "已进入当前任务", "guidancePending": "正在引导当前任务", "resend": "重发", "resendConfirmTitle": "确认重发这条消息?", "resendConfirmMessage": "确认后会立即重新发送:{{content}}", "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": "失败", "broadcastStatusCancelled": "已停止", "broadcastWaiting": "等待响应…", "broadcastCancelled": "已停止", "broadcastNoContent": "无内容", "broadcastFailed": "响应失败", "broadcastComplete": "协作咨询已结束", "broadcastAllReplied": "所有成员都已回复", "broadcastSummary": "向 {{total}} 位成员征求意见", "broadcastHeader": "广播咨询", "broadcastAction": "向 {{total}} 位成员征求意见", "broadcastBadgeAnswered": "{{completed}}/{{total}} 已回答", "broadcastBadgeAllAnswered": "{{total}}/{{total}} 已回答", "broadcastBadgeStopped": "已停止 · {{completed}}/{{total}} 已回答", "broadcastBadgeStoppedWithFailures": "已停止 · {{completed}}/{{total}} 已回答 · {{failed}} 失败", "broadcastBadgeAnsweredWithFailures": "{{completed}}/{{total}} 已回答 · {{failed}} 失败", "broadcastBadgeFailed": "失败 {{count}}/{{count}}", "broadcastQuestionLabel": "问题", "broadcastResponseSummaryLabel": "回应状态汇总", "broadcastResponsesLabel": "广播回应", "broadcastViewFullAnswer": "查看完整回答", "broadcastCollapseAnswer": "收起", "broadcastSummaryDone": "{{count}} 已完成", "broadcastSummaryActive": "{{count}} 进行中", "broadcastSummaryPending": "{{count}} 等待中", "broadcastSummaryCancelled": "{{count}} 已停止", "broadcastSummaryFailed": "{{count}} 失败", "taskAssign": "已发起协作任务", "taskAssignedTo": "已交给 {{name}} 处理", "taskDetail": "查看执行过程", "taskDetailCollapse": "收起执行过程", "taskEmpty": "暂无执行内容", "taskQueued": "排队中", "taskRunning": "进行中", "taskCompleted": "已完成", "taskFailed": "执行失败", "taskKilled": "已结束", "taskBackgroundQueued": "后台排队中", "taskBackgroundRunning": "后台运行中", "taskBackgroundCompleted": "后台完成", "taskBackgroundFailed": "后台失败", "taskBackgroundKilled": "后台结束", "broadcastWaitingMembers": "还有 {{count}} 位成员待回复", "virtualTaskStart": "任务 · {{description}}", "virtualTaskEnd": "任务完成 · {{description}}", "virtualTaskFallbackStart": "任务开始", "virtualTaskFallbackEnd": "任务结束", "virtualBroadcastStart": "广播", "virtualBroadcastEnd": "广播结束", "virtualBroadcastResponseStart": "{{name}} 响应", "virtualBroadcastResponseEnd": "{{name}} 响应结束", "virtualBroadcastResponseFallbackStart": "广播响应开始", "virtualBroadcastResponseFallbackEnd": "广播响应结束", "virtualTabStart": "标签 · {{title}}", "virtualTabEnd": "标签结束 · {{title}}", "virtualTabFallbackStart": "标签开始", "virtualTabFallbackEnd": "标签结束", "virtualTabsStart": "标签组", "virtualTabsEnd": "标签组结束", "virtualTabsCount": "{{count}} 个标签", "virtualContainerDetail": "{{name}} · {{status}}" };
|
|
103662
104126
|
const goal$1 = { "taskCompleted": "完成", "taskPending": "未完成", "taskDependency": "依赖:{{dependency}}" };
|
|
103663
104127
|
const channel$1 = { "primary": "主要", "healthy": "正常", "degraded": "缓慢", "unhealthy": "离线", "unknown": "未知", "switch": "切换到 {{name}}", "slow": "响应缓慢", "error": "连接异常", "viewStatus": "查看通道状态", "alertDegraded": "{{channel}} 响应缓慢", "alertUnhealthy": "{{channel}} 连接异常", "unknownChannel": "未知通道", "fallback": "备用模型", "fallbackSummary": "已配置 {{count}} 个", "fallbackEmpty": "暂无备用模型", "addFallback": "添加备用通道" };
|
|
103664
104128
|
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": "归档讨论" };
|
|
@@ -103666,10 +104130,10 @@ const mention$1 = { "allDesc": "通知所有成员" };
|
|
|
103666
104130
|
const chat$1 = { "members": "成员", "active": "{{count}}人响应中", "moreMembers": "更多", "untitled": "未命名对话", "noMoreMessages": "没有更多消息了", "newMessages": "有新消息", "scrollToBottom": "滚动到底部", "loadMore": "加载更多消息", "noMessages": "暂无消息", "agentThinking": "{{name}} 正在思考…", "agentSpeaking": "{{name}} 正在回复…", "thinking": "思考中", "replying": "回复中", "handoffTo": "转交给", "groupReady": "群已准备就绪", "groupReadyHint": "你可以先发一个问题、目标,或待办事项" };
|
|
103667
104131
|
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": "未调用评估工具" } };
|
|
103668
104132
|
const command$1 = { "clearDescription": "清理上下文历史", "compactDescription": "压缩当前对话上下文,可补充保留重点", "goalDescription": "启动 Goal 模式", "defaultGoalLabel": "默认", "enableDefaultGoal": "开启默认 Goal", "disableDefaultGoal": "关闭默认 Goal", "quickReplyDescription": "打开快捷回复选择器", "skillHint": "继续输入以搜索 Skills" };
|
|
103669
|
-
const quickReply$1 = { "title": "快捷回复", "add": "添加快捷回复", "addTitle": "添加快捷回复", "editTitle": "编辑快捷回复", "emptyTitle": "还没有快捷回复", "emptyDescription": "把常用的话保存下来,下次一键发送。", "addFirst": "添加第一条", "titleLabel": "标题,可选", "titlePlaceholder": "例如:Review 这次改动", "contentLabel": "内容", "contentPlaceholder": "输入要复用的话", "selectHint": "选择", "insertHint": "插入", "sendHint": "发送", "moreActions": "更多操作", "manage": "管理", "delete": "删除", "deleted": "已删除快捷回复", "undo": "撤销", "saved": "已保存快捷回复", "alreadyExists": "已存在相同内容的快捷回复", "saveFromMessageTitle": "存为快捷回复", "loadFailed": "快捷回复加载失败", "saveFailed": "快捷回复保存失败", "editorHint": "Enter 换行 · Cmd/Ctrl + Enter 保存 · Esc 返回列表" };
|
|
104133
|
+
const quickReply$1 = { "title": "快捷回复", "add": "添加快捷回复", "addTitle": "添加快捷回复", "editTitle": "编辑快捷回复", "emptyTitle": "还没有快捷回复", "emptyDescription": "把常用的话保存下来,下次一键发送。", "addFirst": "添加第一条", "titleLabel": "标题,可选", "titlePlaceholder": "例如:Review 这次改动", "contentLabel": "内容", "contentPlaceholder": "输入要复用的话", "selectHint": "选择", "insertHint": "插入", "sendHint": "发送", "moreActions": "更多操作", "manage": "管理", "delete": "删除", "deleted": "已删除快捷回复", "undo": "撤销", "saved": "已保存快捷回复", "alreadyExists": "已存在相同内容的快捷回复", "saveFromMessageTitle": "存为快捷回复", "loadFailed": "快捷回复加载失败", "saveFailed": "快捷回复保存失败", "editorHint": "Enter 换行 · Cmd/Ctrl + Enter 保存 · Esc 返回列表", "directSendHint": "直接发送" };
|
|
103670
104134
|
const tool$1 = { "executing": "执行中", "pending": "未完成", "success": "成功", "error": "失败", "arguments": "参数", "result": "结果", "expand": "展开", "collapse": "收起", "viewChanges": "查看变更", "viewDetails": "查看详情", "viewResult": "查看结果", "viewArguments": "查看参数", "changes": "变更", "openFilePreview": "打开文件预览:{{path}}", "stopped": "用户已停止执行", "failed": "执行失败" };
|
|
103671
104135
|
const reasoning$1 = { "title": "思考过程" };
|
|
103672
|
-
const common$1 = { "loading": "加载中...", "create": "创建", "save": "保存", "saving": "保存中...", "cancel": "取消", "close": "关闭", "back": "返回", "confirm": "确认", "openMenu": "打开菜单", "expand": "展开", "collapse": "收起", "unsavedChanges": "有未保存的更改,确定离开吗?", "edit": "编辑" };
|
|
104136
|
+
const common$1 = { "loading": "加载中...", "create": "创建", "save": "保存", "saving": "保存中...", "cancel": "取消", "close": "关闭", "back": "返回", "confirm": "确认", "openMenu": "打开菜单", "expand": "展开", "collapse": "收起", "unsavedChanges": "有未保存的更改,确定离开吗?", "edit": "编辑", "createFailed": "创建失败", "retry": "重试" };
|
|
103673
104137
|
const conversation$1 = { "createGroup": "创建群聊", "editGroup": "编辑群聊", "title": "群聊名称", "titlePlaceholder": "输入群聊名称", "selectAgents": "选择 Agents", "agentRequired": "群聊至少需要选择 2 个 Agent", "group": "群聊", "groupChatFallback": "群聊", "chatWithAgent": "与 {{name}} 的对话", "teamMemory": { "title": "编辑团队记忆", "menu": "团队记忆", "placeholder": "输入群内所有成员共同遵守的认知框架...\n\n例如:\n- 行为准则\n- 通识信息\n- 重要决策\n- 约定与约束", "formatHint": "支持 Markdown 或纯文本", "lastUpdated": "最后由 {{by}} 更新于 {{at}}", "saveFailed": "保存失败,请重试" }, "selectedMembers": "已选成员", "members": "成员", "active": "{{count}}人响应中", "moreMembers": "更多", "searchAgents": "搜索 Agent…", "startGroupChat": "开始群聊", "needMoreAgents": "至少再选择 {{count}} 位成员才能开始群聊", "readyToStart": "已选择 {{count}} 位成员,可以开始群聊", "titlePlaceholderCreate": "选填,留空将自动生成", "confirmDeleteGroup": "确定删除此群聊?", "deleteGroupTitle": "删除群聊" };
|
|
103674
104138
|
const update$1 = { "dotTooltip": "发现新版本 v{{version}}", "versionTooltip": "关于 KAi", "versionTooltipFeedback": "KAi v{{version}} · 有想法?点击反馈", "toast": { "available": "发现新版本 v{{version}}", "download": "前往下载", "hint": "点击前往下载,手动安装即可", "viewDetails": "查看详情" } };
|
|
103675
104139
|
const sidebar$1 = { "title": "对话", "workspace": "工作区", "agents": "智能体", "groupChats": "群聊", "noGroupChats": "暂无群聊", "noAgents": "暂无智能体", "noMessages": "暂无消息", "tab": { "agents": "智能体", "groups": "群聊" }, "empty": { "title": "暂无对话", "subtitle": "开始一个新的对话" }, "create": { "agent": "创建 Agent", "group": "创建群组", "new": "新建对话" }, "menu": { "open": "打开", "editAgent": "编辑 Agent", "editGroup": "编辑群聊", "configure": "配置", "openDir": "打开目录", "teamMemory": "团队记忆", "pin": "置顶", "unpin": "取消置顶", "delete": "删除" }, "search": "搜索", "searchPlaceholder": "搜索会话..." };
|
|
@@ -103680,7 +104144,8 @@ const contextCleared$1 = "上下文已清理";
|
|
|
103680
104144
|
const contextCompacted$1 = "上下文已整理";
|
|
103681
104145
|
const compactLoading$1 = "正在整理上下文...";
|
|
103682
104146
|
const compactFailed$1 = "整理失败";
|
|
103683
|
-
const
|
|
104147
|
+
const sendMessageFailed$1 = "发送失败:{{error}}";
|
|
104148
|
+
const contextHealth$1 = { "title": "上下文状态", "failed": "整理失败", "compacting": "整理中", "compacted": "已整理", "agent": "智能体:{{name}}", "reasonProactive": "主动整理", "reasonStepBoundary": "步骤间压缩", "reasonReactive": "溢出修复", "reasonManual": "手动整理", "statusRowCompleted": "已整理上下文 · {{reason}} · {{before}} → {{after}}", "statusRowFailed": "上下文整理失败 · 可考虑新开 Session", "currentUsage": "当前运行上下文:{{current}} / {{limit}}", "thresholdRatio": "整理阈值:{{percent}}", "lastCompaction": "最近整理:{{value}}", "lastResult": "最近结果:{{value}}", "historyResult": "历史消息:{{value}}", "noopResult": "结果:未减少上下文", "noopHistory": "历史消息:{{value}}", "totalCompactions": "累计整理:{{count}} 次", "targetLimit": "运行上下文目标:约 {{value}}" };
|
|
103684
104149
|
const retrying$1 = "重试中... {{attempt}}/{{maxAttempts}}";
|
|
103685
104150
|
const noMoreMessages$1 = "没有更多消息了";
|
|
103686
104151
|
const newMessages$1 = "有新消息";
|
|
@@ -103688,13 +104153,13 @@ const scrollToBottom$1 = "滚动到底部";
|
|
|
103688
104153
|
const time$1 = { "yesterday": "昨天", "monday": "周一", "tuesday": "周二", "wednesday": "周三", "thursday": "周四", "friday": "周五", "saturday": "周六", "sunday": "周日" };
|
|
103689
104154
|
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": "创建你的第一个定时任务", "clearContextBeforeSend": "发送前清理上下文", "clearContextBeforeSendDescription": "开启后,任务触发时会先清空当前 Session 上下文,再发送这条消息。适合日报、提醒、巡检等不依赖前文的周期任务。", "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": "自定义" } };
|
|
103690
104155
|
const memoryGrowth$1 = { "title": "记忆成长", "nightly": { "title": "夜间整理", "description": "每天在固定时间整理长期记忆,可能更新 Agent 或群组的记忆文件;不会清理或压缩当前聊天。", "timeLabel": "执行时间", "scopeLabel": "整理范围", "scopeAll": "所有 Agent", "scopeAgent": "指定 Agent", "scopeAllGroups": "所有群组", "scopeGroup": "指定群组", "scopeNone": "未选择整理范围", "scopeAgentValue": "指定 Agent · {{agentName}}", "agentMemoryTitle": "Agent 记忆", "agentMemoryDescription": "整理每个 Agent 对用户、项目和长期经验的记忆。", "groupMemoryTitle": "群记忆", "groupMemoryDescription": "整理群聊中的决策、项目事实和协作规则。", "executionOrderHint": "将先整理群记忆,再整理 Agent 记忆,确保 Agent 能吸收最新群结论。", "agentLabel": "选择 Agent", "selectAgent": "请选择 Agent", "selectAgentFirst": "请先选择要整理的 Agent", "selectScopeFirst": "请至少选择一种要整理的记忆范围", "groupLabel": "选择群组", "selectGroup": "请选择群组", "selectGroupFirst": "请先选择要整理的群组", "saved": "夜间整理已更新", "runNow": "立即整理记忆", "runNowDone": "记忆更新完成:{{succeeded}}/{{total}} 个对象成功", "runNowFailed": "记忆更新失败", "runningProgress": "正在整理记忆", "nextMode": "自动模式", "enabledAt": "已启用 · 每天 {{time}} 执行", "disabled": "未启用", "lastRun": "上次运行", "neverRun": "从未运行", "memoryFiles": "记忆文件", "topicFiles": "专题文件入口", "topicFilesDescription": "这些细节已下沉到专题文件,长期记忆只保留摘要和入口。", "noRecentFiles": "最近没有文件变更", "openMemoryDir": "打开记忆目录", "openMemoryDirHint": "先选择一个 Agent,才能直接打开它的记忆目录。", "openAllGroupsDirHint": "所有群组没有单一目录;请选择指定群组后打开。", "openMemoryDirUnavailable": "当前未选择 Agent,无法打开记忆目录", "recentExecutions": "最近整理记录", "noExecutions": "暂无执行历史", "unknownTime": "未知时间", "executionRunning": "记忆更新进行中", "executionFailed": "执行失败", "executionFinished": "执行完成", "executionSummary": "记录结果:{{succeeded}}/{{total}} 个智能体成功", "executionSummaryCompact": "{{succeeded}}/{{total}} 个 Agent", "groupExecutionSummary": "群组 {{groupName}}:更新 {{changedFiles}} 个文件", "groupExecutionSummaryCompact": "{{changedFiles}} 个文件", "groupBatchExecutionSummary": "群组整理结果:{{succeeded}}/{{total}} 个群组成功", "groupBatchExecutionSummaryCompact": "{{succeeded}}/{{total}} 个群组", "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你可以随时关闭,也可以查看每次整理的详细记录。", "configChanged": "设置已修改,保存后生效。", "advancedDetails": "高级详情", "sources": "来源", "sourcesEmpty": "无可用来源", "sourceDirect": "{{count}} 个对话 · {{messages}} 条消息", "sourceGroupDigest": "{{count}} 个群摘要", "groupSources": "Group 输入 / 输出", "groupSourcesRead": "读取", "groupSourcesWritten": "写入", "truncated": "已截断", "sourceBudgetExhausted": "读取预算已耗尽,结果只基于已读取内容。", "fileOperation": { "create": "创建", "update": "更新" }, "consolidation": "Stage2 consolidation", "consolidationMode": { "fallback": "fallback:沿用现有 daily 整理", "extraction-driven": "extraction-driven:使用 Stage1 extraction", "skipped-locked": "已跳过:另一个整理正在运行", "skipped-cooldown": "已跳过:冷却中" }, "extractionCount": "extractions {{count}}", "decisionCount": "decisions {{count}}", "consolidationDecision": { "promoted": "已写入", "merged": "已合并", "discarded": "已丢弃", "deferred": "候选保留", "needs_review": "需人工确认" }, "moreItems": "还有 {{count}} 项未展开。", "reflectionSignals": "Reflection signals", "staleSignals": "stale {{count}}", "contradictionSignals": "contradiction {{count}}", "needsReview": "needs_review {{count}}", "procedureCandidates": "procedure {{count}}", "skillCandidates": "skill {{count}}", "reviewOnlyNotice": "这些是需要确认的信号;系统不会在这里自动删除或改写长期记忆。", "promotionCandidates": "Procedure / skill candidates", "promotionCandidateCount": "候选 {{count}}", "promotionReviewOnlyNotice": "这里只展示候选 artifact;不会自动创建正式 skill、workflow 或 Agent 指令。" } };
|
|
103691
|
-
const clear$1 = { "confirmTitle": "清理上下文?", "confirmDesc": "当前对话消息会保留,只会清理后续回复使用的上下文。", "confirmBtn": "清理" };
|
|
103692
|
-
const filePreview$1 = { "source": "源码", "preview": "预览", "nonTextTitle": "非文本文件", "nonTextDesc": "此文件无法以文本方式预览。", "openWithSystem": "用系统应用打开", "loadError": "加载失败", "tooLargeTitle": "文件过大", "tooLargeDesc": "文件大小 {{size}},超出预览限制。请用系统应用打开。", "showInFolder": "在文件夹中显示", "download": "下载", "close": "关闭", "searchPlaceholder": "查找…", "matchCase": "区分大小写", "previousMatch": "上一个匹配", "nextMatch": "下一个匹配", "closeSearch": "关闭搜索" };
|
|
104156
|
+
const clear$1 = { "confirmTitle": "清理上下文?", "confirmDesc": "当前对话消息会保留,只会清理后续回复使用的上下文。", "confirmBtn": "清理", "failed": "清理上下文失败" };
|
|
104157
|
+
const filePreview$1 = { "source": "源码", "preview": "预览", "nonTextTitle": "非文本文件", "nonTextDesc": "此文件无法以文本方式预览。", "openWithSystem": "用系统应用打开", "loadError": "加载失败", "tooLargeTitle": "文件过大", "tooLargeDesc": "文件大小 {{size}},超出预览限制。请用系统应用打开。", "showInFolder": "在文件夹中显示", "download": "下载", "close": "关闭", "searchPlaceholder": "查找…", "matchCase": "区分大小写", "previousMatch": "上一个匹配", "nextMatch": "下一个匹配", "closeSearch": "关闭搜索", "diff": "Diff", "diffPreviewHint": "基于当前文件的增量预览", "unchangedLines": "{{count}} 行未变更", "resize": "调整预览宽度" };
|
|
103693
104158
|
const messageSearch$1 = { "placeholder": "搜索当前 Session 消息", "emptyHint": "输入关键词", "previousResult": "上一个结果", "nextResult": "下一个结果", "close": "关闭搜索" };
|
|
103694
104159
|
const cancel$1 = "取消";
|
|
103695
104160
|
const contextSuggestion$1 = { "title": "建议整理上下文", "description": "这段会话有点长了。整理后会保留重点,让后续回复更连贯。聊天记录不会删除。", "accept": "整理上下文", "dismiss": "本会话不再提示", "remindLater": "稍后再说", "close": "关闭", "running": "正在整理会话…", "completed": "会话已整理,后续回复会参考整理后的关键内容。", "failed": "暂时无法整理会话,请稍后再试。" };
|
|
103696
|
-
const saved$1 = { "entry": "收藏", "entryWithCount": "收藏 {{count}}" };
|
|
103697
|
-
const pty$1 = { "status": { "running": "运行中", "killing": "正在终止", "exited": "已退出 (code {{code}})" }, "eventCard": { "exited": "已退出" }, "sidebar": { "titleWithCount": "终端 ({{count}})", "title": "终端" }, "reset": { "terminalsStopped": "{{count}} 个终端已停止" }, "stop": "停止", "stopConfirm": { "title": "停止这个终端?", "message": "正在运行的命令会被终止。未保存的输出或正在执行的操作可能中断。", "confirm": "停止终端" }, "restart": "重启", "collapseTerminal": "收起终端,进程会继续运行", "reopenTerminal": "打开或重新展开终端", "yourTerminal": "你的终端", "agentOperating": "Agent 操作中", "noTerminals": "暂无活跃终端" };
|
|
104161
|
+
const saved$1 = { "entry": "收藏", "entryWithCount": "收藏 {{count}}", "title": "收藏消息", "emptyTitle": "还没有收藏消息", "emptyDescription": "右键消息可收藏有价值的内容。", "emptySecondary": "也可以在消息右键菜单中收藏。", "unknownSource": "未知会话", "contextTitle": "收藏上下文", "contextUnavailable": "暂时无法加载上下文。", "missingMessage": "原消息已不可用" };
|
|
104162
|
+
const pty$1 = { "status": { "running": "运行中", "killing": "正在终止", "exited": "已退出 (code {{code}})" }, "eventCard": { "exited": "已退出" }, "sidebar": { "titleWithCount": "终端 ({{count}})", "title": "终端" }, "reset": { "terminalsStopped": "{{count}} 个终端已停止" }, "stop": "停止", "stopConfirm": { "title": "停止这个终端?", "message": "正在运行的命令会被终止。未保存的输出或正在执行的操作可能中断。", "confirm": "停止终端" }, "closeTerminal": "关闭终端", "closeConfirm": { "title": "关闭这个终端?", "message": "终端会话将被关闭,正在运行的进程也会被终止。", "confirm": "关闭终端" }, "newTerminal": "新建终端", "togglePanel": "切换终端面板", "restart": "重启", "mobileDialogTitle": "终端", "mobileControls": { "label": "终端控制键", "keys": { "escape": "发送 ESC", "tab": "发送 Tab", "ctrlC": "发送 Ctrl+C", "up": "发送上方向键", "left": "发送左方向键", "down": "发送下方向键", "right": "发送右方向键", "enter": "发送 Enter" } }, "collapseTerminal": "收起终端,进程会继续运行", "reopenTerminal": "打开或重新展开终端", "yourTerminal": "你的终端", "agentOperating": "Agent 操作中", "noTerminals": "暂无活跃终端" };
|
|
103698
104163
|
const connection$1 = { "reconnecting": "连接中断,正在重连…" };
|
|
103699
104164
|
const zh = {
|
|
103700
104165
|
header: header$e,
|
|
@@ -103733,6 +104198,7 @@ const zh = {
|
|
|
103733
104198
|
contextCompacted: contextCompacted$1,
|
|
103734
104199
|
compactLoading: compactLoading$1,
|
|
103735
104200
|
compactFailed: compactFailed$1,
|
|
104201
|
+
sendMessageFailed: sendMessageFailed$1,
|
|
103736
104202
|
contextHealth: contextHealth$1,
|
|
103737
104203
|
retrying: retrying$1,
|
|
103738
104204
|
noMoreMessages: noMoreMessages$1,
|
|
@@ -103751,20 +104217,20 @@ const zh = {
|
|
|
103751
104217
|
connection: connection$1
|
|
103752
104218
|
};
|
|
103753
104219
|
const header$d = { "title": "KAi", "subtitle": "Powered by AI", "status": "Online" };
|
|
103754
|
-
const input$5 = { "placeholder": "What's on your mind…", "placeholderWithAttachments": "Add a note…", "placeholderDefaultGoal": "Type a goal. Goal mode is on by default…", "messageInput": "Message input", "send": "Send", "stopGenerating": "Stop generating", "attachFile": "Attach file", "attachmentTooLarge": "{{names}} exceeds the {{maxSizeMB}}MB limit", "directoryAttachmentFailed": "Failed to package directory", "directoryAttachmentSkipped": "Some files could not be read and were skipped.", "unnamedAttachment": "Unnamed attachment", "attachmentNameSeparator": ", ", "removeAttachment": "Remove attachment", "slashCommandDisabledWhileStreaming": "Slash commands are unavailable while output is streaming", "footer": "Powered by AI • Responses may vary", "mentionAll": "@ Everyone", "mentionAllHint": "Send message to all members", "broadcastModeAll": "Broadcast to everyone", "broadcastModeMulti": "Broadcast to {{agents}}", "placeholderGroup": "Ask something, or @ someone…", "slashCommand": "Slash commands", "commandMenu": "Commands" };
|
|
104220
|
+
const input$5 = { "placeholder": "What's on your mind…", "placeholderWithAttachments": "Add a note…", "placeholderDefaultGoal": "Type a goal. Goal mode is on by default…", "messageInput": "Message input", "send": "Send", "stopGenerating": "Stop generating", "attachFile": "Attach file", "attachmentTooLarge": "{{names}} exceeds the {{maxSizeMB}}MB limit", "directoryAttachmentFailed": "Failed to package directory", "directoryAttachmentSkipped": "Some files could not be read and were skipped.", "unnamedAttachment": "Unnamed attachment", "attachmentNameSeparator": ", ", "removeAttachment": "Remove attachment", "slashCommandDisabledWhileStreaming": "Slash commands are unavailable while output is streaming", "footer": "Powered by AI • Responses may vary", "mentionAll": "@ Everyone", "mentionAllHint": "Send message to all members", "broadcastModeAll": "Broadcast to everyone", "broadcastModeMulti": "Broadcast to {{agents}}", "placeholderGroup": "Ask something, or @ someone…", "slashCommand": "Slash commands", "commandMenu": "Commands", "quickReply": "Quick Reply" };
|
|
103755
104221
|
const empty$7 = { "title": "Start a conversation", "description": "Ask me anything! I'm here to help you with your questions and tasks.", "suggestions": ["What can you do?", "Help me write code", "Explain a concept", "Summarize this text"] };
|
|
103756
104222
|
const noAgent = { "title": "No Agents Yet", "description": "Create your first agent to start chatting", "createButton": "Create Agent", "orGoSettings": "Or go to Settings" };
|
|
103757
104223
|
const onboarding = { "title": "Bring Your Agents to Life", "description": "One step to go: connect an AI model so your agents can think and respond.", "step1": { "title": "Connect AI Model", "desc": "Add an LLM channel — supports OpenAI-compatible APIs" }, "step2": { "title": "Create Your Agent", "desc": "Give it personality and purpose" }, "step3": { "title": "Start Chatting", "desc": "Talk to agents individually or in groups" }, "startSetup": "Connect AI", "skip": "Skip for now", "checking": "Checking configuration…" };
|
|
103758
104224
|
const channelGuide = { "title": "Bring Your Agents to Life", "description": "Connect an AI model so agents can think and respond", "configure": "Connect AI", "dismiss": "Skip" };
|
|
103759
104225
|
const agentChannelCheck = { "title": "This agent needs a spark", "description": "Connect an AI model before starting a conversation", "configure": "Connect AI", "skip": "Create anyway" };
|
|
103760
104226
|
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" };
|
|
103761
|
-
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":"App Settings","remote":"Remote Access","mcp":"MCP Servers","search":"Search Engine","about":"About","integration":"Integration","usage":"Usage"},"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"},"usage":{"title":"Usage","description":"Review local AI work, tokens, groups, models, and tools."},"appSettings":{"title":"App Settings","description":"Manage KAi display, experimental features, and data boundaries."}},"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","apiTypeDeepSeek":"DeepSeek","apiTypeMoonshot":"Moonshot AI (Kimi)","apiTypeAlibaba":"Alibaba (Qwen)","apiTypeZhipu":"Zhipu AI (GLM)","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 (image_analyze tool). Deleting it will disable that feature. Delete \\"{{name}}\\"?","tabChannels":"Channels","tabMultimodal":"Multimodal","contextTokenLimit":"Context Token Limit (current channel only)","contextTokenLimitHint":"Automatically compacts conversation history when exceeded to reduce token usage"},"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","customHeaders":"Custom request headers","customHeadersDescription":"Add headers required by your server for authentication, API keys, or routing. Most servers do not need this.","customHeadersEmpty":"No custom headers added. Add headers only if your server documentation requires them.","addAuthorization":"Add Authorization","addApiKey":"Add X-API-Key","addCustomHeader":"Add custom header","headerName":"Header name","headerValue":"Header value","headerEnabled":"Enabled","headerShow":"Show","headerHide":"Hide","testUsesCurrentValues":"Test uses current values, including unsaved changes.","testSuccessWithDetails":"Connected successfully · {{toolCount}} tools · {{count}} custom headers sent"},"about":{"releaseNotes":"Release Notes","versionCopied":"Copied","checkForUpdates":"Check for Updates","checking":"Checking for updates","goDownload":"Download","newVersion":"New version available","updateHighlights":"What’s new","viewFullReleaseNotes":"View full release notes","viewReleaseHistory":"View release history","hideReleaseHistory":"Hide release history","retry":"Check Again","upToDate":"You’re up to date","updateError":"Failed to check for updates","feedback":{"title":"Feedback","trigger":"Have a problem or idea? Send 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 image_analyze 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 image_generate 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","targetThreadDesc":"Connect the Bot to a group, then choose how Sessions are routed","targetAutoSession":"Route by external conversation","targetAutoSessionDesc":"Each WeCom conversation gets its own Session","selectAgent":"Select Agent","selectAgentSession":"Select Agent Session","defaultSession":"Use Agent default Session","agentSessionHint":"If left empty, messages go to this Agent's default conversation.","selectGroup":"Select Group","selectThread":"Select Session","selectAutoGroup":"Auto Sessions belong to","autoSessionHint":"Each WeCom external conversation creates one Session under this group. Later messages continue in the same Session.","autoSessionAgentHint":"Each WeCom external conversation creates one Direct Session under the selected Agent. Later messages from the same external conversation continue in that Session.","autoSessionCardHint":"One Session per external conversation","routingMode":"Session routing","routingFixed":"Fixed to a specific Session","routingAuto":"Route by external conversation","routingAutoLabel":"Route by external conversation","bindAndTest":"Bind and test","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"},"usage":{"trustLine":"Usage statistics are stored locally, do not record conversation content, and can be cleared anytime.","clearConfirm":"Clear all usage statistics? This cannot be undone.","empty":"No usage statistics yet. Start a conversation and your AI usage will appear here.","filters":{"range":"Time Range","scope":"Usage Scope"},"range":{"today":"Today","week":"This week","month":"This month"},"scope":{"all":"All","direct":"Direct","group":"Groups"},"metrics":{"work":"AI work","tokens":"Tokens","tools":"Tool calls","messages":"Messages"},"insights":"Insights","noInsights":"Not enough data yet. Insights will appear as you use KAi.","trend":"Daily token usage","activity":{"title":"Token Activity","hint":"Darker cells mean more tokens used that day.","summaryLabel":"Token activity: {{peak}} peak tokens, {{current}} current streak days, {{longest}} longest streak days.","days":"{{count}} days","tooltip":"{{label}} · {{tokens}} tokens · {{runs}} AI runs","empty":"No Token activity in this period yet. Start a conversation and daily intensity will appear here.","legendLow":"Less","legendHigh":"More","summary":{"peak":"Peak {{value}}","longestDuration":"Longest run {{value}}","streak":"{{current}} day streak, {{longest}} day best"},"weekdays":{"sun":"Sun","mon":"Mon","tue":"Tue","wed":"Wed","thu":"Thu","fri":"Fri","sat":"Sat"}},"sections":{"models":"Models","agents":"Agents","groups":"Groups","tools":"Tools","sessions":"High-usage Sessions","phrases":"Common Phrases"},"phrases":{"empty":"No frequent phrases yet (needs at least 3 occurrences)","count":"Used {{count}} times","alreadyExists":"A quick reply with the same content already exists","added":"Added to quick replies","addFailed":"Failed to add","addToQuickReply":"Add to quick replies"},"retention":"Token activity is kept for the last year by default.","clear":"Clear statistics","loadError":"Unable to load usage statistics","sessionLabel":"Session {{index}}","sessionFallback":"Unknown Session {{index}}","callsValue":"{{count}} calls","insight":{"groupTokenShare":"{{rate}}% of tokens in this period came from group collaboration.","unfinishedCallRate":"{{rate}}% of model or tool calls did not finish.","unfinishedCallRateLessThan":"Less than {{rate}}% of model or tool calls did not finish.","topTool":"{{name}} was the most used tool with {{count}} calls.","topGroup":"{{name}} was the most active group with {{count}} AI runs."}},"appSettings":{"tabsLabel":"App settings sections","tabs":{"appearance":"Appearance","behavior":"Behavior","privacy":"Privacy","experimental":"Experiments"},"groups":{"display":"Display","window":"Window","dataControl":"Data control","network":"Network behavior","usageDiagnostics":"Usage data and diagnostics","experimentalAgents":"Agent experiments"},"appearance":{"languageDescription":"Change the display language for menus, buttons, and prompts.","themeDescription":"Use the system, light, or dark theme."},"behavior":{"windowCloseTitle":"When closing the window","windowCloseDescription":"Choose whether KAi asks, quits, or keeps running in the tray.","windowCloseAsk":"Ask every time","windowCloseQuit":"Quit app","windowCloseMinimize":"Minimize to tray"},"privacy":{"localUsageTitle":"Local usage statistics","localUsageDescription":"AI usage statistics stay on this device and do not record conversation content.","viewUsage":"View","autoUpdateTitle":"Automatic update checks","autoUpdateDescription":"Check for a new version once per day after launch.","telemetryTitle":"Send usage data and diagnostics","telemetryDescription":"Help improve KAi stability and experience. Conversation content, file content, keys, and full terminal output are never uploaded."},"experimental":{"notice":"These capabilities are experimental. Enabling them may change the tools and behavior available to agents.","agentSessionTitleToolTitle":"Auto-generate session titles","agentSessionTitleToolDescription":"When enabled, the system asynchronously generates or updates the current session title after each user message.","restartHint":"The next agent run reads this switch","ptyTerminalTitle":"PTY Terminal","ptyTerminalDescription":"Allow Agents to use PTY terminal tools, and show terminal event cards and floating panels."},"storage":{"title":"Data Storage","dataDir":"Data Directory","dataDirDescription":"The directory where KAi stores all data, including conversations, settings, and attachments.","openDir":"Open Directory","changeDir":"Change Directory","default":"Default","confirmTitle":"Change Data Directory","confirmMessage":"Are you sure you want to change the data directory to the following path? The change will take effect after restart.","migrateData":"Migrate existing data to the new directory","confirm":"Confirm Change","cancel":"Cancel","loading":"Switching...","success":"Data directory changed. Please restart the application for changes to take effect.","failed":"Failed to change data directory: {{error}}","progressClosingDb":"Closing database...","progressCopying":"Copying files ({{current}}/{{total}})...","progressWritingConfig":"Writing configuration...","restartNow":"Restart Now","sameDir":"Selected directory is the same as the current data directory"}}}`);
|
|
104227
|
+
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":"App Settings","remote":"Remote Access","mcp":"MCP Servers","search":"Search Engine","about":"About","integration":"Integration","usage":"Usage"},"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"},"usage":{"title":"Usage","description":"Review local AI work, tokens, groups, models, and tools."},"appSettings":{"title":"App Settings","description":"Manage KAi display, experimental features, and data boundaries."}},"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","apiTypeDeepSeek":"DeepSeek","apiTypeMoonshot":"Moonshot AI (Kimi)","apiTypeAlibaba":"Alibaba (Qwen)","apiTypeZhipu":"Zhipu AI (GLM)","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 (image_analyze tool). Deleting it will disable that feature. Delete \\"{{name}}\\"?","tabChannels":"Channels","tabMultimodal":"Multimodal","contextTokenLimit":"Context Token Limit (current channel only)","contextTokenLimitHint":"Automatically compacts conversation history when exceeded to reduce token usage"},"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","customHeaders":"Custom request headers","customHeadersDescription":"Add headers required by your server for authentication, API keys, or routing. Most servers do not need this.","customHeadersEmpty":"No custom headers added. Add headers only if your server documentation requires them.","addAuthorization":"Add Authorization","addApiKey":"Add X-API-Key","addCustomHeader":"Add custom header","headerName":"Header name","headerValue":"Header value","headerEnabled":"Enabled","headerShow":"Show","headerHide":"Hide","testUsesCurrentValues":"Test uses current values, including unsaved changes.","testSuccessWithDetails":"Connected successfully · {{toolCount}} tools · {{count}} custom headers sent","envVars":"Environment Variables","envVarsDescription":"Environment variables will be passed to the launch command (e.g. API_KEY=xxx).","envVarsEmpty":"No environment variables added.","addEnvVar":"Add Variable","envKey":"Name","envValue":"Value","envDuplicateKey":"Duplicate variable name (case-insensitive). Please check for conflicts.","envInvalidKey":"Variable names must contain only letters, digits and underscores, starting with a letter or underscore."},"about":{"releaseNotes":"Release Notes","versionCopied":"Copied","checkForUpdates":"Check for Updates","checking":"Checking for updates","goDownload":"Download","newVersion":"New version available","updateHighlights":"What’s new","viewFullReleaseNotes":"View full release notes","viewReleaseHistory":"View release history","hideReleaseHistory":"Hide release history","retry":"Check Again","upToDate":"You’re up to date","updateError":"Failed to check for updates","copyVersion":"Click to copy version","downloading":"Downloading update","updateReady":"Update ready","installUpdate":"Restart to install","feedback":{"title":"Feedback","trigger":"Have a problem or idea? Send 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 image_analyze 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 image_generate 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","targetThreadDesc":"Connect the Bot to a group, then choose how Sessions are routed","targetAutoSession":"Route by external conversation","targetAutoSessionDesc":"Each WeCom conversation gets its own Session","selectAgent":"Select Agent","selectAgentSession":"Select Agent Session","defaultSession":"Use Agent default Session","agentSessionHint":"If left empty, messages go to this Agent's default conversation.","selectGroup":"Select Group","selectThread":"Select Session","selectAutoGroup":"Auto Sessions belong to","autoSessionHint":"Each WeCom external conversation creates one Session under this group. Later messages continue in the same Session.","autoSessionAgentHint":"Each WeCom external conversation creates one Direct Session under the selected Agent. Later messages from the same external conversation continue in that Session.","autoSessionCardHint":"One Session per external conversation","routingMode":"Session routing","routingFixed":"Fixed to a specific Session","routingAuto":"Route by external conversation","routingAutoLabel":"Route by external conversation","bindAndTest":"Bind and test","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"},"usage":{"trustLine":"Usage statistics are stored locally, do not record conversation content, and can be cleared anytime.","clearConfirm":"Clear all usage statistics? This cannot be undone.","empty":"No usage statistics yet. Start a conversation and your AI usage will appear here.","filters":{"range":"Time Range","scope":"Usage Scope"},"range":{"today":"Today","week":"This week","month":"This month"},"scope":{"all":"All","direct":"Direct","group":"Groups"},"metrics":{"work":"AI work","tokens":"Tokens","tools":"Tool calls","messages":"Messages"},"insights":"Insights","noInsights":"Not enough data yet. Insights will appear as you use KAi.","trend":"Daily token usage","activity":{"title":"Token Activity","hint":"Darker cells mean more tokens used that day.","summaryLabel":"Token activity: {{peak}} peak tokens, {{current}} current streak days, {{longest}} longest streak days.","days":"{{count}} days","tooltip":"{{label}} · {{tokens}} tokens · {{runs}} AI runs","empty":"No Token activity in this period yet. Start a conversation and daily intensity will appear here.","legendLow":"Less","legendHigh":"More","summary":{"peak":"Peak {{value}}","longestDuration":"Longest run {{value}}","streak":"{{current}} day streak, {{longest}} day best"},"weekdays":{"sun":"Sun","mon":"Mon","tue":"Tue","wed":"Wed","thu":"Thu","fri":"Fri","sat":"Sat"}},"sections":{"models":"Models","agents":"Agents","groups":"Groups","tools":"Tools","sessions":"High-usage Sessions","phrases":"Common Phrases"},"phrases":{"empty":"No frequent phrases yet (needs at least 3 occurrences)","count":"Used {{count}} times","alreadyExists":"A quick reply with the same content already exists","added":"Added to quick replies","addFailed":"Failed to add","addToQuickReply":"Add to quick replies"},"retention":"Token activity is kept for the last year by default.","clear":"Clear statistics","loadError":"Unable to load usage statistics","sessionLabel":"Session {{index}}","sessionFallback":"Unknown Session {{index}}","callsValue":"{{count}} calls","insight":{"groupTokenShare":"{{rate}}% of tokens in this period came from group collaboration.","unfinishedCallRate":"{{rate}}% of model or tool calls did not finish.","unfinishedCallRateLessThan":"Less than {{rate}}% of model or tool calls did not finish.","topTool":"{{name}} was the most used tool with {{count}} calls.","topGroup":"{{name}} was the most active group with {{count}} AI runs."}},"appSettings":{"tabsLabel":"App settings sections","tabs":{"appearance":"Appearance","behavior":"Behavior","privacy":"Privacy","experimental":"Experiments"},"groups":{"display":"Display","window":"Window","dataControl":"Data control","network":"Network behavior","usageDiagnostics":"Usage data and diagnostics","experimentalAgents":"Agent experiments"},"appearance":{"languageDescription":"Change the display language for menus, buttons, and prompts.","themeDescription":"Use the system, light, or dark theme."},"behavior":{"windowCloseTitle":"When closing the window","windowCloseDescription":"Choose whether KAi asks, quits, or keeps running in the tray.","windowCloseAsk":"Ask every time","windowCloseQuit":"Quit app","windowCloseMinimize":"Minimize to tray"},"privacy":{"localUsageTitle":"Local usage statistics","localUsageDescription":"AI usage statistics stay on this device and do not record conversation content.","viewUsage":"View","autoUpdateTitle":"Automatic update checks","autoUpdateDescription":"Check for a new version once per day after launch.","telemetryTitle":"Send usage data and diagnostics","telemetryDescription":"Help improve KAi stability and experience. Conversation content, file content, keys, and full terminal output are never uploaded."},"experimental":{"notice":"These capabilities are experimental. Enabling them may change the tools and behavior available to agents.","agentSessionTitleToolTitle":"Auto-generate session titles","agentSessionTitleToolDescription":"When enabled, the system asynchronously generates or updates the current session title after each user message.","restartHint":"The next agent run reads this switch","ptyTerminalTitle":"PTY Terminal","ptyTerminalDescription":"Allow Agents to use PTY terminal tools, and show terminal event cards and floating panels."},"storage":{"title":"Data Storage","dataDir":"Data Directory","dataDirDescription":"The directory where KAi stores all data, including conversations, settings, and attachments.","openDir":"Open Directory","changeDir":"Change Directory","default":"Default","confirmTitle":"Change Data Directory","confirmMessage":"Are you sure you want to change the data directory to the following path? The change will take effect after restart.","migrateData":"Migrate existing data to the new directory","confirm":"Confirm Change","cancel":"Cancel","loading":"Switching...","success":"Data directory changed. Please restart the application for changes to take effect.","failed":"Failed to change data directory: {{error}}","progressClosingDb":"Closing database...","progressCopying":"Copying files ({{current}}/{{total}})...","progressWritingConfig":"Writing configuration...","restartNow":"Restart Now","sameDir":"Selected directory is the same as the current data directory"}}}`);
|
|
103762
104228
|
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 file_read, file_write, file_edit, 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": { "file_read": "read workspace content", "file_write": "write files", "file_edit": "modify existing files", "shell": "run commands or verify results" }, "toolDesc": { "file_read": "Read local files or directory contents", "file_write": "Create or overwrite local files", "file_edit": "Apply exact text replacements in files", "file_patch": "Apply multi-file patches", "shell": "Run terminal commands", "web_fetch": "Fetch a specific webpage or API response", "web_search": "Search the web for live information", "sql_query": "Run read-only SQL queries", "image_analyze": "Analyze images or extract text", "image_generate": "Generate images from text prompts", "skill": "Load and use predefined Skills", "cron_job_create": "Create a scheduled task", "cron_job_list": "View scheduled tasks", "cron_job_update": "Update a scheduled task", "cron_job_delete": "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." } };
|
|
103763
104229
|
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", "noMatchingInstalledSkills": "No matching Skills found", "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", "tabInstalled": "Installed", "tabDiscover": "Discover", "tabSources": "Sources", "refreshInstalled": "Refresh", "checkInstalledUpdates": "Check updates", "sourceLocal": "Local install", "globalEnabled": "Globally enabled", "globalDisabled": "Globally disabled", "assignToAgent": "Assign to Agent", "viewDetails": "View details", "viewUpdates": "View updates", "status": "Status", "globalStatus": "Global status", "agentAssignment": "Agent assignment", "source": "Source", "allowedTools": "Allowed tools", "installLocation": "Install location", "discoverComingSoon": "Discover will be connected in the next phase", "discoverComingSoonDesc": "Finish the installed page refactor first, then add source management and remote search.", "sourcesComingSoon": "Source management will be connected in the next phase", "sourcesComingSoonDesc": "This area will configure and test Skill Hub Sources.", "sourcesTitle": "Skill Sources", "sourcesDesc": "Configure sources used to discover and install remote Skills. Deleting a source does not remove installed local Skills.", "addSource": "Add Source", "editSource": "Edit Source", "deleteSource": "Delete Source", "deleteSourceConfirm": 'Delete source "{{name}}"?', "deleteSourceHint": "This only removes the source configuration. Installed local Skills are not deleted.", "sourceName": "Source name", "sourceType": "Source type", "sourceTypes": { "skillhub": "Skill Hub", "static-index": "Static index", "github-repo": "GitHub repo" }, "sourceTypeHints": { "skillhub": "For Skill Registries that expose search, detail, and package download APIs.", "static-index": "For a static JSON index that declares Skills and their download URLs.", "github-repo": "For SKILL.md collections organized in a GitHub repository." }, "sourceBaseUrl": "Base URL", "useAuth": "Require authentication (Bearer Token)", "sourceToken": "Token", "sourceTokenHint": "An API Token generated from your SkillHub registry, used to access private namespaces.", "sourceEnabled": "Enabled", "sourceDisabled": "Disabled", "authNone": "No auth", "authBearer": "Bearer auth", "testSource": "Test connection", "testingSource": "Testing", "testSourceSuccess": "Connection succeeded", "testSourceFailed": "Connection failed", "noSources": "No Skill Sources yet. Add a source to search remote Skills from the Discover tab.", "sourceStatus": { "connected": "Connected", "unreachable": "Unreachable", "auth_failed": "Auth failed", "incompatible": "Incompatible", "disabled": "Disabled", "unknown": "Not tested" }, "discoverSearchPlaceholder": "Search remote Skills. Type partial / empty / fail to preview states", "searchCatalog": "Search", "loadMore": "Load more", "discoverNoSources": "No enabled sources yet. Add and enable a Skill Source from the Sources tab first.", "discoverInitial": "Enter a keyword to discover installable Skills from enabled sources.", "discoverNoResults": "No matching Skills found.", "searchSuccess": "Found {{count}} results.", "searchPartialFailed": "{{succeeded}} sources succeeded, {{failed}} sources failed.", "searchAllFailed": "All sources failed to search.", "installSkill": "Install", "installingSkill": "Installing", "installConfirm": 'Install Skill "{{name}}" from "{{source}}"?', "installSuccess": 'Installed Skill "{{name}}"', "installFailed": "Install failed", "installedState": "Installed", "openWebDetail": "Web details", "loadCatalogDetailFailed": "Failed to load Skill detail", "incompatibleSkill": "Incompatible name", "checkingInstalledUpdates": "Checking", "updateAvailableCount": "{{count}} updates available", "noInstalledUpdates": "Installed Skills are up to date", "checkInstalledUpdatesFailed": "Failed to check updates", "updateInstalledSkill": "Update", "updatingInstalledSkill": "Updating", "updateInstalledSkillSuccess": 'Updated Skill "{{name}}"', "updateInstalledSkillFailed": "Update failed", "updateVersionBadge": "{{current}} → {{latest}}", "latestVersion": "Latest version", "changelog": "Changelog", "riskHigh": "High risk", "riskFlags": "Risk capabilities", "catalogInfo": "Catalog info", "version": "Version", "license": "License", "risk": { "shell": "Shell", "write_file": "Write files", "network": "Network access", "dynamic_command": "Dynamic command" } };
|
|
103764
104230
|
const session = { "openDir": "Open Directory" };
|
|
103765
104231
|
const error$7 = { "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" };
|
|
103766
104232
|
const network = { "offline": "No internet connection" };
|
|
103767
|
-
const message$2 = { "copy": "Copy", "copied": "Copied", "saveAsQuickReply": "Save as Quick Reply", "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": "Primary model is temporarily unavailable. Continuing with a fallback model.", "tooltip": "{{from}} → {{to}} · {{reason}}", "usedLabel": "Used fallback {{model}}", "usedTooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "busy", "timeout": "timed out", "apiError": "temporarily unavailable", "contextOverflow": "context too long", "unknown": "unknown reason" } }, "retry": { "rateLimitScheduled": "Current model is busy. Retrying in {{seconds}}s · {{attempt}}/{{maxAttempts}}" }, "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", "cancelSend": "Cancel send", "cancelQueued": "Cancel queued message", "withdraw": "Withdraw", "recallSend": "Recall send", "queuedToSend": "Queued", "guidanceConsumed": "Included in current task", "guidancePending": "Guiding current task", "resend": "Resend", "resendConfirmTitle": "Resend this message?", "resendConfirmMessage": "This will immediately send again: {{content}}", "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", "broadcastStatusCancelled": "Stopped", "broadcastWaiting": "Waiting for response…", "broadcastCancelled": "Stopped", "broadcastNoContent": "No content", "broadcastFailed": "Response failed", "broadcastComplete": "Shared consultation finished", "broadcastAllReplied": "Everyone replied", "broadcastSummary": "Asked {{total}} member(s) for input", "broadcastHeader": "Shared consultation", "broadcastAction": "Asked {{total}} member(s) for input", "broadcastBadgeAnswered": "{{completed}}/{{total}} answered", "broadcastBadgeAllAnswered": "{{total}}/{{total}} answered", "broadcastBadgeStopped": "Stopped · {{completed}}/{{total}} answered", "broadcastBadgeStoppedWithFailures": "Stopped · {{completed}}/{{total}} answered · {{failed}} failed", "broadcastBadgeAnsweredWithFailures": "{{completed}}/{{total}} answered · {{failed}} failed", "broadcastBadgeFailed": "Failed {{count}}/{{count}}", "broadcastQuestionLabel": "Question", "broadcastResponseSummaryLabel": "Response summary", "broadcastResponsesLabel": "Broadcast responses", "broadcastViewFullAnswer": "View full answer", "broadcastCollapseAnswer": "Collapse", "broadcastSummaryDone": "{{count}} done", "broadcastSummaryActive": "{{count}} in progress", "broadcastSummaryPending": "{{count}} pending", "broadcastSummaryCancelled": "{{count}} stopped", "broadcastSummaryFailed": "{{count}} failed", "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)", "virtualTaskStart": "Task · {{description}}", "virtualTaskEnd": "Task finished · {{description}}", "virtualTaskFallbackStart": "Task started", "virtualTaskFallbackEnd": "Task finished", "virtualBroadcastStart": "Broadcast", "virtualBroadcastEnd": "Broadcast finished", "virtualBroadcastResponseStart": "{{name}} response", "virtualBroadcastResponseEnd": "{{name}} response finished", "virtualBroadcastResponseFallbackStart": "Broadcast response started", "virtualBroadcastResponseFallbackEnd": "Broadcast response finished", "virtualTabStart": "Tab · {{title}}", "virtualTabEnd": "Tab finished · {{title}}", "virtualTabFallbackStart": "Tab started", "virtualTabFallbackEnd": "Tab finished", "virtualTabsStart": "Tabs", "virtualTabsEnd": "Tabs finished", "virtualTabsCount": "{{count}} tab(s)", "virtualContainerDetail": "{{name}} · {{status}}" };
|
|
104233
|
+
const message$2 = { "copy": "Copy", "copied": "Copied", "saveAsQuickReply": "Save as Quick Reply", "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": "Primary model is temporarily unavailable. Continuing with a fallback model.", "tooltip": "{{from}} → {{to}} · {{reason}}", "usedLabel": "Used fallback {{model}}", "usedTooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "busy", "timeout": "timed out", "apiError": "temporarily unavailable", "contextOverflow": "context too long", "unknown": "unknown reason" } }, "retry": { "rateLimitScheduled": "Current model is busy. Retrying in {{seconds}}s · {{attempt}}/{{maxAttempts}}" }, "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", "cancelSend": "Cancel send", "cancelQueued": "Cancel queued message", "withdraw": "Withdraw", "recallSend": "Recall send", "save": "Save", "unsave": "Unsave", "guideCurrentTask": "Guide current task", "queuedToSend": "Queued", "guidanceConsumed": "Included in current task", "guidancePending": "Guiding current task", "resend": "Resend", "resendConfirmTitle": "Resend this message?", "resendConfirmMessage": "This will immediately send again: {{content}}", "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", "broadcastStatusCancelled": "Stopped", "broadcastWaiting": "Waiting for response…", "broadcastCancelled": "Stopped", "broadcastNoContent": "No content", "broadcastFailed": "Response failed", "broadcastComplete": "Shared consultation finished", "broadcastAllReplied": "Everyone replied", "broadcastSummary": "Asked {{total}} member(s) for input", "broadcastHeader": "Shared consultation", "broadcastAction": "Asked {{total}} member(s) for input", "broadcastBadgeAnswered": "{{completed}}/{{total}} answered", "broadcastBadgeAllAnswered": "{{total}}/{{total}} answered", "broadcastBadgeStopped": "Stopped · {{completed}}/{{total}} answered", "broadcastBadgeStoppedWithFailures": "Stopped · {{completed}}/{{total}} answered · {{failed}} failed", "broadcastBadgeAnsweredWithFailures": "{{completed}}/{{total}} answered · {{failed}} failed", "broadcastBadgeFailed": "Failed {{count}}/{{count}}", "broadcastQuestionLabel": "Question", "broadcastResponseSummaryLabel": "Response summary", "broadcastResponsesLabel": "Broadcast responses", "broadcastViewFullAnswer": "View full answer", "broadcastCollapseAnswer": "Collapse", "broadcastSummaryDone": "{{count}} done", "broadcastSummaryActive": "{{count}} in progress", "broadcastSummaryPending": "{{count}} pending", "broadcastSummaryCancelled": "{{count}} stopped", "broadcastSummaryFailed": "{{count}} failed", "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)", "virtualTaskStart": "Task · {{description}}", "virtualTaskEnd": "Task finished · {{description}}", "virtualTaskFallbackStart": "Task started", "virtualTaskFallbackEnd": "Task finished", "virtualBroadcastStart": "Broadcast", "virtualBroadcastEnd": "Broadcast finished", "virtualBroadcastResponseStart": "{{name}} response", "virtualBroadcastResponseEnd": "{{name}} response finished", "virtualBroadcastResponseFallbackStart": "Broadcast response started", "virtualBroadcastResponseFallbackEnd": "Broadcast response finished", "virtualTabStart": "Tab · {{title}}", "virtualTabEnd": "Tab finished · {{title}}", "virtualTabFallbackStart": "Tab started", "virtualTabFallbackEnd": "Tab finished", "virtualTabsStart": "Tabs", "virtualTabsEnd": "Tabs finished", "virtualTabsCount": "{{count}} tab(s)", "virtualContainerDetail": "{{name}} · {{status}}" };
|
|
103768
104234
|
const goal = { "taskCompleted": "Completed", "taskPending": "Pending", "taskDependency": "Depends on: {{dependency}}" };
|
|
103769
104235
|
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" };
|
|
103770
104236
|
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" };
|
|
@@ -103772,10 +104238,10 @@ const mention = { "allDesc": "Notify all members" };
|
|
|
103772
104238
|
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" };
|
|
103773
104239
|
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" } };
|
|
103774
104240
|
const command = { "clearDescription": "Clear context for future replies", "compactDescription": "Compress this conversation context; add notes to preserve key points", "goalDescription": "Start Goal mode", "defaultGoalLabel": "Default", "enableDefaultGoal": "Enable default Goal mode", "disableDefaultGoal": "Disable default Goal mode", "quickReplyDescription": "Open quick replies", "skillHint": "Continue typing to search Skills" };
|
|
103775
|
-
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", "saved": "Quick reply saved", "alreadyExists": "A quick reply with the same content already exists", "saveFromMessageTitle": "Save as Quick Reply", "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" };
|
|
104241
|
+
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", "saved": "Quick reply saved", "alreadyExists": "A quick reply with the same content already exists", "saveFromMessageTitle": "Save as Quick Reply", "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", "directSendHint": "Direct send" };
|
|
103776
104242
|
const tool = { "executing": "Executing", "pending": "Incomplete", "success": "Success", "error": "Error", "arguments": "Arguments", "result": "Result", "expand": "Expand", "collapse": "Collapse", "viewChanges": "View Changes", "viewDetails": "View Details", "viewResult": "View Result", "viewArguments": "View Arguments", "changes": "Changes", "openFilePreview": "Open file preview: {{path}}", "stopped": "Stopped by user", "failed": "Execution failed" };
|
|
103777
104243
|
const reasoning = { "title": "Thinking" };
|
|
103778
|
-
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" };
|
|
104244
|
+
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", "createFailed": "Failed to create", "retry": "Retry" };
|
|
103779
104245
|
const conversation = { "createGroup": "Create Group Chat", "editGroup": "Edit Group Chat", "title": "Group Name", "titlePlaceholder": "Enter group name", "selectAgents": "Select Agents", "agentRequired": "Group chat requires at least 2 agents", "group": "Group Chat", "groupChatFallback": "Group Chat", "chatWithAgent": "Chat with {{name}}", "teamMemory": { "title": "Edit Team Memory", "menu": "Team Memory", "placeholder": "Enter the shared cognitive framework for all group members...\n\nFor example:\n- Behavioral guidelines\n- Common knowledge\n- Important decisions\n- Agreements and constraints", "formatHint": "Markdown or plain text supported", "lastUpdated": "Last updated by {{by}} at {{at}}", "saveFailed": "Save failed, please retry" }, "selectedMembers": "Selected Members", "members": "Members", "active": "{{count}} responding", "moreMembers": "more", "searchAgents": "Search agents…", "startGroupChat": "Start Group Chat", "needMoreAgents": "Select {{count}} more agent(s) to start", "readyToStart": "{{count}} member(s) selected, ready to start", "titlePlaceholderCreate": "Optional, auto-generated if left blank", "confirmDeleteGroup": "Delete this group chat?", "deleteGroupTitle": "Delete Group Chat" };
|
|
103780
104246
|
const update = { "dotTooltip": "New version available v{{version}}", "versionTooltip": "About KAi", "versionTooltipFeedback": "KAi v{{version}} · Got ideas? Click to give feedback", "toast": { "available": "New version available v{{version}}", "download": "Download", "hint": "Click download, then install it manually", "viewDetails": "View Details" } };
|
|
103781
104247
|
const sidebar = { "title": "Chats", "workspace": "Workspace", "agents": "Agents", "groupChats": "Group Chats", "noGroupChats": "No group chats", "noAgents": "No agents yet", "noMessages": "No messages yet", "tab": { "agents": "Agents", "groups": "Groups" }, "empty": { "title": "No chats yet", "subtitle": "Start a new conversation" }, "create": { "agent": "Create Agent", "group": "Create Group", "new": "New Chat" }, "menu": { "open": "Open", "editAgent": "Edit Agent", "editGroup": "Edit Group", "configure": "Configure", "openDir": "Open Directory", "teamMemory": "Team Memory", "pin": "Pin to Top", "unpin": "Unpin", "delete": "Delete" }, "search": "Search", "searchPlaceholder": "Search conversations..." };
|
|
@@ -103786,7 +104252,8 @@ const contextCleared = "Context cleared";
|
|
|
103786
104252
|
const contextCompacted = "Context compacted";
|
|
103787
104253
|
const compactLoading = "Compacting context...";
|
|
103788
104254
|
const compactFailed = "Compaction failed";
|
|
103789
|
-
const
|
|
104255
|
+
const sendMessageFailed = "Failed to send: {{error}}";
|
|
104256
|
+
const contextHealth = { "title": "Context Health", "failed": "Compaction failed", "compacting": "Compacting", "compacted": "Compacted", "agent": "Agent: {{name}}", "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 runtime context: {{current}} / {{limit}}", "thresholdRatio": "Compaction threshold: {{percent}}", "lastCompaction": "Last compaction: {{value}}", "lastResult": "Last result: {{value}}", "historyResult": "History messages: {{value}}", "noopResult": "Result: no reduction", "noopHistory": "History messages: {{value}}", "totalCompactions": "Total compactions: {{count}}", "targetLimit": "Runtime context target: about {{value}}" };
|
|
103790
104257
|
const retrying = "Retrying... {{attempt}}/{{maxAttempts}}";
|
|
103791
104258
|
const noMoreMessages = "No more messages";
|
|
103792
104259
|
const newMessages = "New messages";
|
|
@@ -103794,13 +104261,13 @@ const scrollToBottom = "Scroll to bottom";
|
|
|
103794
104261
|
const time = { "yesterday": "Yesterday", "monday": "Mon", "tuesday": "Tue", "wednesday": "Wed", "thursday": "Thu", "friday": "Fri", "saturday": "Sat", "sunday": "Sun" };
|
|
103795
104262
|
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", "clearContextBeforeSend": "Clear context before send", "clearContextBeforeSendDescription": "When enabled, the session context is cleared before the scheduled message is sent. Suitable for daily reports, reminders, and checks that don't rely on previous context.", "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" } };
|
|
103796
104263
|
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", "scopeAllGroups": "All Groups", "scopeGroup": "Specific Group", "scopeNone": "No scope selected", "scopeAgentValue": "Specific Agent · {{agentName}}", "agentMemoryTitle": "Agent memory", "agentMemoryDescription": "Organize what each Agent remembers about the user, projects, and long-term lessons.", "groupMemoryTitle": "Group memory", "groupMemoryDescription": "Organize group decisions, project facts, and collaboration rules.", "executionOrderHint": "Group memory will run first, then Agent memory, so Agents can absorb the latest group conclusions.", "agentLabel": "Agent", "selectAgent": "Select an agent", "selectAgentFirst": "Select an agent first", "selectScopeFirst": "Select at least one memory scope", "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}} targets 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.", "openAllGroupsDirHint": "All groups do not have a single directory. Select a specific group first.", "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", "groupBatchExecutionSummary": "Group memory result: {{succeeded}}/{{total}} groups succeeded", "groupBatchExecutionSummaryCompact": "{{succeeded}}/{{total}} groups", "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.", "configChanged": "Settings changed. Save to apply.", "advancedDetails": "Advanced details", "sources": "Sources", "sourcesEmpty": "No sources available", "sourceDirect": "{{count}} sessions · {{messages}} messages", "sourceGroupDigest": "{{count}} group digests", "groupSources": "Group input / output", "groupSourcesRead": "Read", "groupSourcesWritten": "Written", "truncated": "truncated", "sourceBudgetExhausted": "Read budget was exhausted. The result only uses content that was actually read.", "fileOperation": { "create": "created", "update": "updated" }, "consolidation": "Stage2 consolidation", "consolidationMode": { "fallback": "fallback: existing daily flow", "extraction-driven": "extraction-driven: uses Stage1 extractions", "skipped-locked": "skipped: another run is active", "skipped-cooldown": "skipped: cooldown" }, "extractionCount": "extractions {{count}}", "decisionCount": "decisions {{count}}", "consolidationDecision": { "promoted": "written", "merged": "merged", "discarded": "discarded", "deferred": "candidate kept", "needs_review": "needs review" }, "moreItems": "{{count}} more items not expanded.", "reflectionSignals": "Reflection signals", "staleSignals": "stale {{count}}", "contradictionSignals": "contradiction {{count}}", "needsReview": "needs_review {{count}}", "procedureCandidates": "procedure {{count}}", "skillCandidates": "skill {{count}}", "reviewOnlyNotice": "These are review signals. The system does not automatically delete or rewrite long-term memory here.", "promotionCandidates": "Procedure / skill candidates", "promotionCandidateCount": "candidates {{count}}", "promotionReviewOnlyNotice": "Only candidate artifacts are shown here. No formal skill, workflow, or agent instruction is created automatically." } };
|
|
103797
|
-
const clear = { "confirmTitle": "Clear context?", "confirmDesc": "Messages in this conversation will stay. Only the context used for future replies will be cleared.", "confirmBtn": "Clear" };
|
|
103798
|
-
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", "searchPlaceholder": "Find…", "matchCase": "Match case", "previousMatch": "Previous match", "nextMatch": "Next match", "closeSearch": "Close search" };
|
|
104264
|
+
const clear = { "confirmTitle": "Clear context?", "confirmDesc": "Messages in this conversation will stay. Only the context used for future replies will be cleared.", "confirmBtn": "Clear", "failed": "Failed to clear context" };
|
|
104265
|
+
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", "searchPlaceholder": "Find…", "matchCase": "Match case", "previousMatch": "Previous match", "nextMatch": "Next match", "closeSearch": "Close search", "diff": "Diff", "diffPreviewHint": "Incremental preview based on current file", "unchangedLines": "{{count}} lines unchanged", "resize": "Adjust preview width" };
|
|
103799
104266
|
const messageSearch = { "placeholder": "Search current Session messages", "emptyHint": "Type to search", "previousResult": "Previous result", "nextResult": "Next result", "close": "Close search" };
|
|
103800
104267
|
const cancel = "Cancel";
|
|
103801
104268
|
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." };
|
|
103802
|
-
const saved = { "entry": "Saved", "entryWithCount": "Saved {{count}}" };
|
|
103803
|
-
const pty = { "status": { "running": "Running", "killing": "Killing", "exited": "Exited (code {{code}})" }, "eventCard": { "exited": "Exited" }, "sidebar": { "titleWithCount": "Terminals ({{count}})", "title": "Terminals" }, "reset": { "terminalsStopped": "{{count}} terminals stopped" }, "stop": "Stop", "stopConfirm": { "title": "Stop this terminal?", "message": "The running command will be terminated. Ongoing work or unsaved output may be interrupted.", "confirm": "Stop Terminal" }, "restart": "Restart", "collapseTerminal": "Collapse terminal — process keeps running", "reopenTerminal": "Open or restore terminal", "yourTerminal": "Your Terminal", "agentOperating": "Agent Operating", "noTerminals": "No active terminals" };
|
|
104269
|
+
const saved = { "entry": "Saved", "entryWithCount": "Saved {{count}}", "title": "Saved Messages", "emptyTitle": "No saved messages yet", "emptyDescription": "Right-click a message to save valuable content.", "emptySecondary": "You can also save from the message context menu.", "unknownSource": "Unknown conversation", "contextTitle": "Saved context", "contextUnavailable": "Unable to load context for now.", "missingMessage": "Original message is no longer available" };
|
|
104270
|
+
const pty = { "status": { "running": "Running", "killing": "Killing", "exited": "Exited (code {{code}})" }, "eventCard": { "exited": "Exited" }, "sidebar": { "titleWithCount": "Terminals ({{count}})", "title": "Terminals" }, "reset": { "terminalsStopped": "{{count}} terminals stopped" }, "stop": "Stop", "stopConfirm": { "title": "Stop this terminal?", "message": "The running command will be terminated. Ongoing work or unsaved output may be interrupted.", "confirm": "Stop Terminal" }, "closeTerminal": "Close terminal", "closeConfirm": { "title": "Close this terminal?", "message": "The terminal session will be closed and any running process stopped.", "confirm": "Close Terminal" }, "newTerminal": "New Terminal", "togglePanel": "Toggle terminal panel", "restart": "Restart", "mobileDialogTitle": "Terminal", "mobileControls": { "label": "Terminal control keys", "keys": { "escape": "Send ESC", "tab": "Send Tab", "ctrlC": "Send Ctrl+C", "up": "Send Up Arrow", "left": "Send Left Arrow", "down": "Send Down Arrow", "right": "Send Right Arrow", "enter": "Send Enter" } }, "collapseTerminal": "Collapse terminal — process keeps running", "reopenTerminal": "Open or restore terminal", "yourTerminal": "Your Terminal", "agentOperating": "Agent Operating", "noTerminals": "No active terminals" };
|
|
103804
104271
|
const connection = { "reconnecting": "Connection lost, reconnecting…" };
|
|
103805
104272
|
const en2 = {
|
|
103806
104273
|
header: header$d,
|
|
@@ -103839,6 +104306,7 @@ const en2 = {
|
|
|
103839
104306
|
contextCompacted,
|
|
103840
104307
|
compactLoading,
|
|
103841
104308
|
compactFailed,
|
|
104309
|
+
sendMessageFailed,
|
|
103842
104310
|
contextHealth,
|
|
103843
104311
|
retrying,
|
|
103844
104312
|
noMoreMessages,
|
|
@@ -105000,24 +105468,28 @@ function GroupMemorySettingsDialog({ groupId, onClose }) {
|
|
|
105000
105468
|
)
|
|
105001
105469
|
] });
|
|
105002
105470
|
}
|
|
105003
|
-
const overlay$1 = "
|
|
105004
|
-
const dialog$3 = "
|
|
105005
|
-
const header$9 = "
|
|
105006
|
-
const dialogTitle$1 = "
|
|
105007
|
-
const eyebrow = "
|
|
105008
|
-
const content$7 = "
|
|
105009
|
-
const label$5 = "
|
|
105010
|
-
const hint$4 = "
|
|
105011
|
-
const emptyText$3 = "
|
|
105012
|
-
const errorText$2 = "
|
|
105013
|
-
const checkboxLabel$1 = "
|
|
105014
|
-
const segmentedGroup = "
|
|
105015
|
-
const segmentedOption = "
|
|
105016
|
-
const segmentedOptionActive = "
|
|
105017
|
-
const policyEditor = "
|
|
105018
|
-
const policyEntry = "
|
|
105019
|
-
const policyEntryHeader = "
|
|
105020
|
-
const
|
|
105471
|
+
const overlay$1 = "_overlay_bbsex_3";
|
|
105472
|
+
const dialog$3 = "_dialog_bbsex_22";
|
|
105473
|
+
const header$9 = "_header_bbsex_36";
|
|
105474
|
+
const dialogTitle$1 = "_dialogTitle_bbsex_42";
|
|
105475
|
+
const eyebrow = "_eyebrow_bbsex_51";
|
|
105476
|
+
const content$7 = "_content_bbsex_59";
|
|
105477
|
+
const label$5 = "_label_bbsex_68";
|
|
105478
|
+
const hint$4 = "_hint_bbsex_74";
|
|
105479
|
+
const emptyText$3 = "_emptyText_bbsex_81";
|
|
105480
|
+
const errorText$2 = "_errorText_bbsex_88";
|
|
105481
|
+
const checkboxLabel$1 = "_checkboxLabel_bbsex_94";
|
|
105482
|
+
const segmentedGroup = "_segmentedGroup_bbsex_102";
|
|
105483
|
+
const segmentedOption = "_segmentedOption_bbsex_116";
|
|
105484
|
+
const segmentedOptionActive = "_segmentedOptionActive_bbsex_130";
|
|
105485
|
+
const policyEditor = "_policyEditor_bbsex_141";
|
|
105486
|
+
const policyEntry = "_policyEntry_bbsex_147";
|
|
105487
|
+
const policyEntryHeader = "_policyEntryHeader_bbsex_157";
|
|
105488
|
+
const reasoningSection = "_reasoningSection_bbsex_164";
|
|
105489
|
+
const segmentedControl$1 = "_segmentedControl_bbsex_174";
|
|
105490
|
+
const segmentBtn$1 = "_segmentBtn_bbsex_180";
|
|
105491
|
+
const segmentActive$1 = "_segmentActive_bbsex_191";
|
|
105492
|
+
const footer$4 = "_footer_bbsex_198";
|
|
105021
105493
|
const styles$F = {
|
|
105022
105494
|
overlay: overlay$1,
|
|
105023
105495
|
dialog: dialog$3,
|
|
@@ -105036,8 +105508,19 @@ const styles$F = {
|
|
|
105036
105508
|
policyEditor,
|
|
105037
105509
|
policyEntry,
|
|
105038
105510
|
policyEntryHeader,
|
|
105511
|
+
reasoningSection,
|
|
105512
|
+
segmentedControl: segmentedControl$1,
|
|
105513
|
+
segmentBtn: segmentBtn$1,
|
|
105514
|
+
segmentActive: segmentActive$1,
|
|
105039
105515
|
footer: footer$4
|
|
105040
105516
|
};
|
|
105517
|
+
const REASONING_EFFORT_LEVELS = ["off", "low", "medium", "high"];
|
|
105518
|
+
const REASONING_EFFORT_LABELS = {
|
|
105519
|
+
off: "关闭",
|
|
105520
|
+
low: "低",
|
|
105521
|
+
medium: "中",
|
|
105522
|
+
high: "高"
|
|
105523
|
+
};
|
|
105041
105524
|
function sortEntries(entries2) {
|
|
105042
105525
|
return [...entries2].sort((a2, b2) => a2.priority - b2.priority);
|
|
105043
105526
|
}
|
|
@@ -105063,6 +105546,7 @@ function GroupModelPolicyDialog({ groupId, initialMode, onClose, onSaved }) {
|
|
|
105063
105546
|
const [entries2, setEntries] = reactExports.useState([]);
|
|
105064
105547
|
const [autoFallback, setAutoFallback] = reactExports.useState(false);
|
|
105065
105548
|
const [notifyOnDegraded, setNotifyOnDegraded] = reactExports.useState(true);
|
|
105549
|
+
const [reasoningEffort, setReasoningEffort] = reactExports.useState("off");
|
|
105066
105550
|
const [error2, setError] = reactExports.useState(null);
|
|
105067
105551
|
const [confirmClear, setConfirmClear] = reactExports.useState(false);
|
|
105068
105552
|
const snapshotRef = reactExports.useRef(null);
|
|
@@ -105085,6 +105569,7 @@ function GroupModelPolicyDialog({ groupId, initialMode, onClose, onSaved }) {
|
|
|
105085
105569
|
setEntries(getInitialEntries(policy, llmChannels));
|
|
105086
105570
|
setAutoFallback(policy?.mode === "group-override" ? Boolean(policy.override?.autoFallback) : false);
|
|
105087
105571
|
setNotifyOnDegraded(policy?.mode === "group-override" ? policy.override?.notifyOnDegraded ?? true : true);
|
|
105572
|
+
setReasoningEffort(policy?.mode === "group-override" ? policy.override?.requestDefaults?.reasoningEffort ?? "off" : "off");
|
|
105088
105573
|
} catch (err) {
|
|
105089
105574
|
if (!cancelled) setError(err instanceof Error ? err.message : "群模型配置加载失败。");
|
|
105090
105575
|
} finally {
|
|
@@ -105128,7 +105613,8 @@ function GroupModelPolicyDialog({ groupId, initialMode, onClose, onSaved }) {
|
|
|
105128
105613
|
override: {
|
|
105129
105614
|
entries: normalizeEntries(entries2),
|
|
105130
105615
|
autoFallback,
|
|
105131
|
-
notifyOnDegraded
|
|
105616
|
+
notifyOnDegraded,
|
|
105617
|
+
requestDefaults: { reasoningEffort }
|
|
105132
105618
|
}
|
|
105133
105619
|
});
|
|
105134
105620
|
}
|
|
@@ -105233,6 +105719,20 @@ function GroupModelPolicyDialog({ groupId, initialMode, onClose, onSaved }) {
|
|
|
105233
105719
|
`${entry.priority}:${entry.channelId}:${entry.model}`
|
|
105234
105720
|
)),
|
|
105235
105721
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "button", variant: "secondary", onClick: addFallback, disabled: channels2.length === 0, "aria-label": "添加备用模型", children: "添加备用模型" }),
|
|
105722
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$F.reasoningSection, children: [
|
|
105723
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$F.label, children: "思考模式" }),
|
|
105724
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$F.segmentedControl, "aria-label": "思考模式", children: REASONING_EFFORT_LEVELS.map((level) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
105725
|
+
"button",
|
|
105726
|
+
{
|
|
105727
|
+
type: "button",
|
|
105728
|
+
className: `${styles$F.segmentBtn} ${reasoningEffort === level ? styles$F.segmentActive : ""}`,
|
|
105729
|
+
onClick: () => setReasoningEffort(level),
|
|
105730
|
+
children: REASONING_EFFORT_LABELS[level]
|
|
105731
|
+
},
|
|
105732
|
+
level
|
|
105733
|
+
)) }),
|
|
105734
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$F.hint, children: "仅在本群单独配置模型时生效,会写入 model-policy.json。" })
|
|
105735
|
+
] }),
|
|
105236
105736
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$F.checkboxLabel, children: [
|
|
105237
105737
|
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { type: "checkbox", checked: autoFallback, onChange: (event) => setAutoFallback(event.target.checked) }),
|
|
105238
105738
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "主模型不可用时自动尝试备用模型" })
|
|
@@ -107345,45 +107845,48 @@ function AgentAssignmentDrawer({
|
|
|
107345
107845
|
}
|
|
107346
107846
|
) });
|
|
107347
107847
|
}
|
|
107348
|
-
const panel$7 = "
|
|
107349
|
-
const list$4 = "
|
|
107350
|
-
const empty$5 = "
|
|
107351
|
-
const item$4 = "
|
|
107352
|
-
const itemInfo = "
|
|
107353
|
-
const itemHeader$1 = "
|
|
107354
|
-
const itemTitleBlock = "
|
|
107355
|
-
const itemFooter = "
|
|
107356
|
-
const itemName$1 = "
|
|
107357
|
-
const itemMeta$1 = "
|
|
107358
|
-
const itemActions = "
|
|
107359
|
-
const toggleLabel = "
|
|
107360
|
-
const toggleInput = "
|
|
107361
|
-
const toggleTrack = "
|
|
107362
|
-
const formWrapper = "
|
|
107363
|
-
const formTitle$1 = "
|
|
107364
|
-
const label$3 = "
|
|
107365
|
-
const input$3 = "
|
|
107366
|
-
const formFooter$1 = "
|
|
107367
|
-
const headerSection = "
|
|
107368
|
-
const headerSectionTop = "
|
|
107369
|
-
const sectionTitle$1 = "
|
|
107370
|
-
const sectionDescription = "
|
|
107371
|
-
const headerActions$2 = "
|
|
107372
|
-
const headersEmpty = "
|
|
107373
|
-
const headersList = "
|
|
107374
|
-
const headerRow = "
|
|
107375
|
-
const headerField = "
|
|
107376
|
-
const headerEnabledLabel = "
|
|
107377
|
-
const headerRowActions = "
|
|
107378
|
-
const testHint = "
|
|
107379
|
-
const testSuccess$1 = "
|
|
107380
|
-
const testError = "
|
|
107381
|
-
const statusRow = "
|
|
107382
|
-
const statusRowWarning = "
|
|
107383
|
-
const statusIcon$1 = "
|
|
107384
|
-
const statusText = "
|
|
107385
|
-
const disabledBadge = "
|
|
107386
|
-
const statusArrow = "
|
|
107848
|
+
const panel$7 = "_panel_1bqgw_3";
|
|
107849
|
+
const list$4 = "_list_1bqgw_10";
|
|
107850
|
+
const empty$5 = "_empty_1bqgw_19";
|
|
107851
|
+
const item$4 = "_item_1bqgw_26";
|
|
107852
|
+
const itemInfo = "_itemInfo_1bqgw_48";
|
|
107853
|
+
const itemHeader$1 = "_itemHeader_1bqgw_56";
|
|
107854
|
+
const itemTitleBlock = "_itemTitleBlock_1bqgw_64";
|
|
107855
|
+
const itemFooter = "_itemFooter_1bqgw_68";
|
|
107856
|
+
const itemName$1 = "_itemName_1bqgw_76";
|
|
107857
|
+
const itemMeta$1 = "_itemMeta_1bqgw_83";
|
|
107858
|
+
const itemActions = "_itemActions_1bqgw_93";
|
|
107859
|
+
const toggleLabel = "_toggleLabel_1bqgw_103";
|
|
107860
|
+
const toggleInput = "_toggleInput_1bqgw_111";
|
|
107861
|
+
const toggleTrack = "_toggleTrack_1bqgw_118";
|
|
107862
|
+
const formWrapper = "_formWrapper_1bqgw_149";
|
|
107863
|
+
const formTitle$1 = "_formTitle_1bqgw_155";
|
|
107864
|
+
const label$3 = "_label_1bqgw_169";
|
|
107865
|
+
const input$3 = "_input_1bqgw_175";
|
|
107866
|
+
const formFooter$1 = "_formFooter_1bqgw_196";
|
|
107867
|
+
const headerSection = "_headerSection_1bqgw_204";
|
|
107868
|
+
const headerSectionTop = "_headerSectionTop_1bqgw_210";
|
|
107869
|
+
const sectionTitle$1 = "_sectionTitle_1bqgw_218";
|
|
107870
|
+
const sectionDescription = "_sectionDescription_1bqgw_225";
|
|
107871
|
+
const headerActions$2 = "_headerActions_1bqgw_233";
|
|
107872
|
+
const headersEmpty = "_headersEmpty_1bqgw_240";
|
|
107873
|
+
const headersList = "_headersList_1bqgw_248";
|
|
107874
|
+
const headerRow = "_headerRow_1bqgw_254";
|
|
107875
|
+
const headerField = "_headerField_1bqgw_265";
|
|
107876
|
+
const headerEnabledLabel = "_headerEnabledLabel_1bqgw_272";
|
|
107877
|
+
const headerRowActions = "_headerRowActions_1bqgw_281";
|
|
107878
|
+
const testHint = "_testHint_1bqgw_289";
|
|
107879
|
+
const testSuccess$1 = "_testSuccess_1bqgw_295";
|
|
107880
|
+
const testError = "_testError_1bqgw_296";
|
|
107881
|
+
const statusRow = "_statusRow_1bqgw_316";
|
|
107882
|
+
const statusRowWarning = "_statusRowWarning_1bqgw_340";
|
|
107883
|
+
const statusIcon$1 = "_statusIcon_1bqgw_345";
|
|
107884
|
+
const statusText = "_statusText_1bqgw_352";
|
|
107885
|
+
const disabledBadge = "_disabledBadge_1bqgw_361";
|
|
107886
|
+
const statusArrow = "_statusArrow_1bqgw_372";
|
|
107887
|
+
const envVarRow = "_envVarRow_1bqgw_415";
|
|
107888
|
+
const inputWarning = "_inputWarning_1bqgw_426";
|
|
107889
|
+
const fieldHint$2 = "_fieldHint_1bqgw_430";
|
|
107387
107890
|
const styles$x = {
|
|
107388
107891
|
panel: panel$7,
|
|
107389
107892
|
list: list$4,
|
|
@@ -107423,14 +107926,18 @@ const styles$x = {
|
|
|
107423
107926
|
statusIcon: statusIcon$1,
|
|
107424
107927
|
statusText,
|
|
107425
107928
|
disabledBadge,
|
|
107426
|
-
statusArrow
|
|
107929
|
+
statusArrow,
|
|
107930
|
+
envVarRow,
|
|
107931
|
+
inputWarning,
|
|
107932
|
+
fieldHint: fieldHint$2
|
|
107427
107933
|
};
|
|
107428
107934
|
const emptyForm = {
|
|
107429
107935
|
name: "",
|
|
107430
107936
|
type: "command",
|
|
107431
107937
|
enabled: true,
|
|
107432
107938
|
command: "",
|
|
107433
|
-
args: []
|
|
107939
|
+
args: [],
|
|
107940
|
+
env: {}
|
|
107434
107941
|
};
|
|
107435
107942
|
const MCP_SERVER_TYPE_LABEL_KEYS = {
|
|
107436
107943
|
command: "settings.mcp.typeCommand",
|
|
@@ -107438,6 +107945,9 @@ const MCP_SERVER_TYPE_LABEL_KEYS = {
|
|
|
107438
107945
|
"streamable-http": "settings.mcp.typeStreamableHttp"
|
|
107439
107946
|
};
|
|
107440
107947
|
const SENSITIVE_HEADER_NAME_PATTERN = /(authorization|api-key|apikey|token|secret|cookie|credential)/i;
|
|
107948
|
+
const SENSITIVE_ENV_KEY_PATTERN = /(api[_-]?key|token|secret|password|credential|private[_-]?key)/i;
|
|
107949
|
+
const ENV_KEY_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
107950
|
+
const isSensitiveEnvKey = (key) => SENSITIVE_ENV_KEY_PATTERN.test(key);
|
|
107441
107951
|
const createHeaderId = () => `header-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
107442
107952
|
const isSensitiveHeaderName = (name2) => SENSITIVE_HEADER_NAME_PATTERN.test(name2);
|
|
107443
107953
|
const createRequestHeader = (name2 = "", value2 = "") => ({
|
|
@@ -107465,6 +107975,7 @@ function McpPanel({ onClose: _onClose }) {
|
|
|
107465
107975
|
const [searchQuery, setSearchQuery] = reactExports.useState("");
|
|
107466
107976
|
const [savingAgents, setSavingAgents] = reactExports.useState(false);
|
|
107467
107977
|
const [visibleHeaderIds, setVisibleHeaderIds] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
107978
|
+
const [visibleEnvKeys, setVisibleEnvKeys] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
107468
107979
|
const [testResult2, setTestResult] = reactExports.useState(null);
|
|
107469
107980
|
const [testingConnection, setTestingConnection] = reactExports.useState(false);
|
|
107470
107981
|
const getServerEndpoint = (server) => {
|
|
@@ -107490,6 +108001,7 @@ function McpPanel({ onClose: _onClose }) {
|
|
|
107490
108001
|
enabled: s16.enabled,
|
|
107491
108002
|
command: s16.command,
|
|
107492
108003
|
args: s16.args,
|
|
108004
|
+
env: s16.env,
|
|
107493
108005
|
url: s16.url,
|
|
107494
108006
|
headers: s16.headers
|
|
107495
108007
|
};
|
|
@@ -107497,9 +108009,10 @@ function McpPanel({ onClose: _onClose }) {
|
|
|
107497
108009
|
return map2;
|
|
107498
108010
|
};
|
|
107499
108011
|
const openNew = () => {
|
|
107500
|
-
setForm({ ...emptyForm });
|
|
108012
|
+
setForm({ ...emptyForm, env: {} });
|
|
107501
108013
|
setArgsInput("");
|
|
107502
108014
|
setVisibleHeaderIds(/* @__PURE__ */ new Set());
|
|
108015
|
+
setVisibleEnvKeys(/* @__PURE__ */ new Set());
|
|
107503
108016
|
setTestResult(null);
|
|
107504
108017
|
setEditing("");
|
|
107505
108018
|
};
|
|
@@ -107510,6 +108023,7 @@ function McpPanel({ onClose: _onClose }) {
|
|
|
107510
108023
|
enabled: server.enabled,
|
|
107511
108024
|
command: server.command,
|
|
107512
108025
|
args: server.args,
|
|
108026
|
+
env: server.env ? { ...server.env } : {},
|
|
107513
108027
|
url: server.url,
|
|
107514
108028
|
headers: normalizeRequestHeaders(server.headers)
|
|
107515
108029
|
});
|
|
@@ -107522,12 +108036,16 @@ function McpPanel({ onClose: _onClose }) {
|
|
|
107522
108036
|
setEditing(null);
|
|
107523
108037
|
};
|
|
107524
108038
|
const handleSave = async () => {
|
|
108039
|
+
const cleanedEnv = Object.fromEntries(
|
|
108040
|
+
Object.entries(form2.env ?? {}).filter(([k2]) => k2.trim() !== "")
|
|
108041
|
+
);
|
|
108042
|
+
const formToSave = { ...form2, env: Object.keys(cleanedEnv).length > 0 ? cleanedEnv : void 0 };
|
|
107525
108043
|
const map2 = buildServersMap(servers);
|
|
107526
108044
|
if (editing === "") {
|
|
107527
108045
|
const id32 = genId(ID_TYPE.MCP);
|
|
107528
|
-
map2[id32] =
|
|
108046
|
+
map2[id32] = formToSave;
|
|
107529
108047
|
} else if (editing) {
|
|
107530
|
-
map2[editing] =
|
|
108048
|
+
map2[editing] = formToSave;
|
|
107531
108049
|
}
|
|
107532
108050
|
try {
|
|
107533
108051
|
await getTransport().saveMcpServers(map2);
|
|
@@ -107591,6 +108109,61 @@ function McpPanel({ onClose: _onClose }) {
|
|
|
107591
108109
|
return next2;
|
|
107592
108110
|
});
|
|
107593
108111
|
};
|
|
108112
|
+
const envEntries = Object.entries(form2.env ?? {});
|
|
108113
|
+
const hasDuplicateEnvKey = (key) => {
|
|
108114
|
+
const lower2 = key.toLowerCase();
|
|
108115
|
+
return envEntries.filter(([k2]) => k2.toLowerCase() === lower2).length > 1;
|
|
108116
|
+
};
|
|
108117
|
+
const updateEnvKey = (oldKey, newKey) => {
|
|
108118
|
+
if (oldKey === newKey) return;
|
|
108119
|
+
setTestResult(null);
|
|
108120
|
+
setForm((current) => {
|
|
108121
|
+
const env2 = { ...current.env ?? {} };
|
|
108122
|
+
const value2 = env2[oldKey] ?? "";
|
|
108123
|
+
delete env2[oldKey];
|
|
108124
|
+
env2[newKey] = value2;
|
|
108125
|
+
return { ...current, env: env2 };
|
|
108126
|
+
});
|
|
108127
|
+
};
|
|
108128
|
+
const updateEnvValue = (key, value2) => {
|
|
108129
|
+
setTestResult(null);
|
|
108130
|
+
setForm((current) => ({
|
|
108131
|
+
...current,
|
|
108132
|
+
env: { ...current.env ?? {}, [key]: value2 }
|
|
108133
|
+
}));
|
|
108134
|
+
};
|
|
108135
|
+
const addEnvVar = () => {
|
|
108136
|
+
setTestResult(null);
|
|
108137
|
+
setForm((current) => {
|
|
108138
|
+
const env2 = current.env ?? {};
|
|
108139
|
+
if (env2[""] !== void 0) return current;
|
|
108140
|
+
return { ...current, env: { ...env2, "": "" } };
|
|
108141
|
+
});
|
|
108142
|
+
};
|
|
108143
|
+
const removeEnvVar = (key) => {
|
|
108144
|
+
setTestResult(null);
|
|
108145
|
+
setForm((current) => {
|
|
108146
|
+
const env2 = { ...current.env ?? {} };
|
|
108147
|
+
delete env2[key];
|
|
108148
|
+
return { ...current, env: env2 };
|
|
108149
|
+
});
|
|
108150
|
+
setVisibleEnvKeys((current) => {
|
|
108151
|
+
const next2 = new Set(current);
|
|
108152
|
+
next2.delete(key);
|
|
108153
|
+
return next2;
|
|
108154
|
+
});
|
|
108155
|
+
};
|
|
108156
|
+
const toggleEnvVisibility = (key) => {
|
|
108157
|
+
setVisibleEnvKeys((current) => {
|
|
108158
|
+
const next2 = new Set(current);
|
|
108159
|
+
if (next2.has(key)) {
|
|
108160
|
+
next2.delete(key);
|
|
108161
|
+
} else {
|
|
108162
|
+
next2.add(key);
|
|
108163
|
+
}
|
|
108164
|
+
return next2;
|
|
108165
|
+
});
|
|
108166
|
+
};
|
|
107594
108167
|
const handleTestConnection = async () => {
|
|
107595
108168
|
if (testingConnection) return;
|
|
107596
108169
|
setTestingConnection(true);
|
|
@@ -107760,7 +108333,80 @@ function McpPanel({ onClose: _onClose }) {
|
|
|
107760
108333
|
className: styles$x.input,
|
|
107761
108334
|
placeholder: "mcp-server-filesystem"
|
|
107762
108335
|
}
|
|
107763
|
-
) })
|
|
108336
|
+
) }),
|
|
108337
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: styles$x.headerSection, children: [
|
|
108338
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$x.headerSectionTop, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
108339
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: styles$x.sectionTitle, children: t2("settings.mcp.envVars") }),
|
|
108340
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$x.sectionDescription, children: t2("settings.mcp.envVarsDescription") })
|
|
108341
|
+
] }) }),
|
|
108342
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$x.headerActions, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "ghost", size: "sm", onClick: addEnvVar, children: [
|
|
108343
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 14 }),
|
|
108344
|
+
" ",
|
|
108345
|
+
t2("settings.mcp.addEnvVar")
|
|
108346
|
+
] }) }),
|
|
108347
|
+
envEntries.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$x.headersEmpty, children: t2("settings.mcp.envVarsEmpty") }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$x.headersList, children: envEntries.map(([key, value2]) => {
|
|
108348
|
+
const isSecret = isSensitiveEnvKey(key);
|
|
108349
|
+
const valueVisible = visibleEnvKeys.has(key) || !isSecret;
|
|
108350
|
+
const isDuplicate = hasDuplicateEnvKey(key);
|
|
108351
|
+
const isInvalidKey = key !== "" && !ENV_KEY_PATTERN.test(key);
|
|
108352
|
+
const isEmptyValue = value2 === "";
|
|
108353
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$x.envVarRow, children: [
|
|
108354
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$x.headerField, children: [
|
|
108355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$x.label, children: t2("settings.mcp.envKey") }),
|
|
108356
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
108357
|
+
"input",
|
|
108358
|
+
{
|
|
108359
|
+
type: "text",
|
|
108360
|
+
defaultValue: key,
|
|
108361
|
+
onBlur: (e2) => updateEnvKey(key, e2.target.value),
|
|
108362
|
+
className: isDuplicate || isInvalidKey ? `${styles$x.input} ${styles$x.inputWarning}` : styles$x.input,
|
|
108363
|
+
placeholder: "API_KEY"
|
|
108364
|
+
}
|
|
108365
|
+
)
|
|
108366
|
+
] }),
|
|
108367
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$x.headerField, children: [
|
|
108368
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$x.label, children: t2("settings.mcp.envValue") }),
|
|
108369
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
108370
|
+
"input",
|
|
108371
|
+
{
|
|
108372
|
+
type: valueVisible ? "text" : "password",
|
|
108373
|
+
value: value2,
|
|
108374
|
+
onChange: (e2) => updateEnvValue(key, e2.target.value),
|
|
108375
|
+
className: isEmptyValue ? `${styles$x.input} ${styles$x.inputWarning}` : styles$x.input,
|
|
108376
|
+
placeholder: ""
|
|
108377
|
+
}
|
|
108378
|
+
)
|
|
108379
|
+
] }),
|
|
108380
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$x.headerRowActions, children: [
|
|
108381
|
+
isSecret && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
108382
|
+
Button,
|
|
108383
|
+
{
|
|
108384
|
+
variant: "ghost",
|
|
108385
|
+
size: "sm",
|
|
108386
|
+
onClick: () => toggleEnvVisibility(key),
|
|
108387
|
+
children: [
|
|
108388
|
+
valueVisible ? /* @__PURE__ */ jsxRuntimeExports.jsx(EyeOff, { size: 14 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Eye, { size: 14 }),
|
|
108389
|
+
valueVisible ? t2("settings.mcp.headerHide") : t2("settings.mcp.headerShow")
|
|
108390
|
+
]
|
|
108391
|
+
}
|
|
108392
|
+
),
|
|
108393
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
108394
|
+
Button,
|
|
108395
|
+
{
|
|
108396
|
+
variant: "danger",
|
|
108397
|
+
size: "sm",
|
|
108398
|
+
onClick: () => removeEnvVar(key),
|
|
108399
|
+
children: [
|
|
108400
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { size: 14 }),
|
|
108401
|
+
t2("settings.mcp.delete")
|
|
108402
|
+
]
|
|
108403
|
+
}
|
|
108404
|
+
)
|
|
108405
|
+
] }),
|
|
108406
|
+
(isDuplicate || isInvalidKey) && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$x.fieldHint, children: isDuplicate ? t2("settings.mcp.envDuplicateKey") : t2("settings.mcp.envInvalidKey") })
|
|
108407
|
+
] }, key);
|
|
108408
|
+
}) })
|
|
108409
|
+
] })
|
|
107764
108410
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FormField, { label: t2("settings.mcp.url"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
107765
108411
|
"input",
|
|
107766
108412
|
{
|
|
@@ -120371,12 +121017,12 @@ function FrequentPhrasesCard({ range }) {
|
|
|
120371
121017
|
] }, phrase.content)) })
|
|
120372
121018
|
] });
|
|
120373
121019
|
}
|
|
120374
|
-
const backdrop = "
|
|
120375
|
-
const modal = "
|
|
120376
|
-
const header$4 = "
|
|
120377
|
-
const title$5 = "
|
|
120378
|
-
const body$2 = "
|
|
120379
|
-
const panelContainer = "
|
|
121020
|
+
const backdrop = "_backdrop_kzv99_3";
|
|
121021
|
+
const modal = "_modal_kzv99_7";
|
|
121022
|
+
const header$4 = "_header_kzv99_15";
|
|
121023
|
+
const title$5 = "_title_kzv99_24";
|
|
121024
|
+
const body$2 = "_body_kzv99_31";
|
|
121025
|
+
const panelContainer = "_panelContainer_kzv99_37";
|
|
120380
121026
|
const styles$c = {
|
|
120381
121027
|
backdrop,
|
|
120382
121028
|
modal,
|
|
@@ -122897,7 +123543,9 @@ function ChatBox({
|
|
|
122897
123543
|
onScrollToMessageTargetConsumed,
|
|
122898
123544
|
onToggleSidebar,
|
|
122899
123545
|
isSidebarOpen,
|
|
122900
|
-
onConversationChange
|
|
123546
|
+
onConversationChange,
|
|
123547
|
+
isSessionSwitchPending,
|
|
123548
|
+
onSessionSwitchSettled
|
|
122901
123549
|
}) {
|
|
122902
123550
|
const { t: t2 } = useTranslation();
|
|
122903
123551
|
const agents = useAgentStore((s16) => s16.agents);
|
|
@@ -122912,9 +123560,18 @@ function ChatBox({
|
|
|
122912
123560
|
const setActiveTerminal = usePtySessionStore((s16) => s16.setActiveTerminal);
|
|
122913
123561
|
const setTerminalVisible = usePtySessionStore((s16) => s16.setTerminalVisible);
|
|
122914
123562
|
const [ptyTerminalEnabled, setPtyTerminalEnabled] = reactExports.useState(false);
|
|
123563
|
+
const isMobileTerminalLayout = useMediaQuery(`(max-width: ${CHAT_LAYOUT_BREAKPOINT}px)`);
|
|
123564
|
+
const showTerminal = ptyTerminalEnabled && isPtyPanelVisible;
|
|
123565
|
+
const showMobileTerminalDialog = showTerminal && isMobileTerminalLayout;
|
|
122915
123566
|
const handleCloseTerminal = reactExports.useCallback(() => {
|
|
122916
123567
|
setTerminalVisible(sessionId, false);
|
|
122917
123568
|
}, [sessionId, setTerminalVisible]);
|
|
123569
|
+
useBackDismiss({
|
|
123570
|
+
id: `mobile-terminal:${sessionId}`,
|
|
123571
|
+
open: showMobileTerminalDialog,
|
|
123572
|
+
priority: BACK_DISMISS_PRIORITY.modal,
|
|
123573
|
+
onClose: handleCloseTerminal
|
|
123574
|
+
});
|
|
122918
123575
|
reactExports.useCallback(() => {
|
|
122919
123576
|
setTerminalVisible(sessionId, true);
|
|
122920
123577
|
}, [sessionId, setTerminalVisible]);
|
|
@@ -122932,6 +123589,7 @@ function ChatBox({
|
|
|
122932
123589
|
[ptySessionsMap, sessionId]
|
|
122933
123590
|
);
|
|
122934
123591
|
reactExports.useEffect(() => {
|
|
123592
|
+
if (!ptyTerminalEnabled) return;
|
|
122935
123593
|
let cancelled = false;
|
|
122936
123594
|
const transport = getTransport();
|
|
122937
123595
|
if (typeof transport.ptyList !== "function") return;
|
|
@@ -122948,7 +123606,7 @@ function ChatBox({
|
|
|
122948
123606
|
return () => {
|
|
122949
123607
|
cancelled = true;
|
|
122950
123608
|
};
|
|
122951
|
-
}, [sessionId]);
|
|
123609
|
+
}, [sessionId, ptyTerminalEnabled]);
|
|
122952
123610
|
reactExports.useEffect(() => {
|
|
122953
123611
|
const api = window.__kai_transport__ ?? window.api;
|
|
122954
123612
|
if (typeof api?.getSettings === "function") {
|
|
@@ -123290,6 +123948,21 @@ function ChatBox({
|
|
|
123290
123948
|
void handleEditSuccess();
|
|
123291
123949
|
}, [handleEditSuccess]);
|
|
123292
123950
|
const notificationText = notification2;
|
|
123951
|
+
const terminalPanel = activePtyId ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
123952
|
+
TerminalPane,
|
|
123953
|
+
{
|
|
123954
|
+
ptyId: activePtyId,
|
|
123955
|
+
sessionId,
|
|
123956
|
+
sessions: ptyTerminalSessions,
|
|
123957
|
+
onClose: handleCloseTerminal
|
|
123958
|
+
}
|
|
123959
|
+
) : ptyTerminalEnabled ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
123960
|
+
TerminalEmptyState,
|
|
123961
|
+
{
|
|
123962
|
+
onCreate: handleCreateTerminal,
|
|
123963
|
+
onClose: handleCloseTerminal
|
|
123964
|
+
}
|
|
123965
|
+
) : null;
|
|
123293
123966
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
123294
123967
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$M.container, children: [
|
|
123295
123968
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChatNotification, { message: notificationText }),
|
|
@@ -123351,22 +124024,8 @@ function ChatBox({
|
|
|
123351
124024
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
123352
124025
|
SplitChatLayout,
|
|
123353
124026
|
{
|
|
123354
|
-
terminalVisible:
|
|
123355
|
-
terminal:
|
|
123356
|
-
TerminalPane,
|
|
123357
|
-
{
|
|
123358
|
-
ptyId: activePtyId,
|
|
123359
|
-
sessionId,
|
|
123360
|
-
sessions: ptyTerminalSessions,
|
|
123361
|
-
onClose: handleCloseTerminal
|
|
123362
|
-
}
|
|
123363
|
-
) : ptyTerminalEnabled ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
123364
|
-
TerminalEmptyState,
|
|
123365
|
-
{
|
|
123366
|
-
onCreate: handleCreateTerminal,
|
|
123367
|
-
onClose: handleCloseTerminal
|
|
123368
|
-
}
|
|
123369
|
-
) : null,
|
|
124027
|
+
terminalVisible: showTerminal && !isMobileTerminalLayout,
|
|
124028
|
+
terminal: terminalPanel,
|
|
123370
124029
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
123371
124030
|
MessageList,
|
|
123372
124031
|
{
|
|
@@ -123380,6 +124039,8 @@ function ChatBox({
|
|
|
123380
124039
|
onWriteMemory: handleTriggerMemoryUpdate,
|
|
123381
124040
|
onQuoteText: handleQuoteText,
|
|
123382
124041
|
maintenanceEvent,
|
|
124042
|
+
isSessionSwitchPending,
|
|
124043
|
+
onSessionSwitchSettled,
|
|
123383
124044
|
sessionInfo: sessionContext ? {
|
|
123384
124045
|
groupId: sessionContext.groupId,
|
|
123385
124046
|
sessionId: sessionContext.session.id,
|
|
@@ -123390,6 +124051,17 @@ function ChatBox({
|
|
|
123390
124051
|
)
|
|
123391
124052
|
}
|
|
123392
124053
|
),
|
|
124054
|
+
showMobileTerminalDialog && terminalPanel && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
124055
|
+
Dialog,
|
|
124056
|
+
{
|
|
124057
|
+
className: styles$M.mobileTerminalDialogOverlay,
|
|
124058
|
+
contentClassName: styles$M.mobileTerminalDialogBody,
|
|
124059
|
+
surfaceClassName: styles$M.mobileTerminalDialogSurface,
|
|
124060
|
+
surfaceProps: { "aria-label": t2("pty.mobileDialogTitle", "Terminal") },
|
|
124061
|
+
size: "xl",
|
|
124062
|
+
children: terminalPanel
|
|
124063
|
+
}
|
|
124064
|
+
),
|
|
123393
124065
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
123394
124066
|
ChatFooter,
|
|
123395
124067
|
{
|
|
@@ -124044,7 +124716,7 @@ function useSidebarSearch() {
|
|
|
124044
124716
|
searchInputRef
|
|
124045
124717
|
};
|
|
124046
124718
|
}
|
|
124047
|
-
const version = "1.11.
|
|
124719
|
+
const version = "1.11.14";
|
|
124048
124720
|
const pkg = {
|
|
124049
124721
|
version
|
|
124050
124722
|
};
|
|
@@ -125697,6 +126369,8 @@ function App() {
|
|
|
125697
126369
|
const { agents, loadAgents } = useAgentStore();
|
|
125698
126370
|
const activeSessionId = useConversationStore((s16) => s16.activeSessionId);
|
|
125699
126371
|
const setActiveSessionId = useConversationStore((s16) => s16.setActiveSessionId);
|
|
126372
|
+
const pendingSwitchSessionId = useConversationStore((s16) => s16.pendingSwitchSessionId);
|
|
126373
|
+
const clearPendingSwitchSessionId = useConversationStore((s16) => s16.clearPendingSwitchSessionId);
|
|
125700
126374
|
const agentConversations = useConversationStore((s16) => s16.agentConversations);
|
|
125701
126375
|
const loadConversations = useConversationStore((s16) => s16.loadConversations);
|
|
125702
126376
|
useConversationStore((s16) => s16.directSessionsByAgentId);
|
|
@@ -125886,7 +126560,19 @@ function App() {
|
|
|
125886
126560
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SavedMessagesView, {});
|
|
125887
126561
|
}
|
|
125888
126562
|
if (activeSessionId) {
|
|
125889
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
126563
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
126564
|
+
ChatBox,
|
|
126565
|
+
{
|
|
126566
|
+
sessionId: activeSessionId,
|
|
126567
|
+
scrollToMessageTarget: pendingScrollTarget,
|
|
126568
|
+
onScrollToMessageTargetConsumed: () => setPendingScrollTarget(null),
|
|
126569
|
+
onToggleSidebar,
|
|
126570
|
+
isSidebarOpen,
|
|
126571
|
+
onConversationChange: navigateToConversation,
|
|
126572
|
+
isSessionSwitchPending: pendingSwitchSessionId === activeSessionId,
|
|
126573
|
+
onSessionSwitchSettled: (settledSessionId) => clearPendingSwitchSessionId(settledSessionId)
|
|
126574
|
+
}
|
|
126575
|
+
);
|
|
125890
126576
|
}
|
|
125891
126577
|
if (!initialized) return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100vh", color: "#6b7280" }, children: "Loading…" });
|
|
125892
126578
|
if (showOnboarding) {
|