@sinm/kai 1.10.0 → 1.10.3
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 +3533 -2021
- package/dist-electron/renderer/assets/{_baseUniq-BPxrppe8.js → _baseUniq-Dt9qXP29.js} +1 -1
- package/dist-electron/renderer/assets/_baseUniq-Dt9qXP29.js.gz +0 -0
- package/dist-electron/renderer/assets/{arc-BWCOtJfo.js → arc-RsiBQoWi.js} +1 -1
- package/dist-electron/renderer/assets/arc-RsiBQoWi.js.gz +0 -0
- package/dist-electron/renderer/assets/{architectureDiagram-Q4EWVU46-B6aBoJIj.js → architectureDiagram-Q4EWVU46-JhFDZdkM.js} +5 -5
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-JhFDZdkM.js.gz +0 -0
- package/dist-electron/renderer/assets/{blockDiagram-DXYQGD6D-CFxhVnTA.js → blockDiagram-DXYQGD6D-B86rt-OM.js} +6 -6
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-B86rt-OM.js.gz +0 -0
- package/dist-electron/renderer/assets/{c4Diagram-AHTNJAMY-Dn3rtd9z.js → c4Diagram-AHTNJAMY-BQCHj6of.js} +2 -2
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-BQCHj6of.js.gz +0 -0
- package/dist-electron/renderer/assets/{channel-BL_zoh4z.js → channel-CC4z4GJI.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4BX2VUAB-9jWB_43i.js → chunk-4BX2VUAB-BVP9T2Dh.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4TB4RGXK-C9WmbeNG.js → chunk-4TB4RGXK-CiPR4mxA.js} +5 -5
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-CiPR4mxA.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-55IACEB6-BFkx3JHW.js → chunk-55IACEB6-DFn516zY.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-EDXVE4YY-BdzjVCjA.js → chunk-EDXVE4YY-CGRKmQT3.js} +1 -1
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-CGRKmQT3.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-FMBD7UC4-CKn1sJZS.js → chunk-FMBD7UC4-BmRxbPzV.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-OYMX7WX6-bt6YDeoM.js → chunk-OYMX7WX6-Dk-Q7zf7.js} +3 -3
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-Dk-Q7zf7.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-QZHKN3VN-DjhdiOVH.js → chunk-QZHKN3VN-CZqi7zia.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-YZCP3GAM-BvsloRWu.js → chunk-YZCP3GAM-BTonv1NP.js} +1 -1
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-BTonv1NP.js.gz +0 -0
- package/dist-electron/renderer/assets/{classDiagram-6PBFFD2Q-rJLhrTTS.js → classDiagram-6PBFFD2Q-CLrLTGbu.js} +6 -6
- package/dist-electron/renderer/assets/{classDiagram-v2-HSJHXN6E-rJLhrTTS.js → classDiagram-v2-HSJHXN6E-CLrLTGbu.js} +6 -6
- package/dist-electron/renderer/assets/{clone-D5j2JPeo.js → clone-_36aVKDg.js} +1 -1
- package/dist-electron/renderer/assets/{cose-bilkent-S5V4N54A-BpNfMIZi.js → cose-bilkent-S5V4N54A-C3iQr7P0.js} +1 -1
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-C3iQr7P0.js.gz +0 -0
- package/dist-electron/renderer/assets/{dagre-KV5264BT-DvevUtVv.js → dagre-KV5264BT-C5t353zi.js} +6 -6
- package/dist-electron/renderer/assets/dagre-KV5264BT-C5t353zi.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-5BDNPKRD-BEs1nVIP.js → diagram-5BDNPKRD-BeuTiBNY.js} +6 -6
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-BeuTiBNY.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-G4DWMVQ6-Bab0VbSx.js → diagram-G4DWMVQ6-BNAzh5ef.js} +6 -6
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-BNAzh5ef.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-MMDJMWI5-CD02vhuR.js → diagram-MMDJMWI5-ByaaDyoH.js} +5 -5
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-ByaaDyoH.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-TYMM5635-xAze9LR5.js → diagram-TYMM5635-DAsU-q28.js} +5 -5
- package/dist-electron/renderer/assets/diagram-TYMM5635-DAsU-q28.js.gz +0 -0
- package/dist-electron/renderer/assets/{erDiagram-SMLLAGMA-B2HXqBYH.js → erDiagram-SMLLAGMA-D0srSDPs.js} +4 -4
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-D0srSDPs.js.gz +0 -0
- package/dist-electron/renderer/assets/{flowDiagram-DWJPFMVM-DZFPQcpb.js → flowDiagram-DWJPFMVM-Br3VuPsd.js} +6 -6
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-Br3VuPsd.js.gz +0 -0
- package/dist-electron/renderer/assets/{ganttDiagram-T4ZO3ILL-XX0OTBm4.js → ganttDiagram-T4ZO3ILL-D09E8Ld2.js} +2 -2
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-D09E8Ld2.js.gz +0 -0
- package/dist-electron/renderer/assets/{gitGraphDiagram-UUTBAWPF-CHoEzYqD.js → gitGraphDiagram-UUTBAWPF-CKplsNll.js} +6 -6
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-CKplsNll.js.gz +0 -0
- package/dist-electron/renderer/assets/{graph-t72OS6pZ.js → graph-BTPzdQjH.js} +2 -2
- package/dist-electron/renderer/assets/graph-BTPzdQjH.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-Hd87F96i.css → index-B2vb2ykm.css} +298 -253
- package/dist-electron/renderer/assets/index-B2vb2ykm.css.gz +0 -0
- package/dist-electron/renderer/assets/{index-x4Eegt5G.js → index-D4EitlLm.js} +975 -421
- package/dist-electron/renderer/assets/index-D4EitlLm.js.gz +0 -0
- package/dist-electron/renderer/assets/{infoDiagram-42DDH7IO-Cv20woCa.js → infoDiagram-42DDH7IO-VNZjK26Z.js} +4 -4
- package/dist-electron/renderer/assets/{ishikawaDiagram-UXIWVN3A-BG3mS91T.js → ishikawaDiagram-UXIWVN3A-DNQZ_EJr.js} +1 -1
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-DNQZ_EJr.js.gz +0 -0
- package/dist-electron/renderer/assets/{journeyDiagram-VCZTEJTY-D3ONtv9u.js → journeyDiagram-VCZTEJTY-4mieWisO.js} +4 -4
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-4mieWisO.js.gz +0 -0
- package/dist-electron/renderer/assets/{kanban-definition-6JOO6SKY-BDJXuwNy.js → kanban-definition-6JOO6SKY-Cm91R9mn.js} +2 -2
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-Cm91R9mn.js.gz +0 -0
- package/dist-electron/renderer/assets/{layout-Beu21ILX.js → layout-sDMER76e.js} +4 -4
- package/dist-electron/renderer/assets/layout-sDMER76e.js.gz +0 -0
- package/dist-electron/renderer/assets/{linear-BxRcWGaU.js → linear-BJZxaeHe.js} +1 -1
- package/dist-electron/renderer/assets/linear-BJZxaeHe.js.gz +0 -0
- package/dist-electron/renderer/assets/{min-J184ABTi.js → min-CihovUOT.js} +2 -2
- package/dist-electron/renderer/assets/min-CihovUOT.js.gz +0 -0
- package/dist-electron/renderer/assets/{mindmap-definition-QFDTVHPH-a-qwDgLY.js → mindmap-definition-QFDTVHPH-BWSrGBRN.js} +3 -3
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-BWSrGBRN.js.gz +0 -0
- package/dist-electron/renderer/assets/{pieDiagram-DEJITSTG-CohU6y2K.js → pieDiagram-DEJITSTG-5w5tVLFj.js} +6 -6
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-5w5tVLFj.js.gz +0 -0
- package/dist-electron/renderer/assets/{quadrantDiagram-34T5L4WZ-D8iYiTzN.js → quadrantDiagram-34T5L4WZ-B5GobzTO.js} +2 -2
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-B5GobzTO.js.gz +0 -0
- package/dist-electron/renderer/assets/{requirementDiagram-MS252O5E-5S5xgn9_.js → requirementDiagram-MS252O5E-EEt0fiRz.js} +3 -3
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-EEt0fiRz.js.gz +0 -0
- package/dist-electron/renderer/assets/{sankeyDiagram-XADWPNL6-DUYAJ9k7.js → sankeyDiagram-XADWPNL6-Osa6Eix6.js} +1 -1
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-Osa6Eix6.js.gz +0 -0
- package/dist-electron/renderer/assets/{sequenceDiagram-FGHM5R23-B7f6eT66.js → sequenceDiagram-FGHM5R23-0i-4BqN-.js} +3 -3
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-0i-4BqN-.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-FHFEXIEX-Cm4iQesY.js → stateDiagram-FHFEXIEX-DX08_hh3.js} +8 -8
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-DX08_hh3.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-v2-QKLJ7IA2-DdStGNJu.js → stateDiagram-v2-QKLJ7IA2-CP3UU-ar.js} +4 -4
- package/dist-electron/renderer/assets/{timeline-definition-GMOUNBTQ-BA4cLDsg.js → timeline-definition-GMOUNBTQ-Bn7U0euE.js} +2 -2
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-Bn7U0euE.js.gz +0 -0
- package/dist-electron/renderer/assets/{vennDiagram-DHZGUBPP-D0qEZKPk.js → vennDiagram-DHZGUBPP-ChvNdQSo.js} +1 -1
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-ChvNdQSo.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardley-RL74JXVD-GYpdfATp.js → wardley-RL74JXVD-BF3DE4pq.js} +3 -3
- package/dist-electron/renderer/assets/wardley-RL74JXVD-BF3DE4pq.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardleyDiagram-NUSXRM2D-Br7mKnLr.js → wardleyDiagram-NUSXRM2D-BoIeDdfp.js} +5 -5
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-BoIeDdfp.js.gz +0 -0
- package/dist-electron/renderer/assets/{xychartDiagram-5P7HB3ND-D37yDEDj.js → xychartDiagram-5P7HB3ND-D5C0kytw.js} +2 -2
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-D5C0kytw.js.gz +0 -0
- package/dist-electron/renderer/index.html +2 -2
- package/package.json +7 -5
- package/dist-electron/renderer/assets/_baseUniq-BPxrppe8.js.gz +0 -0
- package/dist-electron/renderer/assets/arc-BWCOtJfo.js.gz +0 -0
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-B6aBoJIj.js.gz +0 -0
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-CFxhVnTA.js.gz +0 -0
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-Dn3rtd9z.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-C9WmbeNG.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-BdzjVCjA.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-bt6YDeoM.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-BvsloRWu.js.gz +0 -0
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-BpNfMIZi.js.gz +0 -0
- package/dist-electron/renderer/assets/dagre-KV5264BT-DvevUtVv.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-BEs1nVIP.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-Bab0VbSx.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-CD02vhuR.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-TYMM5635-xAze9LR5.js.gz +0 -0
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-B2HXqBYH.js.gz +0 -0
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-DZFPQcpb.js.gz +0 -0
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-XX0OTBm4.js.gz +0 -0
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-CHoEzYqD.js.gz +0 -0
- package/dist-electron/renderer/assets/graph-t72OS6pZ.js.gz +0 -0
- package/dist-electron/renderer/assets/index-Hd87F96i.css.gz +0 -0
- package/dist-electron/renderer/assets/index-x4Eegt5G.js.gz +0 -0
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-BG3mS91T.js.gz +0 -0
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-D3ONtv9u.js.gz +0 -0
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-BDJXuwNy.js.gz +0 -0
- package/dist-electron/renderer/assets/layout-Beu21ILX.js.gz +0 -0
- package/dist-electron/renderer/assets/linear-BxRcWGaU.js.gz +0 -0
- package/dist-electron/renderer/assets/min-J184ABTi.js.gz +0 -0
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-a-qwDgLY.js.gz +0 -0
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-CohU6y2K.js.gz +0 -0
- package/dist-electron/renderer/assets/quadrantDiagram-34T5L4WZ-D8iYiTzN.js.gz +0 -0
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-5S5xgn9_.js.gz +0 -0
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-DUYAJ9k7.js.gz +0 -0
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-B7f6eT66.js.gz +0 -0
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-Cm4iQesY.js.gz +0 -0
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-BA4cLDsg.js.gz +0 -0
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-D0qEZKPk.js.gz +0 -0
- package/dist-electron/renderer/assets/wardley-RL74JXVD-GYpdfATp.js.gz +0 -0
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-Br7mKnLr.js.gz +0 -0
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-D37yDEDj.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-C5t353zi.js","./graph-BTPzdQjH.js","./_baseUniq-Dt9qXP29.js","./layout-sDMER76e.js","./min-CihovUOT.js","./clone-_36aVKDg.js","./cose-bilkent-S5V4N54A-C3iQr7P0.js","./cytoscape.esm-D6E6cAed.js","./c4Diagram-AHTNJAMY-BQCHj6of.js","./chunk-YZCP3GAM-BTonv1NP.js","./flowDiagram-DWJPFMVM-Br3VuPsd.js","./chunk-FMBD7UC4-BmRxbPzV.js","./chunk-55IACEB6-DFn516zY.js","./chunk-EDXVE4YY-CGRKmQT3.js","./channel-CC4z4GJI.js","./erDiagram-SMLLAGMA-D0srSDPs.js","./gitGraphDiagram-UUTBAWPF-CKplsNll.js","./chunk-4BX2VUAB-BVP9T2Dh.js","./chunk-QZHKN3VN-CZqi7zia.js","./wardley-RL74JXVD-BF3DE4pq.js","./ganttDiagram-T4ZO3ILL-D09E8Ld2.js","./linear-BJZxaeHe.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-42DDH7IO-VNZjK26Z.js","./pieDiagram-DEJITSTG-5w5tVLFj.js","./arc-RsiBQoWi.js","./ordinal-CxptdPJm.js","./quadrantDiagram-34T5L4WZ-B5GobzTO.js","./xychartDiagram-5P7HB3ND-D5C0kytw.js","./requirementDiagram-MS252O5E-EEt0fiRz.js","./sequenceDiagram-FGHM5R23-0i-4BqN-.js","./classDiagram-6PBFFD2Q-CLrLTGbu.js","./chunk-4TB4RGXK-CiPR4mxA.js","./classDiagram-v2-HSJHXN6E-CLrLTGbu.js","./stateDiagram-FHFEXIEX-DX08_hh3.js","./chunk-OYMX7WX6-Dk-Q7zf7.js","./stateDiagram-v2-QKLJ7IA2-CP3UU-ar.js","./journeyDiagram-VCZTEJTY-4mieWisO.js","./timeline-definition-GMOUNBTQ-Bn7U0euE.js","./mindmap-definition-QFDTVHPH-BWSrGBRN.js","./kanban-definition-6JOO6SKY-Cm91R9mn.js","./sankeyDiagram-XADWPNL6-Osa6Eix6.js","./diagram-TYMM5635-DAsU-q28.js","./diagram-MMDJMWI5-ByaaDyoH.js","./blockDiagram-DXYQGD6D-B86rt-OM.js","./diagram-5BDNPKRD-BeuTiBNY.js","./architectureDiagram-Q4EWVU46-JhFDZdkM.js","./diagram-G4DWMVQ6-BNAzh5ef.js","./wardleyDiagram-NUSXRM2D-BoIeDdfp.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];
|
|
@@ -17243,6 +17243,19 @@ function withBlockPending(block, isPending) {
|
|
|
17243
17243
|
isPending
|
|
17244
17244
|
};
|
|
17245
17245
|
}
|
|
17246
|
+
function deriveMessageStatus(message2) {
|
|
17247
|
+
if (message2.senderRole !== "agent") return "completed";
|
|
17248
|
+
if (message2.status) return message2.status;
|
|
17249
|
+
if (message2.error) return "failed";
|
|
17250
|
+
if (message2.isStreaming) return "streaming";
|
|
17251
|
+
return "completed";
|
|
17252
|
+
}
|
|
17253
|
+
function isMessageStreaming(message2) {
|
|
17254
|
+
return deriveMessageStatus(message2) === "streaming";
|
|
17255
|
+
}
|
|
17256
|
+
function isMessageFailed(message2) {
|
|
17257
|
+
return deriveMessageStatus(message2) === "failed";
|
|
17258
|
+
}
|
|
17246
17259
|
const BUFFER_TIMEOUT_MS = 3e4;
|
|
17247
17260
|
const MAX_SEQ_GAP = 100;
|
|
17248
17261
|
const state$2 = {
|
|
@@ -17812,11 +17825,20 @@ function projectSingleEvent(event, messagesMap, state2) {
|
|
|
17812
17825
|
function projectSnapshot(event, messagesMap, state2) {
|
|
17813
17826
|
const cid = event.sessionId;
|
|
17814
17827
|
const current = messagesMap.get(cid) ?? /* @__PURE__ */ new Map();
|
|
17815
|
-
const
|
|
17816
|
-
const
|
|
17828
|
+
const activeRun = event.runtime?.activeRun;
|
|
17829
|
+
const msgMap = mergeSnapshotMessages(current, event.messages, activeRun);
|
|
17830
|
+
const activeRunId = activeRun?.runId ?? event.queue.activeRunId;
|
|
17817
17831
|
const existingMetrics = state2.runMetricsMap.get(cid);
|
|
17818
17832
|
const runMetricsMap = /* @__PURE__ */ new Map();
|
|
17819
|
-
if (
|
|
17833
|
+
if (activeRun) {
|
|
17834
|
+
runMetricsMap.set(cid, {
|
|
17835
|
+
startedAt: activeRun.startedAt,
|
|
17836
|
+
...activeRun.model !== void 0 ? { model: activeRun.model } : {},
|
|
17837
|
+
...activeRun.fallback !== void 0 ? { fallback: activeRun.fallback } : {},
|
|
17838
|
+
...activeRun.fallbackTransition !== void 0 ? { fallbackTransition: activeRun.fallbackTransition } : {},
|
|
17839
|
+
...activeRun.usage !== void 0 ? { usage: activeRun.usage } : {}
|
|
17840
|
+
});
|
|
17841
|
+
} else if (activeRunId) {
|
|
17820
17842
|
runMetricsMap.set(cid, existingMetrics ?? { startedAt: Date.now() });
|
|
17821
17843
|
} else if (existingMetrics) {
|
|
17822
17844
|
runMetricsMap.set(cid, void 0);
|
|
@@ -17829,11 +17851,47 @@ function projectSnapshot(event, messagesMap, state2) {
|
|
|
17829
17851
|
sendingMap: /* @__PURE__ */ new Map([[cid, event.queue.running]]),
|
|
17830
17852
|
loadingMap: /* @__PURE__ */ new Map([[cid, false]]),
|
|
17831
17853
|
hasMoreMap: /* @__PURE__ */ new Map([[cid, event.hasMore]]),
|
|
17832
|
-
activeRunIdMap: /* @__PURE__ */ new Map([[cid,
|
|
17854
|
+
activeRunIdMap: /* @__PURE__ */ new Map([[cid, activeRunId]]),
|
|
17833
17855
|
retryingMap: /* @__PURE__ */ new Map([[cid, null]]),
|
|
17834
17856
|
runMetricsMap
|
|
17835
17857
|
};
|
|
17836
17858
|
}
|
|
17859
|
+
function mergeSnapshotMessages(current, incomingMessages, activeRun) {
|
|
17860
|
+
const normalizedMessages = incomingMessages.map((message2) => normalizeSnapshotMessage(message2, activeRun));
|
|
17861
|
+
const merged = mergeMessageMaps(current, normalizedMessages);
|
|
17862
|
+
for (const message2 of normalizedMessages) {
|
|
17863
|
+
const existing = current.get(message2.id);
|
|
17864
|
+
if (!shouldKeepRuntimeBlocks(existing, message2)) continue;
|
|
17865
|
+
merged.set(message2.id, {
|
|
17866
|
+
...message2,
|
|
17867
|
+
blocks: existing.blocks,
|
|
17868
|
+
isStreaming: isRuntimeMessage(existing),
|
|
17869
|
+
status: mergeSnapshotStatus(existing, message2),
|
|
17870
|
+
runId: existing.runId ?? message2.runId,
|
|
17871
|
+
updatedAt: Math.max(existing.updatedAt, message2.updatedAt)
|
|
17872
|
+
});
|
|
17873
|
+
}
|
|
17874
|
+
return merged;
|
|
17875
|
+
}
|
|
17876
|
+
function normalizeSnapshotMessage(message2, activeRun) {
|
|
17877
|
+
if (!activeRun || message2.id !== activeRun.messageId) return message2;
|
|
17878
|
+
return withStreamingLifecycle({
|
|
17879
|
+
...message2,
|
|
17880
|
+
runId: message2.runId ?? activeRun.runId
|
|
17881
|
+
});
|
|
17882
|
+
}
|
|
17883
|
+
function shouldKeepRuntimeBlocks(existing, incoming) {
|
|
17884
|
+
if (!existing) return false;
|
|
17885
|
+
if (!isRuntimeMessage(existing)) return false;
|
|
17886
|
+
return incoming.blocks.length === 0 || incoming.updatedAt < existing.updatedAt;
|
|
17887
|
+
}
|
|
17888
|
+
function isRuntimeMessage(message2) {
|
|
17889
|
+
return isMessageStreaming(message2) || hasPendingBlocks(message2.blocks);
|
|
17890
|
+
}
|
|
17891
|
+
function mergeSnapshotStatus(existing, incoming) {
|
|
17892
|
+
if (incoming.status === "streaming") return "streaming";
|
|
17893
|
+
return incoming.status;
|
|
17894
|
+
}
|
|
17837
17895
|
function projectMessageAccepted(event, messagesMap, state2) {
|
|
17838
17896
|
const cid = event.sessionId;
|
|
17839
17897
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
@@ -17853,8 +17911,11 @@ function projectRunStarted(event, messagesMap) {
|
|
|
17853
17911
|
const cid = event.sessionId;
|
|
17854
17912
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
17855
17913
|
const existing = current.get(event.messageId);
|
|
17914
|
+
if (existing && isStaleRunEventForTerminalMessage(existing, event.runId)) {
|
|
17915
|
+
return {};
|
|
17916
|
+
}
|
|
17856
17917
|
if (!existing) {
|
|
17857
|
-
current.set(event.messageId, {
|
|
17918
|
+
current.set(event.messageId, withStreamingLifecycle({
|
|
17858
17919
|
id: event.messageId,
|
|
17859
17920
|
sessionId: cid,
|
|
17860
17921
|
senderId: event.agentId,
|
|
@@ -17862,17 +17923,21 @@ function projectRunStarted(event, messagesMap) {
|
|
|
17862
17923
|
blocks: [],
|
|
17863
17924
|
createdAt: event.createdAt,
|
|
17864
17925
|
updatedAt: event.createdAt,
|
|
17865
|
-
isStreaming: true,
|
|
17866
17926
|
runId: event.runId
|
|
17867
|
-
});
|
|
17927
|
+
}));
|
|
17868
17928
|
} else {
|
|
17869
|
-
current.set(event.messageId, {
|
|
17929
|
+
current.set(event.messageId, withStreamingLifecycle({
|
|
17930
|
+
...existing,
|
|
17931
|
+
runId: event.runId,
|
|
17932
|
+
error: void 0,
|
|
17933
|
+
updatedAt: event.createdAt
|
|
17934
|
+
}));
|
|
17870
17935
|
}
|
|
17871
17936
|
return {
|
|
17872
17937
|
messagesMap: /* @__PURE__ */ new Map([[cid, current]]),
|
|
17873
17938
|
activeRunIdMap: /* @__PURE__ */ new Map([[cid, event.runId]]),
|
|
17874
17939
|
retryingMap: /* @__PURE__ */ new Map([[cid, null]]),
|
|
17875
|
-
runMetricsMap: /* @__PURE__ */ new Map([[cid, { startedAt:
|
|
17940
|
+
runMetricsMap: /* @__PURE__ */ new Map([[cid, { startedAt: event.createdAt }]])
|
|
17876
17941
|
};
|
|
17877
17942
|
}
|
|
17878
17943
|
function projectRunProgress(event, state2) {
|
|
@@ -17937,12 +18002,11 @@ function projectBlockUpdated(event, messagesMap, state2) {
|
|
|
17937
18002
|
}
|
|
17938
18003
|
const nextBlocks = applyBlockUpdate(previous2.blocks, event.block);
|
|
17939
18004
|
const hasActiveRun = !!state2.activeRunIdMap.get(cid);
|
|
17940
|
-
current.set(event.messageId, {
|
|
18005
|
+
current.set(event.messageId, withLegacyStreamingFlag({
|
|
17941
18006
|
...previous2,
|
|
17942
18007
|
blocks: nextBlocks,
|
|
17943
|
-
isStreaming: hasActiveRun || hasPendingBlocks(nextBlocks),
|
|
17944
18008
|
updatedAt: Date.now()
|
|
17945
|
-
});
|
|
18009
|
+
}, hasActiveRun || hasPendingBlocks(nextBlocks)));
|
|
17946
18010
|
const newRevision = (state2.streamRevisionMap.get(cid) ?? 0) + 1;
|
|
17947
18011
|
const newRevisionMap = new Map(state2.streamRevisionMap);
|
|
17948
18012
|
newRevisionMap.set(cid, newRevision);
|
|
@@ -17972,12 +18036,11 @@ function projectNestedBlockUpdated(event, messagesMap, state2) {
|
|
|
17972
18036
|
}
|
|
17973
18037
|
const nextBlocks = applyNestedBlockUpdate(previous2.blocks, event.path, event.block);
|
|
17974
18038
|
const hasActiveRun = !!state2.activeRunIdMap.get(cid);
|
|
17975
|
-
current.set(event.messageId, {
|
|
18039
|
+
current.set(event.messageId, withLegacyStreamingFlag({
|
|
17976
18040
|
...previous2,
|
|
17977
18041
|
blocks: nextBlocks,
|
|
17978
|
-
isStreaming: hasActiveRun || hasPendingBlocks(nextBlocks),
|
|
17979
18042
|
updatedAt: Date.now()
|
|
17980
|
-
});
|
|
18043
|
+
}, hasActiveRun || hasPendingBlocks(nextBlocks)));
|
|
17981
18044
|
const newRevision = (state2.streamRevisionMap.get(cid) ?? 0) + 1;
|
|
17982
18045
|
const newRevisionMap = new Map(state2.streamRevisionMap);
|
|
17983
18046
|
newRevisionMap.set(cid, newRevision);
|
|
@@ -17995,12 +18058,11 @@ function projectBroadcastResponseUpdated(event, messagesMap, state2) {
|
|
|
17995
18058
|
}
|
|
17996
18059
|
const nextBlocks = applyBroadcastResponsePatch(previous2.blocks, event.broadcastId, event.agentId, event.patch);
|
|
17997
18060
|
const hasActiveRun = !!state2.activeRunIdMap.get(cid);
|
|
17998
|
-
current.set(event.messageId, {
|
|
18061
|
+
current.set(event.messageId, withLegacyStreamingFlag({
|
|
17999
18062
|
...previous2,
|
|
18000
18063
|
blocks: nextBlocks,
|
|
18001
|
-
isStreaming: hasActiveRun || hasPendingBlocks(nextBlocks),
|
|
18002
18064
|
updatedAt: Date.now()
|
|
18003
|
-
});
|
|
18065
|
+
}, hasActiveRun || hasPendingBlocks(nextBlocks)));
|
|
18004
18066
|
const newRevision = (state2.streamRevisionMap.get(cid) ?? 0) + 1;
|
|
18005
18067
|
const newRevisionMap = new Map(state2.streamRevisionMap);
|
|
18006
18068
|
newRevisionMap.set(cid, newRevision);
|
|
@@ -18013,13 +18075,16 @@ function projectRunRetrying(event, messagesMap, state2) {
|
|
|
18013
18075
|
const cid = event.sessionId;
|
|
18014
18076
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
18015
18077
|
const previous2 = current.get(event.messageId);
|
|
18078
|
+
if (previous2 && isEventForDifferentRun(previous2, event.runId)) {
|
|
18079
|
+
return {};
|
|
18080
|
+
}
|
|
18016
18081
|
if (previous2) {
|
|
18017
|
-
current.set(event.messageId, {
|
|
18082
|
+
current.set(event.messageId, withStreamingLifecycle({
|
|
18018
18083
|
...previous2,
|
|
18019
18084
|
blocks: [],
|
|
18020
|
-
|
|
18085
|
+
error: void 0,
|
|
18021
18086
|
updatedAt: Date.now()
|
|
18022
|
-
});
|
|
18087
|
+
}));
|
|
18023
18088
|
}
|
|
18024
18089
|
const newMetricsMap = new Map(state2.runMetricsMap);
|
|
18025
18090
|
newMetricsMap.set(cid, { startedAt: Date.now() });
|
|
@@ -18033,19 +18098,22 @@ function projectRunTerminal(event, messagesMap, state2) {
|
|
|
18033
18098
|
const cid = event.sessionId;
|
|
18034
18099
|
const current = new Map(messagesMap.get(cid) ?? []);
|
|
18035
18100
|
const previous2 = current.get(event.messageId);
|
|
18101
|
+
if (previous2 && isEventForDifferentRun(previous2, event.runId)) {
|
|
18102
|
+
return {};
|
|
18103
|
+
}
|
|
18036
18104
|
if (previous2) {
|
|
18037
18105
|
const nextBlocks = clearPendingBlocks(previous2.blocks);
|
|
18038
|
-
|
|
18106
|
+
const status2 = statusForTerminalEvent(event);
|
|
18107
|
+
current.set(event.messageId, withTerminalLifecycle({
|
|
18039
18108
|
...previous2,
|
|
18040
18109
|
blocks: nextBlocks,
|
|
18041
|
-
...event.type === "run.failed" ? { error: event.error } : {},
|
|
18110
|
+
...event.type === "run.failed" ? { error: event.error } : { error: void 0 },
|
|
18042
18111
|
...event.type === "run.completed" && event.usage ? { usage: event.usage } : {},
|
|
18043
18112
|
..."durationMs" in event && event.durationMs !== void 0 ? { durationMs: event.durationMs } : {},
|
|
18044
18113
|
..."model" in event && event.model !== void 0 ? { model: event.model } : {},
|
|
18045
18114
|
..."fallback" in event && event.fallback !== void 0 ? { fallback: event.fallback } : {},
|
|
18046
|
-
isStreaming: hasPendingBlocks(nextBlocks),
|
|
18047
18115
|
updatedAt: Date.now()
|
|
18048
|
-
});
|
|
18116
|
+
}, status2));
|
|
18049
18117
|
}
|
|
18050
18118
|
const newMetricsMap = new Map(state2.runMetricsMap);
|
|
18051
18119
|
newMetricsMap.set(cid, void 0);
|
|
@@ -18056,6 +18124,43 @@ function projectRunTerminal(event, messagesMap, state2) {
|
|
|
18056
18124
|
runMetricsMap: newMetricsMap
|
|
18057
18125
|
};
|
|
18058
18126
|
}
|
|
18127
|
+
function statusForTerminalEvent(event) {
|
|
18128
|
+
switch (event.type) {
|
|
18129
|
+
case "run.completed":
|
|
18130
|
+
return "completed";
|
|
18131
|
+
case "run.failed":
|
|
18132
|
+
return "failed";
|
|
18133
|
+
case "run.stopped":
|
|
18134
|
+
return "cancelled";
|
|
18135
|
+
}
|
|
18136
|
+
}
|
|
18137
|
+
function withStreamingLifecycle(message2) {
|
|
18138
|
+
return {
|
|
18139
|
+
...message2,
|
|
18140
|
+
status: "streaming",
|
|
18141
|
+
isStreaming: true
|
|
18142
|
+
};
|
|
18143
|
+
}
|
|
18144
|
+
function withTerminalLifecycle(message2, status2) {
|
|
18145
|
+
return {
|
|
18146
|
+
...message2,
|
|
18147
|
+
status: status2,
|
|
18148
|
+
isStreaming: false
|
|
18149
|
+
};
|
|
18150
|
+
}
|
|
18151
|
+
function withLegacyStreamingFlag(message2, isStreaming) {
|
|
18152
|
+
return {
|
|
18153
|
+
...message2,
|
|
18154
|
+
isStreaming
|
|
18155
|
+
};
|
|
18156
|
+
}
|
|
18157
|
+
function isEventForDifferentRun(message2, runId) {
|
|
18158
|
+
return message2.runId !== void 0 && message2.runId !== runId;
|
|
18159
|
+
}
|
|
18160
|
+
function isStaleRunEventForTerminalMessage(message2, runId) {
|
|
18161
|
+
if (!isEventForDifferentRun(message2, runId)) return false;
|
|
18162
|
+
return message2.status === "completed" || message2.status === "failed" || message2.status === "cancelled";
|
|
18163
|
+
}
|
|
18059
18164
|
function projectQueueUpdated(event, state2) {
|
|
18060
18165
|
const wasRunning = state2.sendingMap.get(event.sessionId) ?? false;
|
|
18061
18166
|
const isRunning = event.queue.running;
|
|
@@ -18125,6 +18230,10 @@ function setArrayMapValueIfChanged(map2, key, value2) {
|
|
|
18125
18230
|
return new Map(map2).set(key, value2);
|
|
18126
18231
|
}
|
|
18127
18232
|
const pendingFetchBlocks = /* @__PURE__ */ new Map();
|
|
18233
|
+
const inFlightMessageFetches = /* @__PURE__ */ new Set();
|
|
18234
|
+
function getPendingFetchKey(sessionId, messageId) {
|
|
18235
|
+
return `${sessionId}::${messageId}`;
|
|
18236
|
+
}
|
|
18128
18237
|
const useMessageStore = create$3((set2, get2) => ({
|
|
18129
18238
|
// ─────────────────── 状态 ───────────────────
|
|
18130
18239
|
messagesMap: /* @__PURE__ */ new Map(),
|
|
@@ -18164,7 +18273,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18164
18273
|
const msgMap = state2.messagesMap.get(cid);
|
|
18165
18274
|
if (msgMap) {
|
|
18166
18275
|
for (const msg of msgMap.values()) {
|
|
18167
|
-
if (
|
|
18276
|
+
if (isMessageStreaming(msg)) return "streaming";
|
|
18168
18277
|
}
|
|
18169
18278
|
}
|
|
18170
18279
|
return "idle";
|
|
@@ -18600,35 +18709,51 @@ function mapBroadcastStatus(status2) {
|
|
|
18600
18709
|
}
|
|
18601
18710
|
}
|
|
18602
18711
|
function accumulatePendingBlock(params) {
|
|
18603
|
-
const key = params.messageId;
|
|
18712
|
+
const key = getPendingFetchKey(params.sessionId, params.messageId);
|
|
18604
18713
|
const blocks = pendingFetchBlocks.get(key) ?? [];
|
|
18605
18714
|
blocks.push(params.block);
|
|
18606
18715
|
pendingFetchBlocks.set(key, blocks);
|
|
18607
18716
|
}
|
|
18608
18717
|
function triggerFetch(sessionId, messageId) {
|
|
18609
|
-
const
|
|
18610
|
-
if (
|
|
18611
|
-
|
|
18612
|
-
|
|
18613
|
-
fetchAndApplyMessage(sessionId, messageId);
|
|
18718
|
+
const key = getPendingFetchKey(sessionId, messageId);
|
|
18719
|
+
if (inFlightMessageFetches.has(key)) return;
|
|
18720
|
+
inFlightMessageFetches.add(key);
|
|
18721
|
+
void fetchAndApplyMessage(sessionId, messageId, key);
|
|
18614
18722
|
}
|
|
18615
|
-
async function fetchAndApplyMessage(sessionId, messageId) {
|
|
18616
|
-
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
18617
|
-
const blocks = pendingFetchBlocks.get(messageId);
|
|
18618
|
-
if (!blocks || blocks.length === 0) return;
|
|
18619
|
-
pendingFetchBlocks.delete(messageId);
|
|
18723
|
+
async function fetchAndApplyMessage(sessionId, messageId, key) {
|
|
18620
18724
|
try {
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18725
|
+
while (true) {
|
|
18726
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
18727
|
+
const blocks = pendingFetchBlocks.get(key);
|
|
18728
|
+
if (!blocks || blocks.length === 0) return;
|
|
18729
|
+
pendingFetchBlocks.delete(key);
|
|
18730
|
+
const message2 = await getTransport().getMessage(messageId);
|
|
18731
|
+
if (message2) {
|
|
18732
|
+
const currentMessage = useMessageStore.getState().messagesMap.get(sessionId)?.get(messageId);
|
|
18733
|
+
let finalBlocks = chooseFetchedBlockBase(currentMessage, message2);
|
|
18734
|
+
for (const block of blocks) {
|
|
18735
|
+
finalBlocks = applyBlockUpdate(finalBlocks, block);
|
|
18736
|
+
}
|
|
18737
|
+
useMessageStore.getState().addFetchedMessage(sessionId, { ...message2, blocks: finalBlocks });
|
|
18626
18738
|
}
|
|
18627
|
-
useMessageStore.getState().addFetchedMessage(sessionId, { ...message2, blocks: finalBlocks });
|
|
18628
18739
|
}
|
|
18629
18740
|
} catch (error2) {
|
|
18630
18741
|
log$s.error("Failed to fetch message:", error2);
|
|
18742
|
+
} finally {
|
|
18743
|
+
inFlightMessageFetches.delete(key);
|
|
18744
|
+
if ((pendingFetchBlocks.get(key)?.length ?? 0) > 0) {
|
|
18745
|
+
triggerFetch(sessionId, messageId);
|
|
18746
|
+
}
|
|
18747
|
+
}
|
|
18748
|
+
}
|
|
18749
|
+
function chooseFetchedBlockBase(currentMessage, fetchedMessage) {
|
|
18750
|
+
if (!currentMessage) return fetchedMessage.blocks;
|
|
18751
|
+
const currentIsRuntime = isMessageStreaming(currentMessage) || hasPendingBlocks(currentMessage.blocks);
|
|
18752
|
+
const fetchedIsStale = fetchedMessage.blocks.length === 0 || fetchedMessage.updatedAt < currentMessage.updatedAt;
|
|
18753
|
+
if (currentIsRuntime && fetchedIsStale) {
|
|
18754
|
+
return currentMessage.blocks;
|
|
18631
18755
|
}
|
|
18756
|
+
return fetchedMessage.blocks;
|
|
18632
18757
|
}
|
|
18633
18758
|
function mergeProjectionUpdate(state2, result) {
|
|
18634
18759
|
const merged = {};
|
|
@@ -65158,12 +65283,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
65158
65283
|
registerLayoutLoaders([
|
|
65159
65284
|
{
|
|
65160
65285
|
name: "dagre",
|
|
65161
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-
|
|
65286
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-C5t353zi.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
|
|
65162
65287
|
},
|
|
65163
65288
|
...[
|
|
65164
65289
|
{
|
|
65165
65290
|
name: "cose-bilkent",
|
|
65166
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-
|
|
65291
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-C3iQr7P0.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
|
|
65167
65292
|
}
|
|
65168
65293
|
]
|
|
65169
65294
|
]);
|
|
@@ -65619,7 +65744,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
65619
65744
|
}, "detector");
|
|
65620
65745
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
65621
65746
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65622
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-
|
|
65747
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-BQCHj6of.js");
|
|
65623
65748
|
return { diagram: diagram22 };
|
|
65624
65749
|
}, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
|
|
65625
65750
|
return { id, diagram: diagram2 };
|
|
@@ -65639,7 +65764,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65639
65764
|
}, "detector");
|
|
65640
65765
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
65641
65766
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65642
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65767
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-Br3VuPsd.js");
|
|
65643
65768
|
return { diagram: diagram22 };
|
|
65644
65769
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65645
65770
|
return { id: id2, diagram: diagram2 };
|
|
@@ -65665,7 +65790,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65665
65790
|
}, "detector");
|
|
65666
65791
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
65667
65792
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65668
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
65793
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-Br3VuPsd.js");
|
|
65669
65794
|
return { diagram: diagram22 };
|
|
65670
65795
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65671
65796
|
return { id: id3, diagram: diagram2 };
|
|
@@ -65682,7 +65807,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
65682
65807
|
}, "detector");
|
|
65683
65808
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
65684
65809
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65685
|
-
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-
|
|
65810
|
+
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-D0srSDPs.js");
|
|
65686
65811
|
return { diagram: diagram22 };
|
|
65687
65812
|
}, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
|
|
65688
65813
|
return { id: id4, diagram: diagram2 };
|
|
@@ -65699,7 +65824,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
65699
65824
|
}, "detector");
|
|
65700
65825
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
65701
65826
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65702
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-
|
|
65827
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-CKplsNll.js");
|
|
65703
65828
|
return { diagram: diagram22 };
|
|
65704
65829
|
}, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
|
|
65705
65830
|
return { id: id5, diagram: diagram2 };
|
|
@@ -65716,7 +65841,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
65716
65841
|
}, "detector");
|
|
65717
65842
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
65718
65843
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65719
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-
|
|
65844
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-D09E8Ld2.js");
|
|
65720
65845
|
return { diagram: diagram22 };
|
|
65721
65846
|
}, true ? __vite__mapDeps([20,21,22,23]) : void 0, import.meta.url);
|
|
65722
65847
|
return { id: id6, diagram: diagram2 };
|
|
@@ -65733,7 +65858,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
65733
65858
|
}, "detector");
|
|
65734
65859
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
65735
65860
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65736
|
-
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-
|
|
65861
|
+
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-VNZjK26Z.js");
|
|
65737
65862
|
return { diagram: diagram22 };
|
|
65738
65863
|
}, true ? __vite__mapDeps([24,19,4,2]) : void 0, import.meta.url);
|
|
65739
65864
|
return { id: id7, diagram: diagram2 };
|
|
@@ -65749,7 +65874,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
65749
65874
|
}, "detector");
|
|
65750
65875
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
65751
65876
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65752
|
-
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-
|
|
65877
|
+
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-5w5tVLFj.js");
|
|
65753
65878
|
return { diagram: diagram22 };
|
|
65754
65879
|
}, true ? __vite__mapDeps([25,17,19,4,2,26,27,22]) : void 0, import.meta.url);
|
|
65755
65880
|
return { id: id8, diagram: diagram2 };
|
|
@@ -65765,7 +65890,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
65765
65890
|
}, "detector");
|
|
65766
65891
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
65767
65892
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65768
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-
|
|
65893
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-B5GobzTO.js");
|
|
65769
65894
|
return { diagram: diagram22 };
|
|
65770
65895
|
}, true ? __vite__mapDeps([28,21,22,23]) : void 0, import.meta.url);
|
|
65771
65896
|
return { id: id9, diagram: diagram2 };
|
|
@@ -65782,7 +65907,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
65782
65907
|
}, "detector");
|
|
65783
65908
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
65784
65909
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65785
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-
|
|
65910
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-D5C0kytw.js");
|
|
65786
65911
|
return { diagram: diagram22 };
|
|
65787
65912
|
}, true ? __vite__mapDeps([29,22,27,21,23]) : void 0, import.meta.url);
|
|
65788
65913
|
return { id: id10, diagram: diagram2 };
|
|
@@ -65799,7 +65924,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
65799
65924
|
}, "detector");
|
|
65800
65925
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
65801
65926
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65802
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-
|
|
65927
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-EEt0fiRz.js");
|
|
65803
65928
|
return { diagram: diagram22 };
|
|
65804
65929
|
}, true ? __vite__mapDeps([30,12,13]) : void 0, import.meta.url);
|
|
65805
65930
|
return { id: id11, diagram: diagram2 };
|
|
@@ -65816,7 +65941,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
65816
65941
|
}, "detector");
|
|
65817
65942
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
65818
65943
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65819
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-
|
|
65944
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-0i-4BqN-.js");
|
|
65820
65945
|
return { diagram: diagram22 };
|
|
65821
65946
|
}, true ? __vite__mapDeps([31,9,18]) : void 0, import.meta.url);
|
|
65822
65947
|
return { id: id12, diagram: diagram2 };
|
|
@@ -65836,7 +65961,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65836
65961
|
}, "detector");
|
|
65837
65962
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
65838
65963
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65839
|
-
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-
|
|
65964
|
+
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-CLrLTGbu.js");
|
|
65840
65965
|
return { diagram: diagram22 };
|
|
65841
65966
|
}, true ? __vite__mapDeps([32,33,11,9,12,13]) : void 0, import.meta.url);
|
|
65842
65967
|
return { id: id13, diagram: diagram2 };
|
|
@@ -65856,7 +65981,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65856
65981
|
}, "detector");
|
|
65857
65982
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
65858
65983
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65859
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-
|
|
65984
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-CLrLTGbu.js");
|
|
65860
65985
|
return { diagram: diagram22 };
|
|
65861
65986
|
}, true ? __vite__mapDeps([34,33,11,9,12,13]) : void 0, import.meta.url);
|
|
65862
65987
|
return { id: id14, diagram: diagram2 };
|
|
@@ -65876,7 +66001,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65876
66001
|
}, "detector");
|
|
65877
66002
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
65878
66003
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65879
|
-
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-
|
|
66004
|
+
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-DX08_hh3.js");
|
|
65880
66005
|
return { diagram: diagram22 };
|
|
65881
66006
|
}, true ? __vite__mapDeps([35,36,12,13,1,2,3,4]) : void 0, import.meta.url);
|
|
65882
66007
|
return { id: id15, diagram: diagram2 };
|
|
@@ -65899,7 +66024,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
65899
66024
|
}, "detector");
|
|
65900
66025
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
65901
66026
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65902
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-
|
|
66027
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-CP3UU-ar.js");
|
|
65903
66028
|
return { diagram: diagram22 };
|
|
65904
66029
|
}, true ? __vite__mapDeps([37,36,12,13]) : void 0, import.meta.url);
|
|
65905
66030
|
return { id: id16, diagram: diagram2 };
|
|
@@ -65916,7 +66041,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
65916
66041
|
}, "detector");
|
|
65917
66042
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
65918
66043
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65919
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-
|
|
66044
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-4mieWisO.js");
|
|
65920
66045
|
return { diagram: diagram22 };
|
|
65921
66046
|
}, true ? __vite__mapDeps([38,11,9,26]) : void 0, import.meta.url);
|
|
65922
66047
|
return { id: id17, diagram: diagram2 };
|
|
@@ -65986,7 +66111,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
65986
66111
|
}, "detector");
|
|
65987
66112
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
65988
66113
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
65989
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
66114
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-Br3VuPsd.js");
|
|
65990
66115
|
return { diagram: diagram22 };
|
|
65991
66116
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
65992
66117
|
return { id: id18, diagram: diagram2 };
|
|
@@ -66003,7 +66128,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
66003
66128
|
}, "detector");
|
|
66004
66129
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
66005
66130
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66006
|
-
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-
|
|
66131
|
+
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-Bn7U0euE.js");
|
|
66007
66132
|
return { diagram: diagram22 };
|
|
66008
66133
|
}, true ? __vite__mapDeps([39,26]) : void 0, import.meta.url);
|
|
66009
66134
|
return { id: id19, diagram: diagram2 };
|
|
@@ -66020,7 +66145,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
66020
66145
|
}, "detector");
|
|
66021
66146
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
66022
66147
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66023
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-
|
|
66148
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-BWSrGBRN.js");
|
|
66024
66149
|
return { diagram: diagram22 };
|
|
66025
66150
|
}, true ? __vite__mapDeps([40,12,13]) : void 0, import.meta.url);
|
|
66026
66151
|
return { id: id20, diagram: diagram2 };
|
|
@@ -66037,7 +66162,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
66037
66162
|
}, "detector");
|
|
66038
66163
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
66039
66164
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66040
|
-
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-
|
|
66165
|
+
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-Cm91R9mn.js");
|
|
66041
66166
|
return { diagram: diagram22 };
|
|
66042
66167
|
}, true ? __vite__mapDeps([41,11]) : void 0, import.meta.url);
|
|
66043
66168
|
return { id: id21, diagram: diagram2 };
|
|
@@ -66054,7 +66179,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
66054
66179
|
}, "detector");
|
|
66055
66180
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
66056
66181
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66057
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-
|
|
66182
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-Osa6Eix6.js");
|
|
66058
66183
|
return { diagram: diagram22 };
|
|
66059
66184
|
}, true ? __vite__mapDeps([42,27,22]) : void 0, import.meta.url);
|
|
66060
66185
|
return { id: id22, diagram: diagram2 };
|
|
@@ -66071,7 +66196,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
66071
66196
|
}, "detector");
|
|
66072
66197
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
66073
66198
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66074
|
-
const { diagram: diagram22 } = await import("./diagram-TYMM5635-
|
|
66199
|
+
const { diagram: diagram22 } = await import("./diagram-TYMM5635-DAsU-q28.js");
|
|
66075
66200
|
return { diagram: diagram22 };
|
|
66076
66201
|
}, true ? __vite__mapDeps([43,17,19,4,2]) : void 0, import.meta.url);
|
|
66077
66202
|
return { id: id23, diagram: diagram2 };
|
|
@@ -66087,7 +66212,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
66087
66212
|
}, "detector");
|
|
66088
66213
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
66089
66214
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66090
|
-
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-
|
|
66215
|
+
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-ByaaDyoH.js");
|
|
66091
66216
|
return { diagram: diagram22 };
|
|
66092
66217
|
}, true ? __vite__mapDeps([44,17,19,4,2]) : void 0, import.meta.url);
|
|
66093
66218
|
return { id: id24, diagram: diagram2 };
|
|
@@ -66103,7 +66228,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
66103
66228
|
}, "detector");
|
|
66104
66229
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
66105
66230
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66106
|
-
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-
|
|
66231
|
+
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-B86rt-OM.js");
|
|
66107
66232
|
return { diagram: diagram22 };
|
|
66108
66233
|
}, true ? __vite__mapDeps([45,11,5,1,2,14]) : void 0, import.meta.url);
|
|
66109
66234
|
return { id: id25, diagram: diagram2 };
|
|
@@ -66120,7 +66245,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
66120
66245
|
}, "detector");
|
|
66121
66246
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
66122
66247
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66123
|
-
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-
|
|
66248
|
+
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-BeuTiBNY.js");
|
|
66124
66249
|
return { diagram: diagram22 };
|
|
66125
66250
|
}, true ? __vite__mapDeps([46,17,18,19,4,2]) : void 0, import.meta.url);
|
|
66126
66251
|
return { id: id26, diagram: diagram2 };
|
|
@@ -66137,7 +66262,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
66137
66262
|
}, "detector");
|
|
66138
66263
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
66139
66264
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66140
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-
|
|
66265
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-JhFDZdkM.js");
|
|
66141
66266
|
return { diagram: diagram22 };
|
|
66142
66267
|
}, true ? __vite__mapDeps([47,17,19,4,2,7]) : void 0, import.meta.url);
|
|
66143
66268
|
return { id: id27, diagram: diagram2 };
|
|
@@ -66154,7 +66279,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
66154
66279
|
}, "detector");
|
|
66155
66280
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
66156
66281
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66157
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-
|
|
66282
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-DNQZ_EJr.js");
|
|
66158
66283
|
return { diagram: diagram22 };
|
|
66159
66284
|
}, true ? [] : void 0, import.meta.url);
|
|
66160
66285
|
return { id: id28, diagram: diagram2 };
|
|
@@ -66170,7 +66295,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
66170
66295
|
}, "detector");
|
|
66171
66296
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
66172
66297
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66173
|
-
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-
|
|
66298
|
+
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-ChvNdQSo.js");
|
|
66174
66299
|
return { diagram: diagram22 };
|
|
66175
66300
|
}, true ? [] : void 0, import.meta.url);
|
|
66176
66301
|
return { id: id29, diagram: diagram2 };
|
|
@@ -66187,7 +66312,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
66187
66312
|
}, "detector");
|
|
66188
66313
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
66189
66314
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66190
|
-
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-
|
|
66315
|
+
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-BNAzh5ef.js");
|
|
66191
66316
|
return { diagram: diagram22 };
|
|
66192
66317
|
}, true ? __vite__mapDeps([48,13,17,19,4,2,23,27,22]) : void 0, import.meta.url);
|
|
66193
66318
|
return { id: id30, diagram: diagram2 };
|
|
@@ -66203,7 +66328,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
|
|
|
66203
66328
|
}, "detector");
|
|
66204
66329
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
66205
66330
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
66206
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-
|
|
66331
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-BoIeDdfp.js");
|
|
66207
66332
|
return { diagram: diagram22 };
|
|
66208
66333
|
}, true ? __vite__mapDeps([49,17,19,4,2]) : void 0, import.meta.url);
|
|
66209
66334
|
return { id: id31, diagram: diagram2 };
|
|
@@ -76410,9 +76535,9 @@ const MarkdownMessage = reactExports.memo(function MarkdownMessage2({
|
|
|
76410
76535
|
)
|
|
76411
76536
|
] });
|
|
76412
76537
|
}, markdownPropsEqual);
|
|
76413
|
-
const header$j = "
|
|
76414
|
-
const chevron$4 = "
|
|
76415
|
-
const content$a = "
|
|
76538
|
+
const header$j = "_header_3tatz_1";
|
|
76539
|
+
const chevron$4 = "_chevron_3tatz_24";
|
|
76540
|
+
const content$a = "_content_3tatz_29";
|
|
76416
76541
|
const styles$15 = {
|
|
76417
76542
|
header: header$j,
|
|
76418
76543
|
chevron: chevron$4,
|
|
@@ -76425,12 +76550,14 @@ const Collapse = reactExports.memo(function Collapse2({
|
|
|
76425
76550
|
onToggle,
|
|
76426
76551
|
defaultExpanded = false,
|
|
76427
76552
|
className,
|
|
76428
|
-
iconPosition = "right"
|
|
76553
|
+
iconPosition = "right",
|
|
76554
|
+
collapsible = true
|
|
76429
76555
|
}) {
|
|
76430
76556
|
const isControlled = expanded2 !== void 0;
|
|
76431
76557
|
const [internalExpanded, setInternalExpanded] = reactExports.useState(defaultExpanded);
|
|
76432
76558
|
const isExpanded = isControlled ? expanded2 : internalExpanded;
|
|
76433
76559
|
const handleToggle = () => {
|
|
76560
|
+
if (!collapsible) return;
|
|
76434
76561
|
if (!isControlled) {
|
|
76435
76562
|
setInternalExpanded((prev2) => !prev2);
|
|
76436
76563
|
}
|
|
@@ -76438,10 +76565,10 @@ const Collapse = reactExports.memo(function Collapse2({
|
|
|
76438
76565
|
};
|
|
76439
76566
|
const iconElement = isExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { size: 14, className: styles$15.chevron }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { size: 14, className: styles$15.chevron });
|
|
76440
76567
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className, children: [
|
|
76441
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$15.header, onClick: handleToggle, children: [
|
|
76442
|
-
iconPosition === "left" && iconElement,
|
|
76568
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$15.header, "data-collapsible": collapsible, onClick: handleToggle, children: [
|
|
76569
|
+
collapsible && iconPosition === "left" && iconElement,
|
|
76443
76570
|
header2,
|
|
76444
|
-
iconPosition === "right" && iconElement
|
|
76571
|
+
collapsible && iconPosition === "right" && iconElement
|
|
76445
76572
|
] }),
|
|
76446
76573
|
isExpanded && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$15.content, children: children2 })
|
|
76447
76574
|
] });
|
|
@@ -76755,7 +76882,7 @@ const rowButton = "_rowButton_1qzmy_51";
|
|
|
76755
76882
|
const statusIcon$3 = "_statusIcon_1qzmy_76";
|
|
76756
76883
|
const chevron$3 = "_chevron_1qzmy_77";
|
|
76757
76884
|
const executor = "_executor_1qzmy_85";
|
|
76758
|
-
const taskSummary = "_taskSummary_1qzmy_99";
|
|
76885
|
+
const taskSummary$1 = "_taskSummary_1qzmy_99";
|
|
76759
76886
|
const jumpButton = "_jumpButton_1qzmy_109";
|
|
76760
76887
|
const content$9 = "_content_1qzmy_116";
|
|
76761
76888
|
const contentOpen = "_contentOpen_1qzmy_122";
|
|
@@ -76775,7 +76902,7 @@ const styles$10 = {
|
|
|
76775
76902
|
statusIcon: statusIcon$3,
|
|
76776
76903
|
chevron: chevron$3,
|
|
76777
76904
|
executor,
|
|
76778
|
-
taskSummary,
|
|
76905
|
+
taskSummary: taskSummary$1,
|
|
76779
76906
|
jumpButton,
|
|
76780
76907
|
content: content$9,
|
|
76781
76908
|
contentOpen,
|
|
@@ -77211,6 +77338,29 @@ function formatDurationMs(durationMs) {
|
|
|
77211
77338
|
const remainingSeconds = totalSeconds % 60;
|
|
77212
77339
|
return remainingSeconds > 0 ? `${minutes}m${remainingSeconds}s` : `${minutes}m`;
|
|
77213
77340
|
}
|
|
77341
|
+
function useElapsedTime({
|
|
77342
|
+
startedAt,
|
|
77343
|
+
enabled,
|
|
77344
|
+
intervalMs = 1e3
|
|
77345
|
+
}) {
|
|
77346
|
+
const [elapsedMs, setElapsedMs] = reactExports.useState(() => {
|
|
77347
|
+
if (!enabled || !startedAt) return void 0;
|
|
77348
|
+
return Math.max(0, Date.now() - startedAt);
|
|
77349
|
+
});
|
|
77350
|
+
reactExports.useEffect(() => {
|
|
77351
|
+
if (!enabled || !startedAt) {
|
|
77352
|
+
setElapsedMs(void 0);
|
|
77353
|
+
return;
|
|
77354
|
+
}
|
|
77355
|
+
const update2 = () => {
|
|
77356
|
+
setElapsedMs(Math.max(0, Date.now() - startedAt));
|
|
77357
|
+
};
|
|
77358
|
+
update2();
|
|
77359
|
+
const timer2 = window.setInterval(update2, intervalMs);
|
|
77360
|
+
return () => window.clearInterval(timer2);
|
|
77361
|
+
}, [enabled, startedAt, intervalMs]);
|
|
77362
|
+
return elapsedMs;
|
|
77363
|
+
}
|
|
77214
77364
|
function useRuntimeMetricsVisibility() {
|
|
77215
77365
|
return !useIsMobile();
|
|
77216
77366
|
}
|
|
@@ -77561,6 +77711,11 @@ function unwrapTaskResult(raw) {
|
|
|
77561
77711
|
}
|
|
77562
77712
|
return obj;
|
|
77563
77713
|
}
|
|
77714
|
+
function stabilizeStreamingSummary(previous2, next2) {
|
|
77715
|
+
if (!next2) return previous2;
|
|
77716
|
+
if (!previous2) return next2;
|
|
77717
|
+
return next2.length >= previous2.length ? next2 : previous2;
|
|
77718
|
+
}
|
|
77564
77719
|
function renderWaitTaskArgLinks(taskIds) {
|
|
77565
77720
|
if (taskIds.length === 0) return null;
|
|
77566
77721
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Z.section, children: [
|
|
@@ -77570,6 +77725,7 @@ function renderWaitTaskArgLinks(taskIds) {
|
|
|
77570
77725
|
}
|
|
77571
77726
|
function arePropsEqual(prev2, next2) {
|
|
77572
77727
|
if (prev2.variant !== next2.variant) return false;
|
|
77728
|
+
if (prev2.isOutputStreaming !== next2.isOutputStreaming) return false;
|
|
77573
77729
|
const p2 = prev2.toolCall;
|
|
77574
77730
|
const n2 = next2.toolCall;
|
|
77575
77731
|
return p2.id === n2.id && p2.name === n2.name && p2.status === n2.status && p2.result === n2.result && p2.error === n2.error && p2.args === n2.args && p2.startedAt === n2.startedAt && p2.endedAt === n2.endedAt && p2.durationMs === n2.durationMs;
|
|
@@ -77617,18 +77773,18 @@ function GenerateImageResult({ result }) {
|
|
|
77617
77773
|
)
|
|
77618
77774
|
] });
|
|
77619
77775
|
}
|
|
77620
|
-
const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, variant = "default" }) {
|
|
77776
|
+
const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, variant = "default", isOutputStreaming = false }) {
|
|
77621
77777
|
const { t: t2 } = useTranslation();
|
|
77622
77778
|
const { theme } = useTheme();
|
|
77623
77779
|
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
77624
77780
|
const [showDiff, setShowDiff] = reactExports.useState(true);
|
|
77625
77781
|
const [pathCopied, setPathCopied] = reactExports.useState(false);
|
|
77626
|
-
const isPatchTool = toolCall.name === "applyPatch" || toolCall.name === "patch";
|
|
77627
77782
|
const diff = toolCall.status === "success" ? extractDiff(toolCall.name, toolCall.result) : null;
|
|
77628
77783
|
const isWaitTaskResult = toolCall.name === "waitTask" && toolCall.status === "success" && !!toolCall.result?.results;
|
|
77629
77784
|
const waitTaskResults = isWaitTaskResult ? toolCall.result.results : null;
|
|
77630
77785
|
const shouldAutoExpandWaitTask = !!waitTaskResults && waitTaskResults.length > 1;
|
|
77631
77786
|
const isSendFileWithAttachment = toolCall.name === "sendFile" && toolCall.status === "success" && typeof toolCall.result === "object" && !!toolCall.result?.attachment;
|
|
77787
|
+
const canExpand = toolCall.status !== "pending";
|
|
77632
77788
|
const autoExpand = !!diff || shouldAutoExpandWaitTask || isSendFileWithAttachment;
|
|
77633
77789
|
const [isExpanded, setIsExpanded] = reactExports.useState(autoExpand);
|
|
77634
77790
|
const hasAutoExpandedRef = reactExports.useRef(autoExpand);
|
|
@@ -77638,6 +77794,11 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77638
77794
|
hasAutoExpandedRef.current = true;
|
|
77639
77795
|
}
|
|
77640
77796
|
}, [autoExpand]);
|
|
77797
|
+
reactExports.useEffect(() => {
|
|
77798
|
+
if (!canExpand) {
|
|
77799
|
+
setIsExpanded(false);
|
|
77800
|
+
}
|
|
77801
|
+
}, [canExpand]);
|
|
77641
77802
|
const statusIcon2 = (() => {
|
|
77642
77803
|
const color2 = toolCall.status === "success" ? "var(--color-success)" : toolCall.status === "error" ? "var(--color-error)" : "var(--text-tertiary)";
|
|
77643
77804
|
const cls = toolCall.status === "pending" ? styles$Z.spinning : void 0;
|
|
@@ -77657,25 +77818,25 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77657
77818
|
}[toolCall.status];
|
|
77658
77819
|
const ToolIcon = toolIconMap[toolCall.name] || Wrench;
|
|
77659
77820
|
const computedArgSummary = getToolArgSummary(toolCall.name, toolCall.args);
|
|
77660
|
-
const
|
|
77661
|
-
const
|
|
77662
|
-
|
|
77663
|
-
|
|
77664
|
-
|
|
77665
|
-
|
|
77666
|
-
|
|
77667
|
-
|
|
77668
|
-
|
|
77669
|
-
|
|
77670
|
-
|
|
77671
|
-
|
|
77672
|
-
|
|
77673
|
-
|
|
77674
|
-
|
|
77675
|
-
|
|
77676
|
-
|
|
77677
|
-
|
|
77678
|
-
|
|
77821
|
+
const stableArgSummaryRef = reactExports.useRef(computedArgSummary ?? null);
|
|
77822
|
+
const stableArgSummaryToolCallIdRef = reactExports.useRef(toolCall.id);
|
|
77823
|
+
const shouldStabilizeArgSummary = toolCall.status === "pending";
|
|
77824
|
+
const displayedArgSummary = reactExports.useMemo(() => {
|
|
77825
|
+
if (stableArgSummaryToolCallIdRef.current !== toolCall.id) {
|
|
77826
|
+
return computedArgSummary;
|
|
77827
|
+
}
|
|
77828
|
+
if (!shouldStabilizeArgSummary) {
|
|
77829
|
+
return computedArgSummary;
|
|
77830
|
+
}
|
|
77831
|
+
return stabilizeStreamingSummary(
|
|
77832
|
+
stableArgSummaryRef.current,
|
|
77833
|
+
computedArgSummary ?? null
|
|
77834
|
+
);
|
|
77835
|
+
}, [toolCall.id, computedArgSummary, shouldStabilizeArgSummary]);
|
|
77836
|
+
reactExports.useLayoutEffect(() => {
|
|
77837
|
+
stableArgSummaryToolCallIdRef.current = toolCall.id;
|
|
77838
|
+
stableArgSummaryRef.current = displayedArgSummary ?? null;
|
|
77839
|
+
}, [toolCall.id, displayedArgSummary]);
|
|
77679
77840
|
const argTooltip = reactExports.useMemo(() => {
|
|
77680
77841
|
return displayedArgSummary ? getFullArgText(toolCall.name, toolCall.args) ?? displayedArgSummary : null;
|
|
77681
77842
|
}, [toolCall.name, toolCall.args, displayedArgSummary]);
|
|
@@ -77695,7 +77856,11 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77695
77856
|
window.setTimeout(() => setPathCopied(false), 1500);
|
|
77696
77857
|
};
|
|
77697
77858
|
const readContent = toolCall.status === "success" ? extractReadContent(toolCall.result) : null;
|
|
77698
|
-
const
|
|
77859
|
+
const runningElapsedMs = useElapsedTime({
|
|
77860
|
+
startedAt: toolCall.startedAt,
|
|
77861
|
+
enabled: showRuntimeMetrics && toolCall.status === "pending"
|
|
77862
|
+
});
|
|
77863
|
+
const durationMs = toolCall.status === "pending" ? runningElapsedMs : toolCall.durationMs ?? (toolCall.startedAt && toolCall.endedAt ? toolCall.endedAt - toolCall.startedAt : void 0);
|
|
77699
77864
|
const duration2 = showRuntimeMetrics && durationMs != null ? formatDurationMs(durationMs) : null;
|
|
77700
77865
|
const readFilePath = toolCall.name === "readFile" || toolCall.name === "read" ? getToolArgSummary(toolCall.name, toolCall.args) : null;
|
|
77701
77866
|
const readLanguage = getReadFileLanguage(readFilePath);
|
|
@@ -77705,8 +77870,9 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
77705
77870
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$Z.card, styles$Z[toolCall.status], variant === "embedded" && styles$Z.embedded), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
77706
77871
|
Collapse,
|
|
77707
77872
|
{
|
|
77708
|
-
expanded: isExpanded,
|
|
77873
|
+
expanded: canExpand && isExpanded,
|
|
77709
77874
|
onToggle: () => setIsExpanded((v2) => !v2),
|
|
77875
|
+
collapsible: canExpand,
|
|
77710
77876
|
className: styles$Z.collapse,
|
|
77711
77877
|
header: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
77712
77878
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolIcon, { size: 14, className: styles$Z.toolIcon }),
|
|
@@ -77843,29 +78009,6 @@ const styles$Y = {
|
|
|
77843
78009
|
dots: dots$1,
|
|
77844
78010
|
text
|
|
77845
78011
|
};
|
|
77846
|
-
function useElapsedTime({
|
|
77847
|
-
startedAt,
|
|
77848
|
-
enabled,
|
|
77849
|
-
intervalMs = 1e3
|
|
77850
|
-
}) {
|
|
77851
|
-
const [elapsedMs, setElapsedMs] = reactExports.useState(() => {
|
|
77852
|
-
if (!enabled || !startedAt) return void 0;
|
|
77853
|
-
return Math.max(0, Date.now() - startedAt);
|
|
77854
|
-
});
|
|
77855
|
-
reactExports.useEffect(() => {
|
|
77856
|
-
if (!enabled || !startedAt) {
|
|
77857
|
-
setElapsedMs(void 0);
|
|
77858
|
-
return;
|
|
77859
|
-
}
|
|
77860
|
-
const update2 = () => {
|
|
77861
|
-
setElapsedMs(Math.max(0, Date.now() - startedAt));
|
|
77862
|
-
};
|
|
77863
|
-
update2();
|
|
77864
|
-
const timer2 = window.setInterval(update2, intervalMs);
|
|
77865
|
-
return () => window.clearInterval(timer2);
|
|
77866
|
-
}, [enabled, startedAt, intervalMs]);
|
|
77867
|
-
return elapsedMs;
|
|
77868
|
-
}
|
|
77869
78012
|
const ReasoningBlock = reactExports.memo(function ReasoningBlock2({ content: content2, isStreaming, variant = "default", startedAt, durationMs }) {
|
|
77870
78013
|
const { t: t2 } = useTranslation();
|
|
77871
78014
|
const showRuntimeMetrics = useRuntimeMetricsVisibility();
|
|
@@ -78453,70 +78596,70 @@ function TabBlocksRenderer({ blocks, agentId }) {
|
|
|
78453
78596
|
isUser: false
|
|
78454
78597
|
} });
|
|
78455
78598
|
}
|
|
78456
|
-
const message$4 = "
|
|
78457
|
-
const fullWidth = "
|
|
78458
|
-
const user = "
|
|
78459
|
-
const agent$2 = "
|
|
78460
|
-
const groupLayout = "
|
|
78461
|
-
const agentShellCompact = "
|
|
78462
|
-
const avatarCol$1 = "
|
|
78463
|
-
const senderHeader = "
|
|
78464
|
-
const contentCol = "
|
|
78465
|
-
const senderLabel = "
|
|
78466
|
-
const senderName = "
|
|
78467
|
-
const bubble = "
|
|
78468
|
-
const hasUsage = "
|
|
78469
|
-
const embeddedBubble = "
|
|
78470
|
-
const textBubble = "
|
|
78471
|
-
const textSection = "
|
|
78472
|
-
const embeddedBubbleContent = "
|
|
78473
|
-
const content$8 = "
|
|
78474
|
-
const messageFooter = "
|
|
78475
|
-
const groupMetaFooter = "
|
|
78476
|
-
const messageFooterActions = "
|
|
78477
|
-
const timestamp = "
|
|
78478
|
-
const copyButton$1 = "
|
|
78479
|
-
const errorBlock = "
|
|
78480
|
-
const errorHeader = "
|
|
78481
|
-
const errorType = "
|
|
78482
|
-
const errorMessage$1 = "
|
|
78483
|
-
const errorDetails = "
|
|
78484
|
-
const errorDetailsSummary = "
|
|
78485
|
-
const errorDetailsSummaryRow = "
|
|
78486
|
-
const errorDetailsCopyButton = "
|
|
78487
|
-
const errorDetailsContent = "
|
|
78488
|
-
const collapsedContent = "
|
|
78489
|
-
const expandedContent = "
|
|
78490
|
-
const conclusionStrip = "
|
|
78491
|
-
const conclusionLabel = "
|
|
78492
|
-
const conclusionText = "
|
|
78493
|
-
const expandButton$1 = "
|
|
78494
|
-
const messageMetrics = "
|
|
78495
|
-
const embeddedMessageMetrics = "
|
|
78496
|
-
const fallbackTransitionBanner = "
|
|
78497
|
-
const messageMetricsPrimary = "
|
|
78498
|
-
const embeddedMessageMetricsPrimary = "
|
|
78499
|
-
const messageMetricsMeta = "
|
|
78500
|
-
const metricsStreaming = "
|
|
78501
|
-
const fallbackTransitionIcon = "
|
|
78502
|
-
const fallbackTransitionText = "
|
|
78503
|
-
const tokenUsage = "
|
|
78504
|
-
const duration = "
|
|
78505
|
-
const modelLabel = "
|
|
78506
|
-
const modelLabelFallback = "
|
|
78507
|
-
const system = "
|
|
78508
|
-
const systemBubble = "
|
|
78509
|
-
const systemContent = "
|
|
78510
|
-
const loadingSpinner = "
|
|
78511
|
-
const supervisorTag = "
|
|
78512
|
-
const memoryWriteButton = "
|
|
78513
|
-
const statusArea = "
|
|
78514
|
-
const statusDot$1 = "
|
|
78515
|
-
const dot$2 = "
|
|
78516
|
-
const dotSending = "
|
|
78517
|
-
const dotError = "
|
|
78518
|
-
const retryButton = "
|
|
78519
|
-
const recallButton = "
|
|
78599
|
+
const message$4 = "_message_1lr2c_1";
|
|
78600
|
+
const fullWidth = "_fullWidth_1lr2c_8";
|
|
78601
|
+
const user = "_user_1lr2c_12";
|
|
78602
|
+
const agent$2 = "_agent_1lr2c_17";
|
|
78603
|
+
const groupLayout = "_groupLayout_1lr2c_25";
|
|
78604
|
+
const agentShellCompact = "_agentShellCompact_1lr2c_33";
|
|
78605
|
+
const avatarCol$1 = "_avatarCol_1lr2c_38";
|
|
78606
|
+
const senderHeader = "_senderHeader_1lr2c_52";
|
|
78607
|
+
const contentCol = "_contentCol_1lr2c_58";
|
|
78608
|
+
const senderLabel = "_senderLabel_1lr2c_79";
|
|
78609
|
+
const senderName = "_senderName_1lr2c_96";
|
|
78610
|
+
const bubble = "_bubble_1lr2c_102";
|
|
78611
|
+
const hasUsage = "_hasUsage_1lr2c_128";
|
|
78612
|
+
const embeddedBubble = "_embeddedBubble_1lr2c_132";
|
|
78613
|
+
const textBubble = "_textBubble_1lr2c_138";
|
|
78614
|
+
const textSection = "_textSection_1lr2c_154";
|
|
78615
|
+
const embeddedBubbleContent = "_embeddedBubbleContent_1lr2c_173";
|
|
78616
|
+
const content$8 = "_content_1lr2c_58";
|
|
78617
|
+
const messageFooter = "_messageFooter_1lr2c_199";
|
|
78618
|
+
const groupMetaFooter = "_groupMetaFooter_1lr2c_207";
|
|
78619
|
+
const messageFooterActions = "_messageFooterActions_1lr2c_233";
|
|
78620
|
+
const timestamp = "_timestamp_1lr2c_245";
|
|
78621
|
+
const copyButton$1 = "_copyButton_1lr2c_256";
|
|
78622
|
+
const errorBlock = "_errorBlock_1lr2c_285";
|
|
78623
|
+
const errorHeader = "_errorHeader_1lr2c_293";
|
|
78624
|
+
const errorType = "_errorType_1lr2c_301";
|
|
78625
|
+
const errorMessage$1 = "_errorMessage_1lr2c_306";
|
|
78626
|
+
const errorDetails = "_errorDetails_1lr2c_312";
|
|
78627
|
+
const errorDetailsSummary = "_errorDetailsSummary_1lr2c_318";
|
|
78628
|
+
const errorDetailsSummaryRow = "_errorDetailsSummaryRow_1lr2c_326";
|
|
78629
|
+
const errorDetailsCopyButton = "_errorDetailsCopyButton_1lr2c_333";
|
|
78630
|
+
const errorDetailsContent = "_errorDetailsContent_1lr2c_355";
|
|
78631
|
+
const collapsedContent = "_collapsedContent_1lr2c_368";
|
|
78632
|
+
const expandedContent = "_expandedContent_1lr2c_386";
|
|
78633
|
+
const conclusionStrip = "_conclusionStrip_1lr2c_391";
|
|
78634
|
+
const conclusionLabel = "_conclusionLabel_1lr2c_405";
|
|
78635
|
+
const conclusionText = "_conclusionText_1lr2c_413";
|
|
78636
|
+
const expandButton$1 = "_expandButton_1lr2c_419";
|
|
78637
|
+
const messageMetrics = "_messageMetrics_1lr2c_446";
|
|
78638
|
+
const embeddedMessageMetrics = "_embeddedMessageMetrics_1lr2c_461";
|
|
78639
|
+
const fallbackTransitionBanner = "_fallbackTransitionBanner_1lr2c_474";
|
|
78640
|
+
const messageMetricsPrimary = "_messageMetricsPrimary_1lr2c_478";
|
|
78641
|
+
const embeddedMessageMetricsPrimary = "_embeddedMessageMetricsPrimary_1lr2c_486";
|
|
78642
|
+
const messageMetricsMeta = "_messageMetricsMeta_1lr2c_491";
|
|
78643
|
+
const metricsStreaming = "_metricsStreaming_1lr2c_519";
|
|
78644
|
+
const fallbackTransitionIcon = "_fallbackTransitionIcon_1lr2c_551";
|
|
78645
|
+
const fallbackTransitionText = "_fallbackTransitionText_1lr2c_556";
|
|
78646
|
+
const tokenUsage = "_tokenUsage_1lr2c_573";
|
|
78647
|
+
const duration = "_duration_1lr2c_582";
|
|
78648
|
+
const modelLabel = "_modelLabel_1lr2c_592";
|
|
78649
|
+
const modelLabelFallback = "_modelLabelFallback_1lr2c_602";
|
|
78650
|
+
const system = "_system_1lr2c_614";
|
|
78651
|
+
const systemBubble = "_systemBubble_1lr2c_621";
|
|
78652
|
+
const systemContent = "_systemContent_1lr2c_633";
|
|
78653
|
+
const loadingSpinner = "_loadingSpinner_1lr2c_640";
|
|
78654
|
+
const supervisorTag = "_supervisorTag_1lr2c_656";
|
|
78655
|
+
const memoryWriteButton = "_memoryWriteButton_1lr2c_690";
|
|
78656
|
+
const statusArea = "_statusArea_1lr2c_697";
|
|
78657
|
+
const statusDot$1 = "_statusDot_1lr2c_705";
|
|
78658
|
+
const dot$2 = "_dot_1lr2c_714";
|
|
78659
|
+
const dotSending = "_dotSending_1lr2c_722";
|
|
78660
|
+
const dotError = "_dotError_1lr2c_726";
|
|
78661
|
+
const retryButton = "_retryButton_1lr2c_731";
|
|
78662
|
+
const recallButton = "_recallButton_1lr2c_741";
|
|
78520
78663
|
const styles$S = {
|
|
78521
78664
|
message: message$4,
|
|
78522
78665
|
fullWidth,
|
|
@@ -78619,7 +78762,8 @@ function renderNonTextBlock(block, index2, context, variant) {
|
|
|
78619
78762
|
ToolCallCard,
|
|
78620
78763
|
{
|
|
78621
78764
|
toolCall: block.toolCall,
|
|
78622
|
-
variant: variant === "embedded" ? "embedded" : "default"
|
|
78765
|
+
variant: variant === "embedded" ? "embedded" : "default",
|
|
78766
|
+
isOutputStreaming: isMessageStreaming(context.message)
|
|
78623
78767
|
},
|
|
78624
78768
|
block.toolCall.id
|
|
78625
78769
|
) : null;
|
|
@@ -78947,7 +79091,9 @@ const MessageBubble = reactExports.memo(reactExports.forwardRef(function Message
|
|
|
78947
79091
|
return extractConclusion(textContent);
|
|
78948
79092
|
}, [isCollapsed, isUser, textContent]);
|
|
78949
79093
|
const isEmbedded = variant === "embedded";
|
|
78950
|
-
const
|
|
79094
|
+
const messageStreaming = isMessageStreaming(message2);
|
|
79095
|
+
const messageFailed = isMessageFailed(message2);
|
|
79096
|
+
const showToolLoading = messageStreaming && message2.senderRole === "agent" && isLastAgentMessage && sending;
|
|
78951
79097
|
const blockContext = reactExports.useMemo(() => ({ message: message2, isUser }), [message2, isUser]);
|
|
78952
79098
|
const blockVariant = isEmbedded ? "embedded" : "default";
|
|
78953
79099
|
const runMetrics = useMessageStore(
|
|
@@ -78975,8 +79121,8 @@ const MessageBubble = reactExports.memo(reactExports.forwardRef(function Message
|
|
|
78975
79121
|
}, [runMetrics?.startedAt]);
|
|
78976
79122
|
const displayModel = runMetrics?.model ?? message2.model;
|
|
78977
79123
|
const displayUsage = runMetrics?.usage ?? message2.usage;
|
|
78978
|
-
const fallbackTransition =
|
|
78979
|
-
const displayDurationMs =
|
|
79124
|
+
const fallbackTransition = messageStreaming ? runMetrics?.fallbackTransition : void 0;
|
|
79125
|
+
const displayDurationMs = messageStreaming && runMetrics ? elapsedMs : message2.durationMs;
|
|
78980
79126
|
const hasMetrics = showRuntimeMetrics && !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
78981
79127
|
const embeddedRuntimeStatusVisible = embedRuntimeStatusInBubble && (showToolLoading || !!fallbackTransition);
|
|
78982
79128
|
const bubbleHasMetrics = !isEmbedded ? hasMetrics : embeddedRuntimeStatusVisible;
|
|
@@ -79003,7 +79149,7 @@ const MessageBubble = reactExports.memo(reactExports.forwardRef(function Message
|
|
|
79003
79149
|
variant: blockVariant
|
|
79004
79150
|
}
|
|
79005
79151
|
),
|
|
79006
|
-
message2.error && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageErrorBlock, { error: message2.error })
|
|
79152
|
+
messageFailed && message2.error && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageErrorBlock, { error: message2.error })
|
|
79007
79153
|
] }),
|
|
79008
79154
|
isCollapsed && conclusion && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$S.conclusionStrip, children: [
|
|
79009
79155
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.conclusionLabel, children: "💡" }),
|
|
@@ -79099,13 +79245,24 @@ function ModelLabel({ model, fallback: fallback2 }) {
|
|
|
79099
79245
|
const shortName = shortModelName(model);
|
|
79100
79246
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: model, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx(styles$S.modelLabel, fallback2 ? styles$S.modelLabelFallback : ""), children: shortName }) });
|
|
79101
79247
|
}
|
|
79248
|
+
function formatTokenCount(n2) {
|
|
79249
|
+
if (!n2) return "0";
|
|
79250
|
+
if (n2 >= 1e6) return `${parseFloat((n2 / 1e6).toFixed(1))}M`;
|
|
79251
|
+
if (n2 >= 1e3) return `${parseFloat((n2 / 1e3).toFixed(1))}K`;
|
|
79252
|
+
return String(n2);
|
|
79253
|
+
}
|
|
79102
79254
|
function TokenUsage({ usage }) {
|
|
79103
79255
|
const { t: t2 } = useTranslation();
|
|
79104
|
-
const
|
|
79105
|
-
|
|
79106
|
-
|
|
79256
|
+
const cached = usage.cachedInputTokens;
|
|
79257
|
+
const tooltip = cached ? t2("message.tokenUsageWithCache", {
|
|
79258
|
+
input: formatTokenCount(usage.inputTokens),
|
|
79259
|
+
output: formatTokenCount(usage.outputTokens),
|
|
79260
|
+
cached: formatTokenCount(cached)
|
|
79261
|
+
}) : t2("message.tokenUsage", {
|
|
79262
|
+
input: formatTokenCount(usage.inputTokens),
|
|
79263
|
+
output: formatTokenCount(usage.outputTokens)
|
|
79107
79264
|
});
|
|
79108
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.tokenUsage, children:
|
|
79265
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppTooltip, { content: tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.tokenUsage, children: formatTokenCount(usage.totalTokens) }) });
|
|
79109
79266
|
}
|
|
79110
79267
|
function Duration({ durationMs }) {
|
|
79111
79268
|
const text2 = formatDurationMs(durationMs);
|
|
@@ -79245,7 +79402,8 @@ const MessageItem = reactExports.memo(function MessageItem2({
|
|
|
79245
79402
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$S.systemContent, children: displayText })
|
|
79246
79403
|
] }) });
|
|
79247
79404
|
}
|
|
79248
|
-
|
|
79405
|
+
const messageFailed = isMessageFailed(message2);
|
|
79406
|
+
if (blocks.length === 0 && !(messageFailed && message2.error)) {
|
|
79249
79407
|
return null;
|
|
79250
79408
|
}
|
|
79251
79409
|
const displaySenderId = message2.senderId || "";
|
|
@@ -79368,7 +79526,9 @@ function AgentBlockMessage({
|
|
|
79368
79526
|
const displayModel = runMetrics?.model ?? message2.model;
|
|
79369
79527
|
const displayFallback = runMetrics?.fallback ?? message2.fallback;
|
|
79370
79528
|
const displayUsage = runMetrics?.usage ?? message2.usage;
|
|
79371
|
-
const
|
|
79529
|
+
const messageStreaming = isMessageStreaming(message2);
|
|
79530
|
+
const messageFailed = isMessageFailed(message2);
|
|
79531
|
+
const displayDurationMs = messageStreaming && runMetrics ? elapsedMs : message2.durationMs;
|
|
79372
79532
|
const showFooterMetrics = showRuntimeMetrics && !!(displayModel || displayUsage || displayDurationMs != null && !isNaN(displayDurationMs));
|
|
79373
79533
|
const [manuallyExpanded, setManuallyExpanded] = reactExports.useState(false);
|
|
79374
79534
|
const isExpanded = !autoCollapsed || manuallyExpanded;
|
|
@@ -79473,7 +79633,7 @@ function AgentBlockMessage({
|
|
|
79473
79633
|
embedRuntimeStatusInBubble: true,
|
|
79474
79634
|
onExpandChange: setManuallyExpanded
|
|
79475
79635
|
}
|
|
79476
|
-
) : message2.error ? /* @__PURE__ */ jsxRuntimeExports.jsx(MessageErrorBlock, { error: message2.error }) : null,
|
|
79636
|
+
) : messageFailed && message2.error ? /* @__PURE__ */ jsxRuntimeExports.jsx(MessageErrorBlock, { error: message2.error }) : null,
|
|
79477
79637
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$S.messageFooter, styles$S.groupMetaFooter), children: [
|
|
79478
79638
|
showFooterMetrics ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79479
79639
|
MessageMetrics,
|
|
@@ -79848,7 +80008,7 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
79848
80008
|
const agentIndices = [];
|
|
79849
80009
|
for (let i2 = 0; i2 < messages.length; i2++) {
|
|
79850
80010
|
const msg = messages[i2];
|
|
79851
|
-
if (msg.senderRole === "agent" && !(msg
|
|
80011
|
+
if (msg.senderRole === "agent" && !(isMessageStreaming(msg) && msg.blocks.length === 0)) {
|
|
79852
80012
|
agentIndices.push(i2);
|
|
79853
80013
|
}
|
|
79854
80014
|
}
|
|
@@ -80837,7 +80997,7 @@ function SessionTabItem({
|
|
|
80837
80997
|
const msgMap = s2.messagesMap.get(session2.id);
|
|
80838
80998
|
if (msgMap) {
|
|
80839
80999
|
for (const msg of msgMap.values()) {
|
|
80840
|
-
if (msg
|
|
81000
|
+
if (isMessageStreaming(msg)) return "streaming";
|
|
80841
81001
|
}
|
|
80842
81002
|
}
|
|
80843
81003
|
return "idle";
|
|
@@ -83343,7 +83503,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
83343
83503
|
const isDropdownOpen = showCommandDropdown || showMentionDropdown || showSupervisorMenu || showQuickReplyPicker;
|
|
83344
83504
|
useRepositionWhileOpen(isDropdownOpen, updateDropdownPosition, [input2, attachments.length, supervisionMode]);
|
|
83345
83505
|
const hasDraft = input2.trim().length > 0 || attachments.length > 0;
|
|
83346
|
-
const sendButtonActsAsStop = isLoading
|
|
83506
|
+
const sendButtonActsAsStop = Boolean(isLoading);
|
|
83347
83507
|
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: [
|
|
83348
83508
|
attachments.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$F.attachmentSection, children: attachments.map((file, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83349
83509
|
AttachmentItem,
|
|
@@ -83660,6 +83820,7 @@ function normalizeFallbackEntries(entries2) {
|
|
|
83660
83820
|
}));
|
|
83661
83821
|
}
|
|
83662
83822
|
function normalizeReasoningEffort(enableThinking, reasoningEffort) {
|
|
83823
|
+
if (reasoningEffort === "off" && enableThinking === true) return "medium";
|
|
83663
83824
|
if (reasoningEffort) return reasoningEffort;
|
|
83664
83825
|
return enableThinking === true ? "medium" : DEFAULT_REASONING_EFFORT;
|
|
83665
83826
|
}
|
|
@@ -84819,7 +84980,7 @@ const skill$1 = { "title": "Skills", "empty": "暂无 Skills", "add": "添加 Sk
|
|
|
84819
84980
|
const session$1 = { "openDir": "打开目录" };
|
|
84820
84981
|
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": "摘要响应为空" };
|
|
84821
84982
|
const network$1 = { "offline": "无网络连接" };
|
|
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}} 位成员待回复" };
|
|
84983
|
+
const message$3 = { "copy": "复制", "copied": "已复制", "errorDetails": "错误详情", "edit": "编辑", "regenerate": "重新生成", "delete": "删除", "confirmDelete": "确定删除此消息及之后的所有消息?", "contextCleared": "上下文已清理", "contextCompacted": "上下文已压缩", "imageLoadFailed": "图片加载失败", "openImageViewerHint": "点击打开图片查看器", "imageViewerHint": "双击图片切换大小,Ctrl/⌘ + 滚轮缩放,Esc 关闭", "imageLoadError": "图片加载失败", "copyImage": "复制图片", "imageCopied": "图片已复制", "imageCopyFailed": "图片复制失败", "closeImageViewer": "关闭图片查看器", "zoomInImage": "放大 (+)", "zoomOutImage": "缩小 (-)", "resetImageZoom": "适配窗口", "switchToCode": "切换到代码", "switchToPreview": "切换到预览", "preview": "预览", "previewHtml": "预览 HTML", "htmlPreviewTitle": "HTML 预览", "error": { "network": "网络错误", "rate_limit": "请求频率限制", "api_error": "API 错误", "unknown": "未知错误" }, "errorMessage": { "network": "网络连接出了点问题,请检查连接后再试。", "rateLimit": "系统现在有点忙,请稍后再试。", "rateLimitConcurrency": "系统现在有点忙,正在同时处理较多请求,请稍后再试。", "apiError": "模型服务暂时不可用,请稍后再试。", "unknown": "出了点问题,请稍后再试。" }, "fallback": { "transition": "当前模型繁忙,正在切换备用模型…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "请求繁忙", "timeout": "响应超时", "apiError": "服务暂时不可用", "contextOverflow": "上下文过长", "unknown": "未知原因" } }, "handoff": "协作转交", "broadcast": "协作咨询", "expand": "展开", "collapse": "收起", "lines": "行", "userMessage": "用户消息", "agentMessage": "{{name}} 的回复", "generating": "生成中", "sending": "发送中", "waiting": "等待处理", "sendFailed": "发送失败", "retrySend": "重试", "recall": "撤回", "tokenUsage": "输入:{{input}} | 输出:{{output}}", "tokenUsageWithCache": "输入:{{input}} | 输出:{{output}} | 缓存命中:{{cached}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "完成 {{completed}}/{{total}}", "broadcastStatusPending": "等待中", "broadcastStatusThinking": "思考中", "broadcastStatusStreaming": "回复中", "broadcastStatusDone": "已完成", "broadcastStatusFailed": "失败", "broadcastWaiting": "等待响应…", "broadcastNoContent": "无内容", "broadcastFailed": "响应失败", "broadcastComplete": "协作咨询已结束", "broadcastAllReplied": "所有成员都已回复", "taskAssign": "已发起协作任务", "taskAssignedTo": "已交给 {{name}} 处理", "taskDetail": "查看执行过程", "taskDetailCollapse": "收起执行过程", "taskEmpty": "暂无执行内容", "taskQueued": "排队中", "taskRunning": "进行中", "taskCompleted": "已完成", "taskFailed": "执行失败", "taskKilled": "已结束", "taskBackgroundQueued": "后台排队中", "taskBackgroundRunning": "后台运行中", "taskBackgroundCompleted": "后台完成", "taskBackgroundFailed": "后台失败", "taskBackgroundKilled": "后台结束", "broadcastWaitingMembers": "还有 {{count}} 位成员待回复" };
|
|
84823
84984
|
const channel$1 = { "primary": "主要", "healthy": "正常", "degraded": "缓慢", "unhealthy": "离线", "unknown": "未知", "switch": "切换到 {{name}}", "slow": "响应缓慢", "error": "连接异常", "viewStatus": "查看通道状态", "alertDegraded": "{{channel}} 响应缓慢", "alertUnhealthy": "{{channel}} 连接异常", "unknownChannel": "未知通道", "fallback": "备用模型", "fallbackSummary": "已配置 {{count}} 个", "fallbackEmpty": "暂无备用模型", "addFallback": "添加备用通道" };
|
|
84824
84985
|
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": "归档讨论" };
|
|
84825
84986
|
const mention$1 = { "allDesc": "通知所有成员" };
|
|
@@ -84917,7 +85078,7 @@ const skill = { "title": "Skills", "empty": "No Skills available", "add": "Add S
|
|
|
84917
85078
|
const session = { "openDir": "Open Directory" };
|
|
84918
85079
|
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" };
|
|
84919
85080
|
const network = { "offline": "No internet connection" };
|
|
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)" };
|
|
85081
|
+
const message$2 = { "copy": "Copy", "copied": "Copied", "errorDetails": "Error Details", "edit": "Edit", "regenerate": "Regenerate", "delete": "Delete", "confirmDelete": "Delete this message and all messages after it?", "contextCleared": "Context Cleared", "contextCompacted": "Context compacted", "imageLoadFailed": "Image load failed", "openImageViewerHint": "Click to open image viewer", "imageViewerHint": "Double-click to toggle size, Ctrl/⌘ + wheel to zoom, Esc to close", "imageLoadError": "Failed to load image", "copyImage": "Copy image", "imageCopied": "Image copied", "imageCopyFailed": "Failed to copy image", "closeImageViewer": "Close image viewer", "zoomInImage": "Zoom in (+)", "zoomOutImage": "Zoom out (-)", "resetImageZoom": "Fit to window", "switchToCode": "Switch to code", "switchToPreview": "Switch to preview", "preview": "Preview", "previewHtml": "Preview HTML", "htmlPreviewTitle": "HTML Preview", "error": { "network": "Network Error", "rate_limit": "Rate Limit", "api_error": "API Error", "unknown": "Unknown Error" }, "errorMessage": { "network": "There was a network problem. Please check your connection and try again.", "rateLimit": "The system is busy right now. Please try again in a moment.", "rateLimitConcurrency": "The system is busy handling too many requests at once. Please try again in a moment.", "apiError": "The model service is temporarily unavailable. Please try again later.", "unknown": "Something went wrong. Please try again later." }, "fallback": { "transition": "Current model is busy. Switching to a fallback model…", "tooltip": "{{from}} → {{to}} · {{reason}}", "reason": { "rateLimit": "busy", "timeout": "timed out", "apiError": "temporarily unavailable", "contextOverflow": "context too long", "unknown": "unknown reason" } }, "handoff": "Collaboration Handoff", "broadcast": "Shared Consultation", "expand": "Expand", "collapse": "Collapse", "lines": "lines", "userMessage": "User message", "agentMessage": "{{name}} reply", "generating": "Generating", "sending": "Sending", "waiting": "Waiting", "sendFailed": "Send failed", "retrySend": "Retry", "recall": "Recall", "tokenUsage": "Input: {{input}} | Output: {{output}}", "tokenUsageWithCache": "Input: {{input}} | Output: {{output}} | Cache hit: {{cached}}", "tokens": "tokens", "kTokens": "{{count}}K tokens", "mTokens": "{{count}}M tokens", "broadcastProgress": "{{completed}}/{{total}} completed", "broadcastStatusPending": "Pending", "broadcastStatusThinking": "Thinking", "broadcastStatusStreaming": "Streaming", "broadcastStatusDone": "Done", "broadcastStatusFailed": "Failed", "broadcastWaiting": "Waiting for response…", "broadcastNoContent": "No content", "broadcastFailed": "Response failed", "broadcastComplete": "Shared consultation finished", "broadcastAllReplied": "Everyone replied", "taskAssign": "Collaboration task started", "taskAssignedTo": "Assigned to {{name}}", "taskDetail": "View execution", "taskDetailCollapse": "Hide execution", "taskEmpty": "No execution content", "taskQueued": "Queued", "taskRunning": "In progress", "taskCompleted": "Completed", "taskFailed": "Execution failed", "taskKilled": "Ended", "taskBackgroundQueued": "Queued in background", "taskBackgroundRunning": "Running in background", "taskBackgroundCompleted": "Background complete", "taskBackgroundFailed": "Background failed", "taskBackgroundKilled": "Background ended", "broadcastWaitingMembers": "Waiting on {{count}} more member(s)" };
|
|
84921
85082
|
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" };
|
|
84922
85083
|
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" };
|
|
84923
85084
|
const mention = { "allDesc": "Notify all members" };
|
|
@@ -85066,7 +85227,7 @@ function buildAgentConfigPayload(form2, existingConfig) {
|
|
|
85066
85227
|
form2.maxTokens !== void 0 ? form2.maxTokens : existingConfig?.models.requestDefaults.maxTokens ?? null
|
|
85067
85228
|
);
|
|
85068
85229
|
const enableThinking = form2.enableThinking ?? existingConfig?.models.requestDefaults.enableThinking ?? true;
|
|
85069
|
-
const reasoningEffort = form2.reasoningEffort ?? existingConfig?.models.requestDefaults.reasoningEffort;
|
|
85230
|
+
const reasoningEffort = form2.reasoningEffort === "off" && enableThinking ? "medium" : form2.reasoningEffort ?? existingConfig?.models.requestDefaults.reasoningEffort;
|
|
85070
85231
|
const skillNames = form2.skillNames.length > 0 ? form2.skillNames : existingConfig?.capabilities.skillNames ?? [];
|
|
85071
85232
|
const mcpServerIds = form2.mcpServerIds.length > 0 ? form2.mcpServerIds : existingConfig?.capabilities.mcpServerIds ?? [];
|
|
85072
85233
|
const disabledTools = form2.disabledTools.length > 0 ? form2.disabledTools : existingConfig?.capabilities.disabledTools ?? [];
|
|
@@ -92551,34 +92712,34 @@ const FeedbackSection = reactExports.forwardRef(function FeedbackSection2(_2, re
|
|
|
92551
92712
|
] })
|
|
92552
92713
|
] });
|
|
92553
92714
|
});
|
|
92554
|
-
const panel = "
|
|
92555
|
-
const content$3 = "
|
|
92556
|
-
const feedbackTrigger = "
|
|
92557
|
-
const version$1 = "
|
|
92558
|
-
const copiedHint = "
|
|
92559
|
-
const updateRow = "
|
|
92560
|
-
const updateColumn = "
|
|
92561
|
-
const autoCheckRow = "
|
|
92562
|
-
const rightArea = "
|
|
92563
|
-
const updateAvailableBlock = "
|
|
92564
|
-
const updateAvailableHeader = "
|
|
92565
|
-
const newVersionLabel = "
|
|
92566
|
-
const updateNotesPreview = "
|
|
92567
|
-
const updateNotesTitle = "
|
|
92568
|
-
const updateNotesList = "
|
|
92569
|
-
const releaseNotesLink = "
|
|
92570
|
-
const metaLine = "
|
|
92571
|
-
const metaSuccess = "
|
|
92572
|
-
const metaError = "
|
|
92573
|
-
const releaseNotes = "
|
|
92574
|
-
const releaseTitle = "
|
|
92575
|
-
const section = "
|
|
92576
|
-
const sectionHeader = "
|
|
92577
|
-
const sectionBody = "
|
|
92578
|
-
const sectionBodyOpen = "
|
|
92579
|
-
const techStack = "
|
|
92580
|
-
const spinner$2 = "
|
|
92581
|
-
const metaUpdate = "
|
|
92715
|
+
const panel = "_panel_18zuy_1";
|
|
92716
|
+
const content$3 = "_content_18zuy_9";
|
|
92717
|
+
const feedbackTrigger = "_feedbackTrigger_18zuy_18";
|
|
92718
|
+
const version$1 = "_version_18zuy_39";
|
|
92719
|
+
const copiedHint = "_copiedHint_18zuy_68";
|
|
92720
|
+
const updateRow = "_updateRow_18zuy_74";
|
|
92721
|
+
const updateColumn = "_updateColumn_18zuy_81";
|
|
92722
|
+
const autoCheckRow = "_autoCheckRow_18zuy_87";
|
|
92723
|
+
const rightArea = "_rightArea_18zuy_100";
|
|
92724
|
+
const updateAvailableBlock = "_updateAvailableBlock_18zuy_110";
|
|
92725
|
+
const updateAvailableHeader = "_updateAvailableHeader_18zuy_119";
|
|
92726
|
+
const newVersionLabel = "_newVersionLabel_18zuy_126";
|
|
92727
|
+
const updateNotesPreview = "_updateNotesPreview_18zuy_134";
|
|
92728
|
+
const updateNotesTitle = "_updateNotesTitle_18zuy_142";
|
|
92729
|
+
const updateNotesList = "_updateNotesList_18zuy_149";
|
|
92730
|
+
const releaseNotesLink = "_releaseNotesLink_18zuy_163";
|
|
92731
|
+
const metaLine = "_metaLine_18zuy_178";
|
|
92732
|
+
const metaSuccess = "_metaSuccess_18zuy_185";
|
|
92733
|
+
const metaError = "_metaError_18zuy_189";
|
|
92734
|
+
const releaseNotes = "_releaseNotes_18zuy_163";
|
|
92735
|
+
const releaseTitle = "_releaseTitle_18zuy_205";
|
|
92736
|
+
const section = "_section_18zuy_212";
|
|
92737
|
+
const sectionHeader = "_sectionHeader_18zuy_219";
|
|
92738
|
+
const sectionBody = "_sectionBody_18zuy_239";
|
|
92739
|
+
const sectionBodyOpen = "_sectionBodyOpen_18zuy_245";
|
|
92740
|
+
const techStack = "_techStack_18zuy_253";
|
|
92741
|
+
const spinner$2 = "_spinner_18zuy_262";
|
|
92742
|
+
const metaUpdate = "_metaUpdate_18zuy_279";
|
|
92582
92743
|
const styles$e = {
|
|
92583
92744
|
panel,
|
|
92584
92745
|
content: content$3,
|
|
@@ -93014,43 +93175,50 @@ const useScheduledTaskStore = create$3((set2, get2) => ({
|
|
|
93014
93175
|
}
|
|
93015
93176
|
}
|
|
93016
93177
|
}));
|
|
93017
|
-
const container$7 = "
|
|
93018
|
-
const progress$1 = "
|
|
93019
|
-
const empty$3 = "
|
|
93020
|
-
const hint$1 = "
|
|
93021
|
-
const taskList = "
|
|
93022
|
-
const taskItem = "
|
|
93023
|
-
const disabled = "
|
|
93024
|
-
const taskHeader = "
|
|
93025
|
-
const taskName = "
|
|
93026
|
-
const taskMeta = "
|
|
93027
|
-
const typeTag = "
|
|
93028
|
-
const target = "
|
|
93029
|
-
const cronBadge = "
|
|
93030
|
-
const taskMessage = "
|
|
93031
|
-
const taskFooter = "
|
|
93032
|
-
const taskTime = "
|
|
93033
|
-
const taskActions = "
|
|
93034
|
-
const historyHeader = "
|
|
93035
|
-
const backButton = "
|
|
93036
|
-
const historyTitleBlock = "
|
|
93037
|
-
const historyLabel = "
|
|
93038
|
-
const executionList$1 = "
|
|
93039
|
-
const executionItem$1 = "
|
|
93040
|
-
const executionHeader$1 = "
|
|
93041
|
-
const executionSummary$1 = "
|
|
93042
|
-
const executionStatus = "
|
|
93043
|
-
const runningDot = "
|
|
93044
|
-
const executionTime$1 = "
|
|
93045
|
-
const executionDuration = "
|
|
93046
|
-
const expandButton = "
|
|
93047
|
-
const executionBlock = "
|
|
93048
|
-
const executionBlockTitle = "
|
|
93049
|
-
const outputText = "
|
|
93050
|
-
const errorText = "
|
|
93051
|
-
const dialog$1 = "
|
|
93052
|
-
const dialogContent = "
|
|
93053
|
-
const
|
|
93178
|
+
const container$7 = "_container_1b7uv_1";
|
|
93179
|
+
const progress$1 = "_progress_1b7uv_8";
|
|
93180
|
+
const empty$3 = "_empty_1b7uv_18";
|
|
93181
|
+
const hint$1 = "_hint_1b7uv_33";
|
|
93182
|
+
const taskList = "_taskList_1b7uv_41";
|
|
93183
|
+
const taskItem = "_taskItem_1b7uv_50";
|
|
93184
|
+
const disabled = "_disabled_1b7uv_72";
|
|
93185
|
+
const taskHeader = "_taskHeader_1b7uv_78";
|
|
93186
|
+
const taskName = "_taskName_1b7uv_85";
|
|
93187
|
+
const taskMeta = "_taskMeta_1b7uv_97";
|
|
93188
|
+
const typeTag = "_typeTag_1b7uv_106";
|
|
93189
|
+
const target = "_target_1b7uv_118";
|
|
93190
|
+
const cronBadge = "_cronBadge_1b7uv_127";
|
|
93191
|
+
const taskMessage = "_taskMessage_1b7uv_136";
|
|
93192
|
+
const taskFooter = "_taskFooter_1b7uv_147";
|
|
93193
|
+
const taskTime = "_taskTime_1b7uv_154";
|
|
93194
|
+
const taskActions = "_taskActions_1b7uv_159";
|
|
93195
|
+
const historyHeader = "_historyHeader_1b7uv_167";
|
|
93196
|
+
const backButton = "_backButton_1b7uv_176";
|
|
93197
|
+
const historyTitleBlock = "_historyTitleBlock_1b7uv_197";
|
|
93198
|
+
const historyLabel = "_historyLabel_1b7uv_201";
|
|
93199
|
+
const executionList$1 = "_executionList_1b7uv_217";
|
|
93200
|
+
const executionItem$1 = "_executionItem_1b7uv_226";
|
|
93201
|
+
const executionHeader$1 = "_executionHeader_1b7uv_233";
|
|
93202
|
+
const executionSummary$1 = "_executionSummary_1b7uv_240";
|
|
93203
|
+
const executionStatus = "_executionStatus_1b7uv_250";
|
|
93204
|
+
const runningDot = "_runningDot_1b7uv_275";
|
|
93205
|
+
const executionTime$1 = "_executionTime_1b7uv_283";
|
|
93206
|
+
const executionDuration = "_executionDuration_1b7uv_284";
|
|
93207
|
+
const expandButton = "_expandButton_1b7uv_288";
|
|
93208
|
+
const executionBlock = "_executionBlock_1b7uv_302";
|
|
93209
|
+
const executionBlockTitle = "_executionBlockTitle_1b7uv_306";
|
|
93210
|
+
const outputText = "_outputText_1b7uv_313";
|
|
93211
|
+
const errorText = "_errorText_1b7uv_314";
|
|
93212
|
+
const dialog$1 = "_dialog_1b7uv_351";
|
|
93213
|
+
const dialogContent = "_dialogContent_1b7uv_364";
|
|
93214
|
+
const taskSummary = "_taskSummary_1b7uv_387";
|
|
93215
|
+
const fieldGroup = "_fieldGroup_1b7uv_409";
|
|
93216
|
+
const fieldGroupCompact = "_fieldGroupCompact_1b7uv_421";
|
|
93217
|
+
const scheduleGrid = "_scheduleGrid_1b7uv_434";
|
|
93218
|
+
const targetGrid = "_targetGrid_1b7uv_440";
|
|
93219
|
+
const scheduleHint = "_scheduleHint_1b7uv_446";
|
|
93220
|
+
const legacyNotice = "_legacyNotice_1b7uv_455";
|
|
93221
|
+
const dialogActions = "_dialogActions_1b7uv_488";
|
|
93054
93222
|
const styles$d = {
|
|
93055
93223
|
container: container$7,
|
|
93056
93224
|
progress: progress$1,
|
|
@@ -93088,10 +93256,339 @@ const styles$d = {
|
|
|
93088
93256
|
errorText,
|
|
93089
93257
|
dialog: dialog$1,
|
|
93090
93258
|
dialogContent,
|
|
93259
|
+
taskSummary,
|
|
93260
|
+
fieldGroup,
|
|
93261
|
+
fieldGroupCompact,
|
|
93262
|
+
scheduleGrid,
|
|
93263
|
+
targetGrid,
|
|
93264
|
+
scheduleHint,
|
|
93265
|
+
legacyNotice,
|
|
93091
93266
|
dialogActions
|
|
93092
93267
|
};
|
|
93093
93268
|
const log$8 = createLogger("SchedulerPanel");
|
|
93094
|
-
|
|
93269
|
+
const DEFAULT_SCHEDULE = {
|
|
93270
|
+
kind: "daily",
|
|
93271
|
+
hour: "09",
|
|
93272
|
+
minute: "00",
|
|
93273
|
+
weekday: "1",
|
|
93274
|
+
monthDay: "1",
|
|
93275
|
+
customCron: "0 9 * * *"
|
|
93276
|
+
};
|
|
93277
|
+
const WEEKDAY_LABELS = ["日", "一", "二", "三", "四", "五", "六"];
|
|
93278
|
+
function formatSessionOption(session2) {
|
|
93279
|
+
return `${session2.title}${session2.isDefault ? " · 默认" : ""}${session2.status === "archived" ? " · 已归档" : ""}`;
|
|
93280
|
+
}
|
|
93281
|
+
function padTime(value2) {
|
|
93282
|
+
return String(value2).padStart(2, "0");
|
|
93283
|
+
}
|
|
93284
|
+
function parseCronExpression(cronExpression) {
|
|
93285
|
+
const parts = cronExpression.trim().split(/\s+/);
|
|
93286
|
+
if (parts.length !== 5) return { ...DEFAULT_SCHEDULE, kind: "custom", customCron: cronExpression };
|
|
93287
|
+
const [minute, hour, dayOfMonth, month, dayOfWeek] = parts;
|
|
93288
|
+
const minuteNumber = Number(minute);
|
|
93289
|
+
const hourNumber = Number(hour);
|
|
93290
|
+
const hasSimpleTime = Number.isInteger(minuteNumber) && Number.isInteger(hourNumber) && minuteNumber >= 0 && minuteNumber <= 59 && hourNumber >= 0 && hourNumber <= 23;
|
|
93291
|
+
if (!hasSimpleTime || month !== "*") {
|
|
93292
|
+
return { ...DEFAULT_SCHEDULE, kind: "custom", customCron: cronExpression };
|
|
93293
|
+
}
|
|
93294
|
+
const base = {
|
|
93295
|
+
...DEFAULT_SCHEDULE,
|
|
93296
|
+
hour: padTime(hourNumber),
|
|
93297
|
+
minute: padTime(minuteNumber),
|
|
93298
|
+
customCron: cronExpression
|
|
93299
|
+
};
|
|
93300
|
+
if (dayOfMonth === "*" && dayOfWeek === "*") return { ...base, kind: "daily" };
|
|
93301
|
+
if (dayOfMonth === "*" && dayOfWeek === "1-5") return { ...base, kind: "workday" };
|
|
93302
|
+
const weekdayNumber = Number(dayOfWeek);
|
|
93303
|
+
if (dayOfMonth === "*" && isPlainIntegerCronField(dayOfWeek) && weekdayNumber >= 0 && weekdayNumber <= 7) {
|
|
93304
|
+
return { ...base, kind: "weekly", weekday: String(weekdayNumber === 7 ? 0 : weekdayNumber) };
|
|
93305
|
+
}
|
|
93306
|
+
const monthDayNumber = Number(dayOfMonth);
|
|
93307
|
+
if (dayOfWeek === "*" && isPlainIntegerCronField(dayOfMonth) && monthDayNumber >= 1 && monthDayNumber <= 28) {
|
|
93308
|
+
return { ...base, kind: "monthly", monthDay: String(monthDayNumber) };
|
|
93309
|
+
}
|
|
93310
|
+
return { ...base, kind: "custom" };
|
|
93311
|
+
}
|
|
93312
|
+
function isPlainIntegerCronField(field2) {
|
|
93313
|
+
return /^\d+$/.test(field2);
|
|
93314
|
+
}
|
|
93315
|
+
function buildCronExpression(schedule2) {
|
|
93316
|
+
if (schedule2.kind === "custom") return schedule2.customCron.trim();
|
|
93317
|
+
const hour = Math.min(23, Math.max(0, Number(schedule2.hour) || 0));
|
|
93318
|
+
const minute = Math.min(59, Math.max(0, Number(schedule2.minute) || 0));
|
|
93319
|
+
const time2 = `${minute} ${hour}`;
|
|
93320
|
+
if (schedule2.kind === "workday") return `${time2} * * 1-5`;
|
|
93321
|
+
if (schedule2.kind === "weekly") return `${time2} * * ${schedule2.weekday}`;
|
|
93322
|
+
if (schedule2.kind === "monthly") return `${time2} ${schedule2.monthDay} * *`;
|
|
93323
|
+
return `${time2} * * *`;
|
|
93324
|
+
}
|
|
93325
|
+
function describeCronExpression(cronExpression) {
|
|
93326
|
+
const schedule2 = parseCronExpression(cronExpression);
|
|
93327
|
+
const time2 = `${schedule2.hour}:${schedule2.minute}`;
|
|
93328
|
+
if (schedule2.kind === "daily") return `每天 ${time2}`;
|
|
93329
|
+
if (schedule2.kind === "workday") return `工作日 ${time2}`;
|
|
93330
|
+
if (schedule2.kind === "weekly") return `每周${WEEKDAY_LABELS[Number(schedule2.weekday)]} ${time2}`;
|
|
93331
|
+
if (schedule2.kind === "monthly") return `每月 ${schedule2.monthDay} 日 ${time2}`;
|
|
93332
|
+
return `自定义 Cron:${cronExpression}`;
|
|
93333
|
+
}
|
|
93334
|
+
function cronFieldMatches(field2, value2) {
|
|
93335
|
+
if (field2 === "*") return true;
|
|
93336
|
+
return field2.split(",").some((part) => {
|
|
93337
|
+
if (part.includes("-")) {
|
|
93338
|
+
const [start2, end] = part.split("-").map(Number);
|
|
93339
|
+
return Number.isInteger(start2) && Number.isInteger(end) && value2 >= start2 && value2 <= end;
|
|
93340
|
+
}
|
|
93341
|
+
const exact = Number(part);
|
|
93342
|
+
if (!Number.isInteger(exact)) return false;
|
|
93343
|
+
return exact === value2 || exact === 7 && value2 === 0;
|
|
93344
|
+
});
|
|
93345
|
+
}
|
|
93346
|
+
function matchesCron(cronExpression, date) {
|
|
93347
|
+
const parts = cronExpression.trim().split(/\s+/);
|
|
93348
|
+
if (parts.length !== 5) return false;
|
|
93349
|
+
const [minute, hour, dayOfMonth, month, dayOfWeek] = parts;
|
|
93350
|
+
return cronFieldMatches(minute, date.getMinutes()) && cronFieldMatches(hour, date.getHours()) && cronFieldMatches(dayOfMonth, date.getDate()) && cronFieldMatches(month, date.getMonth() + 1) && cronFieldMatches(dayOfWeek, date.getDay());
|
|
93351
|
+
}
|
|
93352
|
+
function getNextRunDate(cronExpression) {
|
|
93353
|
+
const current = /* @__PURE__ */ new Date();
|
|
93354
|
+
const cursor = new Date(current.getTime());
|
|
93355
|
+
cursor.setSeconds(0, 0);
|
|
93356
|
+
cursor.setMinutes(cursor.getMinutes() + 1);
|
|
93357
|
+
const maxChecks = 366 * 24 * 60;
|
|
93358
|
+
for (let i2 = 0; i2 < maxChecks; i2 += 1) {
|
|
93359
|
+
if (matchesCron(cronExpression, cursor)) return new Date(cursor);
|
|
93360
|
+
cursor.setMinutes(cursor.getMinutes() + 1);
|
|
93361
|
+
}
|
|
93362
|
+
return null;
|
|
93363
|
+
}
|
|
93364
|
+
function formatNextRun(cronExpression) {
|
|
93365
|
+
if (parseCronExpression(cronExpression).kind === "custom") return "自定义规则";
|
|
93366
|
+
const next2 = getNextRunDate(cronExpression);
|
|
93367
|
+
if (!next2) return "无法计算";
|
|
93368
|
+
const now2 = /* @__PURE__ */ new Date();
|
|
93369
|
+
const tomorrow = new Date(now2);
|
|
93370
|
+
tomorrow.setDate(now2.getDate() + 1);
|
|
93371
|
+
const sameDay = next2.toDateString() === now2.toDateString();
|
|
93372
|
+
const nextDay = next2.toDateString() === tomorrow.toDateString();
|
|
93373
|
+
const time2 = `${padTime(next2.getHours())}:${padTime(next2.getMinutes())}`;
|
|
93374
|
+
if (sameDay) return `今天 ${time2}`;
|
|
93375
|
+
if (nextDay) return `明天 ${time2}`;
|
|
93376
|
+
return `${next2.toLocaleDateString()} ${time2}`;
|
|
93377
|
+
}
|
|
93378
|
+
function getDefaultOwnerId(type2, agents, groups, currentGroupContext) {
|
|
93379
|
+
if (type2 === "agent") return agents[0]?.id ?? "";
|
|
93380
|
+
return currentGroupContext?.groupId ?? groups[0]?.id ?? "";
|
|
93381
|
+
}
|
|
93382
|
+
function findPreferredSession(sessions, preferredSessionId) {
|
|
93383
|
+
if (preferredSessionId) {
|
|
93384
|
+
const preferred = sessions.find((session2) => session2.id === preferredSessionId);
|
|
93385
|
+
if (preferred) return preferred;
|
|
93386
|
+
}
|
|
93387
|
+
return sessions.find((session2) => session2.status !== "archived" && session2.isDefault) ?? sessions.find((session2) => session2.status !== "archived") ?? sessions[0];
|
|
93388
|
+
}
|
|
93389
|
+
function ScheduleEditor({
|
|
93390
|
+
idPrefix,
|
|
93391
|
+
value: value2,
|
|
93392
|
+
onChange
|
|
93393
|
+
}) {
|
|
93394
|
+
const cronExpression = buildCronExpression(value2);
|
|
93395
|
+
const nextRun = formatNextRun(cronExpression);
|
|
93396
|
+
const frequencyLabelId = `${idPrefix}-frequency-label`;
|
|
93397
|
+
const timeInputId = `${idPrefix}-time`;
|
|
93398
|
+
const customCronId = `${idPrefix}-custom-cron`;
|
|
93399
|
+
const weekdayLabelId = `${idPrefix}-weekday-label`;
|
|
93400
|
+
const monthDayLabelId = `${idPrefix}-month-day-label`;
|
|
93401
|
+
const update2 = (patch2) => {
|
|
93402
|
+
onChange({ ...value2, ...patch2 });
|
|
93403
|
+
};
|
|
93404
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroup, children: [
|
|
93405
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { children: "触发时间" }),
|
|
93406
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.scheduleGrid, children: [
|
|
93407
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93408
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: frequencyLabelId, children: "频率" }),
|
|
93409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
93410
|
+
Select,
|
|
93411
|
+
{
|
|
93412
|
+
value: value2.kind,
|
|
93413
|
+
onChange: (kind) => update2({ kind }),
|
|
93414
|
+
"aria-labelledby": frequencyLabelId,
|
|
93415
|
+
children: [
|
|
93416
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "daily", children: "每天" }),
|
|
93417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "workday", children: "工作日" }),
|
|
93418
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "weekly", children: "每周" }),
|
|
93419
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "monthly", children: "每月" }),
|
|
93420
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "custom", children: "自定义 Cron" })
|
|
93421
|
+
]
|
|
93422
|
+
}
|
|
93423
|
+
)
|
|
93424
|
+
] }),
|
|
93425
|
+
value2.kind !== "custom" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93426
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: timeInputId, children: "时间" }),
|
|
93427
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93428
|
+
"input",
|
|
93429
|
+
{
|
|
93430
|
+
id: timeInputId,
|
|
93431
|
+
type: "time",
|
|
93432
|
+
value: `${value2.hour}:${value2.minute}`,
|
|
93433
|
+
onChange: (event) => {
|
|
93434
|
+
const [hour, minute] = event.target.value.split(":");
|
|
93435
|
+
update2({ hour, minute });
|
|
93436
|
+
},
|
|
93437
|
+
required: true
|
|
93438
|
+
}
|
|
93439
|
+
)
|
|
93440
|
+
] })
|
|
93441
|
+
] }),
|
|
93442
|
+
value2.kind === "weekly" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93443
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: weekdayLabelId, children: "星期" }),
|
|
93444
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
93445
|
+
Select,
|
|
93446
|
+
{
|
|
93447
|
+
value: value2.weekday,
|
|
93448
|
+
onChange: (weekday) => update2({ weekday }),
|
|
93449
|
+
"aria-labelledby": weekdayLabelId,
|
|
93450
|
+
children: [
|
|
93451
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "1", children: "周一" }),
|
|
93452
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "2", children: "周二" }),
|
|
93453
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "3", children: "周三" }),
|
|
93454
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "4", children: "周四" }),
|
|
93455
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "5", children: "周五" }),
|
|
93456
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "6", children: "周六" }),
|
|
93457
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "0", children: "周日" })
|
|
93458
|
+
]
|
|
93459
|
+
}
|
|
93460
|
+
)
|
|
93461
|
+
] }),
|
|
93462
|
+
value2.kind === "monthly" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93463
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: monthDayLabelId, children: "日期" }),
|
|
93464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93465
|
+
Select,
|
|
93466
|
+
{
|
|
93467
|
+
value: value2.monthDay,
|
|
93468
|
+
onChange: (monthDay) => update2({ monthDay }),
|
|
93469
|
+
"aria-labelledby": monthDayLabelId,
|
|
93470
|
+
children: Array.from({ length: 28 }, (_2, index2) => String(index2 + 1)).map((day) => /* @__PURE__ */ jsxRuntimeExports.jsxs("option", { value: day, children: [
|
|
93471
|
+
"每月 ",
|
|
93472
|
+
day,
|
|
93473
|
+
" 日"
|
|
93474
|
+
] }, day))
|
|
93475
|
+
}
|
|
93476
|
+
)
|
|
93477
|
+
] }),
|
|
93478
|
+
value2.kind === "custom" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93479
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: customCronId, children: "Cron 表达式" }),
|
|
93480
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93481
|
+
"input",
|
|
93482
|
+
{
|
|
93483
|
+
id: customCronId,
|
|
93484
|
+
type: "text",
|
|
93485
|
+
value: value2.customCron,
|
|
93486
|
+
onChange: (event) => update2({ customCron: event.target.value }),
|
|
93487
|
+
placeholder: "15 22 * * *",
|
|
93488
|
+
required: true
|
|
93489
|
+
}
|
|
93490
|
+
)
|
|
93491
|
+
] }),
|
|
93492
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.scheduleHint, children: [
|
|
93493
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: value2.kind === "custom" ? describeCronExpression(cronExpression) : `生成:${cronExpression}` }),
|
|
93494
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
93495
|
+
"下一次运行:",
|
|
93496
|
+
nextRun
|
|
93497
|
+
] })
|
|
93498
|
+
] })
|
|
93499
|
+
] });
|
|
93500
|
+
}
|
|
93501
|
+
function TaskTargetEditor({
|
|
93502
|
+
idPrefix,
|
|
93503
|
+
value: value2,
|
|
93504
|
+
onChange,
|
|
93505
|
+
agents,
|
|
93506
|
+
groups,
|
|
93507
|
+
currentGroupContext
|
|
93508
|
+
}) {
|
|
93509
|
+
const typeLabelId = `${idPrefix}-target-type-label`;
|
|
93510
|
+
const ownerLabelId = `${idPrefix}-owner-label`;
|
|
93511
|
+
const sessionLabelId = `${idPrefix}-session-label`;
|
|
93512
|
+
const [sessions, setSessions] = reactExports.useState([]);
|
|
93513
|
+
const [loadingSessions, setLoadingSessions] = reactExports.useState(false);
|
|
93514
|
+
const updateType = (type2) => {
|
|
93515
|
+
const ownerId = getDefaultOwnerId(type2, agents, groups, currentGroupContext);
|
|
93516
|
+
onChange({ type: type2, ownerId, sessionId: "" });
|
|
93517
|
+
};
|
|
93518
|
+
const updateOwner = (ownerId) => {
|
|
93519
|
+
onChange({ ...value2, ownerId, sessionId: "" });
|
|
93520
|
+
};
|
|
93521
|
+
reactExports.useEffect(() => {
|
|
93522
|
+
let cancelled = false;
|
|
93523
|
+
if (!value2.ownerId) {
|
|
93524
|
+
setSessions([]);
|
|
93525
|
+
return;
|
|
93526
|
+
}
|
|
93527
|
+
setLoadingSessions(true);
|
|
93528
|
+
const load2 = value2.type === "agent" ? getTransport().listDirectSessions(value2.ownerId) : getTransport().listSessionsByGroupId(value2.ownerId);
|
|
93529
|
+
load2.then((result) => {
|
|
93530
|
+
if (cancelled) return;
|
|
93531
|
+
setSessions(result);
|
|
93532
|
+
if (!value2.sessionId) {
|
|
93533
|
+
const preferredSessionId = value2.type === "group" && currentGroupContext?.groupId === value2.ownerId ? currentGroupContext.sessionId : void 0;
|
|
93534
|
+
const preferred = findPreferredSession(result, preferredSessionId);
|
|
93535
|
+
if (preferred) onChange({ ...value2, sessionId: preferred.id });
|
|
93536
|
+
}
|
|
93537
|
+
}).catch(() => {
|
|
93538
|
+
if (!cancelled) setSessions([]);
|
|
93539
|
+
}).finally(() => {
|
|
93540
|
+
if (!cancelled) setLoadingSessions(false);
|
|
93541
|
+
});
|
|
93542
|
+
return () => {
|
|
93543
|
+
cancelled = true;
|
|
93544
|
+
};
|
|
93545
|
+
}, [onChange, value2.ownerId, value2.sessionId, value2.type]);
|
|
93546
|
+
reactExports.useEffect(() => {
|
|
93547
|
+
if (value2.ownerId) return;
|
|
93548
|
+
const fallbackOwnerId = value2.type === "agent" ? agents[0]?.id : currentGroupContext?.groupId ?? groups[0]?.id;
|
|
93549
|
+
if (fallbackOwnerId) updateOwner(fallbackOwnerId);
|
|
93550
|
+
}, [agents, currentGroupContext, groups, value2.ownerId, value2.type]);
|
|
93551
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroup, children: [
|
|
93552
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { children: "执行位置" }),
|
|
93553
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.targetGrid, children: [
|
|
93554
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93555
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: typeLabelId, children: "类型" }),
|
|
93556
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
93557
|
+
Select,
|
|
93558
|
+
{
|
|
93559
|
+
value: value2.type,
|
|
93560
|
+
onChange: (type2) => updateType(type2),
|
|
93561
|
+
"aria-labelledby": typeLabelId,
|
|
93562
|
+
children: [
|
|
93563
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "agent", children: "智能体" }),
|
|
93564
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "group", children: "群组" })
|
|
93565
|
+
]
|
|
93566
|
+
}
|
|
93567
|
+
)
|
|
93568
|
+
] }),
|
|
93569
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: ownerLabelId, children: value2.type === "agent" ? "智能体" : "群组" }),
|
|
93571
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Select, { value: value2.ownerId, onChange: updateOwner, "aria-labelledby": ownerLabelId, children: value2.type === "agent" ? agents.map((agent2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: agent2.id, children: agent2.name }, agent2.id)) : groups.map((group2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: group2.id, children: group2.name }, group2.id)) })
|
|
93572
|
+
] })
|
|
93573
|
+
] }),
|
|
93574
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroupCompact, children: [
|
|
93575
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: sessionLabelId, children: "Session" }),
|
|
93576
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93577
|
+
Select,
|
|
93578
|
+
{
|
|
93579
|
+
value: value2.sessionId,
|
|
93580
|
+
onChange: (sessionId) => onChange({ ...value2, sessionId }),
|
|
93581
|
+
"aria-labelledby": sessionLabelId,
|
|
93582
|
+
disabled: !value2.ownerId || loadingSessions || sessions.length === 0,
|
|
93583
|
+
placeholder: loadingSessions ? "加载 Session..." : "选择 Session",
|
|
93584
|
+
children: sessions.map((session2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: session2.id, children: formatSessionOption(session2) }, session2.id))
|
|
93585
|
+
}
|
|
93586
|
+
)
|
|
93587
|
+
] }),
|
|
93588
|
+
!value2.sessionId && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$d.scheduleHint, children: "请选择具体 Session,定时任务会发送到这里。" })
|
|
93589
|
+
] });
|
|
93590
|
+
}
|
|
93591
|
+
function SchedulerPanel({ sessionId }) {
|
|
93095
93592
|
const { t: t2 } = useTranslation();
|
|
93096
93593
|
const { showToast } = useToast();
|
|
93097
93594
|
const { tasks, loading: loading2, loadTasks, deleteTask, toggleTask, createTask, updateTask } = useScheduledTaskStore();
|
|
@@ -93101,13 +93598,20 @@ function SchedulerPanel({}) {
|
|
|
93101
93598
|
const [selectedTaskId, setSelectedTaskId] = reactExports.useState(null);
|
|
93102
93599
|
const [memoryUpdateProgress, setMemoryUpdateProgress] = reactExports.useState(null);
|
|
93103
93600
|
const [nameMap, setNameMap] = reactExports.useState({});
|
|
93601
|
+
const [agents, setAgents] = reactExports.useState([]);
|
|
93602
|
+
const [groups, setGroups] = reactExports.useState([]);
|
|
93603
|
+
const [currentGroupContext, setCurrentGroupContext] = reactExports.useState(null);
|
|
93104
93604
|
reactExports.useEffect(() => {
|
|
93105
93605
|
loadTasks();
|
|
93106
93606
|
Promise.all([
|
|
93107
|
-
getTransport().listAgents().catch(() => [])
|
|
93108
|
-
|
|
93607
|
+
getTransport().listAgents().catch(() => []),
|
|
93608
|
+
getTransport().listGroups().catch(() => [])
|
|
93609
|
+
]).then(([agents2, groups2]) => {
|
|
93109
93610
|
const map2 = {};
|
|
93110
|
-
for (const a2 of
|
|
93611
|
+
for (const a2 of agents2) map2[a2.id] = a2.name;
|
|
93612
|
+
for (const g2 of groups2) map2[g2.id] = g2.name;
|
|
93613
|
+
setAgents(agents2);
|
|
93614
|
+
setGroups(groups2);
|
|
93111
93615
|
setNameMap(map2);
|
|
93112
93616
|
});
|
|
93113
93617
|
let cancelled = false;
|
|
@@ -93128,22 +93632,69 @@ function SchedulerPanel({}) {
|
|
|
93128
93632
|
dispose?.();
|
|
93129
93633
|
};
|
|
93130
93634
|
}, [loadTasks]);
|
|
93131
|
-
const allTasks = tasks.filter((t22) => t22.type !== "memory-update");
|
|
93132
|
-
const selectedTask = selectedTaskId ? allTasks.find((task) => task.id === selectedTaskId) : null;
|
|
93133
93635
|
reactExports.useEffect(() => {
|
|
93134
|
-
|
|
93636
|
+
let cancelled = false;
|
|
93637
|
+
const loadCurrentGroupContext = async () => {
|
|
93638
|
+
if (!sessionId) {
|
|
93639
|
+
setCurrentGroupContext(null);
|
|
93640
|
+
return;
|
|
93641
|
+
}
|
|
93642
|
+
const session2 = await getTransport().getSession(sessionId).catch(() => null);
|
|
93643
|
+
const groupId = session2?.groupId ?? (session2?.owner?.type === "group" ? session2.owner.groupId : void 0);
|
|
93644
|
+
if (!session2 || !groupId) {
|
|
93645
|
+
if (!cancelled) setCurrentGroupContext(null);
|
|
93646
|
+
return;
|
|
93647
|
+
}
|
|
93648
|
+
const group2 = await getTransport().getGroup(groupId).catch(() => null);
|
|
93649
|
+
if (!cancelled) {
|
|
93650
|
+
setCurrentGroupContext({
|
|
93651
|
+
groupId,
|
|
93652
|
+
groupName: group2?.name || groupId,
|
|
93653
|
+
sessionId: session2.id,
|
|
93654
|
+
sessionName: session2.title
|
|
93655
|
+
});
|
|
93656
|
+
setNameMap((prev2) => ({
|
|
93657
|
+
...prev2,
|
|
93658
|
+
[groupId]: group2?.name || groupId,
|
|
93659
|
+
[session2.id]: session2.title
|
|
93660
|
+
}));
|
|
93661
|
+
}
|
|
93662
|
+
};
|
|
93663
|
+
void loadCurrentGroupContext();
|
|
93664
|
+
return () => {
|
|
93665
|
+
cancelled = true;
|
|
93666
|
+
};
|
|
93667
|
+
}, [sessionId]);
|
|
93668
|
+
const visibleTasks = reactExports.useMemo(
|
|
93669
|
+
() => tasks.filter((t22) => t22.type !== "memory-update" && t22.type !== "group-memory-update"),
|
|
93670
|
+
[tasks]
|
|
93671
|
+
);
|
|
93672
|
+
const selectedTask = selectedTaskId ? visibleTasks.find((task) => task.id === selectedTaskId) : null;
|
|
93673
|
+
reactExports.useEffect(() => {
|
|
93674
|
+
const groupTasks = visibleTasks.filter(
|
|
93135
93675
|
(t22) => t22.type === "group"
|
|
93136
93676
|
);
|
|
93677
|
+
const agentTasks = visibleTasks.filter(
|
|
93678
|
+
(t22) => t22.type === "agent"
|
|
93679
|
+
);
|
|
93137
93680
|
const missingGroupIds = groupTasks.map((t22) => t22.groupId).filter((id32) => !nameMap[id32]);
|
|
93138
|
-
const
|
|
93139
|
-
|
|
93681
|
+
const missingAgentIds = agentTasks.map((t22) => t22.agentId).filter((id32) => !nameMap[id32]);
|
|
93682
|
+
const missingGroupSessionIds = groupTasks.map((t22) => t22.sessionId).filter(Boolean).filter((id32) => !nameMap[id32]);
|
|
93683
|
+
const missingAgentSessionIds = agentTasks.map((t22) => t22.sessionId).filter(Boolean).filter((id32) => !nameMap[id32]);
|
|
93684
|
+
if (missingGroupIds.length === 0 && missingAgentIds.length === 0 && missingGroupSessionIds.length === 0 && missingAgentSessionIds.length === 0) return;
|
|
93140
93685
|
const fetchGroupNames = missingGroupIds.map(
|
|
93141
93686
|
(id32) => getTransport().getGroup(id32).then((g2) => g2 ? { id: id32, name: g2.name } : null).catch(() => null)
|
|
93142
93687
|
);
|
|
93143
|
-
const
|
|
93688
|
+
const fetchAgentNames = missingAgentIds.map(
|
|
93689
|
+
(id32) => getTransport().getAgent(id32).then((a2) => a2 ? { id: id32, name: a2.name } : null).catch(() => null)
|
|
93690
|
+
);
|
|
93691
|
+
const fetchGroupSessionNames = missingGroupSessionIds.map(
|
|
93144
93692
|
(id32) => getTransport().getSession(id32).then((t22) => t22 ? { id: t22.id, name: t22.title } : null).catch(() => null)
|
|
93145
93693
|
);
|
|
93146
|
-
|
|
93694
|
+
const fetchAgentSessionNames = missingAgentSessionIds.map(
|
|
93695
|
+
(id32) => getTransport().getDirectSession(id32).then((t22) => t22 ? { id: t22.id, name: t22.title } : null).catch(() => null)
|
|
93696
|
+
);
|
|
93697
|
+
Promise.all([...fetchGroupNames, ...fetchAgentNames, ...fetchGroupSessionNames, ...fetchAgentSessionNames]).then((results) => {
|
|
93147
93698
|
const additions = {};
|
|
93148
93699
|
for (const r2 of results) {
|
|
93149
93700
|
if (r2) additions[r2.id] = r2.name;
|
|
@@ -93152,7 +93703,7 @@ function SchedulerPanel({}) {
|
|
|
93152
93703
|
setNameMap((prev2) => ({ ...prev2, ...additions }));
|
|
93153
93704
|
}
|
|
93154
93705
|
});
|
|
93155
|
-
}, [
|
|
93706
|
+
}, [visibleTasks, nameMap]);
|
|
93156
93707
|
const handleToggle = async (taskId, enabled) => {
|
|
93157
93708
|
try {
|
|
93158
93709
|
await toggleTask(taskId, enabled);
|
|
@@ -93195,7 +93746,11 @@ function SchedulerPanel({}) {
|
|
|
93195
93746
|
};
|
|
93196
93747
|
const getTaskTarget = (task) => {
|
|
93197
93748
|
if (task.type === "memory-update") return t2("scheduler.allAgents");
|
|
93198
|
-
if (task.type === "agent")
|
|
93749
|
+
if (task.type === "agent") {
|
|
93750
|
+
const agentName2 = nameMap[task.agentId] || task.agentId;
|
|
93751
|
+
const sessionName = task.sessionId ? nameMap[task.sessionId] || task.sessionId : void 0;
|
|
93752
|
+
return sessionName && sessionName !== agentName2 ? `${agentName2} / ${sessionName}` : agentName2;
|
|
93753
|
+
}
|
|
93199
93754
|
if (task.type === "group") {
|
|
93200
93755
|
const groupName2 = nameMap[task.groupId] || task.groupId;
|
|
93201
93756
|
const sessionName = task.sessionId ? nameMap[task.sessionId] || task.sessionId : void 0;
|
|
@@ -93241,19 +93796,31 @@ function SchedulerPanel({}) {
|
|
|
93241
93796
|
")"
|
|
93242
93797
|
] })
|
|
93243
93798
|
] }),
|
|
93244
|
-
showCreateDialog && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93799
|
+
showCreateDialog && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93800
|
+
CreateTaskDialog,
|
|
93801
|
+
{
|
|
93802
|
+
currentGroupContext,
|
|
93803
|
+
agents,
|
|
93804
|
+
groups,
|
|
93805
|
+
onClose: () => setShowCreateDialog(false),
|
|
93806
|
+
onCreate: handleCreate
|
|
93807
|
+
}
|
|
93808
|
+
),
|
|
93245
93809
|
editingTask && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93246
93810
|
EditTaskDialog,
|
|
93247
93811
|
{
|
|
93248
93812
|
task: editingTask,
|
|
93813
|
+
agents,
|
|
93814
|
+
groups,
|
|
93815
|
+
currentGroupContext,
|
|
93249
93816
|
onClose: () => setEditingTask(null),
|
|
93250
93817
|
onSave: handleEdit
|
|
93251
93818
|
}
|
|
93252
93819
|
),
|
|
93253
|
-
|
|
93820
|
+
visibleTasks.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.empty, children: [
|
|
93254
93821
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: t2("scheduler.noTasks") }),
|
|
93255
93822
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: styles$d.hint, children: t2("scheduler.createFirst") })
|
|
93256
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$d.taskList, children:
|
|
93823
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$d.taskList, children: visibleTasks.map((task) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
93257
93824
|
"div",
|
|
93258
93825
|
{
|
|
93259
93826
|
role: "button",
|
|
@@ -93284,7 +93851,7 @@ function SchedulerPanel({}) {
|
|
|
93284
93851
|
] }),
|
|
93285
93852
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$d.cronBadge, children: [
|
|
93286
93853
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { size: 10, style: { marginRight: 3, verticalAlign: -1 } }),
|
|
93287
|
-
task.cronExpression
|
|
93854
|
+
describeCronExpression(task.cronExpression)
|
|
93288
93855
|
] }),
|
|
93289
93856
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$d.target, children: getTaskTarget(task) })
|
|
93290
93857
|
] }),
|
|
@@ -93299,6 +93866,11 @@ function SchedulerPanel({}) {
|
|
|
93299
93866
|
task.message
|
|
93300
93867
|
] }),
|
|
93301
93868
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.taskFooter, children: [
|
|
93869
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$d.taskTime, children: [
|
|
93870
|
+
t2("scheduler.nextRunAt"),
|
|
93871
|
+
": ",
|
|
93872
|
+
formatNextRun(task.cronExpression)
|
|
93873
|
+
] }),
|
|
93302
93874
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$d.taskTime, children: [
|
|
93303
93875
|
t2("scheduler.lastRunAt"),
|
|
93304
93876
|
": ",
|
|
@@ -93472,17 +94044,21 @@ function ExecutionHistoryView({
|
|
|
93472
94044
|
] });
|
|
93473
94045
|
}
|
|
93474
94046
|
function CreateTaskDialog({
|
|
94047
|
+
currentGroupContext,
|
|
94048
|
+
agents,
|
|
94049
|
+
groups,
|
|
93475
94050
|
onClose,
|
|
93476
94051
|
onCreate
|
|
93477
94052
|
}) {
|
|
93478
94053
|
const { t: t2 } = useTranslation();
|
|
93479
94054
|
const [name2, setName] = reactExports.useState("");
|
|
93480
|
-
const
|
|
93481
|
-
const [
|
|
93482
|
-
const [
|
|
93483
|
-
const [groupId, setGroupId] = reactExports.useState("");
|
|
93484
|
-
const [sessionId, setSessionId] = reactExports.useState("");
|
|
94055
|
+
const initialTarget = currentGroupContext ? { type: "group", ownerId: currentGroupContext.groupId, sessionId: currentGroupContext.sessionId ?? "" } : { type: "agent", ownerId: agents[0]?.id ?? "", sessionId: "" };
|
|
94056
|
+
const [schedule2, setSchedule] = reactExports.useState(DEFAULT_SCHEDULE);
|
|
94057
|
+
const [target2, setTarget] = reactExports.useState(initialTarget);
|
|
93485
94058
|
const [message2, setMessage] = reactExports.useState("");
|
|
94059
|
+
const cronExpression = buildCronExpression(schedule2);
|
|
94060
|
+
const nameInputId = "scheduler-create-name";
|
|
94061
|
+
const messageInputId = "scheduler-create-message";
|
|
93486
94062
|
reactExports.useEffect(() => {
|
|
93487
94063
|
const handleKeyDown = (e2) => {
|
|
93488
94064
|
if (e2.key === "Escape") onClose();
|
|
@@ -93492,90 +94068,65 @@ function CreateTaskDialog({
|
|
|
93492
94068
|
}, [onClose]);
|
|
93493
94069
|
const handleSubmit = (e2) => {
|
|
93494
94070
|
e2.preventDefault();
|
|
93495
|
-
if (
|
|
93496
|
-
|
|
93497
|
-
|
|
94071
|
+
if (!target2.ownerId || !target2.sessionId) {
|
|
94072
|
+
alert("请选择执行位置和 Session");
|
|
94073
|
+
return;
|
|
94074
|
+
}
|
|
94075
|
+
if (target2.type === "agent") {
|
|
94076
|
+
onCreate({ type: "agent", name: name2, cronExpression, enabled: true, agentId: target2.ownerId, sessionId: target2.sessionId, message: message2 });
|
|
94077
|
+
} else {
|
|
93498
94078
|
onCreate({
|
|
93499
94079
|
type: "group",
|
|
93500
94080
|
name: name2,
|
|
93501
94081
|
cronExpression,
|
|
93502
94082
|
enabled: true,
|
|
93503
|
-
groupId,
|
|
93504
|
-
sessionId: sessionId
|
|
94083
|
+
groupId: target2.ownerId,
|
|
94084
|
+
sessionId: target2.sessionId,
|
|
93505
94085
|
message: message2
|
|
93506
94086
|
});
|
|
93507
|
-
} else {
|
|
93508
|
-
onCreate({ type: "memory-update", name: name2, cronExpression, enabled: true });
|
|
93509
94087
|
}
|
|
93510
94088
|
};
|
|
93511
94089
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$d.dialog, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.dialogContent, children: [
|
|
93512
94090
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: t2("scheduler.createTask") }),
|
|
93513
94091
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [
|
|
93514
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
93515
|
-
"
|
|
93516
|
-
{
|
|
93517
|
-
type: "text",
|
|
93518
|
-
placeholder: t2("scheduler.taskName"),
|
|
93519
|
-
value: name2,
|
|
93520
|
-
onChange: (e2) => setName(e2.target.value),
|
|
93521
|
-
required: true
|
|
93522
|
-
}
|
|
93523
|
-
),
|
|
93524
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: type2, onChange: (v2) => setType(v2), children: [
|
|
93525
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "agent", children: t2("scheduler.agent", "Agent") }),
|
|
93526
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "group", children: t2("scheduler.group", "Group") }),
|
|
93527
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "memory-update", children: t2("scheduler.review") })
|
|
93528
|
-
] }),
|
|
93529
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93530
|
-
"input",
|
|
93531
|
-
{
|
|
93532
|
-
type: "text",
|
|
93533
|
-
placeholder: "Cron (e.g., 0 9 * * *)",
|
|
93534
|
-
value: cronExpression,
|
|
93535
|
-
onChange: (e2) => setCronExpression(e2.target.value),
|
|
93536
|
-
required: true
|
|
93537
|
-
}
|
|
93538
|
-
),
|
|
93539
|
-
type2 === "agent" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93540
|
-
"input",
|
|
93541
|
-
{
|
|
93542
|
-
type: "text",
|
|
93543
|
-
placeholder: t2("scheduler.agentId", "Agent ID"),
|
|
93544
|
-
value: agentId,
|
|
93545
|
-
onChange: (e2) => setAgentId(e2.target.value),
|
|
93546
|
-
required: true
|
|
93547
|
-
}
|
|
93548
|
-
),
|
|
93549
|
-
type2 === "group" && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
94092
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroup, children: [
|
|
94093
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: nameInputId, children: t2("scheduler.taskName") }),
|
|
93550
94094
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93551
94095
|
"input",
|
|
93552
94096
|
{
|
|
94097
|
+
id: nameInputId,
|
|
93553
94098
|
type: "text",
|
|
93554
|
-
|
|
93555
|
-
|
|
93556
|
-
onChange: (e2) => setGroupId(e2.target.value),
|
|
94099
|
+
value: name2,
|
|
94100
|
+
onChange: (e2) => setName(e2.target.value),
|
|
93557
94101
|
required: true
|
|
93558
94102
|
}
|
|
93559
|
-
),
|
|
93560
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93561
|
-
"input",
|
|
93562
|
-
{
|
|
93563
|
-
type: "text",
|
|
93564
|
-
placeholder: t2("scheduler.sessionIdOptional", "Session ID (optional)"),
|
|
93565
|
-
value: sessionId,
|
|
93566
|
-
onChange: (e2) => setSessionId(e2.target.value)
|
|
93567
|
-
}
|
|
93568
94103
|
)
|
|
93569
94104
|
] }),
|
|
93570
|
-
|
|
93571
|
-
|
|
94105
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
94106
|
+
TaskTargetEditor,
|
|
93572
94107
|
{
|
|
93573
|
-
|
|
93574
|
-
value:
|
|
93575
|
-
onChange:
|
|
93576
|
-
|
|
94108
|
+
idPrefix: "scheduler-create",
|
|
94109
|
+
value: target2,
|
|
94110
|
+
onChange: setTarget,
|
|
94111
|
+
agents,
|
|
94112
|
+
groups,
|
|
94113
|
+
currentGroupContext
|
|
93577
94114
|
}
|
|
93578
94115
|
),
|
|
94116
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ScheduleEditor, { idPrefix: "scheduler-create", value: schedule2, onChange: setSchedule }),
|
|
94117
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroup, children: [
|
|
94118
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: messageInputId, children: "执行内容" }),
|
|
94119
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
94120
|
+
"textarea",
|
|
94121
|
+
{
|
|
94122
|
+
id: messageInputId,
|
|
94123
|
+
placeholder: "告诉 Agent 要做什么……",
|
|
94124
|
+
value: message2,
|
|
94125
|
+
onChange: (e2) => setMessage(e2.target.value),
|
|
94126
|
+
required: true
|
|
94127
|
+
}
|
|
94128
|
+
)
|
|
94129
|
+
] }),
|
|
93579
94130
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.dialogActions, children: [
|
|
93580
94131
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "button", variant: "ghost", onClick: onClose, children: t2("common.cancel") }),
|
|
93581
94132
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "submit", children: t2("common.create") })
|
|
@@ -93585,18 +94136,27 @@ function CreateTaskDialog({
|
|
|
93585
94136
|
}
|
|
93586
94137
|
function EditTaskDialog({
|
|
93587
94138
|
task,
|
|
94139
|
+
agents,
|
|
94140
|
+
groups,
|
|
94141
|
+
currentGroupContext,
|
|
93588
94142
|
onClose,
|
|
93589
94143
|
onSave
|
|
93590
94144
|
}) {
|
|
93591
94145
|
const { t: t2 } = useTranslation();
|
|
93592
94146
|
const [name2, setName] = reactExports.useState(task.name);
|
|
93593
|
-
const [
|
|
93594
|
-
const [
|
|
93595
|
-
|
|
93596
|
-
|
|
94147
|
+
const [schedule2, setSchedule] = reactExports.useState(() => parseCronExpression(task.cronExpression));
|
|
94148
|
+
const [target2, setTarget] = reactExports.useState(() => {
|
|
94149
|
+
if (task.type === "group") return { type: "group", ownerId: task.groupId, sessionId: task.sessionId ?? "" };
|
|
94150
|
+
if (task.type === "agent") return { type: "agent", ownerId: task.agentId, sessionId: task.sessionId ?? "" };
|
|
94151
|
+
return { type: "agent", ownerId: agents[0]?.id ?? "", sessionId: "" };
|
|
94152
|
+
});
|
|
93597
94153
|
const [message2, setMessage] = reactExports.useState(
|
|
93598
94154
|
task.type === "agent" || task.type === "group" ? task.message : ""
|
|
93599
94155
|
);
|
|
94156
|
+
const cronExpression = buildCronExpression(schedule2);
|
|
94157
|
+
const nextRun = formatNextRun(cronExpression);
|
|
94158
|
+
const nameInputId = `scheduler-edit-${task.id}-name`;
|
|
94159
|
+
const messageInputId = `scheduler-edit-${task.id}-message`;
|
|
93600
94160
|
reactExports.useEffect(() => {
|
|
93601
94161
|
const handleKeyDown = (e2) => {
|
|
93602
94162
|
if (e2.key === "Escape") onClose();
|
|
@@ -93606,82 +94166,76 @@ function EditTaskDialog({
|
|
|
93606
94166
|
}, [onClose]);
|
|
93607
94167
|
const handleSubmit = (e2) => {
|
|
93608
94168
|
e2.preventDefault();
|
|
93609
|
-
if (
|
|
93610
|
-
|
|
93611
|
-
|
|
94169
|
+
if (!target2.ownerId || !target2.sessionId) {
|
|
94170
|
+
alert("请选择执行位置和 Session");
|
|
94171
|
+
return;
|
|
94172
|
+
}
|
|
94173
|
+
if (target2.type === "agent") {
|
|
94174
|
+
onSave({ type: "agent", name: name2, cronExpression, enabled: task.enabled, agentId: target2.ownerId, sessionId: target2.sessionId, message: message2 });
|
|
94175
|
+
} else {
|
|
93612
94176
|
onSave({
|
|
93613
94177
|
type: "group",
|
|
93614
94178
|
name: name2,
|
|
93615
94179
|
cronExpression,
|
|
93616
94180
|
enabled: task.enabled,
|
|
93617
|
-
groupId,
|
|
93618
|
-
sessionId: sessionId
|
|
94181
|
+
groupId: target2.ownerId,
|
|
94182
|
+
sessionId: target2.sessionId,
|
|
93619
94183
|
message: message2
|
|
93620
94184
|
});
|
|
93621
|
-
} else {
|
|
93622
|
-
onSave({ type: "memory-update", name: name2, cronExpression, enabled: task.enabled });
|
|
93623
94185
|
}
|
|
93624
94186
|
};
|
|
93625
94187
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$d.dialog, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.dialogContent, children: [
|
|
93626
94188
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: t2("scheduler.editTask") }),
|
|
94189
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.taskSummary, children: [
|
|
94190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("strong", { children: [
|
|
94191
|
+
"这个任务将",
|
|
94192
|
+
describeCronExpression(cronExpression),
|
|
94193
|
+
"运行"
|
|
94194
|
+
] }),
|
|
94195
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
94196
|
+
"下一次运行:",
|
|
94197
|
+
nextRun
|
|
94198
|
+
] })
|
|
94199
|
+
] }),
|
|
93627
94200
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [
|
|
93628
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
93629
|
-
"
|
|
93630
|
-
{
|
|
93631
|
-
type: "text",
|
|
93632
|
-
placeholder: t2("scheduler.taskName"),
|
|
93633
|
-
value: name2,
|
|
93634
|
-
onChange: (e2) => setName(e2.target.value),
|
|
93635
|
-
required: true
|
|
93636
|
-
}
|
|
93637
|
-
),
|
|
93638
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93639
|
-
"input",
|
|
93640
|
-
{
|
|
93641
|
-
type: "text",
|
|
93642
|
-
placeholder: "Cron",
|
|
93643
|
-
value: cronExpression,
|
|
93644
|
-
onChange: (e2) => setCronExpression(e2.target.value),
|
|
93645
|
-
required: true
|
|
93646
|
-
}
|
|
93647
|
-
),
|
|
93648
|
-
task.type === "agent" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93649
|
-
"input",
|
|
93650
|
-
{
|
|
93651
|
-
type: "text",
|
|
93652
|
-
placeholder: t2("scheduler.agentId", "Agent ID"),
|
|
93653
|
-
value: agentId,
|
|
93654
|
-
onChange: (e2) => setAgentId(e2.target.value)
|
|
93655
|
-
}
|
|
93656
|
-
),
|
|
93657
|
-
task.type === "group" && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
94201
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroup, children: [
|
|
94202
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: nameInputId, children: t2("scheduler.taskName") }),
|
|
93658
94203
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93659
94204
|
"input",
|
|
93660
94205
|
{
|
|
94206
|
+
id: nameInputId,
|
|
93661
94207
|
type: "text",
|
|
93662
|
-
|
|
93663
|
-
|
|
93664
|
-
|
|
93665
|
-
}
|
|
93666
|
-
),
|
|
93667
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93668
|
-
"input",
|
|
93669
|
-
{
|
|
93670
|
-
type: "text",
|
|
93671
|
-
placeholder: t2("scheduler.sessionIdOptional", "Session ID (optional)"),
|
|
93672
|
-
value: sessionId,
|
|
93673
|
-
onChange: (e2) => setSessionId(e2.target.value)
|
|
94208
|
+
value: name2,
|
|
94209
|
+
onChange: (e2) => setName(e2.target.value),
|
|
94210
|
+
required: true
|
|
93674
94211
|
}
|
|
93675
94212
|
)
|
|
93676
94213
|
] }),
|
|
93677
|
-
|
|
93678
|
-
|
|
94214
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
94215
|
+
TaskTargetEditor,
|
|
93679
94216
|
{
|
|
93680
|
-
|
|
93681
|
-
value:
|
|
93682
|
-
onChange:
|
|
94217
|
+
idPrefix: `scheduler-edit-${task.id}`,
|
|
94218
|
+
value: target2,
|
|
94219
|
+
onChange: setTarget,
|
|
94220
|
+
agents,
|
|
94221
|
+
groups,
|
|
94222
|
+
currentGroupContext
|
|
93683
94223
|
}
|
|
93684
94224
|
),
|
|
94225
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ScheduleEditor, { idPrefix: `scheduler-edit-${task.id}`, value: schedule2, onChange: setSchedule }),
|
|
94226
|
+
(task.type === "agent" || task.type === "group") && !task.sessionId && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$d.legacyNotice, children: "旧任务未指定 Session,保存后将固定到当前选择的 Session。" }),
|
|
94227
|
+
task.type !== "memory-update" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.fieldGroup, children: [
|
|
94228
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: messageInputId, children: "执行内容" }),
|
|
94229
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
94230
|
+
"textarea",
|
|
94231
|
+
{
|
|
94232
|
+
id: messageInputId,
|
|
94233
|
+
placeholder: "告诉 Agent 要做什么……",
|
|
94234
|
+
value: message2,
|
|
94235
|
+
onChange: (e2) => setMessage(e2.target.value)
|
|
94236
|
+
}
|
|
94237
|
+
)
|
|
94238
|
+
] }),
|
|
93685
94239
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$d.dialogActions, children: [
|
|
93686
94240
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "button", variant: "ghost", onClick: onClose, children: t2("common.cancel") }),
|
|
93687
94241
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "submit", children: t2("common.save") })
|
|
@@ -97963,7 +98517,7 @@ function useSidebarSearch() {
|
|
|
97963
98517
|
searchInputRef
|
|
97964
98518
|
};
|
|
97965
98519
|
}
|
|
97966
|
-
const version = "1.10.
|
|
98520
|
+
const version = "1.10.3";
|
|
97967
98521
|
const pkg = {
|
|
97968
98522
|
version
|
|
97969
98523
|
};
|