@sinm/kai 1.10.7 → 1.10.9
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 +1221 -529
- package/dist-electron/renderer/assets/{_baseUniq--zw5vxJ8.js → _baseUniq-BwtMDG1-.js} +1 -1
- package/dist-electron/renderer/assets/_baseUniq-BwtMDG1-.js.gz +0 -0
- package/dist-electron/renderer/assets/{arc-B-ZTE5px.js → arc-D5Y8sObu.js} +1 -1
- package/dist-electron/renderer/assets/arc-D5Y8sObu.js.gz +0 -0
- package/dist-electron/renderer/assets/{architectureDiagram-Q4EWVU46-CsjJkYpt.js → architectureDiagram-Q4EWVU46-Dk0KuAk6.js} +5 -5
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-Dk0KuAk6.js.gz +0 -0
- package/dist-electron/renderer/assets/{blockDiagram-DXYQGD6D-C4KXhIaX.js → blockDiagram-DXYQGD6D-RROzjSS4.js} +6 -6
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-RROzjSS4.js.gz +0 -0
- package/dist-electron/renderer/assets/{c4Diagram-AHTNJAMY-B4vdoFNw.js → c4Diagram-AHTNJAMY-COr4yxZO.js} +2 -2
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-COr4yxZO.js.gz +0 -0
- package/dist-electron/renderer/assets/{channel-CojzKabn.js → channel-D7c0puHw.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4BX2VUAB-CCDurM9j.js → chunk-4BX2VUAB-zon6ESDT.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-4TB4RGXK-D70CTFFr.js → chunk-4TB4RGXK-t5PuOocg.js} +5 -5
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-t5PuOocg.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-55IACEB6-B0va-3Kz.js → chunk-55IACEB6-BKk3Kjuh.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-EDXVE4YY-1YMWXLsT.js → chunk-EDXVE4YY-D07Bk7Ts.js} +1 -1
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-D07Bk7Ts.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-FMBD7UC4-C93n6mrE.js → chunk-FMBD7UC4-ridqi0-s.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-OYMX7WX6-B4Lz8_M8.js → chunk-OYMX7WX6-BJStQEVA.js} +3 -3
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-BJStQEVA.js.gz +0 -0
- package/dist-electron/renderer/assets/{chunk-QZHKN3VN-Bln2eCdd.js → chunk-QZHKN3VN-4ZDs5jRy.js} +1 -1
- package/dist-electron/renderer/assets/{chunk-YZCP3GAM-DLyJ3i6-.js → chunk-YZCP3GAM-WMu5UJ_J.js} +1 -1
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-WMu5UJ_J.js.gz +0 -0
- package/dist-electron/renderer/assets/{classDiagram-6PBFFD2Q-BCpu5WpC.js → classDiagram-6PBFFD2Q-WQ6mAQ8p.js} +6 -6
- package/dist-electron/renderer/assets/{classDiagram-v2-HSJHXN6E-BCpu5WpC.js → classDiagram-v2-HSJHXN6E-WQ6mAQ8p.js} +6 -6
- package/dist-electron/renderer/assets/{clone-DHbm8xhR.js → clone-wHUtBPLK.js} +1 -1
- package/dist-electron/renderer/assets/{cose-bilkent-S5V4N54A-j4mwYnJK.js → cose-bilkent-S5V4N54A-C7-3WlAT.js} +1 -1
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-C7-3WlAT.js.gz +0 -0
- package/dist-electron/renderer/assets/{dagre-KV5264BT-Cs4c7zmN.js → dagre-KV5264BT-CgU6PfJs.js} +6 -6
- package/dist-electron/renderer/assets/dagre-KV5264BT-CgU6PfJs.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-5BDNPKRD-DH3zvht0.js → diagram-5BDNPKRD-NYjY1WSI.js} +6 -6
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-NYjY1WSI.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-G4DWMVQ6-CGDXBGv7.js → diagram-G4DWMVQ6-BWToylUw.js} +6 -6
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-BWToylUw.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-MMDJMWI5-C8Ns1x5S.js → diagram-MMDJMWI5-CYOS--AG.js} +5 -5
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-CYOS--AG.js.gz +0 -0
- package/dist-electron/renderer/assets/{diagram-TYMM5635-Hr47desu.js → diagram-TYMM5635-DbR10Nbc.js} +5 -5
- package/dist-electron/renderer/assets/diagram-TYMM5635-DbR10Nbc.js.gz +0 -0
- package/dist-electron/renderer/assets/{erDiagram-SMLLAGMA-CxhPNMff.js → erDiagram-SMLLAGMA-0fqlEFM9.js} +4 -4
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-0fqlEFM9.js.gz +0 -0
- package/dist-electron/renderer/assets/{flowDiagram-DWJPFMVM-BER6WVZg.js → flowDiagram-DWJPFMVM-DbCFy4Q1.js} +6 -6
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-DbCFy4Q1.js.gz +0 -0
- package/dist-electron/renderer/assets/{ganttDiagram-T4ZO3ILL-DiKH9xVX.js → ganttDiagram-T4ZO3ILL-99E_sjoR.js} +1 -1
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-99E_sjoR.js.gz +0 -0
- package/dist-electron/renderer/assets/{gitGraphDiagram-UUTBAWPF--hHnNRwU.js → gitGraphDiagram-UUTBAWPF-BYQMGCe1.js} +6 -6
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF-BYQMGCe1.js.gz +0 -0
- package/dist-electron/renderer/assets/{graph-CG-i4KXk.js → graph-I1gBTVcf.js} +2 -2
- package/dist-electron/renderer/assets/graph-I1gBTVcf.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-HszXKoTI.js → index-Bq9gK3yW.js} +488 -424
- package/dist-electron/renderer/assets/index-Bq9gK3yW.js.gz +0 -0
- package/dist-electron/renderer/assets/{index-DGMKs4_S.css → index-DwIqVvJQ.css} +249 -232
- package/dist-electron/renderer/assets/index-DwIqVvJQ.css.gz +0 -0
- package/dist-electron/renderer/assets/{infoDiagram-42DDH7IO-Glh-kNi7.js → infoDiagram-42DDH7IO-KLNN6MTr.js} +4 -4
- package/dist-electron/renderer/assets/{ishikawaDiagram-UXIWVN3A-GATvn0p-.js → ishikawaDiagram-UXIWVN3A-CIpUwlD6.js} +1 -1
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-CIpUwlD6.js.gz +0 -0
- package/dist-electron/renderer/assets/{journeyDiagram-VCZTEJTY-Dh3hGd03.js → journeyDiagram-VCZTEJTY-Cf5eOwIT.js} +4 -4
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-Cf5eOwIT.js.gz +0 -0
- package/dist-electron/renderer/assets/{kanban-definition-6JOO6SKY-B4CKbVuY.js → kanban-definition-6JOO6SKY-D-AiOtub.js} +2 -2
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-D-AiOtub.js.gz +0 -0
- package/dist-electron/renderer/assets/{layout-ByVBxABe.js → layout-oRQlDrmR.js} +4 -4
- package/dist-electron/renderer/assets/layout-oRQlDrmR.js.gz +0 -0
- package/dist-electron/renderer/assets/{min-wqhv2XVH.js → min-CJbOmPi5.js} +2 -2
- package/dist-electron/renderer/assets/min-CJbOmPi5.js.gz +0 -0
- package/dist-electron/renderer/assets/{mindmap-definition-QFDTVHPH-D4mNlXr2.js → mindmap-definition-QFDTVHPH-DKKEXzR5.js} +3 -3
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-DKKEXzR5.js.gz +0 -0
- package/dist-electron/renderer/assets/{pieDiagram-DEJITSTG-7WTMb8Jf.js → pieDiagram-DEJITSTG-BE5F3KPb.js} +6 -6
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-BE5F3KPb.js.gz +0 -0
- package/dist-electron/renderer/assets/{quadrantDiagram-34T5L4WZ-8hdoptuE.js → quadrantDiagram-34T5L4WZ-D0gMai7D.js} +1 -1
- package/dist-electron/renderer/assets/{quadrantDiagram-34T5L4WZ-8hdoptuE.js.gz → quadrantDiagram-34T5L4WZ-D0gMai7D.js.gz} +0 -0
- package/dist-electron/renderer/assets/{requirementDiagram-MS252O5E-B_xMPn-V.js → requirementDiagram-MS252O5E-C3xERMVY.js} +3 -3
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-C3xERMVY.js.gz +0 -0
- package/dist-electron/renderer/assets/{sankeyDiagram-XADWPNL6-DzNk6tS4.js → sankeyDiagram-XADWPNL6-DWRyCRF7.js} +1 -1
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-DWRyCRF7.js.gz +0 -0
- package/dist-electron/renderer/assets/{sequenceDiagram-FGHM5R23-C42xau12.js → sequenceDiagram-FGHM5R23-CXOjG4Pk.js} +3 -3
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-CXOjG4Pk.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-FHFEXIEX-DKyS2aaF.js → stateDiagram-FHFEXIEX-BFGMsjAA.js} +8 -8
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-BFGMsjAA.js.gz +0 -0
- package/dist-electron/renderer/assets/{stateDiagram-v2-QKLJ7IA2-D1ccqVYN.js → stateDiagram-v2-QKLJ7IA2-TQ4k_Ake.js} +4 -4
- package/dist-electron/renderer/assets/{timeline-definition-GMOUNBTQ-BHW2iOvC.js → timeline-definition-GMOUNBTQ-we4olq0q.js} +2 -2
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-we4olq0q.js.gz +0 -0
- package/dist-electron/renderer/assets/{vennDiagram-DHZGUBPP-C_Wft8GY.js → vennDiagram-DHZGUBPP-ByyCWjrf.js} +1 -1
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-ByyCWjrf.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardley-RL74JXVD-G7z3b9xY.js → wardley-RL74JXVD-DjV5krT-.js} +3 -3
- package/dist-electron/renderer/assets/wardley-RL74JXVD-DjV5krT-.js.gz +0 -0
- package/dist-electron/renderer/assets/{wardleyDiagram-NUSXRM2D-DpOEFojT.js → wardleyDiagram-NUSXRM2D-CnkU2yG8.js} +5 -5
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-CnkU2yG8.js.gz +0 -0
- package/dist-electron/renderer/assets/{xychartDiagram-5P7HB3ND-CPfWWH77.js → xychartDiagram-5P7HB3ND-CcyVXC1b.js} +1 -1
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-CcyVXC1b.js.gz +0 -0
- package/dist-electron/renderer/index.html +2 -2
- package/package.json +2 -2
- package/dist-electron/renderer/assets/_baseUniq--zw5vxJ8.js.gz +0 -0
- package/dist-electron/renderer/assets/arc-B-ZTE5px.js.gz +0 -0
- package/dist-electron/renderer/assets/architectureDiagram-Q4EWVU46-CsjJkYpt.js.gz +0 -0
- package/dist-electron/renderer/assets/blockDiagram-DXYQGD6D-C4KXhIaX.js.gz +0 -0
- package/dist-electron/renderer/assets/c4Diagram-AHTNJAMY-B4vdoFNw.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-4TB4RGXK-D70CTFFr.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-EDXVE4YY-1YMWXLsT.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-OYMX7WX6-B4Lz8_M8.js.gz +0 -0
- package/dist-electron/renderer/assets/chunk-YZCP3GAM-DLyJ3i6-.js.gz +0 -0
- package/dist-electron/renderer/assets/cose-bilkent-S5V4N54A-j4mwYnJK.js.gz +0 -0
- package/dist-electron/renderer/assets/dagre-KV5264BT-Cs4c7zmN.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-5BDNPKRD-DH3zvht0.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-G4DWMVQ6-CGDXBGv7.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-MMDJMWI5-C8Ns1x5S.js.gz +0 -0
- package/dist-electron/renderer/assets/diagram-TYMM5635-Hr47desu.js.gz +0 -0
- package/dist-electron/renderer/assets/erDiagram-SMLLAGMA-CxhPNMff.js.gz +0 -0
- package/dist-electron/renderer/assets/flowDiagram-DWJPFMVM-BER6WVZg.js.gz +0 -0
- package/dist-electron/renderer/assets/ganttDiagram-T4ZO3ILL-DiKH9xVX.js.gz +0 -0
- package/dist-electron/renderer/assets/gitGraphDiagram-UUTBAWPF--hHnNRwU.js.gz +0 -0
- package/dist-electron/renderer/assets/graph-CG-i4KXk.js.gz +0 -0
- package/dist-electron/renderer/assets/index-DGMKs4_S.css.gz +0 -0
- package/dist-electron/renderer/assets/index-HszXKoTI.js.gz +0 -0
- package/dist-electron/renderer/assets/ishikawaDiagram-UXIWVN3A-GATvn0p-.js.gz +0 -0
- package/dist-electron/renderer/assets/journeyDiagram-VCZTEJTY-Dh3hGd03.js.gz +0 -0
- package/dist-electron/renderer/assets/kanban-definition-6JOO6SKY-B4CKbVuY.js.gz +0 -0
- package/dist-electron/renderer/assets/layout-ByVBxABe.js.gz +0 -0
- package/dist-electron/renderer/assets/min-wqhv2XVH.js.gz +0 -0
- package/dist-electron/renderer/assets/mindmap-definition-QFDTVHPH-D4mNlXr2.js.gz +0 -0
- package/dist-electron/renderer/assets/pieDiagram-DEJITSTG-7WTMb8Jf.js.gz +0 -0
- package/dist-electron/renderer/assets/requirementDiagram-MS252O5E-B_xMPn-V.js.gz +0 -0
- package/dist-electron/renderer/assets/sankeyDiagram-XADWPNL6-DzNk6tS4.js.gz +0 -0
- package/dist-electron/renderer/assets/sequenceDiagram-FGHM5R23-C42xau12.js.gz +0 -0
- package/dist-electron/renderer/assets/stateDiagram-FHFEXIEX-DKyS2aaF.js.gz +0 -0
- package/dist-electron/renderer/assets/timeline-definition-GMOUNBTQ-BHW2iOvC.js.gz +0 -0
- package/dist-electron/renderer/assets/vennDiagram-DHZGUBPP-C_Wft8GY.js.gz +0 -0
- package/dist-electron/renderer/assets/wardley-RL74JXVD-G7z3b9xY.js.gz +0 -0
- package/dist-electron/renderer/assets/wardleyDiagram-NUSXRM2D-DpOEFojT.js.gz +0 -0
- package/dist-electron/renderer/assets/xychartDiagram-5P7HB3ND-CPfWWH77.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-CgU6PfJs.js","./graph-I1gBTVcf.js","./_baseUniq-BwtMDG1-.js","./layout-oRQlDrmR.js","./min-CJbOmPi5.js","./clone-wHUtBPLK.js","./cose-bilkent-S5V4N54A-C7-3WlAT.js","./cytoscape.esm-D6E6cAed.js","./c4Diagram-AHTNJAMY-COr4yxZO.js","./chunk-YZCP3GAM-WMu5UJ_J.js","./flowDiagram-DWJPFMVM-DbCFy4Q1.js","./chunk-FMBD7UC4-ridqi0-s.js","./chunk-55IACEB6-BKk3Kjuh.js","./chunk-EDXVE4YY-D07Bk7Ts.js","./channel-D7c0puHw.js","./erDiagram-SMLLAGMA-0fqlEFM9.js","./gitGraphDiagram-UUTBAWPF-BYQMGCe1.js","./chunk-4BX2VUAB-zon6ESDT.js","./chunk-QZHKN3VN-4ZDs5jRy.js","./wardley-RL74JXVD-DjV5krT-.js","./infoDiagram-42DDH7IO-KLNN6MTr.js","./pieDiagram-DEJITSTG-BE5F3KPb.js","./arc-D5Y8sObu.js","./requirementDiagram-MS252O5E-C3xERMVY.js","./sequenceDiagram-FGHM5R23-CXOjG4Pk.js","./classDiagram-6PBFFD2Q-WQ6mAQ8p.js","./chunk-4TB4RGXK-t5PuOocg.js","./classDiagram-v2-HSJHXN6E-WQ6mAQ8p.js","./stateDiagram-FHFEXIEX-BFGMsjAA.js","./chunk-OYMX7WX6-BJStQEVA.js","./stateDiagram-v2-QKLJ7IA2-TQ4k_Ake.js","./journeyDiagram-VCZTEJTY-Cf5eOwIT.js","./timeline-definition-GMOUNBTQ-we4olq0q.js","./mindmap-definition-QFDTVHPH-DKKEXzR5.js","./kanban-definition-6JOO6SKY-D-AiOtub.js","./diagram-TYMM5635-DbR10Nbc.js","./diagram-MMDJMWI5-CYOS--AG.js","./blockDiagram-DXYQGD6D-RROzjSS4.js","./diagram-5BDNPKRD-NYjY1WSI.js","./architectureDiagram-Q4EWVU46-Dk0KuAk6.js","./diagram-G4DWMVQ6-BWToylUw.js","./wardleyDiagram-NUSXRM2D-CnkU2yG8.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 e3 = m2[i2];
|
|
@@ -18680,7 +18680,7 @@ const useMessageStore = create$3((set2, get2) => ({
|
|
|
18680
18680
|
optimisticCleanup = /* @__PURE__ */ new Map([[cid, cleaned]]);
|
|
18681
18681
|
}
|
|
18682
18682
|
}
|
|
18683
|
-
if (evt.type === "message.accepted" && evt.message.senderRole === "user") {
|
|
18683
|
+
if (evt.type === "message.accepted" && (evt.clientRequestId || evt.message.senderRole === "user")) {
|
|
18684
18684
|
const clientReqId = evt.clientRequestId;
|
|
18685
18685
|
for (const [localMsgId, pending2] of innerMap) {
|
|
18686
18686
|
if (clientReqId && pending2.clientRequestId && clientReqId !== pending2.clientRequestId) continue;
|
|
@@ -19605,12 +19605,12 @@ function getFallbackKey(channelId, model) {
|
|
|
19605
19605
|
const container$l = "_container_kw9ug_3";
|
|
19606
19606
|
const icon$8 = "_icon_kw9ug_12";
|
|
19607
19607
|
const title$g = "_title_kw9ug_18";
|
|
19608
|
-
const hint$
|
|
19608
|
+
const hint$8 = "_hint_kw9ug_25";
|
|
19609
19609
|
const styles$1b = {
|
|
19610
19610
|
container: container$l,
|
|
19611
19611
|
icon: icon$8,
|
|
19612
19612
|
title: title$g,
|
|
19613
|
-
hint: hint$
|
|
19613
|
+
hint: hint$8
|
|
19614
19614
|
};
|
|
19615
19615
|
function GroupEmptyState() {
|
|
19616
19616
|
const { t: t2 } = useTranslation();
|
|
@@ -19800,7 +19800,7 @@ const memberRow$2 = "_memberRow_o81re_44";
|
|
|
19800
19800
|
const memberAvatars$1 = "_memberAvatars_o81re_51";
|
|
19801
19801
|
const memberAvatar$1 = "_memberAvatar_o81re_51";
|
|
19802
19802
|
const memberCount$1 = "_memberCount_o81re_65";
|
|
19803
|
-
const hint$
|
|
19803
|
+
const hint$7 = "_hint_o81re_72";
|
|
19804
19804
|
const styles$19 = {
|
|
19805
19805
|
container: container$k,
|
|
19806
19806
|
iconBox,
|
|
@@ -19810,7 +19810,7 @@ const styles$19 = {
|
|
|
19810
19810
|
memberAvatars: memberAvatars$1,
|
|
19811
19811
|
memberAvatar: memberAvatar$1,
|
|
19812
19812
|
memberCount: memberCount$1,
|
|
19813
|
-
hint: hint$
|
|
19813
|
+
hint: hint$7
|
|
19814
19814
|
};
|
|
19815
19815
|
const log$q = createLogger("EmptySessionGuide");
|
|
19816
19816
|
function EmptySessionGuide({
|
|
@@ -19874,7 +19874,8 @@ function EmptySessionGuide({
|
|
|
19874
19874
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$19.hint, children: t2("thread.sendFirst", "发送第一条消息开始讨论") })
|
|
19875
19875
|
] });
|
|
19876
19876
|
}
|
|
19877
|
-
const BOTTOM_THRESHOLD =
|
|
19877
|
+
const BOTTOM_THRESHOLD = 10;
|
|
19878
|
+
const FORCE_SCROLL_RAF_COUNT = 2;
|
|
19878
19879
|
function useScrollAnchor(opts, loadMore) {
|
|
19879
19880
|
const { messageCount, streamVersion, loadingMore: loadingMore2, resetKey } = opts;
|
|
19880
19881
|
const containerRef = reactExports.useRef(null);
|
|
@@ -19886,6 +19887,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
19886
19887
|
const preserveScrollRef = reactExports.useRef(null);
|
|
19887
19888
|
const stickyBottomRef = reactExports.useRef(true);
|
|
19888
19889
|
const lastScrollTopRef = reactExports.useRef(0);
|
|
19890
|
+
const forceScrollRafRef = reactExports.useRef(null);
|
|
19889
19891
|
const checkIsAtBottom = reactExports.useCallback((container2) => {
|
|
19890
19892
|
const distanceToBottom = container2.scrollHeight - container2.scrollTop - container2.clientHeight;
|
|
19891
19893
|
return distanceToBottom < BOTTOM_THRESHOLD;
|
|
@@ -19894,6 +19896,12 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
19894
19896
|
container2.scrollTop = value2;
|
|
19895
19897
|
lastScrollTopRef.current = container2.scrollTop;
|
|
19896
19898
|
}, []);
|
|
19899
|
+
const cancelForceScroll = reactExports.useCallback(() => {
|
|
19900
|
+
if (forceScrollRafRef.current !== null) {
|
|
19901
|
+
cancelAnimationFrame(forceScrollRafRef.current);
|
|
19902
|
+
forceScrollRafRef.current = null;
|
|
19903
|
+
}
|
|
19904
|
+
}, []);
|
|
19897
19905
|
const handleScroll = reactExports.useCallback(() => {
|
|
19898
19906
|
const container2 = containerRef.current;
|
|
19899
19907
|
if (!container2) return;
|
|
@@ -19945,6 +19953,28 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
19945
19953
|
setShowNewMessageHint(false);
|
|
19946
19954
|
setShowScrollToBottom(false);
|
|
19947
19955
|
}, [setScrollTop]);
|
|
19956
|
+
const forceScrollToBottom = reactExports.useCallback(() => {
|
|
19957
|
+
const el = containerRef.current;
|
|
19958
|
+
if (!el) return;
|
|
19959
|
+
cancelForceScroll();
|
|
19960
|
+
stickyBottomRef.current = true;
|
|
19961
|
+
setIsAtBottom(true);
|
|
19962
|
+
setShowNewMessageHint(false);
|
|
19963
|
+
setShowScrollToBottom(false);
|
|
19964
|
+
setScrollTop(el, el.scrollHeight);
|
|
19965
|
+
let remainingFrames = FORCE_SCROLL_RAF_COUNT;
|
|
19966
|
+
const scrollAfterPaint = () => {
|
|
19967
|
+
const next2 = containerRef.current;
|
|
19968
|
+
if (next2) setScrollTop(next2, next2.scrollHeight);
|
|
19969
|
+
remainingFrames -= 1;
|
|
19970
|
+
if (remainingFrames > 0) {
|
|
19971
|
+
forceScrollRafRef.current = requestAnimationFrame(scrollAfterPaint);
|
|
19972
|
+
} else {
|
|
19973
|
+
forceScrollRafRef.current = null;
|
|
19974
|
+
}
|
|
19975
|
+
};
|
|
19976
|
+
forceScrollRafRef.current = requestAnimationFrame(scrollAfterPaint);
|
|
19977
|
+
}, [cancelForceScroll, setScrollTop]);
|
|
19948
19978
|
const handleNewMessageClick = reactExports.useCallback(() => {
|
|
19949
19979
|
const container2 = containerRef.current;
|
|
19950
19980
|
if (!container2) return;
|
|
@@ -19975,13 +20005,15 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
19975
20005
|
reactExports.useEffect(() => {
|
|
19976
20006
|
isInitialMountRef.current = true;
|
|
19977
20007
|
stickyBottomRef.current = true;
|
|
20008
|
+
cancelForceScroll();
|
|
19978
20009
|
setShowNewMessageHint(false);
|
|
19979
20010
|
setIsAtBottom(true);
|
|
19980
20011
|
setShowScrollToBottom(false);
|
|
19981
20012
|
prevMessageCountRef.current = 0;
|
|
19982
20013
|
lastScrollTopRef.current = 0;
|
|
19983
20014
|
preserveScrollRef.current = null;
|
|
19984
|
-
}, [resetKey]);
|
|
20015
|
+
}, [cancelForceScroll, resetKey]);
|
|
20016
|
+
reactExports.useEffect(() => cancelForceScroll, [cancelForceScroll]);
|
|
19985
20017
|
const scrollToBottomAction = reactExports.useEffectEvent(() => {
|
|
19986
20018
|
const container2 = containerRef.current;
|
|
19987
20019
|
if (!container2) return;
|
|
@@ -20022,9 +20054,13 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
20022
20054
|
if (loadingMore2) return;
|
|
20023
20055
|
const delta = container2.scrollHeight - preserve.prevScrollHeight;
|
|
20024
20056
|
setScrollTop(container2, preserve.prevScrollTop + delta);
|
|
20025
|
-
|
|
20057
|
+
const atBottom = checkIsAtBottom(container2);
|
|
20058
|
+
stickyBottomRef.current = atBottom;
|
|
20059
|
+
setIsAtBottom(atBottom);
|
|
20060
|
+
setShowScrollToBottom(!atBottom);
|
|
20061
|
+
if (atBottom) setShowNewMessageHint(false);
|
|
20026
20062
|
preserveScrollRef.current = null;
|
|
20027
|
-
}, [loadingMore2, messageCount, setScrollTop]);
|
|
20063
|
+
}, [checkIsAtBottom, loadingMore2, messageCount, setScrollTop]);
|
|
20028
20064
|
reactExports.useEffect(() => {
|
|
20029
20065
|
const container2 = containerRef.current;
|
|
20030
20066
|
if (!container2 || !stickyBottomRef.current || preserveScrollRef.current) return;
|
|
@@ -20054,6 +20090,7 @@ function useScrollAnchor(opts, loadMore) {
|
|
|
20054
20090
|
leaveStickyBottom,
|
|
20055
20091
|
scrollToTop,
|
|
20056
20092
|
scrollToBottom: scrollToBottom2,
|
|
20093
|
+
forceScrollToBottom,
|
|
20057
20094
|
handleNewMessageClick,
|
|
20058
20095
|
handleScrollToBottomClick,
|
|
20059
20096
|
handleLoadMoreClick
|
|
@@ -44815,7 +44852,7 @@ const toolbar$1 = "_toolbar_13x7f_22";
|
|
|
44815
44852
|
const titleGroup = "_titleGroup_13x7f_34";
|
|
44816
44853
|
const actions$8 = "_actions_13x7f_41";
|
|
44817
44854
|
const title$f = "_title_13x7f_34";
|
|
44818
|
-
const hint$
|
|
44855
|
+
const hint$6 = "_hint_13x7f_54";
|
|
44819
44856
|
const closeButton$1 = "_closeButton_13x7f_62";
|
|
44820
44857
|
const actionButton = "_actionButton_13x7f_63";
|
|
44821
44858
|
const linkAction = "_linkAction_13x7f_67";
|
|
@@ -44835,7 +44872,7 @@ const styles$17 = {
|
|
|
44835
44872
|
titleGroup,
|
|
44836
44873
|
actions: actions$8,
|
|
44837
44874
|
title: title$f,
|
|
44838
|
-
hint: hint$
|
|
44875
|
+
hint: hint$6,
|
|
44839
44876
|
closeButton: closeButton$1,
|
|
44840
44877
|
actionButton,
|
|
44841
44878
|
linkAction,
|
|
@@ -71489,12 +71526,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
71489
71526
|
registerLayoutLoaders([
|
|
71490
71527
|
{
|
|
71491
71528
|
name: "dagre",
|
|
71492
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-
|
|
71529
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-CgU6PfJs.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
|
|
71493
71530
|
},
|
|
71494
71531
|
...[
|
|
71495
71532
|
{
|
|
71496
71533
|
name: "cose-bilkent",
|
|
71497
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-
|
|
71534
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-C7-3WlAT.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
|
|
71498
71535
|
}
|
|
71499
71536
|
]
|
|
71500
71537
|
]);
|
|
@@ -71950,7 +71987,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
71950
71987
|
}, "detector");
|
|
71951
71988
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
71952
71989
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
71953
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-
|
|
71990
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-COr4yxZO.js");
|
|
71954
71991
|
return { diagram: diagram22 };
|
|
71955
71992
|
}, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
|
|
71956
71993
|
return { id, diagram: diagram2 };
|
|
@@ -71970,7 +72007,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
71970
72007
|
}, "detector");
|
|
71971
72008
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
71972
72009
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
71973
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
72010
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-DbCFy4Q1.js");
|
|
71974
72011
|
return { diagram: diagram22 };
|
|
71975
72012
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
71976
72013
|
return { id: id2, diagram: diagram2 };
|
|
@@ -71996,7 +72033,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
71996
72033
|
}, "detector");
|
|
71997
72034
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
71998
72035
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
71999
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
72036
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-DbCFy4Q1.js");
|
|
72000
72037
|
return { diagram: diagram22 };
|
|
72001
72038
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
72002
72039
|
return { id: id3, diagram: diagram2 };
|
|
@@ -72013,7 +72050,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
72013
72050
|
}, "detector");
|
|
72014
72051
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
72015
72052
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72016
|
-
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-
|
|
72053
|
+
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-0fqlEFM9.js");
|
|
72017
72054
|
return { diagram: diagram22 };
|
|
72018
72055
|
}, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
|
|
72019
72056
|
return { id: id4, diagram: diagram2 };
|
|
@@ -72030,7 +72067,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
72030
72067
|
}, "detector");
|
|
72031
72068
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
72032
72069
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72033
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF
|
|
72070
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-BYQMGCe1.js");
|
|
72034
72071
|
return { diagram: diagram22 };
|
|
72035
72072
|
}, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
|
|
72036
72073
|
return { id: id5, diagram: diagram2 };
|
|
@@ -72047,7 +72084,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
72047
72084
|
}, "detector");
|
|
72048
72085
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
72049
72086
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72050
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-
|
|
72087
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-99E_sjoR.js");
|
|
72051
72088
|
return { diagram: diagram22 };
|
|
72052
72089
|
}, true ? [] : void 0, import.meta.url);
|
|
72053
72090
|
return { id: id6, diagram: diagram2 };
|
|
@@ -72064,7 +72101,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
72064
72101
|
}, "detector");
|
|
72065
72102
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
72066
72103
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72067
|
-
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-
|
|
72104
|
+
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-KLNN6MTr.js");
|
|
72068
72105
|
return { diagram: diagram22 };
|
|
72069
72106
|
}, true ? __vite__mapDeps([20,19,4,2]) : void 0, import.meta.url);
|
|
72070
72107
|
return { id: id7, diagram: diagram2 };
|
|
@@ -72080,7 +72117,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
72080
72117
|
}, "detector");
|
|
72081
72118
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
72082
72119
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72083
|
-
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-
|
|
72120
|
+
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-BE5F3KPb.js");
|
|
72084
72121
|
return { diagram: diagram22 };
|
|
72085
72122
|
}, true ? __vite__mapDeps([21,17,19,4,2,22]) : void 0, import.meta.url);
|
|
72086
72123
|
return { id: id8, diagram: diagram2 };
|
|
@@ -72096,7 +72133,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
72096
72133
|
}, "detector");
|
|
72097
72134
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
72098
72135
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72099
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-
|
|
72136
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-D0gMai7D.js");
|
|
72100
72137
|
return { diagram: diagram22 };
|
|
72101
72138
|
}, true ? [] : void 0, import.meta.url);
|
|
72102
72139
|
return { id: id9, diagram: diagram2 };
|
|
@@ -72113,7 +72150,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
72113
72150
|
}, "detector");
|
|
72114
72151
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
72115
72152
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72116
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-
|
|
72153
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-CcyVXC1b.js");
|
|
72117
72154
|
return { diagram: diagram22 };
|
|
72118
72155
|
}, true ? [] : void 0, import.meta.url);
|
|
72119
72156
|
return { id: id10, diagram: diagram2 };
|
|
@@ -72130,7 +72167,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
72130
72167
|
}, "detector");
|
|
72131
72168
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
72132
72169
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72133
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-
|
|
72170
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-C3xERMVY.js");
|
|
72134
72171
|
return { diagram: diagram22 };
|
|
72135
72172
|
}, true ? __vite__mapDeps([23,12,13]) : void 0, import.meta.url);
|
|
72136
72173
|
return { id: id11, diagram: diagram2 };
|
|
@@ -72147,7 +72184,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
72147
72184
|
}, "detector");
|
|
72148
72185
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
72149
72186
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72150
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-
|
|
72187
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-CXOjG4Pk.js");
|
|
72151
72188
|
return { diagram: diagram22 };
|
|
72152
72189
|
}, true ? __vite__mapDeps([24,9,18]) : void 0, import.meta.url);
|
|
72153
72190
|
return { id: id12, diagram: diagram2 };
|
|
@@ -72167,7 +72204,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
72167
72204
|
}, "detector");
|
|
72168
72205
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
72169
72206
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72170
|
-
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-
|
|
72207
|
+
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-WQ6mAQ8p.js");
|
|
72171
72208
|
return { diagram: diagram22 };
|
|
72172
72209
|
}, true ? __vite__mapDeps([25,26,11,9,12,13]) : void 0, import.meta.url);
|
|
72173
72210
|
return { id: id13, diagram: diagram2 };
|
|
@@ -72187,7 +72224,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
72187
72224
|
}, "detector");
|
|
72188
72225
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
72189
72226
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72190
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-
|
|
72227
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-WQ6mAQ8p.js");
|
|
72191
72228
|
return { diagram: diagram22 };
|
|
72192
72229
|
}, true ? __vite__mapDeps([27,26,11,9,12,13]) : void 0, import.meta.url);
|
|
72193
72230
|
return { id: id14, diagram: diagram2 };
|
|
@@ -72207,7 +72244,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
72207
72244
|
}, "detector");
|
|
72208
72245
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
72209
72246
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72210
|
-
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-
|
|
72247
|
+
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-BFGMsjAA.js");
|
|
72211
72248
|
return { diagram: diagram22 };
|
|
72212
72249
|
}, true ? __vite__mapDeps([28,29,12,13,1,2,3,4]) : void 0, import.meta.url);
|
|
72213
72250
|
return { id: id15, diagram: diagram2 };
|
|
@@ -72230,7 +72267,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
72230
72267
|
}, "detector");
|
|
72231
72268
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
72232
72269
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72233
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-
|
|
72270
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-TQ4k_Ake.js");
|
|
72234
72271
|
return { diagram: diagram22 };
|
|
72235
72272
|
}, true ? __vite__mapDeps([30,29,12,13]) : void 0, import.meta.url);
|
|
72236
72273
|
return { id: id16, diagram: diagram2 };
|
|
@@ -72247,7 +72284,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
72247
72284
|
}, "detector");
|
|
72248
72285
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
72249
72286
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72250
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-
|
|
72287
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-Cf5eOwIT.js");
|
|
72251
72288
|
return { diagram: diagram22 };
|
|
72252
72289
|
}, true ? __vite__mapDeps([31,11,9,22]) : void 0, import.meta.url);
|
|
72253
72290
|
return { id: id17, diagram: diagram2 };
|
|
@@ -72317,7 +72354,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
72317
72354
|
}, "detector");
|
|
72318
72355
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
72319
72356
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72320
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
72357
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-DbCFy4Q1.js");
|
|
72321
72358
|
return { diagram: diagram22 };
|
|
72322
72359
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
72323
72360
|
return { id: id18, diagram: diagram2 };
|
|
@@ -72334,7 +72371,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
72334
72371
|
}, "detector");
|
|
72335
72372
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
72336
72373
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72337
|
-
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-
|
|
72374
|
+
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-we4olq0q.js");
|
|
72338
72375
|
return { diagram: diagram22 };
|
|
72339
72376
|
}, true ? __vite__mapDeps([32,22]) : void 0, import.meta.url);
|
|
72340
72377
|
return { id: id19, diagram: diagram2 };
|
|
@@ -72351,7 +72388,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
72351
72388
|
}, "detector");
|
|
72352
72389
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
72353
72390
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72354
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-
|
|
72391
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-DKKEXzR5.js");
|
|
72355
72392
|
return { diagram: diagram22 };
|
|
72356
72393
|
}, true ? __vite__mapDeps([33,12,13]) : void 0, import.meta.url);
|
|
72357
72394
|
return { id: id20, diagram: diagram2 };
|
|
@@ -72368,7 +72405,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
72368
72405
|
}, "detector");
|
|
72369
72406
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
72370
72407
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72371
|
-
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-
|
|
72408
|
+
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-D-AiOtub.js");
|
|
72372
72409
|
return { diagram: diagram22 };
|
|
72373
72410
|
}, true ? __vite__mapDeps([34,11]) : void 0, import.meta.url);
|
|
72374
72411
|
return { id: id21, diagram: diagram2 };
|
|
@@ -72385,7 +72422,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
72385
72422
|
}, "detector");
|
|
72386
72423
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
72387
72424
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72388
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-
|
|
72425
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-DWRyCRF7.js");
|
|
72389
72426
|
return { diagram: diagram22 };
|
|
72390
72427
|
}, true ? [] : void 0, import.meta.url);
|
|
72391
72428
|
return { id: id22, diagram: diagram2 };
|
|
@@ -72402,7 +72439,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
72402
72439
|
}, "detector");
|
|
72403
72440
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
72404
72441
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72405
|
-
const { diagram: diagram22 } = await import("./diagram-TYMM5635-
|
|
72442
|
+
const { diagram: diagram22 } = await import("./diagram-TYMM5635-DbR10Nbc.js");
|
|
72406
72443
|
return { diagram: diagram22 };
|
|
72407
72444
|
}, true ? __vite__mapDeps([35,17,19,4,2]) : void 0, import.meta.url);
|
|
72408
72445
|
return { id: id23, diagram: diagram2 };
|
|
@@ -72418,7 +72455,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
72418
72455
|
}, "detector");
|
|
72419
72456
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
72420
72457
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72421
|
-
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-
|
|
72458
|
+
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-CYOS--AG.js");
|
|
72422
72459
|
return { diagram: diagram22 };
|
|
72423
72460
|
}, true ? __vite__mapDeps([36,17,19,4,2]) : void 0, import.meta.url);
|
|
72424
72461
|
return { id: id24, diagram: diagram2 };
|
|
@@ -72434,7 +72471,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
72434
72471
|
}, "detector");
|
|
72435
72472
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
72436
72473
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72437
|
-
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-
|
|
72474
|
+
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-RROzjSS4.js");
|
|
72438
72475
|
return { diagram: diagram22 };
|
|
72439
72476
|
}, true ? __vite__mapDeps([37,11,5,1,2,14]) : void 0, import.meta.url);
|
|
72440
72477
|
return { id: id25, diagram: diagram2 };
|
|
@@ -72451,7 +72488,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
72451
72488
|
}, "detector");
|
|
72452
72489
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
72453
72490
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72454
|
-
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-
|
|
72491
|
+
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-NYjY1WSI.js");
|
|
72455
72492
|
return { diagram: diagram22 };
|
|
72456
72493
|
}, true ? __vite__mapDeps([38,17,18,19,4,2]) : void 0, import.meta.url);
|
|
72457
72494
|
return { id: id26, diagram: diagram2 };
|
|
@@ -72468,7 +72505,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
72468
72505
|
}, "detector");
|
|
72469
72506
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
72470
72507
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72471
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-
|
|
72508
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-Dk0KuAk6.js");
|
|
72472
72509
|
return { diagram: diagram22 };
|
|
72473
72510
|
}, true ? __vite__mapDeps([39,17,19,4,2,7]) : void 0, import.meta.url);
|
|
72474
72511
|
return { id: id27, diagram: diagram2 };
|
|
@@ -72485,7 +72522,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
72485
72522
|
}, "detector");
|
|
72486
72523
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
72487
72524
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72488
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-
|
|
72525
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-CIpUwlD6.js");
|
|
72489
72526
|
return { diagram: diagram22 };
|
|
72490
72527
|
}, true ? [] : void 0, import.meta.url);
|
|
72491
72528
|
return { id: id28, diagram: diagram2 };
|
|
@@ -72501,7 +72538,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
72501
72538
|
}, "detector");
|
|
72502
72539
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
72503
72540
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72504
|
-
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-
|
|
72541
|
+
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-ByyCWjrf.js");
|
|
72505
72542
|
return { diagram: diagram22 };
|
|
72506
72543
|
}, true ? [] : void 0, import.meta.url);
|
|
72507
72544
|
return { id: id29, diagram: diagram2 };
|
|
@@ -72518,7 +72555,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
72518
72555
|
}, "detector");
|
|
72519
72556
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
72520
72557
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72521
|
-
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-
|
|
72558
|
+
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-BWToylUw.js");
|
|
72522
72559
|
return { diagram: diagram22 };
|
|
72523
72560
|
}, true ? __vite__mapDeps([40,13,17,19,4,2]) : void 0, import.meta.url);
|
|
72524
72561
|
return { id: id30, diagram: diagram2 };
|
|
@@ -72534,7 +72571,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
|
|
|
72534
72571
|
}, "detector");
|
|
72535
72572
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
72536
72573
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
72537
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-
|
|
72574
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-CnkU2yG8.js");
|
|
72538
72575
|
return { diagram: diagram22 };
|
|
72539
72576
|
}, true ? __vite__mapDeps([41,17,19,4,2]) : void 0, import.meta.url);
|
|
72540
72577
|
return { id: id31, diagram: diagram2 };
|
|
@@ -83551,39 +83588,37 @@ function useElapsedTime({
|
|
|
83551
83588
|
function useRuntimeMetricsVisibility() {
|
|
83552
83589
|
return !useIsMobile();
|
|
83553
83590
|
}
|
|
83554
|
-
const card$5 = "
|
|
83555
|
-
const embedded$1 = "
|
|
83556
|
-
const collapse$1 = "
|
|
83557
|
-
const toolIcon = "
|
|
83558
|
-
const toolName$1 = "
|
|
83559
|
-
const argSummaryWrap = "
|
|
83560
|
-
const argSummary = "
|
|
83561
|
-
const argSummaryClickable = "
|
|
83562
|
-
const copyPathButton = "
|
|
83563
|
-
const spacer$1 = "
|
|
83564
|
-
const duration$2 = "
|
|
83565
|
-
const status$2 = "
|
|
83566
|
-
const pending$1 = "
|
|
83567
|
-
const success = "
|
|
83568
|
-
const error$8 = "
|
|
83569
|
-
const section$3 = "
|
|
83570
|
-
const label$6 = "
|
|
83571
|
-
const errorResult = "
|
|
83572
|
-
const plainResult = "
|
|
83573
|
-
const diffToggleBar = "
|
|
83574
|
-
const diffButton = "
|
|
83575
|
-
const diffSection = "
|
|
83576
|
-
const taskIdList = "
|
|
83577
|
-
const spinning$2 = "
|
|
83578
|
-
const spin$3 = "
|
|
83579
|
-
const generatedImage = "
|
|
83580
|
-
const generatedImageThumb = "
|
|
83581
|
-
const brokenImage = "
|
|
83582
|
-
const generatedImageLabel = "
|
|
83583
|
-
const tooltipContent = "
|
|
83584
|
-
const
|
|
83585
|
-
const goalReviewFinalResponse = "_goalReviewFinalResponse_oof09_263";
|
|
83586
|
-
const goalReviewFinalContent = "_goalReviewFinalContent_oof09_267";
|
|
83591
|
+
const card$5 = "_card_18wel_1";
|
|
83592
|
+
const embedded$1 = "_embedded_18wel_9";
|
|
83593
|
+
const collapse$1 = "_collapse_18wel_16";
|
|
83594
|
+
const toolIcon = "_toolIcon_18wel_20";
|
|
83595
|
+
const toolName$1 = "_toolName_18wel_25";
|
|
83596
|
+
const argSummaryWrap = "_argSummaryWrap_18wel_32";
|
|
83597
|
+
const argSummary = "_argSummary_18wel_32";
|
|
83598
|
+
const argSummaryClickable = "_argSummaryClickable_18wel_53";
|
|
83599
|
+
const copyPathButton = "_copyPathButton_18wel_63";
|
|
83600
|
+
const spacer$1 = "_spacer_18wel_99";
|
|
83601
|
+
const duration$2 = "_duration_18wel_103";
|
|
83602
|
+
const status$2 = "_status_18wel_111";
|
|
83603
|
+
const pending$1 = "_pending_18wel_121";
|
|
83604
|
+
const success = "_success_18wel_125";
|
|
83605
|
+
const error$8 = "_error_18wel_129";
|
|
83606
|
+
const section$3 = "_section_18wel_137";
|
|
83607
|
+
const label$6 = "_label_18wel_145";
|
|
83608
|
+
const errorResult = "_errorResult_18wel_153";
|
|
83609
|
+
const plainResult = "_plainResult_18wel_163";
|
|
83610
|
+
const diffToggleBar = "_diffToggleBar_18wel_171";
|
|
83611
|
+
const diffButton = "_diffButton_18wel_175";
|
|
83612
|
+
const diffSection = "_diffSection_18wel_195";
|
|
83613
|
+
const taskIdList = "_taskIdList_18wel_199";
|
|
83614
|
+
const spinning$2 = "_spinning_18wel_205";
|
|
83615
|
+
const spin$3 = "_spin_18wel_205";
|
|
83616
|
+
const generatedImage = "_generatedImage_18wel_216";
|
|
83617
|
+
const generatedImageThumb = "_generatedImageThumb_18wel_224";
|
|
83618
|
+
const brokenImage = "_brokenImage_18wel_232";
|
|
83619
|
+
const generatedImageLabel = "_generatedImageLabel_18wel_244";
|
|
83620
|
+
const tooltipContent = "_tooltipContent_18wel_250";
|
|
83621
|
+
const goalReviewFinalSection = "_goalReviewFinalSection_18wel_259";
|
|
83587
83622
|
const styles$Y = {
|
|
83588
83623
|
card: card$5,
|
|
83589
83624
|
embedded: embedded$1,
|
|
@@ -83615,9 +83650,7 @@ const styles$Y = {
|
|
|
83615
83650
|
brokenImage,
|
|
83616
83651
|
generatedImageLabel,
|
|
83617
83652
|
tooltipContent,
|
|
83618
|
-
|
|
83619
|
-
goalReviewFinalResponse,
|
|
83620
|
-
goalReviewFinalContent
|
|
83653
|
+
goalReviewFinalSection
|
|
83621
83654
|
};
|
|
83622
83655
|
const FILE_PATH_TOOLS = /* @__PURE__ */ new Set([
|
|
83623
83656
|
"readFile",
|
|
@@ -83944,27 +83977,6 @@ function GenerateImageResult({ result }) {
|
|
|
83944
83977
|
)
|
|
83945
83978
|
] });
|
|
83946
83979
|
}
|
|
83947
|
-
function GoalReviewCompleteResult({ result }) {
|
|
83948
|
-
const { t: t2 } = useTranslation();
|
|
83949
|
-
const reasoning2 = typeof result.reasoning === "string" ? result.reasoning : null;
|
|
83950
|
-
const finalResponse = typeof result.finalResponse === "string" ? result.finalResponse : null;
|
|
83951
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
83952
|
-
reasoning2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.goalReviewReasoning, children: [
|
|
83953
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.label, children: [
|
|
83954
|
-
t2("tool.goalReview.reasoning", "Reasoning"),
|
|
83955
|
-
":"
|
|
83956
|
-
] }),
|
|
83957
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleMarkdown, { content: reasoning2 })
|
|
83958
|
-
] }),
|
|
83959
|
-
finalResponse && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.goalReviewFinalResponse, children: [
|
|
83960
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.label, children: [
|
|
83961
|
-
t2("tool.goalReview.finalResponse", "Final Response"),
|
|
83962
|
-
":"
|
|
83963
|
-
] }),
|
|
83964
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.goalReviewFinalContent, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleMarkdown, { content: finalResponse }) })
|
|
83965
|
-
] })
|
|
83966
|
-
] });
|
|
83967
|
-
}
|
|
83968
83980
|
const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, variant = "default", isOutputStreaming = false }) {
|
|
83969
83981
|
const { t: t2 } = useTranslation();
|
|
83970
83982
|
const { theme } = useTheme();
|
|
@@ -84074,138 +84086,146 @@ const ToolCallCard = reactExports.memo(function ToolCallCard2({ toolCall, varian
|
|
|
84074
84086
|
const codeStyle = theme === "dark" ? atomOneDark : githubGist;
|
|
84075
84087
|
const waitTaskArgIds = toolCall.name === "waitTask" && Array.isArray(toolCall.args?.taskIds) ? toolCall.args.taskIds.filter((id32) => typeof id32 === "string") : [];
|
|
84076
84088
|
const waitTaskArgsForPropertyList = toolCall.name === "waitTask" && toolCall.args && typeof toolCall.args === "object" ? Object.fromEntries(Object.entries(toolCall.args).filter(([key]) => key !== "taskIds")) : null;
|
|
84077
|
-
|
|
84078
|
-
|
|
84079
|
-
|
|
84080
|
-
|
|
84081
|
-
|
|
84082
|
-
|
|
84083
|
-
|
|
84084
|
-
|
|
84085
|
-
|
|
84086
|
-
|
|
84087
|
-
|
|
84088
|
-
|
|
84089
|
-
|
|
84089
|
+
const goalReviewFinalResponse = toolCall.name === "goalReview" && toolCall.status === "success" && typeof toolCall.result === "object" && toolCall.result?.decision === "complete" ? toolCall.result.finalResponse : null;
|
|
84090
|
+
const goalReviewFinalText = typeof goalReviewFinalResponse === "string" ? goalReviewFinalResponse : null;
|
|
84091
|
+
const displayResult = goalReviewFinalText && typeof toolCall.result === "object" && toolCall.result !== null ? Object.fromEntries(
|
|
84092
|
+
Object.entries(toolCall.result).filter(([key]) => key !== "finalResponse")
|
|
84093
|
+
) : toolCall.result;
|
|
84094
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx(styles$Y.card, styles$Y[toolCall.status], variant === "embedded" && styles$Y.embedded), children: [
|
|
84095
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
84096
|
+
Collapse,
|
|
84097
|
+
{
|
|
84098
|
+
expanded: canExpand && isExpanded,
|
|
84099
|
+
onToggle: () => setIsExpanded((v2) => !v2),
|
|
84100
|
+
collapsible: canExpand,
|
|
84101
|
+
className: styles$Y.collapse,
|
|
84102
|
+
header: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
84103
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolIcon, { size: 14, className: styles$Y.toolIcon }),
|
|
84104
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$Y.toolName, children: toolCall.name }),
|
|
84105
|
+
displayedArgSummary && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$Y.argSummaryWrap, children: [
|
|
84106
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84107
|
+
AppTooltip,
|
|
84108
|
+
{
|
|
84109
|
+
content: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$Y.tooltipContent, children: argTooltip }),
|
|
84110
|
+
side: "bottom",
|
|
84111
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84112
|
+
"span",
|
|
84113
|
+
{
|
|
84114
|
+
className: clsx(styles$Y.argSummary, filePath2 ? styles$Y.argSummaryClickable : ""),
|
|
84115
|
+
onClick: filePath2 ? (e3) => {
|
|
84116
|
+
e3.stopPropagation();
|
|
84117
|
+
handleOpenFile();
|
|
84118
|
+
} : void 0,
|
|
84119
|
+
children: displayedArgSummary
|
|
84120
|
+
}
|
|
84121
|
+
)
|
|
84122
|
+
}
|
|
84123
|
+
),
|
|
84124
|
+
filePath2 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84125
|
+
"button",
|
|
84126
|
+
{
|
|
84127
|
+
type: "button",
|
|
84128
|
+
className: styles$Y.copyPathButton,
|
|
84129
|
+
onClick: handleCopyPath,
|
|
84130
|
+
"aria-label": pathCopied ? "已复制路径" : "复制路径",
|
|
84131
|
+
title: pathCopied ? "已复制路径" : "复制路径",
|
|
84132
|
+
children: pathCopied ? /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { size: 12 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { size: 12 })
|
|
84133
|
+
}
|
|
84134
|
+
)
|
|
84135
|
+
] }),
|
|
84136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$Y.spacer }),
|
|
84137
|
+
duration2 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$Y.duration, children: duration2 }),
|
|
84138
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: styles$Y.status, children: [
|
|
84139
|
+
statusIcon2,
|
|
84140
|
+
statusText2
|
|
84141
|
+
] })
|
|
84142
|
+
] }),
|
|
84143
|
+
children: [
|
|
84144
|
+
diff && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.diffToggleBar, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
84145
|
+
"button",
|
|
84090
84146
|
{
|
|
84091
|
-
|
|
84092
|
-
|
|
84093
|
-
children:
|
|
84094
|
-
|
|
84095
|
-
|
|
84096
|
-
|
|
84097
|
-
onClick: filePath2 ? (e3) => {
|
|
84098
|
-
e3.stopPropagation();
|
|
84099
|
-
handleOpenFile();
|
|
84100
|
-
} : void 0,
|
|
84101
|
-
children: displayedArgSummary
|
|
84102
|
-
}
|
|
84103
|
-
)
|
|
84147
|
+
className: styles$Y.diffButton,
|
|
84148
|
+
onClick: () => setShowDiff((v2) => !v2),
|
|
84149
|
+
children: [
|
|
84150
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FileCodeCorner, { size: 12 }),
|
|
84151
|
+
showDiff ? t2("tool.viewDetails") : t2("tool.viewChanges")
|
|
84152
|
+
]
|
|
84104
84153
|
}
|
|
84105
|
-
),
|
|
84106
|
-
|
|
84107
|
-
|
|
84154
|
+
) }),
|
|
84155
|
+
showDiff && diff ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.diffSection, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DiffViewer, { patch: diff }) }) : readContent ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.diffSection, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84156
|
+
SyntaxHighlighter,
|
|
84108
84157
|
{
|
|
84109
|
-
|
|
84110
|
-
|
|
84111
|
-
|
|
84112
|
-
|
|
84113
|
-
|
|
84114
|
-
|
|
84158
|
+
style: codeStyle,
|
|
84159
|
+
language: readLanguage,
|
|
84160
|
+
PreTag: "div",
|
|
84161
|
+
customStyle: {
|
|
84162
|
+
borderRadius: "6px",
|
|
84163
|
+
margin: "0",
|
|
84164
|
+
fontSize: "12px",
|
|
84165
|
+
padding: "12px",
|
|
84166
|
+
border: "1px solid var(--border-color)"
|
|
84167
|
+
},
|
|
84168
|
+
codeTagProps: {
|
|
84169
|
+
style: {
|
|
84170
|
+
fontFamily: "monospace",
|
|
84171
|
+
lineHeight: 1.5
|
|
84172
|
+
}
|
|
84173
|
+
},
|
|
84174
|
+
children: readContent
|
|
84115
84175
|
}
|
|
84116
|
-
)
|
|
84117
|
-
|
|
84118
|
-
|
|
84119
|
-
|
|
84120
|
-
|
|
84121
|
-
|
|
84122
|
-
|
|
84123
|
-
|
|
84124
|
-
|
|
84125
|
-
|
|
84126
|
-
|
|
84127
|
-
|
|
84128
|
-
|
|
84129
|
-
|
|
84130
|
-
|
|
84131
|
-
|
|
84132
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FileCodeCorner, { size: 12 }),
|
|
84133
|
-
showDiff ? t2("tool.viewDetails") : t2("tool.viewChanges")
|
|
84134
|
-
]
|
|
84135
|
-
}
|
|
84136
|
-
) }),
|
|
84137
|
-
showDiff && diff ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.diffSection, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DiffViewer, { patch: diff }) }) : readContent ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.diffSection, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84138
|
-
SyntaxHighlighter,
|
|
84139
|
-
{
|
|
84140
|
-
style: codeStyle,
|
|
84141
|
-
language: readLanguage,
|
|
84142
|
-
PreTag: "div",
|
|
84143
|
-
customStyle: {
|
|
84144
|
-
borderRadius: "6px",
|
|
84145
|
-
margin: "0",
|
|
84146
|
-
fontSize: "12px",
|
|
84147
|
-
padding: "12px",
|
|
84148
|
-
border: "1px solid var(--border-color)"
|
|
84149
|
-
},
|
|
84150
|
-
codeTagProps: {
|
|
84151
|
-
style: {
|
|
84152
|
-
fontFamily: "monospace",
|
|
84153
|
-
lineHeight: 1.5
|
|
84154
|
-
}
|
|
84155
|
-
},
|
|
84156
|
-
children: readContent
|
|
84157
|
-
}
|
|
84158
|
-
) }) : isWaitTaskResult && waitTaskResults ? /* @__PURE__ */ jsxRuntimeExports.jsx(TaskResultAccordion, { items: waitTaskResults }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
84159
|
-
toolCall.args && typeof toolCall.args === "object" && Object.keys(toolCall.args).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.section, children: [
|
|
84160
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.label, children: [
|
|
84161
|
-
t2("tool.arguments"),
|
|
84162
|
-
":"
|
|
84163
|
-
] }),
|
|
84164
|
-
toolCall.name === "waitTask" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
84165
|
-
waitTaskArgIds.length > 0 && renderWaitTaskArgLinks(waitTaskArgIds),
|
|
84166
|
-
waitTaskArgsForPropertyList && Object.keys(waitTaskArgsForPropertyList).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84176
|
+
) }) : isWaitTaskResult && waitTaskResults ? /* @__PURE__ */ jsxRuntimeExports.jsx(TaskResultAccordion, { items: waitTaskResults }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
84177
|
+
toolCall.args && typeof toolCall.args === "object" && Object.keys(toolCall.args).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.section, children: [
|
|
84178
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.label, children: [
|
|
84179
|
+
t2("tool.arguments"),
|
|
84180
|
+
":"
|
|
84181
|
+
] }),
|
|
84182
|
+
toolCall.name === "waitTask" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
84183
|
+
waitTaskArgIds.length > 0 && renderWaitTaskArgLinks(waitTaskArgIds),
|
|
84184
|
+
waitTaskArgsForPropertyList && Object.keys(waitTaskArgsForPropertyList).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84185
|
+
PropertyList,
|
|
84186
|
+
{
|
|
84187
|
+
data: waitTaskArgsForPropertyList,
|
|
84188
|
+
markdownKeys: ARGS_MARKDOWN_KEYS[toolCall.name]
|
|
84189
|
+
}
|
|
84190
|
+
)
|
|
84191
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84167
84192
|
PropertyList,
|
|
84168
84193
|
{
|
|
84169
|
-
data:
|
|
84194
|
+
data: toolCall.args,
|
|
84170
84195
|
markdownKeys: ARGS_MARKDOWN_KEYS[toolCall.name]
|
|
84171
84196
|
}
|
|
84172
84197
|
)
|
|
84173
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84174
|
-
PropertyList,
|
|
84175
|
-
{
|
|
84176
|
-
data: toolCall.args,
|
|
84177
|
-
markdownKeys: ARGS_MARKDOWN_KEYS[toolCall.name]
|
|
84178
|
-
}
|
|
84179
|
-
)
|
|
84180
|
-
] }),
|
|
84181
|
-
toolCall.status !== "pending" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.section, children: [
|
|
84182
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.label, children: [
|
|
84183
|
-
toolCall.error ? t2("tool.error") : t2("tool.result"),
|
|
84184
|
-
":"
|
|
84185
84198
|
] }),
|
|
84186
|
-
toolCall.
|
|
84187
|
-
|
|
84188
|
-
|
|
84189
|
-
|
|
84190
|
-
|
|
84191
|
-
}
|
|
84192
|
-
|
|
84199
|
+
toolCall.status !== "pending" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.section, children: [
|
|
84200
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$Y.label, children: [
|
|
84201
|
+
toolCall.error ? t2("tool.error") : t2("tool.result"),
|
|
84202
|
+
":"
|
|
84203
|
+
] }),
|
|
84204
|
+
toolCall.error ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.errorResult, children: toolCall.error }) : displayResult !== void 0 && displayResult !== null ? toolCall.name === "generateImage" && typeof displayResult === "object" && displayResult?.attachment ? /* @__PURE__ */ jsxRuntimeExports.jsx(GenerateImageResult, { result: displayResult }) : toolCall.name === "sendFile" && typeof displayResult === "object" && displayResult?.attachment ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.section, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AttachmentDisplay, { attachment: displayResult.attachment }) }) : toolCall.name === "task" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84205
|
+
PropertyList,
|
|
84206
|
+
{
|
|
84207
|
+
data: unwrapTaskResult(displayResult),
|
|
84208
|
+
markdownKeys: ["result"]
|
|
84209
|
+
}
|
|
84210
|
+
) : typeof displayResult === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleMarkdown, { content: displayResult }) : typeof displayResult === "object" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PropertyList, { data: displayResult }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.plainResult, children: String(displayResult) }) : null
|
|
84211
|
+
] })
|
|
84193
84212
|
] })
|
|
84194
|
-
]
|
|
84195
|
-
|
|
84196
|
-
|
|
84197
|
-
|
|
84213
|
+
]
|
|
84214
|
+
}
|
|
84215
|
+
),
|
|
84216
|
+
goalReviewFinalText && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$Y.goalReviewFinalSection, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleMarkdown, { content: goalReviewFinalText }) })
|
|
84217
|
+
] });
|
|
84198
84218
|
}, arePropsEqual);
|
|
84199
|
-
const container$g = "
|
|
84200
|
-
const embedded = "
|
|
84201
|
-
const streaming = "
|
|
84202
|
-
const brainIcon = "
|
|
84203
|
-
const title$d = "
|
|
84204
|
-
const status$1 = "
|
|
84205
|
-
const collapse = "
|
|
84206
|
-
const spacer = "
|
|
84207
|
-
const duration$1 = "
|
|
84208
|
-
const text = "
|
|
84219
|
+
const container$g = "_container_fc33h_1";
|
|
84220
|
+
const embedded = "_embedded_fc33h_9";
|
|
84221
|
+
const streaming = "_streaming_fc33h_16";
|
|
84222
|
+
const brainIcon = "_brainIcon_fc33h_16";
|
|
84223
|
+
const title$d = "_title_fc33h_17";
|
|
84224
|
+
const status$1 = "_status_fc33h_18";
|
|
84225
|
+
const collapse = "_collapse_fc33h_22";
|
|
84226
|
+
const spacer = "_spacer_fc33h_38";
|
|
84227
|
+
const duration$1 = "_duration_fc33h_42";
|
|
84228
|
+
const text = "_text_fc33h_67";
|
|
84209
84229
|
const styles$X = {
|
|
84210
84230
|
container: container$g,
|
|
84211
84231
|
embedded,
|
|
@@ -84917,73 +84937,73 @@ function TabBlocksRenderer({
|
|
|
84917
84937
|
}
|
|
84918
84938
|
);
|
|
84919
84939
|
}
|
|
84920
|
-
const message$4 = "
|
|
84921
|
-
const fullWidth = "
|
|
84922
|
-
const user = "
|
|
84923
|
-
const agent$2 = "
|
|
84924
|
-
const collapsedMessage = "
|
|
84925
|
-
const groupLayout = "
|
|
84926
|
-
const agentShellCompact = "
|
|
84927
|
-
const avatarCol$1 = "
|
|
84928
|
-
const senderHeader = "
|
|
84929
|
-
const contentCol = "
|
|
84930
|
-
const senderLabel = "
|
|
84931
|
-
const senderName = "
|
|
84932
|
-
const bubble = "
|
|
84933
|
-
const collapsedBubble = "
|
|
84934
|
-
const hasUsage = "
|
|
84935
|
-
const embeddedBubble = "
|
|
84936
|
-
const textBubble = "
|
|
84937
|
-
const textSection = "
|
|
84938
|
-
const embeddedBubbleContent = "
|
|
84939
|
-
const content$8 = "
|
|
84940
|
-
const messageFooter = "
|
|
84941
|
-
const groupMetaFooter = "
|
|
84942
|
-
const messageFooterActions = "
|
|
84943
|
-
const timestamp = "
|
|
84944
|
-
const copyButton$1 = "
|
|
84945
|
-
const errorBlock = "
|
|
84946
|
-
const errorHeader = "
|
|
84947
|
-
const errorType = "
|
|
84948
|
-
const errorMessage$1 = "
|
|
84949
|
-
const errorDetails = "
|
|
84950
|
-
const errorDetailsSummary = "
|
|
84951
|
-
const errorDetailsSummaryRow = "
|
|
84952
|
-
const errorDetailsCopyButton = "
|
|
84953
|
-
const errorDetailsContent = "
|
|
84954
|
-
const collapsedContent = "
|
|
84955
|
-
const virtualCollapsedBlocks = "
|
|
84956
|
-
const expandedContent = "
|
|
84957
|
-
const conclusionStrip = "
|
|
84958
|
-
const conclusionLabel = "
|
|
84959
|
-
const conclusionText = "
|
|
84960
|
-
const expandButton$1 = "
|
|
84961
|
-
const messageMetrics = "
|
|
84962
|
-
const embeddedMessageMetrics = "
|
|
84963
|
-
const fallbackTransitionBanner = "
|
|
84964
|
-
const messageMetricsPrimary = "
|
|
84965
|
-
const embeddedMessageMetricsPrimary = "
|
|
84966
|
-
const messageMetricsMeta = "
|
|
84967
|
-
const metricsStreaming = "
|
|
84968
|
-
const fallbackTransitionIcon = "
|
|
84969
|
-
const fallbackTransitionText = "
|
|
84970
|
-
const tokenUsage = "
|
|
84971
|
-
const duration = "
|
|
84972
|
-
const modelLabel = "
|
|
84973
|
-
const modelLabelFallback = "
|
|
84974
|
-
const system = "
|
|
84975
|
-
const systemBubble = "
|
|
84976
|
-
const systemContent = "
|
|
84977
|
-
const loadingSpinner = "
|
|
84978
|
-
const supervisorTag = "
|
|
84979
|
-
const memoryWriteButton = "
|
|
84980
|
-
const statusArea = "
|
|
84981
|
-
const statusDot$1 = "
|
|
84982
|
-
const dot$2 = "
|
|
84983
|
-
const dotSending = "
|
|
84984
|
-
const dotError = "
|
|
84985
|
-
const retryButton = "
|
|
84986
|
-
const recallButton = "
|
|
84940
|
+
const message$4 = "_message_jvly0_1";
|
|
84941
|
+
const fullWidth = "_fullWidth_jvly0_8";
|
|
84942
|
+
const user = "_user_jvly0_12";
|
|
84943
|
+
const agent$2 = "_agent_jvly0_17";
|
|
84944
|
+
const collapsedMessage = "_collapsedMessage_jvly0_22";
|
|
84945
|
+
const groupLayout = "_groupLayout_jvly0_30";
|
|
84946
|
+
const agentShellCompact = "_agentShellCompact_jvly0_38";
|
|
84947
|
+
const avatarCol$1 = "_avatarCol_jvly0_43";
|
|
84948
|
+
const senderHeader = "_senderHeader_jvly0_57";
|
|
84949
|
+
const contentCol = "_contentCol_jvly0_63";
|
|
84950
|
+
const senderLabel = "_senderLabel_jvly0_84";
|
|
84951
|
+
const senderName = "_senderName_jvly0_101";
|
|
84952
|
+
const bubble = "_bubble_jvly0_107";
|
|
84953
|
+
const collapsedBubble = "_collapsedBubble_jvly0_133";
|
|
84954
|
+
const hasUsage = "_hasUsage_jvly0_137";
|
|
84955
|
+
const embeddedBubble = "_embeddedBubble_jvly0_141";
|
|
84956
|
+
const textBubble = "_textBubble_jvly0_147";
|
|
84957
|
+
const textSection = "_textSection_jvly0_163";
|
|
84958
|
+
const embeddedBubbleContent = "_embeddedBubbleContent_jvly0_182";
|
|
84959
|
+
const content$8 = "_content_jvly0_63";
|
|
84960
|
+
const messageFooter = "_messageFooter_jvly0_208";
|
|
84961
|
+
const groupMetaFooter = "_groupMetaFooter_jvly0_216";
|
|
84962
|
+
const messageFooterActions = "_messageFooterActions_jvly0_242";
|
|
84963
|
+
const timestamp = "_timestamp_jvly0_266";
|
|
84964
|
+
const copyButton$1 = "_copyButton_jvly0_277";
|
|
84965
|
+
const errorBlock = "_errorBlock_jvly0_306";
|
|
84966
|
+
const errorHeader = "_errorHeader_jvly0_314";
|
|
84967
|
+
const errorType = "_errorType_jvly0_322";
|
|
84968
|
+
const errorMessage$1 = "_errorMessage_jvly0_327";
|
|
84969
|
+
const errorDetails = "_errorDetails_jvly0_333";
|
|
84970
|
+
const errorDetailsSummary = "_errorDetailsSummary_jvly0_339";
|
|
84971
|
+
const errorDetailsSummaryRow = "_errorDetailsSummaryRow_jvly0_347";
|
|
84972
|
+
const errorDetailsCopyButton = "_errorDetailsCopyButton_jvly0_354";
|
|
84973
|
+
const errorDetailsContent = "_errorDetailsContent_jvly0_376";
|
|
84974
|
+
const collapsedContent = "_collapsedContent_jvly0_389";
|
|
84975
|
+
const virtualCollapsedBlocks = "_virtualCollapsedBlocks_jvly0_407";
|
|
84976
|
+
const expandedContent = "_expandedContent_jvly0_415";
|
|
84977
|
+
const conclusionStrip = "_conclusionStrip_jvly0_420";
|
|
84978
|
+
const conclusionLabel = "_conclusionLabel_jvly0_434";
|
|
84979
|
+
const conclusionText = "_conclusionText_jvly0_442";
|
|
84980
|
+
const expandButton$1 = "_expandButton_jvly0_448";
|
|
84981
|
+
const messageMetrics = "_messageMetrics_jvly0_475";
|
|
84982
|
+
const embeddedMessageMetrics = "_embeddedMessageMetrics_jvly0_490";
|
|
84983
|
+
const fallbackTransitionBanner = "_fallbackTransitionBanner_jvly0_503";
|
|
84984
|
+
const messageMetricsPrimary = "_messageMetricsPrimary_jvly0_507";
|
|
84985
|
+
const embeddedMessageMetricsPrimary = "_embeddedMessageMetricsPrimary_jvly0_515";
|
|
84986
|
+
const messageMetricsMeta = "_messageMetricsMeta_jvly0_520";
|
|
84987
|
+
const metricsStreaming = "_metricsStreaming_jvly0_548";
|
|
84988
|
+
const fallbackTransitionIcon = "_fallbackTransitionIcon_jvly0_580";
|
|
84989
|
+
const fallbackTransitionText = "_fallbackTransitionText_jvly0_585";
|
|
84990
|
+
const tokenUsage = "_tokenUsage_jvly0_602";
|
|
84991
|
+
const duration = "_duration_jvly0_611";
|
|
84992
|
+
const modelLabel = "_modelLabel_jvly0_621";
|
|
84993
|
+
const modelLabelFallback = "_modelLabelFallback_jvly0_631";
|
|
84994
|
+
const system = "_system_jvly0_643";
|
|
84995
|
+
const systemBubble = "_systemBubble_jvly0_650";
|
|
84996
|
+
const systemContent = "_systemContent_jvly0_662";
|
|
84997
|
+
const loadingSpinner = "_loadingSpinner_jvly0_669";
|
|
84998
|
+
const supervisorTag = "_supervisorTag_jvly0_685";
|
|
84999
|
+
const memoryWriteButton = "_memoryWriteButton_jvly0_724";
|
|
85000
|
+
const statusArea = "_statusArea_jvly0_731";
|
|
85001
|
+
const statusDot$1 = "_statusDot_jvly0_739";
|
|
85002
|
+
const dot$2 = "_dot_jvly0_748";
|
|
85003
|
+
const dotSending = "_dotSending_jvly0_756";
|
|
85004
|
+
const dotError = "_dotError_jvly0_760";
|
|
85005
|
+
const retryButton = "_retryButton_jvly0_765";
|
|
85006
|
+
const recallButton = "_recallButton_jvly0_775";
|
|
84987
85007
|
const styles$R = {
|
|
84988
85008
|
message: message$4,
|
|
84989
85009
|
fullWidth,
|
|
@@ -86370,7 +86390,8 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
86370
86390
|
);
|
|
86371
86391
|
reactExports.useImperativeHandle(ref, () => ({
|
|
86372
86392
|
scrollToTop: scroll.scrollToTop,
|
|
86373
|
-
scrollToBottom: scroll.scrollToBottom
|
|
86393
|
+
scrollToBottom: scroll.scrollToBottom,
|
|
86394
|
+
forceScrollToBottom: scroll.forceScrollToBottom
|
|
86374
86395
|
}));
|
|
86375
86396
|
if (loading2 && messages.length === 0) {
|
|
86376
86397
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$P.container, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$P.centerState, children: t2("common.loading") }) });
|
|
@@ -86390,6 +86411,7 @@ const MessageList = reactExports.forwardRef(function MessageList2({ sessionId, o
|
|
|
86390
86411
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
86391
86412
|
"div",
|
|
86392
86413
|
{
|
|
86414
|
+
"data-testid": "message-list-scroll-container",
|
|
86393
86415
|
className: styles$P.container,
|
|
86394
86416
|
ref: scroll.containerRef,
|
|
86395
86417
|
onScroll: scroll.handleScroll,
|
|
@@ -87400,7 +87422,7 @@ const memberCount = "_memberCount_by40x_78";
|
|
|
87400
87422
|
const titleField$1 = "_titleField_by40x_85";
|
|
87401
87423
|
const titleInput$1 = "_titleInput_by40x_89";
|
|
87402
87424
|
const titleError = "_titleError_by40x_110";
|
|
87403
|
-
const hint$
|
|
87425
|
+
const hint$5 = "_hint_by40x_117";
|
|
87404
87426
|
const actions$6 = "_actions_by40x_123";
|
|
87405
87427
|
const styles$K = {
|
|
87406
87428
|
overlay: overlay$6,
|
|
@@ -87416,7 +87438,7 @@ const styles$K = {
|
|
|
87416
87438
|
titleField: titleField$1,
|
|
87417
87439
|
titleInput: titleInput$1,
|
|
87418
87440
|
titleError,
|
|
87419
|
-
hint: hint$
|
|
87441
|
+
hint: hint$5,
|
|
87420
87442
|
actions: actions$6
|
|
87421
87443
|
};
|
|
87422
87444
|
const log$j = createLogger("CreateSessionDialog");
|
|
@@ -88191,19 +88213,20 @@ function ChatHeaderBar({
|
|
|
88191
88213
|
)
|
|
88192
88214
|
] });
|
|
88193
88215
|
}
|
|
88194
|
-
const dropdown$2 = "
|
|
88195
|
-
const dropdownInline = "
|
|
88196
|
-
const dropdownPortal = "
|
|
88197
|
-
const item$7 = "
|
|
88198
|
-
const active$1 = "
|
|
88199
|
-
const name$1 = "
|
|
88200
|
-
const description$5 = "
|
|
88201
|
-
const commandInfo = "
|
|
88202
|
-
const shortcut = "
|
|
88203
|
-
const agentInfo$1 = "
|
|
88204
|
-
const agentDesc$1 = "
|
|
88205
|
-
const allItem = "
|
|
88206
|
-
const allIcon = "
|
|
88216
|
+
const dropdown$2 = "_dropdown_z2x35_1";
|
|
88217
|
+
const dropdownInline = "_dropdownInline_z2x35_12";
|
|
88218
|
+
const dropdownPortal = "_dropdownPortal_z2x35_20";
|
|
88219
|
+
const item$7 = "_item_z2x35_26";
|
|
88220
|
+
const active$1 = "_active_z2x35_40";
|
|
88221
|
+
const name$1 = "_name_z2x35_46";
|
|
88222
|
+
const description$5 = "_description_z2x35_52";
|
|
88223
|
+
const commandInfo = "_commandInfo_z2x35_60";
|
|
88224
|
+
const shortcut = "_shortcut_z2x35_68";
|
|
88225
|
+
const agentInfo$1 = "_agentInfo_z2x35_79";
|
|
88226
|
+
const agentDesc$1 = "_agentDesc_z2x35_86";
|
|
88227
|
+
const allItem = "_allItem_z2x35_96";
|
|
88228
|
+
const allIcon = "_allIcon_z2x35_112";
|
|
88229
|
+
const hint$4 = "_hint_z2x35_122";
|
|
88207
88230
|
const dropdownStyles = {
|
|
88208
88231
|
dropdown: dropdown$2,
|
|
88209
88232
|
dropdownInline,
|
|
@@ -88217,14 +88240,16 @@ const dropdownStyles = {
|
|
|
88217
88240
|
agentInfo: agentInfo$1,
|
|
88218
88241
|
agentDesc: agentDesc$1,
|
|
88219
88242
|
allItem,
|
|
88220
|
-
allIcon
|
|
88243
|
+
allIcon,
|
|
88244
|
+
hint: hint$4
|
|
88221
88245
|
};
|
|
88222
|
-
const isMac = navigator.platform.toUpperCase().includes("MAC");
|
|
88246
|
+
const isMac = typeof navigator !== "undefined" && navigator.platform.toUpperCase().includes("MAC");
|
|
88223
88247
|
const COMMAND_SHORTCUTS = {
|
|
88224
88248
|
"/compact": isMac ? "⌘K" : "Ctrl+K",
|
|
88225
88249
|
"/clear": isMac ? "⌘⇧⌫" : "Ctrl+Shift+⌫"
|
|
88226
88250
|
};
|
|
88227
|
-
function CommandDropdown({ commands, activeIndex, onSelect, onClose, anchorRef, style, portal }) {
|
|
88251
|
+
function CommandDropdown({ commands, activeIndex, onSelect, onClose, anchorRef, style, portal, showHint }) {
|
|
88252
|
+
const { t: t2 } = useTranslation();
|
|
88228
88253
|
const dropdownRef = reactExports.useRef(null);
|
|
88229
88254
|
const itemRefs = reactExports.useRef([]);
|
|
88230
88255
|
reactExports.useEffect(() => {
|
|
@@ -88240,30 +88265,36 @@ function CommandDropdown({ commands, activeIndex, onSelect, onClose, anchorRef,
|
|
|
88240
88265
|
document.addEventListener("mousedown", handlePointerDown);
|
|
88241
88266
|
return () => document.removeEventListener("mousedown", handlePointerDown);
|
|
88242
88267
|
}, [anchorRef, onClose]);
|
|
88243
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
88268
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
88244
88269
|
"div",
|
|
88245
88270
|
{
|
|
88246
88271
|
ref: dropdownRef,
|
|
88247
88272
|
className: clsx(dropdownStyles.dropdown, portal ? dropdownStyles.dropdownPortal : dropdownStyles.dropdownInline),
|
|
88248
88273
|
style,
|
|
88249
|
-
|
|
88250
|
-
|
|
88251
|
-
|
|
88252
|
-
|
|
88253
|
-
|
|
88274
|
+
role: "listbox",
|
|
88275
|
+
children: [
|
|
88276
|
+
commands.map((command2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
88277
|
+
"div",
|
|
88278
|
+
{
|
|
88279
|
+
ref: (el) => {
|
|
88280
|
+
itemRefs.current[index2] = el;
|
|
88281
|
+
},
|
|
88282
|
+
className: clsx(dropdownStyles.item, index2 === activeIndex ? dropdownStyles.active : ""),
|
|
88283
|
+
onClick: () => onSelect(command2),
|
|
88284
|
+
role: "option",
|
|
88285
|
+
"aria-selected": index2 === activeIndex,
|
|
88286
|
+
children: [
|
|
88287
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: dropdownStyles.commandInfo, children: [
|
|
88288
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: dropdownStyles.name, children: command2.name }),
|
|
88289
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: dropdownStyles.description, children: command2.description })
|
|
88290
|
+
] }),
|
|
88291
|
+
COMMAND_SHORTCUTS[command2.name] && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: dropdownStyles.shortcut, children: COMMAND_SHORTCUTS[command2.name] })
|
|
88292
|
+
]
|
|
88254
88293
|
},
|
|
88255
|
-
|
|
88256
|
-
|
|
88257
|
-
|
|
88258
|
-
|
|
88259
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: dropdownStyles.name, children: command2.name }),
|
|
88260
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: dropdownStyles.description, children: command2.description })
|
|
88261
|
-
] }),
|
|
88262
|
-
COMMAND_SHORTCUTS[command2.name] && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: dropdownStyles.shortcut, children: COMMAND_SHORTCUTS[command2.name] })
|
|
88263
|
-
]
|
|
88264
|
-
},
|
|
88265
|
-
command2.name
|
|
88266
|
-
))
|
|
88294
|
+
command2.name
|
|
88295
|
+
)),
|
|
88296
|
+
showHint && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: dropdownStyles.hint, children: t2("command.skillHint", "继续输入以搜索 Skills") })
|
|
88297
|
+
]
|
|
88267
88298
|
}
|
|
88268
88299
|
);
|
|
88269
88300
|
}
|
|
@@ -88799,7 +88830,7 @@ function AttachmentItem({ file, onRemove: onRemove2 }) {
|
|
|
88799
88830
|
URL.revokeObjectURL(objectUrl);
|
|
88800
88831
|
};
|
|
88801
88832
|
}, [file, isImage]);
|
|
88802
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.attachmentItem, children: [
|
|
88833
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.attachmentItem, "data-testid": "draft-attachment", children: [
|
|
88803
88834
|
previewUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: previewUrl, alt: file.name, className: styles$H.imagePreview }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Icon2, { className: styles$H.fileIcon, size: 16 }),
|
|
88804
88835
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$H.fileInfo, children: [
|
|
88805
88836
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$H.fileName, children: file.name }),
|
|
@@ -88956,6 +88987,9 @@ function partitionFiles(files, maxSize = DEFAULT_MAX_ATTACHMENT_SIZE) {
|
|
|
88956
88987
|
function toFileBlobPart(data) {
|
|
88957
88988
|
return data instanceof Uint8Array ? data.slice() : new Uint8Array(data);
|
|
88958
88989
|
}
|
|
88990
|
+
function isNotDirectoryError(error2) {
|
|
88991
|
+
return error2 instanceof Error && error2.message.includes("路径不是目录");
|
|
88992
|
+
}
|
|
88959
88993
|
function useAttachmentIntake({ updateAttachments, showToast, t: t2 }) {
|
|
88960
88994
|
const [dragOver2, setDragOver] = reactExports.useState(false);
|
|
88961
88995
|
const [pasteHighlight2, setPasteHighlight] = reactExports.useState(false);
|
|
@@ -89007,7 +89041,7 @@ function useAttachmentIntake({ updateAttachments, showToast, t: t2 }) {
|
|
|
89007
89041
|
}
|
|
89008
89042
|
return true;
|
|
89009
89043
|
} catch (error2) {
|
|
89010
|
-
if (error2
|
|
89044
|
+
if (isNotDirectoryError(error2)) {
|
|
89011
89045
|
return false;
|
|
89012
89046
|
}
|
|
89013
89047
|
showToast(error2 instanceof Error ? error2.message : t2("input.directoryAttachmentFailed"), "error");
|
|
@@ -89233,27 +89267,27 @@ function parseMentionIdsFromContent(content2, agents) {
|
|
|
89233
89267
|
}
|
|
89234
89268
|
return mentionIds;
|
|
89235
89269
|
}
|
|
89236
|
-
const container$b = "
|
|
89237
|
-
const containerDropdownOpen = "
|
|
89238
|
-
const wrapper$3 = "
|
|
89239
|
-
const inputWrapper$1 = "
|
|
89240
|
-
const inputWrapperMultiline = "
|
|
89241
|
-
const inputWrapperDropdownOpen = "
|
|
89242
|
-
const textarea$2 = "
|
|
89243
|
-
const icon$4 = "
|
|
89244
|
-
const attachButton = "
|
|
89245
|
-
const buttonGroup = "
|
|
89246
|
-
const leftButtonGroup = "
|
|
89247
|
-
const commandButton = "
|
|
89248
|
-
const commandButtonActive = "
|
|
89249
|
-
const commandButtonLabel = "
|
|
89250
|
-
const commandSlash = "
|
|
89251
|
-
const quickReplyButton = "
|
|
89252
|
-
const quickReplyButtonActive = "
|
|
89253
|
-
const quickReplyButtonLabel = "
|
|
89254
|
-
const dragOver = "
|
|
89255
|
-
const pasteHighlight = "
|
|
89256
|
-
const attachmentSection = "
|
|
89270
|
+
const container$b = "_container_u4eqk_1";
|
|
89271
|
+
const containerDropdownOpen = "_containerDropdownOpen_u4eqk_7";
|
|
89272
|
+
const wrapper$3 = "_wrapper_u4eqk_12";
|
|
89273
|
+
const inputWrapper$1 = "_inputWrapper_u4eqk_16";
|
|
89274
|
+
const inputWrapperMultiline = "_inputWrapperMultiline_u4eqk_38";
|
|
89275
|
+
const inputWrapperDropdownOpen = "_inputWrapperDropdownOpen_u4eqk_42";
|
|
89276
|
+
const textarea$2 = "_textarea_u4eqk_47";
|
|
89277
|
+
const icon$4 = "_icon_u4eqk_71";
|
|
89278
|
+
const attachButton = "_attachButton_u4eqk_83";
|
|
89279
|
+
const buttonGroup = "_buttonGroup_u4eqk_96";
|
|
89280
|
+
const leftButtonGroup = "_leftButtonGroup_u4eqk_104";
|
|
89281
|
+
const commandButton = "_commandButton_u4eqk_112";
|
|
89282
|
+
const commandButtonActive = "_commandButtonActive_u4eqk_136";
|
|
89283
|
+
const commandButtonLabel = "_commandButtonLabel_u4eqk_142";
|
|
89284
|
+
const commandSlash = "_commandSlash_u4eqk_146";
|
|
89285
|
+
const quickReplyButton = "_quickReplyButton_u4eqk_152";
|
|
89286
|
+
const quickReplyButtonActive = "_quickReplyButtonActive_u4eqk_176";
|
|
89287
|
+
const quickReplyButtonLabel = "_quickReplyButtonLabel_u4eqk_182";
|
|
89288
|
+
const dragOver = "_dragOver_u4eqk_191";
|
|
89289
|
+
const pasteHighlight = "_pasteHighlight_u4eqk_196";
|
|
89290
|
+
const attachmentSection = "_attachmentSection_u4eqk_201";
|
|
89257
89291
|
const styles$G = {
|
|
89258
89292
|
container: container$b,
|
|
89259
89293
|
containerDropdownOpen,
|
|
@@ -89290,7 +89324,8 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89290
89324
|
sessionId,
|
|
89291
89325
|
conversationType,
|
|
89292
89326
|
memberAgentIds: memberAgentIdsProp,
|
|
89293
|
-
placeholder: externalPlaceholder
|
|
89327
|
+
placeholder: externalPlaceholder,
|
|
89328
|
+
availableSkills
|
|
89294
89329
|
}, ref) {
|
|
89295
89330
|
const {
|
|
89296
89331
|
input: input2,
|
|
@@ -89315,6 +89350,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89315
89350
|
const [isMultiline, setIsMultiline] = reactExports.useState(false);
|
|
89316
89351
|
const suppressMentionRef = reactExports.useRef(false);
|
|
89317
89352
|
const suppressCommandDropdownRef = reactExports.useRef(false);
|
|
89353
|
+
const commandDropdownByButtonRef = reactExports.useRef(false);
|
|
89318
89354
|
const inputWrapperRef = reactExports.useRef(null);
|
|
89319
89355
|
const commandButtonRef = reactExports.useRef(null);
|
|
89320
89356
|
const textareaRef = reactExports.useRef(null);
|
|
@@ -89347,21 +89383,36 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89347
89383
|
}, 0);
|
|
89348
89384
|
}
|
|
89349
89385
|
}), [saveInputNow]);
|
|
89350
|
-
const
|
|
89386
|
+
const builtinCommands = reactExports.useMemo(() => [
|
|
89351
89387
|
{ name: "/clear", description: t2("command.clearDescription") },
|
|
89352
89388
|
{ name: "/compact", description: t2("command.compactDescription") },
|
|
89353
89389
|
{ name: "/goal", description: t2("command.goalDescription", "Start Goal mode") }
|
|
89354
89390
|
], [t2]);
|
|
89391
|
+
const skillCommands = reactExports.useMemo(
|
|
89392
|
+
() => (availableSkills ?? []).filter((s2) => s2.enabled).map((s2) => ({ name: `/${s2.name}`, description: s2.description })),
|
|
89393
|
+
[availableSkills]
|
|
89394
|
+
);
|
|
89395
|
+
const commands = reactExports.useMemo(() => [...builtinCommands, ...skillCommands], [builtinCommands, skillCommands]);
|
|
89355
89396
|
const filteredCommands = reactExports.useMemo(() => {
|
|
89356
89397
|
if (!showCommandDropdown) return commands;
|
|
89398
|
+
if (commandDropdownByButtonRef.current) return builtinCommands;
|
|
89357
89399
|
const cursorPos = textareaRef.current?.selectionStart ?? 0;
|
|
89358
89400
|
const beforeCursor = input2.slice(0, cursorPos);
|
|
89359
89401
|
const match = beforeCursor.match(SLASH_COMMAND_PATTERN);
|
|
89360
89402
|
if (!match) return commands;
|
|
89361
89403
|
const keyword = match[1].toLowerCase();
|
|
89362
|
-
if (!keyword) return
|
|
89404
|
+
if (!keyword) return builtinCommands;
|
|
89363
89405
|
return commands.filter((c2) => c2.name.toLowerCase().includes(keyword));
|
|
89364
|
-
}, [input2, showCommandDropdown, commands]);
|
|
89406
|
+
}, [input2, showCommandDropdown, commands, builtinCommands]);
|
|
89407
|
+
const showSkillHint = reactExports.useMemo(() => {
|
|
89408
|
+
if (!showCommandDropdown) return false;
|
|
89409
|
+
if (commandDropdownByButtonRef.current) return false;
|
|
89410
|
+
const cursorPos = textareaRef.current?.selectionStart ?? 0;
|
|
89411
|
+
const beforeCursor = input2.slice(0, cursorPos);
|
|
89412
|
+
const match = beforeCursor.match(SLASH_COMMAND_PATTERN);
|
|
89413
|
+
if (!match) return false;
|
|
89414
|
+
return !match[1];
|
|
89415
|
+
}, [input2, showCommandDropdown]);
|
|
89365
89416
|
reactExports.useEffect(() => {
|
|
89366
89417
|
if (showCommandDropdown && filteredCommands.length > 0 && activeIndex >= filteredCommands.length) {
|
|
89367
89418
|
setActiveIndex(filteredCommands.length - 1);
|
|
@@ -89378,6 +89429,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89378
89429
|
setShowCommandDropdown(false);
|
|
89379
89430
|
setShowQuickReplyPicker(false);
|
|
89380
89431
|
suppressCommandDropdownRef.current = false;
|
|
89432
|
+
commandDropdownByButtonRef.current = false;
|
|
89381
89433
|
if (textareaRef.current) {
|
|
89382
89434
|
textareaRef.current.style.height = "auto";
|
|
89383
89435
|
}
|
|
@@ -89402,6 +89454,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89402
89454
|
if (suppressCommandDropdownRef.current) {
|
|
89403
89455
|
return;
|
|
89404
89456
|
}
|
|
89457
|
+
commandDropdownByButtonRef.current = false;
|
|
89405
89458
|
if (showQuickReplyPicker) {
|
|
89406
89459
|
return;
|
|
89407
89460
|
}
|
|
@@ -89473,18 +89526,34 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89473
89526
|
updateInput(`${before}${command2.name} ${after}`);
|
|
89474
89527
|
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
89475
89528
|
};
|
|
89529
|
+
const clearCommandDraft = reactExports.useCallback(() => {
|
|
89530
|
+
updateInput("");
|
|
89531
|
+
suppressCommandDropdownRef.current = true;
|
|
89532
|
+
}, [updateInput]);
|
|
89533
|
+
const sendDirectCommand = reactExports.useCallback((commandName, options = {}) => {
|
|
89534
|
+
if (sendingRef.current || isLoading) {
|
|
89535
|
+
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
89536
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
89537
|
+
return;
|
|
89538
|
+
}
|
|
89539
|
+
if (options.requireEmptyDraft && (input2.trim() || attachments.length > 0)) {
|
|
89540
|
+
showToast(t2("input.slashCommandRequiresEmptyDraft", "请先发送或清空当前输入后再执行命令"), "info");
|
|
89541
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
89542
|
+
return;
|
|
89543
|
+
}
|
|
89544
|
+
clearCommandDraft();
|
|
89545
|
+
sendingRef.current = true;
|
|
89546
|
+
onSend({ content: commandName, attachments: [], mentions: [] }).catch((error2) => {
|
|
89547
|
+
log$g.warn(`Failed to send ${commandName} command:`, error2);
|
|
89548
|
+
}).finally(() => {
|
|
89549
|
+
sendingRef.current = false;
|
|
89550
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
89551
|
+
});
|
|
89552
|
+
}, [attachments.length, clearCommandDraft, input2, isLoading, onSend, showToast, t2]);
|
|
89476
89553
|
const handleCommandClick = (command2) => {
|
|
89477
89554
|
setShowCommandDropdown(false);
|
|
89478
89555
|
if (DIRECT_SEND_COMMANDS.has(command2.name)) {
|
|
89479
|
-
|
|
89480
|
-
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
89481
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
89482
|
-
return;
|
|
89483
|
-
}
|
|
89484
|
-
onSend({ content: command2.name, attachments: [], mentions: [] }).catch((error2) => {
|
|
89485
|
-
log$g.warn(`Failed to send ${command2.name} command:`, error2);
|
|
89486
|
-
});
|
|
89487
|
-
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
89556
|
+
sendDirectCommand(command2.name);
|
|
89488
89557
|
return;
|
|
89489
89558
|
}
|
|
89490
89559
|
fillCommandInput(command2);
|
|
@@ -89523,6 +89592,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89523
89592
|
}, []);
|
|
89524
89593
|
const handleSlashCommandClick = reactExports.useCallback(() => {
|
|
89525
89594
|
suppressCommandDropdownRef.current = false;
|
|
89595
|
+
commandDropdownByButtonRef.current = true;
|
|
89526
89596
|
setShowCommandDropdown((prev2) => {
|
|
89527
89597
|
if (prev2) return false;
|
|
89528
89598
|
setCommandStartPos(input2.length);
|
|
@@ -89584,24 +89654,12 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89584
89654
|
const mod = e3.metaKey || e3.ctrlKey;
|
|
89585
89655
|
if (mod && e3.key === "k") {
|
|
89586
89656
|
e3.preventDefault();
|
|
89587
|
-
|
|
89588
|
-
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
89589
|
-
return;
|
|
89590
|
-
}
|
|
89591
|
-
onSend({ content: "/compact", attachments: [], mentions: [] }).catch((error2) => {
|
|
89592
|
-
log$g.warn("Failed to send /compact command:", error2);
|
|
89593
|
-
});
|
|
89657
|
+
sendDirectCommand("/compact", { requireEmptyDraft: true });
|
|
89594
89658
|
return;
|
|
89595
89659
|
}
|
|
89596
89660
|
if (mod && e3.shiftKey && e3.key === "Backspace") {
|
|
89597
89661
|
e3.preventDefault();
|
|
89598
|
-
|
|
89599
|
-
showToast(t2("input.slashCommandDisabledWhileStreaming", "输出中暂不支持斜杠命令"), "info");
|
|
89600
|
-
return;
|
|
89601
|
-
}
|
|
89602
|
-
onSend({ content: "/clear", attachments: [], mentions: [] }).catch((error2) => {
|
|
89603
|
-
log$g.warn("Failed to send /clear command:", error2);
|
|
89604
|
-
});
|
|
89662
|
+
sendDirectCommand("/clear", { requireEmptyDraft: true });
|
|
89605
89663
|
return;
|
|
89606
89664
|
}
|
|
89607
89665
|
handleKeyDown(e3);
|
|
@@ -89639,7 +89697,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89639
89697
|
} else if (e3.key === "Enter" && !e3.shiftKey) {
|
|
89640
89698
|
e3.preventDefault();
|
|
89641
89699
|
if (filteredCommands[activeIndex]) {
|
|
89642
|
-
|
|
89700
|
+
handleCommandClick(filteredCommands[activeIndex]);
|
|
89643
89701
|
}
|
|
89644
89702
|
return;
|
|
89645
89703
|
} else if (e3.key === "Escape") {
|
|
@@ -89649,7 +89707,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89649
89707
|
} else if (e3.key === "Tab") {
|
|
89650
89708
|
e3.preventDefault();
|
|
89651
89709
|
if (filteredCommands[activeIndex]) {
|
|
89652
|
-
|
|
89710
|
+
handleCommandClick(filteredCommands[activeIndex]);
|
|
89653
89711
|
}
|
|
89654
89712
|
return;
|
|
89655
89713
|
}
|
|
@@ -89720,6 +89778,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89720
89778
|
onClose: dismissCommandDropdown,
|
|
89721
89779
|
anchorRef: commandButtonRef,
|
|
89722
89780
|
style: dropdownPosition.style,
|
|
89781
|
+
showHint: showSkillHint,
|
|
89723
89782
|
portal: true
|
|
89724
89783
|
}
|
|
89725
89784
|
),
|
|
@@ -89792,6 +89851,7 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89792
89851
|
onPaste: handlePaste,
|
|
89793
89852
|
onCompositionStart: () => setIsComposing(true),
|
|
89794
89853
|
onCompositionEnd: () => setIsComposing(false),
|
|
89854
|
+
autoComplete: "off",
|
|
89795
89855
|
placeholder: attachments.length > 0 ? t2("input.placeholderWithAttachments") : externalPlaceholder ? externalPlaceholder : conversationType === "group" ? t2("input.placeholderGroup") : t2("input.placeholder"),
|
|
89796
89856
|
className: styles$G.textarea,
|
|
89797
89857
|
rows: 1,
|
|
@@ -89838,6 +89898,41 @@ const MessageInput = reactExports.forwardRef(function MessageInput2({
|
|
|
89838
89898
|
)
|
|
89839
89899
|
] }) });
|
|
89840
89900
|
});
|
|
89901
|
+
const log$f = createLogger("useAgentResources");
|
|
89902
|
+
function useAgentResources() {
|
|
89903
|
+
const [channels2, setChannels] = reactExports.useState([]);
|
|
89904
|
+
const [skills, setSkills] = reactExports.useState([]);
|
|
89905
|
+
const [mcpServers, setMcpServers] = reactExports.useState([]);
|
|
89906
|
+
const [isLoading, setIsLoading] = reactExports.useState(true);
|
|
89907
|
+
reactExports.useEffect(() => {
|
|
89908
|
+
let cancelled = false;
|
|
89909
|
+
Promise.all([
|
|
89910
|
+
getTransport().listLLMChannels().catch((e3) => {
|
|
89911
|
+
log$f.error("listLLMChannels failed:", e3);
|
|
89912
|
+
return [];
|
|
89913
|
+
}),
|
|
89914
|
+
getTransport().getSkills().catch((e3) => {
|
|
89915
|
+
log$f.error("getSkills failed:", e3);
|
|
89916
|
+
return [];
|
|
89917
|
+
}),
|
|
89918
|
+
getTransport().getMcpServers().catch((e3) => {
|
|
89919
|
+
log$f.error("getMcpServers failed:", e3);
|
|
89920
|
+
return [];
|
|
89921
|
+
})
|
|
89922
|
+
]).then(([ch, sk, mcp]) => {
|
|
89923
|
+
if (cancelled) return;
|
|
89924
|
+
setChannels(ch);
|
|
89925
|
+
setSkills(sk);
|
|
89926
|
+
setMcpServers(mcp);
|
|
89927
|
+
setIsLoading(false);
|
|
89928
|
+
});
|
|
89929
|
+
return () => {
|
|
89930
|
+
cancelled = true;
|
|
89931
|
+
};
|
|
89932
|
+
}, []);
|
|
89933
|
+
const defaultChannel = channels2.find((ch) => ch.isDefault);
|
|
89934
|
+
return { channels: channels2, skills, mcpServers, defaultChannel, isLoading };
|
|
89935
|
+
}
|
|
89841
89936
|
const container$a = "_container_1enne_1";
|
|
89842
89937
|
const notification = "_notification_1enne_12";
|
|
89843
89938
|
const inputWrapper = "_inputWrapper_1enne_39";
|
|
@@ -89865,6 +89960,7 @@ function ChatFooter({
|
|
|
89865
89960
|
const [revoking, setRevoking] = reactExports.useState(false);
|
|
89866
89961
|
const inputRef = reactExports.useRef(null);
|
|
89867
89962
|
const revokingRef = reactExports.useRef(false);
|
|
89963
|
+
const { skills } = useAgentResources();
|
|
89868
89964
|
const handleCancelQueue = reactExports.useCallback(async () => {
|
|
89869
89965
|
if (revokingRef.current) return;
|
|
89870
89966
|
revokingRef.current = true;
|
|
@@ -89916,7 +90012,8 @@ function ChatFooter({
|
|
|
89916
90012
|
sessionId,
|
|
89917
90013
|
conversationType,
|
|
89918
90014
|
memberAgentIds,
|
|
89919
|
-
placeholder: placeholder2
|
|
90015
|
+
placeholder: placeholder2,
|
|
90016
|
+
availableSkills: skills
|
|
89920
90017
|
}
|
|
89921
90018
|
)
|
|
89922
90019
|
] });
|
|
@@ -90303,7 +90400,7 @@ const styles$E = {
|
|
|
90303
90400
|
highlight,
|
|
90304
90401
|
emptyState: emptyState$3
|
|
90305
90402
|
};
|
|
90306
|
-
const log$
|
|
90403
|
+
const log$e = createLogger("ModelSelect");
|
|
90307
90404
|
function ModelSelect({
|
|
90308
90405
|
value: value2,
|
|
90309
90406
|
onChange,
|
|
@@ -90351,10 +90448,10 @@ function ModelSelect({
|
|
|
90351
90448
|
const result = await getTransport().fetchModels(baseUrl, apiKey, apiType);
|
|
90352
90449
|
setModels(result.models);
|
|
90353
90450
|
if (result.error) {
|
|
90354
|
-
log$
|
|
90451
|
+
log$e.warn("fetch models error:", result.error);
|
|
90355
90452
|
}
|
|
90356
90453
|
} catch (err) {
|
|
90357
|
-
log$
|
|
90454
|
+
log$e.warn("fetch models failed:", err);
|
|
90358
90455
|
} finally {
|
|
90359
90456
|
setLoading(false);
|
|
90360
90457
|
}
|
|
@@ -91043,7 +91140,7 @@ function Select({
|
|
|
91043
91140
|
}
|
|
91044
91141
|
);
|
|
91045
91142
|
}
|
|
91046
|
-
const log$
|
|
91143
|
+
const log$d = createLogger("useOptimizeDescription");
|
|
91047
91144
|
function useOptimizeDescription() {
|
|
91048
91145
|
const { t: t2 } = useTranslation();
|
|
91049
91146
|
const [isOptimizing, setIsOptimizing] = reactExports.useState(false);
|
|
@@ -91055,7 +91152,7 @@ function useOptimizeDescription() {
|
|
|
91055
91152
|
const optimized = await getTransport().optimizeAgentDescription(description2, agentName2);
|
|
91056
91153
|
onSuccess(optimized);
|
|
91057
91154
|
} catch (err) {
|
|
91058
|
-
log$
|
|
91155
|
+
log$d.error("优化失败:", err);
|
|
91059
91156
|
setError(t2("agent.optimizeFailed"));
|
|
91060
91157
|
} finally {
|
|
91061
91158
|
setIsOptimizing(false);
|
|
@@ -91469,41 +91566,6 @@ function useAgentSave() {
|
|
|
91469
91566
|
);
|
|
91470
91567
|
return { save, isSaving, canSave };
|
|
91471
91568
|
}
|
|
91472
|
-
const log$d = createLogger("useAgentResources");
|
|
91473
|
-
function useAgentResources() {
|
|
91474
|
-
const [channels2, setChannels] = reactExports.useState([]);
|
|
91475
|
-
const [skills, setSkills] = reactExports.useState([]);
|
|
91476
|
-
const [mcpServers, setMcpServers] = reactExports.useState([]);
|
|
91477
|
-
const [isLoading, setIsLoading] = reactExports.useState(true);
|
|
91478
|
-
reactExports.useEffect(() => {
|
|
91479
|
-
let cancelled = false;
|
|
91480
|
-
Promise.all([
|
|
91481
|
-
getTransport().listLLMChannels().catch((e3) => {
|
|
91482
|
-
log$d.error("listLLMChannels failed:", e3);
|
|
91483
|
-
return [];
|
|
91484
|
-
}),
|
|
91485
|
-
getTransport().getSkills().catch((e3) => {
|
|
91486
|
-
log$d.error("getSkills failed:", e3);
|
|
91487
|
-
return [];
|
|
91488
|
-
}),
|
|
91489
|
-
getTransport().getMcpServers().catch((e3) => {
|
|
91490
|
-
log$d.error("getMcpServers failed:", e3);
|
|
91491
|
-
return [];
|
|
91492
|
-
})
|
|
91493
|
-
]).then(([ch, sk, mcp]) => {
|
|
91494
|
-
if (cancelled) return;
|
|
91495
|
-
setChannels(ch);
|
|
91496
|
-
setSkills(sk);
|
|
91497
|
-
setMcpServers(mcp);
|
|
91498
|
-
setIsLoading(false);
|
|
91499
|
-
});
|
|
91500
|
-
return () => {
|
|
91501
|
-
cancelled = true;
|
|
91502
|
-
};
|
|
91503
|
-
}, []);
|
|
91504
|
-
const defaultChannel = channels2.find((ch) => ch.isDefault);
|
|
91505
|
-
return { channels: channels2, skills, mcpServers, defaultChannel, isLoading };
|
|
91506
|
-
}
|
|
91507
91569
|
const overlay$5 = "_overlay_1n6f1_1";
|
|
91508
91570
|
const dialog$6 = "_dialog_1n6f1_11";
|
|
91509
91571
|
const header$9 = "_header_1n6f1_20";
|
|
@@ -124475,7 +124537,6 @@ function ChatBox({
|
|
|
124475
124537
|
}, [refreshSnapshot, loadConversations]);
|
|
124476
124538
|
const onSend = reactExports.useCallback(
|
|
124477
124539
|
async (msg) => {
|
|
124478
|
-
messageListRef.current?.scrollToBottom();
|
|
124479
124540
|
useMessageStore.setState((state2) => ({
|
|
124480
124541
|
sendingMap: new Map(state2.sendingMap).set(sessionId, true)
|
|
124481
124542
|
}));
|
|
@@ -124489,7 +124550,9 @@ function ChatBox({
|
|
|
124489
124550
|
});
|
|
124490
124551
|
};
|
|
124491
124552
|
try {
|
|
124492
|
-
const
|
|
124553
|
+
const sendResult = handleSendMessage(msg);
|
|
124554
|
+
messageListRef.current?.forceScrollToBottom();
|
|
124555
|
+
const result = await sendResult;
|
|
124493
124556
|
if (result) {
|
|
124494
124557
|
resetSending();
|
|
124495
124558
|
setNotification(result);
|
|
@@ -124552,8 +124615,9 @@ function ChatBox({
|
|
|
124552
124615
|
}
|
|
124553
124616
|
) : null;
|
|
124554
124617
|
const sendClearCommand = reactExports.useCallback(() => {
|
|
124555
|
-
|
|
124556
|
-
|
|
124618
|
+
const sendResult = handleSendMessage({ content: "/clear", attachments: [], mentions: [] });
|
|
124619
|
+
messageListRef.current?.forceScrollToBottom();
|
|
124620
|
+
void sendResult.then((result) => {
|
|
124557
124621
|
if (result) setNotification(result);
|
|
124558
124622
|
}).catch((error2) => {
|
|
124559
124623
|
log$5.error("Failed to clear context:", error2);
|
|
@@ -125204,7 +125268,7 @@ function useSidebarSearch() {
|
|
|
125204
125268
|
searchInputRef
|
|
125205
125269
|
};
|
|
125206
125270
|
}
|
|
125207
|
-
const version = "1.10.
|
|
125271
|
+
const version = "1.10.9";
|
|
125208
125272
|
const pkg = {
|
|
125209
125273
|
version
|
|
125210
125274
|
};
|