@sinm/kai 1.10.0-alpha → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/kai-cli.js +31875 -28231
- package/dist-electron/renderer/assets/{_baseUniq-TWYIHSYo.js → _baseUniq-BPxrppe8.js} +1 -1
- package/dist-electron/renderer/assets/_baseUniq-BPxrppe8.js.gz +0 -0
- package/dist-electron/renderer/assets/{arc-CC0XHE9s.js → arc-BWCOtJfo.js} +1 -1
- package/dist-electron/renderer/assets/arc-BWCOtJfo.js.gz +0 -0
- package/dist-electron/renderer/assets/{architectureDiagram-Q4EWVU46-Db99kceI.js → architectureDiagram-Q4EWVU46-B6aBoJIj.js} +5 -5
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-B6aBoJIj.js.gz +0 -0
- package/dist-electron/renderer/assets/{blockDiagram-DXYQGD6D-BiHxnzw6.js → blockDiagram-DXYQGD6D-CFxhVnTA.js} +6 -6
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-CFxhVnTA.js.gz +0 -0
- package/dist-electron/renderer/assets/{c4Diagram-AHTNJAMY-DXZwk3Wh.js → c4Diagram-AHTNJAMY-Dn3rtd9z.js} +2 -2
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-Dn3rtd9z.js.gz +0 -0
- package/dist-electron/renderer/assets/{channel-BfTEjFDO.js → channel-BL_zoh4z.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4BX2VUAB-BbzW3sxS.js → chunk-4BX2VUAB-9jWB_43i.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4TB4RGXK-Bp0IvYVD.js → chunk-4TB4RGXK-C9WmbeNG.js} +5 -5
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-C9WmbeNG.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-55IACEB6--tHMS1Fu.js → chunk-55IACEB6-BFkx3JHW.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-EDXVE4YY-C37AT76M.js → chunk-EDXVE4YY-BdzjVCjA.js} +1 -1
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-BdzjVCjA.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-FMBD7UC4-BmPFBz66.js → chunk-FMBD7UC4-CKn1sJZS.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-OYMX7WX6-BK02zRf3.js → chunk-OYMX7WX6-bt6YDeoM.js} +3 -3
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-bt6YDeoM.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-QZHKN3VN-DQblzVJ3.js → chunk-QZHKN3VN-DjhdiOVH.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-YZCP3GAM-BBLOUO8q.js → chunk-YZCP3GAM-BvsloRWu.js} +1 -1
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-BvsloRWu.js.gz +0 -0
- package/dist-electron/renderer/assets/{classDiagram-6PBFFD2Q-GoIp7NtF.js → classDiagram-6PBFFD2Q-rJLhrTTS.js} +6 -6
- package/dist-electron/renderer/assets/{classDiagram-v2-HSJHXN6E-GoIp7NtF.js → classDiagram-v2-HSJHXN6E-rJLhrTTS.js} +6 -6
- package/dist-electron/renderer/assets/{clone-DsJHPXSI.js → clone-D5j2JPeo.js} +1 -1
- package/dist-electron/renderer/assets/{cose-bilkent-S5V4N54A-Bx3Btq3m.js → cose-bilkent-S5V4N54A-BpNfMIZi.js} +1 -1
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-BpNfMIZi.js.gz +0 -0
- package/dist-electron/renderer/assets/{dagre-KV5264BT-UjO7D81D.js → dagre-KV5264BT-DvevUtVv.js} +6 -6
- package/dist-electron/renderer/assets/dagre-KV5264BT-DvevUtVv.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-5BDNPKRD-Qnftph66.js → diagram-5BDNPKRD-BEs1nVIP.js} +6 -6
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-BEs1nVIP.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-G4DWMVQ6-hAHLQAYy.js → diagram-G4DWMVQ6-Bab0VbSx.js} +6 -6
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-Bab0VbSx.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-MMDJMWI5-B3L74K7n.js → diagram-MMDJMWI5-CD02vhuR.js} +5 -5
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-CD02vhuR.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-TYMM5635-D-tCCI8y.js → diagram-TYMM5635-xAze9LR5.js} +5 -5
- package/dist-electron/renderer/assets/diagram-TYMM5635-xAze9LR5.js.gz +0 -0
- package/dist-electron/renderer/assets/{erDiagram-SMLLAGMA-BaVMPxLl.js → erDiagram-SMLLAGMA-B2HXqBYH.js} +4 -4
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-B2HXqBYH.js.gz +0 -0
- package/dist-electron/renderer/assets/{flowDiagram-DWJPFMVM-DZpn2G84.js → flowDiagram-DWJPFMVM-DZFPQcpb.js} +6 -6
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-DZFPQcpb.js.gz +0 -0
- package/dist-electron/renderer/assets/{ganttDiagram-T4ZO3ILL-BoSD-fWq.js → ganttDiagram-T4ZO3ILL-XX0OTBm4.js} +2 -2
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-XX0OTBm4.js.gz +0 -0
- package/dist-electron/renderer/assets/{gitGraphDiagram-UUTBAWPF-Bsenwzpz.js → gitGraphDiagram-UUTBAWPF-CHoEzYqD.js} +6 -6
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-CHoEzYqD.js.gz +0 -0
- package/dist-electron/renderer/assets/{graph-CAbnGHSS.js → graph-t72OS6pZ.js} +2 -2
- package/dist-electron/renderer/assets/graph-t72OS6pZ.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-CmcRKBhc.css → index-Hd87F96i.css} +854 -417
- package/dist-electron/renderer/assets/index-Hd87F96i.css.gz +0 -0
- package/dist-electron/renderer/assets/{index-3-RVvi2_.js → index-x4Eegt5G.js} +1136 -651
- package/dist-electron/renderer/assets/index-x4Eegt5G.js.gz +0 -0
- package/dist-electron/renderer/assets/{infoDiagram-42DDH7IO-Dv3v-UTu.js → infoDiagram-42DDH7IO-Cv20woCa.js} +4 -4
- package/dist-electron/renderer/assets/{ishikawaDiagram-UXIWVN3A-C0dzSTBj.js → ishikawaDiagram-UXIWVN3A-BG3mS91T.js} +1 -1
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-BG3mS91T.js.gz +0 -0
- package/dist-electron/renderer/assets/{journeyDiagram-VCZTEJTY-qIcnACCb.js → journeyDiagram-VCZTEJTY-D3ONtv9u.js} +4 -4
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-D3ONtv9u.js.gz +0 -0
- package/dist-electron/renderer/assets/{kanban-definition-6JOO6SKY-BE7SkXi1.js → kanban-definition-6JOO6SKY-BDJXuwNy.js} +2 -2
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-BDJXuwNy.js.gz +0 -0
- package/dist-electron/renderer/assets/{layout-B9EpUKCa.js → layout-Beu21ILX.js} +4 -4
- package/dist-electron/renderer/assets/layout-Beu21ILX.js.gz +0 -0
- package/dist-electron/renderer/assets/{linear-CCyL68xZ.js → linear-BxRcWGaU.js} +1 -1
- package/dist-electron/renderer/assets/linear-BxRcWGaU.js.gz +0 -0
- package/dist-electron/renderer/assets/{min-BYrYl2E1.js → min-J184ABTi.js} +2 -2
- package/dist-electron/renderer/assets/min-J184ABTi.js.gz +0 -0
- package/dist-electron/renderer/assets/{mindmap-definition-QFDTVHPH-CSoYt4jB.js → mindmap-definition-QFDTVHPH-a-qwDgLY.js} +3 -3
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-a-qwDgLY.js.gz +0 -0
- package/dist-electron/renderer/assets/{pieDiagram-DEJITSTG-DpGySR6o.js → pieDiagram-DEJITSTG-CohU6y2K.js} +6 -6
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-CohU6y2K.js.gz +0 -0
- package/dist-electron/renderer/assets/{quadrantDiagram-34T5L4WZ-63fCuOAt.js → quadrantDiagram-34T5L4WZ-D8iYiTzN.js} +2 -2
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-D8iYiTzN.js.gz +0 -0
- package/dist-electron/renderer/assets/{requirementDiagram-MS252O5E-BJPp47kS.js → requirementDiagram-MS252O5E-5S5xgn9_.js} +3 -3
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-5S5xgn9_.js.gz +0 -0
- package/dist-electron/renderer/assets/{sankeyDiagram-XADWPNL6-DTh3hGLh.js → sankeyDiagram-XADWPNL6-DUYAJ9k7.js} +1 -1
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-DUYAJ9k7.js.gz +0 -0
- package/dist-electron/renderer/assets/{sequenceDiagram-FGHM5R23-0cxZIN2-.js → sequenceDiagram-FGHM5R23-B7f6eT66.js} +3 -3
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-B7f6eT66.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-FHFEXIEX-kMxLUpUn.js → stateDiagram-FHFEXIEX-Cm4iQesY.js} +8 -8
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-Cm4iQesY.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-v2-QKLJ7IA2-BZxbk8dA.js → stateDiagram-v2-QKLJ7IA2-DdStGNJu.js} +4 -4
- package/dist-electron/renderer/assets/{timeline-definition-GMOUNBTQ-Br1nJvtz.js → timeline-definition-GMOUNBTQ-BA4cLDsg.js} +2 -2
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-BA4cLDsg.js.gz +0 -0
- package/dist-electron/renderer/assets/{vennDiagram-DHZGUBPP-DDvLCVqL.js → vennDiagram-DHZGUBPP-D0qEZKPk.js} +1 -1
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-D0qEZKPk.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardley-RL74JXVD-8Clcfhfi.js → wardley-RL74JXVD-GYpdfATp.js} +3 -3
- package/dist-electron/renderer/assets/wardley-RL74JXVD-GYpdfATp.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardleyDiagram-NUSXRM2D-8FAhGkRL.js → wardleyDiagram-NUSXRM2D-Br7mKnLr.js} +5 -5
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-Br7mKnLr.js.gz +0 -0
- package/dist-electron/renderer/assets/{xychartDiagram-5P7HB3ND-BowiCO1z.js → xychartDiagram-5P7HB3ND-D37yDEDj.js} +2 -2
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-D37yDEDj.js.gz +0 -0
- package/dist-electron/renderer/index.html +2 -2
- package/package.json +1 -1
- package/dist-electron/renderer/assets/_baseUniq-TWYIHSYo.js.gz +0 -0
- package/dist-electron/renderer/assets/arc-CC0XHE9s.js.gz +0 -0
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-Db99kceI.js.gz +0 -0
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-BiHxnzw6.js.gz +0 -0
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-DXZwk3Wh.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-Bp0IvYVD.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-C37AT76M.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-BK02zRf3.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-BBLOUO8q.js.gz +0 -0
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-Bx3Btq3m.js.gz +0 -0
- package/dist-electron/renderer/assets/dagre-KV5264BT-UjO7D81D.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-Qnftph66.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-hAHLQAYy.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-B3L74K7n.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-TYMM5635-D-tCCI8y.js.gz +0 -0
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-BaVMPxLl.js.gz +0 -0
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-DZpn2G84.js.gz +0 -0
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-BoSD-fWq.js.gz +0 -0
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-Bsenwzpz.js.gz +0 -0
- package/dist-electron/renderer/assets/graph-CAbnGHSS.js.gz +0 -0
- package/dist-electron/renderer/assets/index-3-RVvi2_.js.gz +0 -0
- package/dist-electron/renderer/assets/index-CmcRKBhc.css.gz +0 -0
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-C0dzSTBj.js.gz +0 -0
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-qIcnACCb.js.gz +0 -0
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-BE7SkXi1.js.gz +0 -0
- package/dist-electron/renderer/assets/layout-B9EpUKCa.js.gz +0 -0
- package/dist-electron/renderer/assets/linear-CCyL68xZ.js.gz +0 -0
- package/dist-electron/renderer/assets/min-BYrYl2E1.js.gz +0 -0
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-CSoYt4jB.js.gz +0 -0
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-DpGySR6o.js.gz +0 -0
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-63fCuOAt.js.gz +0 -0
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-BJPp47kS.js.gz +0 -0
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-DTh3hGLh.js.gz +0 -0
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-0cxZIN2-.js.gz +0 -0
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-kMxLUpUn.js.gz +0 -0
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-Br1nJvtz.js.gz +0 -0
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-DDvLCVqL.js.gz +0 -0
- package/dist-electron/renderer/assets/wardley-RL74JXVD-8Clcfhfi.js.gz +0 -0
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-8FAhGkRL.js.gz +0 -0
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-BowiCO1z.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-DvevUtVv.js","./graph-t72OS6pZ.js","./_baseUniq-BPxrppe8.js","./layout-Beu21ILX.js","./min-J184ABTi.js","./clone-D5j2JPeo.js","./cose-bilkent-S5V4N54A-BpNfMIZi.js","./cytoscape.esm-D6E6cAed.js","./c4Diagram-AHTNJAMY-Dn3rtd9z.js","./chunk-YZCP3GAM-BvsloRWu.js","./flowDiagram-DWJPFMVM-DZFPQcpb.js","./chunk-FMBD7UC4-CKn1sJZS.js","./chunk-55IACEB6-BFkx3JHW.js","./chunk-EDXVE4YY-BdzjVCjA.js","./channel-BL_zoh4z.js","./erDiagram-SMLLAGMA-B2HXqBYH.js","./gitGraphDiagram-UUTBAWPF-CHoEzYqD.js","./chunk-4BX2VUAB-9jWB_43i.js","./chunk-QZHKN3VN-DjhdiOVH.js","./wardley-RL74JXVD-GYpdfATp.js","./ganttDiagram-T4ZO3ILL-XX0OTBm4.js","./linear-BxRcWGaU.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-42DDH7IO-Cv20woCa.js","./pieDiagram-DEJITSTG-CohU6y2K.js","./arc-BWCOtJfo.js","./ordinal-CxptdPJm.js","./quadrantDiagram-34T5L4WZ-D8iYiTzN.js","./xychartDiagram-5P7HB3ND-D37yDEDj.js","./requirementDiagram-MS252O5E-5S5xgn9_.js","./sequenceDiagram-FGHM5R23-B7f6eT66.js","./classDiagram-6PBFFD2Q-rJLhrTTS.js","./chunk-4TB4RGXK-C9WmbeNG.js","./classDiagram-v2-HSJHXN6E-rJLhrTTS.js","./stateDiagram-FHFEXIEX-Cm4iQesY.js","./chunk-OYMX7WX6-bt6YDeoM.js","./stateDiagram-v2-QKLJ7IA2-DdStGNJu.js","./journeyDiagram-VCZTEJTY-D3ONtv9u.js","./timeline-definition-GMOUNBTQ-BA4cLDsg.js","./mindmap-definition-QFDTVHPH-a-qwDgLY.js","./kanban-definition-6JOO6SKY-BDJXuwNy.js","./sankeyDiagram-XADWPNL6-DUYAJ9k7.js","./diagram-TYMM5635-xAze9LR5.js","./diagram-MMDJMWI5-CD02vhuR.js","./blockDiagram-DXYQGD6D-CFxhVnTA.js","./diagram-5BDNPKRD-BEs1nVIP.js","./architectureDiagram-Q4EWVU46-B6aBoJIj.js","./diagram-G4DWMVQ6-Bab0VbSx.js","./wardleyDiagram-NUSXRM2D-Br7mKnLr.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function _mergeNamespaces(n2, m2) {
|
|
3
3
|
for (var i2 = 0; i2 < m2.length; i2++) {
|
|
4
4
|
const e2 = m2[i2];
|
|
@@ -16518,6 +16518,7 @@ const IPC_DELETE_DIRECT_SESSION = "DELETE_DIRECT_SESSION";
|
|
|
16518
16518
|
const IPC_ARCHIVE_DIRECT_SESSION = "ARCHIVE_DIRECT_SESSION";
|
|
16519
16519
|
const IPC_CREATE_GROUP = "CREATE_GROUP";
|
|
16520
16520
|
const IPC_GET_GROUP = "GET_GROUP";
|
|
16521
|
+
const IPC_LIST_GROUPS = "LIST_GROUPS";
|
|
16521
16522
|
const IPC_UPDATE_GROUP = "UPDATE_GROUP";
|
|
16522
16523
|
const IPC_DELETE_GROUP = "DELETE_GROUP";
|
|
16523
16524
|
const IPC_REMOVE_GROUP_AVATAR = "REMOVE_GROUP_AVATAR";
|
|
@@ -16591,6 +16592,12 @@ const IPC_TELEMETRY_FEEDBACK = "TELEMETRY_FEEDBACK";
|
|
|
16591
16592
|
const IPC_TELEMETRY_SET_ENABLED = "TELEMETRY_SET_ENABLED";
|
|
16592
16593
|
const IPC_TELEMETRY_IS_ENABLED = "TELEMETRY_IS_ENABLED";
|
|
16593
16594
|
const log$v = createLogger("http-transport");
|
|
16595
|
+
const INITIAL_RECONNECT_DELAY_MS = 1e3;
|
|
16596
|
+
const MAX_RECONNECT_DELAY_MS = 1e4;
|
|
16597
|
+
const RECONNECT_JITTER_MS = 300;
|
|
16598
|
+
const WS_CLOSE_UNAUTHORIZED = 1008;
|
|
16599
|
+
const WS_CLOSE_TRY_AGAIN_LATER = 1013;
|
|
16600
|
+
const DEFAULT_WS_CLOSE_CODE = 1006;
|
|
16594
16601
|
function createUnsupportedError(api) {
|
|
16595
16602
|
return new Error(`${api} is not available in browser mode`);
|
|
16596
16603
|
}
|
|
@@ -16611,10 +16618,11 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16611
16618
|
const memoryUpdateListeners = /* @__PURE__ */ new Set();
|
|
16612
16619
|
const reconnectListeners = /* @__PURE__ */ new Set();
|
|
16613
16620
|
const memoryProgressCache = new MemoryProgressCache();
|
|
16614
|
-
let reconnectDelay =
|
|
16621
|
+
let reconnectDelay = INITIAL_RECONNECT_DELAY_MS;
|
|
16615
16622
|
let reconnectTimer = null;
|
|
16616
16623
|
let ws = null;
|
|
16617
16624
|
let closed = false;
|
|
16625
|
+
let reconnectDisabled = false;
|
|
16618
16626
|
let isFirstConnect = true;
|
|
16619
16627
|
async function rpc(channel2, ...args) {
|
|
16620
16628
|
const response = await fetch(`${baseUrl}/api/rpc/${encodeURIComponent(channel2)}`, {
|
|
@@ -16649,12 +16657,13 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16649
16657
|
return result.data;
|
|
16650
16658
|
}
|
|
16651
16659
|
function scheduleReconnect() {
|
|
16652
|
-
if (closed || reconnectTimer !== null) return;
|
|
16660
|
+
if (closed || reconnectDisabled || reconnectTimer !== null) return;
|
|
16661
|
+
const delay = reconnectDelay + Math.floor(Math.random() * RECONNECT_JITTER_MS);
|
|
16653
16662
|
reconnectTimer = window.setTimeout(() => {
|
|
16654
16663
|
reconnectTimer = null;
|
|
16655
16664
|
connectEvents();
|
|
16656
|
-
},
|
|
16657
|
-
reconnectDelay = Math.min(reconnectDelay * 2,
|
|
16665
|
+
}, delay);
|
|
16666
|
+
reconnectDelay = Math.min(reconnectDelay * 2, MAX_RECONNECT_DELAY_MS);
|
|
16658
16667
|
}
|
|
16659
16668
|
function handleEvent(channel2, data) {
|
|
16660
16669
|
switch (channel2) {
|
|
@@ -16676,13 +16685,15 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16676
16685
|
}
|
|
16677
16686
|
}
|
|
16678
16687
|
function connectEvents() {
|
|
16679
|
-
if (closed) return;
|
|
16688
|
+
if (closed || reconnectDisabled) return;
|
|
16680
16689
|
const wsProtocol = baseUrl.startsWith("https://") ? "wss://" : "ws://";
|
|
16681
16690
|
const wsBase = baseUrl.replace(/^https?:\/\//, wsProtocol);
|
|
16682
|
-
|
|
16683
|
-
ws
|
|
16691
|
+
const socket = new WebSocket(`${wsBase}/api/events?token=${encodeURIComponent(token2)}`);
|
|
16692
|
+
ws = socket;
|
|
16693
|
+
socket.onopen = () => {
|
|
16694
|
+
if (ws !== socket || closed) return;
|
|
16684
16695
|
meta2.connected = true;
|
|
16685
|
-
reconnectDelay =
|
|
16696
|
+
reconnectDelay = INITIAL_RECONNECT_DELAY_MS;
|
|
16686
16697
|
if (!isFirstConnect) {
|
|
16687
16698
|
reconnectListeners.forEach((fn) => {
|
|
16688
16699
|
try {
|
|
@@ -16693,7 +16704,8 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16693
16704
|
}
|
|
16694
16705
|
isFirstConnect = false;
|
|
16695
16706
|
};
|
|
16696
|
-
|
|
16707
|
+
socket.onmessage = (event) => {
|
|
16708
|
+
if (ws !== socket || closed) return;
|
|
16697
16709
|
let payload;
|
|
16698
16710
|
try {
|
|
16699
16711
|
payload = JSON.parse(event.data);
|
|
@@ -16710,13 +16722,23 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16710
16722
|
payload.data
|
|
16711
16723
|
);
|
|
16712
16724
|
};
|
|
16713
|
-
|
|
16725
|
+
socket.onclose = (event) => {
|
|
16726
|
+
if (ws !== socket) return;
|
|
16727
|
+
const closeCode = event?.code ?? DEFAULT_WS_CLOSE_CODE;
|
|
16714
16728
|
meta2.connected = false;
|
|
16715
16729
|
ws = null;
|
|
16730
|
+
if (closeCode === WS_CLOSE_UNAUTHORIZED) {
|
|
16731
|
+
reconnectDisabled = true;
|
|
16732
|
+
log$v.error("websocket closed by server due to unauthorized token");
|
|
16733
|
+
return;
|
|
16734
|
+
}
|
|
16735
|
+
if (closeCode === WS_CLOSE_TRY_AGAIN_LATER) {
|
|
16736
|
+
reconnectDelay = Math.max(reconnectDelay, MAX_RECONNECT_DELAY_MS);
|
|
16737
|
+
}
|
|
16716
16738
|
scheduleReconnect();
|
|
16717
16739
|
};
|
|
16718
|
-
|
|
16719
|
-
|
|
16740
|
+
socket.onerror = () => {
|
|
16741
|
+
socket.close();
|
|
16720
16742
|
};
|
|
16721
16743
|
}
|
|
16722
16744
|
connectEvents();
|
|
@@ -16725,6 +16747,7 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16725
16747
|
close: () => {
|
|
16726
16748
|
if (closed) return;
|
|
16727
16749
|
closed = true;
|
|
16750
|
+
reconnectDisabled = true;
|
|
16728
16751
|
meta2.connected = false;
|
|
16729
16752
|
if (reconnectTimer !== null) {
|
|
16730
16753
|
clearTimeout(reconnectTimer);
|
|
@@ -16784,6 +16807,7 @@ function createHttpTransport(baseUrl, token2) {
|
|
|
16784
16807
|
getMessage: (messageId) => rpc(IPC_GET_MESSAGE, messageId),
|
|
16785
16808
|
createGroup: (name2, speakerId, memberIds, config2, avatar2) => rpc(IPC_CREATE_GROUP, name2, speakerId, memberIds, config2, avatar2),
|
|
16786
16809
|
getGroup: (id32) => rpc(IPC_GET_GROUP, id32),
|
|
16810
|
+
listGroups: () => rpc(IPC_LIST_GROUPS),
|
|
16787
16811
|
updateGroup: (id32, updates) => rpc(IPC_UPDATE_GROUP, id32, updates),
|
|
16788
16812
|
deleteGroup: (id32) => rpc(IPC_DELETE_GROUP, id32),
|
|
16789
16813
|
setGroupAvatar: (groupId, payload) => uploadBinary(`/api/avatar/group/${encodeURIComponent(groupId)}`, payload),
|
|
@@ -17687,6 +17711,7 @@ function cleanupLRUCache(state2, newLRU) {
|
|
|
17687
17711
|
const newActiveRunIdMap = new Map(state2.activeRunIdMap);
|
|
17688
17712
|
const newRetryingMap = new Map(state2.retryingMap);
|
|
17689
17713
|
const newCompletedMap = new Map(state2.completedMap);
|
|
17714
|
+
const newRunMetricsMap = new Map(state2.runMetricsMap);
|
|
17690
17715
|
for (const id32 of toRemove) {
|
|
17691
17716
|
newMessagesMap.delete(id32);
|
|
17692
17717
|
newLastEventSeqMap.delete(id32);
|
|
@@ -17700,6 +17725,7 @@ function cleanupLRUCache(state2, newLRU) {
|
|
|
17700
17725
|
newActiveRunIdMap.delete(id32);
|
|
17701
17726
|
newRetryingMap.delete(id32);
|
|
17702
17727
|
newCompletedMap.delete(id32);
|
|
17728
|
+
newRunMetricsMap.delete(id32);
|
|
17703
17729
|
}
|
|
17704
17730
|
return {
|
|
17705
17731
|
messagesMap: newMessagesMap,
|
|
@@ -17714,6 +17740,7 @@ function cleanupLRUCache(state2, newLRU) {
|
|
|
17714
17740
|
activeRunIdMap: newActiveRunIdMap,
|
|
17715
17741
|
retryingMap: newRetryingMap,
|
|
17716
17742
|
completedMap: newCompletedMap,
|
|
17743
|
+
runMetricsMap: newRunMetricsMap,
|
|
17717
17744
|
conversationLRU: newLRU
|
|
17718
17745
|
};
|
|
17719
17746
|
}
|
|
@@ -17748,9 +17775,9 @@ function projectEvents(events, state2) {
|
|
|
17748
17775
|
function projectSingleEvent(event, messagesMap, state2) {
|
|
17749
17776
|
switch (event.type) {
|
|
17750
17777
|
case "snapshot":
|
|
17751
|
-
return projectSnapshot(event, messagesMap);
|
|
17778
|
+
return projectSnapshot(event, messagesMap, state2);
|
|
17752
17779
|
case "message.accepted":
|
|
17753
|
-
return projectMessageAccepted(event, messagesMap);
|
|
17780
|
+
return projectMessageAccepted(event, messagesMap, state2);
|
|
17754
17781
|
case "run.started":
|
|
17755
17782
|
return projectRunStarted(event, messagesMap);
|
|
17756
17783
|
case "run.progress":
|
|
@@ -17769,6 +17796,10 @@ function projectSingleEvent(event, messagesMap, state2) {
|
|
|
17769
17796
|
return projectRunTerminal(event, messagesMap, state2);
|
|
17770
17797
|
case "queue.updated":
|
|
17771
17798
|
return projectQueueUpdated(event, state2);
|
|
17799
|
+
case "context.compaction":
|
|
17800
|
+
return projectContextCompaction(event, state2);
|
|
17801
|
+
case "context.status":
|
|
17802
|
+
return projectContextStatus(event, state2);
|
|
17772
17803
|
case "messages.revoked":
|
|
17773
17804
|
return projectMessagesRevoked(event, messagesMap);
|
|
17774
17805
|
default: {
|
|
@@ -17778,10 +17809,18 @@ function projectSingleEvent(event, messagesMap, state2) {
|
|
|
17778
17809
|
}
|
|
17779
17810
|
}
|
|
17780
17811
|
}
|
|
17781
|
-
function projectSnapshot(event, messagesMap) {
|
|
17812
|
+
function projectSnapshot(event, messagesMap, state2) {
|
|
17782
17813
|
const cid = event.sessionId;
|
|
17783
17814
|
const current = messagesMap.get(cid) ?? /* @__PURE__ */ new Map();
|
|
17784
17815
|
const msgMap = mergeMessageMaps(current, event.messages);
|
|
17816
|
+
const activeRunId = event.queue.activeRunId;
|
|
17817
|
+
const existingMetrics = state2.runMetricsMap.get(cid);
|
|
17818
|
+
const runMetricsMap = /* @__PURE__ */ new Map();
|
|
17819
|
+
if (activeRunId) {
|
|
17820
|
+
runMetricsMap.set(cid, existingMetrics ?? { startedAt: Date.now() });
|
|
17821
|
+
} else if (existingMetrics) {
|
|
17822
|
+
runMetricsMap.set(cid, void 0);
|
|
17823
|
+
}
|
|
17785
17824
|
return {
|
|
17786
17825
|
messagesMap: /* @__PURE__ */ new Map([[cid, msgMap]]),
|
|
17787
17826
|
conversationMap: /* @__PURE__ */ new Map([[cid, event.conversation]]),
|
|
@@ -17792,15 +17831,23 @@ function projectSnapshot(event, messagesMap) {
|
|
|
17792
17831
|
hasMoreMap: /* @__PURE__ */ new Map([[cid, event.hasMore]]),
|
|
17793
17832
|
activeRunIdMap: /* @__PURE__ */ new Map([[cid, event.queue.activeRunId]]),
|
|
17794
17833
|
retryingMap: /* @__PURE__ */ new Map([[cid, null]]),
|
|
17795
|
-
|
|
17796
|
-
runMetricsMap: /* @__PURE__ */ new Map()
|
|
17834
|
+
runMetricsMap
|
|
17797
17835
|
};
|
|
17798
17836
|
}
|
|
17799
|
-
function projectMessageAccepted(event, messagesMap) {
|
|
17837
|
+
function projectMessageAccepted(event, messagesMap, state2) {
|
|
17800
17838
|
const cid = event.sessionId;
|
|
17801
17839
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
17802
17840
|
current.set(event.message.id, event.message);
|
|
17803
|
-
|
|
17841
|
+
if (!event.message.isContextMarker) {
|
|
17842
|
+
return { messagesMap: /* @__PURE__ */ new Map([[cid, current]]) };
|
|
17843
|
+
}
|
|
17844
|
+
const existing = state2.contextCompactionMap.get(cid) ?? { totalCompactions: 0 };
|
|
17845
|
+
return {
|
|
17846
|
+
messagesMap: /* @__PURE__ */ new Map([[cid, current]]),
|
|
17847
|
+
contextCompactionMap: /* @__PURE__ */ new Map([[cid, {
|
|
17848
|
+
totalCompactions: existing.totalCompactions
|
|
17849
|
+
}]])
|
|
17850
|
+
};
|
|
17804
17851
|
}
|
|
17805
17852
|
function projectRunStarted(event, messagesMap) {
|
|
17806
17853
|
const cid = event.sessionId;
|
|
@@ -17830,8 +17877,7 @@ function projectRunStarted(event, messagesMap) {
|
|
|
17830
17877
|
}
|
|
17831
17878
|
function projectRunProgress(event, state2) {
|
|
17832
17879
|
const cid = event.sessionId;
|
|
17833
|
-
const existing = state2.runMetricsMap.get(cid);
|
|
17834
|
-
if (!existing) return null;
|
|
17880
|
+
const existing = state2.runMetricsMap.get(cid) ?? { startedAt: Date.now() };
|
|
17835
17881
|
const updated = {
|
|
17836
17882
|
...existing,
|
|
17837
17883
|
...event.model !== void 0 ? { model: event.model } : {},
|
|
@@ -17843,6 +17889,41 @@ function projectRunProgress(event, state2) {
|
|
|
17843
17889
|
newMap.set(cid, updated);
|
|
17844
17890
|
return { runMetricsMap: newMap };
|
|
17845
17891
|
}
|
|
17892
|
+
function projectContextCompaction(event, state2) {
|
|
17893
|
+
const cid = event.sessionId;
|
|
17894
|
+
const existing = state2.contextCompactionMap.get(cid) ?? { totalCompactions: 0 };
|
|
17895
|
+
const totalCompactions = event.phase === "completed" ? existing.totalCompactions + 1 : existing.totalCompactions;
|
|
17896
|
+
return {
|
|
17897
|
+
contextCompactionMap: /* @__PURE__ */ new Map([[cid, {
|
|
17898
|
+
totalCompactions,
|
|
17899
|
+
lastCompaction: {
|
|
17900
|
+
phase: event.phase,
|
|
17901
|
+
reason: event.reason,
|
|
17902
|
+
targetTokenLimit: event.targetTokenLimit,
|
|
17903
|
+
...event.triggerTokens !== void 0 ? { triggerTokens: event.triggerTokens } : {},
|
|
17904
|
+
beforeMessageCount: event.beforeMessageCount,
|
|
17905
|
+
...event.durableBeforeTokens !== void 0 ? { durableBeforeTokens: event.durableBeforeTokens } : {},
|
|
17906
|
+
...event.afterMessageCount !== void 0 ? { afterMessageCount: event.afterMessageCount } : {},
|
|
17907
|
+
...event.durableAfterTokens !== void 0 ? { durableAfterTokens: event.durableAfterTokens } : {},
|
|
17908
|
+
...event.durationMs !== void 0 ? { durationMs: event.durationMs } : {},
|
|
17909
|
+
...event.error?.message ? { errorMessage: event.error.message } : {},
|
|
17910
|
+
at: Date.now()
|
|
17911
|
+
}
|
|
17912
|
+
}]])
|
|
17913
|
+
};
|
|
17914
|
+
}
|
|
17915
|
+
function projectContextStatus(event, state2) {
|
|
17916
|
+
const cid = event.sessionId;
|
|
17917
|
+
const existing = state2.contextCompactionMap.get(cid) ?? { totalCompactions: 0 };
|
|
17918
|
+
return {
|
|
17919
|
+
contextCompactionMap: /* @__PURE__ */ new Map([[cid, {
|
|
17920
|
+
...existing,
|
|
17921
|
+
currentPreparedTokens: event.preparedTokens,
|
|
17922
|
+
inputTokenLimit: event.inputTokenLimit,
|
|
17923
|
+
thresholdRatio: event.thresholdRatio
|
|
17924
|
+
}]])
|
|
17925
|
+
};
|
|
17926
|
+
}
|
|
17846
17927
|
function projectBlockUpdated(event, messagesMap, state2) {
|
|
17847
17928
|
const cid = event.sessionId;
|
|
17848
17929
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
@@ -18010,6 +18091,7 @@ function patchState(state2, patch2) {
|
|
|
18010
18091
|
}
|
|
18011
18092
|
const simpleKeys = [
|
|
18012
18093
|
"messagesMap",
|
|
18094
|
+
"contextCompactionMap",
|
|
18013
18095
|
"activeRunIdMap",
|
|
18014
18096
|
"retryingMap",
|
|
18015
18097
|
"sendingMap",
|
|
@@ -18059,6 +18141,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18059
18141
|
completedMap: /* @__PURE__ */ new Map(),
|
|
18060
18142
|
conversationLRU: [],
|
|
18061
18143
|
runMetricsMap: /* @__PURE__ */ new Map(),
|
|
18144
|
+
contextCompactionMap: /* @__PURE__ */ new Map(),
|
|
18062
18145
|
messageUiStateMap: /* @__PURE__ */ new Map(),
|
|
18063
18146
|
streamRevisionMap: /* @__PURE__ */ new Map(),
|
|
18064
18147
|
pendingUserMsgMap: /* @__PURE__ */ new Map(),
|
|
@@ -18073,6 +18156,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18073
18156
|
getMemberAgentIds: (cid) => get2().memberAgentIdsMap.get(cid) ?? [],
|
|
18074
18157
|
getActiveRunId: (cid) => get2().activeRunIdMap.get(cid),
|
|
18075
18158
|
getRetrying: (cid) => get2().retryingMap.get(cid) ?? null,
|
|
18159
|
+
getContextCompaction: (cid) => get2().contextCompactionMap.get(cid),
|
|
18076
18160
|
getPhase: (cid) => {
|
|
18077
18161
|
const state2 = get2();
|
|
18078
18162
|
if (state2.loadingMap.get(cid)) return "loading";
|
|
@@ -18162,12 +18246,14 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18162
18246
|
const nextMemberAgentIdsMap = setArrayMapValueIfChanged(state2.memberAgentIdsMap, sessionId, memberIds);
|
|
18163
18247
|
const nextLoadingMap = setMapValueIfChanged(state2.loadingMap, sessionId, false);
|
|
18164
18248
|
const nextConversationLRU = cleanup.conversationLRU ?? newLRU;
|
|
18249
|
+
const nextRunMetricsMap = cleanup.runMetricsMap ?? state2.runMetricsMap;
|
|
18165
18250
|
return {
|
|
18166
18251
|
messagesMap: nextMessagesMap,
|
|
18167
18252
|
hasMoreMap: nextHasMoreMap,
|
|
18168
18253
|
conversationMap: nextConversationMap,
|
|
18169
18254
|
memberAgentIdsMap: nextMemberAgentIdsMap,
|
|
18170
18255
|
loadingMap: nextLoadingMap,
|
|
18256
|
+
runMetricsMap: nextRunMetricsMap,
|
|
18171
18257
|
conversationLRU: nextConversationLRU
|
|
18172
18258
|
};
|
|
18173
18259
|
});
|
|
@@ -18450,6 +18536,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18450
18536
|
retryingMap: clearMap(state2.retryingMap),
|
|
18451
18537
|
completedMap: clearMap(state2.completedMap),
|
|
18452
18538
|
runMetricsMap: clearMap(state2.runMetricsMap),
|
|
18539
|
+
contextCompactionMap: clearMap(state2.contextCompactionMap),
|
|
18453
18540
|
messageUiStateMap: clearMap(state2.messageUiStateMap),
|
|
18454
18541
|
streamRevisionMap: clearMap(state2.streamRevisionMap),
|
|
18455
18542
|
pendingUserMsgMap: clearMap(state2.pendingUserMsgMap),
|
|
@@ -18556,6 +18643,9 @@ function mergeProjectionUpdate(state2, result) {
|
|
|
18556
18643
|
});
|
|
18557
18644
|
merged.runMetricsMap = newMap;
|
|
18558
18645
|
}
|
|
18646
|
+
if (result.contextCompactionMap) {
|
|
18647
|
+
merged.contextCompactionMap = mergeMap(state2.contextCompactionMap, result.contextCompactionMap);
|
|
18648
|
+
}
|
|
18559
18649
|
if (result.messagesMap) {
|
|
18560
18650
|
merged.messagesMap = mergeMap(state2.messagesMap, result.messagesMap);
|
|
18561
18651
|
}
|
|
@@ -19100,14 +19190,14 @@ const confirmDialog = "_confirmDialog_s5v85_18";
|
|
|
19100
19190
|
const confirmTitle = "_confirmTitle_s5v85_28";
|
|
19101
19191
|
const confirmMessage = "_confirmMessage_s5v85_35";
|
|
19102
19192
|
const confirmActions = "_confirmActions_s5v85_42";
|
|
19103
|
-
const spin$
|
|
19193
|
+
const spin$4 = "_spin_s5v85_52";
|
|
19104
19194
|
const styles$1c = {
|
|
19105
19195
|
confirmOverlay,
|
|
19106
19196
|
confirmDialog,
|
|
19107
19197
|
confirmTitle,
|
|
19108
19198
|
confirmMessage,
|
|
19109
19199
|
confirmActions,
|
|
19110
|
-
spin: spin$
|
|
19200
|
+
spin: spin$4
|
|
19111
19201
|
};
|
|
19112
19202
|
function ConfirmDialog({
|
|
19113
19203
|
title: title2,
|
|
@@ -65068,12 +65158,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
65068
65158
|
registerLayoutLoaders([
|
|
65069
65159
|
{
|
|
65070
65160
|
name: "dagre",
|
|
65071
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-
|
|
65161
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-DvevUtVv.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
|
|
65072
65162
|
},
|
|
65073
65163
|
...[
|
|
65074
65164
|
{
|
|
65075
65165
|
name: "cose-bilkent",
|
|
65076
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-
|
|
65166
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-BpNfMIZi.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
|
|
65077
65167
|
}
|
|
65078
65168
|
]
|
|
65079
65169
|
]);
|
|
@@ -65529,7 +65619,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
65529
65619
|
}, "detector");
|
|
65530
65620
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
65531
65621
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65532
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-
|
|
65622
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-Dn3rtd9z.js");
|
|
65533
65623
|
return { diagram: diagram22 };
|
|
65534
65624
|
}, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
|
|
65535
65625
|
return { id, diagram: diagram2 };
|
|
@@ -65549,7 +65639,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65549
65639
|
}, "detector");
|
|
65550
65640
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
65551
65641
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65552
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65642
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-DZFPQcpb.js");
|
|
65553
65643
|
return { diagram: diagram22 };
|
|
65554
65644
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65555
65645
|
return { id: id2, diagram: diagram2 };
|
|
@@ -65575,7 +65665,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65575
65665
|
}, "detector");
|
|
65576
65666
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
65577
65667
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65578
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65668
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-DZFPQcpb.js");
|
|
65579
65669
|
return { diagram: diagram22 };
|
|
65580
65670
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65581
65671
|
return { id: id3, diagram: diagram2 };
|
|
@@ -65592,7 +65682,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
65592
65682
|
}, "detector");
|
|
65593
65683
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
65594
65684
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65595
|
-
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-
|
|
65685
|
+
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-B2HXqBYH.js");
|
|
65596
65686
|
return { diagram: diagram22 };
|
|
65597
65687
|
}, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
|
|
65598
65688
|
return { id: id4, diagram: diagram2 };
|
|
@@ -65609,7 +65699,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
65609
65699
|
}, "detector");
|
|
65610
65700
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
65611
65701
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65612
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-
|
|
65702
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-CHoEzYqD.js");
|
|
65613
65703
|
return { diagram: diagram22 };
|
|
65614
65704
|
}, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
|
|
65615
65705
|
return { id: id5, diagram: diagram2 };
|
|
@@ -65626,7 +65716,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
65626
65716
|
}, "detector");
|
|
65627
65717
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
65628
65718
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65629
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-
|
|
65719
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-XX0OTBm4.js");
|
|
65630
65720
|
return { diagram: diagram22 };
|
|
65631
65721
|
}, true ? __vite__mapDeps([20,21,22,23]) : void 0, import.meta.url);
|
|
65632
65722
|
return { id: id6, diagram: diagram2 };
|
|
@@ -65643,7 +65733,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
65643
65733
|
}, "detector");
|
|
65644
65734
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
65645
65735
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65646
|
-
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-
|
|
65736
|
+
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-Cv20woCa.js");
|
|
65647
65737
|
return { diagram: diagram22 };
|
|
65648
65738
|
}, true ? __vite__mapDeps([24,19,4,2]) : void 0, import.meta.url);
|
|
65649
65739
|
return { id: id7, diagram: diagram2 };
|
|
@@ -65659,7 +65749,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
65659
65749
|
}, "detector");
|
|
65660
65750
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
65661
65751
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65662
|
-
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-
|
|
65752
|
+
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-CohU6y2K.js");
|
|
65663
65753
|
return { diagram: diagram22 };
|
|
65664
65754
|
}, true ? __vite__mapDeps([25,17,19,4,2,26,27,22]) : void 0, import.meta.url);
|
|
65665
65755
|
return { id: id8, diagram: diagram2 };
|
|
@@ -65675,7 +65765,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
65675
65765
|
}, "detector");
|
|
65676
65766
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
65677
65767
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65678
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-
|
|
65768
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-D8iYiTzN.js");
|
|
65679
65769
|
return { diagram: diagram22 };
|
|
65680
65770
|
}, true ? __vite__mapDeps([28,21,22,23]) : void 0, import.meta.url);
|
|
65681
65771
|
return { id: id9, diagram: diagram2 };
|
|
@@ -65692,7 +65782,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
65692
65782
|
}, "detector");
|
|
65693
65783
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
65694
65784
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65695
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-
|
|
65785
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-D37yDEDj.js");
|
|
65696
65786
|
return { diagram: diagram22 };
|
|
65697
65787
|
}, true ? __vite__mapDeps([29,22,27,21,23]) : void 0, import.meta.url);
|
|
65698
65788
|
return { id: id10, diagram: diagram2 };
|
|
@@ -65709,7 +65799,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
65709
65799
|
}, "detector");
|
|
65710
65800
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
65711
65801
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65712
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-
|
|
65802
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-5S5xgn9_.js");
|
|
65713
65803
|
return { diagram: diagram22 };
|
|
65714
65804
|
}, true ? __vite__mapDeps([30,12,13]) : void 0, import.meta.url);
|
|
65715
65805
|
return { id: id11, diagram: diagram2 };
|
|
@@ -65726,7 +65816,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
65726
65816
|
}, "detector");
|
|
65727
65817
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
65728
65818
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65729
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-
|
|
65819
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-B7f6eT66.js");
|
|
65730
65820
|
return { diagram: diagram22 };
|
|
65731
65821
|
}, true ? __vite__mapDeps([31,9,18]) : void 0, import.meta.url);
|
|
65732
65822
|
return { id: id12, diagram: diagram2 };
|
|
@@ -65746,7 +65836,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65746
65836
|
}, "detector");
|
|
65747
65837
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
65748
65838
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65749
|
-
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-
|
|
65839
|
+
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-rJLhrTTS.js");
|
|
65750
65840
|
return { diagram: diagram22 };
|
|
65751
65841
|
}, true ? __vite__mapDeps([32,33,11,9,12,13]) : void 0, import.meta.url);
|
|
65752
65842
|
return { id: id13, diagram: diagram2 };
|
|
@@ -65766,7 +65856,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65766
65856
|
}, "detector");
|
|
65767
65857
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
65768
65858
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65769
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-
|
|
65859
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-rJLhrTTS.js");
|
|
65770
65860
|
return { diagram: diagram22 };
|
|
65771
65861
|
}, true ? __vite__mapDeps([34,33,11,9,12,13]) : void 0, import.meta.url);
|
|
65772
65862
|
return { id: id14, diagram: diagram2 };
|
|
@@ -65786,7 +65876,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65786
65876
|
}, "detector");
|
|
65787
65877
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
65788
65878
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65789
|
-
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-
|
|
65879
|
+
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-Cm4iQesY.js");
|
|
65790
65880
|
return { diagram: diagram22 };
|
|
65791
65881
|
}, true ? __vite__mapDeps([35,36,12,13,1,2,3,4]) : void 0, import.meta.url);
|
|
65792
65882
|
return { id: id15, diagram: diagram2 };
|
|
@@ -65809,7 +65899,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65809
65899
|
}, "detector");
|
|
65810
65900
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
65811
65901
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65812
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-
|
|
65902
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-DdStGNJu.js");
|
|
65813
65903
|
return { diagram: diagram22 };
|
|
65814
65904
|
}, true ? __vite__mapDeps([37,36,12,13]) : void 0, import.meta.url);
|
|
65815
65905
|
return { id: id16, diagram: diagram2 };
|
|
@@ -65826,7 +65916,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
65826
65916
|
}, "detector");
|
|
65827
65917
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
65828
65918
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65829
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-
|
|
65919
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-D3ONtv9u.js");
|
|
65830
65920
|
return { diagram: diagram22 };
|
|
65831
65921
|
}, true ? __vite__mapDeps([38,11,9,26]) : void 0, import.meta.url);
|
|
65832
65922
|
return { id: id17, diagram: diagram2 };
|
|
@@ -65896,7 +65986,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
65896
65986
|
}, "detector");
|
|
65897
65987
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
65898
65988
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65899
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65989
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-DZFPQcpb.js");
|
|
65900
65990
|
return { diagram: diagram22 };
|
|
65901
65991
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65902
65992
|
return { id: id18, diagram: diagram2 };
|
|
@@ -65913,7 +66003,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
65913
66003
|
}, "detector");
|
|
65914
66004
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
65915
66005
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65916
|
-
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-
|
|
66006
|
+
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-BA4cLDsg.js");
|
|
65917
66007
|
return { diagram: diagram22 };
|
|
65918
66008
|
}, true ? __vite__mapDeps([39,26]) : void 0, import.meta.url);
|
|
65919
66009
|
return { id: id19, diagram: diagram2 };
|
|
@@ -65930,7 +66020,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
65930
66020
|
}, "detector");
|
|
65931
66021
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
65932
66022
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65933
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-
|
|
66023
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-a-qwDgLY.js");
|
|
65934
66024
|
return { diagram: diagram22 };
|
|
65935
66025
|
}, true ? __vite__mapDeps([40,12,13]) : void 0, import.meta.url);
|
|
65936
66026
|
return { id: id20, diagram: diagram2 };
|
|
@@ -65947,7 +66037,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
65947
66037
|
}, "detector");
|
|
65948
66038
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
65949
66039
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65950
|
-
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-
|
|
66040
|
+
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-BDJXuwNy.js");
|
|
65951
66041
|
return { diagram: diagram22 };
|
|
65952
66042
|
}, true ? __vite__mapDeps([41,11]) : void 0, import.meta.url);
|
|
65953
66043
|
return { id: id21, diagram: diagram2 };
|
|
@@ -65964,7 +66054,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
65964
66054
|
}, "detector");
|
|
65965
66055
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
65966
66056
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65967
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-
|
|
66057
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-DUYAJ9k7.js");
|
|
65968
66058
|
return { diagram: diagram22 };
|
|
65969
66059
|
}, true ? __vite__mapDeps([42,27,22]) : void 0, import.meta.url);
|
|
65970
66060
|
return { id: id22, diagram: diagram2 };
|
|
@@ -65981,7 +66071,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
65981
66071
|
}, "detector");
|
|
65982
66072
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
65983
66073
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65984
|
-
const { diagram: diagram22 } = await import("./diagram-TYMM5635-
|
|
66074
|
+
const { diagram: diagram22 } = await import("./diagram-TYMM5635-xAze9LR5.js");
|
|
65985
66075
|
return { diagram: diagram22 };
|
|
65986
66076
|
}, true ? __vite__mapDeps([43,17,19,4,2]) : void 0, import.meta.url);
|
|
65987
66077
|
return { id: id23, diagram: diagram2 };
|
|
@@ -65997,7 +66087,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
65997
66087
|
}, "detector");
|
|
65998
66088
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
65999
66089
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66000
|
-
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-
|
|
66090
|
+
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-CD02vhuR.js");
|
|
66001
66091
|
return { diagram: diagram22 };
|
|
66002
66092
|
}, true ? __vite__mapDeps([44,17,19,4,2]) : void 0, import.meta.url);
|
|
66003
66093
|
return { id: id24, diagram: diagram2 };
|
|
@@ -66013,7 +66103,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
66013
66103
|
}, "detector");
|
|
66014
66104
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
66015
66105
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66016
|
-
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-
|
|
66106
|
+
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-CFxhVnTA.js");
|
|
66017
66107
|
return { diagram: diagram22 };
|
|
66018
66108
|
}, true ? __vite__mapDeps([45,11,5,1,2,14]) : void 0, import.meta.url);
|
|
66019
66109
|
return { id: id25, diagram: diagram2 };
|
|
@@ -66030,7 +66120,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
66030
66120
|
}, "detector");
|
|
66031
66121
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
66032
66122
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66033
|
-
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-
|
|
66123
|
+
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-BEs1nVIP.js");
|
|
66034
66124
|
return { diagram: diagram22 };
|
|
66035
66125
|
}, true ? __vite__mapDeps([46,17,18,19,4,2]) : void 0, import.meta.url);
|
|
66036
66126
|
return { id: id26, diagram: diagram2 };
|
|
@@ -66047,7 +66137,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
66047
66137
|
}, "detector");
|
|
66048
66138
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
66049
66139
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66050
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-
|
|
66140
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-B6aBoJIj.js");
|
|
66051
66141
|
return { diagram: diagram22 };
|
|
66052
66142
|
}, true ? __vite__mapDeps([47,17,19,4,2,7]) : void 0, import.meta.url);
|
|
66053
66143
|
return { id: id27, diagram: diagram2 };
|
|
@@ -66064,7 +66154,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
66064
66154
|
}, "detector");
|
|
66065
66155
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
66066
66156
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66067
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-
|
|
66157
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-BG3mS91T.js");
|
|
66068
66158
|
return { diagram: diagram22 };
|
|
66069
66159
|
}, true ? [] : void 0, import.meta.url);
|
|
66070
66160
|
return { id: id28, diagram: diagram2 };
|
|
@@ -66080,7 +66170,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
66080
66170
|
}, "detector");
|
|
66081
66171
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
66082
66172
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66083
|
-
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-
|
|
66173
|
+
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-D0qEZKPk.js");
|
|
66084
66174
|
return { diagram: diagram22 };
|
|
66085
66175
|
}, true ? [] : void 0, import.meta.url);
|
|
66086
66176
|
return { id: id29, diagram: diagram2 };
|
|
@@ -66097,7 +66187,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
66097
66187
|
}, "detector");
|
|
66098
66188
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
66099
66189
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66100
|
-
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-
|
|
66190
|
+
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-Bab0VbSx.js");
|
|
66101
66191
|
return { diagram: diagram22 };
|
|
66102
66192
|
}, true ? __vite__mapDeps([48,13,17,19,4,2,23,27,22]) : void 0, import.meta.url);
|
|
66103
66193
|
return { id: id30, diagram: diagram2 };
|
|
@@ -66113,7 +66203,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
|
|
|
66113
66203
|
}, "detector");
|
|
66114
66204
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
66115
66205
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66116
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-
|
|
66206
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-Br7mKnLr.js");
|
|
66117
66207
|
return { diagram: diagram22 };
|
|
66118
66208
|
}, true ? __vite__mapDeps([49,17,19,4,2]) : void 0, import.meta.url);
|
|
66119
66209
|
return { id: id31, diagram: diagram2 };
|
|
@@ -77121,6 +77211,9 @@ function formatDurationMs(durationMs) {
|
|
|
77121
77211
|
const remainingSeconds = totalSeconds % 60;
|
|
77122
77212
|
return remainingSeconds > 0 ? `${minutes}m${remainingSeconds}s` : `${minutes}m`;
|
|
77123
77213
|
}
|
|
77214
|
+
function useRuntimeMetricsVisibility() {
|
|
77215
|
+
return !useIsMobile();
|
|
77216
|
+
}
|
|
77124
77217
|
const card$4 = "_card_10ysh_1";
|
|
77125
77218
|
const embedded$1 = "_embedded_10ysh_9";
|
|
77126
77219
|
const collapse$1 = "_collapse_10ysh_16";
|
|
@@ -77145,7 +77238,7 @@ const diffButton = "_diffButton_10ysh_174";
|
|
|
77145
77238
|
const diffSection = "_diffSection_10ysh_194";
|
|
77146
77239
|
const taskIdList = "_taskIdList_10ysh_198";
|
|
77147
77240
|
const spinning$2 = "_spinning_10ysh_204";
|
|
77148
|
-
const spin$
|
|
77241
|
+
const spin$3 = "_spin_10ysh_204";
|
|
77149
77242
|
const generatedImage = "_generatedImage_10ysh_215";
|
|
77150
77243
|
const generatedImageThumb = "_generatedImageThumb_10ysh_223";
|
|
77151
77244
|
const brokenImage = "_brokenImage_10ysh_231";
|
|
@@ -77176,7 +77269,7 @@ const styles$Z = {
|
|
|
77176
77269
|
diffSection,
|
|
77177
77270
|
taskIdList,
|
|
77178
77271
|
spinning: spinning$2,
|
|
77179
|
-
spin: spin$
|
|
77272
|
+
spin: spin$3,
|
|
77180
77273
|
generatedImage,
|
|
77181
77274
|
generatedImageThumb,
|
|
77182
77275
|
brokenImage,
|
|
@@ -77527,6 +77620,7 @@ function GenerateImageResult({ result }) {
|
|
|
77527
77620
|
const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, variant = "default" }) {
|
|
77528
77621
|
const { t: t2 } = useTranslation();
|
|
77529
77622
|
const { theme } = useTheme();
|
|
77623
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
77530
77624
|
const [showDiff, setShowDiff] = reactExports.useState(true);
|
|
77531
77625
|
const [pathCopied, setPathCopied] = reactExports.useState(false);
|
|
77532
77626
|
const isPatchTool = toolCall.name === "applyPatch" || toolCall.name === "patch";
|
|
@@ -77602,7 +77696,7 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77602
77696
|
};
|
|
77603
77697
|
const readContent = toolCall.status === "success" ? extractReadContent(toolCall.result) : null;
|
|
77604
77698
|
const durationMs = toolCall.durationMs ?? (toolCall.startedAt && toolCall.endedAt ? toolCall.endedAt - toolCall.startedAt : void 0);
|
|
77605
|
-
const duration2 = durationMs != null ? formatDurationMs(durationMs) : null;
|
|
77699
|
+
const duration2 = showRuntimeMetrics && durationMs != null ? formatDurationMs(durationMs) : null;
|
|
77606
77700
|
const readFilePath = toolCall.name === "readFile" || toolCall.name === "read" ? getToolArgSummary(toolCall.name, toolCall.args) : null;
|
|
77607
77701
|
const readLanguage = getReadFileLanguage(readFilePath);
|
|
77608
77702
|
const codeStyle = theme === "dark" ? atomOneDark : githubGist;
|
|
@@ -77774,6 +77868,7 @@ function useElapsedTime({
|
|
|
77774
77868
|
}
|
|
77775
77869
|
const ReasoningBlock = reactExports.memo(function ReasoningBlock2({ content: content2, isStreaming, variant = "default", startedAt, durationMs }) {
|
|
77776
77870
|
const { t: t2 } = useTranslation();
|
|
77871
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
77777
77872
|
const [expanded2, setExpanded] = reactExports.useState(false);
|
|
77778
77873
|
const textRef = reactExports.useRef(null);
|
|
77779
77874
|
const userToggledRef = reactExports.useRef(false);
|
|
@@ -77829,7 +77924,7 @@ const ReasoningBlock = reactExports.memo(function ReasoningBlock2({ content: con
|
|
|
77829
77924
|
intervalMs: 200
|
|
77830
77925
|
});
|
|
77831
77926
|
if (!content2) return null;
|
|
77832
|
-
const displayDurationMs = isStreaming ? elapsedMs : durationMs;
|
|
77927
|
+
const displayDurationMs = showRuntimeMetrics ? isStreaming ? elapsedMs : durationMs : void 0;
|
|
77833
77928
|
const durationText = displayDurationMs != null ? formatDurationMs(displayDurationMs) : null;
|
|
77834
77929
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$Y.container, isStreaming ? styles$Y.streaming : "", variant === "embedded" && styles$Y.embedded), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77835
77930
|
Collapse,
|
|
@@ -78130,6 +78225,7 @@ const TaskBlock = reactExports.memo(function TaskBlock2({ block, delegatorId, de
|
|
|
78130
78225
|
const isBackground = task.background === true;
|
|
78131
78226
|
const [isExpanded, setIsExpanded] = reactExports.useState(false);
|
|
78132
78227
|
const { t: t2 } = useTranslation();
|
|
78228
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78133
78229
|
const participants = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
78134
78230
|
hasDelegatorContext && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
78135
78231
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -78162,7 +78258,7 @@ const TaskBlock = reactExports.memo(function TaskBlock2({ block, delegatorId, de
|
|
|
78162
78258
|
enabled: task.status === "running",
|
|
78163
78259
|
intervalMs: 1e3
|
|
78164
78260
|
});
|
|
78165
|
-
const displayDurationMs = task.status === "running" ? runningElapsedMs : task.durationMs;
|
|
78261
|
+
const displayDurationMs = showRuntimeMetrics ? task.status === "running" ? runningElapsedMs : task.durationMs : void 0;
|
|
78166
78262
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$U.anchor, ...{ [TASK_BLOCK_SELECTOR_ATTR]: task.id }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78167
78263
|
CollaborationShell,
|
|
78168
78264
|
{
|
|
@@ -78276,7 +78372,7 @@ const BroadcastCard = reactExports.memo(function BroadcastCard2({ broadcast }) {
|
|
|
78276
78372
|
const { t: t2 } = useTranslation();
|
|
78277
78373
|
const { responses, status: status2 } = broadcast;
|
|
78278
78374
|
const contentRef = reactExports.useRef(null);
|
|
78279
|
-
const
|
|
78375
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78280
78376
|
const initialTabId = responses.find((r2) => r2.status === "streaming")?.agentId ?? responses[0]?.agentId ?? "";
|
|
78281
78377
|
const [activeTabId, setActiveTabId] = reactExports.useState(initialTabId);
|
|
78282
78378
|
const [expanded2, setExpanded] = reactExports.useState(true);
|
|
@@ -78296,7 +78392,7 @@ const BroadcastCard = reactExports.memo(function BroadcastCard2({ broadcast }) {
|
|
|
78296
78392
|
enabled: status2 === "running",
|
|
78297
78393
|
intervalMs: 1e3
|
|
78298
78394
|
});
|
|
78299
|
-
const displayDurationMs = status2 === "running" &&
|
|
78395
|
+
const displayDurationMs = status2 === "running" && showRuntimeMetrics ? runningElapsedMs : void 0;
|
|
78300
78396
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78301
78397
|
CollaborationShell,
|
|
78302
78398
|
{
|
|
@@ -78357,65 +78453,70 @@ function TabBlocksRenderer({ blocks, agentId }) {
|
|
|
78357
78453
|
isUser: false
|
|
78358
78454
|
} });
|
|
78359
78455
|
}
|
|
78360
|
-
const message$4 = "
|
|
78361
|
-
const fullWidth = "
|
|
78362
|
-
const user = "
|
|
78363
|
-
const agent$2 = "
|
|
78364
|
-
const groupLayout = "
|
|
78365
|
-
const agentShellCompact = "
|
|
78366
|
-
const avatarCol$1 = "
|
|
78367
|
-
const senderHeader = "
|
|
78368
|
-
const contentCol = "
|
|
78369
|
-
const senderLabel = "
|
|
78370
|
-
const senderName = "
|
|
78371
|
-
const bubble = "
|
|
78372
|
-
const hasUsage = "
|
|
78373
|
-
const embeddedBubble = "
|
|
78374
|
-
const textBubble = "
|
|
78375
|
-
const textSection = "
|
|
78376
|
-
const embeddedBubbleContent = "
|
|
78377
|
-
const content$8 = "
|
|
78378
|
-
const messageFooter = "
|
|
78379
|
-
const groupMetaFooter = "
|
|
78380
|
-
const messageFooterActions = "
|
|
78381
|
-
const timestamp = "
|
|
78382
|
-
const copyButton$1 = "
|
|
78383
|
-
const errorBlock = "
|
|
78384
|
-
const errorHeader = "
|
|
78385
|
-
const errorType = "
|
|
78386
|
-
const errorMessage$1 = "
|
|
78387
|
-
const
|
|
78388
|
-
const
|
|
78389
|
-
const
|
|
78390
|
-
const
|
|
78391
|
-
const
|
|
78392
|
-
const
|
|
78393
|
-
const
|
|
78394
|
-
const
|
|
78395
|
-
const
|
|
78396
|
-
const
|
|
78397
|
-
const
|
|
78398
|
-
const
|
|
78399
|
-
const
|
|
78400
|
-
const
|
|
78401
|
-
const
|
|
78402
|
-
const
|
|
78403
|
-
const
|
|
78404
|
-
const
|
|
78405
|
-
const
|
|
78406
|
-
const
|
|
78407
|
-
const
|
|
78408
|
-
const
|
|
78409
|
-
const
|
|
78410
|
-
const
|
|
78411
|
-
const
|
|
78412
|
-
const
|
|
78413
|
-
const
|
|
78414
|
-
const
|
|
78415
|
-
const
|
|
78416
|
-
const
|
|
78417
|
-
const
|
|
78418
|
-
const
|
|
78456
|
+
const message$4 = "_message_185wk_1";
|
|
78457
|
+
const fullWidth = "_fullWidth_185wk_8";
|
|
78458
|
+
const user = "_user_185wk_12";
|
|
78459
|
+
const agent$2 = "_agent_185wk_17";
|
|
78460
|
+
const groupLayout = "_groupLayout_185wk_25";
|
|
78461
|
+
const agentShellCompact = "_agentShellCompact_185wk_33";
|
|
78462
|
+
const avatarCol$1 = "_avatarCol_185wk_38";
|
|
78463
|
+
const senderHeader = "_senderHeader_185wk_52";
|
|
78464
|
+
const contentCol = "_contentCol_185wk_58";
|
|
78465
|
+
const senderLabel = "_senderLabel_185wk_79";
|
|
78466
|
+
const senderName = "_senderName_185wk_96";
|
|
78467
|
+
const bubble = "_bubble_185wk_102";
|
|
78468
|
+
const hasUsage = "_hasUsage_185wk_128";
|
|
78469
|
+
const embeddedBubble = "_embeddedBubble_185wk_132";
|
|
78470
|
+
const textBubble = "_textBubble_185wk_138";
|
|
78471
|
+
const textSection = "_textSection_185wk_154";
|
|
78472
|
+
const embeddedBubbleContent = "_embeddedBubbleContent_185wk_173";
|
|
78473
|
+
const content$8 = "_content_185wk_58";
|
|
78474
|
+
const messageFooter = "_messageFooter_185wk_199";
|
|
78475
|
+
const groupMetaFooter = "_groupMetaFooter_185wk_207";
|
|
78476
|
+
const messageFooterActions = "_messageFooterActions_185wk_233";
|
|
78477
|
+
const timestamp = "_timestamp_185wk_245";
|
|
78478
|
+
const copyButton$1 = "_copyButton_185wk_256";
|
|
78479
|
+
const errorBlock = "_errorBlock_185wk_285";
|
|
78480
|
+
const errorHeader = "_errorHeader_185wk_293";
|
|
78481
|
+
const errorType = "_errorType_185wk_301";
|
|
78482
|
+
const errorMessage$1 = "_errorMessage_185wk_306";
|
|
78483
|
+
const errorDetails = "_errorDetails_185wk_312";
|
|
78484
|
+
const errorDetailsSummary = "_errorDetailsSummary_185wk_318";
|
|
78485
|
+
const errorDetailsSummaryRow = "_errorDetailsSummaryRow_185wk_326";
|
|
78486
|
+
const errorDetailsCopyButton = "_errorDetailsCopyButton_185wk_333";
|
|
78487
|
+
const errorDetailsContent = "_errorDetailsContent_185wk_355";
|
|
78488
|
+
const collapsedContent = "_collapsedContent_185wk_368";
|
|
78489
|
+
const expandedContent = "_expandedContent_185wk_386";
|
|
78490
|
+
const conclusionStrip = "_conclusionStrip_185wk_391";
|
|
78491
|
+
const conclusionLabel = "_conclusionLabel_185wk_405";
|
|
78492
|
+
const conclusionText = "_conclusionText_185wk_413";
|
|
78493
|
+
const expandButton$1 = "_expandButton_185wk_419";
|
|
78494
|
+
const messageMetrics = "_messageMetrics_185wk_446";
|
|
78495
|
+
const embeddedMessageMetrics = "_embeddedMessageMetrics_185wk_461";
|
|
78496
|
+
const fallbackTransitionBanner = "_fallbackTransitionBanner_185wk_474";
|
|
78497
|
+
const messageMetricsPrimary = "_messageMetricsPrimary_185wk_478";
|
|
78498
|
+
const embeddedMessageMetricsPrimary = "_embeddedMessageMetricsPrimary_185wk_486";
|
|
78499
|
+
const messageMetricsMeta = "_messageMetricsMeta_185wk_491";
|
|
78500
|
+
const metricsStreaming = "_metricsStreaming_185wk_519";
|
|
78501
|
+
const fallbackTransitionIcon = "_fallbackTransitionIcon_185wk_551";
|
|
78502
|
+
const fallbackTransitionText = "_fallbackTransitionText_185wk_556";
|
|
78503
|
+
const tokenUsage = "_tokenUsage_185wk_573";
|
|
78504
|
+
const duration = "_duration_185wk_582";
|
|
78505
|
+
const modelLabel = "_modelLabel_185wk_592";
|
|
78506
|
+
const modelLabelFallback = "_modelLabelFallback_185wk_602";
|
|
78507
|
+
const system = "_system_185wk_614";
|
|
78508
|
+
const systemBubble = "_systemBubble_185wk_621";
|
|
78509
|
+
const systemContent = "_systemContent_185wk_633";
|
|
78510
|
+
const loadingSpinner = "_loadingSpinner_185wk_640";
|
|
78511
|
+
const supervisorTag = "_supervisorTag_185wk_656";
|
|
78512
|
+
const memoryWriteButton = "_memoryWriteButton_185wk_690";
|
|
78513
|
+
const statusArea = "_statusArea_185wk_697";
|
|
78514
|
+
const statusDot$1 = "_statusDot_185wk_705";
|
|
78515
|
+
const dot$2 = "_dot_185wk_714";
|
|
78516
|
+
const dotSending = "_dotSending_185wk_722";
|
|
78517
|
+
const dotError = "_dotError_185wk_726";
|
|
78518
|
+
const retryButton = "_retryButton_185wk_731";
|
|
78519
|
+
const recallButton = "_recallButton_185wk_741";
|
|
78419
78520
|
const styles$S = {
|
|
78420
78521
|
message: message$4,
|
|
78421
78522
|
fullWidth,
|
|
@@ -78444,6 +78545,11 @@ const styles$S = {
|
|
|
78444
78545
|
errorHeader,
|
|
78445
78546
|
errorType,
|
|
78446
78547
|
errorMessage: errorMessage$1,
|
|
78548
|
+
errorDetails,
|
|
78549
|
+
errorDetailsSummary,
|
|
78550
|
+
errorDetailsSummaryRow,
|
|
78551
|
+
errorDetailsCopyButton,
|
|
78552
|
+
errorDetailsContent,
|
|
78447
78553
|
collapsedContent,
|
|
78448
78554
|
expandedContent,
|
|
78449
78555
|
conclusionStrip,
|
|
@@ -78452,11 +78558,11 @@ const styles$S = {
|
|
|
78452
78558
|
expandButton: expandButton$1,
|
|
78453
78559
|
messageMetrics,
|
|
78454
78560
|
embeddedMessageMetrics,
|
|
78561
|
+
fallbackTransitionBanner,
|
|
78455
78562
|
messageMetricsPrimary,
|
|
78456
78563
|
embeddedMessageMetricsPrimary,
|
|
78457
78564
|
messageMetricsMeta,
|
|
78458
78565
|
metricsStreaming,
|
|
78459
|
-
fallbackTransitionBanner,
|
|
78460
78566
|
fallbackTransitionIcon,
|
|
78461
78567
|
fallbackTransitionText,
|
|
78462
78568
|
tokenUsage,
|
|
@@ -78686,18 +78792,60 @@ function getReadableChatErrorMessage(error2, t2) {
|
|
|
78686
78792
|
}
|
|
78687
78793
|
function MessageErrorBlock({ error: error2 }) {
|
|
78688
78794
|
const { t: t2 } = useTranslation();
|
|
78795
|
+
const [copied, setCopied] = reactExports.useState(false);
|
|
78689
78796
|
const message2 = getReadableErrorMessage(error2, t2);
|
|
78797
|
+
const diagnostic = formatErrorDiagnostic(error2.diagnostic);
|
|
78798
|
+
const handleCopyDiagnostic = async () => {
|
|
78799
|
+
if (!diagnostic) return;
|
|
78800
|
+
await copyToClipboard(diagnostic);
|
|
78801
|
+
setCopied(true);
|
|
78802
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
78803
|
+
};
|
|
78690
78804
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$S.errorBlock, children: [
|
|
78691
78805
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$S.errorHeader, children: [
|
|
78692
78806
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { size: 14 }),
|
|
78693
78807
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.errorType, children: t2(`message.error.${error2.type}`) })
|
|
78694
78808
|
] }),
|
|
78695
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$S.errorMessage, children: message2 })
|
|
78809
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$S.errorMessage, children: message2 }),
|
|
78810
|
+
diagnostic && /* @__PURE__ */ jsxRuntimeExports.jsxs("details", { className: styles$S.errorDetails, children: [
|
|
78811
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("summary", { className: styles$S.errorDetailsSummaryRow, children: [
|
|
78812
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.errorDetailsSummary, children: t2("message.errorDetails") }),
|
|
78813
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
78814
|
+
"button",
|
|
78815
|
+
{
|
|
78816
|
+
className: styles$S.errorDetailsCopyButton,
|
|
78817
|
+
onClick: (event) => {
|
|
78818
|
+
event.preventDefault();
|
|
78819
|
+
void handleCopyDiagnostic();
|
|
78820
|
+
},
|
|
78821
|
+
"aria-label": t2(copied ? "message.copied" : "message.copy"),
|
|
78822
|
+
type: "button",
|
|
78823
|
+
children: [
|
|
78824
|
+
copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { size: 12 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { size: 12 }),
|
|
78825
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2(copied ? "message.copied" : "message.copy") })
|
|
78826
|
+
]
|
|
78827
|
+
}
|
|
78828
|
+
)
|
|
78829
|
+
] }),
|
|
78830
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: styles$S.errorDetailsContent, children: diagnostic })
|
|
78831
|
+
] })
|
|
78696
78832
|
] });
|
|
78697
78833
|
}
|
|
78698
78834
|
function getReadableErrorMessage(error2, t2) {
|
|
78699
78835
|
return getReadableChatErrorMessage(error2, t2);
|
|
78700
78836
|
}
|
|
78837
|
+
function formatErrorDiagnostic(diagnostic) {
|
|
78838
|
+
if (!diagnostic) return null;
|
|
78839
|
+
const lines = [
|
|
78840
|
+
diagnostic.name ? `name: ${diagnostic.name}` : null,
|
|
78841
|
+
diagnostic.code ? `code: ${diagnostic.code}` : null,
|
|
78842
|
+
diagnostic.message ? `message: ${diagnostic.message}` : null,
|
|
78843
|
+
diagnostic.cause ? `cause: ${diagnostic.cause}` : null,
|
|
78844
|
+
diagnostic.stack ? `stack:
|
|
78845
|
+
${diagnostic.stack}` : null
|
|
78846
|
+
].filter((line2) => Boolean(line2));
|
|
78847
|
+
return lines.length > 0 ? lines.join("\n") : null;
|
|
78848
|
+
}
|
|
78701
78849
|
const CONCLUSION_MAX_LENGTH = 120;
|
|
78702
78850
|
const FALLBACK_TRANSITION_BANNER_DURATION_MS = 2400;
|
|
78703
78851
|
function extractConclusion(text2) {
|
|
@@ -78763,6 +78911,7 @@ const MessageBubble = reactExports.memo(reactExports.forwardRef(function Message
|
|
|
78763
78911
|
embedRuntimeStatusInBubble = false,
|
|
78764
78912
|
onExpandChange
|
|
78765
78913
|
}, ref) {
|
|
78914
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78766
78915
|
const [isExpanded, setIsExpanded] = reactExports.useState(false);
|
|
78767
78916
|
const [needsCollapse, setNeedsCollapse] = reactExports.useState(false);
|
|
78768
78917
|
const contentRef = reactExports.useRef(null);
|
|
@@ -78825,11 +78974,10 @@ const MessageBubble = reactExports.memo(reactExports.forwardRef(function Message
|
|
|
78825
78974
|
return () => clearInterval(timer2);
|
|
78826
78975
|
}, [runMetrics?.startedAt]);
|
|
78827
78976
|
const displayModel = runMetrics?.model ?? message2.model;
|
|
78828
|
-
runMetrics?.fallback ?? message2.fallback;
|
|
78829
78977
|
const displayUsage = runMetrics?.usage ?? message2.usage;
|
|
78830
78978
|
const fallbackTransition = message2.isStreaming ? runMetrics?.fallbackTransition : void 0;
|
|
78831
78979
|
const displayDurationMs = message2.isStreaming && runMetrics ? elapsedMs : message2.durationMs;
|
|
78832
|
-
const hasMetrics = !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
78980
|
+
const hasMetrics = showRuntimeMetrics && !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
78833
78981
|
const embeddedRuntimeStatusVisible = embedRuntimeStatusInBubble && (showToolLoading || !!fallbackTransition);
|
|
78834
78982
|
const bubbleHasMetrics = !isEmbedded ? hasMetrics : embeddedRuntimeStatusVisible;
|
|
78835
78983
|
const showFooter = isEmbedded ? embeddedRuntimeStatusVisible : true;
|
|
@@ -78907,10 +79055,11 @@ function MessageRuntimeStatus({ fallbackTransition, loading: loading2, variant =
|
|
|
78907
79055
|
loading2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$S.messageMetricsPrimary, isEmbedded && styles$S.embeddedMessageMetricsPrimary), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.metricsStreaming, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingDots, { inline: true, variant: "status" }) }) })
|
|
78908
79056
|
] });
|
|
78909
79057
|
}
|
|
78910
|
-
function MessageMetrics({ usage, durationMs, model, fallback: fallback2,
|
|
79058
|
+
function MessageMetrics({ usage, durationMs, model, fallback: fallback2, loading: loading2, variant = "default" }) {
|
|
79059
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
78911
79060
|
const hasDuration = durationMs != null && !isNaN(durationMs);
|
|
78912
79061
|
const isEmbedded = variant === "embedded";
|
|
78913
|
-
const hasMeta = !!(model || usage || hasDuration);
|
|
79062
|
+
const hasMeta = showRuntimeMetrics && !!(model || usage || hasDuration);
|
|
78914
79063
|
if (!loading2 && !hasMeta) return null;
|
|
78915
79064
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$S.messageMetrics, isEmbedded && styles$S.embeddedMessageMetrics), children: [
|
|
78916
79065
|
loading2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$S.messageMetricsPrimary, isEmbedded && styles$S.embeddedMessageMetricsPrimary), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.metricsStreaming, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingDots, { inline: true, variant: "status" }) }) }),
|
|
@@ -79045,7 +79194,6 @@ const MessageItem = reactExports.memo(function MessageItem2({
|
|
|
79045
79194
|
message: message2,
|
|
79046
79195
|
agents,
|
|
79047
79196
|
isGroupChat,
|
|
79048
|
-
isLastMessage = false,
|
|
79049
79197
|
isLastAgentMessage = false,
|
|
79050
79198
|
autoCollapsed = false,
|
|
79051
79199
|
scrollContainerRef,
|
|
@@ -79194,6 +79342,7 @@ function AgentBlockMessage({
|
|
|
79194
79342
|
onWriteMemory
|
|
79195
79343
|
}) {
|
|
79196
79344
|
const { t: t2 } = useTranslation();
|
|
79345
|
+
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
79197
79346
|
const bubbleContentRef = reactExports.useRef(null);
|
|
79198
79347
|
const [showScrollToTop, setShowScrollToTop] = reactExports.useState(false);
|
|
79199
79348
|
const runMetrics = useMessageStore(
|
|
@@ -79220,7 +79369,7 @@ function AgentBlockMessage({
|
|
|
79220
79369
|
const displayFallback = runMetrics?.fallback ?? message2.fallback;
|
|
79221
79370
|
const displayUsage = runMetrics?.usage ?? message2.usage;
|
|
79222
79371
|
const displayDurationMs = message2.isStreaming && runMetrics ? elapsedMs : message2.durationMs;
|
|
79223
|
-
const showFooterMetrics = !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
79372
|
+
const showFooterMetrics = showRuntimeMetrics && !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
79224
79373
|
const [manuallyExpanded, setManuallyExpanded] = reactExports.useState(false);
|
|
79225
79374
|
const isExpanded = !autoCollapsed || manuallyExpanded;
|
|
79226
79375
|
reactExports.useEffect(() => {
|
|
@@ -79634,18 +79783,20 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
79634
79783
|
handleLoadMoreClick
|
|
79635
79784
|
};
|
|
79636
79785
|
}
|
|
79637
|
-
const container$e = "
|
|
79638
|
-
const loadMoreButton = "
|
|
79639
|
-
const messageWrapper = "
|
|
79640
|
-
const
|
|
79641
|
-
const
|
|
79642
|
-
const
|
|
79643
|
-
const
|
|
79644
|
-
const
|
|
79786
|
+
const container$e = "_container_1qvmg_1";
|
|
79787
|
+
const loadMoreButton = "_loadMoreButton_1qvmg_8";
|
|
79788
|
+
const messageWrapper = "_messageWrapper_1qvmg_25";
|
|
79789
|
+
const contextStatusRow = "_contextStatusRow_1qvmg_32";
|
|
79790
|
+
const loadingMore = "_loadingMore_1qvmg_41";
|
|
79791
|
+
const noMoreMessages$2 = "_noMoreMessages_1qvmg_42";
|
|
79792
|
+
const centerState = "_centerState_1qvmg_43";
|
|
79793
|
+
const newMessageHint = "_newMessageHint_1qvmg_57";
|
|
79794
|
+
const scrollToBottom$2 = "_scrollToBottom_1qvmg_77";
|
|
79645
79795
|
const styles$O = {
|
|
79646
79796
|
container: container$e,
|
|
79647
79797
|
loadMoreButton,
|
|
79648
79798
|
messageWrapper,
|
|
79799
|
+
contextStatusRow,
|
|
79649
79800
|
loadingMore,
|
|
79650
79801
|
noMoreMessages: noMoreMessages$2,
|
|
79651
79802
|
centerState,
|
|
@@ -79677,11 +79828,22 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
79677
79828
|
const conversation2 = useMessageStore(
|
|
79678
79829
|
reactExports.useMemo(() => (s2) => s2.conversationMap.get(sessionId) ?? null, [sessionId])
|
|
79679
79830
|
);
|
|
79831
|
+
const contextCompaction = useMessageStore(
|
|
79832
|
+
reactExports.useMemo(() => (s2) => s2.contextCompactionMap.get(sessionId), [sessionId])
|
|
79833
|
+
);
|
|
79680
79834
|
const messages = reactExports.useMemo(() => getSortedMessages(msgMap), [msgMap]);
|
|
79681
79835
|
const streamRevision = useMessageStore(
|
|
79682
79836
|
reactExports.useMemo(() => (s2) => s2.streamRevisionMap.get(sessionId) ?? 0, [sessionId])
|
|
79683
79837
|
);
|
|
79684
79838
|
const isGroupChat = conversation2?.type === "group";
|
|
79839
|
+
const contextStatusRow2 = reactExports.useMemo(() => {
|
|
79840
|
+
const last = contextCompaction?.lastCompaction;
|
|
79841
|
+
if (!last || last.phase === "started" || last.phase === "completed") return null;
|
|
79842
|
+
if (last.phase === "failed") {
|
|
79843
|
+
return t2("contextHealth.statusRowFailed", "上下文压缩失败 · 可考虑新开 Session");
|
|
79844
|
+
}
|
|
79845
|
+
return null;
|
|
79846
|
+
}, [contextCompaction, t2]);
|
|
79685
79847
|
const { autoCollapsedSet, lastAgentIndex } = reactExports.useMemo(() => {
|
|
79686
79848
|
const agentIndices = [];
|
|
79687
79849
|
for (let i2 = 0; i2 < messages.length; i2++) {
|
|
@@ -79754,6 +79916,7 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
79754
79916
|
},
|
|
79755
79917
|
message2.id
|
|
79756
79918
|
)) }),
|
|
79919
|
+
contextStatusRow2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$O.contextStatusRow, role: "status", "aria-live": "polite", children: contextStatusRow2 }),
|
|
79757
79920
|
maintenanceEvent,
|
|
79758
79921
|
scroll.showNewMessageHint && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: styles$O.newMessageHint, onClick: scroll.handleNewMessageClick, children: t2("chat.newMessages") }),
|
|
79759
79922
|
scroll.showScrollToBottom && !scroll.showNewMessageHint && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -79769,20 +79932,17 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
79769
79932
|
}
|
|
79770
79933
|
);
|
|
79771
79934
|
});
|
|
79772
|
-
const row = "
|
|
79773
|
-
const card$3 = "
|
|
79774
|
-
const iconWrap = "
|
|
79775
|
-
const body$2 = "
|
|
79776
|
-
const title$b = "
|
|
79777
|
-
const description$6 = "
|
|
79778
|
-
const actions$7 = "
|
|
79779
|
-
const
|
|
79780
|
-
const
|
|
79781
|
-
const
|
|
79782
|
-
const
|
|
79783
|
-
const secondaryButton$1 = "_secondaryButton_cucmf_69";
|
|
79784
|
-
const textButton$1 = "_textButton_cucmf_70";
|
|
79785
|
-
const spin$1 = "_spin_cucmf_124";
|
|
79935
|
+
const row = "_row_1nn16_1";
|
|
79936
|
+
const card$3 = "_card_1nn16_7";
|
|
79937
|
+
const iconWrap = "_iconWrap_1nn16_19";
|
|
79938
|
+
const body$2 = "_body_1nn16_29";
|
|
79939
|
+
const title$b = "_title_1nn16_34";
|
|
79940
|
+
const description$6 = "_description_1nn16_41";
|
|
79941
|
+
const actions$7 = "_actions_1nn16_48";
|
|
79942
|
+
const primaryButton$1 = "_primaryButton_1nn16_57";
|
|
79943
|
+
const secondaryButton$1 = "_secondaryButton_1nn16_58";
|
|
79944
|
+
const textButton$1 = "_textButton_1nn16_91";
|
|
79945
|
+
const spin$2 = "_spin_1nn16_111";
|
|
79786
79946
|
const styles$N = {
|
|
79787
79947
|
row,
|
|
79788
79948
|
card: card$3,
|
|
@@ -79791,21 +79951,17 @@ const styles$N = {
|
|
|
79791
79951
|
title: title$b,
|
|
79792
79952
|
description: description$6,
|
|
79793
79953
|
actions: actions$7,
|
|
79794
|
-
primaryActions,
|
|
79795
|
-
secondaryActions,
|
|
79796
79954
|
primaryButton: primaryButton$1,
|
|
79797
|
-
dangerButton,
|
|
79798
79955
|
secondaryButton: secondaryButton$1,
|
|
79799
79956
|
textButton: textButton$1,
|
|
79800
|
-
spin: spin$
|
|
79957
|
+
spin: spin$2
|
|
79801
79958
|
};
|
|
79802
79959
|
function ContextCompactSuggestion({
|
|
79803
79960
|
disabled: disabled2,
|
|
79804
79961
|
status: status2 = "idle",
|
|
79805
79962
|
onAccept,
|
|
79806
|
-
onClearContext,
|
|
79807
79963
|
onDismiss,
|
|
79808
|
-
|
|
79964
|
+
onRemindLater
|
|
79809
79965
|
}) {
|
|
79810
79966
|
const { t: t2 } = useTranslation();
|
|
79811
79967
|
const isIdle = status2 === "idle";
|
|
@@ -79815,7 +79971,7 @@ function ContextCompactSuggestion({
|
|
|
79815
79971
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.title, children: t2("contextSuggestion.title") }),
|
|
79816
79972
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$N.description, children: status2 === "running" ? t2("contextSuggestion.running") : status2 === "completed" ? t2("contextSuggestion.completed") : status2 === "failed" ? t2("contextSuggestion.failed") : t2("contextSuggestion.description") }),
|
|
79817
79973
|
isIdle && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$N.actions, children: [
|
|
79818
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79974
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79819
79975
|
"button",
|
|
79820
79976
|
{
|
|
79821
79977
|
type: "button",
|
|
@@ -79824,36 +79980,25 @@ function ContextCompactSuggestion({
|
|
|
79824
79980
|
disabled: disabled2,
|
|
79825
79981
|
children: t2("contextSuggestion.accept")
|
|
79826
79982
|
}
|
|
79827
|
-
)
|
|
79828
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
79829
|
-
|
|
79830
|
-
|
|
79831
|
-
|
|
79832
|
-
|
|
79833
|
-
|
|
79834
|
-
|
|
79835
|
-
|
|
79836
|
-
|
|
79837
|
-
|
|
79838
|
-
|
|
79839
|
-
|
|
79840
|
-
|
|
79841
|
-
|
|
79842
|
-
|
|
79843
|
-
|
|
79844
|
-
|
|
79845
|
-
|
|
79846
|
-
),
|
|
79847
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79848
|
-
"button",
|
|
79849
|
-
{
|
|
79850
|
-
type: "button",
|
|
79851
|
-
className: styles$N.textButton,
|
|
79852
|
-
onClick: onSnoozeToday,
|
|
79853
|
-
children: t2("contextSuggestion.snoozeToday")
|
|
79854
|
-
}
|
|
79855
|
-
)
|
|
79856
|
-
] })
|
|
79983
|
+
),
|
|
79984
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79985
|
+
"button",
|
|
79986
|
+
{
|
|
79987
|
+
type: "button",
|
|
79988
|
+
className: styles$N.secondaryButton,
|
|
79989
|
+
onClick: onRemindLater,
|
|
79990
|
+
children: t2("contextSuggestion.remindLater")
|
|
79991
|
+
}
|
|
79992
|
+
),
|
|
79993
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79994
|
+
"button",
|
|
79995
|
+
{
|
|
79996
|
+
type: "button",
|
|
79997
|
+
className: styles$N.textButton,
|
|
79998
|
+
onClick: onDismiss,
|
|
79999
|
+
children: t2("contextSuggestion.dismiss")
|
|
80000
|
+
}
|
|
80001
|
+
)
|
|
79857
80002
|
] })
|
|
79858
80003
|
] })
|
|
79859
80004
|
] }) });
|
|
@@ -79861,6 +80006,7 @@ function ContextCompactSuggestion({
|
|
|
79861
80006
|
const IDLE_THRESHOLD_MS = 4 * 60 * 60 * 1e3;
|
|
79862
80007
|
const MESSAGE_THRESHOLD = 30;
|
|
79863
80008
|
const LARGE_TEXT_THRESHOLD = 16e3;
|
|
80009
|
+
const TOKEN_SUGGESTION_RATIO = 0.85;
|
|
79864
80010
|
function getTodayKey() {
|
|
79865
80011
|
const now2 = /* @__PURE__ */ new Date();
|
|
79866
80012
|
const year = now2.getFullYear();
|
|
@@ -79868,7 +80014,7 @@ function getTodayKey() {
|
|
|
79868
80014
|
const day = String(now2.getDate()).padStart(2, "0");
|
|
79869
80015
|
return `${year}-${month}-${day}`;
|
|
79870
80016
|
}
|
|
79871
|
-
function
|
|
80017
|
+
function getRemindLaterKey(sessionId) {
|
|
79872
80018
|
return `context_compact_snooze_${sessionId}_${getTodayKey()}`;
|
|
79873
80019
|
}
|
|
79874
80020
|
function getDismissKey(sessionId) {
|
|
@@ -79880,6 +80026,10 @@ function getMessageTextSize(message2) {
|
|
|
79880
80026
|
return sum + block.text.length;
|
|
79881
80027
|
}, 0);
|
|
79882
80028
|
}
|
|
80029
|
+
function getMessagesAfterLastContextClear(messages) {
|
|
80030
|
+
const markerIndex = messages.findLastIndex((message2) => message2.isContextMarker);
|
|
80031
|
+
return markerIndex >= 0 ? messages.slice(markerIndex + 1) : messages;
|
|
80032
|
+
}
|
|
79883
80033
|
function shouldSuggest(messages, sending) {
|
|
79884
80034
|
if (sending || messages.length < MESSAGE_THRESHOLD) return false;
|
|
79885
80035
|
const lastMessage = messages[messages.length - 1];
|
|
@@ -79889,9 +80039,23 @@ function shouldSuggest(messages, sending) {
|
|
|
79889
80039
|
const textSize = messages.reduce((sum, message2) => sum + getMessageTextSize(message2), 0);
|
|
79890
80040
|
return textSize >= LARGE_TEXT_THRESHOLD || messages.length >= MESSAGE_THRESHOLD * 2;
|
|
79891
80041
|
}
|
|
79892
|
-
function
|
|
79893
|
-
|
|
79894
|
-
const
|
|
80042
|
+
function shouldSuggestFromContextStatus(compaction, sending, isRunning) {
|
|
80043
|
+
if (sending || isRunning) return false;
|
|
80044
|
+
const preparedTokens = compaction?.currentPreparedTokens;
|
|
80045
|
+
const inputTokenLimit = compaction?.inputTokenLimit;
|
|
80046
|
+
const thresholdRatio = compaction?.thresholdRatio;
|
|
80047
|
+
if (preparedTokens === void 0 || inputTokenLimit === void 0 || thresholdRatio === void 0 || inputTokenLimit <= 0) {
|
|
80048
|
+
return void 0;
|
|
80049
|
+
}
|
|
80050
|
+
return preparedTokens / inputTokenLimit >= thresholdRatio * TOKEN_SUGGESTION_RATIO;
|
|
80051
|
+
}
|
|
80052
|
+
function useContextCompactSuggestion(sessionId, messages, sending, compaction, isRunning = false) {
|
|
80053
|
+
const eligible = reactExports.useMemo(() => {
|
|
80054
|
+
const tokenAware = shouldSuggestFromContextStatus(compaction, sending, isRunning);
|
|
80055
|
+
if (tokenAware !== void 0) return tokenAware;
|
|
80056
|
+
return shouldSuggest(getMessagesAfterLastContextClear(messages), sending);
|
|
80057
|
+
}, [compaction, isRunning, messages, sending]);
|
|
80058
|
+
const isHidden = reactExports.useCallback(() => sessionStorage.getItem(getRemindLaterKey(sessionId)) === "1" || sessionStorage.getItem(getDismissKey(sessionId)) === "1", [sessionId]);
|
|
79895
80059
|
const [hidden, setHidden] = reactExports.useState(isHidden);
|
|
79896
80060
|
reactExports.useEffect(() => {
|
|
79897
80061
|
setHidden(isHidden());
|
|
@@ -79900,26 +80064,26 @@ function useContextCompactSuggestion(sessionId, messages, sending) {
|
|
|
79900
80064
|
sessionStorage.setItem(getDismissKey(sessionId), "1");
|
|
79901
80065
|
setHidden(true);
|
|
79902
80066
|
}, [sessionId]);
|
|
79903
|
-
const
|
|
79904
|
-
sessionStorage.setItem(
|
|
80067
|
+
const remindLater = reactExports.useCallback(() => {
|
|
80068
|
+
sessionStorage.setItem(getRemindLaterKey(sessionId), "1");
|
|
79905
80069
|
setHidden(true);
|
|
79906
80070
|
}, [sessionId]);
|
|
79907
80071
|
return {
|
|
79908
80072
|
visible: eligible && !hidden,
|
|
79909
80073
|
dismiss,
|
|
79910
|
-
|
|
80074
|
+
remindLater
|
|
79911
80075
|
};
|
|
79912
80076
|
}
|
|
79913
80077
|
const log$l = createLogger("useChatActions");
|
|
79914
|
-
function
|
|
80078
|
+
function getMemoryUpdateSources$1(result) {
|
|
80079
|
+
const sources = result.sources ?? {};
|
|
79915
80080
|
return {
|
|
79916
|
-
|
|
79917
|
-
|
|
79918
|
-
|
|
79919
|
-
|
|
79920
|
-
|
|
79921
|
-
|
|
79922
|
-
updatedAt: Date.now()
|
|
80081
|
+
date: sources.date ?? "",
|
|
80082
|
+
directSessionCount: sources.directSessionCount ?? 0,
|
|
80083
|
+
totalMessages: sources.totalMessages ?? 0,
|
|
80084
|
+
directSessionTitles: sources.directSessionTitles ?? [],
|
|
80085
|
+
groupDigestCount: sources.groupDigestCount ?? 0,
|
|
80086
|
+
groupDigestNames: sources.groupDigestNames ?? []
|
|
79923
80087
|
};
|
|
79924
80088
|
}
|
|
79925
80089
|
function createSystemMessage(sessionId, id32, blocks) {
|
|
@@ -79935,12 +80099,12 @@ function createSystemMessage(sessionId, id32, blocks) {
|
|
|
79935
80099
|
}
|
|
79936
80100
|
function buildMemoryUpdateProgressText(progress2) {
|
|
79937
80101
|
if (progress2.stage === "preparing") {
|
|
79938
|
-
return "⏳
|
|
80102
|
+
return "⏳ 正在从近期对话整理长期记忆…";
|
|
79939
80103
|
}
|
|
79940
80104
|
if (progress2.total <= 1) {
|
|
79941
80105
|
return `⏳ 正在更新「${progress2.currentAgent}」的长期记忆…`;
|
|
79942
80106
|
}
|
|
79943
|
-
return `⏳
|
|
80107
|
+
return `⏳ 正在整理长期记忆…(${Math.min(progress2.completed + 1, progress2.total)}/${progress2.total})当前:${progress2.currentAgent}`;
|
|
79944
80108
|
}
|
|
79945
80109
|
function buildMemoryUpdateResultBlocks(result) {
|
|
79946
80110
|
const title2 = result.status === "success" ? "记忆更新完成" : result.status === "partial" ? `记忆更新部分完成(${result.succeededAgents}/${result.totalAgents})` : "记忆更新未完成";
|
|
@@ -79948,6 +80112,10 @@ function buildMemoryUpdateResultBlocks(result) {
|
|
|
79948
80112
|
result.results.forEach((agentResult) => {
|
|
79949
80113
|
const statusLabel2 = agentResult.status === "success" ? "成功" : agentResult.status === "no-changes" ? "无变更" : "失败";
|
|
79950
80114
|
lines.push(`### ${agentResult.agentName} · ${statusLabel2}`);
|
|
80115
|
+
const sources = getMemoryUpdateSources$1(agentResult);
|
|
80116
|
+
if (sources.directSessionCount > 0) {
|
|
80117
|
+
lines.push(`- 来源:${sources.directSessionCount} 个 direct sessions,${sources.totalMessages} 条消息`);
|
|
80118
|
+
}
|
|
79951
80119
|
if (agentResult.changedFiles.length > 0) {
|
|
79952
80120
|
lines.push(...agentResult.changedFiles.map((file) => {
|
|
79953
80121
|
const fileStatus = file.status === "created" ? "新增" : file.status === "updated" ? "更新" : file.status === "unchanged" ? "无变化" : "失败";
|
|
@@ -79978,64 +80146,6 @@ function useChatActions({ sessionId, conversation: conversation2, primaryAgent }
|
|
|
79978
80146
|
}, [sessionId]);
|
|
79979
80147
|
const handleSendMessage = reactExports.useCallback(
|
|
79980
80148
|
async (message2) => {
|
|
79981
|
-
if (message2.content === "/clear") {
|
|
79982
|
-
const localMsg = createLocalUserMessage(sessionId, message2.content);
|
|
79983
|
-
const store = useMessageStore.getState();
|
|
79984
|
-
store.addFetchedMessage(sessionId, localMsg);
|
|
79985
|
-
await getTransport().createNewSession(sessionId);
|
|
79986
|
-
await getTransport().requestConversationSnapshot(sessionId);
|
|
79987
|
-
return null;
|
|
79988
|
-
}
|
|
79989
|
-
if (message2.content === "/compact" || message2.content.startsWith("/compact ")) {
|
|
79990
|
-
const compactTips = message2.content.startsWith("/compact ") ? message2.content.slice("/compact ".length).trim() || void 0 : void 0;
|
|
79991
|
-
const localMsg = createLocalUserMessage(sessionId, message2.content);
|
|
79992
|
-
const store = useMessageStore.getState();
|
|
79993
|
-
store.addFetchedMessage(sessionId, localMsg);
|
|
79994
|
-
const systemId = `system-compact-${sessionId}`;
|
|
79995
|
-
const systemMsg = createSystemMessage(sessionId, systemId, [
|
|
79996
|
-
{ type: "text", text: `⏳ ${t2("compactLoading", "正在整理关键上下文...")}` }
|
|
79997
|
-
]);
|
|
79998
|
-
systemMsg.createdAt = localMsg.createdAt + 1;
|
|
79999
|
-
systemMsg.updatedAt = localMsg.createdAt + 1;
|
|
80000
|
-
store.addFetchedMessage(sessionId, systemMsg);
|
|
80001
|
-
useMessageStore.setState((state2) => ({
|
|
80002
|
-
sendingMap: new Map(state2.sendingMap).set(sessionId, true)
|
|
80003
|
-
}));
|
|
80004
|
-
try {
|
|
80005
|
-
await getTransport().compactConversation(sessionId, compactTips);
|
|
80006
|
-
await getTransport().requestConversationSnapshot(sessionId);
|
|
80007
|
-
store.addFetchedMessage(sessionId, {
|
|
80008
|
-
id: systemId,
|
|
80009
|
-
sessionId,
|
|
80010
|
-
senderRole: "system",
|
|
80011
|
-
senderId: "system",
|
|
80012
|
-
blocks: [{ type: "text", text: t2("contextCompacted") }],
|
|
80013
|
-
createdAt: Date.now(),
|
|
80014
|
-
updatedAt: Date.now()
|
|
80015
|
-
});
|
|
80016
|
-
return null;
|
|
80017
|
-
} catch (e2) {
|
|
80018
|
-
const errMsg = e2 instanceof Error ? e2.message : t2("compactFailed", "整理失败");
|
|
80019
|
-
store.addFetchedMessage(sessionId, {
|
|
80020
|
-
id: systemId,
|
|
80021
|
-
sessionId,
|
|
80022
|
-
senderRole: "system",
|
|
80023
|
-
senderId: "system",
|
|
80024
|
-
blocks: [{ type: "text", text: errMsg }],
|
|
80025
|
-
createdAt: Date.now(),
|
|
80026
|
-
updatedAt: Date.now()
|
|
80027
|
-
});
|
|
80028
|
-
return null;
|
|
80029
|
-
} finally {
|
|
80030
|
-
useMessageStore.setState((state2) => {
|
|
80031
|
-
const val = state2.sendingMap.get(sessionId);
|
|
80032
|
-
if (val) {
|
|
80033
|
-
return { sendingMap: new Map(state2.sendingMap).set(sessionId, false) };
|
|
80034
|
-
}
|
|
80035
|
-
return {};
|
|
80036
|
-
});
|
|
80037
|
-
}
|
|
80038
|
-
}
|
|
80039
80149
|
const conv = getConversation();
|
|
80040
80150
|
const metadata = {
|
|
80041
80151
|
supervisorId: message2.supervisor,
|
|
@@ -80089,7 +80199,7 @@ function useChatActions({ sessionId, conversation: conversation2, primaryAgent }
|
|
|
80089
80199
|
const store = useMessageStore.getState();
|
|
80090
80200
|
const startedAt = Date.now();
|
|
80091
80201
|
const pendingMsg = createSystemMessage(sessionId, systemId, [
|
|
80092
|
-
{ type: "text", text: "⏳
|
|
80202
|
+
{ type: "text", text: "⏳ 正在从近期对话整理长期记忆…" }
|
|
80093
80203
|
]);
|
|
80094
80204
|
pendingMsg.createdAt = startedAt;
|
|
80095
80205
|
pendingMsg.updatedAt = startedAt;
|
|
@@ -81040,33 +81150,41 @@ function CreateDirectSessionDialog({
|
|
|
81040
81150
|
] })
|
|
81041
81151
|
] }) });
|
|
81042
81152
|
}
|
|
81043
|
-
const wrapper$4 = "
|
|
81044
|
-
const headerTop = "
|
|
81045
|
-
const avatarCol = "
|
|
81046
|
-
const groupIcon = "
|
|
81047
|
-
const infoCol = "
|
|
81048
|
-
const nameRow = "
|
|
81049
|
-
const titleWrap = "
|
|
81050
|
-
const headerTitleGroup = "
|
|
81051
|
-
const title$a = "
|
|
81052
|
-
const sessionTitle = "
|
|
81053
|
-
const healthDot = "
|
|
81054
|
-
const
|
|
81055
|
-
const
|
|
81056
|
-
const
|
|
81057
|
-
const
|
|
81058
|
-
const
|
|
81059
|
-
const
|
|
81060
|
-
const
|
|
81061
|
-
const
|
|
81062
|
-
const
|
|
81063
|
-
const
|
|
81064
|
-
const
|
|
81065
|
-
const
|
|
81066
|
-
const
|
|
81067
|
-
const
|
|
81068
|
-
const
|
|
81069
|
-
const
|
|
81153
|
+
const wrapper$4 = "_wrapper_1ga1n_10";
|
|
81154
|
+
const headerTop = "_headerTop_1ga1n_19";
|
|
81155
|
+
const avatarCol = "_avatarCol_1ga1n_27";
|
|
81156
|
+
const groupIcon = "_groupIcon_1ga1n_44";
|
|
81157
|
+
const infoCol = "_infoCol_1ga1n_55";
|
|
81158
|
+
const nameRow = "_nameRow_1ga1n_63";
|
|
81159
|
+
const titleWrap = "_titleWrap_1ga1n_72";
|
|
81160
|
+
const headerTitleGroup = "_headerTitleGroup_1ga1n_80";
|
|
81161
|
+
const title$a = "_title_1ga1n_72";
|
|
81162
|
+
const sessionTitle = "_sessionTitle_1ga1n_101";
|
|
81163
|
+
const healthDot = "_healthDot_1ga1n_111";
|
|
81164
|
+
const contextHealthPill = "_contextHealthPill_1ga1n_119";
|
|
81165
|
+
const contextHealthPillWarning = "_contextHealthPillWarning_1ga1n_132";
|
|
81166
|
+
const contextHealthPillFailed = "_contextHealthPillFailed_1ga1n_137";
|
|
81167
|
+
const contextHealthPillLoading = "_contextHealthPillLoading_1ga1n_142";
|
|
81168
|
+
const contextHealthPillSuccess = "_contextHealthPillSuccess_1ga1n_148";
|
|
81169
|
+
const contextHealthSpinner = "_contextHealthSpinner_1ga1n_153";
|
|
81170
|
+
const contextHealthTooltip = "_contextHealthTooltip_1ga1n_168";
|
|
81171
|
+
const contextHealthTooltipTitle = "_contextHealthTooltipTitle_1ga1n_175";
|
|
81172
|
+
const menuIcon = "_menuIcon_1ga1n_183";
|
|
81173
|
+
const subtitleRow = "_subtitleRow_1ga1n_194";
|
|
81174
|
+
const memberRow = "_memberRow_1ga1n_205";
|
|
81175
|
+
const chip = "_chip_1ga1n_235";
|
|
81176
|
+
const chipAvatarWrap = "_chipAvatarWrap_1ga1n_252";
|
|
81177
|
+
const chipName = "_chipName_1ga1n_257";
|
|
81178
|
+
const channelList$1 = "_channelList_1ga1n_265";
|
|
81179
|
+
const channelItem = "_channelItem_1ga1n_270";
|
|
81180
|
+
const channelItemActive = "_channelItemActive_1ga1n_284";
|
|
81181
|
+
const channelDot = "_channelDot_1ga1n_288";
|
|
81182
|
+
const channelName = "_channelName_1ga1n_295";
|
|
81183
|
+
const channelBadge = "_channelBadge_1ga1n_305";
|
|
81184
|
+
const channelLock = "_channelLock_1ga1n_315";
|
|
81185
|
+
const channelArrow = "_channelArrow_1ga1n_320";
|
|
81186
|
+
const hamburgerBtn = "_hamburgerBtn_1ga1n_326";
|
|
81187
|
+
const newThreadBtn = "_newThreadBtn_1ga1n_353";
|
|
81070
81188
|
const styles$I = {
|
|
81071
81189
|
wrapper: wrapper$4,
|
|
81072
81190
|
headerTop,
|
|
@@ -81079,6 +81197,14 @@ const styles$I = {
|
|
|
81079
81197
|
title: title$a,
|
|
81080
81198
|
sessionTitle,
|
|
81081
81199
|
healthDot,
|
|
81200
|
+
contextHealthPill,
|
|
81201
|
+
contextHealthPillWarning,
|
|
81202
|
+
contextHealthPillFailed,
|
|
81203
|
+
contextHealthPillLoading,
|
|
81204
|
+
contextHealthPillSuccess,
|
|
81205
|
+
contextHealthSpinner,
|
|
81206
|
+
contextHealthTooltip,
|
|
81207
|
+
contextHealthTooltipTitle,
|
|
81082
81208
|
menuIcon,
|
|
81083
81209
|
subtitleRow,
|
|
81084
81210
|
memberRow,
|
|
@@ -81102,6 +81228,87 @@ const HEALTH_COLORS = {
|
|
|
81102
81228
|
unhealthy: "#ef4444",
|
|
81103
81229
|
unknown: "#94a3b8"
|
|
81104
81230
|
};
|
|
81231
|
+
function formatCompactTokenCount(value2) {
|
|
81232
|
+
if (value2 === void 0) return "—";
|
|
81233
|
+
if (value2 >= 1e6) return `${(value2 / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
81234
|
+
if (value2 >= 1e3) return `${(value2 / 1e3).toFixed(1).replace(/\.0$/, "")}k`;
|
|
81235
|
+
return `${value2}`;
|
|
81236
|
+
}
|
|
81237
|
+
function getContextHealthReasonLabel(reason, t2) {
|
|
81238
|
+
if (reason === "manual") return t2("contextHealth.reasonManual", "手动整理");
|
|
81239
|
+
if (reason === "reactive_context_overflow") return t2("contextHealth.reasonReactive", "溢出修复");
|
|
81240
|
+
if (reason === "step_boundary_budget") return t2("contextHealth.reasonStepBoundary", "步骤间压缩");
|
|
81241
|
+
return t2("contextHealth.reasonProactive", "主动整理");
|
|
81242
|
+
}
|
|
81243
|
+
function getContextHealthTone(input2) {
|
|
81244
|
+
if (input2.isFailed) return "danger";
|
|
81245
|
+
if (input2.currentPreparedTokens === void 0 || input2.inputTokenLimit === void 0 || input2.thresholdRatio === void 0 || input2.inputTokenLimit <= 0) {
|
|
81246
|
+
return "default";
|
|
81247
|
+
}
|
|
81248
|
+
const usageRatio = input2.currentPreparedTokens / input2.inputTokenLimit;
|
|
81249
|
+
if (usageRatio >= input2.thresholdRatio) return "danger";
|
|
81250
|
+
if (usageRatio >= input2.thresholdRatio * 0.875) return "warning";
|
|
81251
|
+
return "default";
|
|
81252
|
+
}
|
|
81253
|
+
function ContextHealthPill({
|
|
81254
|
+
compaction,
|
|
81255
|
+
t: t2
|
|
81256
|
+
}) {
|
|
81257
|
+
const [now2, setNow] = reactExports.useState(() => Date.now());
|
|
81258
|
+
const hasUsage2 = compaction?.currentPreparedTokens !== void 0 && compaction.inputTokenLimit !== void 0 && compaction.inputTokenLimit > 0;
|
|
81259
|
+
const last = compaction?.lastCompaction;
|
|
81260
|
+
const isStarted = last?.phase === "started";
|
|
81261
|
+
const isFailed = last?.phase === "failed";
|
|
81262
|
+
const showManualCompletedReceipt = Boolean(
|
|
81263
|
+
last?.phase === "completed" && last.reason === "manual" && now2 - last.at < 3e3
|
|
81264
|
+
);
|
|
81265
|
+
reactExports.useEffect(() => {
|
|
81266
|
+
if (!showManualCompletedReceipt || !last) return;
|
|
81267
|
+
const remainingMs = Math.max(0, 3e3 - (Date.now() - last.at));
|
|
81268
|
+
const timer2 = window.setTimeout(() => setNow(Date.now()), remainingMs + 50);
|
|
81269
|
+
return () => window.clearTimeout(timer2);
|
|
81270
|
+
}, [last, showManualCompletedReceipt]);
|
|
81271
|
+
if (!compaction || !hasUsage2 && !last) return null;
|
|
81272
|
+
const currentPrepared = formatCompactTokenCount(compaction.currentPreparedTokens);
|
|
81273
|
+
const currentLimit = formatCompactTokenCount(compaction.inputTokenLimit);
|
|
81274
|
+
const tone = getContextHealthTone({
|
|
81275
|
+
currentPreparedTokens: compaction.currentPreparedTokens,
|
|
81276
|
+
inputTokenLimit: compaction.inputTokenLimit,
|
|
81277
|
+
thresholdRatio: compaction.thresholdRatio,
|
|
81278
|
+
isFailed
|
|
81279
|
+
});
|
|
81280
|
+
const before = formatCompactTokenCount(last?.durableBeforeTokens ?? last?.triggerTokens);
|
|
81281
|
+
const after = formatCompactTokenCount(last?.durableAfterTokens);
|
|
81282
|
+
const reasonLabel = getContextHealthReasonLabel(last?.reason, t2);
|
|
81283
|
+
const tooltip = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$I.contextHealthTooltip, children: [
|
|
81284
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$I.contextHealthTooltipTitle, children: t2("contextHealth.title", "上下文状态") }),
|
|
81285
|
+
hasUsage2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.currentUsage", "当前估算:{{current}} / {{limit}}", { current: currentPrepared, limit: currentLimit }) }),
|
|
81286
|
+
compaction.thresholdRatio !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.thresholdRatio", "整理阈值:{{percent}}", { percent: `${Math.round(compaction.thresholdRatio * 100)}%` }) }),
|
|
81287
|
+
last && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
81288
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.lastCompaction", "最近整理:{{value}}", { value: isStarted ? t2("contextHealth.compacting", "整理中") : isFailed ? t2("contextHealth.failed", "失败") : reasonLabel }) }),
|
|
81289
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.lastResult", "最近结果:{{value}}", { value: isStarted ? t2("contextHealth.compacting", "整理中") : isFailed ? last.errorMessage || t2("compactFailed", "整理失败") : `${before} → ${after}` }) }),
|
|
81290
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.totalCompactions", "累计整理:{{count}} 次", { count: compaction.totalCompactions }) }),
|
|
81291
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: t2("contextHealth.targetLimit", "目标阈值:{{value}}", { value: formatCompactTokenCount(last.targetTokenLimit) }) })
|
|
81292
|
+
] })
|
|
81293
|
+
] });
|
|
81294
|
+
const label2 = isStarted ? t2("contextHealth.compacting", "整理中") : isFailed ? t2("contextHealth.failed", "整理失败") : showManualCompletedReceipt ? t2("contextHealth.compacted", "已整理") : hasUsage2 ? `${currentPrepared} / ${currentLimit}` : `${t2("contextHealth.title", "上下文状态")} ${before} → ${after}`;
|
|
81295
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: tooltip, side: "bottom", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
81296
|
+
"span",
|
|
81297
|
+
{
|
|
81298
|
+
className: clsx(
|
|
81299
|
+
styles$I.contextHealthPill,
|
|
81300
|
+
isStarted && styles$I.contextHealthPillLoading,
|
|
81301
|
+
showManualCompletedReceipt && styles$I.contextHealthPillSuccess,
|
|
81302
|
+
tone === "warning" && styles$I.contextHealthPillWarning,
|
|
81303
|
+
tone === "danger" && styles$I.contextHealthPillFailed
|
|
81304
|
+
),
|
|
81305
|
+
children: [
|
|
81306
|
+
isStarted && /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { size: 11, className: styles$I.contextHealthSpinner, "aria-hidden": "true" }),
|
|
81307
|
+
label2
|
|
81308
|
+
]
|
|
81309
|
+
}
|
|
81310
|
+
) });
|
|
81311
|
+
}
|
|
81105
81312
|
function renderHeaderAvatar({
|
|
81106
81313
|
isGroup,
|
|
81107
81314
|
primaryAgent,
|
|
@@ -81164,6 +81371,8 @@ function ChatHeaderBar({
|
|
|
81164
81371
|
const updateDirectSessionTitle = useConversationStore((s2) => s2.updateDirectSessionTitle);
|
|
81165
81372
|
const archiveDirectSession = useConversationStore((s2) => s2.archiveDirectSession);
|
|
81166
81373
|
const activeSessionId = useConversationStore((s2) => s2.activeSessionId);
|
|
81374
|
+
const currentSessionId = activeSessionId ?? conversation2.id;
|
|
81375
|
+
const contextCompaction = useMessageStore((s2) => s2.contextCompactionMap.get(currentSessionId));
|
|
81167
81376
|
const [createDialogOpen, setCreateDialogOpen] = reactExports.useState(false);
|
|
81168
81377
|
const [pendingArchiveId, setPendingArchiveId] = reactExports.useState(null);
|
|
81169
81378
|
const [optimisticArchived, setOptimisticArchived] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
@@ -81395,7 +81604,8 @@ function ChatHeaderBar({
|
|
|
81395
81604
|
style: { backgroundColor: HEALTH_COLORS[status2] }
|
|
81396
81605
|
}
|
|
81397
81606
|
) });
|
|
81398
|
-
})()
|
|
81607
|
+
})(),
|
|
81608
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextHealthPill, { compaction: contextCompaction, t: t2 })
|
|
81399
81609
|
] }),
|
|
81400
81610
|
menuItems.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81401
81611
|
DropdownMenu,
|
|
@@ -81682,54 +81892,52 @@ const useQuickReplyStore = create$3((set2, get2) => ({
|
|
|
81682
81892
|
}
|
|
81683
81893
|
}
|
|
81684
81894
|
}));
|
|
81685
|
-
const picker = "
|
|
81686
|
-
const
|
|
81687
|
-
const
|
|
81688
|
-
const title$9 = "
|
|
81689
|
-
const
|
|
81690
|
-
const
|
|
81691
|
-
const
|
|
81692
|
-
const
|
|
81693
|
-
const
|
|
81694
|
-
const
|
|
81695
|
-
const itemText = "
|
|
81696
|
-
const
|
|
81697
|
-
const
|
|
81698
|
-
const
|
|
81699
|
-
const
|
|
81700
|
-
const
|
|
81701
|
-
const state = "
|
|
81702
|
-
const emptyState$3 = "
|
|
81703
|
-
const emptyTitle$1 = "
|
|
81704
|
-
const emptyDescription = "
|
|
81705
|
-
const
|
|
81706
|
-
const
|
|
81707
|
-
const
|
|
81708
|
-
const
|
|
81709
|
-
const
|
|
81710
|
-
const secondaryAction = "_secondaryAction_wowm2_247";
|
|
81895
|
+
const picker = "_picker_1agw9_1";
|
|
81896
|
+
const editor$1 = "_editor_1agw9_17";
|
|
81897
|
+
const header$c = "_header_1agw9_21";
|
|
81898
|
+
const title$9 = "_title_1agw9_29";
|
|
81899
|
+
const textButton = "_textButton_1agw9_35";
|
|
81900
|
+
const list$5 = "_list_1agw9_51";
|
|
81901
|
+
const item$7 = "_item_1agw9_56";
|
|
81902
|
+
const itemActive$1 = "_itemActive_1agw9_68";
|
|
81903
|
+
const itemPreview = "_itemPreview_1agw9_72";
|
|
81904
|
+
const activeRail = "_activeRail_1agw9_76";
|
|
81905
|
+
const itemText = "_itemText_1agw9_91";
|
|
81906
|
+
const moreButton = "_moreButton_1agw9_106";
|
|
81907
|
+
const itemMenu = "_itemMenu_1agw9_132";
|
|
81908
|
+
const dangerAction = "_dangerAction_1agw9_159";
|
|
81909
|
+
const footer$5 = "_footer_1agw9_163";
|
|
81910
|
+
const manageButton = "_manageButton_1agw9_174";
|
|
81911
|
+
const state = "_state_1agw9_194";
|
|
81912
|
+
const emptyState$3 = "_emptyState_1agw9_195";
|
|
81913
|
+
const emptyTitle$1 = "_emptyTitle_1agw9_205";
|
|
81914
|
+
const emptyDescription = "_emptyDescription_1agw9_212";
|
|
81915
|
+
const field$8 = "_field_1agw9_225";
|
|
81916
|
+
const editorActions$1 = "_editorActions_1agw9_257";
|
|
81917
|
+
const editorHint = "_editorHint_1agw9_263";
|
|
81918
|
+
const primaryAction = "_primaryAction_1agw9_269";
|
|
81919
|
+
const secondaryAction = "_secondaryAction_1agw9_270";
|
|
81711
81920
|
const styles$H = {
|
|
81712
81921
|
picker,
|
|
81922
|
+
editor: editor$1,
|
|
81713
81923
|
header: header$c,
|
|
81714
|
-
listHeader,
|
|
81715
81924
|
title: title$9,
|
|
81716
|
-
headerActions: headerActions$3,
|
|
81717
|
-
iconButton,
|
|
81718
81925
|
textButton,
|
|
81719
81926
|
list: list$5,
|
|
81720
81927
|
item: item$7,
|
|
81721
81928
|
itemActive: itemActive$1,
|
|
81722
|
-
itemText,
|
|
81723
81929
|
itemPreview,
|
|
81930
|
+
activeRail,
|
|
81931
|
+
itemText,
|
|
81724
81932
|
moreButton,
|
|
81725
81933
|
itemMenu,
|
|
81726
81934
|
dangerAction,
|
|
81727
81935
|
footer: footer$5,
|
|
81936
|
+
manageButton,
|
|
81728
81937
|
state,
|
|
81729
81938
|
emptyState: emptyState$3,
|
|
81730
81939
|
emptyTitle: emptyTitle$1,
|
|
81731
81940
|
emptyDescription,
|
|
81732
|
-
editor: editor$1,
|
|
81733
81941
|
field: field$8,
|
|
81734
81942
|
editorActions: editorActions$1,
|
|
81735
81943
|
editorHint,
|
|
@@ -81741,8 +81949,7 @@ function QuickReplyPicker({
|
|
|
81741
81949
|
onActiveIndexChange,
|
|
81742
81950
|
onSelect,
|
|
81743
81951
|
onClose,
|
|
81744
|
-
style
|
|
81745
|
-
sendMode = false
|
|
81952
|
+
style
|
|
81746
81953
|
}) {
|
|
81747
81954
|
const { t: t2 } = useTranslation();
|
|
81748
81955
|
const { showToast } = useToast();
|
|
@@ -81833,39 +82040,43 @@ function QuickReplyPicker({
|
|
|
81833
82040
|
if (quickReplies.length === 0) {
|
|
81834
82041
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.emptyState, children: [
|
|
81835
82042
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.emptyTitle, children: t2("quickReply.emptyTitle", "还没有快捷回复") }),
|
|
81836
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.emptyDescription, children: t2("quickReply.emptyDescription", "
|
|
82043
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.emptyDescription, children: t2("quickReply.emptyDescription", "把常用的话保存下来,下次一键发送。") }),
|
|
81837
82044
|
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: styles$H.primaryAction, onClick: () => setMode({ type: "create" }), children: t2("quickReply.addFirst", "添加第一条") })
|
|
81838
82045
|
] });
|
|
81839
82046
|
}
|
|
81840
82047
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.list, role: "listbox", "aria-label": t2("quickReply.title", "快捷回复"), children: [
|
|
81841
|
-
quickReplies.map((reply, index2) =>
|
|
81842
|
-
|
|
81843
|
-
|
|
81844
|
-
|
|
81845
|
-
|
|
81846
|
-
|
|
81847
|
-
|
|
81848
|
-
|
|
81849
|
-
|
|
81850
|
-
|
|
81851
|
-
|
|
81852
|
-
"
|
|
81853
|
-
{
|
|
81854
|
-
|
|
81855
|
-
|
|
81856
|
-
|
|
81857
|
-
|
|
81858
|
-
|
|
81859
|
-
|
|
81860
|
-
|
|
81861
|
-
|
|
81862
|
-
|
|
81863
|
-
|
|
81864
|
-
|
|
81865
|
-
|
|
81866
|
-
|
|
81867
|
-
|
|
81868
|
-
|
|
82048
|
+
quickReplies.map((reply, index2) => {
|
|
82049
|
+
const active2 = index2 === activeIndex;
|
|
82050
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
82051
|
+
"div",
|
|
82052
|
+
{
|
|
82053
|
+
role: "option",
|
|
82054
|
+
"aria-selected": active2,
|
|
82055
|
+
className: clsx(styles$H.item, active2 && styles$H.itemActive),
|
|
82056
|
+
onMouseEnter: () => onActiveIndexChange(index2),
|
|
82057
|
+
onClick: () => onSelect(reply),
|
|
82058
|
+
children: [
|
|
82059
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.activeRail, "aria-hidden": "true" }),
|
|
82060
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.itemText, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.itemPreview, children: reply.content }) }),
|
|
82061
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82062
|
+
"button",
|
|
82063
|
+
{
|
|
82064
|
+
type: "button",
|
|
82065
|
+
className: styles$H.moreButton,
|
|
82066
|
+
"aria-label": t2("quickReply.moreActions", "更多操作"),
|
|
82067
|
+
onClick: (event) => {
|
|
82068
|
+
event.stopPropagation();
|
|
82069
|
+
const rect2 = event.currentTarget.getBoundingClientRect();
|
|
82070
|
+
setOpenMenu((current) => current?.reply.id === reply.id ? null : { reply, rect: rect2 });
|
|
82071
|
+
},
|
|
82072
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Ellipsis, { size: 15, "aria-hidden": "true" })
|
|
82073
|
+
}
|
|
82074
|
+
)
|
|
82075
|
+
]
|
|
82076
|
+
},
|
|
82077
|
+
reply.id
|
|
82078
|
+
);
|
|
82079
|
+
}),
|
|
81869
82080
|
openMenu && reactDomExports.createPortal(
|
|
81870
82081
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
81871
82082
|
"div",
|
|
@@ -81942,47 +82153,32 @@ function QuickReplyPicker({
|
|
|
81942
82153
|
updateQuickReply
|
|
81943
82154
|
]);
|
|
81944
82155
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.picker, style, ref: pickerRef, children: [
|
|
81945
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className:
|
|
81946
|
-
|
|
81947
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
81948
|
-
|
|
81949
|
-
|
|
81950
|
-
|
|
81951
|
-
|
|
81952
|
-
|
|
81953
|
-
|
|
81954
|
-
|
|
81955
|
-
|
|
81956
|
-
}
|
|
81957
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81958
|
-
"button",
|
|
81959
|
-
{
|
|
81960
|
-
type: "button",
|
|
81961
|
-
className: styles$H.textButton,
|
|
81962
|
-
onClick: () => setMode({ type: "list" }),
|
|
81963
|
-
children: t2("common.cancel", "取消")
|
|
81964
|
-
}
|
|
81965
|
-
),
|
|
81966
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
81967
|
-
"button",
|
|
81968
|
-
{
|
|
81969
|
-
type: "button",
|
|
81970
|
-
className: styles$H.iconButton,
|
|
81971
|
-
"aria-label": t2("common.close", "关闭"),
|
|
81972
|
-
onClick: onClose,
|
|
81973
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X$2, { size: 16, "aria-hidden": "true" })
|
|
81974
|
-
}
|
|
81975
|
-
)
|
|
81976
|
-
] })
|
|
82156
|
+
mode2.type !== "list" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.header, children: [
|
|
82157
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$H.title, children: mode2.type === "create" ? t2("quickReply.addTitle", "添加快捷回复") : t2("quickReply.editTitle", "编辑快捷回复") }),
|
|
82158
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82159
|
+
"button",
|
|
82160
|
+
{
|
|
82161
|
+
type: "button",
|
|
82162
|
+
className: styles$H.textButton,
|
|
82163
|
+
onClick: () => setMode({ type: "list" }),
|
|
82164
|
+
children: t2("common.cancel", "取消")
|
|
82165
|
+
}
|
|
82166
|
+
)
|
|
81977
82167
|
] }),
|
|
81978
82168
|
content2,
|
|
81979
82169
|
mode2.type === "list" && quickReplies.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.footer, children: [
|
|
81980
|
-
|
|
81981
|
-
|
|
81982
|
-
|
|
81983
|
-
|
|
81984
|
-
|
|
81985
|
-
|
|
82170
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
82171
|
+
"↑↓ ",
|
|
82172
|
+
t2("quickReply.selectHint", "选择"),
|
|
82173
|
+
" · Enter ",
|
|
82174
|
+
t2("quickReply.sendHint", "发送"),
|
|
82175
|
+
" · Esc ",
|
|
82176
|
+
t2("common.close", "关闭")
|
|
82177
|
+
] }),
|
|
82178
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: styles$H.manageButton, onClick: () => setMode({ type: "create" }), children: [
|
|
82179
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 12, "aria-hidden": "true" }),
|
|
82180
|
+
t2("quickReply.manage", "管理")
|
|
82181
|
+
] })
|
|
81986
82182
|
] })
|
|
81987
82183
|
] });
|
|
81988
82184
|
}
|
|
@@ -82696,9 +82892,6 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
82696
82892
|
onSend,
|
|
82697
82893
|
isLoading,
|
|
82698
82894
|
onStop,
|
|
82699
|
-
onCompact,
|
|
82700
|
-
onClearRequest,
|
|
82701
|
-
onCommandExecute,
|
|
82702
82895
|
className,
|
|
82703
82896
|
initialValue,
|
|
82704
82897
|
sessionId,
|
|
@@ -82916,6 +83109,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
82916
83109
|
const updateDropdownPosition = reactExports.useCallback(() => {
|
|
82917
83110
|
dropdownPosition.updateFromInputWrapper(inputWrapperRef.current);
|
|
82918
83111
|
}, [dropdownPosition]);
|
|
83112
|
+
const sendingRef = reactExports.useRef(false);
|
|
82919
83113
|
const handleSelectAll = () => {
|
|
82920
83114
|
const before = input2.slice(0, mentionStartPos);
|
|
82921
83115
|
const after = input2.slice(textareaRef.current?.selectionStart || 0);
|
|
@@ -82933,64 +83127,60 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
82933
83127
|
setMentions((mentions) => [...mentions, agent2]);
|
|
82934
83128
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82935
83129
|
};
|
|
82936
|
-
const
|
|
83130
|
+
const handleCompleteCommand = (command2) => {
|
|
82937
83131
|
setShowCommandDropdown(false);
|
|
82938
|
-
if (command2.name === "/compact") {
|
|
82939
|
-
if (onCommandExecute) {
|
|
82940
|
-
onCommandExecute("compact");
|
|
82941
|
-
} else {
|
|
82942
|
-
onCompact?.();
|
|
82943
|
-
}
|
|
82944
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82945
|
-
return;
|
|
82946
|
-
}
|
|
82947
|
-
if (command2.name === "/clear") {
|
|
82948
|
-
if (onCommandExecute) {
|
|
82949
|
-
onCommandExecute("clear");
|
|
82950
|
-
} else {
|
|
82951
|
-
onClearRequest?.();
|
|
82952
|
-
}
|
|
82953
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82954
|
-
return;
|
|
82955
|
-
}
|
|
82956
83132
|
const before = input2.slice(0, commandStartPos);
|
|
82957
83133
|
const after = input2.slice(textareaRef.current?.selectionStart || 0);
|
|
82958
83134
|
updateInput(`${before}${command2.name} ${after}`);
|
|
82959
83135
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82960
83136
|
};
|
|
83137
|
+
const handleSendCommand = reactExports.useCallback(async (command2) => {
|
|
83138
|
+
setShowCommandDropdown(false);
|
|
83139
|
+
if (sendingRef.current || isLoading) {
|
|
83140
|
+
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
83141
|
+
return;
|
|
83142
|
+
}
|
|
83143
|
+
sendingRef.current = true;
|
|
83144
|
+
try {
|
|
83145
|
+
await onSend({ content: command2.name, attachments: [], mentions: [] });
|
|
83146
|
+
} finally {
|
|
83147
|
+
sendingRef.current = false;
|
|
83148
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
83149
|
+
}
|
|
83150
|
+
}, [isLoading, onSend, showToast, t2]);
|
|
83151
|
+
const buildMessageTarget = reactExports.useCallback((rawInput) => {
|
|
83152
|
+
const mentionIds = [];
|
|
83153
|
+
for (const agent2 of mentionAgents) {
|
|
83154
|
+
if (rawInput.includes("@" + agent2.name)) {
|
|
83155
|
+
mentionIds.push(agent2.id);
|
|
83156
|
+
}
|
|
83157
|
+
}
|
|
83158
|
+
const hasAll = conversationType === "group" && /\B@all\b/i.test(rawInput);
|
|
83159
|
+
const { mentions, broadcast } = buildBroadcastTarget(mentionIds, hasAll);
|
|
83160
|
+
const supervisor2 = supervisionMode && supervisorId ? supervisorId : void 0;
|
|
83161
|
+
if (supervisor2) {
|
|
83162
|
+
persistSupervisor(supervisor2);
|
|
83163
|
+
}
|
|
83164
|
+
return { mentions, broadcast, supervisor: supervisor2 };
|
|
83165
|
+
}, [conversationType, mentionAgents, persistSupervisor, supervisionMode, supervisorId]);
|
|
82961
83166
|
const handleSelectQuickReply = reactExports.useCallback(async (reply) => {
|
|
82962
83167
|
setShowQuickReplyPicker(false);
|
|
82963
|
-
if (
|
|
82964
|
-
|
|
82965
|
-
|
|
82966
|
-
|
|
82967
|
-
|
|
82968
|
-
|
|
82969
|
-
|
|
82970
|
-
|
|
83168
|
+
if (sendingRef.current) return;
|
|
83169
|
+
const content2 = reply.content.trim();
|
|
83170
|
+
if (!content2) return;
|
|
83171
|
+
sendingRef.current = true;
|
|
83172
|
+
try {
|
|
83173
|
+
const { mentions, broadcast, supervisor: supervisor2 } = buildMessageTarget(content2);
|
|
83174
|
+
await onSend({ content: content2, attachments: [], supervisor: supervisor2, mentions, broadcast });
|
|
83175
|
+
} finally {
|
|
83176
|
+
sendingRef.current = false;
|
|
83177
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82971
83178
|
}
|
|
82972
|
-
|
|
82973
|
-
const before = input2.slice(0, cursorPos);
|
|
82974
|
-
const after = input2.slice(cursorPos);
|
|
82975
|
-
const nextInput = `${before}${reply.content}${after}`;
|
|
82976
|
-
const nextCursor = before.length + reply.content.length;
|
|
82977
|
-
updateInput(nextInput);
|
|
82978
|
-
setTimeout(() => {
|
|
82979
|
-
textareaRef.current?.focus();
|
|
82980
|
-
textareaRef.current?.setSelectionRange(nextCursor, nextCursor);
|
|
82981
|
-
}, 0);
|
|
82982
|
-
}, [input2, attachments.length, updateInput, onSend]);
|
|
83179
|
+
}, [buildMessageTarget, onSend]);
|
|
82983
83180
|
const closeQuickReplyPicker = reactExports.useCallback(() => {
|
|
82984
83181
|
setShowQuickReplyPicker(false);
|
|
82985
83182
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82986
83183
|
}, []);
|
|
82987
|
-
const handleCompleteCommand = (command2) => {
|
|
82988
|
-
setShowCommandDropdown(false);
|
|
82989
|
-
const before = input2.slice(0, commandStartPos);
|
|
82990
|
-
const after = input2.slice(textareaRef.current?.selectionStart || 0);
|
|
82991
|
-
updateInput(`${before}${command2.name} ${after}`);
|
|
82992
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
82993
|
-
};
|
|
82994
83184
|
const handleSlashCommandClick = reactExports.useCallback(() => {
|
|
82995
83185
|
setShowCommandDropdown((prev2) => {
|
|
82996
83186
|
if (prev2) return false;
|
|
@@ -83013,7 +83203,6 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83013
83203
|
requestAnimationFrame(updateDropdownPosition);
|
|
83014
83204
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
83015
83205
|
}, [updateDropdownPosition]);
|
|
83016
|
-
const sendingRef = reactExports.useRef(false);
|
|
83017
83206
|
const clearSentDraft = reactExports.useCallback((snapshot, sentConvId) => {
|
|
83018
83207
|
if (sentConvId === sessionId) {
|
|
83019
83208
|
commitInput((prev2) => {
|
|
@@ -83035,22 +83224,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83035
83224
|
try {
|
|
83036
83225
|
const rawInput = input2;
|
|
83037
83226
|
const trimmedInput = rawInput.trim();
|
|
83038
|
-
|
|
83039
|
-
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
83040
|
-
return;
|
|
83041
|
-
}
|
|
83042
|
-
const mentionIds = [];
|
|
83043
|
-
for (const agent2 of mentionAgents) {
|
|
83044
|
-
if (rawInput.includes("@" + agent2.name)) {
|
|
83045
|
-
mentionIds.push(agent2.id);
|
|
83046
|
-
}
|
|
83047
|
-
}
|
|
83048
|
-
const hasAll = conversationType === "group" && /\B@all\b/i.test(rawInput);
|
|
83049
|
-
const { mentions, broadcast } = buildBroadcastTarget(mentionIds, hasAll);
|
|
83050
|
-
const supervisor2 = supervisionMode && supervisorId ? supervisorId : void 0;
|
|
83051
|
-
if (supervisor2) {
|
|
83052
|
-
persistSupervisor(supervisor2);
|
|
83053
|
-
}
|
|
83227
|
+
const { mentions, broadcast, supervisor: supervisor2 } = buildMessageTarget(rawInput);
|
|
83054
83228
|
const snapshot = rawInput;
|
|
83055
83229
|
const sentConvId = sessionId;
|
|
83056
83230
|
const success2 = await onSend({ content: trimmedInput, attachments, supervisor: supervisor2, mentions, broadcast });
|
|
@@ -83070,7 +83244,9 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83070
83244
|
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
83071
83245
|
return;
|
|
83072
83246
|
}
|
|
83073
|
-
|
|
83247
|
+
onSend({ content: "/compact", attachments: [], mentions: [] }).catch((error2) => {
|
|
83248
|
+
log$h.warn("Failed to send /compact command:", error2);
|
|
83249
|
+
});
|
|
83074
83250
|
return;
|
|
83075
83251
|
}
|
|
83076
83252
|
if (mod && e2.shiftKey && e2.key === "Backspace") {
|
|
@@ -83124,7 +83300,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83124
83300
|
} else if (e2.key === "Enter" && !e2.shiftKey) {
|
|
83125
83301
|
e2.preventDefault();
|
|
83126
83302
|
if (filteredCommands[activeIndex]) {
|
|
83127
|
-
|
|
83303
|
+
handleCompleteCommand(filteredCommands[activeIndex]);
|
|
83128
83304
|
}
|
|
83129
83305
|
return;
|
|
83130
83306
|
} else if (e2.key === "Escape") {
|
|
@@ -83166,6 +83342,8 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83166
83342
|
};
|
|
83167
83343
|
const isDropdownOpen = showCommandDropdown || showMentionDropdown || showSupervisorMenu || showQuickReplyPicker;
|
|
83168
83344
|
useRepositionWhileOpen(isDropdownOpen, updateDropdownPosition, [input2, attachments.length, supervisionMode]);
|
|
83345
|
+
const hasDraft = input2.trim().length > 0 || attachments.length > 0;
|
|
83346
|
+
const sendButtonActsAsStop = isLoading && !hasDraft;
|
|
83169
83347
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$F.container, isDropdownOpen && styles$F.containerDropdownOpen, className), children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$F.wrapper, children: [
|
|
83170
83348
|
attachments.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$F.attachmentSection, children: attachments.map((file, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83171
83349
|
AttachmentItem,
|
|
@@ -83200,7 +83378,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83200
83378
|
{
|
|
83201
83379
|
commands: filteredCommands,
|
|
83202
83380
|
activeIndex,
|
|
83203
|
-
onSelect:
|
|
83381
|
+
onSelect: handleSendCommand,
|
|
83204
83382
|
onClose: () => setShowCommandDropdown(false),
|
|
83205
83383
|
style: dropdownPosition.style,
|
|
83206
83384
|
portal: true
|
|
@@ -83231,8 +83409,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83231
83409
|
onActiveIndexChange: setActiveIndex,
|
|
83232
83410
|
onSelect: handleSelectQuickReply,
|
|
83233
83411
|
onClose: closeQuickReplyPicker,
|
|
83234
|
-
style: dropdownPosition.style
|
|
83235
|
-
sendMode: input2.trim().length === 0 && attachments.length === 0
|
|
83412
|
+
style: dropdownPosition.style
|
|
83236
83413
|
}
|
|
83237
83414
|
),
|
|
83238
83415
|
document.body
|
|
@@ -83340,13 +83517,13 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83340
83517
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83341
83518
|
Button,
|
|
83342
83519
|
{
|
|
83343
|
-
variant:
|
|
83520
|
+
variant: sendButtonActsAsStop ? "stop" : "send",
|
|
83344
83521
|
size: "icon",
|
|
83345
|
-
onClick:
|
|
83522
|
+
onClick: sendButtonActsAsStop ? onStop : handleSend,
|
|
83346
83523
|
onMouseDown: (e2) => e2.preventDefault(),
|
|
83347
|
-
disabled: !
|
|
83348
|
-
"data-testid":
|
|
83349
|
-
children:
|
|
83524
|
+
disabled: !hasDraft && !isLoading,
|
|
83525
|
+
"data-testid": sendButtonActsAsStop ? "stop-button" : "send-button",
|
|
83526
|
+
children: sendButtonActsAsStop ? /* @__PURE__ */ jsxRuntimeExports.jsx(Square, { className: styles$F.icon }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { className: styles$F.icon })
|
|
83350
83527
|
}
|
|
83351
83528
|
)
|
|
83352
83529
|
] }),
|
|
@@ -83386,9 +83563,6 @@ function ChatFooter({
|
|
|
83386
83563
|
onSend,
|
|
83387
83564
|
onStop,
|
|
83388
83565
|
onCancelQueue,
|
|
83389
|
-
onCompact,
|
|
83390
|
-
onClearRequest,
|
|
83391
|
-
onClearCommand,
|
|
83392
83566
|
memberAgentIds,
|
|
83393
83567
|
placeholder: placeholder2
|
|
83394
83568
|
}) {
|
|
@@ -83444,12 +83618,6 @@ function ChatFooter({
|
|
|
83444
83618
|
onSend,
|
|
83445
83619
|
isLoading: sending,
|
|
83446
83620
|
onStop,
|
|
83447
|
-
onCommandExecute: (command2) => {
|
|
83448
|
-
if (command2 === "compact") onCompact?.();
|
|
83449
|
-
if (command2 === "clear") onClearCommand();
|
|
83450
|
-
},
|
|
83451
|
-
onCompact,
|
|
83452
|
-
onClearRequest,
|
|
83453
83621
|
sessionId,
|
|
83454
83622
|
conversationType,
|
|
83455
83623
|
memberAgentIds,
|
|
@@ -84645,20 +84813,20 @@ const onboarding$1 = { "title": "为智能体注入灵魂", "description": "只
|
|
|
84645
84813
|
const channelGuide$1 = { "title": "为智能体注入灵魂", "description": "连接 AI 模型,智能体才能思考和回答", "configure": "连接 AI", "dismiss": "跳过" };
|
|
84646
84814
|
const agentChannelCheck$1 = { "title": "智能体还没有灵魂", "description": "连接 AI 模型后才能开始对话", "configure": "连接 AI", "skip": "仍要创建" };
|
|
84647
84815
|
const welcome$1 = { "description": "选择一个智能体开始对话,或叫上所有人一起讨论", "title": "开启一段思考", "subtitle": "从左侧选择一位伙伴开始对话", "or": "或", "createGroup": "叫上所有人一起讨论" };
|
|
84648
|
-
const settings$1 = { "title": "设置", "nav": { "app": "应用", "capabilities": "能力", "automation": "自动化", "agents": "Agent", "connection": "连接" }, "tabs": { "llm": "模型通道", "agent": "智能体", "skill": "Skills", "appearance": "外观设置", "remote": "远程访问", "mcp": "MCP 服务", "search": "搜索引擎", "integration": "Bot接入", "about": "关于" }, "panels": { "integration": { "title": "外部接入", "description": "连接外部平台,让 Agent 通过这些接入与你对话", "addNew": "接入新平台", "empty": "还没有连接任何外部平台。绑定后,Agent 可以在对应平台接收和回复消息。", "connected": "已连接", "disconnected": "未连接", "connecting": "连接中", "reconnecting": "重连中", "authFailed": "鉴权失败", "testConnection": "测试连接", "disconnect": "断开", "reconnect": "重新连接", "bind": { "step1Title": "获取凭证", "step2Title": "选择绑定目标", "step3Title": "验证连接", "botId": "Bot ID", "botIdPlaceholder": "输入企业微信机器人 Bot ID", "secret": "Secret", "secretPlaceholder": "输入机器人 Secret", "targetAgent": "Agent", "targetAgentDesc": "Bot 作为 Agent 的化身", "targetThread": "群组
|
|
84649
|
-
const agent$1 = { "name": "名称", "namePlaceholder": "例如:代码助手", "channel": "通道", "model": "模型", "description": "描述", "descriptionPlaceholder": "描述智能体的能力和用途...", "temperature": "Temperature", "temperature.description": "控制输出随机性,值越高越随机 (0-2,默认 0.7)", "topP": "Top P", "topP.description": "核采样阈值,控制词汇多样性 (0-1,默认 1)", "maxTokens": "最大 Token 数", "maxTokens.description": "单次响应的最大输出长度,留空则不限", "maxTokens.unlimited": "不限制", "enableThinking": "启用思考模式", "enableThinking.description": "开启后 AI 会进行深度思考,提供更准确的回答(部分模型支持)", "notifyOnDegraded": "通道异常时通知我", "notifyOnDegraded.description": "当通道响应变慢或不可用时,显示提示", "autoFallback": "自动切换到备用通道", "autoFallback.description": "通道故障时自动尝试备用通道,无需确认(谨慎开启)", "optimizeDescription": "AI 优化描述", "optimizeFailed": "优化失败,请稍后重试", "create": "创建 Agent", "editTitle": "编辑 Agent", "confirmDelete": "确定删除此 Agent?", "deleteTitle": "删除 Agent", "emptyTitle": "还没有 Agent", "emptyDesc": "创建第一个 Agent,把模型和能力组合成一个角色", "createFirst": "创建你的第一个 Agent", "searchPlaceholder": "搜索 Agent", "noDescription": "暂无描述", "noResults": "未找到匹配「{{query}}」的 Agent,按 Esc 清空搜索", "discardTitle": "放弃修改?", "discardMessage": "你有未保存的修改,离开后将丢失这些修改。", "configured": "已配置", "incomplete": "待完善", "unconfigured": "未配置", "noModel": "未选择模型", "justNow": "刚刚", "minutesAgo": "{{count}}分钟前", "hoursAgo": "{{count}}小时前", "daysAgo": "{{count}}天前", "updatedAt": "更新于 {{time}}", "templateCopied": "已从模板「{{name}}」创建", "templateSystemPrefix": "你是{{name}}。", "edit": "编辑", "delete": "删除", "add": "添加", "update": "更新", "advanced": "高级功能", "configure": "配置智能体", "avatar": { "label": "Agent 头像", "hint": "点击头像上传或移除自定义头像" }, "summarizeConversation": "总结本次对话", "updateMemory": "
|
|
84816
|
+
const settings$1 = { "title": "设置", "nav": { "app": "应用", "capabilities": "能力", "automation": "自动化", "agents": "Agent", "connection": "连接" }, "tabs": { "llm": "模型通道", "agent": "智能体", "skill": "Skills", "appearance": "外观设置", "remote": "远程访问", "mcp": "MCP 服务", "search": "搜索引擎", "integration": "Bot接入", "about": "关于" }, "panels": { "integration": { "title": "外部接入", "description": "连接外部平台,让 Agent 通过这些接入与你对话", "addNew": "接入新平台", "empty": "还没有连接任何外部平台。绑定后,Agent 可以在对应平台接收和回复消息。", "connected": "已连接", "disconnected": "未连接", "connecting": "连接中", "reconnecting": "重连中", "authFailed": "鉴权失败", "testConnection": "测试连接", "disconnect": "断开", "reconnect": "重新连接", "bind": { "step1Title": "获取凭证", "step2Title": "选择绑定目标", "step3Title": "验证连接", "botId": "Bot ID", "botIdPlaceholder": "输入企业微信机器人 Bot ID", "secret": "Secret", "secretPlaceholder": "输入机器人 Secret", "targetAgent": "Agent", "targetAgentDesc": "Bot 作为 Agent 的化身", "targetThread": "群组 Session", "targetThreadDesc": "Bot 接入群组的某个 Session", "selectAgent": "选择 Agent", "selectGroup": "选择群组", "selectThread": "选择 Session", "next": "下一步", "prev": "上一步", "cancel": "取消", "done": "完成", "testSuccess": "连接成功!WebSocket 通道已建立。", "testFailed": "连接失败", "summaryPlatform": "平台", "summaryBotId": "Bot ID", "summaryTarget": "绑定目标" }, "confirmUnbind": "确定断开此接入?", "unbindTitle": "断开接入", "hint": "外部接入仅在应用运行时可用。关闭应用后,Bot 将自动离线。", "wecomBot": "企业微信", "methodQrcode": "扫码绑定", "methodQrcodeDesc": "用企业微信扫描二维码,自动获取凭证", "methodManual": "手动输入", "methodManualDesc": "输入 Bot ID 和 Secret", "qrLoading": "正在获取二维码...", "qrHint": "请打开企业微信,扫描上方二维码", "qrTimeout": "扫码超时(5 分钟),请重试" }, "appearance": { "title": "外观", "description": "自定义主题、语言与界面显示方式" }, "channel": { "title": "模型通道", "description": "管理用于连接 AI 服务的模型通道与默认模型" }, "multimodal": { "title": "多模态能力", "description": "配置图片、视频、语音等多模态能力的分析与生成" }, "mcp": { "title": "扩展服务", "description": "配置 MCP 服务以扩展 Agent 能力" }, "skill": { "title": "技能", "description": "管理 Agent 可使用的技能模块" }, "search": { "title": "搜索", "description": "配置联网搜索引擎与默认搜索行为" }, "remote": { "title": "远程访问", "description": "开启后可通过手机浏览器访问 KAi,所有连接使用加密 token 认证" }, "agent": { "title": "Agents", "description": "创建和管理自定义 Agent" }, "memoryGrowth": { "title": "记忆成长", "description": "配置记忆如何随着时间自动更新与整理" }, "scheduler": { "title": "定时任务", "description": "创建和管理定时执行的自动化任务" }, "about": { "title": "关于 KAi", "description": "多 AI Agent 协作桌面应用" } }, "channel": { "title": "模型通道", "add": "添加通道", "addTitle": "添加通道", "editTitle": "编辑通道", "name": "通道名称", "namePlaceholder": "例如:OpenAI、Azure", "apiType": "接口类型", "apiTypeOpenai": "OpenAI Compatible", "apiTypeOfficialOpenai": "OpenAI", "apiTypeAnthropic": "Anthropic", "apiTypeGoogle": "Google Gemini", "apiTypeAuto": "自动检测", "baseUrl": "Base URL", "apiKey": "API Key", "defaultModel": "默认模型", "selectModel": "选择模型...", "enterUrlAndKey": "请先填写 Base URL 和 API Key", "loadingModels": "加载模型中...", "searchOrType": "搜索或输入模型名称…", "useCustom": "自定义", "isDefault": "默认通道", "setAsDefault": "设为默认通道", "default": "默认", "setDefault": "设为默认", "edit": "编辑", "delete": "删除", "confirmDelete": "确定删除此通道?", "deleteTitle": "删除通道", "showApiKey": "显示 API Key", "hideApiKey": "隐藏 API Key", "empty": "暂无通道,点击下方按钮创建", "deleted": "通道已删除", "setDefaultDone": "已将「{{name}}」设为默认通道", "actions": "「{{name}}」操作", "confirmDeleteMm": "此通道正用于多模态图片分析(analyzeImage 工具),删除后该功能将停用。确定删除「{{name}}」?", "tabChannels": "通道", "tabMultimodal": "多模态" }, "llm": { "title": "LLM 配置", "model": "模型名称", "modelPreset": "模型预设", "customModel": "自定义模型", "apiKey": "API Key", "baseUrl": "Base URL", "temperature": "温度", "maxTokens": "最大令牌数", "topP": "Top P", "loadingModels": "加载模型中...", "errors": { "network_error": "无法连接到 API 服务器,请检查 Base URL 和网络连接", "auth_failed": "API Key 验证失败,请检查您的密钥", "api_error": "API 请求失败,请检查服务器状态" } }, "remote": { "title": "远程访问", "description": "开启后可通过手机浏览器访问 KAi。\n所有连接使用加密 token 认证。", "on": "开启", "off": "关闭", "copyLink": "复制链接", "rotateLink": "重新生成链接", "stopLink": "停止远程访问", "rotateSuccess": "已生成新链接,旧链接已失效", "linkTitle": "稳定访问链接", "linkDescription": "链接会在下次启动时自动恢复,除非你手动停止或重新生成。", "restoreMode": "启动恢复", "restoreEnabled": "自动恢复", "restoreDisabled": "不自动恢复", "lastGenerated": "最近生成时间", "notGeneratedYet": "尚未生成", "restoreFailedTitle": "恢复失败", "status": { "disabled": "未开启", "enabling": "开启中", "enabled": "已开启", "restoring": "恢复中", "rotating": "生成新链接中", "stopping": "停止中", "error": "恢复失败" }, "qrCodeAlt": "远程访问二维码", "tokenPending": "正在等待访问 token...", "portValue": "端口: {{port}}", "connectionsValue": "连接: {{current}}/{{max}}", "addresses": "可用地址", "connectedClients": "已连接设备", "errors": { "toggleFailed": "更新远程访问状态失败", "copyFailed": "复制远程访问链接失败", "rotateFailed": "重新生成远程访问链接失败" } }, "search": { "engines": "搜索引擎列表", "builtIn": "内置", "default": "默认", "setDefault": "设为默认", "addCustom": "添加自定义引擎", "addEngine": "添加搜索引擎", "editEngine": "编辑搜索引擎", "name": "引擎名称", "namePlaceholder": "例如:Google Scholar", "urlTemplate": "URL 模板", "urlTemplateHint": "使用 {query} 作为搜索关键词占位符", "urlTemplateError": "URL 模板必须包含 {query} 占位符", "showWindow": "显示搜索窗口(调试用)", "confirmDelete": "确定删除此搜索引擎?", "deleteTitle": "删除搜索引擎", "delete": "删除" }, "language": "语言", "appearance": { "theme": "主题", "themeLight": "亮色", "themeDark": "暗色", "themeSystem": "跟随系统" }, "save": "保存", "cancel": "取消", "saveFailed": "保存设置失败,请重试", "saveSuccess": "保存成功", "mcp": { "title": "MCP 服务", "add": "添加服务", "addServer": "添加服务", "addTitle": "添加服务", "editTitle": "编辑服务", "empty": "暂无 MCP 服务", "confirmDelete": "确定要删除此服务吗?", "deleteTitle": "删除服务", "serverName": "服务名称", "serverType": "类型", "command": "命令", "args": "参数", "url": "WebSocket 地址", "enabled": "启用", "testConnection": "测试连接", "connected": "已连接", "disconnected": "未连接", "error": "连接错误", "edit": "编辑", "delete": "删除", "typeStdio": "Stdio", "typeCommand": "命令", "typeStreamableHttp": "Streamable HTTP", "typeWebsocket": "WebSocket", "toolCount": "工具数量", "testing": "测试中...", "testSuccess": "连接成功", "testFailed": "连接失败", "applyToAgent": "应用到 Agent", "appliedToAgents": "已应用到 {{count}} 个 Agent", "notAppliedToAnyAgent": "未应用到任何 Agent", "globallyDisabled": "全局停用", "selectedCount": "已选择 {{count}} 个", "searchAgent": "搜索 Agent", "noMatchingAgents": "未找到匹配的 Agent", "drawerDisabledWarning": "此 MCP 服务当前全局停用,Agent 无法实际使用", "filteredCount": "找到 {{count}} 个 Agent", "selectAll": "全选", "clearAll": "清空", "selectFiltered": "选中当前结果", "clearFiltered": "清空当前结果" }, "about": { "releaseNotes": "更新日志", "versionCopied": "已复制", "autoCheckForUpdates": "每天自动检查更新", "checkForUpdates": "检查更新", "checking": "正在检查更新", "goDownload": "前往下载", "newVersion": "发现新版本", "updateHighlights": "本次更新", "viewFullReleaseNotes": "查看完整更新日志", "retry": "重新检查", "upToDate": "当前已是最新版本", "updateError": "检查更新失败", "feedback": { "title": "反馈", "placeholder": "告诉我们在想什么...", "bug": "Bug", "feature": "功能建议", "other": "其他", "submit": "提交反馈", "showContact": "留下联系方式", "contactPlaceholder": "邮箱或其他联系方式", "success": "感谢反馈!", "error": "提交失败,请稍后再试。" } }, "multimodal": { "saved": "多模态配置已保存", "saveFailed": "保存失败", "saving": "保存中…", "noChannels": "暂无可用通道,请先在模型通道中添加", "goToChannels": "前往模型通道", "tabImageAnalysis": "图片分析", "tabImageGeneration": "图片生成", "tabVideo": "视频能力", "tabVoice": "语音能力", "comingSoon": "即将推出", "badgeOn": "ON", "badgeOff": "OFF", "analysis": { "title": "图片分析", "summary": "{channel} · {model} · {size}px", "summaryDefault": "未配置", "hint": "启用后,Agent 可使用 analyzeImage 工具识别和理解图片内容", "channel": "通道", "selectChannel": "请选择通道", "modelLabel": "指定模型(可选)", "modelHint": "留空使用通道默认模型", "maxImageEdge": "最大图片长边", "maxImageEdgeHint": "超出时自动缩放,越小成本越低", "inactive": "已关闭", "channelDeleted": "通道已失效", "incomplete": "未完成配置 · 请选择通道" }, "generation": { "title": "图片生成", "summary": "{channel} · {model} · {size}", "summaryDefault": "未配置", "hint": "启用后,Agent 可使用 generateImage 工具根据文字描述生成图片", "channel": "通道", "selectChannel": "请选择通道", "modelLabel": "指定模型(可选)", "modelHint": "留空使用通道默认模型", "defaultSize": "默认尺寸(可选)", "modelDefaultSize": "使用模型默认尺寸", "inactive": "已关闭", "channelDeleted": "通道已失效", "incomplete": "未完成配置 · 请选择通道" }, "fallback": { "title": "备用模型", "add": "添加备用", "remove": "删除", "selectChannel": "选择通道", "hint": "主模型失败时,按顺序依次尝试备用模型" } }, "integration": { "title": "外部接入", "description": "连接外部平台,让 Agent 通过这些接入与你对话", "addNew": "接入新平台", "empty": "还没有连接任何外部平台。绑定后,Agent 可以在对应平台接收和回复消息。", "connected": "已连接", "disconnected": "未连接", "connecting": "连接中", "reconnecting": "重连中", "authFailed": "鉴权失败", "testConnection": "测试连接", "editTarget": "编辑", "editTargetTitle": "修改绑定目标", "editTargetSuccess": "绑定目标已更新", "disconnect": "断开", "reconnect": "重新连接", "createdAt": "创建于 {{time}}", "bind": { "step0Title": "选择平台", "stepMethodTitle": "接入方式", "step1Title": "获取凭证", "step2Title": "选择绑定目标", "step3Title": "验证连接", "botId": "Bot ID", "botIdPlaceholder": "输入企业微信机器人 Bot ID", "secret": "Secret", "secretPlaceholder": "输入机器人 Secret", "targetAgent": "Agent", "targetAgentDesc": "Bot 作为 Agent 的化身", "targetThread": "群组 Session", "targetThreadDesc": "Bot 接入群组的某个 Session", "selectAgent": "选择 Agent", "selectGroup": "选择群组", "selectThread": "选择 Session", "next": "下一步", "prev": "上一步", "cancel": "取消", "done": "完成", "testSuccess": "连接成功!WebSocket 通道已建立。", "testFailed": "连接失败", "summaryPlatform": "平台", "summaryBotId": "Bot ID", "summaryTarget": "绑定目标" }, "confirmUnbind": "确定断开此接入?", "unbindTitle": "断开接入", "hint": "外部接入仅在应用运行时可用。关闭应用后,Bot 将自动离线。", "wecomBot": "企业微信", "wecomBotDesc": "通过企业微信 Bot 接入,需要 Bot ID 和 Secret", "wechatPersonal": "微信", "wechatPersonalDesc": "通过微信个人 Bot(ClawBot)接入,扫码登录即可", "methodQrcode": "扫码绑定", "methodQrcodeDesc": "用企业微信扫描二维码,自动获取凭证", "methodManual": "手动输入", "methodManualDesc": "输入 Bot ID 和 Secret", "qrLoading": "正在获取二维码...", "qrHint": "请打开企业微信,扫描上方二维码", "wpQrHint": "请打开微信,扫描上方二维码登录 Bot", "qrTimeout": "扫码超时(5 分钟),请重试" } };
|
|
84817
|
+
const agent$1 = { "name": "名称", "namePlaceholder": "例如:代码助手", "channel": "通道", "model": "模型", "description": "描述", "descriptionPlaceholder": "描述智能体的能力和用途...", "temperature": "Temperature", "temperature.description": "控制输出随机性,值越高越随机 (0-2,默认 0.7)", "topP": "Top P", "topP.description": "核采样阈值,控制词汇多样性 (0-1,默认 1)", "maxTokens": "最大 Token 数", "maxTokens.description": "单次响应的最大输出长度,留空则不限", "maxTokens.unlimited": "不限制", "enableThinking": "启用思考模式", "enableThinking.description": "开启后 AI 会进行深度思考,提供更准确的回答(部分模型支持)", "notifyOnDegraded": "通道异常时通知我", "notifyOnDegraded.description": "当通道响应变慢或不可用时,显示提示", "autoFallback": "自动切换到备用通道", "autoFallback.description": "通道故障时自动尝试备用通道,无需确认(谨慎开启)", "optimizeDescription": "AI 优化描述", "optimizeFailed": "优化失败,请稍后重试", "create": "创建 Agent", "editTitle": "编辑 Agent", "confirmDelete": "确定删除此 Agent?", "deleteTitle": "删除 Agent", "emptyTitle": "还没有 Agent", "emptyDesc": "创建第一个 Agent,把模型和能力组合成一个角色", "createFirst": "创建你的第一个 Agent", "searchPlaceholder": "搜索 Agent", "noDescription": "暂无描述", "noResults": "未找到匹配「{{query}}」的 Agent,按 Esc 清空搜索", "discardTitle": "放弃修改?", "discardMessage": "你有未保存的修改,离开后将丢失这些修改。", "configured": "已配置", "incomplete": "待完善", "unconfigured": "未配置", "noModel": "未选择模型", "justNow": "刚刚", "minutesAgo": "{{count}}分钟前", "hoursAgo": "{{count}}小时前", "daysAgo": "{{count}}天前", "updatedAt": "更新于 {{time}}", "templateCopied": "已从模板「{{name}}」创建", "templateSystemPrefix": "你是{{name}}。", "edit": "编辑", "delete": "删除", "add": "添加", "update": "更新", "advanced": "高级功能", "configure": "配置智能体", "avatar": { "label": "Agent 头像", "hint": "点击头像上传或移除自定义头像" }, "summarizeConversation": "总结本次对话", "updateMemory": "整理长期记忆", "writeToMemory": "写入记忆", "writingMemory": "写入中...", "memoryWritten": "已写入", "summarizePrompt": "请对本次对话做结构化总结。只输出以下四个部分:关键结论、已做决策、待办事项、未决问题。即使某部分为空,也写“暂无”。不要更新任何 workspace 文件。", "primary": "主要", "healthy": "正常", "degraded": "缓慢", "unhealthy": "离线", "unknown": "未知", "advancedConfig": "高级配置", "reasoningEffort": "推理强度", "reasoningEffortLevels": { "off": "关闭", "low": "低", "medium": "中", "high": "高" }, "reasoningEffort.description": "控制模型在回答前投入的推理强度。级别越高,通常更稳,但也可能更慢。", "selected": "已选", "tab": { "basic": "基础", "identity": "身份", "model": "模型", "brain": "模型", "capabilities": "能力", "workspace": "工作空间", "memory": "记忆" }, "summary": { "model": "模型", "skills": "Skills", "mcp": "MCP", "thinking": "Thinking" }, "notSelected": "未选择", "mention": { "placeholder": "选择智能体...", "noAgents": "暂无智能体配置", "allDesc": "通知所有成员" }, "skill": { "title": "Skills", "empty": "暂无 Skill。请在 ~/.kai/skills/ 目录手动创建。", "back": "返回" }, "mcpServers": { "title": "MCP 服务", "empty": "暂无已启用的 MCP 服务,请先在「MCP 服务」中配置", "connected": "已连接", "disconnected": "未连接", "tools": " 个工具" }, "toolLimit": { "title": "内置工具权限", "summaryNone": "未限制", "summaryCount": "已禁用 {{count}} 项", "summaryCountWithCritical": "已禁用 {{count}} 项,含关键工具 {{tool}}", "groupFile": "文件", "groupSystem": "系统", "groupNetwork": "网络", "groupData": "数据", "groupAux": "辅助", "disabled": "已禁用", "hint": "关闭工具后,该 Agent 将无法在运行时调用对应能力。谨慎禁用读写文件、编辑文件或 Shell 等关键工具。", "warningCritical": "已禁用关键工具 {{tool}},Agent 可能无法{{consequence}}。", "warningNearAll": "当前仅剩 {{count}} 项工具可用,Agent 可能几乎无法执行实际任务。", "warningCriticalTools": { "readFile": "读取工作区内容", "writeFile": "写入文件", "editFile": "修改现有文件", "shell": "执行命令或验证结果" }, "toolDesc": { "readFile": "读取本地文件或目录内容", "writeFile": "创建或覆盖写入本地文件", "editFile": "对文件做精确文本替换", "shell": "执行终端命令", "webFetch": "抓取指定网页或接口内容", "webSearch": "联网搜索实时信息", "sqlQuery": "执行只读 SQL 查询", "analyzeImage": "分析图片内容或提取文字", "generateImage": "根据文字描述生成图片", "skill": "加载并使用预定义 Skill", "createCronJob": "创建定时任务", "listCronJobs": "查看定时任务列表", "updateCronJob": "更新定时任务", "deleteCronJob": "删除定时任务" } }, "workspace": { "hide": "隐藏", "edit": "编辑", "openDir": "打开目录" }, "errors": { "duplicateName": "已存在同名智能体,请使用其他名称", "nameRequired": "智能体名称不能为空" }, "initMessage": { "greeting": "你好!我是你的创建者。", "instruction": "请根据以下信息完善你的身份文件:", "name": "名称", "description": "功能描述", "tasks": "请执行以下任务:", "task1": "阅读 IDENTITY.md 和 SOUL.md 的模板内容", "task2": "根据你的名称和功能描述,为自己设计一个合适的身份:", "task2a": "在 IDENTITY.md 中填写你的名字、类型、气质和 Emoji", "task2b": "在 SOUL.md 中根据你的功能定位,调整你的核心真理、边界和风格", "task3": "完成后简要告诉我你是谁,以及你能做什么", "reminder": "记住:这是你的第一次对话,也是你定义自己的机会。" } };
|
|
84650
84818
|
const skill$1 = { "title": "Skills", "empty": "暂无 Skills", "add": "添加 Skill", "edit": "编辑", "delete": "删除", "back": "返回", "name": "Skill 名称", "namePlaceholder": "例如:pdf-processing", "description": "描述", "descriptionPlaceholder": "简要描述此 Skill 的用途", "content": "内容(Markdown)", "contentPlaceholder": "用 Markdown 编写 Skill 的详细指令...", "deleteConfirm": "确定删除此 Skill?", "nameInvalid": "名称只能包含小写字母、数字和连字符,不能以连字符开头/结尾,不能有连续连字符,最多 64 字符", "selectTitle": "选择 Skills", "permissionHint": "为该 Agent 选择可用 Skills。未选择任何 Skill = 不授予 Skill 权限。", "noSkills": "暂无可用 Skills", "noSkillsSelected": "未选择任何 Skill", "manageSkills": "管理", "searchPlaceholder": "搜索 Skill", "noMatchingSkills": "未找到匹配的 Skill", "selectedCount": "已选择 {{count}} 个", "done": "完成", "remove": "移除", "notAppliedToAnyAgent": "未应用到任何 Agent", "appliedToAgents": "已应用到 {{count}} 个 Agent", "globallyDisabled": "已全局停用", "applyToAgent": "应用到 Agent", "searchAgent": "搜索 Agent", "noMatchingAgents": "未找到匹配的 Agent", "drawerDisabledWarning": "此 Skill 当前全局停用,Agent 无法实际使用", "filteredCount": "找到 {{count}} 个 Agent", "selectAll": "全选", "clearAll": "清空" };
|
|
84651
84819
|
const session$1 = { "openDir": "打开目录" };
|
|
84652
84820
|
const error$6 = { "network": "网络错误,请检查您的连接。", "rate_limit": "请求频率超限,请稍后再试。", "api_error": "API 错误,请检查您的设置。", "unknown": "发生错误,请重试。", "retry": "重试", "boundary": { "title": "出错了", "message": "应用遇到了一个错误", "reload": "重新加载", "report": "报告问题", "copyError": "复制错误", "errorCopied": "已复制" }, "descriptionRequired": "描述不能为空", "noDefaultChannel": "未配置默认 LLM 通道", "channelNeedsBaseUrl": "通道必须配置 baseUrl", "agentNotInConversation": "Agent {{agentId}} 不在当前对话中", "contentTooLong": "内容超过 3000 字符限制", "tooManyConcurrentSearches": "搜索请求过多,请稍后重试", "invalidUrl": "无效或不安全的 URL", "noCustomEngines": "未找到自定义搜索引擎", "commandRequired": "命令行 MCP 服务需要 command 参数", "clientNotConnected": "客户端未连接", "agentExecutionNotImplemented": "Agent 执行功能尚未实现", "agentIdRequired": "agent_review 任务需要 agentId", "invalidCiphertext": "密文格式无效:需要 3 个部分", "emptySummary": "摘要响应为空" };
|
|
84653
84821
|
const network$1 = { "offline": "无网络连接" };
|
|
84654
|
-
const message$3 = { "copy": "复制", "copied": "已复制", "edit": "编辑", "regenerate": "重新生成", "delete": "删除", "confirmDelete": "确定删除此消息及之后的所有消息?", "contextCleared": "上下文已清理", "contextCompacted": "
|
|
84822
|
+
const message$3 = { "copy": "复制", "copied": "已复制", "errorDetails": "错误详情", "edit": "编辑", "regenerate": "重新生成", "delete": "删除", "confirmDelete": "确定删除此消息及之后的所有消息?", "contextCleared": "上下文已清理", "contextCompacted": "上下文已压缩", "imageLoadFailed": "图片加载失败", "openImageViewerHint": "点击打开图片查看器", "imageViewerHint": "双击图片切换大小,Ctrl/⌘ + 滚轮缩放,Esc 关闭", "imageLoadError": "图片加载失败", "copyImage": "复制图片", "imageCopied": "图片已复制", "imageCopyFailed": "图片复制失败", "closeImageViewer": "关闭图片查看器", "zoomInImage": "放大 (+)", "zoomOutImage": "缩小 (-)", "resetImageZoom": "适配窗口", "switchToCode": "切换到代码", "switchToPreview": "切换到预览", "preview": "预览", "previewHtml": "预览 HTML", "htmlPreviewTitle": "HTML 预览", "error": { "network": "网络错误", "rate_limit": "请求频率限制", "api_error": "API 错误", "unknown": "未知错误" }, "errorMessage": { "network": "网络连接出了点问题,请检查连接后再试。", "rateLimit": "系统现在有点忙,请稍后再试。", "rateLimitConcurrency": "系统现在有点忙,正在同时处理较多请求,请稍后再试。", "apiError": "模型服务暂时不可用,请稍后再试。", "unknown": "出了点问题,请稍后再试。" }, "fallback": { "transition": "当前模型繁忙,正在切换备用模型…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "请求繁忙", "timeout": "响应超时", "apiError": "服务暂时不可用", "contextOverflow": "上下文过长", "unknown": "未知原因" } }, "handoff": "协作转交", "broadcast": "协作咨询", "expand": "展开", "collapse": "收起", "lines": "行", "userMessage": "用户消息", "agentMessage": "{{name}} 的回复", "generating": "生成中", "sending": "发送中", "waiting": "等待处理", "sendFailed": "发送失败", "retrySend": "重试", "recall": "撤回", "tokenUsage": "输入:{{input}} | 输出:{{output}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "完成 {{completed}}/{{total}}", "broadcastStatusPending": "等待中", "broadcastStatusThinking": "思考中", "broadcastStatusStreaming": "回复中", "broadcastStatusDone": "已完成", "broadcastStatusFailed": "失败", "broadcastWaiting": "等待响应…", "broadcastNoContent": "无内容", "broadcastFailed": "响应失败", "broadcastComplete": "协作咨询已结束", "broadcastAllReplied": "所有成员都已回复", "taskAssign": "已发起协作任务", "taskAssignedTo": "已交给 {{name}} 处理", "taskDetail": "查看执行过程", "taskDetailCollapse": "收起执行过程", "taskEmpty": "暂无执行内容", "taskQueued": "排队中", "taskRunning": "进行中", "taskCompleted": "已完成", "taskFailed": "执行失败", "taskKilled": "已结束", "taskBackgroundQueued": "后台排队中", "taskBackgroundRunning": "后台运行中", "taskBackgroundCompleted": "后台完成", "taskBackgroundFailed": "后台失败", "taskBackgroundKilled": "后台结束", "broadcastWaitingMembers": "还有 {{count}} 位成员待回复" };
|
|
84655
84823
|
const channel$1 = { "primary": "主要", "healthy": "正常", "degraded": "缓慢", "unhealthy": "离线", "unknown": "未知", "switch": "切换到 {{name}}", "slow": "响应缓慢", "error": "连接异常", "viewStatus": "查看通道状态", "alertDegraded": "{{channel}} 响应缓慢", "alertUnhealthy": "{{channel}} 连接异常", "unknownChannel": "未知通道", "fallback": "备用模型", "fallbackSummary": "已配置 {{count}} 个", "fallbackEmpty": "暂无备用模型", "addFallback": "添加备用通道" };
|
|
84656
84824
|
const thread$1 = { "tabs": { "label": "讨论线程", "newThread": "新建讨论", "streaming": "回复中…", "completed": "回复完成", "paused": "已暂停", "archive": "归档讨论", "renameHint": "双击重命名" }, "context": { "discussion": "讨论" }, "createTitle": "新建讨论", "createSubtitle": "在「{{groupName}}」中创建新讨论", "members": "参与成员:", "memberCount": "{{count}} 位成员将参与", "memberCountShort": "{{count}} 位成员将参与", "titlePlaceholder": "讨论主题(必填)", "titleTooLong": "标题不能超过 100 个字符", "createHint": "群组成员将自动加入此讨论。建完后发送第一条消息开始", "create": "创建", "inGroup": "在「{{groupName}}」中发起的讨论", "sendFirst": "发送第一条消息开始讨论", "placeholder": { "default": "在「{{group}}」中跟 {{speaker}} 讨论…", "thread": "跟 {{speaker}} 讨论 {{title}}…" }, "badge": { "tooltip": "{{count}} 个活跃讨论" }, "archiveToast": "讨论已归档", "archiveUndo": "撤销", "archiveConfirm": "归档此讨论?", "archiveTitle": "归档讨论" };
|
|
84657
84825
|
const mention$1 = { "allDesc": "通知所有成员" };
|
|
84658
84826
|
const chat$1 = { "members": "成员", "active": "{{count}}人响应中", "moreMembers": "更多", "untitled": "未命名对话", "noMoreMessages": "没有更多消息了", "newMessages": "有新消息", "scrollToBottom": "滚动到底部", "loadMore": "加载更多消息", "noMessages": "暂无消息", "agentThinking": "{{name}} 正在思考…", "agentSpeaking": "{{name}} 正在回复…", "thinking": "思考中", "replying": "回复中", "handoffTo": "转交给", "groupReady": "群已准备就绪", "groupReadyHint": "你可以先发一个问题、目标,或待办事项" };
|
|
84659
84827
|
const supervisor$1 = { "evaluating": "{{name}} 正在评估…(第 {{current}}/{{max}} 轮)", "evaluatingShort": "{{name}} 正在评估", "improving": "{{name}} 正在根据反馈改进…(第 {{current}}/{{max}} 轮)", "improvingShort": "{{name}} 正在改进", "completed": "{{name}} 确认达标(共 {{rounds}} 轮)", "completedShort": "{{name}} 确认达标", "ended": "监督结束(共 {{rounds}} 轮)", "endedShort": "已结束", "endedWithReason": "监督结束(共 {{rounds}} 轮):{{reason}}", "roundLabel": "第 {{current}}/{{max}} 轮评估", "roundPassed": "通过", "roundNotPassed": "未通过", "roundNotPassedFeedback": "未通过:{{feedback}}", "viewRounds": "查看评估过程", "hideRounds": "收起评估过程", "viewReview": "查看评估过程", "hideReview": "收起评估过程", "reviewProcessTitle": "评估过程", "resultTitle": "评估结论", "resultStatus": "结果", "feedbackTitle": "反馈", "nextTaskTitle": "下一步", "taskKey": { "eval_first": "检查执行结果", "eval_improve": "检查改进结果", "improve_from_feedback": "根据反馈改进", "noEvaluateTool": "未调用评估工具" }, "reasonKey": { "max_iterations_reached": "达到最大迭代次数", "supervisor.noEvaluateTool": "未调用评估工具" } };
|
|
84660
|
-
const command$1 = { "clearDescription": "清理上下文历史", "compactDescription": "
|
|
84661
|
-
const quickReply$1 = { "title": "快捷回复", "add": "添加快捷回复", "addTitle": "添加快捷回复", "editTitle": "编辑快捷回复", "emptyTitle": "还没有快捷回复", "emptyDescription": "
|
|
84828
|
+
const command$1 = { "clearDescription": "清理上下文历史", "compactDescription": "压缩当前对话上下文,可补充保留重点", "quickReplyDescription": "打开快捷回复选择器" };
|
|
84829
|
+
const quickReply$1 = { "title": "快捷回复", "add": "添加快捷回复", "addTitle": "添加快捷回复", "editTitle": "编辑快捷回复", "emptyTitle": "还没有快捷回复", "emptyDescription": "把常用的话保存下来,下次一键发送。", "addFirst": "添加第一条", "titleLabel": "标题,可选", "titlePlaceholder": "例如:Review 这次改动", "contentLabel": "内容", "contentPlaceholder": "输入要复用的话", "selectHint": "选择", "insertHint": "插入", "sendHint": "发送", "moreActions": "更多操作", "manage": "管理", "delete": "删除", "deleted": "已删除快捷回复", "undo": "撤销", "loadFailed": "快捷回复加载失败", "saveFailed": "快捷回复保存失败", "editorHint": "Enter 换行 · Cmd/Ctrl + Enter 保存 · Esc 返回列表" };
|
|
84662
84830
|
const tool$1 = { "executing": "执行中", "success": "成功", "error": "失败", "arguments": "参数", "result": "结果", "expand": "展开", "collapse": "收起", "viewChanges": "查看变更", "viewDetails": "查看详情", "changes": "变更" };
|
|
84663
84831
|
const reasoning$1 = { "title": "思考过程" };
|
|
84664
84832
|
const common$1 = { "loading": "加载中...", "create": "创建", "save": "保存", "saving": "保存中...", "cancel": "取消", "close": "关闭", "back": "返回", "confirm": "确认", "openMenu": "打开菜单", "expand": "展开", "collapse": "收起", "unsavedChanges": "有未保存的更改,确定离开吗?", "edit": "编辑" };
|
|
@@ -84670,20 +84838,21 @@ const queue$1 = { "waiting": "{{count}} 条消息待发送", "clearAll": "清空
|
|
|
84670
84838
|
const memoryConsolidated$1 = "记忆已整合";
|
|
84671
84839
|
const memoryConsolidationSkipped$1 = "无需整合记忆";
|
|
84672
84840
|
const contextCleared$1 = "上下文已清理";
|
|
84673
|
-
const contextCompacted$1 = "
|
|
84674
|
-
const compactLoading$1 = "
|
|
84841
|
+
const contextCompacted$1 = "上下文已整理";
|
|
84842
|
+
const compactLoading$1 = "正在整理上下文...";
|
|
84675
84843
|
const compactFailed$1 = "整理失败";
|
|
84844
|
+
const contextHealth$1 = { "title": "上下文状态", "failed": "整理失败", "compacting": "整理中", "compacted": "已整理", "reasonProactive": "主动整理", "reasonStepBoundary": "步骤间压缩", "reasonReactive": "溢出修复", "reasonManual": "手动整理", "statusRowCompleted": "已整理上下文 · {{reason}} · {{before}} → {{after}}", "statusRowFailed": "上下文整理失败 · 可考虑新开 Session", "currentUsage": "当前估算:{{current}} / {{limit}}", "thresholdRatio": "整理阈值:{{percent}}", "lastCompaction": "最近整理:{{value}}", "lastResult": "最近结果:{{value}}", "totalCompactions": "累计整理:{{count}} 次", "targetLimit": "目标阈值:{{value}}" };
|
|
84676
84845
|
const retrying$1 = "重试中... {{attempt}}/{{maxAttempts}}";
|
|
84677
84846
|
const noMoreMessages$1 = "没有更多消息了";
|
|
84678
84847
|
const newMessages$1 = "有新消息";
|
|
84679
84848
|
const scrollToBottom$1 = "滚动到底部";
|
|
84680
84849
|
const time$1 = { "yesterday": "昨天", "monday": "周一", "tuesday": "周二", "wednesday": "周三", "thursday": "周四", "friday": "周五", "saturday": "周六", "sunday": "周日" };
|
|
84681
|
-
const scheduler$1 = { "title": "定时任务", "createTask": "创建任务", "editTask": "编辑任务", "taskName": "任务名称", "taskType": "任务类型", "cronExpression": "Cron 表达式", "enabled": "启用", "disabled": "禁用", "agentConversation": "Agent 对话", "conversation": "对话", "agent": "智能体", "group": "群组", "message": "消息内容", "lastRunAt": "上次运行", "nextRunAt": "下次运行", "never": "从未", "actions": "操作", "edit": "编辑", "delete": "删除", "toggle": "切换", "executions": "执行历史", "status": "状态", "running": "运行中", "success": "成功", "failed": "失败", "output": "输出", "error": "错误", "startedAt": "开始时间", "completedAt": "完成时间", "duration": "耗时", "noExecutions": "暂无执行记录", "noTasks": "暂无定时任务", "createFirst": "创建你的第一个定时任务", "deleteConfirm": "确定要删除此任务吗?", "deleteTitle": "删除任务", "cronHelp": "例如:0 9 * * * (每天上午9点)", "selectConversation": "选择对话", "selectAgent": "选择智能体", "enterMessage": "输入消息内容", "noConversations": "暂无对话", "createTaskFailed": "创建任务失败:", "updateTaskFailed": "更新任务失败:", "deletedConversation": "已删除的对话", "conversationDeletedWarning": "此任务关联的对话已被删除,请选择新的对话", "review": "夜间整理", "allAgents": "所有智能体", "reviewing": "
|
|
84682
|
-
const memoryGrowth$1 = { "title": "记忆成长", "nightly": { "title": "夜间整理", "description": "
|
|
84850
|
+
const scheduler$1 = { "title": "定时任务", "createTask": "创建任务", "editTask": "编辑任务", "taskName": "任务名称", "taskType": "任务类型", "cronExpression": "Cron 表达式", "enabled": "启用", "disabled": "禁用", "agentConversation": "Agent 对话", "conversation": "对话", "agent": "智能体", "group": "群组", "message": "消息内容", "lastRunAt": "上次运行", "nextRunAt": "下次运行", "never": "从未", "actions": "操作", "edit": "编辑", "delete": "删除", "toggle": "切换", "executions": "执行历史", "status": "状态", "running": "运行中", "success": "成功", "failed": "失败", "output": "输出", "error": "错误", "startedAt": "开始时间", "completedAt": "完成时间", "duration": "耗时", "noExecutions": "暂无执行记录", "noTasks": "暂无定时任务", "createFirst": "创建你的第一个定时任务", "deleteConfirm": "确定要删除此任务吗?", "deleteTitle": "删除任务", "cronHelp": "例如:0 9 * * * (每天上午9点)", "selectConversation": "选择对话", "selectAgent": "选择智能体", "enterMessage": "输入消息内容", "noConversations": "暂无对话", "createTaskFailed": "创建任务失败:", "updateTaskFailed": "更新任务失败:", "deletedConversation": "已删除的对话", "conversationDeletedWarning": "此任务关联的对话已被删除,请选择新的对话", "review": "夜间整理", "allAgents": "所有智能体", "reviewing": "正在整理记忆", "singleConversations": "单人对话", "groupConversations": "群组对话", "cronPresets": { "everyHour": "每小时", "everyDay9am": "每天上午9点", "everyWeekday9am": "工作日上午9点", "everyMonday9am": "每周一上午9点", "custom": "自定义" } };
|
|
84851
|
+
const memoryGrowth$1 = { "title": "记忆成长", "nightly": { "title": "夜间整理", "description": "每天在固定时间整理长期记忆,可能更新 Agent 或群组的记忆文件;不会清理或压缩当前聊天。", "timeLabel": "执行时间", "scopeLabel": "整理范围", "scopeAll": "所有 Agent", "scopeAgent": "指定 Agent", "scopeGroup": "指定群组", "scopeAgentValue": "指定 Agent · {{agentName}}", "agentLabel": "选择 Agent", "selectAgent": "请选择 Agent", "selectAgentFirst": "请先选择要整理的 Agent", "groupLabel": "选择群组", "selectGroup": "请选择群组", "selectGroupFirst": "请先选择要整理的群组", "saved": "夜间整理已更新", "runNow": "立即整理记忆", "runNowDone": "记忆更新完成:{{succeeded}}/{{total}} 个智能体成功", "runNowFailed": "记忆更新失败", "runningProgress": "正在整理记忆", "nextMode": "自动模式", "enabledAt": "已启用 · 每天 {{time}} 执行", "disabled": "未启用", "lastRun": "上次运行", "neverRun": "从未运行", "memoryFiles": "记忆文件", "topicFiles": "专题文件入口", "topicFilesDescription": "这些细节已下沉到专题文件,长期记忆只保留摘要和入口。", "noRecentFiles": "最近没有文件变更", "openMemoryDir": "打开记忆目录", "openMemoryDirHint": "先选择一个 Agent,才能直接打开它的记忆目录。", "openMemoryDirUnavailable": "当前未选择 Agent,无法打开记忆目录", "recentExecutions": "最近整理记录", "noExecutions": "暂无执行历史", "unknownTime": "未知时间", "executionRunning": "记忆更新进行中", "executionFailed": "执行失败", "executionFinished": "执行完成", "executionSummary": "记录结果:{{succeeded}}/{{total}} 个智能体成功", "executionSummaryCompact": "{{succeeded}}/{{total}} 个 Agent", "groupExecutionSummary": "群组 {{groupName}}:更新 {{changedFiles}} 个文件", "groupExecutionSummaryCompact": "{{changedFiles}} 个文件", "noChanges": "无新内容", "candidates": "候选结果", "candidateDisposition": { "promoted": "已晋升", "duplicate": "重复", "deferred": "待定", "skipped": "已跳过" }, "candidateSource": { "direct": "对话", "group": "群摘要" }, "candidateTarget": { "memory": "长期记忆", "user": "用户画像", "group": "群记忆", "tools": "工具配置", "topic": "专题文件", "dailyOnly": "每日记录" }, "budgetStatus": "长期记忆预算", "budget": { "healthy": "健康", "warning": "接近上限", "over": "已超限" }, "budgetPolicy": { "conservative": "保守晋升", "overBudget": "超限保护" }, "enableConfirmTitle": "开启夜间整理?", "enableConfirmMessage": "开启后,系统将在每天指定时间整理长期记忆,可能更新 Agent 或群组的记忆文件;不会清理或压缩当前聊天。\n\n你可以随时关闭,也可以查看每次整理的详细记录。", "enableConfirmAction": "开启", "executionStatus": { "running": "运行中", "success": "成功", "failed": "失败", "no-changes": "无变更" }, "autoTitle": "自动整理记忆", "autoEnableConfirmTitle": "开启自动整理记忆?", "autoEnableConfirmMessage": "开启后,系统将在每天指定时间整理长期记忆,可能更新 Agent 或群组的记忆文件;不会清理或压缩当前聊天。\n\n你可以随时关闭,也可以查看每次整理的详细记录。", "sources": "来源", "sourcesEmpty": "无可用来源", "sourceDirect": "{{count}} 个对话 · {{messages}} 条消息", "sourceGroupDigest": "{{count}} 个群摘要" } };
|
|
84683
84852
|
const clear$1 = { "confirmTitle": "清理上下文?", "confirmDesc": "当前对话消息会保留,只会清理后续回复使用的上下文。", "confirmBtn": "清理" };
|
|
84684
84853
|
const filePreview$1 = { "source": "源码", "preview": "预览", "nonTextTitle": "非文本文件", "nonTextDesc": "此文件无法以文本方式预览。", "openWithSystem": "用系统应用打开", "loadError": "加载失败", "tooLargeTitle": "文件过大", "tooLargeDesc": "文件大小 {{size}},超出预览限制。请用系统应用打开。", "showInFolder": "在文件夹中显示", "download": "下载", "close": "关闭" };
|
|
84685
84854
|
const cancel$1 = "取消";
|
|
84686
|
-
const contextSuggestion$1 = { "title": "
|
|
84855
|
+
const contextSuggestion$1 = { "title": "建议整理上下文", "description": "这段会话有点长了。整理后会保留重点,让后续回复更连贯。聊天记录不会删除。", "accept": "整理上下文", "dismiss": "本会话不再提示", "remindLater": "稍后再说", "close": "关闭", "running": "正在整理会话…", "completed": "会话已整理,后续回复会参考整理后的关键内容。", "failed": "暂时无法整理会话,请稍后再试。" };
|
|
84687
84856
|
const zh = {
|
|
84688
84857
|
header: header$b,
|
|
84689
84858
|
input: input$5,
|
|
@@ -84721,6 +84890,7 @@ const zh = {
|
|
|
84721
84890
|
contextCompacted: contextCompacted$1,
|
|
84722
84891
|
compactLoading: compactLoading$1,
|
|
84723
84892
|
compactFailed: compactFailed$1,
|
|
84893
|
+
contextHealth: contextHealth$1,
|
|
84724
84894
|
retrying: retrying$1,
|
|
84725
84895
|
noMoreMessages: noMoreMessages$1,
|
|
84726
84896
|
newMessages: newMessages$1,
|
|
@@ -84741,20 +84911,20 @@ const onboarding = { "title": "Bring Your Agents to Life", "description": "One s
|
|
|
84741
84911
|
const channelGuide = { "title": "Bring Your Agents to Life", "description": "Connect an AI model so agents can think and respond", "configure": "Connect AI", "dismiss": "Skip" };
|
|
84742
84912
|
const agentChannelCheck = { "title": "This agent needs a spark", "description": "Connect an AI model before starting a conversation", "configure": "Connect AI", "skip": "Create anyway" };
|
|
84743
84913
|
const welcome = { "description": "Chat with an agent or bring everyone together", "title": "Start a conversation", "subtitle": "Pick a partner from the sidebar to begin", "or": "or", "createGroup": "Bring everyone together" };
|
|
84744
|
-
const settings = /* @__PURE__ */ JSON.parse(`{"title":"Settings","nav":{"app":"App","capabilities":"Capabilities","automation":"Automation","agents":"Agent","connection":"Connectivity"},"tabs":{"llm":"Model Channels","agent":"Agent","skill":"Skills","appearance":"Appearance","remote":"Remote Access","mcp":"MCP Servers","search":"Search Engine","about":"About","integration":"Integration"},"panels":{"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","disconnect":"Disconnect","reconnect":"Reconnect","bind":{"step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group / Topic","targetThreadDesc":"Bot connects to a group topic","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Topic","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","qrTimeout":"QR code scan timed out (5 min), please retry"},"appearance":{"title":"Appearance","description":"Customize theme, language and display preferences"},"channel":{"title":"Model Channels","description":"Manage AI service channels and default models"},"mcp":{"title":"Extension Services","description":"Configure MCP services to extend Agent capabilities"},"skill":{"title":"Skills","description":"Manage skill modules available to Agents"},"search":{"title":"Search","description":"Configure web search engines and default behavior"},"remote":{"title":"Remote Access","description":"Access KAi from your phone browser with an encrypted token"},"agent":{"title":"Agents","description":"Create and manage custom Agents"},"memoryGrowth":{"title":"Memory Growth","description":"Configure how memory updates grow automatically over time"},"scheduler":{"title":"Scheduled Tasks","description":"Create and manage automated tasks on a schedule"},"about":{"title":"About KAi","description":"Multi AI Agent Collaborative Desktop App"},"multimodal":{"title":"Multimodal Capabilities","description":"Configure image, video, and voice capabilities for analysis and generation"}},"channel":{"title":"Model Channels","add":"Add Channel","addTitle":"Add Channel","editTitle":"Edit Channel","name":"Channel Name","namePlaceholder":"e.g. OpenAI, Azure","apiType":"API Type","apiTypeOpenai":"OpenAI Compatible","apiTypeOfficialOpenai":"OpenAI","apiTypeAnthropic":"Anthropic","apiTypeGoogle":"Google Gemini","apiTypeAuto":"Auto Detect","baseUrl":"Base URL","apiKey":"API Key","defaultModel":"Default Model","selectModel":"Select model...","enterUrlAndKey":"Enter Base URL and API Key first","loadingModels":"Loading models...","searchOrType":"Search or type model name…","useCustom":"Custom","isDefault":"Default Channel","setAsDefault":"Set as default channel","default":"Default","setDefault":"Set Default","edit":"Edit","delete":"Delete","confirmDelete":"Delete this channel?","deleteTitle":"Delete Channel","showApiKey":"Show API Key","hideApiKey":"Hide API Key","empty":"No channels yet. Click the button below to create one.","deleted":"Channel deleted","setDefaultDone":"\\"{{name}}\\" is now the default channel","actions":"Actions for {{name}}","confirmDeleteMm":"This channel is used for multimodal image analysis (analyzeImage tool). Deleting it will disable that feature. Delete \\"{{name}}\\"?","tabChannels":"Channels","tabMultimodal":"Multimodal"},"llm":{"title":"LLM Configuration","model":"Model Name","modelPreset":"Model Preset","customModel":"Custom Model","apiKey":"API Key","baseUrl":"Base URL","temperature":"Temperature","maxTokens":"Max Tokens","topP":"Top P","loadingModels":"Loading models...","errors":{"network_error":"Cannot connect to API server. Please check Base URL and network connection","auth_failed":"API Key authentication failed. Please check your key","api_error":"API request failed. Please check server status"}},"remote":{"title":"Remote Access","description":"Enable it to access KAi from your phone browser.\\nAll connections use encrypted token authentication.","on":"On","off":"Off","copyLink":"Copy Link","rotateLink":"Regenerate Link","stopLink":"Stop Remote Access","rotateSuccess":"A new link is ready. The old link is no longer valid.","linkTitle":"Stable access link","linkDescription":"This link is restored automatically on next launch unless you stop it or regenerate it.","restoreMode":"Startup recovery","restoreEnabled":"Auto restore","restoreDisabled":"Do not auto restore","lastGenerated":"Last generated","notGeneratedYet":"Not generated yet","restoreFailedTitle":"Restore failed","status":{"disabled":"Off","enabling":"Starting","enabled":"On","restoring":"Restoring","rotating":"Generating new link","stopping":"Stopping","error":"Restore failed"},"qrCodeAlt":"Remote access QR code","tokenPending":"Waiting for access token...","portValue":"Port: {{port}}","connectionsValue":"Connections: {{current}}/{{max}}","addresses":"Available Addresses","connectedClients":"Connected Devices","errors":{"toggleFailed":"Failed to update remote access status.","copyFailed":"Failed to copy remote access link.","rotateFailed":"Failed to regenerate remote access link."}},"search":{"engines":"Search Engines","builtIn":"Built-in","default":"Default","setDefault":"Set as Default","addCustom":"Add Custom Engine","addEngine":"Add Search Engine","editEngine":"Edit Search Engine","name":"Engine Name","namePlaceholder":"e.g., Google Scholar","urlTemplate":"URL Template","urlTemplateHint":"Use {query} as search keyword placeholder","urlTemplateError":"URL template must contain {query} placeholder","showWindow":"Show Search Window (Debug)","confirmDelete":"Delete this search engine?","deleteTitle":"Delete Search Engine","delete":"Delete"},"language":"Language","appearance":{"theme":"Theme","themeLight":"Light","themeDark":"Dark","themeSystem":"System"},"save":"Save","cancel":"Cancel","saveFailed":"Failed to save settings. Please try again.","saveSuccess":"Saved successfully","mcp":{"title":"MCP Servers","add":"Add Server","addServer":"Add Server","addTitle":"Add Server","editTitle":"Edit Server","empty":"No MCP servers yet","confirmDelete":"Are you sure you want to delete this server?","deleteTitle":"Delete Server","serverName":"Server Name","serverType":"Type","command":"Command","args":"Arguments","url":"WebSocket URL","enabled":"Enabled","testConnection":"Test Connection","connected":"Connected","disconnected":"Disconnected","error":"Connection Error","edit":"Edit","delete":"Delete","typeCommand":"Command","typeStreamableHttp":"Streamable HTTP","typeWebsocket":"WebSocket","toolCount":"Tools","testing":"Testing...","testSuccess":"Connection successful","testFailed":"Connection failed","applyToAgent":"Apply to Agent","appliedToAgents":"Applied to {{count}} Agents","notAppliedToAnyAgent":"Not applied to any Agent","globallyDisabled":"Globally disabled","selectedCount":"{{count}} selected","searchAgent":"Search Agent","noMatchingAgents":"No matching Agents found","drawerDisabledWarning":"This MCP server is globally disabled, Agents cannot use it","filteredCount":"{{count}} Agents found","selectAll":"Select All","clearAll":"Clear All","selectFiltered":"Select shown","clearFiltered":"Clear shown"},"about":{"releaseNotes":"Release Notes","versionCopied":"Copied","autoCheckForUpdates":"Check for updates daily","checkForUpdates":"Check for Updates","checking":"Checking for updates","goDownload":"Download","newVersion":"New version available","updateHighlights":"What’s new","viewFullReleaseNotes":"View full release notes","retry":"Check Again","upToDate":"You’re up to date","updateError":"Failed to check for updates","feedback":{"title":"Feedback","placeholder":"Tell us what’s on your mind...","bug":"Bug","feature":"Feature request","other":"Other","submit":"Submit feedback","showContact":"Leave contact info","contactPlaceholder":"Email or other contact info","success":"Thanks for the feedback!","error":"Submission failed. Please try again later."}},"multimodal":{"saved":"Multimodal configuration saved","saveFailed":"Save failed","saving":"Saving…","noChannels":"No channels available. Add one in Model Channels first.","goToChannels":"Go to Model Channels","tabImageAnalysis":"Image Analysis","tabImageGeneration":"Image Generation","tabVideo":"Video","tabVoice":"Voice","comingSoon":"Coming Soon","badgeOn":"ON","badgeOff":"OFF","analysis":{"title":"Image Analysis","summary":"{channel} · {model} · {size}px","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the analyzeImage tool to recognize and understand images","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","maxImageEdge":"Max Image Long Edge","maxImageEdgeHint":"Auto-scaled when exceeded. Lower = cheaper, higher = more detail","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"generation":{"title":"Image Generation","summary":"{channel} · {model} · {size}","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the generateImage tool to create images from text","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","defaultSize":"Default Size (optional)","modelDefaultSize":"Use model default size","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"fallback":{"title":"Fallback Models","add":"Add Fallback","remove":"Remove","selectChannel":"Select channel","hint":"When the primary model fails, fallback models are tried in order"}},"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","editTarget":"Edit","editTargetTitle":"Change Target","editTargetSuccess":"Target updated","disconnect":"Disconnect","reconnect":"Reconnect","createdAt":"Created {{time}}","bind":{"step0Title":"Choose Platform","stepMethodTitle":"Method","step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group / Topic","targetThreadDesc":"Bot connects to a group topic","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Topic","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","wecomBotDesc":"Connect via WeCom Bot, requires Bot ID and Secret","wechatPersonal":"WeChat","wechatPersonalDesc":"Connect via WeChat Personal Bot (ClawBot), scan QR to login","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","wpQrHint":"Open WeChat and scan the QR code above to login","qrTimeout":"QR code scan timed out (5 min), please retry"}}`);
|
|
84745
|
-
const agent = { "name": "Name", "namePlaceholder": "e.g. Code Assistant", "channel": "Channel", "model": "Model", "description": "Capabilities Description", "descriptionPlaceholder": "Describe the agent's capabilities and purpose...", "temperature": "Temperature", "temperature.description": "Controls randomness (0-2, default 0.7)", "topP": "Top P", "topP.description": "Nucleus sampling threshold (0-1, default 1)", "maxTokens": "Max Tokens", "maxTokens.description": "Maximum output length per response. Leave empty for unlimited.", "maxTokens.unlimited": "Unlimited", "enableThinking": "Enable Thinking", "enableThinking.description": "Enable deep reasoning for more accurate responses (supported by some models)", "notifyOnDegraded": "Notify on channel issues", "notifyOnDegraded.description": "Show alert when channel is slow or unavailable", "autoFallback": "Auto-switch to fallback channel", "autoFallback.description": "Automatically try fallback channels on failure (use with caution)", "optimizeDescription": "AI Optimize Description", "optimizeFailed": "Optimization failed, please try again", "create": "Create Agent", "editTitle": "Edit Agent", "confirmDelete": "Delete this agent?", "deleteTitle": "Delete Agent", "emptyTitle": "No Agents Yet", "emptyDesc": "Create your first Agent to combine models and capabilities into a role", "createFirst": "Create your first Agent", "searchPlaceholder": "Search Agents", "noDescription": "No description", "noResults": 'No agents matching "{{query}}". Press Esc to clear', "discardTitle": "Discard Changes?", "discardMessage": "You have unsaved changes that will be lost if you leave.", "configured": "Configured", "incomplete": "Incomplete", "unconfigured": "Not configured", "noModel": "No model selected", "justNow": "Just now", "minutesAgo": "{{count}} min ago", "hoursAgo": "{{count}}h ago", "daysAgo": "{{count}}d ago", "updatedAt": "Updated {{time}}", "templateCopied": 'Created from "{{name}}" template', "templateSystemPrefix": "You are {{name}}. ", "configure": "Configure Agent", "summarizeConversation": "Summarize This Conversation", "updateMemory": "Update Memory", "writeToMemory": "Write to Memory", "writingMemory": "Writing...", "memoryWritten": "Written", "summarizePrompt": 'Please produce a structured summary of this conversation. Output exactly these four sections: Key Conclusions, Decisions Made, Action Items, Open Questions. If a section is empty, write "None". Do not update any workspace files.', "primary": "Primary", "healthy": "Healthy", "degraded": "Slow", "unhealthy": "Offline", "unknown": "Unknown", "edit": "Edit", "delete": "Delete", "add": "Add", "update": "Update", "advanced": "Advanced", "avatar": { "label": "Agent avatar", "hint": "Click the avatar to upload or remove a custom image" }, "advancedConfig": "Advanced Config", "reasoningEffort": "Reasoning Effort", "reasoningEffortLevels": { "off": "Off", "low": "Low", "medium": "Medium", "high": "High" }, "reasoningEffort.description": "Controls how much reasoning effort the model spends before answering. Higher levels are usually more reliable, but may respond more slowly.", "selected": "selected", "tab": { "basic": "Basic", "identity": "Identity", "model": "Model", "brain": "Model", "capabilities": "Capabilities", "workspace": "Workspace", "memory": "Memory" }, "summary": { "model": "Model", "skills": "Skills", "mcp": "MCP", "thinking": "Thinking" }, "notSelected": "Not selected", "mention": { "placeholder": "Select agent...", "noAgents": "No agents configured", "allDesc": "Notify all members" }, "skill": { "title": "Skills", "empty": "No skills found. Create them manually in ~/.kai/skills/", "back": "Back" }, "mcpServers": { "title": "MCP Servers", "empty": 'No enabled MCP servers. Please configure them in "MCP Servers" settings.', "connected": "Connected", "disconnected": "Disconnected", "tools": " tools" }, "toolLimit": { "title": "Built-in Tool Permissions", "summaryNone": "No restrictions", "summaryCount": "{{count}} disabled", "summaryCountWithCritical": "{{count}} disabled, including critical tool {{tool}}", "groupFile": "Files", "groupSystem": "System", "groupNetwork": "Network", "groupData": "Data", "groupAux": "Auxiliary", "disabled": "Disabled", "hint": "When a tool is disabled, this Agent cannot call that capability at runtime. Be careful with critical tools like readFile, writeFile, editFile, and shell.", "warningCritical": "Critical tool {{tool}} is disabled. The Agent may be unable to {{consequence}}.", "warningNearAll": "Only {{count}} tools remain enabled. The Agent may become barely usable for real tasks.", "warningCriticalTools": { "readFile": "read workspace content", "writeFile": "write files", "editFile": "modify existing files", "shell": "run commands or verify results" }, "toolDesc": { "readFile": "Read local files or directory contents", "writeFile": "Create or overwrite local files", "editFile": "Apply exact text replacements in files", "shell": "Run terminal commands", "webFetch": "Fetch a specific webpage or API response", "webSearch": "Search the web for live information", "sqlQuery": "Run read-only SQL queries", "analyzeImage": "Analyze images or extract text", "skill": "Load and use predefined Skills", "createCronJob": "Create a scheduled task", "listCronJobs": "View scheduled tasks", "updateCronJob": "Update a scheduled task", "deleteCronJob": "Delete a scheduled task" } }, "workspace": { "hide": "Hide", "edit": "Edit", "openDir": "Open Directory" }, "errors": { "duplicateName": "An agent with the same name already exists. Please use a different name.", "nameRequired": "Agent name cannot be empty." }, "initMessage": { "greeting": "Hello! I am your creator.", "instruction": "Please complete your identity files based on the following information:", "name": "Name", "description": "Capabilities", "tasks": "Please complete the following tasks:", "task1": "Read the template content in IDENTITY.md and SOUL.md", "task2": "Design a suitable identity for yourself based on your name and capabilities:", "task2a": "Fill in your name, type, temperament, and Emoji in IDENTITY.md", "task2b": "Adjust your core truths, boundaries, and style in SOUL.md according to your functional positioning", "task3": "After completion, briefly tell me who you are and what you can do", "reminder": "Remember: This is your first conversation and your opportunity to define yourself." } };
|
|
84914
|
+
const settings = /* @__PURE__ */ JSON.parse(`{"title":"Settings","nav":{"app":"App","capabilities":"Capabilities","automation":"Automation","agents":"Agent","connection":"Connectivity"},"tabs":{"llm":"Model Channels","agent":"Agent","skill":"Skills","appearance":"Appearance","remote":"Remote Access","mcp":"MCP Servers","search":"Search Engine","about":"About","integration":"Integration"},"panels":{"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","disconnect":"Disconnect","reconnect":"Reconnect","bind":{"step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group Session","targetThreadDesc":"Bot connects to a group session","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Session","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","qrTimeout":"QR code scan timed out (5 min), please retry"},"appearance":{"title":"Appearance","description":"Customize theme, language and display preferences"},"channel":{"title":"Model Channels","description":"Manage AI service channels and default models"},"mcp":{"title":"Extension Services","description":"Configure MCP services to extend Agent capabilities"},"skill":{"title":"Skills","description":"Manage skill modules available to Agents"},"search":{"title":"Search","description":"Configure web search engines and default behavior"},"remote":{"title":"Remote Access","description":"Access KAi from your phone browser with an encrypted token"},"agent":{"title":"Agents","description":"Create and manage custom Agents"},"memoryGrowth":{"title":"Memory Growth","description":"Configure how memory updates grow automatically over time"},"scheduler":{"title":"Scheduled Tasks","description":"Create and manage automated tasks on a schedule"},"about":{"title":"About KAi","description":"Multi AI Agent Collaborative Desktop App"},"multimodal":{"title":"Multimodal Capabilities","description":"Configure image, video, and voice capabilities for analysis and generation"}},"channel":{"title":"Model Channels","add":"Add Channel","addTitle":"Add Channel","editTitle":"Edit Channel","name":"Channel Name","namePlaceholder":"e.g. OpenAI, Azure","apiType":"API Type","apiTypeOpenai":"OpenAI Compatible","apiTypeOfficialOpenai":"OpenAI","apiTypeAnthropic":"Anthropic","apiTypeGoogle":"Google Gemini","apiTypeAuto":"Auto Detect","baseUrl":"Base URL","apiKey":"API Key","defaultModel":"Default Model","selectModel":"Select model...","enterUrlAndKey":"Enter Base URL and API Key first","loadingModels":"Loading models...","searchOrType":"Search or type model name…","useCustom":"Custom","isDefault":"Default Channel","setAsDefault":"Set as default channel","default":"Default","setDefault":"Set Default","edit":"Edit","delete":"Delete","confirmDelete":"Delete this channel?","deleteTitle":"Delete Channel","showApiKey":"Show API Key","hideApiKey":"Hide API Key","empty":"No channels yet. Click the button below to create one.","deleted":"Channel deleted","setDefaultDone":"\\"{{name}}\\" is now the default channel","actions":"Actions for {{name}}","confirmDeleteMm":"This channel is used for multimodal image analysis (analyzeImage tool). Deleting it will disable that feature. Delete \\"{{name}}\\"?","tabChannels":"Channels","tabMultimodal":"Multimodal"},"llm":{"title":"LLM Configuration","model":"Model Name","modelPreset":"Model Preset","customModel":"Custom Model","apiKey":"API Key","baseUrl":"Base URL","temperature":"Temperature","maxTokens":"Max Tokens","topP":"Top P","loadingModels":"Loading models...","errors":{"network_error":"Cannot connect to API server. Please check Base URL and network connection","auth_failed":"API Key authentication failed. Please check your key","api_error":"API request failed. Please check server status"}},"remote":{"title":"Remote Access","description":"Enable it to access KAi from your phone browser.\\nAll connections use encrypted token authentication.","on":"On","off":"Off","copyLink":"Copy Link","rotateLink":"Regenerate Link","stopLink":"Stop Remote Access","rotateSuccess":"A new link is ready. The old link is no longer valid.","linkTitle":"Stable access link","linkDescription":"This link is restored automatically on next launch unless you stop it or regenerate it.","restoreMode":"Startup recovery","restoreEnabled":"Auto restore","restoreDisabled":"Do not auto restore","lastGenerated":"Last generated","notGeneratedYet":"Not generated yet","restoreFailedTitle":"Restore failed","status":{"disabled":"Off","enabling":"Starting","enabled":"On","restoring":"Restoring","rotating":"Generating new link","stopping":"Stopping","error":"Restore failed"},"qrCodeAlt":"Remote access QR code","tokenPending":"Waiting for access token...","portValue":"Port: {{port}}","connectionsValue":"Connections: {{current}}/{{max}}","addresses":"Available Addresses","connectedClients":"Connected Devices","errors":{"toggleFailed":"Failed to update remote access status.","copyFailed":"Failed to copy remote access link.","rotateFailed":"Failed to regenerate remote access link."}},"search":{"engines":"Search Engines","builtIn":"Built-in","default":"Default","setDefault":"Set as Default","addCustom":"Add Custom Engine","addEngine":"Add Search Engine","editEngine":"Edit Search Engine","name":"Engine Name","namePlaceholder":"e.g., Google Scholar","urlTemplate":"URL Template","urlTemplateHint":"Use {query} as search keyword placeholder","urlTemplateError":"URL template must contain {query} placeholder","showWindow":"Show Search Window (Debug)","confirmDelete":"Delete this search engine?","deleteTitle":"Delete Search Engine","delete":"Delete"},"language":"Language","appearance":{"theme":"Theme","themeLight":"Light","themeDark":"Dark","themeSystem":"System"},"save":"Save","cancel":"Cancel","saveFailed":"Failed to save settings. Please try again.","saveSuccess":"Saved successfully","mcp":{"title":"MCP Servers","add":"Add Server","addServer":"Add Server","addTitle":"Add Server","editTitle":"Edit Server","empty":"No MCP servers yet","confirmDelete":"Are you sure you want to delete this server?","deleteTitle":"Delete Server","serverName":"Server Name","serverType":"Type","command":"Command","args":"Arguments","url":"WebSocket URL","enabled":"Enabled","testConnection":"Test Connection","connected":"Connected","disconnected":"Disconnected","error":"Connection Error","edit":"Edit","delete":"Delete","typeStdio":"Stdio","typeCommand":"Command","typeStreamableHttp":"Streamable HTTP","typeWebsocket":"WebSocket","toolCount":"Tools","testing":"Testing...","testSuccess":"Connection successful","testFailed":"Connection failed","applyToAgent":"Apply to Agent","appliedToAgents":"Applied to {{count}} Agents","notAppliedToAnyAgent":"Not applied to any Agent","globallyDisabled":"Globally disabled","selectedCount":"{{count}} selected","searchAgent":"Search Agent","noMatchingAgents":"No matching Agents found","drawerDisabledWarning":"This MCP server is globally disabled, Agents cannot use it","filteredCount":"{{count}} Agents found","selectAll":"Select All","clearAll":"Clear All","selectFiltered":"Select shown","clearFiltered":"Clear shown"},"about":{"releaseNotes":"Release Notes","versionCopied":"Copied","autoCheckForUpdates":"Check for updates daily","checkForUpdates":"Check for Updates","checking":"Checking for updates","goDownload":"Download","newVersion":"New version available","updateHighlights":"What’s new","viewFullReleaseNotes":"View full release notes","retry":"Check Again","upToDate":"You’re up to date","updateError":"Failed to check for updates","feedback":{"title":"Feedback","placeholder":"Tell us what’s on your mind...","bug":"Bug","feature":"Feature request","other":"Other","submit":"Submit feedback","showContact":"Leave contact info","contactPlaceholder":"Email or other contact info","success":"Thanks for the feedback!","error":"Submission failed. Please try again later."}},"multimodal":{"saved":"Multimodal configuration saved","saveFailed":"Save failed","saving":"Saving…","noChannels":"No channels available. Add one in Model Channels first.","goToChannels":"Go to Model Channels","tabImageAnalysis":"Image Analysis","tabImageGeneration":"Image Generation","tabVideo":"Video","tabVoice":"Voice","comingSoon":"Coming Soon","badgeOn":"ON","badgeOff":"OFF","analysis":{"title":"Image Analysis","summary":"{channel} · {model} · {size}px","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the analyzeImage tool to recognize and understand images","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","maxImageEdge":"Max Image Long Edge","maxImageEdgeHint":"Auto-scaled when exceeded. Lower = cheaper, higher = more detail","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"generation":{"title":"Image Generation","summary":"{channel} · {model} · {size}","summaryDefault":"Not configured","hint":"When enabled, the Agent can use the generateImage tool to create images from text","channel":"Channel","selectChannel":"Select a channel","modelLabel":"Model Override (optional)","modelHint":"Leave empty to use the channel default model","defaultSize":"Default Size (optional)","modelDefaultSize":"Use model default size","inactive":"Disabled","channelDeleted":"Channel Missing","incomplete":"Incomplete · Please select a channel"},"fallback":{"title":"Fallback Models","add":"Add Fallback","remove":"Remove","selectChannel":"Select channel","hint":"When the primary model fails, fallback models are tried in order"}},"integration":{"title":"External Integrations","description":"Connect external platforms so Agents can chat with you through them","addNew":"Add Integration","empty":"No external platforms connected yet. Once bound, Agents can receive and reply to messages on the connected platform.","connected":"Connected","disconnected":"Disconnected","connecting":"Connecting","reconnecting":"Reconnecting","authFailed":"Auth Failed","testConnection":"Test Connection","editTarget":"Edit","editTargetTitle":"Change Target","editTargetSuccess":"Target updated","disconnect":"Disconnect","reconnect":"Reconnect","createdAt":"Created {{time}}","bind":{"step0Title":"Choose Platform","stepMethodTitle":"Method","step1Title":"Get Credentials","step2Title":"Choose Target","step3Title":"Verify Connection","botId":"Bot ID","botIdPlaceholder":"Enter WeCom Bot ID","secret":"Secret","secretPlaceholder":"Enter Bot Secret","targetAgent":"Agent","targetAgentDesc":"Bot acts as the Agent's avatar","targetThread":"Group Session","targetThreadDesc":"Bot connects to a group session","selectAgent":"Select Agent","selectGroup":"Select Group","selectThread":"Select Session","next":"Next","prev":"Back","cancel":"Cancel","done":"Done","testSuccess":"Connection successful! WebSocket channel established.","testFailed":"Connection failed","summaryPlatform":"Platform","summaryBotId":"Bot ID","summaryTarget":"Target"},"confirmUnbind":"Are you sure you want to disconnect this integration?","unbindTitle":"Disconnect Integration","hint":"External integrations only work while the app is running. The Bot will go offline when the app is closed.","wecomBot":"WeCom","wecomBotDesc":"Connect via WeCom Bot, requires Bot ID and Secret","wechatPersonal":"WeChat","wechatPersonalDesc":"Connect via WeChat Personal Bot (ClawBot), scan QR to login","methodQrcode":"Scan QR Code","methodQrcodeDesc":"Scan with WeCom to get credentials automatically","methodManual":"Manual Input","methodManualDesc":"Enter Bot ID and Secret","qrLoading":"Loading QR code...","qrHint":"Open WeCom and scan the QR code above","wpQrHint":"Open WeChat and scan the QR code above to login","qrTimeout":"QR code scan timed out (5 min), please retry"}}`);
|
|
84915
|
+
const agent = { "name": "Name", "namePlaceholder": "e.g. Code Assistant", "channel": "Channel", "model": "Model", "description": "Capabilities Description", "descriptionPlaceholder": "Describe the agent's capabilities and purpose...", "temperature": "Temperature", "temperature.description": "Controls randomness (0-2, default 0.7)", "topP": "Top P", "topP.description": "Nucleus sampling threshold (0-1, default 1)", "maxTokens": "Max Tokens", "maxTokens.description": "Maximum output length per response. Leave empty for unlimited.", "maxTokens.unlimited": "Unlimited", "enableThinking": "Enable Thinking", "enableThinking.description": "Enable deep reasoning for more accurate responses (supported by some models)", "notifyOnDegraded": "Notify on channel issues", "notifyOnDegraded.description": "Show alert when channel is slow or unavailable", "autoFallback": "Auto-switch to fallback channel", "autoFallback.description": "Automatically try fallback channels on failure (use with caution)", "optimizeDescription": "AI Optimize Description", "optimizeFailed": "Optimization failed, please try again", "create": "Create Agent", "editTitle": "Edit Agent", "confirmDelete": "Delete this agent?", "deleteTitle": "Delete Agent", "emptyTitle": "No Agents Yet", "emptyDesc": "Create your first Agent to combine models and capabilities into a role", "createFirst": "Create your first Agent", "searchPlaceholder": "Search Agents", "noDescription": "No description", "noResults": 'No agents matching "{{query}}". Press Esc to clear', "discardTitle": "Discard Changes?", "discardMessage": "You have unsaved changes that will be lost if you leave.", "configured": "Configured", "incomplete": "Incomplete", "unconfigured": "Not configured", "noModel": "No model selected", "justNow": "Just now", "minutesAgo": "{{count}} min ago", "hoursAgo": "{{count}}h ago", "daysAgo": "{{count}}d ago", "updatedAt": "Updated {{time}}", "templateCopied": 'Created from "{{name}}" template', "templateSystemPrefix": "You are {{name}}. ", "configure": "Configure Agent", "summarizeConversation": "Summarize This Conversation", "updateMemory": "Update Memory", "writeToMemory": "Write to Memory", "writingMemory": "Writing...", "memoryWritten": "Written", "summarizePrompt": 'Please produce a structured summary of this conversation. Output exactly these four sections: Key Conclusions, Decisions Made, Action Items, Open Questions. If a section is empty, write "None". Do not update any workspace files.', "primary": "Primary", "healthy": "Healthy", "degraded": "Slow", "unhealthy": "Offline", "unknown": "Unknown", "edit": "Edit", "delete": "Delete", "add": "Add", "update": "Update", "advanced": "Advanced", "avatar": { "label": "Agent avatar", "hint": "Click the avatar to upload or remove a custom image" }, "advancedConfig": "Advanced Config", "reasoningEffort": "Reasoning Effort", "reasoningEffortLevels": { "off": "Off", "low": "Low", "medium": "Medium", "high": "High" }, "reasoningEffort.description": "Controls how much reasoning effort the model spends before answering. Higher levels are usually more reliable, but may respond more slowly.", "selected": "selected", "tab": { "basic": "Basic", "identity": "Identity", "model": "Model", "brain": "Model", "capabilities": "Capabilities", "workspace": "Workspace", "memory": "Memory" }, "summary": { "model": "Model", "skills": "Skills", "mcp": "MCP", "thinking": "Thinking" }, "notSelected": "Not selected", "mention": { "placeholder": "Select agent...", "noAgents": "No agents configured", "allDesc": "Notify all members" }, "skill": { "title": "Skills", "empty": "No skills found. Create them manually in ~/.kai/skills/", "back": "Back" }, "mcpServers": { "title": "MCP Servers", "empty": 'No enabled MCP servers. Please configure them in "MCP Servers" settings.', "connected": "Connected", "disconnected": "Disconnected", "tools": " tools" }, "toolLimit": { "title": "Built-in Tool Permissions", "summaryNone": "No restrictions", "summaryCount": "{{count}} disabled", "summaryCountWithCritical": "{{count}} disabled, including critical tool {{tool}}", "groupFile": "Files", "groupSystem": "System", "groupNetwork": "Network", "groupData": "Data", "groupAux": "Auxiliary", "disabled": "Disabled", "hint": "When a tool is disabled, this Agent cannot call that capability at runtime. Be careful with critical tools like readFile, writeFile, editFile, and shell.", "warningCritical": "Critical tool {{tool}} is disabled. The Agent may be unable to {{consequence}}.", "warningNearAll": "Only {{count}} tools remain enabled. The Agent may become barely usable for real tasks.", "warningCriticalTools": { "readFile": "read workspace content", "writeFile": "write files", "editFile": "modify existing files", "shell": "run commands or verify results" }, "toolDesc": { "readFile": "Read local files or directory contents", "writeFile": "Create or overwrite local files", "editFile": "Apply exact text replacements in files", "shell": "Run terminal commands", "webFetch": "Fetch a specific webpage or API response", "webSearch": "Search the web for live information", "sqlQuery": "Run read-only SQL queries", "analyzeImage": "Analyze images or extract text", "generateImage": "Generate images from text prompts", "skill": "Load and use predefined Skills", "createCronJob": "Create a scheduled task", "listCronJobs": "View scheduled tasks", "updateCronJob": "Update a scheduled task", "deleteCronJob": "Delete a scheduled task" } }, "workspace": { "hide": "Hide", "edit": "Edit", "openDir": "Open Directory" }, "errors": { "duplicateName": "An agent with the same name already exists. Please use a different name.", "nameRequired": "Agent name cannot be empty." }, "initMessage": { "greeting": "Hello! I am your creator.", "instruction": "Please complete your identity files based on the following information:", "name": "Name", "description": "Capabilities", "tasks": "Please complete the following tasks:", "task1": "Read the template content in IDENTITY.md and SOUL.md", "task2": "Design a suitable identity for yourself based on your name and capabilities:", "task2a": "Fill in your name, type, temperament, and Emoji in IDENTITY.md", "task2b": "Adjust your core truths, boundaries, and style in SOUL.md according to your functional positioning", "task3": "After completion, briefly tell me who you are and what you can do", "reminder": "Remember: This is your first conversation and your opportunity to define yourself." } };
|
|
84746
84916
|
const skill = { "title": "Skills", "empty": "No Skills available", "add": "Add Skill", "edit": "Edit", "delete": "Delete", "back": "Back", "name": "Skill Name", "namePlaceholder": "e.g. pdf-processing", "description": "Description", "descriptionPlaceholder": "Briefly describe what this skill does", "content": "Content (Markdown)", "contentPlaceholder": "Write detailed instructions for this skill in Markdown...", "deleteConfirm": "Delete this skill?", "nameInvalid": "Name must contain only lowercase letters, numbers, and hyphens, must not start or end with a hyphen, no consecutive hyphens, max 64 characters", "selectTitle": "Select Skills", "permissionHint": "Choose which Skills this agent can use. No Skills selected = no Skill access.", "noSkills": "No available Skills", "noSkillsSelected": "No Skills selected", "manageSkills": "Manage", "searchPlaceholder": "Search Skill", "noMatchingSkills": "No matching Skills found", "selectedCount": "{{count}} selected", "done": "Done", "remove": "Remove", "notAppliedToAnyAgent": "Not applied to any Agent", "appliedToAgents": "Applied to {{count}} Agents", "globallyDisabled": "Globally disabled", "applyToAgent": "Apply to Agent", "searchAgent": "Search Agent", "noMatchingAgents": "No matching Agents found", "drawerDisabledWarning": "This Skill is globally disabled, Agents cannot use it", "filteredCount": "{{count}} Agents found", "selectAll": "Select All", "clearAll": "Clear All" };
|
|
84747
84917
|
const session = { "openDir": "Open Directory" };
|
|
84748
84918
|
const error$5 = { "network": "Network error. Please check your connection.", "rate_limit": "Rate limit exceeded. Please try again later.", "api_error": "API error. Please check your settings.", "unknown": "An error occurred. Please try again.", "retry": "Retry", "boundary": { "title": "Something went wrong", "message": "The application encountered an error", "reload": "Reload", "report": "Report Issue", "copyError": "Copy Error", "errorCopied": "Copied" }, "descriptionRequired": "Description cannot be empty", "noDefaultChannel": "Default LLM channel not configured", "channelNeedsBaseUrl": "Channel must configure baseUrl", "agentNotInConversation": "Agent {{agentId}} not in current conversation", "contentTooLong": "Content exceeds 3000 character limit", "tooManyConcurrentSearches": "Too many concurrent searches. Please wait and try again.", "invalidUrl": "Invalid or unsafe URL", "noCustomEngines": "No custom engines found", "commandRequired": "Command is required for command-based MCP server", "clientNotConnected": "Client not connected", "agentExecutionNotImplemented": "Agent execution not implemented yet", "agentIdRequired": "Missing agentId for agent_review task", "invalidCiphertext": "Invalid ciphertext format: expected 3 parts", "emptySummary": "Empty summary response" };
|
|
84749
84919
|
const network = { "offline": "No internet connection" };
|
|
84750
|
-
const message$2 = { "copy": "Copy", "copied": "Copied", "edit": "Edit", "regenerate": "Regenerate", "delete": "Delete", "confirmDelete": "Delete this message and all messages after it?", "contextCleared": "Context Cleared", "contextCompacted": "Context compacted", "imageLoadFailed": "Image load failed", "openImageViewerHint": "Click to open image viewer", "imageViewerHint": "Double-click to toggle size, Ctrl/⌘ + wheel to zoom, Esc to close", "imageLoadError": "Failed to load image", "copyImage": "Copy image", "imageCopied": "Image copied", "imageCopyFailed": "Failed to copy image", "closeImageViewer": "Close image viewer", "zoomInImage": "Zoom in (+)", "zoomOutImage": "Zoom out (-)", "resetImageZoom": "Fit to window", "switchToCode": "Switch to code", "switchToPreview": "Switch to preview", "preview": "Preview", "previewHtml": "Preview HTML", "htmlPreviewTitle": "HTML Preview", "error": { "network": "Network Error", "rate_limit": "Rate Limit", "api_error": "API Error", "unknown": "Unknown Error" }, "errorMessage": { "network": "There was a network problem. Please check your connection and try again.", "rateLimit": "The system is busy right now. Please try again in a moment.", "rateLimitConcurrency": "The system is busy handling too many requests at once. Please try again in a moment.", "apiError": "The model service is temporarily unavailable. Please try again later.", "unknown": "Something went wrong. Please try again later." }, "fallback": { "transition": "Current model is busy. Switching to a fallback model…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "busy", "timeout": "timed out", "apiError": "temporarily unavailable", "contextOverflow": "context too long", "unknown": "unknown reason" } }, "handoff": "Collaboration Handoff", "broadcast": "Shared Consultation", "expand": "Expand", "collapse": "Collapse", "lines": "lines", "userMessage": "User message", "agentMessage": "{{name}} reply", "generating": "Generating", "sending": "Sending", "waiting": "Waiting", "sendFailed": "Send failed", "retrySend": "Retry", "recall": "Recall", "tokenUsage": "Input: {{input}} | Output: {{output}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "{{completed}}/{{total}} completed", "broadcastStatusPending": "Pending", "broadcastStatusThinking": "Thinking", "broadcastStatusStreaming": "Streaming", "broadcastStatusDone": "Done", "broadcastStatusFailed": "Failed", "broadcastWaiting": "Waiting for response…", "broadcastNoContent": "No content", "broadcastFailed": "Response failed", "broadcastComplete": "Shared consultation finished", "broadcastAllReplied": "Everyone replied", "taskAssign": "Collaboration task started", "taskAssignedTo": "Assigned to {{name}}", "taskDetail": "View execution", "taskDetailCollapse": "Hide execution", "taskEmpty": "No execution content", "taskQueued": "Queued", "taskRunning": "In progress", "taskCompleted": "Completed", "taskFailed": "Execution failed", "taskKilled": "Ended", "taskBackgroundQueued": "Queued in background", "taskBackgroundRunning": "Running in background", "taskBackgroundCompleted": "Background complete", "taskBackgroundFailed": "Background failed", "taskBackgroundKilled": "Background ended", "broadcastWaitingMembers": "Waiting on {{count}} more member(s)" };
|
|
84920
|
+
const message$2 = { "copy": "Copy", "copied": "Copied", "errorDetails": "Error Details", "edit": "Edit", "regenerate": "Regenerate", "delete": "Delete", "confirmDelete": "Delete this message and all messages after it?", "contextCleared": "Context Cleared", "contextCompacted": "Context compacted", "imageLoadFailed": "Image load failed", "openImageViewerHint": "Click to open image viewer", "imageViewerHint": "Double-click to toggle size, Ctrl/⌘ + wheel to zoom, Esc to close", "imageLoadError": "Failed to load image", "copyImage": "Copy image", "imageCopied": "Image copied", "imageCopyFailed": "Failed to copy image", "closeImageViewer": "Close image viewer", "zoomInImage": "Zoom in (+)", "zoomOutImage": "Zoom out (-)", "resetImageZoom": "Fit to window", "switchToCode": "Switch to code", "switchToPreview": "Switch to preview", "preview": "Preview", "previewHtml": "Preview HTML", "htmlPreviewTitle": "HTML Preview", "error": { "network": "Network Error", "rate_limit": "Rate Limit", "api_error": "API Error", "unknown": "Unknown Error" }, "errorMessage": { "network": "There was a network problem. Please check your connection and try again.", "rateLimit": "The system is busy right now. Please try again in a moment.", "rateLimitConcurrency": "The system is busy handling too many requests at once. Please try again in a moment.", "apiError": "The model service is temporarily unavailable. Please try again later.", "unknown": "Something went wrong. Please try again later." }, "fallback": { "transition": "Current model is busy. Switching to a fallback model…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "busy", "timeout": "timed out", "apiError": "temporarily unavailable", "contextOverflow": "context too long", "unknown": "unknown reason" } }, "handoff": "Collaboration Handoff", "broadcast": "Shared Consultation", "expand": "Expand", "collapse": "Collapse", "lines": "lines", "userMessage": "User message", "agentMessage": "{{name}} reply", "generating": "Generating", "sending": "Sending", "waiting": "Waiting", "sendFailed": "Send failed", "retrySend": "Retry", "recall": "Recall", "tokenUsage": "Input: {{input}} | Output: {{output}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "{{completed}}/{{total}} completed", "broadcastStatusPending": "Pending", "broadcastStatusThinking": "Thinking", "broadcastStatusStreaming": "Streaming", "broadcastStatusDone": "Done", "broadcastStatusFailed": "Failed", "broadcastWaiting": "Waiting for response…", "broadcastNoContent": "No content", "broadcastFailed": "Response failed", "broadcastComplete": "Shared consultation finished", "broadcastAllReplied": "Everyone replied", "taskAssign": "Collaboration task started", "taskAssignedTo": "Assigned to {{name}}", "taskDetail": "View execution", "taskDetailCollapse": "Hide execution", "taskEmpty": "No execution content", "taskQueued": "Queued", "taskRunning": "In progress", "taskCompleted": "Completed", "taskFailed": "Execution failed", "taskKilled": "Ended", "taskBackgroundQueued": "Queued in background", "taskBackgroundRunning": "Running in background", "taskBackgroundCompleted": "Background complete", "taskBackgroundFailed": "Background failed", "taskBackgroundKilled": "Background ended", "broadcastWaitingMembers": "Waiting on {{count}} more member(s)" };
|
|
84751
84921
|
const channel = { "primary": "Primary", "healthy": "Healthy", "degraded": "Slow", "unhealthy": "Offline", "unknown": "Unknown", "switch": "Switch to {{name}}", "slow": "Response is slow", "error": "Connection error", "viewStatus": "View channel status", "alertDegraded": "{{channel}} is slow", "alertUnhealthy": "{{channel}} is unavailable", "unknownChannel": "Unknown channel", "fallback": "Fallback Models", "fallbackSummary": "{{count}} configured", "fallbackEmpty": "No fallback models configured", "addFallback": "Add fallback channel" };
|
|
84752
84922
|
const thread = { "tabs": { "label": "Threads", "newThread": "New thread", "streaming": "Replying…", "completed": "Reply completed", "paused": "Paused", "archive": "Archive thread", "renameHint": "Double-click to rename" }, "context": { "discussion": "Discussion" }, "createTitle": "New Discussion", "createSubtitle": 'Create a new discussion in "{{groupName}}"', "members": "Participants:", "memberCount": "{{count}} members will join", "memberCountShort": "{{count}} members will join", "titlePlaceholder": "Discussion topic (required)", "titleTooLong": "Title must not exceed 100 characters", "createHint": "Group members will automatically join this discussion. Send the first message to begin.", "create": "Create", "inGroup": 'A discussion in "{{groupName}}"', "sendFirst": "Send your first message to start the discussion", "placeholder": { "default": 'Discuss with {{speaker}} in "{{group}}"…', "thread": "Discuss {{title}} with {{speaker}}…" }, "badge": { "tooltip": "{{count}} active discussions" }, "archiveToast": "Discussion archived", "archiveUndo": "Undo", "archiveConfirm": "Archive this discussion?", "archiveTitle": "Archive Discussion" };
|
|
84753
84923
|
const mention = { "allDesc": "Notify all members" };
|
|
84754
84924
|
const chat = { "members": "Members", "active": "{{count}} responding", "moreMembers": "more", "untitled": "Untitled Chat", "noMoreMessages": "No more messages", "newMessages": "New messages", "scrollToBottom": "Scroll to bottom", "loadMore": "Load More Messages", "noMessages": "No messages yet", "agentThinking": "{{name}} is thinking…", "agentSpeaking": "{{name}} is replying…", "thinking": "thinking", "replying": "replying", "handoffTo": "handoff to", "groupReady": "Group is ready", "groupReadyHint": "Start with a question, goal, or to-do item" };
|
|
84755
84925
|
const supervisor = { "evaluating": "{{name}} is evaluating… (round {{current}}/{{max}})", "evaluatingShort": "{{name}} is evaluating", "improving": "{{name}} is improving based on feedback… (round {{current}}/{{max}})", "improvingShort": "{{name}} is improving", "completed": "{{name}} confirmed goal met ({{rounds}} rounds)", "completedShort": "{{name}} confirmed goal met", "ended": "Supervision ended ({{rounds}} rounds)", "endedShort": "Ended", "endedWithReason": "Supervision ended ({{rounds}} rounds): {{reason}}", "roundLabel": "Round {{current}}/{{max}} review", "roundPassed": "Passed", "roundNotPassed": "Not passed", "roundNotPassedFeedback": "Not passed: {{feedback}}", "viewRounds": "View evaluation details", "hideRounds": "Hide evaluation details", "viewReview": "View evaluation process", "hideReview": "Hide evaluation process", "reviewProcessTitle": "Evaluation process", "resultTitle": "Evaluation result", "resultStatus": "Result", "feedbackTitle": "Feedback", "nextTaskTitle": "Next step", "taskKey": { "eval_first": "Review execution result", "eval_improve": "Review improvement result", "improve_from_feedback": "Improve based on feedback", "noEvaluateTool": "Evaluate tool not called" }, "reasonKey": { "max_iterations_reached": "Maximum iterations reached", "supervisor.noEvaluateTool": "Evaluate tool not called" } };
|
|
84756
|
-
const command = { "clearDescription": "Clear context for future replies", "compactDescription": "
|
|
84757
|
-
const quickReply = { "title": "Quick Replies", "add": "Add quick reply", "addTitle": "Add Quick Reply", "editTitle": "Edit Quick Reply", "emptyTitle": "No quick replies yet", "emptyDescription": "Save common phrases and
|
|
84926
|
+
const command = { "clearDescription": "Clear context for future replies", "compactDescription": "Compress this conversation context; add notes to preserve key points", "quickReplyDescription": "Open quick replies" };
|
|
84927
|
+
const quickReply = { "title": "Quick Replies", "add": "Add quick reply", "addTitle": "Add Quick Reply", "editTitle": "Edit Quick Reply", "emptyTitle": "No quick replies yet", "emptyDescription": "Save common phrases and send them next time.", "addFirst": "Add first one", "titleLabel": "Title, optional", "titlePlaceholder": "For example: Review this change", "contentLabel": "Content", "contentPlaceholder": "Enter reusable text", "selectHint": "Select", "insertHint": "Insert", "sendHint": "Send", "moreActions": "More actions", "manage": "Manage", "delete": "Delete", "deleted": "Quick reply deleted", "undo": "Undo", "loadFailed": "Failed to load quick replies", "saveFailed": "Failed to save quick reply", "editorHint": "Enter for newline · Cmd/Ctrl + Enter to save · Esc back to list" };
|
|
84758
84928
|
const tool = { "executing": "Executing", "success": "Success", "error": "Error", "arguments": "Arguments", "result": "Result", "expand": "Expand", "collapse": "Collapse", "viewChanges": "View Changes", "viewDetails": "View Details", "changes": "Changes" };
|
|
84759
84929
|
const reasoning = { "title": "Thinking" };
|
|
84760
84930
|
const common = { "loading": "Loading...", "create": "Create", "save": "Save", "saving": "Saving...", "cancel": "Cancel", "close": "Close", "back": "Back", "confirm": "Confirm", "openMenu": "Open menu", "expand": "Expand", "collapse": "Collapse", "unsavedChanges": "You have unsaved changes. Leave anyway?", "edit": "Edit" };
|
|
@@ -84768,18 +84938,19 @@ const memoryConsolidationSkipped = "Memory consolidation skipped";
|
|
|
84768
84938
|
const contextCleared = "Context cleared";
|
|
84769
84939
|
const contextCompacted = "Context compacted";
|
|
84770
84940
|
const compactLoading = "Compacting context...";
|
|
84771
|
-
const compactFailed = "
|
|
84941
|
+
const compactFailed = "Compaction failed";
|
|
84942
|
+
const contextHealth = { "title": "Context Health", "failed": "Compaction failed", "compacting": "Compacting", "compacted": "Compacted", "reasonProactive": "Proactive compaction", "reasonStepBoundary": "Step-boundary compaction", "reasonReactive": "Overflow repair", "reasonManual": "Manual compaction", "statusRowCompleted": "Context compacted · {{reason}} · {{before}} → {{after}}", "statusRowFailed": "Context compaction failed · Consider starting a new Session", "currentUsage": "Current estimate: {{current}} / {{limit}}", "thresholdRatio": "Compaction threshold: {{percent}}", "lastCompaction": "Last compaction: {{value}}", "lastResult": "Last result: {{value}}", "totalCompactions": "Total compactions: {{count}}", "targetLimit": "Target limit: {{value}}" };
|
|
84772
84943
|
const retrying = "Retrying... {{attempt}}/{{maxAttempts}}";
|
|
84773
84944
|
const noMoreMessages = "No more messages";
|
|
84774
84945
|
const newMessages = "New messages";
|
|
84775
84946
|
const scrollToBottom = "Scroll to bottom";
|
|
84776
84947
|
const time = { "yesterday": "Yesterday", "monday": "Mon", "tuesday": "Tue", "wednesday": "Wed", "thursday": "Thu", "friday": "Fri", "saturday": "Sat", "sunday": "Sun" };
|
|
84777
84948
|
const scheduler = { "title": "Scheduled Tasks", "createTask": "Create Task", "editTask": "Edit Task", "taskName": "Task Name", "taskType": "Task Type", "cronExpression": "Cron Expression", "enabled": "Enabled", "disabled": "Disabled", "agentConversation": "Agent Conversation", "conversation": "Conversation", "agent": "Agent", "group": "Group", "message": "Message", "lastRunAt": "Last Run", "nextRunAt": "Next Run", "never": "Never", "actions": "Actions", "edit": "Edit", "delete": "Delete", "toggle": "Toggle", "executions": "Execution History", "status": "Status", "running": "Running", "success": "Success", "failed": "Failed", "output": "Output", "error": "Error", "startedAt": "Started At", "completedAt": "Completed At", "duration": "Duration", "noExecutions": "No execution records", "noTasks": "No scheduled tasks", "createFirst": "Create your first scheduled task", "deleteConfirm": "Are you sure you want to delete this task?", "deleteTitle": "Delete Task", "cronHelp": "e.g., 0 9 * * * (daily at 9am)", "selectConversation": "Select Conversation", "selectAgent": "Select Agent", "enterMessage": "Enter message content", "noConversations": "No conversations", "createTaskFailed": "Failed to create task: ", "updateTaskFailed": "Failed to update task: ", "deletedConversation": "Deleted Conversation", "conversationDeletedWarning": "The conversation associated with this task has been deleted. Please select a new conversation.", "review": "Nightly Memory Consolidation", "allAgents": "All Agents", "reviewing": "Updating memory", "singleConversations": "Single Conversations", "groupConversations": "Group Conversations", "cronPresets": { "everyHour": "Every hour", "everyDay9am": "Every day at 9 AM", "everyWeekday9am": "Weekdays at 9 AM", "everyMonday9am": "Every Monday at 9 AM", "custom": "Custom" } };
|
|
84778
|
-
const memoryGrowth = { "title": "Memory Growth", "nightly": { "title": "Nightly organization", "description": "
|
|
84949
|
+
const memoryGrowth = { "title": "Memory Growth", "nightly": { "title": "Nightly organization", "description": "Consolidate long-term memory at a fixed time every day. This may update Agent or Group memory files; it will not clear or compress the current chat.", "timeLabel": "Run time", "scopeLabel": "Scope", "scopeAll": "All Agents", "scopeAgent": "Specific Agent", "scopeGroup": "Specific Group", "scopeAgentValue": "Specific Agent · {{agentName}}", "agentLabel": "Agent", "selectAgent": "Select an agent", "selectAgentFirst": "Select an agent first", "groupLabel": "Group", "selectGroup": "Select a group", "selectGroupFirst": "Select a group first", "saved": "Nightly organization updated", "runNow": "Run update now", "runNowDone": "Memory update finished: {{succeeded}}/{{total}} agents succeeded", "runNowFailed": "Memory update failed", "runningProgress": "Updating memory", "nextMode": "Automatic mode", "enabledAt": "Enabled · runs daily at {{time}}", "disabled": "Disabled", "lastRun": "Last run", "neverRun": "Never run", "memoryFiles": "Memory files", "topicFiles": "Topic file entries", "topicFilesDescription": "These details were moved into topic files; long-term memory keeps only the summary and entry points.", "noRecentFiles": "No recent file changes", "openMemoryDir": "Open memory directory", "openMemoryDirHint": "Select an agent first to open that agent's memory directory.", "openMemoryDirUnavailable": "No agent selected. Cannot open memory directory.", "recentExecutions": "Recent organization records", "noExecutions": "No execution history yet", "unknownTime": "Unknown time", "executionRunning": "Memory update is running", "executionFailed": "Execution failed", "executionFinished": "Execution finished", "executionSummary": "Recorded result: {{succeeded}}/{{total}} agents succeeded", "executionSummaryCompact": "{{succeeded}}/{{total}} agents", "groupExecutionSummary": "Group {{groupName}}: {{changedFiles}} files changed", "groupExecutionSummaryCompact": "{{changedFiles}} files", "noChanges": "No new content", "candidates": "Candidate results", "candidateDisposition": { "promoted": "Promoted", "duplicate": "Duplicate", "deferred": "Deferred", "skipped": "Skipped" }, "candidateSource": { "direct": "Conversation", "group": "Group digest" }, "candidateTarget": { "memory": "Long-term memory", "user": "User profile", "group": "Group memory", "tools": "Tool config", "topic": "Topic file", "dailyOnly": "Daily record" }, "budgetStatus": "Long-term memory budget", "budget": { "healthy": "Healthy", "warning": "Near limit", "over": "Over limit" }, "budgetPolicy": { "conservative": "Conservative promotion", "overBudget": "Over-budget protection" }, "enableConfirmTitle": "Enable nightly organization?", "enableConfirmMessage": "After enabling it, the system will automatically organize the Agent's memory files every day at the specified time.\n\nYou can turn it off at any time and review the detailed record of each run.", "enableConfirmAction": "Enable", "executionStatus": { "running": "Running", "success": "Success", "failed": "Failed", "no-changes": "No changes" }, "autoTitle": "Auto Update", "autoEnableConfirmTitle": "Enable Auto Update?", "autoEnableConfirmMessage": "Once enabled, the system will automatically update agent memory files at the specified time each day.\n\nYou can disable it anytime and view detailed execution history.", "sources": "Sources", "sourcesEmpty": "No sources available", "sourceDirect": "{{count}} sessions · {{messages}} messages", "sourceGroupDigest": "{{count}} group digests" } };
|
|
84779
84950
|
const clear = { "confirmTitle": "Clear context?", "confirmDesc": "Messages in this conversation will stay. Only the context used for future replies will be cleared.", "confirmBtn": "Clear" };
|
|
84780
84951
|
const filePreview = { "source": "Source", "preview": "Preview", "nonTextTitle": "Non-text file", "nonTextDesc": "This file cannot be previewed as text.", "openWithSystem": "Open with system app", "loadError": "Failed to load", "tooLargeTitle": "File too large", "tooLargeDesc": "File size {{size}} exceeds preview limit. Please open with system app.", "showInFolder": "Show in Folder", "download": "Download", "close": "Close" };
|
|
84781
84952
|
const cancel = "Cancel";
|
|
84782
|
-
const contextSuggestion = { "title": "
|
|
84953
|
+
const contextSuggestion = { "title": "Consider compacting context", "description": "This session is getting long. Compacting keeps the key points so future replies stay coherent. Your chat history won't be deleted.", "accept": "Compact context", "dismiss": "Don't suggest again for this session", "remindLater": "Remind me later", "close": "Close", "running": "Tidying up this session…", "completed": "Session tidied up. Future replies will use the key points from the summary.", "failed": "Could not tidy up this session. Try again later." };
|
|
84783
84954
|
const en = {
|
|
84784
84955
|
header: header$a,
|
|
84785
84956
|
input: input$4,
|
|
@@ -84817,6 +84988,7 @@ const en = {
|
|
|
84817
84988
|
contextCompacted,
|
|
84818
84989
|
compactLoading,
|
|
84819
84990
|
compactFailed,
|
|
84991
|
+
contextHealth,
|
|
84820
84992
|
retrying,
|
|
84821
84993
|
noMoreMessages,
|
|
84822
84994
|
newMessages,
|
|
@@ -88090,7 +88262,6 @@ function AgentSummaryBar({
|
|
|
88090
88262
|
model,
|
|
88091
88263
|
skillCount,
|
|
88092
88264
|
mcpCount,
|
|
88093
|
-
enableThinking,
|
|
88094
88265
|
reasoningEffort,
|
|
88095
88266
|
channels: channels2
|
|
88096
88267
|
}) {
|
|
@@ -88374,14 +88545,12 @@ function BrainTab({
|
|
|
88374
88545
|
temperature,
|
|
88375
88546
|
topP,
|
|
88376
88547
|
maxTokens,
|
|
88377
|
-
enableThinking,
|
|
88378
88548
|
reasoningEffort,
|
|
88379
88549
|
onChannelIdChange,
|
|
88380
88550
|
onModelChange,
|
|
88381
88551
|
onTemperatureChange,
|
|
88382
88552
|
onTopPChange,
|
|
88383
88553
|
onMaxTokensChange,
|
|
88384
|
-
onEnableThinkingChange,
|
|
88385
88554
|
onReasoningEffortChange,
|
|
88386
88555
|
notifyOnDegraded,
|
|
88387
88556
|
autoFallback,
|
|
@@ -88691,7 +88860,7 @@ const BUILTIN_TOOL_GROUPS = [
|
|
|
88691
88860
|
{ key: "system", tools: ["shell"] },
|
|
88692
88861
|
{ key: "network", tools: ["webFetch", "webSearch"] },
|
|
88693
88862
|
{ key: "data", tools: ["sqlQuery"] },
|
|
88694
|
-
{ key: "aux", tools: ["analyzeImage", "skill", "createCronJob", "listCronJobs", "updateCronJob", "deleteCronJob"] }
|
|
88863
|
+
{ key: "aux", tools: ["analyzeImage", "generateImage", "skill", "createCronJob", "listCronJobs", "updateCronJob", "deleteCronJob"] }
|
|
88695
88864
|
];
|
|
88696
88865
|
const CRITICAL_TOOLS = ["readFile", "writeFile", "editFile", "shell"];
|
|
88697
88866
|
const ALL_TOOLS = BUILTIN_TOOL_GROUPS.flatMap((g2) => g2.tools);
|
|
@@ -92922,7 +93091,7 @@ const styles$d = {
|
|
|
92922
93091
|
dialogActions
|
|
92923
93092
|
};
|
|
92924
93093
|
const log$8 = createLogger("SchedulerPanel");
|
|
92925
|
-
function SchedulerPanel({
|
|
93094
|
+
function SchedulerPanel({}) {
|
|
92926
93095
|
const { t: t2 } = useTranslation();
|
|
92927
93096
|
const { showToast } = useToast();
|
|
92928
93097
|
const { tasks, loading: loading2, loadTasks, deleteTask, toggleTask, createTask, updateTask } = useScheduledTaskStore();
|
|
@@ -93119,7 +93288,7 @@ function SchedulerPanel({ sessionId }) {
|
|
|
93119
93288
|
] }),
|
|
93120
93289
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$d.target, children: getTaskTarget(task) })
|
|
93121
93290
|
] }),
|
|
93122
|
-
task.message && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.taskMessage, children: [
|
|
93291
|
+
"message" in task && task.message && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.taskMessage, children: [
|
|
93123
93292
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93124
93293
|
MessageSquare,
|
|
93125
93294
|
{
|
|
@@ -93520,51 +93689,95 @@ function EditTaskDialog({
|
|
|
93520
93689
|
] })
|
|
93521
93690
|
] }) });
|
|
93522
93691
|
}
|
|
93523
|
-
const container$6 = "
|
|
93524
|
-
const progress = "
|
|
93525
|
-
const card$1 = "
|
|
93526
|
-
const cardHeader$1 = "
|
|
93527
|
-
const cardTitleRow = "
|
|
93528
|
-
const cardDescription = "
|
|
93529
|
-
const formGrid = "
|
|
93530
|
-
const field$1 = "
|
|
93531
|
-
const label = "
|
|
93532
|
-
const timeInput = "
|
|
93533
|
-
const actionsRow = "
|
|
93534
|
-
const helperText$1 = "
|
|
93535
|
-
const empty$2 = "
|
|
93536
|
-
const executionList = "
|
|
93537
|
-
const executionItem = "
|
|
93538
|
-
const executionToggle = "
|
|
93539
|
-
const executionHeader = "
|
|
93540
|
-
const executionHeaderLeft = "
|
|
93541
|
-
const executionTime = "
|
|
93542
|
-
const executionCount = "
|
|
93543
|
-
const executionSummary = "
|
|
93544
|
-
const executionDetailList = "
|
|
93545
|
-
const executionDetailItem = "
|
|
93546
|
-
const executionDetailHeader = "
|
|
93547
|
-
const executionDetailName = "
|
|
93548
|
-
const executionDetailSummary = "
|
|
93549
|
-
const
|
|
93550
|
-
const
|
|
93551
|
-
const
|
|
93552
|
-
const
|
|
93553
|
-
const
|
|
93554
|
-
const
|
|
93555
|
-
const
|
|
93556
|
-
const
|
|
93557
|
-
const
|
|
93558
|
-
const
|
|
93559
|
-
const
|
|
93560
|
-
const
|
|
93561
|
-
const
|
|
93562
|
-
const
|
|
93563
|
-
const
|
|
93564
|
-
const
|
|
93565
|
-
const
|
|
93566
|
-
const
|
|
93567
|
-
const
|
|
93692
|
+
const container$6 = "_container_5aqf4_1";
|
|
93693
|
+
const progress = "_progress_5aqf4_8";
|
|
93694
|
+
const card$1 = "_card_5aqf4_21";
|
|
93695
|
+
const cardHeader$1 = "_cardHeader_5aqf4_32";
|
|
93696
|
+
const cardTitleRow = "_cardTitleRow_5aqf4_39";
|
|
93697
|
+
const cardDescription = "_cardDescription_5aqf4_52";
|
|
93698
|
+
const formGrid = "_formGrid_5aqf4_59";
|
|
93699
|
+
const field$1 = "_field_5aqf4_65";
|
|
93700
|
+
const label = "_label_5aqf4_71";
|
|
93701
|
+
const timeInput = "_timeInput_5aqf4_76";
|
|
93702
|
+
const actionsRow = "_actionsRow_5aqf4_86";
|
|
93703
|
+
const helperText$1 = "_helperText_5aqf4_93";
|
|
93704
|
+
const empty$2 = "_empty_5aqf4_98";
|
|
93705
|
+
const executionList = "_executionList_5aqf4_103";
|
|
93706
|
+
const executionItem = "_executionItem_5aqf4_109";
|
|
93707
|
+
const executionToggle = "_executionToggle_5aqf4_115";
|
|
93708
|
+
const executionHeader = "_executionHeader_5aqf4_124";
|
|
93709
|
+
const executionHeaderLeft = "_executionHeaderLeft_5aqf4_131";
|
|
93710
|
+
const executionTime = "_executionTime_5aqf4_137";
|
|
93711
|
+
const executionCount = "_executionCount_5aqf4_138";
|
|
93712
|
+
const executionSummary = "_executionSummary_5aqf4_143";
|
|
93713
|
+
const executionDetailList = "_executionDetailList_5aqf4_150";
|
|
93714
|
+
const executionDetailItem = "_executionDetailItem_5aqf4_157";
|
|
93715
|
+
const executionDetailHeader = "_executionDetailHeader_5aqf4_162";
|
|
93716
|
+
const executionDetailName = "_executionDetailName_5aqf4_169";
|
|
93717
|
+
const executionDetailSummary = "_executionDetailSummary_5aqf4_175";
|
|
93718
|
+
const candidateList = "_candidateList_5aqf4_182";
|
|
93719
|
+
const candidateTitle = "_candidateTitle_5aqf4_189";
|
|
93720
|
+
const candidateSummary = "_candidateSummary_5aqf4_195";
|
|
93721
|
+
const candidateTargetSummary = "_candidateTargetSummary_5aqf4_202";
|
|
93722
|
+
const candidateSummaryChip = "_candidateSummaryChip_5aqf4_208";
|
|
93723
|
+
const candidateTargetChip = "_candidateTargetChip_5aqf4_219";
|
|
93724
|
+
const candidateTarget_topic = "_candidateTarget_topic_5aqf4_230";
|
|
93725
|
+
const budgetStatusList = "_budgetStatusList_5aqf4_236";
|
|
93726
|
+
const budgetChips = "_budgetChips_5aqf4_240";
|
|
93727
|
+
const budgetChip = "_budgetChip_5aqf4_240";
|
|
93728
|
+
const budgetStatus_healthy = "_budgetStatus_healthy_5aqf4_258";
|
|
93729
|
+
const budgetStatus_warning = "_budgetStatus_warning_5aqf4_263";
|
|
93730
|
+
const budgetStatus_over = "_budgetStatus_over_5aqf4_269";
|
|
93731
|
+
const budgetPolicyNotice = "_budgetPolicyNotice_5aqf4_275";
|
|
93732
|
+
const budgetPolicyMode = "_budgetPolicyMode_5aqf4_289";
|
|
93733
|
+
const budgetPolicy_conservative = "_budgetPolicy_conservative_5aqf4_294";
|
|
93734
|
+
const budgetPolicy_overBudget = "_budgetPolicy_overBudget_5aqf4_299";
|
|
93735
|
+
const candidateItem = "_candidateItem_5aqf4_304";
|
|
93736
|
+
const candidateHeader = "_candidateHeader_5aqf4_311";
|
|
93737
|
+
const candidateText = "_candidateText_5aqf4_318";
|
|
93738
|
+
const candidateDisposition = "_candidateDisposition_5aqf4_324";
|
|
93739
|
+
const candidateDisposition_promoted = "_candidateDisposition_promoted_5aqf4_333";
|
|
93740
|
+
const candidateDisposition_deferred = "_candidateDisposition_deferred_5aqf4_338";
|
|
93741
|
+
const candidateDisposition_skipped = "_candidateDisposition_skipped_5aqf4_343";
|
|
93742
|
+
const candidateDisposition_duplicate = "_candidateDisposition_duplicate_5aqf4_344";
|
|
93743
|
+
const candidateMeta = "_candidateMeta_5aqf4_348";
|
|
93744
|
+
const candidateReason = "_candidateReason_5aqf4_349";
|
|
93745
|
+
const fileChipList = "_fileChipList_5aqf4_362";
|
|
93746
|
+
const fileChip = "_fileChip_5aqf4_362";
|
|
93747
|
+
const fileChipActive = "_fileChipActive_5aqf4_381";
|
|
93748
|
+
const fileChipDisabled = "_fileChipDisabled_5aqf4_387";
|
|
93749
|
+
const topicEntry = "_topicEntry_5aqf4_392";
|
|
93750
|
+
const topicEntryHeader = "_topicEntryHeader_5aqf4_399";
|
|
93751
|
+
const topicEntryTitle = "_topicEntryTitle_5aqf4_405";
|
|
93752
|
+
const topicEntryCount = "_topicEntryCount_5aqf4_411";
|
|
93753
|
+
const topicEntryDescription = "_topicEntryDescription_5aqf4_425";
|
|
93754
|
+
const topicEntryList = "_topicEntryList_5aqf4_432";
|
|
93755
|
+
const topicEntryPath = "_topicEntryPath_5aqf4_439";
|
|
93756
|
+
const diffHeader = "_diffHeader_5aqf4_449";
|
|
93757
|
+
const diffHeaderPath = "_diffHeaderPath_5aqf4_456";
|
|
93758
|
+
const diffCloseButton = "_diffCloseButton_5aqf4_462";
|
|
93759
|
+
const fileList = "_fileList_5aqf4_472";
|
|
93760
|
+
const fileItem = "_fileItem_5aqf4_478";
|
|
93761
|
+
const filePath$1 = "_filePath_5aqf4_489";
|
|
93762
|
+
const fileSummary = "_fileSummary_5aqf4_494";
|
|
93763
|
+
const diffToggle = "_diffToggle_5aqf4_500";
|
|
93764
|
+
const diffBlock = "_diffBlock_5aqf4_510";
|
|
93765
|
+
const diffContent = "_diffContent_5aqf4_521";
|
|
93766
|
+
const diffLineAdd = "_diffLineAdd_5aqf4_530";
|
|
93767
|
+
const diffLineRemove = "_diffLineRemove_5aqf4_534";
|
|
93768
|
+
const diffLineMeta = "_diffLineMeta_5aqf4_538";
|
|
93769
|
+
const spinningIcon = "_spinningIcon_5aqf4_543";
|
|
93770
|
+
const spin$1 = "_spin_5aqf4_543";
|
|
93771
|
+
const statusInline = "_statusInline_5aqf4_547";
|
|
93772
|
+
const progressDone = "_progressDone_5aqf4_553";
|
|
93773
|
+
const sourceSection = "_sourceSection_5aqf4_562";
|
|
93774
|
+
const sourceTitle = "_sourceTitle_5aqf4_566";
|
|
93775
|
+
const sourceText = "_sourceText_5aqf4_572";
|
|
93776
|
+
const sourceDate = "_sourceDate_5aqf4_578";
|
|
93777
|
+
const sourceChips = "_sourceChips_5aqf4_584";
|
|
93778
|
+
const sourceChip = "_sourceChip_5aqf4_584";
|
|
93779
|
+
const sourceChipGroup = "_sourceChipGroup_5aqf4_603";
|
|
93780
|
+
const sourceChipDetail = "_sourceChipDetail_5aqf4_614";
|
|
93568
93781
|
const styles$c = {
|
|
93569
93782
|
container: container$6,
|
|
93570
93783
|
progress,
|
|
@@ -93592,10 +93805,44 @@ const styles$c = {
|
|
|
93592
93805
|
executionDetailHeader,
|
|
93593
93806
|
executionDetailName,
|
|
93594
93807
|
executionDetailSummary,
|
|
93808
|
+
candidateList,
|
|
93809
|
+
candidateTitle,
|
|
93810
|
+
candidateSummary,
|
|
93811
|
+
candidateTargetSummary,
|
|
93812
|
+
candidateSummaryChip,
|
|
93813
|
+
candidateTargetChip,
|
|
93814
|
+
candidateTarget_topic,
|
|
93815
|
+
budgetStatusList,
|
|
93816
|
+
budgetChips,
|
|
93817
|
+
budgetChip,
|
|
93818
|
+
budgetStatus_healthy,
|
|
93819
|
+
budgetStatus_warning,
|
|
93820
|
+
budgetStatus_over,
|
|
93821
|
+
budgetPolicyNotice,
|
|
93822
|
+
budgetPolicyMode,
|
|
93823
|
+
budgetPolicy_conservative,
|
|
93824
|
+
budgetPolicy_overBudget,
|
|
93825
|
+
candidateItem,
|
|
93826
|
+
candidateHeader,
|
|
93827
|
+
candidateText,
|
|
93828
|
+
candidateDisposition,
|
|
93829
|
+
candidateDisposition_promoted,
|
|
93830
|
+
candidateDisposition_deferred,
|
|
93831
|
+
candidateDisposition_skipped,
|
|
93832
|
+
candidateDisposition_duplicate,
|
|
93833
|
+
candidateMeta,
|
|
93834
|
+
candidateReason,
|
|
93595
93835
|
fileChipList,
|
|
93596
93836
|
fileChip,
|
|
93597
93837
|
fileChipActive,
|
|
93598
93838
|
fileChipDisabled,
|
|
93839
|
+
topicEntry,
|
|
93840
|
+
topicEntryHeader,
|
|
93841
|
+
topicEntryTitle,
|
|
93842
|
+
topicEntryCount,
|
|
93843
|
+
topicEntryDescription,
|
|
93844
|
+
topicEntryList,
|
|
93845
|
+
topicEntryPath,
|
|
93599
93846
|
diffHeader,
|
|
93600
93847
|
diffHeaderPath,
|
|
93601
93848
|
diffCloseButton,
|
|
@@ -93603,36 +93850,99 @@ const styles$c = {
|
|
|
93603
93850
|
fileItem,
|
|
93604
93851
|
filePath: filePath$1,
|
|
93605
93852
|
fileSummary,
|
|
93853
|
+
diffToggle,
|
|
93606
93854
|
diffBlock,
|
|
93607
93855
|
diffContent,
|
|
93608
93856
|
diffLineAdd,
|
|
93609
93857
|
diffLineRemove,
|
|
93610
93858
|
diffLineMeta,
|
|
93611
93859
|
spinningIcon,
|
|
93860
|
+
spin: spin$1,
|
|
93612
93861
|
statusInline,
|
|
93613
|
-
progressDone
|
|
93862
|
+
progressDone,
|
|
93863
|
+
sourceSection,
|
|
93864
|
+
sourceTitle,
|
|
93865
|
+
sourceText,
|
|
93866
|
+
sourceDate,
|
|
93867
|
+
sourceChips,
|
|
93868
|
+
sourceChip,
|
|
93869
|
+
sourceChipGroup,
|
|
93870
|
+
sourceChipDetail
|
|
93614
93871
|
};
|
|
93615
93872
|
function formatDateTime(value2, fallback2) {
|
|
93616
93873
|
if (!value2) return fallback2;
|
|
93617
93874
|
return new Date(value2).toLocaleString();
|
|
93618
93875
|
}
|
|
93876
|
+
const CANDIDATE_DISPOSITIONS = ["promoted", "deferred", "skipped", "duplicate"];
|
|
93877
|
+
const CANDIDATE_TARGETS = ["memory", "user", "group", "tools", "topic", "dailyOnly"];
|
|
93619
93878
|
function parseExecutionOutput(execution) {
|
|
93620
93879
|
if (!execution.output) return null;
|
|
93621
93880
|
try {
|
|
93622
|
-
|
|
93881
|
+
const parsed = JSON.parse(execution.output);
|
|
93882
|
+
if (isMemoryUpdateResult(parsed)) return { kind: "agent", result: parsed };
|
|
93883
|
+
if (isGroupMemoryUpdateResult(parsed)) return { kind: "group", result: parsed };
|
|
93884
|
+
return null;
|
|
93623
93885
|
} catch {
|
|
93624
93886
|
return null;
|
|
93625
93887
|
}
|
|
93626
93888
|
}
|
|
93889
|
+
function isMemoryUpdateResult(value2) {
|
|
93890
|
+
return typeof value2 === "object" && value2 !== null && Array.isArray(value2.results) && typeof value2.totalAgents === "number" && typeof value2.succeededAgents === "number";
|
|
93891
|
+
}
|
|
93892
|
+
function isGroupMemoryUpdateResult(value2) {
|
|
93893
|
+
return typeof value2 === "object" && value2 !== null && typeof value2.groupId === "string" && typeof value2.groupName === "string" && Array.isArray(value2.changedFiles);
|
|
93894
|
+
}
|
|
93895
|
+
function getMemoryUpdateSources(result) {
|
|
93896
|
+
const sources = result.sources ?? {};
|
|
93897
|
+
return {
|
|
93898
|
+
date: sources.date ?? "",
|
|
93899
|
+
directSessionCount: sources.directSessionCount ?? 0,
|
|
93900
|
+
totalMessages: sources.totalMessages ?? 0,
|
|
93901
|
+
directSessionTitles: sources.directSessionTitles ?? [],
|
|
93902
|
+
groupDigestCount: sources.groupDigestCount ?? 0,
|
|
93903
|
+
groupDigestNames: sources.groupDigestNames ?? []
|
|
93904
|
+
};
|
|
93905
|
+
}
|
|
93627
93906
|
function inferExecutionSummary(execution, parsed, t2) {
|
|
93628
93907
|
if (execution.status === "running") return t2("memoryGrowth.nightly.executionRunning");
|
|
93629
93908
|
if (execution.status === "failed") return execution.error || t2("memoryGrowth.nightly.executionFailed");
|
|
93630
93909
|
if (!parsed) return t2("memoryGrowth.nightly.executionFinished");
|
|
93910
|
+
if (parsed.kind === "group") {
|
|
93911
|
+
return t2("memoryGrowth.nightly.groupExecutionSummary", {
|
|
93912
|
+
groupName: parsed.result.groupName,
|
|
93913
|
+
changedFiles: parsed.result.changedFiles.length
|
|
93914
|
+
});
|
|
93915
|
+
}
|
|
93631
93916
|
return t2("memoryGrowth.nightly.executionSummary", {
|
|
93632
|
-
succeeded: parsed.succeededAgents,
|
|
93633
|
-
total: parsed.totalAgents
|
|
93917
|
+
succeeded: parsed.result.succeededAgents,
|
|
93918
|
+
total: parsed.result.totalAgents
|
|
93634
93919
|
});
|
|
93635
93920
|
}
|
|
93921
|
+
function SourceSummarySection({ result, t: t2 }) {
|
|
93922
|
+
const sources = getMemoryUpdateSources(result);
|
|
93923
|
+
const hasDirect = sources.directSessionCount > 0;
|
|
93924
|
+
const hasGroup = sources.groupDigestCount > 0;
|
|
93925
|
+
if (!hasDirect && !hasGroup) {
|
|
93926
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.sourceSection, children: [
|
|
93927
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceTitle, children: t2("memoryGrowth.nightly.sources") }),
|
|
93928
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceText, children: t2("memoryGrowth.nightly.sourcesEmpty") }),
|
|
93929
|
+
sources.date && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceDate, children: sources.date })
|
|
93930
|
+
] });
|
|
93931
|
+
}
|
|
93932
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.sourceSection, children: [
|
|
93933
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceTitle, children: t2("memoryGrowth.nightly.sources") }),
|
|
93934
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.sourceChips, children: [
|
|
93935
|
+
sources.date && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChip, children: sources.date }),
|
|
93936
|
+
hasDirect && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChip, children: t2("memoryGrowth.nightly.sourceDirect", { count: sources.directSessionCount, messages: sources.totalMessages }) }),
|
|
93937
|
+
sources.directSessionTitles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$c.sourceChipDetail, children: [
|
|
93938
|
+
sources.directSessionTitles.slice(0, 5).join("、"),
|
|
93939
|
+
sources.directSessionTitles.length > 5 ? "…" : ""
|
|
93940
|
+
] }),
|
|
93941
|
+
hasGroup && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChipGroup, children: t2("memoryGrowth.nightly.sourceGroupDigest", { count: sources.groupDigestCount }) }),
|
|
93942
|
+
hasGroup && sources.groupDigestNames.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.sourceChipDetail, children: sources.groupDigestNames.join("、") })
|
|
93943
|
+
] })
|
|
93944
|
+
] });
|
|
93945
|
+
}
|
|
93636
93946
|
function summarizeAgentResult(result, t2) {
|
|
93637
93947
|
if (result.status === "failed") return result.error || t2("memoryGrowth.nightly.executionFailed");
|
|
93638
93948
|
if (result.changedFiles.length === 0) return t2("memoryGrowth.nightly.noChanges");
|
|
@@ -93646,7 +93956,15 @@ function collectRecentFiles(executions) {
|
|
|
93646
93956
|
for (const execution of executions) {
|
|
93647
93957
|
const parsed = parseExecutionOutput(execution);
|
|
93648
93958
|
if (!parsed) continue;
|
|
93649
|
-
|
|
93959
|
+
if (parsed.kind === "group") {
|
|
93960
|
+
for (const file of parsed.result.changedFiles) {
|
|
93961
|
+
if (!files.has(file.path)) {
|
|
93962
|
+
files.set(file.path, file);
|
|
93963
|
+
}
|
|
93964
|
+
}
|
|
93965
|
+
continue;
|
|
93966
|
+
}
|
|
93967
|
+
for (const result of parsed.result.results) {
|
|
93650
93968
|
for (const file of result.changedFiles) {
|
|
93651
93969
|
if (!files.has(file.path)) {
|
|
93652
93970
|
files.set(file.path, file);
|
|
@@ -93656,6 +93974,85 @@ function collectRecentFiles(executions) {
|
|
|
93656
93974
|
}
|
|
93657
93975
|
return Array.from(files.values()).slice(0, 8);
|
|
93658
93976
|
}
|
|
93977
|
+
function isTopicFile(path2) {
|
|
93978
|
+
return /^memory\/topics\/[^/]+\.md$/.test(path2);
|
|
93979
|
+
}
|
|
93980
|
+
function collectTopicFiles(files) {
|
|
93981
|
+
return files.filter((file) => isTopicFile(file.path));
|
|
93982
|
+
}
|
|
93983
|
+
function summarizeGroupResult(result, t2) {
|
|
93984
|
+
if (result.status === "failed") return result.error || t2("memoryGrowth.nightly.executionFailed");
|
|
93985
|
+
if (result.changedFiles.length === 0) return result.detail || t2("memoryGrowth.nightly.noChanges");
|
|
93986
|
+
const fileSummary2 = result.changedFiles.map((file) => {
|
|
93987
|
+
if (!file.summary) return file.path;
|
|
93988
|
+
return `${file.path} · ${file.summary}`;
|
|
93989
|
+
}).join(";");
|
|
93990
|
+
return result.detail ? `${result.detail};${fileSummary2}` : fileSummary2;
|
|
93991
|
+
}
|
|
93992
|
+
function summarizeCandidates(candidates) {
|
|
93993
|
+
const summary2 = { promoted: 0, deferred: 0, skipped: 0, duplicate: 0 };
|
|
93994
|
+
for (const candidate of candidates ?? []) {
|
|
93995
|
+
summary2[candidate.disposition] += 1;
|
|
93996
|
+
}
|
|
93997
|
+
return summary2;
|
|
93998
|
+
}
|
|
93999
|
+
function summarizeCandidateTargets(candidates) {
|
|
94000
|
+
const summary2 = { memory: 0, user: 0, group: 0, tools: 0, topic: 0, dailyOnly: 0 };
|
|
94001
|
+
for (const candidate of candidates ?? []) {
|
|
94002
|
+
summary2[candidate.suggestedTarget] += 1;
|
|
94003
|
+
}
|
|
94004
|
+
return summary2;
|
|
94005
|
+
}
|
|
94006
|
+
function summarizeExecutionCandidates(parsed) {
|
|
94007
|
+
if (parsed.kind === "group") return summarizeCandidates(parsed.result.candidates);
|
|
94008
|
+
return parsed.result.results.reduce((summary2, result) => {
|
|
94009
|
+
const resultSummary = summarizeCandidates(result.candidates);
|
|
94010
|
+
for (const disposition of CANDIDATE_DISPOSITIONS) {
|
|
94011
|
+
summary2[disposition] += resultSummary[disposition];
|
|
94012
|
+
}
|
|
94013
|
+
return summary2;
|
|
94014
|
+
}, { promoted: 0, deferred: 0, skipped: 0, duplicate: 0 });
|
|
94015
|
+
}
|
|
94016
|
+
function CandidateSummaryChips({ summary: summary2, t: t2 }) {
|
|
94017
|
+
const total = CANDIDATE_DISPOSITIONS.reduce((sum, disposition) => sum + summary2[disposition], 0);
|
|
94018
|
+
if (total === 0) return null;
|
|
94019
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateSummary, children: CANDIDATE_DISPOSITIONS.filter((disposition) => summary2[disposition] > 0).map((disposition) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$c.candidateSummaryChip, styles$c[`candidateDisposition_${disposition}`]), children: [
|
|
94020
|
+
t2(`memoryGrowth.nightly.candidateDisposition.${disposition}`),
|
|
94021
|
+
" ",
|
|
94022
|
+
summary2[disposition]
|
|
94023
|
+
] }, disposition)) });
|
|
94024
|
+
}
|
|
94025
|
+
function CandidateTargetChips({ summary: summary2, t: t2 }) {
|
|
94026
|
+
const total = CANDIDATE_TARGETS.reduce((sum, target2) => sum + summary2[target2], 0);
|
|
94027
|
+
if (total === 0) return null;
|
|
94028
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateTargetSummary, children: CANDIDATE_TARGETS.filter((target2) => summary2[target2] > 0).map((target2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$c.candidateTargetChip, styles$c[`candidateTarget_${target2}`]), children: [
|
|
94029
|
+
t2(`memoryGrowth.nightly.candidateTarget.${target2}`),
|
|
94030
|
+
" ",
|
|
94031
|
+
summary2[target2]
|
|
94032
|
+
] }, target2)) });
|
|
94033
|
+
}
|
|
94034
|
+
function BudgetStatusChips({ budgetStatus, t: t2 }) {
|
|
94035
|
+
if (!budgetStatus || budgetStatus.length === 0) return null;
|
|
94036
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.budgetStatusList, children: [
|
|
94037
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateTitle, children: t2("memoryGrowth.nightly.budgetStatus") }),
|
|
94038
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.budgetChips, children: budgetStatus.map((item2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: clsx(styles$c.budgetChip, styles$c[`budgetStatus_${item2.status}`]), children: [
|
|
94039
|
+
item2.file,
|
|
94040
|
+
" · ",
|
|
94041
|
+
item2.lineCount,
|
|
94042
|
+
"/",
|
|
94043
|
+
item2.hardLimit,
|
|
94044
|
+
" · ",
|
|
94045
|
+
t2(`memoryGrowth.nightly.budget.${item2.status}`)
|
|
94046
|
+
] }, item2.file)) })
|
|
94047
|
+
] });
|
|
94048
|
+
}
|
|
94049
|
+
function BudgetPolicyNotice({ policy, t: t2 }) {
|
|
94050
|
+
if (!policy || policy.mode === "normal") return null;
|
|
94051
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$c.budgetPolicyNotice, styles$c[`budgetPolicy_${policy.mode}`]), children: [
|
|
94052
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.budgetPolicyMode, children: t2(`memoryGrowth.nightly.budgetPolicy.${policy.mode}`) }),
|
|
94053
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: policy.reason })
|
|
94054
|
+
] });
|
|
94055
|
+
}
|
|
93659
94056
|
function renderDiffLines(diff) {
|
|
93660
94057
|
const lines = diff.split("\n");
|
|
93661
94058
|
return lines.map((line2, i2) => {
|
|
@@ -93699,6 +94096,31 @@ function DiffFileChip({ file }) {
|
|
|
93699
94096
|
] })
|
|
93700
94097
|
] });
|
|
93701
94098
|
}
|
|
94099
|
+
function CandidateList({ candidates, t: t2 }) {
|
|
94100
|
+
if (!candidates || candidates.length === 0) return null;
|
|
94101
|
+
const summary2 = summarizeCandidates(candidates);
|
|
94102
|
+
const targetSummary = summarizeCandidateTargets(candidates);
|
|
94103
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateList, children: [
|
|
94104
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateTitle, children: t2("memoryGrowth.nightly.candidates") }),
|
|
94105
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateSummaryChips, { summary: summary2, t: t2 }),
|
|
94106
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateTargetChips, { summary: targetSummary, t: t2 }),
|
|
94107
|
+
candidates.map((candidate, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateItem, children: [
|
|
94108
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateHeader, children: [
|
|
94109
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.candidateText, children: candidate.candidateText }),
|
|
94110
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx(styles$c.candidateDisposition, styles$c[`candidateDisposition_${candidate.disposition}`]), children: t2(`memoryGrowth.nightly.candidateDisposition.${candidate.disposition}`) })
|
|
94111
|
+
] }),
|
|
94112
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.candidateMeta, children: [
|
|
94113
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2(`memoryGrowth.nightly.candidateSource.${candidate.sourceKind}`) }),
|
|
94114
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
94115
|
+
"→ ",
|
|
94116
|
+
t2(`memoryGrowth.nightly.candidateTarget.${candidate.suggestedTarget}`)
|
|
94117
|
+
] }),
|
|
94118
|
+
candidate.sourceRefs.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: candidate.sourceRefs.join(", ") })
|
|
94119
|
+
] }),
|
|
94120
|
+
candidate.reason && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.candidateReason, children: candidate.reason })
|
|
94121
|
+
] }, [candidate.sourceKind, candidate.candidateText, index2].join(":")))
|
|
94122
|
+
] });
|
|
94123
|
+
}
|
|
93702
94124
|
function MemoryGrowthPanel() {
|
|
93703
94125
|
const { t: t2 } = useTranslation();
|
|
93704
94126
|
const { showToast } = useToast();
|
|
@@ -93710,7 +94132,9 @@ function MemoryGrowthPanel() {
|
|
|
93710
94132
|
const [time2, setTime] = reactExports.useState("01:00");
|
|
93711
94133
|
const [scope, setScope] = reactExports.useState("all");
|
|
93712
94134
|
const [selectedAgentId, setSelectedAgentId] = reactExports.useState("");
|
|
94135
|
+
const [selectedGroupId, setSelectedGroupId] = reactExports.useState("");
|
|
93713
94136
|
const [agents, setAgents] = reactExports.useState([]);
|
|
94137
|
+
const [groups, setGroups] = reactExports.useState([]);
|
|
93714
94138
|
const [executions, setExecutions] = reactExports.useState([]);
|
|
93715
94139
|
const [expandedExecutionIds, setExpandedExecutionIds] = reactExports.useState([]);
|
|
93716
94140
|
const [showEnableConfirm, setShowEnableConfirm] = reactExports.useState(false);
|
|
@@ -93721,17 +94145,20 @@ function MemoryGrowthPanel() {
|
|
|
93721
94145
|
const load2 = async () => {
|
|
93722
94146
|
setLoading(true);
|
|
93723
94147
|
try {
|
|
93724
|
-
const [nightlyConfig, recentExecutions, allAgents] = await Promise.all([
|
|
94148
|
+
const [nightlyConfig, recentExecutions, allAgents, allGroups] = await Promise.all([
|
|
93725
94149
|
transport.getNightlyMemoryConfig(),
|
|
93726
94150
|
transport.listNightlyMemoryExecutions(8),
|
|
93727
|
-
transport.listAgents()
|
|
94151
|
+
transport.listAgents(),
|
|
94152
|
+
transport.listGroups()
|
|
93728
94153
|
]);
|
|
93729
94154
|
setConfig3(nightlyConfig);
|
|
93730
94155
|
setTime(nightlyConfig.time);
|
|
93731
|
-
setScope(nightlyConfig.
|
|
94156
|
+
setScope(nightlyConfig.scope);
|
|
93732
94157
|
setSelectedAgentId(nightlyConfig.agentId || "");
|
|
94158
|
+
setSelectedGroupId(nightlyConfig.groupId || "");
|
|
93733
94159
|
setExecutions(recentExecutions);
|
|
93734
94160
|
setAgents(allAgents);
|
|
94161
|
+
setGroups(allGroups);
|
|
93735
94162
|
if (recentExecutions.length > 0) {
|
|
93736
94163
|
setExpandedExecutionIds([recentExecutions[0].id]);
|
|
93737
94164
|
}
|
|
@@ -93762,23 +94189,27 @@ function MemoryGrowthPanel() {
|
|
|
93762
94189
|
};
|
|
93763
94190
|
}, [memoryUpdateProgress, transport]);
|
|
93764
94191
|
const effectiveAgentId = scope === "agent" ? selectedAgentId : void 0;
|
|
93765
|
-
const
|
|
94192
|
+
const effectiveGroupId = scope === "group" ? selectedGroupId : void 0;
|
|
94193
|
+
const memoryDirAgentId = scope === "agent" ? selectedAgentId : scope === "group" ? "" : agents[0]?.id ?? "";
|
|
93766
94194
|
const hasChanges = reactExports.useMemo(
|
|
93767
|
-
() => config2 !== null && (time2 !== config2.time || effectiveAgentId !== config2.agentId),
|
|
93768
|
-
[config2, effectiveAgentId, time2]
|
|
94195
|
+
() => config2 !== null && (time2 !== config2.time || effectiveAgentId !== config2.agentId || effectiveGroupId !== config2.groupId || scope !== config2.scope),
|
|
94196
|
+
[config2, effectiveAgentId, effectiveGroupId, scope, time2]
|
|
93769
94197
|
);
|
|
93770
94198
|
const recentFiles = reactExports.useMemo(() => collectRecentFiles(executions), [executions]);
|
|
94199
|
+
const topicFiles = reactExports.useMemo(() => collectTopicFiles(recentFiles), [recentFiles]);
|
|
93771
94200
|
const persistConfig = async (enabled) => {
|
|
93772
94201
|
const updated = await transport.updateNightlyMemoryConfig({
|
|
93773
94202
|
enabled,
|
|
93774
94203
|
time: time2,
|
|
93775
94204
|
agentId: effectiveAgentId,
|
|
94205
|
+
groupId: effectiveGroupId,
|
|
93776
94206
|
scope
|
|
93777
94207
|
});
|
|
93778
94208
|
setConfig3(updated);
|
|
93779
94209
|
setTime(updated.time);
|
|
93780
|
-
setScope(updated.
|
|
94210
|
+
setScope(updated.scope);
|
|
93781
94211
|
setSelectedAgentId(updated.agentId || "");
|
|
94212
|
+
setSelectedGroupId(updated.groupId || "");
|
|
93782
94213
|
showToast(t2("memoryGrowth.nightly.saved"), "success");
|
|
93783
94214
|
};
|
|
93784
94215
|
const handleToggle = async (enabled) => {
|
|
@@ -93813,6 +94244,10 @@ function MemoryGrowthPanel() {
|
|
|
93813
94244
|
showToast(t2("memoryGrowth.nightly.selectAgentFirst"), "info");
|
|
93814
94245
|
return;
|
|
93815
94246
|
}
|
|
94247
|
+
if (scope === "group" && !selectedGroupId) {
|
|
94248
|
+
showToast(t2("memoryGrowth.nightly.selectGroupFirst"), "info");
|
|
94249
|
+
return;
|
|
94250
|
+
}
|
|
93816
94251
|
setSaving(true);
|
|
93817
94252
|
try {
|
|
93818
94253
|
await persistConfig(config2.enabled);
|
|
@@ -93841,6 +94276,18 @@ function MemoryGrowthPanel() {
|
|
|
93841
94276
|
setExpandedExecutionIds((current) => current.includes(executionId) ? current.filter((id32) => id32 !== executionId) : [...current, executionId]);
|
|
93842
94277
|
};
|
|
93843
94278
|
const handleOpenMemoryDir = async () => {
|
|
94279
|
+
if (scope === "group") {
|
|
94280
|
+
if (!selectedGroupId) {
|
|
94281
|
+
showToast(t2("memoryGrowth.nightly.openMemoryDirUnavailable"), "error");
|
|
94282
|
+
return;
|
|
94283
|
+
}
|
|
94284
|
+
try {
|
|
94285
|
+
await transport.openChatDataDir({ type: "group", groupId: selectedGroupId });
|
|
94286
|
+
} catch (error2) {
|
|
94287
|
+
showToast(getErrorMessage(error2), "error");
|
|
94288
|
+
}
|
|
94289
|
+
return;
|
|
94290
|
+
}
|
|
93844
94291
|
if (!memoryDirAgentId) {
|
|
93845
94292
|
showToast(t2("memoryGrowth.nightly.openMemoryDirUnavailable"), "error");
|
|
93846
94293
|
return;
|
|
@@ -93908,9 +94355,10 @@ function MemoryGrowthPanel() {
|
|
|
93908
94355
|
] }),
|
|
93909
94356
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$c.field, children: [
|
|
93910
94357
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.label, children: t2("memoryGrowth.nightly.scopeLabel") }),
|
|
93911
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: scope, onChange: (value2) => setScope(value2 === "agent" ? "agent" : "all"), disabled: saving, children: [
|
|
94358
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: scope, onChange: (value2) => setScope(value2 === "agent" ? "agent" : value2 === "group" ? "group" : "all"), disabled: saving, children: [
|
|
93912
94359
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "all", children: t2("memoryGrowth.nightly.scopeAll") }),
|
|
93913
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "agent", children: t2("memoryGrowth.nightly.scopeAgent") })
|
|
94360
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "agent", children: t2("memoryGrowth.nightly.scopeAgent") }),
|
|
94361
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "group", children: t2("memoryGrowth.nightly.scopeGroup") })
|
|
93914
94362
|
] })
|
|
93915
94363
|
] }),
|
|
93916
94364
|
scope === "agent" && /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$c.field, children: [
|
|
@@ -93919,6 +94367,13 @@ function MemoryGrowthPanel() {
|
|
|
93919
94367
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: t2("memoryGrowth.nightly.selectAgent") }),
|
|
93920
94368
|
agents.map((agent2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: agent2.id, children: agent2.name }, agent2.id))
|
|
93921
94369
|
] })
|
|
94370
|
+
] }),
|
|
94371
|
+
scope === "group" && /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$c.field, children: [
|
|
94372
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.label, children: t2("memoryGrowth.nightly.groupLabel") }),
|
|
94373
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: selectedGroupId, onChange: setSelectedGroupId, disabled: saving, children: [
|
|
94374
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: t2("memoryGrowth.nightly.selectGroup") }),
|
|
94375
|
+
groups.map((group2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: group2.id, children: group2.name }, group2.id))
|
|
94376
|
+
] })
|
|
93922
94377
|
] })
|
|
93923
94378
|
] }),
|
|
93924
94379
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.actionsRow, children: [
|
|
@@ -93944,6 +94399,7 @@ function MemoryGrowthPanel() {
|
|
|
93944
94399
|
executions.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.empty, children: t2("memoryGrowth.nightly.noExecutions") }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionList, children: executions.map((execution) => {
|
|
93945
94400
|
const parsed = parseExecutionOutput(execution);
|
|
93946
94401
|
const expanded2 = expandedExecutionIds.includes(execution.id);
|
|
94402
|
+
const candidateSummary2 = parsed ? summarizeExecutionCandidates(parsed) : null;
|
|
93947
94403
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionItem, children: [
|
|
93948
94404
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
93949
94405
|
"button",
|
|
@@ -93958,29 +94414,52 @@ function MemoryGrowthPanel() {
|
|
|
93958
94414
|
/* @__PURE__ */ jsxRuntimeExports.jsx(StatusPill, { status: toPillStatus(execution.status), children: t2(`memoryGrowth.nightly.executionStatus.${execution.status}`) }),
|
|
93959
94415
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionTime, children: formatDateTime(execution.startedAt, t2("memoryGrowth.nightly.unknownTime")) })
|
|
93960
94416
|
] }),
|
|
93961
|
-
parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionCount, children: t2("memoryGrowth.nightly.executionSummaryCompact", {
|
|
93962
|
-
succeeded: parsed.succeededAgents,
|
|
93963
|
-
total: parsed.totalAgents
|
|
94417
|
+
parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionCount, children: parsed.kind === "agent" ? t2("memoryGrowth.nightly.executionSummaryCompact", {
|
|
94418
|
+
succeeded: parsed.result.succeededAgents,
|
|
94419
|
+
total: parsed.result.totalAgents
|
|
94420
|
+
}) : t2("memoryGrowth.nightly.groupExecutionSummaryCompact", {
|
|
94421
|
+
changedFiles: parsed.result.changedFiles.length
|
|
93964
94422
|
}) })
|
|
93965
94423
|
] }),
|
|
93966
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionSummary, children: inferExecutionSummary(execution, parsed, t2) })
|
|
94424
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionSummary, children: inferExecutionSummary(execution, parsed, t2) }),
|
|
94425
|
+
candidateSummary2 && /* @__PURE__ */ jsxRuntimeExports.jsx(CandidateSummaryChips, { summary: candidateSummary2, t: t2 })
|
|
93967
94426
|
]
|
|
93968
94427
|
}
|
|
93969
94428
|
),
|
|
93970
|
-
expanded2 && parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailList, children: parsed.results.map((result) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailItem, children: [
|
|
94429
|
+
expanded2 && parsed && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailList, children: parsed.kind === "agent" ? parsed.result.results.map((result) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailItem, children: [
|
|
93971
94430
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailHeader, children: [
|
|
93972
94431
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionDetailName, children: result.agentName }),
|
|
93973
94432
|
/* @__PURE__ */ jsxRuntimeExports.jsx(StatusPill, { status: toPillStatus(result.status), children: t2(`memoryGrowth.nightly.executionStatus.${result.status}`) })
|
|
93974
94433
|
] }),
|
|
94434
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SourceSummarySection, { result, t: t2 }),
|
|
93975
94435
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailSummary, children: summarizeAgentResult(result, t2) }),
|
|
94436
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetStatusChips, { budgetStatus: result.budgetStatus, t: t2 }),
|
|
94437
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetPolicyNotice, { policy: result.budgetPolicy, t: t2 }),
|
|
93976
94438
|
result.changedFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileChipList, children: result.changedFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93977
94439
|
DiffFileChip,
|
|
93978
94440
|
{
|
|
93979
94441
|
file
|
|
93980
94442
|
},
|
|
93981
94443
|
[result.agentId, file.path].join(":")
|
|
93982
|
-
)) })
|
|
93983
|
-
|
|
94444
|
+
)) }),
|
|
94445
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateList, { candidates: result.candidates, t: t2 })
|
|
94446
|
+
] }, result.agentId)) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailItem, children: [
|
|
94447
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.executionDetailHeader, children: [
|
|
94448
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.executionDetailName, children: parsed.result.groupName }),
|
|
94449
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StatusPill, { status: toPillStatus(parsed.result.status), children: t2(`memoryGrowth.nightly.executionStatus.${parsed.result.status}`) })
|
|
94450
|
+
] }),
|
|
94451
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.executionDetailSummary, children: summarizeGroupResult(parsed.result, t2) }),
|
|
94452
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetStatusChips, { budgetStatus: parsed.result.budgetStatus, t: t2 }),
|
|
94453
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(BudgetPolicyNotice, { policy: parsed.result.budgetPolicy, t: t2 }),
|
|
94454
|
+
parsed.result.changedFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileChipList, children: parsed.result.changedFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
94455
|
+
DiffFileChip,
|
|
94456
|
+
{
|
|
94457
|
+
file
|
|
94458
|
+
},
|
|
94459
|
+
[parsed.result.groupId, file.path].join(":")
|
|
94460
|
+
)) }),
|
|
94461
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CandidateList, { candidates: parsed.result.candidates, t: t2 })
|
|
94462
|
+
] }) })
|
|
93984
94463
|
] }, execution.id);
|
|
93985
94464
|
}) })
|
|
93986
94465
|
] }),
|
|
@@ -93989,6 +94468,14 @@ function MemoryGrowthPanel() {
|
|
|
93989
94468
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { size: 16 }),
|
|
93990
94469
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: t2("memoryGrowth.nightly.memoryFiles") })
|
|
93991
94470
|
] }),
|
|
94471
|
+
topicFiles.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.topicEntry, children: [
|
|
94472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$c.topicEntryHeader, children: [
|
|
94473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.topicEntryTitle, children: t2("memoryGrowth.nightly.topicFiles") }),
|
|
94474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.topicEntryCount, children: topicFiles.length })
|
|
94475
|
+
] }),
|
|
94476
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.topicEntryDescription, children: t2("memoryGrowth.nightly.topicFilesDescription") }),
|
|
94477
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.topicEntryList, children: topicFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$c.topicEntryPath, children: file.path }, file.path)) })
|
|
94478
|
+
] }),
|
|
93992
94479
|
recentFiles.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.empty, children: t2("memoryGrowth.nightly.noRecentFiles") }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileList, children: recentFiles.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileItem, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
93993
94480
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.filePath, children: file.path }),
|
|
93994
94481
|
file.summary ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$c.fileSummary, children: file.summary }) : null
|
|
@@ -95340,57 +95827,57 @@ const useChannelStore = create$3((set2, get2) => ({
|
|
|
95340
95827
|
},
|
|
95341
95828
|
stopQrPolling: () => set2((state2) => ({ qrPolling: false, qrRequestId: state2.qrRequestId + 1 }))
|
|
95342
95829
|
}));
|
|
95343
|
-
const container$5 = "
|
|
95344
|
-
const content$2 = "
|
|
95345
|
-
const loading$2 = "
|
|
95346
|
-
const hint = "
|
|
95347
|
-
const empty$1 = "
|
|
95348
|
-
const emptyIcon$1 = "
|
|
95349
|
-
const emptyText$1 = "
|
|
95350
|
-
const channelList = "
|
|
95351
|
-
const channelCard = "
|
|
95352
|
-
const cardHeader = "
|
|
95353
|
-
const platformIcon$1 = "
|
|
95354
|
-
const platformIconWechat = "
|
|
95355
|
-
const platformIconWecom = "
|
|
95356
|
-
const cardInfo = "
|
|
95357
|
-
const platformName = "
|
|
95358
|
-
const targetLabel = "
|
|
95359
|
-
const createdAt = "
|
|
95360
|
-
const statusBadge = "
|
|
95361
|
-
const cardActions = "
|
|
95362
|
-
const editTargetCard = "
|
|
95363
|
-
const bindFlow = "
|
|
95364
|
-
const stepsIndicator = "
|
|
95365
|
-
const stepDot = "
|
|
95366
|
-
const stepDotActive = "
|
|
95367
|
-
const stepNum = "
|
|
95368
|
-
const stepTitle$1 = "
|
|
95369
|
-
const stepContent$1 = "
|
|
95370
|
-
const field = "
|
|
95371
|
-
const stepActions = "
|
|
95372
|
-
const targetKind = "
|
|
95373
|
-
const kindBtn = "
|
|
95374
|
-
const kindBtnActive = "
|
|
95375
|
-
const summary = "
|
|
95376
|
-
const summaryRow = "
|
|
95377
|
-
const summaryLabel = "
|
|
95378
|
-
const mono = "
|
|
95379
|
-
const testResult = "
|
|
95380
|
-
const testing = "
|
|
95381
|
-
const testSuccess = "
|
|
95382
|
-
const testFailed = "
|
|
95383
|
-
const methodChoice = "
|
|
95384
|
-
const methodCard = "
|
|
95385
|
-
const methodCardDisabled = "
|
|
95386
|
-
const methodIcon = "
|
|
95387
|
-
const methodTitle = "
|
|
95388
|
-
const methodDesc = "
|
|
95389
|
-
const qrcodeSection = "
|
|
95390
|
-
const qrImage = "
|
|
95391
|
-
const qrHint = "
|
|
95392
|
-
const qrLoading = "
|
|
95393
|
-
const error$2 = "
|
|
95830
|
+
const container$5 = "_container_1j25l_1";
|
|
95831
|
+
const content$2 = "_content_1j25l_7";
|
|
95832
|
+
const loading$2 = "_loading_1j25l_16";
|
|
95833
|
+
const hint = "_hint_1j25l_26";
|
|
95834
|
+
const empty$1 = "_empty_1j25l_43";
|
|
95835
|
+
const emptyIcon$1 = "_emptyIcon_1j25l_52";
|
|
95836
|
+
const emptyText$1 = "_emptyText_1j25l_57";
|
|
95837
|
+
const channelList = "_channelList_1j25l_68";
|
|
95838
|
+
const channelCard = "_channelCard_1j25l_74";
|
|
95839
|
+
const cardHeader = "_cardHeader_1j25l_88";
|
|
95840
|
+
const platformIcon$1 = "_platformIcon_1j25l_94";
|
|
95841
|
+
const platformIconWechat = "_platformIconWechat_1j25l_104";
|
|
95842
|
+
const platformIconWecom = "_platformIconWecom_1j25l_109";
|
|
95843
|
+
const cardInfo = "_cardInfo_1j25l_114";
|
|
95844
|
+
const platformName = "_platformName_1j25l_122";
|
|
95845
|
+
const targetLabel = "_targetLabel_1j25l_128";
|
|
95846
|
+
const createdAt = "_createdAt_1j25l_136";
|
|
95847
|
+
const statusBadge = "_statusBadge_1j25l_148";
|
|
95848
|
+
const cardActions = "_cardActions_1j25l_185";
|
|
95849
|
+
const editTargetCard = "_editTargetCard_1j25l_196";
|
|
95850
|
+
const bindFlow = "_bindFlow_1j25l_208";
|
|
95851
|
+
const stepsIndicator = "_stepsIndicator_1j25l_215";
|
|
95852
|
+
const stepDot = "_stepDot_1j25l_221";
|
|
95853
|
+
const stepDotActive = "_stepDotActive_1j25l_232";
|
|
95854
|
+
const stepNum = "_stepNum_1j25l_238";
|
|
95855
|
+
const stepTitle$1 = "_stepTitle_1j25l_255";
|
|
95856
|
+
const stepContent$1 = "_stepContent_1j25l_260";
|
|
95857
|
+
const field = "_field_1j25l_266";
|
|
95858
|
+
const stepActions = "_stepActions_1j25l_278";
|
|
95859
|
+
const targetKind = "_targetKind_1j25l_289";
|
|
95860
|
+
const kindBtn = "_kindBtn_1j25l_294";
|
|
95861
|
+
const kindBtnActive = "_kindBtnActive_1j25l_313";
|
|
95862
|
+
const summary = "_summary_1j25l_348";
|
|
95863
|
+
const summaryRow = "_summaryRow_1j25l_358";
|
|
95864
|
+
const summaryLabel = "_summaryLabel_1j25l_365";
|
|
95865
|
+
const mono = "_mono_1j25l_371";
|
|
95866
|
+
const testResult = "_testResult_1j25l_380";
|
|
95867
|
+
const testing = "_testing_1j25l_384";
|
|
95868
|
+
const testSuccess = "_testSuccess_1j25l_393";
|
|
95869
|
+
const testFailed = "_testFailed_1j25l_404";
|
|
95870
|
+
const methodChoice = "_methodChoice_1j25l_425";
|
|
95871
|
+
const methodCard = "_methodCard_1j25l_430";
|
|
95872
|
+
const methodCardDisabled = "_methodCardDisabled_1j25l_451";
|
|
95873
|
+
const methodIcon = "_methodIcon_1j25l_462";
|
|
95874
|
+
const methodTitle = "_methodTitle_1j25l_471";
|
|
95875
|
+
const methodDesc = "_methodDesc_1j25l_477";
|
|
95876
|
+
const qrcodeSection = "_qrcodeSection_1j25l_487";
|
|
95877
|
+
const qrImage = "_qrImage_1j25l_494";
|
|
95878
|
+
const qrHint = "_qrHint_1j25l_503";
|
|
95879
|
+
const qrLoading = "_qrLoading_1j25l_509";
|
|
95880
|
+
const error$2 = "_error_1j25l_518";
|
|
95394
95881
|
const styles$a = {
|
|
95395
95882
|
container: container$5,
|
|
95396
95883
|
content: content$2,
|
|
@@ -95410,12 +95897,12 @@ const styles$a = {
|
|
|
95410
95897
|
targetLabel,
|
|
95411
95898
|
createdAt,
|
|
95412
95899
|
statusBadge,
|
|
95413
|
-
"status-connected": "_status-
|
|
95414
|
-
"status-disconnected": "_status-
|
|
95415
|
-
"status-idle": "_status-
|
|
95416
|
-
"status-connecting": "_status-
|
|
95417
|
-
"status-reconnecting": "_status-
|
|
95418
|
-
"status-auth_failed": "_status-
|
|
95900
|
+
"status-connected": "_status-connected_1j25l_159",
|
|
95901
|
+
"status-disconnected": "_status-disconnected_1j25l_164",
|
|
95902
|
+
"status-idle": "_status-idle_1j25l_165",
|
|
95903
|
+
"status-connecting": "_status-connecting_1j25l_170",
|
|
95904
|
+
"status-reconnecting": "_status-reconnecting_1j25l_171",
|
|
95905
|
+
"status-auth_failed": "_status-auth_failed_1j25l_176",
|
|
95419
95906
|
cardActions,
|
|
95420
95907
|
editTargetCard,
|
|
95421
95908
|
bindFlow,
|
|
@@ -95492,9 +95979,7 @@ function IntegrationPanel({ onClose: _onClose }) {
|
|
|
95492
95979
|
loading: loading2,
|
|
95493
95980
|
bindStep,
|
|
95494
95981
|
fetchChannels,
|
|
95495
|
-
startBind
|
|
95496
|
-
cancelBind,
|
|
95497
|
-
doneBind
|
|
95982
|
+
startBind
|
|
95498
95983
|
} = useChannelStore();
|
|
95499
95984
|
const [confirmUnbindId, setConfirmUnbindId] = reactExports.useState(null);
|
|
95500
95985
|
reactExports.useEffect(() => {
|
|
@@ -95919,7 +96404,6 @@ function BindFlow() {
|
|
|
95919
96404
|
bindBotId,
|
|
95920
96405
|
bindSecret,
|
|
95921
96406
|
bindTarget,
|
|
95922
|
-
bindConnectionId,
|
|
95923
96407
|
testResult: testResult2,
|
|
95924
96408
|
testing: testing2,
|
|
95925
96409
|
qrCodeUrl,
|
|
@@ -95935,7 +96419,6 @@ function BindFlow() {
|
|
|
95935
96419
|
doneBind,
|
|
95936
96420
|
chooseManual,
|
|
95937
96421
|
startQrLogin,
|
|
95938
|
-
pollQrStatus,
|
|
95939
96422
|
stopQrPolling
|
|
95940
96423
|
} = useChannelStore();
|
|
95941
96424
|
const [agents, setAgents] = reactExports.useState([]);
|
|
@@ -96134,11 +96617,12 @@ function BindFlow() {
|
|
|
96134
96617
|
bindStep === "method" && bindChannelType === "wecom-bot" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$a.stepContent, children: [
|
|
96135
96618
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$a.methodChoice, children: [
|
|
96136
96619
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
96137
|
-
"
|
|
96620
|
+
"button",
|
|
96138
96621
|
{
|
|
96622
|
+
type: "button",
|
|
96139
96623
|
className: `${styles$a.methodCard} ${qrStarting ? styles$a.methodCardDisabled : ""}`,
|
|
96140
96624
|
onClick: handleStartQrLogin,
|
|
96141
|
-
|
|
96625
|
+
disabled: qrStarting,
|
|
96142
96626
|
children: [
|
|
96143
96627
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodIcon, children: qrStarting ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { size: 28, className: "kai-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScanQrCode, { size: 28 }) }),
|
|
96144
96628
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodTitle, children: t2("settings.integration.methodQrcode") }),
|
|
@@ -96146,7 +96630,7 @@ function BindFlow() {
|
|
|
96146
96630
|
]
|
|
96147
96631
|
}
|
|
96148
96632
|
),
|
|
96149
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("
|
|
96633
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: styles$a.methodCard, onClick: chooseManual, children: [
|
|
96150
96634
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodIcon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Keyboard, { size: 28 }) }),
|
|
96151
96635
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodTitle, children: t2("settings.integration.methodManual") }),
|
|
96152
96636
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$a.methodDesc, children: t2("settings.integration.methodManualDesc") })
|
|
@@ -96581,6 +97065,7 @@ function useConversationView(sessionId) {
|
|
|
96581
97065
|
);
|
|
96582
97066
|
}
|
|
96583
97067
|
const log$5 = createLogger("ChatBox");
|
|
97068
|
+
const COMPACT_SUGGESTION_COMPLETE_VISIBLE_MS = 2e3;
|
|
96584
97069
|
const EMPTY_IDS = [];
|
|
96585
97070
|
function ChatBox({
|
|
96586
97071
|
sessionId,
|
|
@@ -96658,8 +97143,17 @@ function ChatBox({
|
|
|
96658
97143
|
}, [sessionContext, activeView, agents, t2]);
|
|
96659
97144
|
const [dialog2, setDialog] = reactExports.useState(null);
|
|
96660
97145
|
const { notification: notification2, setNotification } = useNotification(sessionId, retryInfo);
|
|
96661
|
-
const
|
|
97146
|
+
const contextCompaction = useMessageStore(
|
|
97147
|
+
reactExports.useMemo(() => (s2) => s2.getContextCompaction(sessionId), [sessionId])
|
|
97148
|
+
);
|
|
96662
97149
|
const [compactSuggestionStatus, setCompactSuggestionStatus] = reactExports.useState("idle");
|
|
97150
|
+
const compactSuggestion = useContextCompactSuggestion(
|
|
97151
|
+
sessionId,
|
|
97152
|
+
messages,
|
|
97153
|
+
sending,
|
|
97154
|
+
contextCompaction,
|
|
97155
|
+
compactSuggestionStatus === "running"
|
|
97156
|
+
);
|
|
96663
97157
|
const { showToast } = useToast();
|
|
96664
97158
|
const [deleteConfirm, setDeleteConfirm] = reactExports.useState(false);
|
|
96665
97159
|
const isGroupConversation = conversation2?.type === "group";
|
|
@@ -96792,34 +97286,28 @@ function ChatBox({
|
|
|
96792
97286
|
return "";
|
|
96793
97287
|
}
|
|
96794
97288
|
}, [sessionId]);
|
|
96795
|
-
const handleCompact = reactExports.useCallback(async () => {
|
|
96796
|
-
messageListRef.current?.scrollToBottom();
|
|
96797
|
-
const result = await handleSendMessage({ content: "/compact", attachments: [], mentions: [] });
|
|
96798
|
-
if (result) setNotification(result);
|
|
96799
|
-
return result;
|
|
96800
|
-
}, [handleSendMessage, setNotification]);
|
|
96801
|
-
const handleClearRequest = reactExports.useCallback(() => {
|
|
96802
|
-
setDialog({ type: "confirmClear" });
|
|
96803
|
-
}, []);
|
|
96804
97289
|
const handleAcceptCompactSuggestion = reactExports.useCallback(() => {
|
|
96805
97290
|
setCompactSuggestionStatus("running");
|
|
96806
97291
|
getTransport().compactConversation(sessionId).then(async () => {
|
|
96807
97292
|
await getTransport().requestConversationSnapshot(sessionId);
|
|
96808
97293
|
setCompactSuggestionStatus("completed");
|
|
97294
|
+
compactSuggestion.dismiss();
|
|
97295
|
+
window.setTimeout(() => {
|
|
97296
|
+
setCompactSuggestionStatus((current) => current === "completed" ? "idle" : current);
|
|
97297
|
+
}, COMPACT_SUGGESTION_COMPLETE_VISIBLE_MS);
|
|
96809
97298
|
}).catch((error2) => {
|
|
96810
97299
|
log$5.error("Failed to compact from suggestion:", error2);
|
|
96811
97300
|
setCompactSuggestionStatus("failed");
|
|
96812
97301
|
});
|
|
96813
|
-
}, [sessionId]);
|
|
97302
|
+
}, [compactSuggestion, sessionId]);
|
|
96814
97303
|
const maintenanceEvent = compactSuggestion.visible || compactSuggestionStatus !== "idle" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
96815
97304
|
ContextCompactSuggestion,
|
|
96816
97305
|
{
|
|
96817
97306
|
disabled: sending || compactSuggestionStatus === "running",
|
|
96818
97307
|
status: compactSuggestionStatus,
|
|
96819
97308
|
onAccept: handleAcceptCompactSuggestion,
|
|
96820
|
-
onClearContext: handleClearRequest,
|
|
96821
97309
|
onDismiss: compactSuggestion.dismiss,
|
|
96822
|
-
|
|
97310
|
+
onRemindLater: compactSuggestion.remindLater
|
|
96823
97311
|
}
|
|
96824
97312
|
) : null;
|
|
96825
97313
|
const sendClearCommand = reactExports.useCallback(() => {
|
|
@@ -96911,9 +97399,6 @@ function ChatBox({
|
|
|
96911
97399
|
onSend,
|
|
96912
97400
|
onStop: handleStopChat,
|
|
96913
97401
|
onCancelQueue: handleCancelQueue,
|
|
96914
|
-
onCompact: handleCompact,
|
|
96915
|
-
onClearRequest: handleClearRequest,
|
|
96916
|
-
onClearCommand: sendClearCommand,
|
|
96917
97402
|
memberAgentIds,
|
|
96918
97403
|
placeholder: sessionPlaceholder
|
|
96919
97404
|
}
|
|
@@ -97478,7 +97963,7 @@ function useSidebarSearch() {
|
|
|
97478
97963
|
searchInputRef
|
|
97479
97964
|
};
|
|
97480
97965
|
}
|
|
97481
|
-
const version = "1.10.0
|
|
97966
|
+
const version = "1.10.0";
|
|
97482
97967
|
const pkg = {
|
|
97483
97968
|
version
|
|
97484
97969
|
};
|
|
@@ -97841,7 +98326,7 @@ const styles$4 = {
|
|
|
97841
98326
|
emptyIcon,
|
|
97842
98327
|
emptyText
|
|
97843
98328
|
};
|
|
97844
|
-
function WelcomeState({
|
|
98329
|
+
function WelcomeState({ onCreateGroup }) {
|
|
97845
98330
|
const { t: t2 } = useTranslation();
|
|
97846
98331
|
const { agents } = useAgentStore();
|
|
97847
98332
|
if (agents.length === 0) {
|