@zythum02/fello-server 0.1.29 → 0.1.30

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.
Files changed (56) hide show
  1. package/README.md +6 -0
  2. package/out/renderer/assets/{_baseUniq-BApwm7pv.js → _baseUniq-DLyIzzT_.js} +1 -1
  3. package/out/renderer/assets/{arc-yKenDsmO.js → arc-Zxienobv.js} +1 -1
  4. package/out/renderer/assets/{architectureDiagram-Q4EWVU46-C31yFVWH.js → architectureDiagram-Q4EWVU46-DLh2t5mE.js} +5 -5
  5. package/out/renderer/assets/{blockDiagram-DXYQGD6D-6liCvTXv.js → blockDiagram-DXYQGD6D-CtAylmzM.js} +6 -6
  6. package/out/renderer/assets/{c4Diagram-AHTNJAMY-Co_b_6bH.js → c4Diagram-AHTNJAMY-ntNDbqWz.js} +2 -2
  7. package/out/renderer/assets/{channel-Dc_jjyUr.js → channel-Z4VgLguf.js} +1 -1
  8. package/out/renderer/assets/{chunk-4BX2VUAB-Cg18SQei.js → chunk-4BX2VUAB-BQWjQSCS.js} +1 -1
  9. package/out/renderer/assets/{chunk-4TB4RGXK-CvSqwINq.js → chunk-4TB4RGXK-DQ4qdRMQ.js} +5 -5
  10. package/out/renderer/assets/{chunk-55IACEB6-CfBiPWtx.js → chunk-55IACEB6-CLBQrnT7.js} +1 -1
  11. package/out/renderer/assets/{chunk-EDXVE4YY-DMjVfNdS.js → chunk-EDXVE4YY-ycJtaU57.js} +1 -1
  12. package/out/renderer/assets/{chunk-FMBD7UC4-BbpFqyFG.js → chunk-FMBD7UC4-D3ZuAVef.js} +1 -1
  13. package/out/renderer/assets/{chunk-OYMX7WX6-Cf724x--.js → chunk-OYMX7WX6-CAHx1d_X.js} +3 -3
  14. package/out/renderer/assets/{chunk-QZHKN3VN-4ZNIwknr.js → chunk-QZHKN3VN-eKV97jed.js} +1 -1
  15. package/out/renderer/assets/{chunk-YZCP3GAM-D1j7xGGR.js → chunk-YZCP3GAM-DkaxW5D7.js} +1 -1
  16. package/out/renderer/assets/{classDiagram-6PBFFD2Q-OFMeoPav.js → classDiagram-6PBFFD2Q-CpuoT-Jx.js} +6 -6
  17. package/out/renderer/assets/{classDiagram-v2-HSJHXN6E-OFMeoPav.js → classDiagram-v2-HSJHXN6E-CpuoT-Jx.js} +6 -6
  18. package/out/renderer/assets/{clone-Cm3RO2Zl.js → clone-C_55Gq29.js} +1 -1
  19. package/out/renderer/assets/{cose-bilkent-S5V4N54A-lCfWcP6y.js → cose-bilkent-S5V4N54A-DqTN-_zY.js} +1 -1
  20. package/out/renderer/assets/{dagre-KV5264BT-4I0h4wyh.js → dagre-KV5264BT-NIF-wzAb.js} +6 -6
  21. package/out/renderer/assets/{diagram-5BDNPKRD-C1mEpAlt.js → diagram-5BDNPKRD-Cln0uWD9.js} +6 -6
  22. package/out/renderer/assets/{diagram-G4DWMVQ6-C_g_DZm9.js → diagram-G4DWMVQ6-BlnD83ee.js} +6 -6
  23. package/out/renderer/assets/{diagram-MMDJMWI5-Di6wZV6-.js → diagram-MMDJMWI5-B7PHcRvh.js} +5 -5
  24. package/out/renderer/assets/{diagram-TYMM5635-aF8hIDx1.js → diagram-TYMM5635-B-O4bvMT.js} +5 -5
  25. package/out/renderer/assets/{erDiagram-SMLLAGMA-Bk9QFZ27.js → erDiagram-SMLLAGMA-1ZgzBjAm.js} +4 -4
  26. package/out/renderer/assets/{flowDiagram-DWJPFMVM-Dfg0LLup.js → flowDiagram-DWJPFMVM-CYt7MUO6.js} +6 -6
  27. package/out/renderer/assets/{ganttDiagram-T4ZO3ILL-lTjaJTs0.js → ganttDiagram-T4ZO3ILL-nHro8zN9.js} +2 -2
  28. package/out/renderer/assets/{gitGraphDiagram-UUTBAWPF-C74WBszH.js → gitGraphDiagram-UUTBAWPF-4nzL1En3.js} +6 -6
  29. package/out/renderer/assets/{graph-DGEX1eV1.js → graph-9FzrK4FU.js} +2 -2
  30. package/out/renderer/assets/{highlighted-body-OFNGDK62-DQWoSdTY.js → highlighted-body-OFNGDK62-VELQyUbs.js} +1 -1
  31. package/out/renderer/assets/{index-BZzw3jIU.js → index-DChNtXAm.js} +1095 -716
  32. package/out/renderer/assets/index-I1XmNFoX.css +382 -0
  33. package/out/renderer/assets/{infoDiagram-42DDH7IO-CR4ZLAM1.js → infoDiagram-42DDH7IO-BgCd2fMi.js} +4 -4
  34. package/out/renderer/assets/{ishikawaDiagram-UXIWVN3A-uXL-4FGw.js → ishikawaDiagram-UXIWVN3A-Dc9zBgQ3.js} +1 -1
  35. package/out/renderer/assets/{journeyDiagram-VCZTEJTY-Ds2OL3Lo.js → journeyDiagram-VCZTEJTY-Cl5-PgKK.js} +4 -4
  36. package/out/renderer/assets/{kanban-definition-6JOO6SKY-CZ1CZVyP.js → kanban-definition-6JOO6SKY-CTdiOO_t.js} +2 -2
  37. package/out/renderer/assets/{layout-CNGveWdi.js → layout-pad9cNSQ.js} +4 -4
  38. package/out/renderer/assets/{linear-CnHAiAJ3.js → linear-C9kOAOci.js} +1 -1
  39. package/out/renderer/assets/{min-D63AfN0e.js → min-B7SQAamY.js} +2 -2
  40. package/out/renderer/assets/{mindmap-definition-QFDTVHPH-C3U3xkIJ.js → mindmap-definition-QFDTVHPH-DYc59m-R.js} +3 -3
  41. package/out/renderer/assets/{pieDiagram-DEJITSTG-C8AxK_-F.js → pieDiagram-DEJITSTG-DyXeoEBp.js} +6 -6
  42. package/out/renderer/assets/{quadrantDiagram-34T5L4WZ-BdiZmi7w.js → quadrantDiagram-34T5L4WZ-hFY-GkiJ.js} +2 -2
  43. package/out/renderer/assets/{requirementDiagram-MS252O5E-BHIfl5Tz.js → requirementDiagram-MS252O5E-ecRwwTfv.js} +3 -3
  44. package/out/renderer/assets/{sankeyDiagram-XADWPNL6-SthTR8cL.js → sankeyDiagram-XADWPNL6-BTL3sclU.js} +1 -1
  45. package/out/renderer/assets/{sequenceDiagram-FGHM5R23-COKEbCYM.js → sequenceDiagram-FGHM5R23-AV2u_2fd.js} +3 -3
  46. package/out/renderer/assets/{stateDiagram-FHFEXIEX-7zRGBf7O.js → stateDiagram-FHFEXIEX-DoTCNWMJ.js} +8 -8
  47. package/out/renderer/assets/{stateDiagram-v2-QKLJ7IA2-BqHJ_ZBX.js → stateDiagram-v2-QKLJ7IA2--Ezn8EQY.js} +4 -4
  48. package/out/renderer/assets/{timeline-definition-GMOUNBTQ-AvZAT5J-.js → timeline-definition-GMOUNBTQ-CQvZXAlZ.js} +2 -2
  49. package/out/renderer/assets/{vennDiagram-DHZGUBPP-oSTndBDY.js → vennDiagram-DHZGUBPP-zJ6WGEop.js} +1 -1
  50. package/out/renderer/assets/{wardley-RL74JXVD-C8hIuf19.js → wardley-RL74JXVD-BPlNC-BP.js} +3 -3
  51. package/out/renderer/assets/{wardleyDiagram-NUSXRM2D-Dv2kSOMM.js → wardleyDiagram-NUSXRM2D-BAQ1Om89.js} +5 -5
  52. package/out/renderer/assets/{xychartDiagram-5P7HB3ND-J9z4uuMK.js → xychartDiagram-5P7HB3ND--HADKQzk.js} +2 -2
  53. package/out/renderer/index.html +2 -2
  54. package/out/server/main.js +37 -9
  55. package/package.json +1 -1
  56. package/out/renderer/assets/index-Cv3lJTlc.css +0 -382
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-4I0h4wyh.js","./graph-DGEX1eV1.js","./_baseUniq-BApwm7pv.js","./layout-CNGveWdi.js","./min-D63AfN0e.js","./clone-Cm3RO2Zl.js","./cose-bilkent-S5V4N54A-lCfWcP6y.js","./cytoscape.esm-Bm8DJGmZ.js","./c4Diagram-AHTNJAMY-Co_b_6bH.js","./chunk-YZCP3GAM-D1j7xGGR.js","./flowDiagram-DWJPFMVM-Dfg0LLup.js","./chunk-FMBD7UC4-BbpFqyFG.js","./chunk-55IACEB6-CfBiPWtx.js","./chunk-EDXVE4YY-DMjVfNdS.js","./channel-Dc_jjyUr.js","./erDiagram-SMLLAGMA-Bk9QFZ27.js","./gitGraphDiagram-UUTBAWPF-C74WBszH.js","./chunk-4BX2VUAB-Cg18SQei.js","./chunk-QZHKN3VN-4ZNIwknr.js","./wardley-RL74JXVD-C8hIuf19.js","./ganttDiagram-T4ZO3ILL-lTjaJTs0.js","./linear-CnHAiAJ3.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-42DDH7IO-CR4ZLAM1.js","./pieDiagram-DEJITSTG-C8AxK_-F.js","./arc-yKenDsmO.js","./ordinal-CxptdPJm.js","./quadrantDiagram-34T5L4WZ-BdiZmi7w.js","./xychartDiagram-5P7HB3ND-J9z4uuMK.js","./requirementDiagram-MS252O5E-BHIfl5Tz.js","./sequenceDiagram-FGHM5R23-COKEbCYM.js","./classDiagram-6PBFFD2Q-OFMeoPav.js","./chunk-4TB4RGXK-CvSqwINq.js","./classDiagram-v2-HSJHXN6E-OFMeoPav.js","./stateDiagram-FHFEXIEX-7zRGBf7O.js","./chunk-OYMX7WX6-Cf724x--.js","./stateDiagram-v2-QKLJ7IA2-BqHJ_ZBX.js","./journeyDiagram-VCZTEJTY-Ds2OL3Lo.js","./timeline-definition-GMOUNBTQ-AvZAT5J-.js","./mindmap-definition-QFDTVHPH-C3U3xkIJ.js","./kanban-definition-6JOO6SKY-CZ1CZVyP.js","./sankeyDiagram-XADWPNL6-SthTR8cL.js","./diagram-TYMM5635-aF8hIDx1.js","./diagram-MMDJMWI5-Di6wZV6-.js","./blockDiagram-DXYQGD6D-6liCvTXv.js","./diagram-5BDNPKRD-C1mEpAlt.js","./architectureDiagram-Q4EWVU46-C31yFVWH.js","./diagram-G4DWMVQ6-C_g_DZm9.js","./wardleyDiagram-NUSXRM2D-Dv2kSOMM.js","./angular-html-BYG42TJr.js","./html-GC16tDh9.js","./javascript-BsAkV7mL.js","./css-BtVcDqlU.js","./angular-ts-BftcHvZ6.js","./scss-Dq-LbI_c.js","./apl-CGZawg-A.js","./xml-BMzZeaqs.js","./java-BfXh-0uJ.js","./json-TjWBGEk1.js","./astro-BxdWOZvM.js","./typescript-CP6ECzON.js","./postcss-kj1IbjVd.js","./tsx-CmGGo4Hm.js","./blade-BbH7YAUi.js","./html-derivative-HU9p64q4.js","./sql-DzUuSofg.js","./bsl-DwPS0BId.js","./sdbl-BBUhycGU.js","./cairo-BtYx2aM5.js","./python-CrdIx4PZ.js","./cobol-B8r1pfPr.js","./coffee-XLjtuEYs.js","./cpp-zh2ePAE_.js","./regexp-BxWeO75u.js","./glsl-CGsiYPcu.js","./c-C4VtT7JA.js","./crystal-BqBRy7Ec.js","./shellscript-CQ8MXh-D.js","./edge-CnHxQ_FD.js","./elixir-B_LIBv5J.js","./elm-BlO7pcFp.js","./erb-Bzn22wO6.js","./ruby-C13Bjepi.js","./haml-DrIklt7F.js","./graphql-CwmtR1ib.js","./jsx-BPmvoin2.js","./lua-BVbbqwZC.js","./yaml-B_vW5iTY.js","./erlang-Ch5kuXHm.js","./markdown-F_EULe_G.js","./fortran-fixed-form-CpmOyvS5.js","./fortran-free-form-5X94ETMi.js","./fsharp-5vtGqRR9.js","./gdresource-B5TLWiFO.js","./gdshader-BEzE4j_3.js","./gdscript-CNW3Aj-d.js","./git-commit-PP9xCApN.js","./diff-BEdzuHlE.js","./git-rebase-D-XQSvDj.js","./glimmer-js-h2QNNiD7.js","./glimmer-ts-Bk3uX6Ae.js","./hack-BTX3ICIE.js","./handlebars-yWFGGD2R.js","./http-DjsOm9E4.js","./hurl-Am2cDU4f.js","./csv-Ba84L8e5.js","./hxml-Jle7oGdm.js","./haxe-BpobLYM9.js","./jinja-FkIlHBgj.js","./jison-BkdOIOd4.js","./julia-CU_UwNb8.js","./r-Dpdc-Kyk.js","./just-tGFryTtU.js","./perl-HITCDkgu.js","./latex-B0gTO9uZ.js","./tex-CGVqF8nD.js","./liquid-QmJ_LYTW.js","./marko-BAWrmNIa.js","./less-BAzLMJNR.js","./mdc-Ca0ft0PS.js","./nextflow-B166B-y1.js","./nextflow-groovy-BOO9s0iq.js","./nginx-BFAkI5_-.js","./nim-B3PAIZ4D.js","./php-C2HieitX.js","./pug-BwQB43qN.js","./qml-jtL8okyu.js","./razor-gBXW6YBJ.js","./csharp-DxX_6tHh.js","./rst-by6KAwTb.js","./cmake-CDfQILeU.js","./sas-BLBgC3TA.js","./shaderlab-C07uO3dL.js","./hlsl-TRzjajlb.js","./shellsession-CkeTp4M1.js","./soy-BHaHgMUy.js","./sparql-DswowMAp.js","./turtle-BnC7StHY.js","./stata-Dl7wDdBE.js","./surrealql-Bs3vUeKA.js","./svelte-fC0HkEkx.js","./templ-CSEiQwNm.js","./go-DRMr3iML.js","./ts-tags-cG2hZuda.js","./twig-CwEEYIBf.js","./vue-K-7Ga-y8.js","./vue-html-DhreShjd.js","./vue-vine-rMIwOpFf.js","./stylus-DXFa_2Jl.js","./xsl-CnwVr_6q.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-NIF-wzAb.js","./graph-9FzrK4FU.js","./_baseUniq-DLyIzzT_.js","./layout-pad9cNSQ.js","./min-B7SQAamY.js","./clone-C_55Gq29.js","./cose-bilkent-S5V4N54A-DqTN-_zY.js","./cytoscape.esm-Bm8DJGmZ.js","./c4Diagram-AHTNJAMY-ntNDbqWz.js","./chunk-YZCP3GAM-DkaxW5D7.js","./flowDiagram-DWJPFMVM-CYt7MUO6.js","./chunk-FMBD7UC4-D3ZuAVef.js","./chunk-55IACEB6-CLBQrnT7.js","./chunk-EDXVE4YY-ycJtaU57.js","./channel-Z4VgLguf.js","./erDiagram-SMLLAGMA-1ZgzBjAm.js","./gitGraphDiagram-UUTBAWPF-4nzL1En3.js","./chunk-4BX2VUAB-BQWjQSCS.js","./chunk-QZHKN3VN-eKV97jed.js","./wardley-RL74JXVD-BPlNC-BP.js","./ganttDiagram-T4ZO3ILL-nHro8zN9.js","./linear-C9kOAOci.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-42DDH7IO-BgCd2fMi.js","./pieDiagram-DEJITSTG-DyXeoEBp.js","./arc-Zxienobv.js","./ordinal-CxptdPJm.js","./quadrantDiagram-34T5L4WZ-hFY-GkiJ.js","./xychartDiagram-5P7HB3ND--HADKQzk.js","./requirementDiagram-MS252O5E-ecRwwTfv.js","./sequenceDiagram-FGHM5R23-AV2u_2fd.js","./classDiagram-6PBFFD2Q-CpuoT-Jx.js","./chunk-4TB4RGXK-DQ4qdRMQ.js","./classDiagram-v2-HSJHXN6E-CpuoT-Jx.js","./stateDiagram-FHFEXIEX-DoTCNWMJ.js","./chunk-OYMX7WX6-CAHx1d_X.js","./stateDiagram-v2-QKLJ7IA2--Ezn8EQY.js","./journeyDiagram-VCZTEJTY-Cl5-PgKK.js","./timeline-definition-GMOUNBTQ-CQvZXAlZ.js","./mindmap-definition-QFDTVHPH-DYc59m-R.js","./kanban-definition-6JOO6SKY-CTdiOO_t.js","./sankeyDiagram-XADWPNL6-BTL3sclU.js","./diagram-TYMM5635-B-O4bvMT.js","./diagram-MMDJMWI5-B7PHcRvh.js","./blockDiagram-DXYQGD6D-CtAylmzM.js","./diagram-5BDNPKRD-Cln0uWD9.js","./architectureDiagram-Q4EWVU46-DLh2t5mE.js","./diagram-G4DWMVQ6-BlnD83ee.js","./wardleyDiagram-NUSXRM2D-BAQ1Om89.js","./angular-html-BYG42TJr.js","./html-GC16tDh9.js","./javascript-BsAkV7mL.js","./css-BtVcDqlU.js","./angular-ts-BftcHvZ6.js","./scss-Dq-LbI_c.js","./apl-CGZawg-A.js","./xml-BMzZeaqs.js","./java-BfXh-0uJ.js","./json-TjWBGEk1.js","./astro-BxdWOZvM.js","./typescript-CP6ECzON.js","./postcss-kj1IbjVd.js","./tsx-CmGGo4Hm.js","./blade-BbH7YAUi.js","./html-derivative-HU9p64q4.js","./sql-DzUuSofg.js","./bsl-DwPS0BId.js","./sdbl-BBUhycGU.js","./cairo-BtYx2aM5.js","./python-CrdIx4PZ.js","./cobol-B8r1pfPr.js","./coffee-XLjtuEYs.js","./cpp-zh2ePAE_.js","./regexp-BxWeO75u.js","./glsl-CGsiYPcu.js","./c-C4VtT7JA.js","./crystal-BqBRy7Ec.js","./shellscript-CQ8MXh-D.js","./edge-CnHxQ_FD.js","./elixir-B_LIBv5J.js","./elm-BlO7pcFp.js","./erb-Bzn22wO6.js","./ruby-C13Bjepi.js","./haml-DrIklt7F.js","./graphql-CwmtR1ib.js","./jsx-BPmvoin2.js","./lua-BVbbqwZC.js","./yaml-B_vW5iTY.js","./erlang-Ch5kuXHm.js","./markdown-F_EULe_G.js","./fortran-fixed-form-CpmOyvS5.js","./fortran-free-form-5X94ETMi.js","./fsharp-5vtGqRR9.js","./gdresource-B5TLWiFO.js","./gdshader-BEzE4j_3.js","./gdscript-CNW3Aj-d.js","./git-commit-PP9xCApN.js","./diff-BEdzuHlE.js","./git-rebase-D-XQSvDj.js","./glimmer-js-h2QNNiD7.js","./glimmer-ts-Bk3uX6Ae.js","./hack-BTX3ICIE.js","./handlebars-yWFGGD2R.js","./http-DjsOm9E4.js","./hurl-Am2cDU4f.js","./csv-Ba84L8e5.js","./hxml-Jle7oGdm.js","./haxe-BpobLYM9.js","./jinja-FkIlHBgj.js","./jison-BkdOIOd4.js","./julia-CU_UwNb8.js","./r-Dpdc-Kyk.js","./just-tGFryTtU.js","./perl-HITCDkgu.js","./latex-B0gTO9uZ.js","./tex-CGVqF8nD.js","./liquid-QmJ_LYTW.js","./marko-BAWrmNIa.js","./less-BAzLMJNR.js","./mdc-Ca0ft0PS.js","./nextflow-B166B-y1.js","./nextflow-groovy-BOO9s0iq.js","./nginx-BFAkI5_-.js","./nim-B3PAIZ4D.js","./php-C2HieitX.js","./pug-BwQB43qN.js","./qml-jtL8okyu.js","./razor-gBXW6YBJ.js","./csharp-DxX_6tHh.js","./rst-by6KAwTb.js","./cmake-CDfQILeU.js","./sas-BLBgC3TA.js","./shaderlab-C07uO3dL.js","./hlsl-TRzjajlb.js","./shellsession-CkeTp4M1.js","./soy-BHaHgMUy.js","./sparql-DswowMAp.js","./turtle-BnC7StHY.js","./stata-Dl7wDdBE.js","./surrealql-Bs3vUeKA.js","./svelte-fC0HkEkx.js","./templ-CSEiQwNm.js","./go-DRMr3iML.js","./ts-tags-cG2hZuda.js","./twig-CwEEYIBf.js","./vue-K-7Ga-y8.js","./vue-html-DhreShjd.js","./vue-vine-rMIwOpFf.js","./stylus-DXFa_2Jl.js","./xsl-CnwVr_6q.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(n2, m2) {
3
3
  for (var i3 = 0; i3 < m2.length; i3++) {
4
4
  const e2 = m2[i3];
@@ -15111,9 +15111,9 @@ const contentBlock$1 = { "unsupported": "Unsupported block type: {{type}}", "dow
15111
15111
  const detail$1 = { "noContent": "No content" };
15112
15112
  const fileDetail$1 = { "fileNotFound": "File not found", "fileTooLarge": "File is too large to preview", "fileFormatNotSupported": "File format not supported for preview", "errorLoading": "Error loading file", "loading": "Loading...", "preview": "Preview", "code": "Code", "compare": "Compare", "fileModifiedNotice": "File modified. Please refresh.", "copyFileContent": "Copy File Content", "addFileToChat": "Add File to Chat", "addSelectionToChat": "Add Selection to Chat", "loadError": "Failed to load", "zoomOut": "Zoom out", "zoomIn": "Zoom in", "previousPage": "Previous page", "nextPage": "Next page", "previousSlide": "Previous slide", "nextSlide": "Next slide" };
15113
15113
  const htmlDetail$1 = { "fileNotFound": "File not found or inaccessible", "errorLoading": "Failed to load", "loadFailed": "Page load failed", "retry": "Retry", "openInBrowser": "Open in browser", "webuiNotEnabled": "Enable WebUI first to open in browser", "open": "Open", "refresh": "Refresh" };
15114
- const welcome$1 = { "title": "Fello", "desc": "Yet another Agent client based on the ACP protocol. Connect with the agent and begin collaborating.", "hint": "Start a new chat from the sidebar", "getStarted": "Get Started", "stepAgent": "Configure Agent", "stepAgentDesc": "Add an AI agent (local Stdio or API) to power your conversations", "stepAgentDone": "{{count}} agent(s) configured", "stepProject": "Add Project", "stepProjectDesc": "Select a local project folder as your workspace", "stepProjectDone": "{{count}} project(s) added", "stepChat": "Start Chat", "stepChatDesc": "Create a new AI conversation in your project", "allDone": "All set! Start a new chat from the sidebar" };
15114
+ const welcome$1 = { "title": "Fello", "desc": "Yet another Agent client based on the ACP protocol. Connect with the agent and begin collaborating.", "hint": "Start a new chat from the sidebar", "getStarted": "Get Started", "stepAgent": "Configure Agent", "stepAgentDesc": "Add an AI agent (Stdio or API) to power your conversations", "stepAgentDone": "{{count}} agent(s) configured", "stepProject": "Add Project", "stepProjectDesc": "Select a local project folder as your workspace", "stepProjectDone": "{{count}} project(s) added", "stepChat": "Start Chat", "stepChatDesc": "Create a new AI conversation in your project", "allDone": "All set! Start a new chat from the sidebar" };
15115
15115
  const askUser$1 = { "title": "Request", "other": "Other...", "back": "Back", "inputPlaceholder": "Type your response... (Enter to send)", "submit": "Submit" };
15116
- const automation$1 = { "title": "Automation", "agent": "Agent", "alwaysDisabled": "always disabled", "anyMoment": "Any moment now", "back": "Back", "cancel": "Cancel", "create": "Create", "createFirst": "Create your first schedule", "delete": "Delete", "deleteConfirm": 'Delete "{{name}}" permanently?', "deleteTaskConfirm": "Delete this task permanently?", "deleteTaskTitle": "Delete Task", "deleteTitle": "Delete Schedule", "dialogDesc": "Configure the automated task schedule and prompt.", "editSchedule": "Edit Schedule", "editSettings": "Edit settings", "features": "Features", "lastRun": "Last", "lessThanMinute": "Less than 1 min", "manual": "Manual", "manualDesc": "Manual trigger only. No automatic scheduling.", "mcpServers": "MCP Servers", "newSchedule": "New Schedule", "nextRun": "Next", "noFiles": "No files generated", "noSchedules": "No schedules yet", "noTasksDesc": 'No runs yet. Click "Trigger now" to start the first run.', "prompt": "Prompt", "promptPlaceholder": "What should the agent do?", "save": "Save", "schedule": "Schedule", "scheduleName": "Schedule Name", "scheduleNamePlaceholder": "e.g. Morning Standup Summary", "scheduleNotFound": "Schedule not found", "schedules": "schedules", "selectFileToPreview": "Select a file to preview", "selectTaskToPreview": "Select a task to preview files", "timedExecution": "Timed (cron)", "triggerNow": "Trigger now", "validation": { "nameRequired": "Name is required", "agentRequired": "Agent is required", "promptRequired": "Prompt is required" }, "cron": { "at": "at", "atMinute": "at min", "custom": "Custom", "daily": "Every day", "hourly": "Every N hours", "weekdays": "Weekdays", "weekly": "Every week", "nextRun": "Next run", "nextRunIn": "Next run in", "lastRun": "Last run", "days": { "0": "Sun", "1": "Mon", "2": "Tue", "3": "Wed", "4": "Thu", "5": "Fri", "6": "Sat" } } };
15116
+ const automation$1 = { "title": "Automation", "agent": "Agent", "alwaysDisabled": "always disabled", "anyMoment": "Any moment now", "back": "Back", "cancel": "Cancel", "create": "Create", "createFirst": "Create your first schedule", "delete": "Delete", "deleteConfirm": 'Delete "{{name}}" permanently?', "deleteTaskConfirm": "Delete this task permanently?", "deleteTaskTitle": "Delete Task", "deleteTitle": "Delete Schedule", "dialogDesc": "Configure the automated task schedule and prompt.", "editSchedule": "Edit Schedule", "editSettings": "Edit settings", "features": "Features", "lastRun": "Last", "lessThanMinute": "Less than 1 min", "manual": "Manual", "manualDesc": "Manual trigger only. No automatic scheduling.", "mcpServers": "MCP Servers", "newSchedule": "New Schedule", "nextRun": "Next", "noFiles": "No files generated", "noSchedules": "No schedules yet", "emptyHint": "Schedule AI tasks to run automatically with cron expressions", "noTasksDesc": 'No runs yet. Click "Trigger now" to start the first run.', "prompt": "Prompt", "promptPlaceholder": "What should the agent do?", "save": "Save", "schedule": "Schedule", "scheduleName": "Schedule Name", "scheduleNamePlaceholder": "e.g. Morning Standup Summary", "scheduleNotFound": "Schedule not found", "schedules": "schedules", "selectFileToPreview": "Select a file to preview", "selectTaskToPreview": "Select a task to preview files", "timedExecution": "Timed (cron)", "triggerNow": "Trigger now", "validation": { "nameRequired": "Name is required", "agentRequired": "Agent is required", "promptRequired": "Prompt is required" }, "cron": { "at": "at", "atMinute": "at min", "custom": "Custom", "daily": "Every day", "hourly": "Every N hours", "weekdays": "Weekdays", "weekly": "Every week", "nextRun": "Next run", "nextRunIn": "Next run in", "lastRun": "Last run", "days": { "0": "Sun", "1": "Mon", "2": "Tue", "3": "Wed", "4": "Thu", "5": "Fri", "6": "Sat" } } };
15117
15117
  const en$4 = {
15118
15118
  sidebar: sidebar$1,
15119
15119
  skills: skills$1,
@@ -15179,7 +15179,7 @@ const fileDetail = { "fileNotFound": "文件不存在", "fileTooLarge": "该文
15179
15179
  const htmlDetail = { "fileNotFound": "文件不存在或无法访问", "errorLoading": "加载失败", "loadFailed": "页面加载失败", "retry": "重试", "openInBrowser": "在浏览器中打开", "webuiNotEnabled": "请先启用 WebUI 才能在浏览器中打开", "open": "打开", "refresh": "刷新" };
15180
15180
  const welcome = { "title": "Fello", "desc": "又一个基于 ACP 协议的 Agent 客户端,连接智能体并开始协作。", "hint": "从左侧边栏新建会话开始", "getStarted": "开始使用", "stepAgent": "配置 Agent", "stepAgentDesc": "添加一个 AI 智能体(本地 Stdio 或 API)来驱动对话", "stepAgentDone": "已配置 {{count}} 个 Agent", "stepProject": "添加项目", "stepProjectDesc": "选择一个本地项目文件夹作为工作区", "stepProjectDone": "已添加 {{count}} 个项目", "stepChat": "开始会话", "stepChatDesc": "在项目中创建一个新的 AI 对话", "allDone": "一切就绪!从左侧边栏开始新会话吧" };
15181
15181
  const askUser = { "title": "请求", "other": "其他...", "back": "返回", "inputPlaceholder": "输入你的回复...(回车发送)", "submit": "提交" };
15182
- const automation = { "title": "自动化", "agent": "智能体", "alwaysDisabled": "始终禁用", "anyMoment": "即将执行", "back": "返回", "cancel": "取消", "create": "创建", "createFirst": "创建你的第一个调度", "delete": "删除", "deleteConfirm": "确定永久删除「{{name}}」?", "deleteTaskConfirm": "确定永久删除此任务?", "deleteTaskTitle": "删除任务", "deleteTitle": "删除调度", "dialogDesc": "配置自动化任务的调度规则和 Prompt。", "editSchedule": "编辑调度", "editSettings": "编辑设置", "features": "功能", "lastRun": "上次", "lessThanMinute": "不到 1 分钟", "manual": "手动", "manualDesc": "仅手动触发,无自动调度。", "mcpServers": "MCP 服务器", "newSchedule": "新建调度", "nextRun": "下次", "noFiles": "暂无生成文件", "noSchedules": "暂无调度", "noTasksDesc": "暂无运行记录。点击「立即触发」开始第一次运行。", "prompt": "提示词", "promptPlaceholder": "智能体需要执行什么任务?", "save": "保存", "schedule": "调度", "scheduleName": "调度名称", "scheduleNamePlaceholder": "例如:每日站会摘要", "scheduleNotFound": "调度未找到", "schedules": "调度", "selectFileToPreview": "选择文件预览", "selectTaskToPreview": "选择任务查看文件", "timedExecution": "定时(cron)", "triggerNow": "立即触发", "validation": { "nameRequired": "名称不能为空", "agentRequired": "请选择智能体", "promptRequired": "提示词不能为空" }, "cron": { "at": "在", "atMinute": "第", "custom": "自定义", "daily": "每天", "hourly": "每隔 N 小时", "weekdays": "工作日", "weekly": "每周", "nextRun": "下次执行", "nextRunIn": "距离下次执行还有", "lastRun": "上次执行", "days": { "0": "周日", "1": "周一", "2": "周二", "3": "周三", "4": "周四", "5": "周五", "6": "周六" } } };
15182
+ const automation = { "title": "自动化", "agent": "智能体", "alwaysDisabled": "始终禁用", "anyMoment": "即将执行", "back": "返回", "cancel": "取消", "create": "创建", "createFirst": "创建你的第一个计划", "delete": "删除", "deleteConfirm": "确定永久删除「{{name}}」?", "deleteTaskConfirm": "确定永久删除此任务?", "deleteTaskTitle": "删除任务", "deleteTitle": "删除计划", "dialogDesc": "配置自动化计划的执行规则和 Prompt。", "editSchedule": "编辑计划", "editSettings": "编辑设置", "features": "功能", "lastRun": "上次", "lessThanMinute": "不到 1 分钟", "manual": "手动", "manualDesc": "仅手动触发,无定时计划。", "mcpServers": "MCP 服务器", "newSchedule": "新建计划", "nextRun": "下次", "noFiles": "暂无生成文件", "noSchedules": "暂无计划", "emptyHint": "通过 cron 表达式配置定时 AI 任务,让 Agent 自动执行", "noTasksDesc": "暂无运行记录。点击「立即触发」开始第一次运行。", "prompt": "提示词", "promptPlaceholder": "智能体需要执行什么任务?", "save": "保存", "schedule": "计划", "scheduleName": "计划名称", "scheduleNamePlaceholder": "例如:每日站会摘要", "scheduleNotFound": "计划未找到", "schedules": "计划", "selectFileToPreview": "选择文件预览", "selectTaskToPreview": "选择任务查看文件", "timedExecution": "定时(cron)", "triggerNow": "立即触发", "validation": { "nameRequired": "名称不能为空", "agentRequired": "请选择智能体", "promptRequired": "提示词不能为空" }, "cron": { "at": "在", "atMinute": "第", "custom": "自定义", "daily": "每天", "hourly": "每隔 N 小时", "weekdays": "工作日", "weekly": "每周", "nextRun": "下次执行", "nextRunIn": "距离下次执行还有", "lastRun": "上次执行", "days": { "0": "周日", "1": "周一", "2": "周二", "3": "周三", "4": "周四", "5": "周五", "6": "周六" } } };
15183
15183
  const zhCN = {
15184
15184
  sidebar,
15185
15185
  skills,
@@ -40956,6 +40956,15 @@ function Sidebar() {
40956
40956
  window.addEventListener("fello:add-project", handler);
40957
40957
  return () => window.removeEventListener("fello:add-project", handler);
40958
40958
  }, []);
40959
+ const handleNewSessionRef = reactExports.useRef(void 0);
40960
+ reactExports.useEffect(() => {
40961
+ const handler = (e2) => {
40962
+ const projectId = e2.detail?.projectId;
40963
+ if (projectId) handleNewSessionRef.current?.(projectId);
40964
+ };
40965
+ window.addEventListener("fello:new-session", handler);
40966
+ return () => window.removeEventListener("fello:new-session", handler);
40967
+ }, []);
40959
40968
  const handleNavigate = (path2) => {
40960
40969
  setOptimisticPath(path2);
40961
40970
  setTimeout(() => {
@@ -41097,6 +41106,7 @@ function Sidebar() {
41097
41106
  setNewSessionPermissionMode("allow-all");
41098
41107
  setNewSessionDialogOpen(true);
41099
41108
  };
41109
+ handleNewSessionRef.current = openNewSessionDialog;
41100
41110
  const handleCreateNewSession = async () => {
41101
41111
  if (!newSessionProjectId || !newSessionAgentId) return;
41102
41112
  const ok2 = await handleNewChat(newSessionProjectId, newSessionAgentId, {
@@ -41128,13 +41138,14 @@ function Sidebar() {
41128
41138
  variant: "destructive",
41129
41139
  value: async () => {
41130
41140
  const store = useAppStore.getState();
41141
+ if (activeSessionId === session2.id) {
41142
+ handleNavigate("/");
41143
+ }
41144
+ await new Promise((resolve) => setTimeout(resolve, 100));
41131
41145
  setSessions(store.sessions.filter((s16) => s16.id !== session2.id));
41132
41146
  const map2 = new Map(store.sessionStates);
41133
41147
  map2.delete(session2.id);
41134
41148
  useAppStore.setState({ sessionStates: map2 });
41135
- if (activeSessionId === session2.id) {
41136
- handleNavigate("/");
41137
- }
41138
41149
  await request.deleteSession(session2.id);
41139
41150
  await refreshData();
41140
41151
  return "deleted";
@@ -41177,22 +41188,20 @@ function Sidebar() {
41177
41188
  {
41178
41189
  text: t2("sidebar.delete"),
41179
41190
  value: async () => {
41180
- await request.deleteProject(project.id);
41181
- const map2 = new Map(useAppStore.getState().sessionStates);
41182
- for (const session2 of sessions) {
41191
+ const state2 = useAppStore.getState();
41192
+ const activeSession = state2.sessions.find((session2) => session2.id === activeSessionId);
41193
+ if (activeSession && activeSession.projectId === project.id) {
41194
+ handleNavigate("/");
41195
+ }
41196
+ await new Promise((resolve) => setTimeout(resolve, 100));
41197
+ const map2 = new Map(state2.sessionStates);
41198
+ for (const session2 of state2.sessions) {
41183
41199
  if (session2.projectId === project.id) map2.delete(session2.id);
41184
41200
  }
41185
41201
  useAppStore.setState({ sessionStates: map2 });
41186
- const { sessions: updated } = await refreshData();
41187
- if (activeSessionId && !updated.some((session2) => session2.id === activeSessionId)) {
41188
- const next2 = updated.length > 0 ? updated[0] : null;
41189
- if (next2) {
41190
- handleNavigate(`/session-view/${next2.id}`);
41191
- } else {
41192
- handleNavigate("/");
41193
- }
41194
- }
41195
- return "confirm";
41202
+ await request.deleteProject(project.id);
41203
+ await refreshData();
41204
+ return "deleted";
41196
41205
  },
41197
41206
  variant: "destructive"
41198
41207
  }
@@ -41280,258 +41289,225 @@ function Sidebar() {
41280
41289
  }
41281
41290
  )
41282
41291
  ] }),
41283
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-0.5 p-1.5", children: [
41284
- sortedProjects.map((project) => {
41285
- const projectSessions = sessionsByProject[project.id] ?? [];
41286
- const expanded = isProjectExpanded(project.id);
41287
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-0.5", children: [
41288
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41289
- ContextMenu,
41290
- {
41291
- onOpenChange: (open2) => {
41292
- setOpenProjectMenuId(
41293
- (prev2) => open2 ? project.id : prev2 === project.id ? null : prev2
41294
- );
41295
- },
41296
- children: [
41292
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-0.5 p-1.5", children: sortedProjects.map((project) => {
41293
+ const projectSessions = sessionsByProject[project.id] ?? [];
41294
+ const expanded = isProjectExpanded(project.id);
41295
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-0.5", children: [
41296
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
41297
+ ContextMenu,
41298
+ {
41299
+ onOpenChange: (open2) => {
41300
+ setOpenProjectMenuId(
41301
+ (prev2) => open2 ? project.id : prev2 === project.id ? null : prev2
41302
+ );
41303
+ },
41304
+ children: [
41305
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
41306
+ ContextMenuTrigger,
41307
+ {
41308
+ render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
41309
+ className: `group flex h-7 cursor-default items-center gap-1.5 rounded-md px-1.5 text-xs font-normal text-sidebar-foreground/45 hover:bg-sidebar-accent/25 hover:text-sidebar-foreground/80 ${openProjectMenuId === project.id ? "bg-sidebar-accent/25 text-sidebar-foreground/80" : ""}`,
41310
+ onClick: () => toggleProject(project.id),
41311
+ onContextMenu: (e2) => {
41312
+ e2.stopPropagation();
41313
+ },
41314
+ children: [
41315
+ expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FolderClosed, { className: "size-3.5" }),
41316
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate leading-normal font-normal uppercase select-none", children: project.title }),
41317
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
41318
+ "button",
41319
+ {
41320
+ type: "button",
41321
+ onClick: (e2) => {
41322
+ e2.stopPropagation();
41323
+ openNewSessionDialog(project.id);
41324
+ },
41325
+ className: `flex size-4 items-center justify-center rounded-sm text-sidebar-foreground/40 hover:bg-sidebar-accent/25 hover:text-sidebar-foreground/70 ${projectSessions.length === 0 ? "opacity-100" : "opacity-0 group-hover:opacity-100"}`,
41326
+ "aria-label": t2("sidebar.createChatInProject", {
41327
+ defaultValue: "Create chat in {{title}}",
41328
+ title: project.title
41329
+ }),
41330
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, {})
41331
+ }
41332
+ )
41333
+ ]
41334
+ }
41335
+ ),
41336
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { onClick: (e2) => e2.stopPropagation(), className: "w-auto", children: [
41297
41337
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
41298
- ContextMenuTrigger,
41338
+ ContextMenuItem,
41299
41339
  {
41300
- render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
41301
- className: `group flex h-7 cursor-default items-center gap-1.5 rounded-md px-1.5 text-xs font-normal text-sidebar-foreground/45 hover:bg-sidebar-accent/25 hover:text-sidebar-foreground/80 ${openProjectMenuId === project.id ? "bg-sidebar-accent/25 text-sidebar-foreground/80" : ""}`,
41302
- onClick: () => toggleProject(project.id),
41303
- onContextMenu: (e2) => {
41340
+ onClick: (e2) => {
41304
41341
  e2.stopPropagation();
41342
+ openNewSessionDialog(project.id);
41305
41343
  },
41306
41344
  children: [
41307
- expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FolderClosed, { className: "size-3.5" }),
41308
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate leading-normal font-normal uppercase select-none", children: project.title }),
41309
- /* @__PURE__ */ jsxRuntimeExports.jsx(
41310
- "button",
41311
- {
41312
- type: "button",
41313
- onClick: (e2) => {
41314
- e2.stopPropagation();
41315
- openNewSessionDialog(project.id);
41316
- },
41317
- className: `flex size-4 items-center justify-center rounded-sm text-sidebar-foreground/40 hover:bg-sidebar-accent/25 hover:text-sidebar-foreground/70 ${projectSessions.length === 0 ? "opacity-100" : "opacity-0 group-hover:opacity-100"}`,
41318
- "aria-label": t2("sidebar.createChatInProject", {
41319
- defaultValue: "Create chat in {{title}}",
41320
- title: project.title
41321
- }),
41322
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, {})
41323
- }
41324
- )
41345
+ /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, {}),
41346
+ t2("sidebar.newChat", "New Chat")
41325
41347
  ]
41326
41348
  }
41327
41349
  ),
41328
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { onClick: (e2) => e2.stopPropagation(), className: "w-auto", children: [
41329
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41330
- ContextMenuItem,
41331
- {
41332
- onClick: (e2) => {
41333
- e2.stopPropagation();
41334
- openNewSessionDialog(project.id);
41335
- },
41336
- children: [
41337
- /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, {}),
41338
- t2("sidebar.newChat", "New Chat")
41339
- ]
41340
- }
41341
- ),
41342
- /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
41343
- !isWebUI && /* @__PURE__ */ jsxRuntimeExports.jsxs(
41344
- ContextMenuItem,
41345
- {
41346
- onClick: (e2) => {
41347
- e2.stopPropagation();
41348
- void handleRevealProjectInFinder(project);
41349
- },
41350
- children: [
41351
- /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, {}),
41352
- t2("sidebar.revealInFinder")
41353
- ]
41354
- }
41355
- ),
41356
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41357
- ContextMenuItem,
41358
- {
41359
- onClick: (e2) => {
41360
- e2.stopPropagation();
41361
- handleRenameProject(project);
41362
- },
41363
- children: [
41364
- /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, {}),
41365
- t2("sidebar.rename")
41366
- ]
41367
- }
41368
- ),
41369
- /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
41370
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41371
- ContextMenuItem,
41372
- {
41373
- variant: "destructive",
41374
- onClick: (e2) => {
41375
- e2.stopPropagation();
41376
- handleDeleteProject(project);
41377
- },
41378
- children: [
41379
- /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
41380
- t2("sidebar.delete")
41381
- ]
41382
- }
41383
- )
41384
- ] })
41385
- ]
41386
- }
41387
- ),
41388
- expanded && projectSessions.map((session2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
41389
- ContextMenu,
41390
- {
41391
- onOpenChange: (open2) => {
41392
- setOpenSessionMenuId(
41393
- (prev2) => open2 ? session2.id : prev2 === session2.id ? null : prev2
41394
- );
41395
- },
41396
- children: [
41397
- /* @__PURE__ */ jsxRuntimeExports.jsx(
41398
- ContextMenuTrigger,
41350
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
41351
+ !isWebUI && /* @__PURE__ */ jsxRuntimeExports.jsxs(
41352
+ ContextMenuItem,
41399
41353
  {
41400
- render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
41401
- onClick: () => handleSelectSession(session2),
41402
- className: `group flex h-8 cursor-default items-center justify-between rounded-md pl-1.5 pr-2 text-xs font-normal transition-colors ${activeSessionId === session2.id ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground/95"} ${openSessionMenuId === session2.id ? "bg-sidebar-accent" : ""}`,
41403
- onContextMenu: (e2) => {
41354
+ onClick: (e2) => {
41404
41355
  e2.stopPropagation();
41356
+ void handleRevealProjectInFinder(project);
41405
41357
  },
41406
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
41407
- (() => {
41408
- const state2 = sessionStates.get(session2.id);
41409
- const hasAskUser = (state2?.askUserRequests?.length ?? 0) > 0;
41410
- const isStreaming = session2.isStreaming;
41411
- const completedStatus = state2?.completedStatus;
41412
- if (hasAskUser) {
41413
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { className: "size-3 shrink-0 text-sky-500" });
41414
- }
41415
- if (isStreaming) {
41416
- return /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin shrink-0" });
41417
- }
41418
- if (completedStatus === "success" || state2?.completedAt && !completedStatus) {
41419
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 shrink-0 text-green-500" });
41420
- }
41421
- if (completedStatus === "error") {
41422
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-3 shrink-0 text-yellow-500" });
41423
- }
41424
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-3 shrink-0" });
41425
- })(),
41426
- /* @__PURE__ */ jsxRuntimeExports.jsx(
41427
- Badge,
41428
- {
41429
- variant: "outline",
41430
- className: "px-1 -ml-0.5 text-[10px] uppercase max-w-15 truncate text-center leading-normal py-0 select-none",
41431
- children: configuredAgents.find((a2) => a2.id === session2.agentId)?.id || session2.agentId
41432
- }
41433
- ),
41434
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1 truncate leading-normal select-none", children: session2.title || t2("sidebar.newChat", "New Chat") }),
41435
- activeIlinkSessionId === session2.id && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, { className: "size-3 shrink-0 text-green-500" })
41436
- ] })
41358
+ children: [
41359
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, {}),
41360
+ t2("sidebar.revealInFinder")
41361
+ ]
41437
41362
  }
41438
41363
  ),
41439
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { onClick: (e2) => e2.stopPropagation(), className: "w-auto", children: [
41440
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41441
- ContextMenuItem,
41442
- {
41443
- onClick: (e2) => {
41444
- e2.stopPropagation();
41445
- handleRenameSession(session2);
41446
- },
41447
- children: [
41448
- /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, {}),
41449
- t2("sidebar.rename")
41450
- ]
41451
- }
41452
- ),
41453
- ilinkStatus.connected && activeIlinkSessionId !== session2.id && /* @__PURE__ */ jsxRuntimeExports.jsxs(
41454
- ContextMenuItem,
41455
- {
41456
- onClick: (e2) => {
41457
- e2.stopPropagation();
41458
- request.setActiveIlinkSession({ sessionId: session2.id }).catch(() => {
41459
- });
41460
- },
41461
- children: [
41462
- /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, {}),
41463
- t2("sidebar.ilinkSetActive", "Set as WeChat Active")
41464
- ]
41465
- }
41466
- ),
41467
- ilinkStatus.connected && activeIlinkSessionId === session2.id && /* @__PURE__ */ jsxRuntimeExports.jsxs(
41468
- ContextMenuItem,
41469
- {
41470
- onClick: (e2) => {
41471
- e2.stopPropagation();
41472
- request.setActiveIlinkSession({ sessionId: "" }).catch(() => {
41473
- });
41474
- },
41475
- children: [
41476
- /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, {}),
41477
- t2("sidebar.ilinkUnsetActive", "Unset WeChat Active")
41478
- ]
41479
- }
41480
- ),
41481
- /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
41482
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41483
- ContextMenuItem,
41484
- {
41485
- variant: "destructive",
41486
- onClick: (e2) => {
41487
- e2.stopPropagation();
41488
- void handleDeleteSession(session2);
41489
- },
41490
- children: [
41491
- /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
41492
- t2("sidebar.delete")
41493
- ]
41494
- }
41495
- )
41496
- ] })
41497
- ]
41498
- },
41499
- session2.id
41500
- ))
41501
- ] }, project.id);
41502
- }),
41503
- projects.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 flex flex-col items-center gap-2 px-2", children: enabledAgents.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
41504
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-center text-xs text-muted-foreground select-none", children: t2("sidebar.noAgentsHint") }),
41505
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41506
- Button,
41507
- {
41508
- variant: "outline",
41509
- size: "sm",
41510
- className: "h-7 text-xs w-full",
41511
- onClick: () => handleNavigate("/settings/agents"),
41512
- children: [
41513
- /* @__PURE__ */ jsxRuntimeExports.jsx(Settings$1, { className: "size-3 mr-1" }),
41514
- t2("sidebar.configureAgent")
41364
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
41365
+ ContextMenuItem,
41366
+ {
41367
+ onClick: (e2) => {
41368
+ e2.stopPropagation();
41369
+ handleRenameProject(project);
41370
+ },
41371
+ children: [
41372
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, {}),
41373
+ t2("sidebar.rename")
41374
+ ]
41375
+ }
41376
+ ),
41377
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
41378
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
41379
+ ContextMenuItem,
41380
+ {
41381
+ variant: "destructive",
41382
+ onClick: (e2) => {
41383
+ e2.stopPropagation();
41384
+ handleDeleteProject(project);
41385
+ },
41386
+ children: [
41387
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
41388
+ t2("sidebar.delete")
41389
+ ]
41390
+ }
41391
+ )
41392
+ ] })
41515
41393
  ]
41516
41394
  }
41517
- )
41518
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
41519
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-center text-xs text-muted-foreground select-none", children: t2("sidebar.noProjectsHint") }),
41520
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
41521
- Button,
41395
+ ),
41396
+ expanded && projectSessions.map((session2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
41397
+ ContextMenu,
41522
41398
  {
41523
- variant: "outline",
41524
- size: "sm",
41525
- className: "h-7 text-xs w-full",
41526
- onClick: handleAddProject,
41399
+ onOpenChange: (open2) => {
41400
+ setOpenSessionMenuId(
41401
+ (prev2) => open2 ? session2.id : prev2 === session2.id ? null : prev2
41402
+ );
41403
+ },
41527
41404
  children: [
41528
- /* @__PURE__ */ jsxRuntimeExports.jsx(FolderPlus, { className: "size-3 mr-1" }),
41529
- t2("sidebar.addProject")
41405
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
41406
+ ContextMenuTrigger,
41407
+ {
41408
+ render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
41409
+ onClick: () => handleSelectSession(session2),
41410
+ className: `group flex h-8 cursor-default items-center justify-between rounded-md pl-1.5 pr-2 text-xs font-normal transition-colors ${activeSessionId === session2.id ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground/95"} ${openSessionMenuId === session2.id ? "bg-sidebar-accent" : ""}`,
41411
+ onContextMenu: (e2) => {
41412
+ e2.stopPropagation();
41413
+ },
41414
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
41415
+ (() => {
41416
+ const state2 = sessionStates.get(session2.id);
41417
+ const hasAskUser = (state2?.askUserRequests?.length ?? 0) > 0;
41418
+ const isStreaming = session2.isStreaming;
41419
+ const completedStatus = state2?.completedStatus;
41420
+ if (hasAskUser) {
41421
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { className: "size-3 shrink-0 text-sky-500" });
41422
+ }
41423
+ if (isStreaming) {
41424
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin shrink-0" });
41425
+ }
41426
+ if (completedStatus === "success" || state2?.completedAt && !completedStatus) {
41427
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 shrink-0 text-green-500" });
41428
+ }
41429
+ if (completedStatus === "error") {
41430
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-3 shrink-0 text-yellow-500" });
41431
+ }
41432
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-3 shrink-0" });
41433
+ })(),
41434
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
41435
+ Badge,
41436
+ {
41437
+ variant: "outline",
41438
+ className: "px-1 -ml-0.5 text-[10px] uppercase max-w-15 truncate text-center leading-normal py-0 select-none",
41439
+ children: configuredAgents.find((a2) => a2.id === session2.agentId)?.id || session2.agentId
41440
+ }
41441
+ ),
41442
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1 truncate leading-normal select-none", children: session2.title || t2("sidebar.newChat", "New Chat") }),
41443
+ activeIlinkSessionId === session2.id && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, { className: "size-3 shrink-0 text-green-500" })
41444
+ ] })
41445
+ }
41446
+ ),
41447
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { onClick: (e2) => e2.stopPropagation(), className: "w-auto", children: [
41448
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
41449
+ ContextMenuItem,
41450
+ {
41451
+ onClick: (e2) => {
41452
+ e2.stopPropagation();
41453
+ handleRenameSession(session2);
41454
+ },
41455
+ children: [
41456
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, {}),
41457
+ t2("sidebar.rename")
41458
+ ]
41459
+ }
41460
+ ),
41461
+ ilinkStatus.connected && activeIlinkSessionId !== session2.id && /* @__PURE__ */ jsxRuntimeExports.jsxs(
41462
+ ContextMenuItem,
41463
+ {
41464
+ onClick: (e2) => {
41465
+ e2.stopPropagation();
41466
+ request.setActiveIlinkSession({ sessionId: session2.id }).catch(() => {
41467
+ });
41468
+ },
41469
+ children: [
41470
+ /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, {}),
41471
+ t2("sidebar.ilinkSetActive", "Set as WeChat Active")
41472
+ ]
41473
+ }
41474
+ ),
41475
+ ilinkStatus.connected && activeIlinkSessionId === session2.id && /* @__PURE__ */ jsxRuntimeExports.jsxs(
41476
+ ContextMenuItem,
41477
+ {
41478
+ onClick: (e2) => {
41479
+ e2.stopPropagation();
41480
+ request.setActiveIlinkSession({ sessionId: "" }).catch(() => {
41481
+ });
41482
+ },
41483
+ children: [
41484
+ /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, {}),
41485
+ t2("sidebar.ilinkUnsetActive", "Unset WeChat Active")
41486
+ ]
41487
+ }
41488
+ ),
41489
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
41490
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
41491
+ ContextMenuItem,
41492
+ {
41493
+ variant: "destructive",
41494
+ onClick: (e2) => {
41495
+ e2.stopPropagation();
41496
+ void handleDeleteSession(session2);
41497
+ },
41498
+ children: [
41499
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
41500
+ t2("sidebar.delete")
41501
+ ]
41502
+ }
41503
+ )
41504
+ ] })
41530
41505
  ]
41531
- }
41532
- )
41533
- ] }) })
41534
- ] }) }),
41506
+ },
41507
+ session2.id
41508
+ ))
41509
+ ] }, project.id);
41510
+ }) }) }),
41535
41511
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-auto border-t border-border", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
41536
41512
  Button,
41537
41513
  {
@@ -41804,6 +41780,34 @@ function SettingsLayout() {
41804
41780
  ] })
41805
41781
  ] });
41806
41782
  }
41783
+ function Card({
41784
+ className,
41785
+ size: size2 = "default",
41786
+ ...props
41787
+ }) {
41788
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
41789
+ "div",
41790
+ {
41791
+ "data-slot": "card",
41792
+ "data-size": size2,
41793
+ className: cn$5(
41794
+ "group/card flex flex-col overflow-hidden rounded-xl bg-card border border-border text-sm text-card-foreground has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
41795
+ className
41796
+ ),
41797
+ ...props
41798
+ }
41799
+ );
41800
+ }
41801
+ function CardContent({ className, ...props }) {
41802
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
41803
+ "div",
41804
+ {
41805
+ "data-slot": "card-content",
41806
+ className: cn$5("px-3 pb-3", className),
41807
+ ...props
41808
+ }
41809
+ );
41810
+ }
41807
41811
  const PARTICLE_COUNT = 70;
41808
41812
  const CONNECTION_DIST = 140;
41809
41813
  const RIPPLE_MAX_RADIUS = 200;
@@ -41957,11 +41961,13 @@ function Welcome() {
41957
41961
  const [tilt, setTilt] = reactExports.useState({ x: 0, y: 0 });
41958
41962
  const agents = useAppStore((s16) => s16.configuredAgents);
41959
41963
  const projects = useAppStore((s16) => s16.projects);
41964
+ const sessions = useAppStore((s16) => s16.sessions);
41960
41965
  const setI18n2 = useAppStore((s16) => s16.setI18n);
41961
41966
  const enabledAgentCount = reactExports.useMemo(() => agents.filter((a2) => !a2.disabled).length, [agents]);
41962
41967
  const hasAgents = enabledAgentCount > 0;
41963
41968
  const hasProjects = projects.length > 0;
41964
41969
  const allDone = hasAgents && hasProjects;
41970
+ const showGuide = !allDone || projects.length <= 1 && sessions.length === 0;
41965
41971
  const handleMouseMove = reactExports.useCallback((e2) => {
41966
41972
  const rect2 = containerRef.current?.getBoundingClientRect();
41967
41973
  if (!rect2) return;
@@ -41982,7 +41988,7 @@ function Welcome() {
41982
41988
  children: [
41983
41989
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "absolute bottom-3 right-4 text-[11px] text-muted-foreground/40 z-10 pointer-events-none", children: [
41984
41990
  "v",
41985
- "0.1.29"
41991
+ "0.1.30"
41986
41992
  ] }),
41987
41993
  /* @__PURE__ */ jsxRuntimeExports.jsx(
41988
41994
  "div",
@@ -42025,48 +42031,50 @@ function Welcome() {
42025
42031
  /* @__PURE__ */ jsxRuntimeExports.jsx(
42026
42032
  "p",
42027
42033
  {
42028
- className: "mt-2 max-w-md text-sm text-muted-foreground animate-text-fade-in",
42034
+ className: "mt-2 max-w-md text-sm text-muted-foreground animate-text-fade-in min-h-10",
42029
42035
  style: { animationDelay: "0.6s", animationFillMode: "both" },
42030
42036
  children: t2("welcome.desc")
42031
42037
  }
42032
42038
  )
42033
42039
  ] }),
42034
- !allDone ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
42035
- "div",
42040
+ showGuide && /* @__PURE__ */ jsxRuntimeExports.jsx(
42041
+ Card,
42036
42042
  {
42037
- className: "relative z-10 flex flex-col gap-3 w-full max-w-xs animate-text-fade-in",
42043
+ size: "sm",
42044
+ className: "relative z-10 w-100 bg-card/80 backdrop-blur-sm animate-text-fade-in",
42038
42045
  style: { animationDelay: "0.8s", animationFillMode: "both" },
42039
- children: [
42040
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-medium text-muted-foreground/70 uppercase tracking-wide text-center", children: t2("welcome.getStarted") }),
42041
- /* @__PURE__ */ jsxRuntimeExports.jsx(
42042
- Tabs,
42043
- {
42044
- value: i18n.language,
42045
- onValueChange: (lang) => {
42046
- if (!lang) return;
42047
- setI18n2({ language: lang });
42048
- i18n.changeLanguage(lang);
42049
- request.updateSettings({ i18n: { language: lang } }).catch(() => {
42050
- });
42051
- },
42052
- className: "self-center w-full",
42053
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { className: "w-full", children: [
42054
- /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "en", className: "flex-1 text-xs", children: t2("settings.general.english") }),
42055
- /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "zh-CN", className: "flex-1 text-xs", children: t2("settings.general.chinese") })
42056
- ] })
42057
- }
42058
- ),
42046
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "flex flex-col gap-2.5 px-3 py-3", children: [
42047
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-3", children: [
42048
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-medium text-muted-foreground/90 uppercase tracking-wide", children: t2("welcome.getStarted") }),
42049
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
42050
+ Tabs,
42051
+ {
42052
+ value: i18n.language,
42053
+ onValueChange: (lang) => {
42054
+ if (!lang) return;
42055
+ setI18n2({ language: lang });
42056
+ i18n.changeLanguage(lang);
42057
+ request.updateSettings({ i18n: { language: lang } }).catch(() => {
42058
+ });
42059
+ },
42060
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { children: [
42061
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "en", className: "text-[11px] h-6 px-1.5", children: "English" }),
42062
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "zh-CN", className: "text-[11px] h-6 px-1.5", children: "简体中文" })
42063
+ ] })
42064
+ }
42065
+ )
42066
+ ] }),
42059
42067
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
42060
42068
  "button",
42061
42069
  {
42062
42070
  type: "button",
42063
42071
  onClick: () => !hasAgents && navigate("/settings/agents"),
42064
- className: `flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors ${hasAgents ? "border-green-500/30 bg-green-500/5 cursor-default" : "border-border hover:border-primary/40 hover:bg-primary/5 cursor-pointer"}`,
42072
+ className: `flex items-center gap-3 rounded-lg border px-2.5 py-2 text-left transition-all ${hasAgents ? "border-green-500/20 bg-green-500/5 cursor-default" : "border-border hover:border-primary/30 hover:bg-primary/5 cursor-default"}`,
42065
42073
  children: [
42066
42074
  /* @__PURE__ */ jsxRuntimeExports.jsx(
42067
42075
  "div",
42068
42076
  {
42069
- className: `flex size-7 shrink-0 items-center justify-center rounded-md ${hasAgents ? "bg-green-500/15 text-green-600" : "bg-primary/10 text-primary"}`,
42077
+ className: `flex size-6 shrink-0 items-center justify-center rounded-md ${hasAgents ? "bg-green-500/15 text-green-600" : "bg-primary/10 text-primary"}`,
42070
42078
  children: hasAgents ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Bot, { className: "size-3.5" })
42071
42079
  }
42072
42080
  ),
@@ -42082,17 +42090,17 @@ function Welcome() {
42082
42090
  {
42083
42091
  type: "button",
42084
42092
  onClick: () => {
42085
- if (!hasProjects) {
42093
+ if (!hasProjects && hasAgents) {
42086
42094
  window.dispatchEvent(new CustomEvent("fello:add-project"));
42087
42095
  }
42088
42096
  },
42089
- className: `flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors ${hasProjects ? "border-green-500/30 bg-green-500/5 cursor-default" : !hasAgents ? "border-border/50 opacity-50 cursor-not-allowed" : "border-border hover:border-primary/40 hover:bg-primary/5 cursor-pointer"}`,
42090
42097
  disabled: !hasAgents,
42098
+ className: `flex items-center gap-3 rounded-lg border px-2.5 py-2 text-left transition-all ${hasProjects ? "border-green-500/20 bg-green-500/5 cursor-default" : !hasAgents ? "border-border opacity-40 cursor-not-allowed" : "border-border hover:border-primary/30 hover:bg-primary/5 cursor-default"}`,
42091
42099
  children: [
42092
42100
  /* @__PURE__ */ jsxRuntimeExports.jsx(
42093
42101
  "div",
42094
42102
  {
42095
- className: `flex size-7 shrink-0 items-center justify-center rounded-md ${hasProjects ? "bg-green-500/15 text-green-600" : "bg-primary/10 text-primary"}`,
42103
+ className: `flex size-6 shrink-0 items-center justify-center rounded-md ${hasProjects ? "bg-green-500/15 text-green-600" : "bg-primary/10 text-primary"}`,
42096
42104
  children: hasProjects ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FolderPlus, { className: "size-3.5" })
42097
42105
  }
42098
42106
  ),
@@ -42104,11 +42112,25 @@ function Welcome() {
42104
42112
  }
42105
42113
  ),
42106
42114
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
42107
- "div",
42115
+ "button",
42108
42116
  {
42109
- className: `flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left ${!hasAgents || !hasProjects ? "border-border/50 opacity-50" : "border-border"}`,
42117
+ type: "button",
42118
+ onClick: () => {
42119
+ if (allDone) {
42120
+ const firstProject = projects[0];
42121
+ if (firstProject) {
42122
+ window.dispatchEvent(
42123
+ new CustomEvent("fello:new-session", {
42124
+ detail: { projectId: firstProject.id }
42125
+ })
42126
+ );
42127
+ }
42128
+ }
42129
+ },
42130
+ disabled: !allDone,
42131
+ className: `flex items-center gap-3 rounded-lg border px-2.5 py-2 text-left transition-all ${allDone ? "border-border hover:border-primary/30 hover:bg-primary/5 cursor-default" : "border-border opacity-40 cursor-not-allowed"}`,
42110
42132
  children: [
42111
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-7 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, { className: "size-3.5" }) }),
42133
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, { className: "size-3.5" }) }),
42112
42134
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
42113
42135
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium", children: t2("welcome.stepChat") }),
42114
42136
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[11px] text-muted-foreground mt-0.5", children: t2("welcome.stepChatDesc") })
@@ -42116,17 +42138,7 @@ function Welcome() {
42116
42138
  ]
42117
42139
  }
42118
42140
  )
42119
- ]
42120
- }
42121
- ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
42122
- "div",
42123
- {
42124
- className: "flex items-center gap-2 text-xs text-muted-foreground/50 relative z-10 animate-text-fade-in pointer-events-none",
42125
- style: { animationDelay: "1s", animationFillMode: "both" },
42126
- children: [
42127
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3 animate-bounce-horizontal" }),
42128
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2("welcome.allDone") })
42129
- ]
42141
+ ] })
42130
42142
  }
42131
42143
  )
42132
42144
  ]
@@ -68650,7 +68662,7 @@ var lr$2 = (e2) => {
68650
68662
  for (; t2 > 0 && e2[t2 - 1] === `
68651
68663
  `; ) t2--;
68652
68664
  return e2.slice(0, t2);
68653
- }, cr$1 = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-OFNGDK62-DQWoSdTY.js"), true ? [] : void 0, import.meta.url).then((e2) => ({ default: e2.HighlightedCodeBlockBody }))), st$4 = ({ code: e2, language: t2, className: o4, children: n2, isIncomplete: r3 = false, startLine: s16, lineNumbers: a2, ...l6 }) => {
68665
+ }, cr$1 = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-OFNGDK62-VELQyUbs.js"), true ? [] : void 0, import.meta.url).then((e2) => ({ default: e2.HighlightedCodeBlockBody }))), st$4 = ({ code: e2, language: t2, className: o4, children: n2, isIncomplete: r3 = false, startLine: s16, lineNumbers: a2, ...l6 }) => {
68654
68666
  let i3 = y$9(), d2 = reactExports.useMemo(() => lr$2(e2), [e2]), c2 = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: d2.split(`
68655
68667
  `).map((p3) => [{ content: p3, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [d2]);
68656
68668
  return jsxRuntimeExports.jsx(nt$4.Provider, { value: { code: e2 }, children: jsxRuntimeExports.jsxs(ot$4, { isIncomplete: r3, language: t2, children: [jsxRuntimeExports.jsx(rt$3, { language: t2 }), n2 ? jsxRuntimeExports.jsx("div", { className: i3("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: jsxRuntimeExports.jsx("div", { className: i3("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "code-block-actions", children: n2 }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(At$2, { className: o4, language: t2, lineNumbers: a2, result: c2, startLine: s16, ...l6 }), children: jsxRuntimeExports.jsx(cr$1, { className: o4, code: d2, language: t2, lineNumbers: a2, raw: c2, startLine: s16, ...l6 }) })] }) });
@@ -93491,12 +93503,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
93491
93503
  registerLayoutLoaders([
93492
93504
  {
93493
93505
  name: "dagre",
93494
- loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-4I0h4wyh.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
93506
+ loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-NIF-wzAb.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
93495
93507
  },
93496
93508
  ...[
93497
93509
  {
93498
93510
  name: "cose-bilkent",
93499
- loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-lCfWcP6y.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
93511
+ loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-DqTN-_zY.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
93500
93512
  }
93501
93513
  ]
93502
93514
  ]);
@@ -93952,7 +93964,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
93952
93964
  }, "detector");
93953
93965
  var loader = /* @__PURE__ */ __name(async () => {
93954
93966
  const { diagram: diagram2 } = await __vitePreload(async () => {
93955
- const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-Co_b_6bH.js");
93967
+ const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-ntNDbqWz.js");
93956
93968
  return { diagram: diagram22 };
93957
93969
  }, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
93958
93970
  return { id, diagram: diagram2 };
@@ -93972,7 +93984,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
93972
93984
  }, "detector");
93973
93985
  var loader2 = /* @__PURE__ */ __name(async () => {
93974
93986
  const { diagram: diagram2 } = await __vitePreload(async () => {
93975
- const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-Dfg0LLup.js");
93987
+ const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYt7MUO6.js");
93976
93988
  return { diagram: diagram22 };
93977
93989
  }, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
93978
93990
  return { id: id2, diagram: diagram2 };
@@ -93998,7 +94010,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
93998
94010
  }, "detector");
93999
94011
  var loader3 = /* @__PURE__ */ __name(async () => {
94000
94012
  const { diagram: diagram2 } = await __vitePreload(async () => {
94001
- const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-Dfg0LLup.js");
94013
+ const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYt7MUO6.js");
94002
94014
  return { diagram: diagram22 };
94003
94015
  }, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
94004
94016
  return { id: id3, diagram: diagram2 };
@@ -94015,7 +94027,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
94015
94027
  }, "detector");
94016
94028
  var loader4 = /* @__PURE__ */ __name(async () => {
94017
94029
  const { diagram: diagram2 } = await __vitePreload(async () => {
94018
- const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-Bk9QFZ27.js");
94030
+ const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-1ZgzBjAm.js");
94019
94031
  return { diagram: diagram22 };
94020
94032
  }, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
94021
94033
  return { id: id4, diagram: diagram2 };
@@ -94032,7 +94044,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
94032
94044
  }, "detector");
94033
94045
  var loader5 = /* @__PURE__ */ __name(async () => {
94034
94046
  const { diagram: diagram2 } = await __vitePreload(async () => {
94035
- const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-C74WBszH.js");
94047
+ const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-4nzL1En3.js");
94036
94048
  return { diagram: diagram22 };
94037
94049
  }, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
94038
94050
  return { id: id5, diagram: diagram2 };
@@ -94049,7 +94061,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
94049
94061
  }, "detector");
94050
94062
  var loader6 = /* @__PURE__ */ __name(async () => {
94051
94063
  const { diagram: diagram2 } = await __vitePreload(async () => {
94052
- const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-lTjaJTs0.js");
94064
+ const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-nHro8zN9.js");
94053
94065
  return { diagram: diagram22 };
94054
94066
  }, true ? __vite__mapDeps([20,21,22,23]) : void 0, import.meta.url);
94055
94067
  return { id: id6, diagram: diagram2 };
@@ -94066,7 +94078,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
94066
94078
  }, "detector");
94067
94079
  var loader7 = /* @__PURE__ */ __name(async () => {
94068
94080
  const { diagram: diagram2 } = await __vitePreload(async () => {
94069
- const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-CR4ZLAM1.js");
94081
+ const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-BgCd2fMi.js");
94070
94082
  return { diagram: diagram22 };
94071
94083
  }, true ? __vite__mapDeps([24,19,4,2]) : void 0, import.meta.url);
94072
94084
  return { id: id7, diagram: diagram2 };
@@ -94082,7 +94094,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
94082
94094
  }, "detector");
94083
94095
  var loader8 = /* @__PURE__ */ __name(async () => {
94084
94096
  const { diagram: diagram2 } = await __vitePreload(async () => {
94085
- const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-C8AxK_-F.js");
94097
+ const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-DyXeoEBp.js");
94086
94098
  return { diagram: diagram22 };
94087
94099
  }, true ? __vite__mapDeps([25,17,19,4,2,26,27,22]) : void 0, import.meta.url);
94088
94100
  return { id: id8, diagram: diagram2 };
@@ -94098,7 +94110,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
94098
94110
  }, "detector");
94099
94111
  var loader9 = /* @__PURE__ */ __name(async () => {
94100
94112
  const { diagram: diagram2 } = await __vitePreload(async () => {
94101
- const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-BdiZmi7w.js");
94113
+ const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-hFY-GkiJ.js");
94102
94114
  return { diagram: diagram22 };
94103
94115
  }, true ? __vite__mapDeps([28,21,22,23]) : void 0, import.meta.url);
94104
94116
  return { id: id9, diagram: diagram2 };
@@ -94115,7 +94127,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
94115
94127
  }, "detector");
94116
94128
  var loader10 = /* @__PURE__ */ __name(async () => {
94117
94129
  const { diagram: diagram2 } = await __vitePreload(async () => {
94118
- const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-J9z4uuMK.js");
94130
+ const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND--HADKQzk.js");
94119
94131
  return { diagram: diagram22 };
94120
94132
  }, true ? __vite__mapDeps([29,22,27,21,23]) : void 0, import.meta.url);
94121
94133
  return { id: id10, diagram: diagram2 };
@@ -94132,7 +94144,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
94132
94144
  }, "detector");
94133
94145
  var loader11 = /* @__PURE__ */ __name(async () => {
94134
94146
  const { diagram: diagram2 } = await __vitePreload(async () => {
94135
- const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-BHIfl5Tz.js");
94147
+ const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-ecRwwTfv.js");
94136
94148
  return { diagram: diagram22 };
94137
94149
  }, true ? __vite__mapDeps([30,12,13]) : void 0, import.meta.url);
94138
94150
  return { id: id11, diagram: diagram2 };
@@ -94149,7 +94161,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
94149
94161
  }, "detector");
94150
94162
  var loader12 = /* @__PURE__ */ __name(async () => {
94151
94163
  const { diagram: diagram2 } = await __vitePreload(async () => {
94152
- const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-COKEbCYM.js");
94164
+ const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-AV2u_2fd.js");
94153
94165
  return { diagram: diagram22 };
94154
94166
  }, true ? __vite__mapDeps([31,9,18]) : void 0, import.meta.url);
94155
94167
  return { id: id12, diagram: diagram2 };
@@ -94169,7 +94181,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
94169
94181
  }, "detector");
94170
94182
  var loader13 = /* @__PURE__ */ __name(async () => {
94171
94183
  const { diagram: diagram2 } = await __vitePreload(async () => {
94172
- const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-OFMeoPav.js");
94184
+ const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-CpuoT-Jx.js");
94173
94185
  return { diagram: diagram22 };
94174
94186
  }, true ? __vite__mapDeps([32,33,11,9,12,13]) : void 0, import.meta.url);
94175
94187
  return { id: id13, diagram: diagram2 };
@@ -94189,7 +94201,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
94189
94201
  }, "detector");
94190
94202
  var loader14 = /* @__PURE__ */ __name(async () => {
94191
94203
  const { diagram: diagram2 } = await __vitePreload(async () => {
94192
- const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-OFMeoPav.js");
94204
+ const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-CpuoT-Jx.js");
94193
94205
  return { diagram: diagram22 };
94194
94206
  }, true ? __vite__mapDeps([34,33,11,9,12,13]) : void 0, import.meta.url);
94195
94207
  return { id: id14, diagram: diagram2 };
@@ -94209,7 +94221,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
94209
94221
  }, "detector");
94210
94222
  var loader15 = /* @__PURE__ */ __name(async () => {
94211
94223
  const { diagram: diagram2 } = await __vitePreload(async () => {
94212
- const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-7zRGBf7O.js");
94224
+ const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-DoTCNWMJ.js");
94213
94225
  return { diagram: diagram22 };
94214
94226
  }, true ? __vite__mapDeps([35,36,12,13,1,2,3,4]) : void 0, import.meta.url);
94215
94227
  return { id: id15, diagram: diagram2 };
@@ -94232,7 +94244,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
94232
94244
  }, "detector");
94233
94245
  var loader16 = /* @__PURE__ */ __name(async () => {
94234
94246
  const { diagram: diagram2 } = await __vitePreload(async () => {
94235
- const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-BqHJ_ZBX.js");
94247
+ const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2--Ezn8EQY.js");
94236
94248
  return { diagram: diagram22 };
94237
94249
  }, true ? __vite__mapDeps([37,36,12,13]) : void 0, import.meta.url);
94238
94250
  return { id: id16, diagram: diagram2 };
@@ -94249,7 +94261,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
94249
94261
  }, "detector");
94250
94262
  var loader17 = /* @__PURE__ */ __name(async () => {
94251
94263
  const { diagram: diagram2 } = await __vitePreload(async () => {
94252
- const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-Ds2OL3Lo.js");
94264
+ const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-Cl5-PgKK.js");
94253
94265
  return { diagram: diagram22 };
94254
94266
  }, true ? __vite__mapDeps([38,11,9,26]) : void 0, import.meta.url);
94255
94267
  return { id: id17, diagram: diagram2 };
@@ -94319,7 +94331,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
94319
94331
  }, "detector");
94320
94332
  var loader18 = /* @__PURE__ */ __name(async () => {
94321
94333
  const { diagram: diagram2 } = await __vitePreload(async () => {
94322
- const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-Dfg0LLup.js");
94334
+ const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYt7MUO6.js");
94323
94335
  return { diagram: diagram22 };
94324
94336
  }, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
94325
94337
  return { id: id18, diagram: diagram2 };
@@ -94336,7 +94348,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
94336
94348
  }, "detector");
94337
94349
  var loader19 = /* @__PURE__ */ __name(async () => {
94338
94350
  const { diagram: diagram2 } = await __vitePreload(async () => {
94339
- const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-AvZAT5J-.js");
94351
+ const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-CQvZXAlZ.js");
94340
94352
  return { diagram: diagram22 };
94341
94353
  }, true ? __vite__mapDeps([39,26]) : void 0, import.meta.url);
94342
94354
  return { id: id19, diagram: diagram2 };
@@ -94353,7 +94365,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
94353
94365
  }, "detector");
94354
94366
  var loader20 = /* @__PURE__ */ __name(async () => {
94355
94367
  const { diagram: diagram2 } = await __vitePreload(async () => {
94356
- const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-C3U3xkIJ.js");
94368
+ const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-DYc59m-R.js");
94357
94369
  return { diagram: diagram22 };
94358
94370
  }, true ? __vite__mapDeps([40,12,13]) : void 0, import.meta.url);
94359
94371
  return { id: id20, diagram: diagram2 };
@@ -94370,7 +94382,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
94370
94382
  }, "detector");
94371
94383
  var loader21 = /* @__PURE__ */ __name(async () => {
94372
94384
  const { diagram: diagram2 } = await __vitePreload(async () => {
94373
- const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-CZ1CZVyP.js");
94385
+ const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-CTdiOO_t.js");
94374
94386
  return { diagram: diagram22 };
94375
94387
  }, true ? __vite__mapDeps([41,11]) : void 0, import.meta.url);
94376
94388
  return { id: id21, diagram: diagram2 };
@@ -94387,7 +94399,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
94387
94399
  }, "detector");
94388
94400
  var loader22 = /* @__PURE__ */ __name(async () => {
94389
94401
  const { diagram: diagram2 } = await __vitePreload(async () => {
94390
- const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-SthTR8cL.js");
94402
+ const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-BTL3sclU.js");
94391
94403
  return { diagram: diagram22 };
94392
94404
  }, true ? __vite__mapDeps([42,27,22]) : void 0, import.meta.url);
94393
94405
  return { id: id22, diagram: diagram2 };
@@ -94404,7 +94416,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
94404
94416
  }, "detector");
94405
94417
  var loader23 = /* @__PURE__ */ __name(async () => {
94406
94418
  const { diagram: diagram2 } = await __vitePreload(async () => {
94407
- const { diagram: diagram22 } = await import("./diagram-TYMM5635-aF8hIDx1.js");
94419
+ const { diagram: diagram22 } = await import("./diagram-TYMM5635-B-O4bvMT.js");
94408
94420
  return { diagram: diagram22 };
94409
94421
  }, true ? __vite__mapDeps([43,17,19,4,2]) : void 0, import.meta.url);
94410
94422
  return { id: id23, diagram: diagram2 };
@@ -94420,7 +94432,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
94420
94432
  }, "detector");
94421
94433
  var loader24 = /* @__PURE__ */ __name(async () => {
94422
94434
  const { diagram: diagram2 } = await __vitePreload(async () => {
94423
- const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-Di6wZV6-.js");
94435
+ const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-B7PHcRvh.js");
94424
94436
  return { diagram: diagram22 };
94425
94437
  }, true ? __vite__mapDeps([44,17,19,4,2]) : void 0, import.meta.url);
94426
94438
  return { id: id24, diagram: diagram2 };
@@ -94436,7 +94448,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
94436
94448
  }, "detector");
94437
94449
  var loader25 = /* @__PURE__ */ __name(async () => {
94438
94450
  const { diagram: diagram2 } = await __vitePreload(async () => {
94439
- const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-6liCvTXv.js");
94451
+ const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-CtAylmzM.js");
94440
94452
  return { diagram: diagram22 };
94441
94453
  }, true ? __vite__mapDeps([45,11,5,1,2,14]) : void 0, import.meta.url);
94442
94454
  return { id: id25, diagram: diagram2 };
@@ -94453,7 +94465,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
94453
94465
  }, "detector");
94454
94466
  var loader26 = /* @__PURE__ */ __name(async () => {
94455
94467
  const { diagram: diagram2 } = await __vitePreload(async () => {
94456
- const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-C1mEpAlt.js");
94468
+ const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-Cln0uWD9.js");
94457
94469
  return { diagram: diagram22 };
94458
94470
  }, true ? __vite__mapDeps([46,17,18,19,4,2]) : void 0, import.meta.url);
94459
94471
  return { id: id26, diagram: diagram2 };
@@ -94470,7 +94482,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
94470
94482
  }, "detector");
94471
94483
  var loader27 = /* @__PURE__ */ __name(async () => {
94472
94484
  const { diagram: diagram2 } = await __vitePreload(async () => {
94473
- const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-C31yFVWH.js");
94485
+ const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-DLh2t5mE.js");
94474
94486
  return { diagram: diagram22 };
94475
94487
  }, true ? __vite__mapDeps([47,17,19,4,2,7]) : void 0, import.meta.url);
94476
94488
  return { id: id27, diagram: diagram2 };
@@ -94487,7 +94499,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
94487
94499
  }, "detector");
94488
94500
  var loader28 = /* @__PURE__ */ __name(async () => {
94489
94501
  const { diagram: diagram2 } = await __vitePreload(async () => {
94490
- const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-uXL-4FGw.js");
94502
+ const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-Dc9zBgQ3.js");
94491
94503
  return { diagram: diagram22 };
94492
94504
  }, true ? [] : void 0, import.meta.url);
94493
94505
  return { id: id28, diagram: diagram2 };
@@ -94503,7 +94515,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
94503
94515
  }, "detector");
94504
94516
  var loader29 = /* @__PURE__ */ __name(async () => {
94505
94517
  const { diagram: diagram2 } = await __vitePreload(async () => {
94506
- const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-oSTndBDY.js");
94518
+ const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-zJ6WGEop.js");
94507
94519
  return { diagram: diagram22 };
94508
94520
  }, true ? [] : void 0, import.meta.url);
94509
94521
  return { id: id29, diagram: diagram2 };
@@ -94520,7 +94532,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
94520
94532
  }, "detector");
94521
94533
  var loader30 = /* @__PURE__ */ __name(async () => {
94522
94534
  const { diagram: diagram2 } = await __vitePreload(async () => {
94523
- const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-C_g_DZm9.js");
94535
+ const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-BlnD83ee.js");
94524
94536
  return { diagram: diagram22 };
94525
94537
  }, true ? __vite__mapDeps([48,13,17,19,4,2,23,27,22]) : void 0, import.meta.url);
94526
94538
  return { id: id30, diagram: diagram2 };
@@ -94536,7 +94548,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
94536
94548
  }, "detector");
94537
94549
  var loader31 = /* @__PURE__ */ __name(async () => {
94538
94550
  const { diagram: diagram2 } = await __vitePreload(async () => {
94539
- const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-Dv2kSOMM.js");
94551
+ const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-BAQ1Om89.js");
94540
94552
  return { diagram: diagram22 };
94541
94553
  }, true ? __vite__mapDeps([49,17,19,4,2]) : void 0, import.meta.url);
94542
94554
  return { id: id31, diagram: diagram2 };
@@ -132223,24 +132235,6 @@ const TextBlock = reactExports.memo(function TextBlock2({
132223
132235
  }
132224
132236
  ) });
132225
132237
  });
132226
- function Card({
132227
- className,
132228
- size: size2 = "default",
132229
- ...props
132230
- }) {
132231
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
132232
- "div",
132233
- {
132234
- "data-slot": "card",
132235
- "data-size": size2,
132236
- className: cn$5(
132237
- "group/card flex flex-col overflow-hidden rounded-xl bg-card border border-border text-sm text-card-foreground has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
132238
- className
132239
- ),
132240
- ...props
132241
- }
132242
- );
132243
- }
132244
132238
  const ImageBlock = reactExports.memo(function ImageBlock2({
132245
132239
  block,
132246
132240
  role: _role,
@@ -132355,7 +132349,7 @@ const TextResourceBlock = reactExports.memo(function TextResourceBlock2({
132355
132349
  {
132356
132350
  render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
132357
132351
  nativeButton: false,
132358
- className: "flex h-8 cursor-pointer items-center gap-1 py-1 px-2 hover:bg-muted/50 select-none",
132352
+ className: "flex h-8 items-center gap-1 py-1 px-2 hover:bg-muted/50 select-none",
132359
132353
  children: [
132360
132354
  /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "size-3.5 text-blue-400 shrink-0" }),
132361
132355
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium min-w-40 truncate flex-1", children: getBasename(resource.uri) }),
@@ -132982,7 +132976,7 @@ const ThinkingBubble = reactExports.memo(function ThinkingBubble2({
132982
132976
  open: open2,
132983
132977
  onOpenChange: setOpen,
132984
132978
  children: [
132985
- /* @__PURE__ */ jsxRuntimeExports.jsxs(CollapsibleTrigger, { className: "w-full bg-transparent border-0 cursor-pointer flex select-none items-center gap-2 px-0 py-1 text-[11px] text-muted-foreground/90 hover:text-muted-foreground pointer-events-auto", children: [
132979
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(CollapsibleTrigger, { className: "w-full bg-transparent border-0 flex select-none items-center gap-2 px-0 py-1 text-[11px] text-muted-foreground/90 hover:text-muted-foreground pointer-events-auto", children: [
132986
132980
  /* @__PURE__ */ jsxRuntimeExports.jsx(Lightbulb, { className: `size-3.5 ${isStreaming ? "animate-pulse" : ""}` }),
132987
132981
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isStreaming ? t2("thinkingBubble.thinking", "Thinking...") : t2("thinkingBubble.thought", "Thought") })
132988
132982
  ] }),
@@ -133184,7 +133178,7 @@ const PlanBubble = reactExports.memo(function PlanBubble2({
133184
133178
  ),
133185
133179
  defaultOpen: true,
133186
133180
  children: [
133187
- /* @__PURE__ */ jsxRuntimeExports.jsxs(CollapsibleTrigger, { className: "w-full bg-transparent border-0 flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-xs hover:bg-secondary", children: [
133181
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(CollapsibleTrigger, { className: "w-full bg-transparent border-0 flex select-none items-center gap-2 px-3 py-2 text-xs hover:bg-secondary", children: [
133188
133182
  /* @__PURE__ */ jsxRuntimeExports.jsx(Notebook, { className: "size-3 text-muted-foreground" }),
133189
133183
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-foreground", children: t2("planBubble.title") }) }),
133190
133184
  total > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-muted-foreground", children: t2("planBubble.summary", { completed, total }) })
@@ -137455,7 +137449,7 @@ function ChatInput({ session: session2 }) {
137455
137449
  /* @__PURE__ */ jsxRuntimeExports.jsx(
137456
137450
  HoverCardTrigger,
137457
137451
  {
137458
- render: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex cursor-pointer items-center gap-1.5 text-muted-foreground hover:text-foreground", children: [
137452
+ render: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-muted-foreground hover:text-foreground", children: [
137459
137453
  /* @__PURE__ */ jsxRuntimeExports.jsx(Image$1, { className: "size-3.5" }),
137460
137454
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "max-w-25 truncate", children: att.filename })
137461
137455
  ] })
@@ -218084,12 +218078,11 @@ function TreeItem({
218084
218078
  ChevronRight,
218085
218079
  {
218086
218080
  className: cn$5(
218087
- "size-3.5 shrink-0 text-muted-foreground transition-transform",
218081
+ "size-3.5 shrink-0 text-muted-foreground scale-110 transition-transform",
218088
218082
  isOpen && "rotate-90"
218089
218083
  )
218090
218084
  }
218091
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-3.5 shrink-0" }),
218092
- node2.isFolder ? /* @__PURE__ */ jsxRuntimeExports.jsx(Folder$1, { className: "size-4 shrink-0 text-muted-foreground/90" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node2.name, className: "size-4 shrink-0 text-muted-foreground/90" }),
218085
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node2.name, className: "size-3.5 shrink-0 text-muted-foreground/90" }),
218093
218086
  isEditing ? /* @__PURE__ */ jsxRuntimeExports.jsx(
218094
218087
  "input",
218095
218088
  {
@@ -218469,9 +218462,14 @@ const FilePanel = reactExports.memo(function FilePanel2({
218469
218462
  const next2 = new Set(prev2);
218470
218463
  if (next2.has(id32)) {
218471
218464
  next2.delete(id32);
218465
+ const prefix = id32 + "/";
218466
+ for (const key2 of prev2) {
218467
+ if (key2.startsWith(prefix)) next2.delete(key2);
218468
+ }
218472
218469
  } else {
218473
218470
  next2.add(id32);
218474
218471
  }
218472
+ openFoldersRef.current = next2;
218475
218473
  return next2;
218476
218474
  });
218477
218475
  if (node2.isFolder && activeProjectId) {
@@ -218505,6 +218503,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
218505
218503
  );
218506
218504
  const collapseAll = reactExports.useCallback(() => {
218507
218505
  setOpenFolders(/* @__PURE__ */ new Set());
218506
+ openFoldersRef.current = /* @__PURE__ */ new Set();
218508
218507
  }, []);
218509
218508
  const handleSelect = reactExports.useCallback(
218510
218509
  (id32, e2) => {
@@ -218595,7 +218594,11 @@ const FilePanel = reactExports.memo(function FilePanel2({
218595
218594
  children: isFolder ? [] : void 0
218596
218595
  };
218597
218596
  if (parentId) {
218598
- setOpenFolders((prev2) => new Set(prev2).add(parentId));
218597
+ setOpenFolders((prev2) => {
218598
+ const next2 = new Set(prev2).add(parentId);
218599
+ openFoldersRef.current = next2;
218600
+ return next2;
218601
+ });
218599
218602
  let needsFetch = false;
218600
218603
  for (const root2 of data) {
218601
218604
  const p3 = findNode(root2, parentId);
@@ -219161,7 +219164,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
219161
219164
  )
219162
219165
  ] })
219163
219166
  ] }),
219164
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
219167
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1 pl-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
219165
219168
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
219166
219169
  ContextMenuTrigger,
219167
219170
  {
@@ -233454,7 +233457,14 @@ function SettingsAgentApiDialog({
233454
233457
  name: "provider",
233455
233458
  control: form.control,
233456
233459
  render: ({ field, fieldState }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { "data-invalid": fieldState.invalid, children: [
233457
- /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "api-provider", className: "text-[11px] text-muted-foreground", children: t2("settings.agents.apiProvider", "Provider") }),
233460
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
233461
+ FieldLabel,
233462
+ {
233463
+ htmlFor: "api-provider",
233464
+ className: "text-[11px] text-muted-foreground",
233465
+ children: t2("settings.agents.apiProvider", "Provider")
233466
+ }
233467
+ ),
233458
233468
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { name: field.name, value: field.value, onValueChange: field.onChange, children: [
233459
233469
  /* @__PURE__ */ jsxRuntimeExports.jsx(
233460
233470
  SelectTrigger,
@@ -233648,7 +233658,14 @@ function SettingsAgentApiDialog({
233648
233658
  name: "modelIdTemplate",
233649
233659
  control: form.control,
233650
233660
  render: ({ field, fieldState }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { "data-invalid": fieldState.invalid, children: [
233651
- /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "api-model-template", className: "text-[11px] text-muted-foreground", children: t2("settings.agents.modelIdTemplate", "Model Id Template") }),
233661
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
233662
+ FieldLabel,
233663
+ {
233664
+ htmlFor: "api-model-template",
233665
+ className: "text-[11px] text-muted-foreground",
233666
+ children: t2("settings.agents.modelIdTemplate", "Model Id Template")
233667
+ }
233668
+ ),
233652
233669
  /* @__PURE__ */ jsxRuntimeExports.jsx(
233653
233670
  Input,
233654
233671
  {
@@ -235360,7 +235377,7 @@ function SkillsLayout() {
235360
235377
  {
235361
235378
  to: tab2.href,
235362
235379
  className: ({ isActive }) => cn$5(
235363
- "flex items-center gap-2 rounded-md px-3 py-2 text-xs transition-colors",
235380
+ "flex items-center gap-2 rounded-md px-3 py-2 text-xs transition-colors cursor-default",
235364
235381
  isActive ? "bg-accent text-accent-foreground font-medium" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground"
235365
235382
  ),
235366
235383
  children: [
@@ -235785,8 +235802,19 @@ function parseParts(expr) {
235785
235802
  if (parts.length !== 5) return { hour: 9, minute: 0, interval: 2, dow: "1" };
235786
235803
  const [min2, hr2] = parts;
235787
235804
  const dow = parts[4];
235788
- if (hr2.startsWith("*/")) return { hour: 9, minute: parseInt(min2) || 0, interval: parseInt(hr2.slice(2)) || 2, dow: /^\d$/.test(dow) ? dow : "1" };
235789
- return { hour: parseInt(hr2) || 9, minute: parseInt(min2) || 0, interval: 2, dow: /^\d$/.test(dow) ? dow : "1" };
235805
+ if (hr2.startsWith("*/"))
235806
+ return {
235807
+ hour: 9,
235808
+ minute: parseInt(min2) || 0,
235809
+ interval: parseInt(hr2.slice(2)) || 2,
235810
+ dow: /^\d$/.test(dow) ? dow : "1"
235811
+ };
235812
+ return {
235813
+ hour: parseInt(hr2) || 9,
235814
+ minute: parseInt(min2) || 0,
235815
+ interval: 2,
235816
+ dow: /^\d$/.test(dow) ? dow : "1"
235817
+ };
235790
235818
  }
235791
235819
  function buildCron(preset, hour, minute, interval2, dow) {
235792
235820
  switch (preset) {
@@ -235803,7 +235831,7 @@ function buildCron(preset, hour, minute, interval2, dow) {
235803
235831
  }
235804
235832
  }
235805
235833
  function CronEditor({ value, onChange, timezone }) {
235806
- const { t: t2 } = useTranslation();
235834
+ const { t: t2, i18n } = useTranslation();
235807
235835
  const [preset, setPreset] = reactExports.useState(() => detectPreset(value));
235808
235836
  const [parts, setParts] = reactExports.useState(() => parseParts(value));
235809
235837
  reactExports.useEffect(() => {
@@ -235834,20 +235862,34 @@ function CronEditor({ value, onChange, timezone }) {
235834
235862
  { value: "custom", label: t2("automation.cron.custom", "Custom") }
235835
235863
  ];
235836
235864
  const intervalItems = INTERVALS.map((n2) => ({ value: String(n2), label: `${n2}h` }));
235837
- const minuteItems = MINUTES.map((m2) => ({ value: String(m2), label: `${String(m2).padStart(2, "0")}` }));
235865
+ const minuteItems = MINUTES.map((m2) => ({
235866
+ value: String(m2),
235867
+ label: `${String(m2).padStart(2, "0")}`
235868
+ }));
235838
235869
  const hourItems = HOURS.map((h3) => ({ value: String(h3), label: String(h3).padStart(2, "0") }));
235839
235870
  const dowItems = DAYS_OF_WEEK_VALUES.map((v4) => ({
235840
235871
  value: v4,
235841
- label: t2(`automation.cron.days.${v4}`, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][parseInt(v4)])
235872
+ label: t2(
235873
+ `automation.cron.days.${v4}`,
235874
+ ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][parseInt(v4)]
235875
+ )
235842
235876
  }));
235843
235877
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2.5", children: [
235844
235878
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
235845
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { items: presetItems, value: preset, onValueChange: (v4) => {
235846
- if (v4) handlePresetChange(v4);
235847
- }, children: [
235848
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-8 text-xs! w-32 shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235849
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: presetItems.map((p3) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: p3.value, children: p3.label }, p3.value)) })
235850
- ] }),
235879
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
235880
+ Select,
235881
+ {
235882
+ items: presetItems,
235883
+ value: preset,
235884
+ onValueChange: (v4) => {
235885
+ if (v4) handlePresetChange(v4);
235886
+ },
235887
+ children: [
235888
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-8 text-xs! w-32 shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235889
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: presetItems.map((p3) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: p3.value, children: p3.label }, p3.value)) })
235890
+ ]
235891
+ }
235892
+ ),
235851
235893
  preset === "custom" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
235852
235894
  Input,
235853
235895
  {
@@ -235857,40 +235899,80 @@ function CronEditor({ value, onChange, timezone }) {
235857
235899
  className: "h-8 text-xs! font-mono text-foreground/70 focus-visible:ring-0.5 flex-1"
235858
235900
  }
235859
235901
  ) : preset === "hourly" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
235860
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { items: intervalItems, value: String(parts.interval), onValueChange: (v4) => {
235861
- if (v4) updateParts({ interval: parseInt(v4) });
235862
- }, children: [
235863
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235864
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: intervalItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235865
- ] }),
235902
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
235903
+ Select,
235904
+ {
235905
+ items: intervalItems,
235906
+ value: String(parts.interval),
235907
+ onValueChange: (v4) => {
235908
+ if (v4) updateParts({ interval: parseInt(v4) });
235909
+ },
235910
+ children: [
235911
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235912
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: intervalItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235913
+ ]
235914
+ }
235915
+ ),
235866
235916
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground", children: t2("automation.cron.atMinute", "at min") }),
235867
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { items: minuteItems, value: String(parts.minute), onValueChange: (v4) => {
235868
- if (v4) updateParts({ minute: parseInt(v4) });
235869
- }, children: [
235870
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235871
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: minuteItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235872
- ] })
235917
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
235918
+ Select,
235919
+ {
235920
+ items: minuteItems,
235921
+ value: String(parts.minute),
235922
+ onValueChange: (v4) => {
235923
+ if (v4) updateParts({ minute: parseInt(v4) });
235924
+ },
235925
+ children: [
235926
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235927
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: minuteItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235928
+ ]
235929
+ }
235930
+ )
235873
235931
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
235874
- preset === "weekly" && /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { items: dowItems, value: parts.dow, onValueChange: (v4) => {
235875
- if (v4) updateParts({ dow: v4 });
235876
- }, children: [
235877
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-18", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235878
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: dowItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235879
- ] }),
235932
+ preset === "weekly" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
235933
+ Select,
235934
+ {
235935
+ items: dowItems,
235936
+ value: parts.dow,
235937
+ onValueChange: (v4) => {
235938
+ if (v4) updateParts({ dow: v4 });
235939
+ },
235940
+ children: [
235941
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-18", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235942
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: dowItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235943
+ ]
235944
+ }
235945
+ ),
235880
235946
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground", children: t2("automation.cron.at", "at") }),
235881
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { items: hourItems, value: String(parts.hour), onValueChange: (v4) => {
235882
- if (v4) updateParts({ hour: parseInt(v4) });
235883
- }, children: [
235884
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235885
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: hourItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235886
- ] }),
235947
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
235948
+ Select,
235949
+ {
235950
+ items: hourItems,
235951
+ value: String(parts.hour),
235952
+ onValueChange: (v4) => {
235953
+ if (v4) updateParts({ hour: parseInt(v4) });
235954
+ },
235955
+ children: [
235956
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235957
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: hourItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235958
+ ]
235959
+ }
235960
+ ),
235887
235961
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground", children: ":" }),
235888
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { items: minuteItems, value: String(parts.minute), onValueChange: (v4) => {
235889
- if (v4) updateParts({ minute: parseInt(v4) });
235890
- }, children: [
235891
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235892
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: minuteItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235893
- ] })
235962
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
235963
+ Select,
235964
+ {
235965
+ items: minuteItems,
235966
+ value: String(parts.minute),
235967
+ onValueChange: (v4) => {
235968
+ if (v4) updateParts({ minute: parseInt(v4) });
235969
+ },
235970
+ children: [
235971
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
235972
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: minuteItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
235973
+ ]
235974
+ }
235975
+ )
235894
235976
  ] })
235895
235977
  ] }),
235896
235978
  /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-[11px] text-muted-foreground", children: [
@@ -235898,7 +235980,7 @@ function CronEditor({ value, onChange, timezone }) {
235898
235980
  " · ",
235899
235981
  t2("automation.cron.nextRun", "Next run"),
235900
235982
  ": ",
235901
- formatNextCron(value),
235983
+ formatNextCron(value, i18n.language),
235902
235984
  timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-1 text-muted-foreground/50", children: [
235903
235985
  "(",
235904
235986
  timezone,
@@ -235907,11 +235989,16 @@ function CronEditor({ value, onChange, timezone }) {
235907
235989
  ] })
235908
235990
  ] });
235909
235991
  }
235910
- function formatNextCron(expr) {
235992
+ function formatNextCron(expr, locale) {
235911
235993
  try {
235912
235994
  const next2 = getNextCronDate(expr);
235913
235995
  if (!next2) return "—";
235914
- return next2.toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
235996
+ return next2.toLocaleString(locale, {
235997
+ month: "short",
235998
+ day: "numeric",
235999
+ hour: "2-digit",
236000
+ minute: "2-digit"
236001
+ });
235915
236002
  } catch {
235916
236003
  return "—";
235917
236004
  }
@@ -235951,8 +236038,14 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
235951
236038
  const { toast: toast2 } = useMessage();
235952
236039
  const configuredAgents = useAppStore((s16) => s16.configuredAgents);
235953
236040
  const configuredMcpServers = useAppStore((s16) => s16.configuredMcpServers);
235954
- const enabledAgents = reactExports.useMemo(() => configuredAgents.filter((a2) => !a2.disabled), [configuredAgents]);
235955
- const enabledMcpServers = reactExports.useMemo(() => configuredMcpServers.filter((s16) => !s16.disabled), [configuredMcpServers]);
236041
+ const enabledAgents = reactExports.useMemo(
236042
+ () => configuredAgents.filter((a2) => !a2.disabled),
236043
+ [configuredAgents]
236044
+ );
236045
+ const enabledMcpServers = reactExports.useMemo(
236046
+ () => configuredMcpServers.filter((s16) => !s16.disabled),
236047
+ [configuredMcpServers]
236048
+ );
235956
236049
  const [timezone, setTimezone] = reactExports.useState("");
235957
236050
  reactExports.useEffect(() => {
235958
236051
  request.getServerTimezone().then(setTimezone).catch(() => {
@@ -235961,10 +236054,18 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
235961
236054
  const [name2, setName] = reactExports.useState(isEdit ? schedule2.name : "");
235962
236055
  const [agentId, setAgentId] = reactExports.useState(isEdit ? schedule2.agentId : enabledAgents[0]?.id ?? "");
235963
236056
  const [prompt, setPrompt] = reactExports.useState(isEdit ? schedule2.prompt : "");
235964
- const [cronType, setCronType] = reactExports.useState(isEdit ? schedule2.cron.type : "cron");
235965
- const [cronExpr, setCronExpr] = reactExports.useState(isEdit ? schedule2.cron.expr ?? "0 9 * * 1-5" : "0 9 * * 1-5");
235966
- const [features, setFeatures] = reactExports.useState(isEdit ? schedule2.features ?? ["skills"] : ["skills"]);
235967
- const [mcpServerIds, setMcpServerIds] = reactExports.useState(isEdit ? schedule2.mcpServers ?? [] : enabledMcpServers.map((s16) => s16.id));
236057
+ const [cronType, setCronType] = reactExports.useState(
236058
+ isEdit ? schedule2.cron.type : "cron"
236059
+ );
236060
+ const [cronExpr, setCronExpr] = reactExports.useState(
236061
+ isEdit ? schedule2.cron.expr ?? "0 9 * * 1-5" : "0 9 * * 1-5"
236062
+ );
236063
+ const [features, setFeatures] = reactExports.useState(
236064
+ isEdit ? schedule2.features ?? ["skills"] : ["skills"]
236065
+ );
236066
+ const [mcpServerIds, setMcpServerIds] = reactExports.useState(
236067
+ isEdit ? schedule2.mcpServers ?? [] : enabledMcpServers.map((s16) => s16.id)
236068
+ );
235968
236069
  const [saving, setSaving] = reactExports.useState(false);
235969
236070
  reactExports.useEffect(() => {
235970
236071
  if (!open2) return;
@@ -235987,9 +236088,12 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
235987
236088
  }
235988
236089
  }, [schedule2, open2]);
235989
236090
  const handleSave = async () => {
235990
- if (!name2.trim()) return void toast2.error(t2("automation.validation.nameRequired", "Name is required"));
235991
- if (!agentId) return void toast2.error(t2("automation.validation.agentRequired", "Agent is required"));
235992
- if (!prompt.trim()) return void toast2.error(t2("automation.validation.promptRequired", "Prompt is required"));
236091
+ if (!name2.trim())
236092
+ return void toast2.error(t2("automation.validation.nameRequired", "Name is required"));
236093
+ if (!agentId)
236094
+ return void toast2.error(t2("automation.validation.agentRequired", "Agent is required"));
236095
+ if (!prompt.trim())
236096
+ return void toast2.error(t2("automation.validation.promptRequired", "Prompt is required"));
235993
236097
  setSaving(true);
235994
236098
  try {
235995
236099
  if (isEdit) {
@@ -236022,121 +236126,200 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
236022
236126
  setSaving(false);
236023
236127
  }
236024
236128
  };
236025
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange: (open22, eventDetails) => {
236026
- if (!open22 && (eventDetails?.reason === "escape-key" || eventDetails?.reason === "outside-press")) return;
236027
- onOpenChange(open22);
236028
- }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "sm:max-w-3xl", children: [
236029
- /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
236030
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: isEdit ? t2("automation.editSchedule", "Edit Schedule") : t2("automation.newSchedule", "New Schedule") }),
236031
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: t2("automation.dialogDesc", "Configure the automated task schedule and prompt.") })
236032
- ] }),
236033
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-5", children: [
236034
- /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldGroup, { children: [
236035
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[2fr_1fr] gap-3", children: [
236036
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236037
- /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-name", className: "text-[11px] text-muted-foreground", children: t2("automation.scheduleName", "Schedule Name") }),
236038
- /* @__PURE__ */ jsxRuntimeExports.jsx(
236039
- Input,
236040
- {
236041
- id: "auto-name",
236042
- placeholder: t2("automation.scheduleNamePlaceholder", "e.g. Morning Standup Summary"),
236043
- value: name2,
236044
- onChange: (e2) => setName(e2.target.value),
236045
- className: "h-8 text-[11px]! text-foreground/70 focus-visible:ring-0.5"
236046
- }
236047
- )
236048
- ] }),
236049
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236050
- /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-agent", className: "text-[11px] text-muted-foreground", children: t2("automation.agent", "Agent") }),
236051
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: agentId, onValueChange: (v4) => {
236052
- if (v4) setAgentId(v4);
236053
- }, children: [
236054
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { id: "auto-agent", className: "w-full text-[11px]! text-muted-foreground", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
236055
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: enabledAgents.map((a2) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: a2.id, children: a2.id }, a2.id)) })
236056
- ] })
236057
- ] })
236129
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
236130
+ Dialog,
236131
+ {
236132
+ open: open2,
236133
+ onOpenChange: (open22, eventDetails) => {
236134
+ if (!open22 && (eventDetails?.reason === "escape-key" || eventDetails?.reason === "outside-press"))
236135
+ return;
236136
+ onOpenChange(open22);
236137
+ },
236138
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "sm:max-w-3xl", children: [
236139
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
236140
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: isEdit ? t2("automation.editSchedule", "Edit Schedule") : t2("automation.newSchedule", "New Schedule") }),
236141
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: t2("automation.dialogDesc", "Configure the automated task schedule and prompt.") })
236058
236142
  ] }),
236059
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236060
- /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-prompt", className: "text-[11px] text-muted-foreground", children: t2("automation.prompt", "Prompt") }),
236061
- /* @__PURE__ */ jsxRuntimeExports.jsx(
236062
- Textarea,
236063
- {
236064
- id: "auto-prompt",
236065
- placeholder: t2("automation.promptPlaceholder", "What should the agent do?"),
236066
- value: prompt,
236067
- onChange: (e2) => setPrompt(e2.target.value),
236068
- className: "text-xs! min-h-46 flex-1 text-foreground/70 focus-visible:ring-0.5"
236069
- }
236070
- )
236071
- ] })
236072
- ] }),
236073
- /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldGroup, { children: [
236074
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
236075
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("automation.features", "Features") }),
236076
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
236077
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7", children: [
236078
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-xs truncate ${features.includes("skills") ? "text-muted-foreground" : "text-muted-foreground/50"}`, children: t2("constant.feature.skills", "Skills") }),
236143
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-5", children: [
236144
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldGroup, { children: [
236145
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[2fr_1fr] gap-3", children: [
236146
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236147
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-name", className: "text-[11px] text-muted-foreground", children: t2("automation.scheduleName", "Schedule Name") }),
236148
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236149
+ Input,
236150
+ {
236151
+ id: "auto-name",
236152
+ placeholder: t2(
236153
+ "automation.scheduleNamePlaceholder",
236154
+ "e.g. Morning Standup Summary"
236155
+ ),
236156
+ value: name2,
236157
+ onChange: (e2) => setName(e2.target.value),
236158
+ className: "h-8 text-[11px]! text-foreground/70 focus-visible:ring-0.5"
236159
+ }
236160
+ )
236161
+ ] }),
236162
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236163
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-agent", className: "text-[11px] text-muted-foreground", children: t2("automation.agent", "Agent") }),
236164
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236165
+ Select,
236166
+ {
236167
+ value: agentId,
236168
+ onValueChange: (v4) => {
236169
+ if (v4) setAgentId(v4);
236170
+ },
236171
+ children: [
236172
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236173
+ SelectTrigger,
236174
+ {
236175
+ id: "auto-agent",
236176
+ className: "w-full text-[11px]! text-muted-foreground",
236177
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {})
236178
+ }
236179
+ ),
236180
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: enabledAgents.map((a2) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: a2.id, children: a2.id }, a2.id)) })
236181
+ ]
236182
+ }
236183
+ )
236184
+ ] })
236185
+ ] }),
236186
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236187
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-prompt", className: "text-[11px] text-muted-foreground", children: t2("automation.prompt", "Prompt") }),
236079
236188
  /* @__PURE__ */ jsxRuntimeExports.jsx(
236080
- Switch,
236189
+ Textarea,
236081
236190
  {
236082
- size: "sm",
236083
- checked: features.includes("skills"),
236084
- onCheckedChange: (c2) => setFeatures(c2 ? ["skills"] : [])
236191
+ id: "auto-prompt",
236192
+ placeholder: t2("automation.promptPlaceholder", "What should the agent do?"),
236193
+ value: prompt,
236194
+ onChange: (e2) => setPrompt(e2.target.value),
236195
+ className: "text-xs! min-h-46 flex-1 text-foreground/70 focus-visible:ring-0.5"
236085
236196
  }
236086
236197
  )
236087
- ] }),
236088
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7", children: [
236089
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs truncate text-muted-foreground/50", children: [
236090
- t2("constant.feature.askUser", "Ask User"),
236091
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] ml-1", children: [
236092
- "(",
236093
- t2("automation.alwaysDisabled", "always disabled"),
236094
- ")"
236095
- ] })
236096
- ] }),
236097
- /* @__PURE__ */ jsxRuntimeExports.jsx(Switch, { size: "sm", checked: false, disabled: true })
236098
236198
  ] })
236099
- ] })
236100
- ] }),
236101
- configuredMcpServers.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
236102
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("automation.mcpServers", "MCP Servers") }),
236103
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: configuredMcpServers.length > 5 ? "grid grid-cols-2 gap-1" : "flex flex-col gap-1", children: configuredMcpServers.map((s16) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7", children: [
236104
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-xs truncate ${mcpServerIds.includes(s16.id) ? "text-muted-foreground" : "text-muted-foreground/50"}`, title: s16.id, children: s16.id }),
236105
- /* @__PURE__ */ jsxRuntimeExports.jsx(
236106
- Switch,
236107
- {
236108
- size: "sm",
236109
- checked: mcpServerIds.includes(s16.id),
236110
- onCheckedChange: (c2) => {
236111
- setMcpServerIds((prev2) => c2 ? [...prev2, s16.id] : prev2.filter((id32) => id32 !== s16.id));
236199
+ ] }),
236200
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldGroup, { children: [
236201
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
236202
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("automation.features", "Features") }),
236203
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
236204
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7", children: [
236205
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236206
+ "div",
236207
+ {
236208
+ className: `text-xs truncate ${features.includes("skills") ? "text-muted-foreground" : "text-muted-foreground/50"}`,
236209
+ children: t2("constant.feature.skills", "Skills")
236210
+ }
236211
+ ),
236212
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236213
+ Switch,
236214
+ {
236215
+ size: "sm",
236216
+ checked: features.includes("skills"),
236217
+ onCheckedChange: (c2) => setFeatures(c2 ? ["skills"] : [])
236218
+ }
236219
+ )
236220
+ ] }),
236221
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7", children: [
236222
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs truncate text-muted-foreground/50", children: [
236223
+ t2("constant.feature.askUser", "Ask User"),
236224
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] ml-1", children: [
236225
+ "(",
236226
+ t2("automation.alwaysDisabled", "always disabled"),
236227
+ ")"
236228
+ ] })
236229
+ ] }),
236230
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Switch, { size: "sm", checked: false, disabled: true })
236231
+ ] })
236232
+ ] })
236233
+ ] }),
236234
+ configuredMcpServers.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
236235
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("automation.mcpServers", "MCP Servers") }),
236236
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236237
+ "div",
236238
+ {
236239
+ className: configuredMcpServers.length > 5 ? "grid grid-cols-2 gap-1" : "flex flex-col gap-1",
236240
+ children: configuredMcpServers.map((s16) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
236241
+ "div",
236242
+ {
236243
+ className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7",
236244
+ children: [
236245
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236246
+ "div",
236247
+ {
236248
+ className: `text-xs truncate ${mcpServerIds.includes(s16.id) ? "text-muted-foreground" : "text-muted-foreground/50"}`,
236249
+ title: s16.id,
236250
+ children: s16.id
236251
+ }
236252
+ ),
236253
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236254
+ Switch,
236255
+ {
236256
+ size: "sm",
236257
+ checked: mcpServerIds.includes(s16.id),
236258
+ onCheckedChange: (c2) => {
236259
+ setMcpServerIds(
236260
+ (prev2) => c2 ? [...prev2, s16.id] : prev2.filter((id32) => id32 !== s16.id)
236261
+ );
236262
+ }
236263
+ }
236264
+ )
236265
+ ]
236266
+ },
236267
+ s16.id
236268
+ ))
236112
236269
  }
236113
- }
236114
- )
236115
- ] }, s16.id)) })
236116
- ] }),
236117
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236118
- /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { className: "text-[11px] text-muted-foreground", children: t2("automation.schedule", "Schedule") }),
236119
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
236120
- /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "flex items-center gap-2 text-[11px] text-foreground/70 cursor-pointer", children: [
236121
- /* @__PURE__ */ jsxRuntimeExports.jsx(Switch, { checked: cronType === "cron", onCheckedChange: (c2) => setCronType(c2 ? "cron" : "manual") }),
236122
- t2("automation.timedExecution", "Timed (cron)")
236270
+ )
236123
236271
  ] }),
236124
- cronType === "cron" ? /* @__PURE__ */ jsxRuntimeExports.jsx(CronEditor, { value: cronExpr, onChange: setCronExpr, timezone }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] text-muted-foreground", children: t2("automation.manualDesc", "Manual trigger only. No automatic scheduling.") })
236272
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
236273
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { className: "text-[11px] text-muted-foreground", children: t2("automation.schedule", "Schedule") }),
236274
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
236275
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "flex items-center gap-2 text-[11px] text-foreground/70", children: [
236276
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236277
+ Switch,
236278
+ {
236279
+ checked: cronType === "cron",
236280
+ onCheckedChange: (c2) => setCronType(c2 ? "cron" : "manual")
236281
+ }
236282
+ ),
236283
+ t2("automation.timedExecution", "Timed (cron)")
236284
+ ] }),
236285
+ cronType === "cron" ? /* @__PURE__ */ jsxRuntimeExports.jsx(CronEditor, { value: cronExpr, onChange: setCronExpr, timezone }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] text-muted-foreground", children: t2("automation.manualDesc", "Manual trigger only. No automatic scheduling.") })
236286
+ ] })
236287
+ ] })
236125
236288
  ] })
236289
+ ] }),
236290
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogFooter, { children: [
236291
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236292
+ Button,
236293
+ {
236294
+ type: "button",
236295
+ variant: "outline",
236296
+ size: "sm",
236297
+ onClick: () => onOpenChange(false),
236298
+ className: "h-7 text-xs",
236299
+ children: t2("automation.cancel", "Cancel")
236300
+ }
236301
+ ),
236302
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236303
+ Button,
236304
+ {
236305
+ type: "button",
236306
+ size: "sm",
236307
+ disabled: saving,
236308
+ onClick: handleSave,
236309
+ className: "h-7 text-xs",
236310
+ children: [
236311
+ saving && /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin mr-1" }),
236312
+ isEdit ? t2("automation.save", "Save") : t2("automation.create", "Create")
236313
+ ]
236314
+ }
236315
+ )
236126
236316
  ] })
236127
236317
  ] })
236128
- ] }),
236129
- /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogFooter, { children: [
236130
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onOpenChange(false), className: "h-7 text-xs", children: t2("automation.cancel", "Cancel") }),
236131
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { type: "button", size: "sm", disabled: saving, onClick: handleSave, className: "h-7 text-xs", children: [
236132
- saving && /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin mr-1" }),
236133
- isEdit ? t2("automation.save", "Save") : t2("automation.create", "Create")
236134
- ] })
236135
- ] })
236136
- ] }) });
236318
+ }
236319
+ );
236137
236320
  }
236138
236321
  function Automation() {
236139
- const { t: t2 } = useTranslation();
236322
+ const { t: t2, i18n } = useTranslation();
236140
236323
  const navigate = useNavigate();
236141
236324
  const { confirm: confirm2, toast: toast2 } = useMessage();
236142
236325
  const [schedules, setSchedules] = reactExports.useState([]);
@@ -236161,10 +236344,18 @@ function Automation() {
236161
236344
  reactExports.useEffect(() => {
236162
236345
  void loadSchedules();
236163
236346
  }, [loadSchedules]);
236347
+ reactExports.useEffect(() => {
236348
+ const timer2 = setInterval(() => void loadSchedules(), 3e4);
236349
+ return () => clearInterval(timer2);
236350
+ }, [loadSchedules]);
236164
236351
  reactExports.useEffect(() => {
236165
236352
  const handleChanged = () => void loadSchedules();
236166
236353
  subscribe$1.on("schedules-changed", handleChanged);
236167
- return () => subscribe$1.off("schedules-changed", handleChanged);
236354
+ subscribe$1.on("task-update", handleChanged);
236355
+ return () => {
236356
+ subscribe$1.off("schedules-changed", handleChanged);
236357
+ subscribe$1.off("task-update", handleChanged);
236358
+ };
236168
236359
  }, [loadSchedules]);
236169
236360
  const handleTrigger = async (scheduleId) => {
236170
236361
  try {
@@ -236177,7 +236368,9 @@ function Automation() {
236177
236368
  const handleDelete2 = async (schedule2) => {
236178
236369
  await confirm2({
236179
236370
  title: t2("automation.deleteTitle", "Delete Schedule"),
236180
- content: t2("automation.deleteConfirm", 'Delete "{{name}}" permanently?', { name: schedule2.name }),
236371
+ content: t2("automation.deleteConfirm", 'Delete "{{name}}" permanently?', {
236372
+ name: schedule2.name
236373
+ }),
236181
236374
  buttons: [
236182
236375
  { text: t2("automation.cancel", "Cancel"), value: null, variant: "outline" },
236183
236376
  {
@@ -236208,13 +236401,20 @@ function Automation() {
236208
236401
  };
236209
236402
  if (loading) {
236210
236403
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: [
236211
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-12 shrink-0 border-b border-border flex items-center px-6", style: { WebkitAppRegion: "drag" }, children: [
236212
- /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium", children: t2("automation.title", "Automation") }),
236213
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-muted-foreground font-normal ml-1.5", children: [
236214
- "· schedules: ",
236215
- schedules.length
236216
- ] })
236217
- ] }),
236404
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236405
+ "div",
236406
+ {
236407
+ className: "h-12 shrink-0 border-b border-border flex items-center px-6",
236408
+ style: { WebkitAppRegion: "drag" },
236409
+ children: [
236410
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium", children: t2("automation.title", "Automation") }),
236411
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-muted-foreground font-normal ml-1.5", children: [
236412
+ "· schedules: ",
236413
+ schedules.length
236414
+ ] })
236415
+ ]
236416
+ }
236417
+ ),
236218
236418
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-6 animate-spin text-muted-foreground" }) })
236219
236419
  ] });
236220
236420
  }
@@ -236234,104 +236434,160 @@ function Automation() {
236234
236434
  schedules.length
236235
236435
  ] })
236236
236436
  ] }),
236237
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "default", size: "sm", className: "h-7 text-xs", onClick: () => setNewDialogOpen(true), children: [
236238
- /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3" }),
236239
- t2("automation.newSchedule", "New Schedule")
236240
- ] }) })
236437
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
236438
+ Button,
236439
+ {
236440
+ variant: "default",
236441
+ size: "sm",
236442
+ className: "h-7 text-xs",
236443
+ onClick: () => setNewDialogOpen(true),
236444
+ children: [
236445
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3" }),
236446
+ t2("automation.newSchedule", "New Schedule")
236447
+ ]
236448
+ }
236449
+ ) })
236241
236450
  ]
236242
236451
  }
236243
236452
  ),
236244
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-5 py-4 w-full max-w-4xl mx-auto", children: schedules.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-sm text-muted-foreground", children: [
236245
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mb-1", children: t2("automation.noSchedules", "No schedules yet") }),
236246
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", size: "sm", className: "h-7 text-xs mt-2", onClick: () => setNewDialogOpen(true), children: [
236247
- /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3 mr-1" }),
236248
- t2("automation.createFirst", "Create your first schedule")
236249
- ] })
236250
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ItemGroup, { className: "gap-0", children: schedules.map((schedule2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
236453
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-5 py-4 w-full max-w-4xl mx-auto", children: schedules.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-20 text-muted-foreground", children: [
236454
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClockCheck, { className: "size-6 text-muted-foreground/60" }) }),
236455
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-foreground/70 mb-1", children: t2("automation.noSchedules", "No schedules yet") }),
236456
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70 mb-4 max-w-[240px] text-center", children: t2(
236457
+ "automation.emptyHint",
236458
+ "Schedule AI tasks to run automatically with cron expressions"
236459
+ ) }),
236251
236460
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
236252
- Item,
236461
+ Button,
236253
236462
  {
236463
+ variant: "outline",
236254
236464
  size: "sm",
236255
- className: "hover:bg-muted",
236256
- onClick: () => navigate(`/automation/schedule/${schedule2.id}`),
236465
+ className: "h-7 text-xs",
236466
+ onClick: () => setNewDialogOpen(true),
236257
236467
  children: [
236258
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemContent, { children: [
236259
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemTitle, { className: "truncate", children: [
236260
- schedule2.name,
236261
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] font-normal text-muted-foreground ml-2 uppercase", children: schedule2.agentId })
236262
- ] }),
236263
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemDescription, { className: "line-clamp-1 text-xs", children: [
236264
- getScheduleLabel(schedule2),
236265
- schedule2.lastRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
236266
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
236267
- t2("automation.cron.lastRun", "Last run"),
236268
- ": ",
236269
- new Date(schedule2.lastRunAt).toLocaleString()
236468
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3 mr-1" }),
236469
+ t2("automation.createFirst", "Create your first schedule")
236470
+ ]
236471
+ }
236472
+ )
236473
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ItemGroup, { className: "gap-0", children: schedules.map((schedule2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
236474
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
236475
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "group/ctx", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
236476
+ Item,
236477
+ {
236478
+ size: "sm",
236479
+ className: "hover:bg-muted group-data-[popup-open]/ctx:bg-muted select-none",
236480
+ onClick: () => navigate(`/automation/schedule/${schedule2.id}`),
236481
+ children: [
236482
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemContent, { className: "gap-1.5", children: [
236483
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemTitle, { className: "truncate", children: [
236484
+ schedule2.name,
236485
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236486
+ Badge,
236487
+ {
236488
+ variant: "outline",
236489
+ className: "px-1 text-[10px] leading-none uppercase shrink-0",
236490
+ children: schedule2.agentId
236491
+ }
236492
+ )
236270
236493
  ] }),
236271
- schedule2.nextRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
236272
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
236273
- t2("automation.cron.nextRun", "Next run"),
236274
- ": ",
236275
- new Date(schedule2.nextRunAt).toLocaleString(),
236276
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
236277
- t2("automation.cron.nextRunIn", "Next run in"),
236278
- " ",
236279
- formatNextRun(schedule2),
236280
- timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground/50 ml-0.5", children: [
236281
- "(",
236282
- timezone,
236283
- ")"
236494
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemDescription, { className: "line-clamp-1 text-xs", children: [
236495
+ getScheduleLabel(schedule2),
236496
+ schedule2.lastRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
236497
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
236498
+ t2("automation.cron.lastRun", "Last run"),
236499
+ ":",
236500
+ " ",
236501
+ new Date(schedule2.lastRunAt).toLocaleString(i18n.language)
236502
+ ] }),
236503
+ schedule2.nextRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
236504
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
236505
+ t2("automation.cron.nextRun", "Next run"),
236506
+ ":",
236507
+ " ",
236508
+ new Date(schedule2.nextRunAt).toLocaleString(i18n.language),
236509
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
236510
+ t2("automation.cron.nextRunIn", "Next run in"),
236511
+ " ",
236512
+ formatNextRun(schedule2),
236513
+ timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground/50 ml-0.5", children: [
236514
+ "(",
236515
+ timezone,
236516
+ ")"
236517
+ ] })
236284
236518
  ] })
236285
236519
  ] })
236520
+ ] }),
236521
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemActions, { className: "gap-0.5", children: [
236522
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236523
+ Button,
236524
+ {
236525
+ variant: "ghost",
236526
+ size: "icon",
236527
+ className: "size-7 text-foreground/50 hover:text-foreground hover:bg-accent",
236528
+ onClick: (e2) => {
236529
+ e2.stopPropagation();
236530
+ void handleTrigger(schedule2.id);
236531
+ },
236532
+ title: t2("automation.triggerNow", "Trigger now"),
236533
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3.5" })
236534
+ }
236535
+ ),
236536
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236537
+ Button,
236538
+ {
236539
+ variant: "ghost",
236540
+ size: "icon",
236541
+ className: "size-7 text-foreground/50 hover:text-foreground hover:bg-accent",
236542
+ onClick: (e2) => {
236543
+ e2.stopPropagation();
236544
+ setEditSchedule(schedule2);
236545
+ },
236546
+ title: t2("automation.editSettings", "Edit settings"),
236547
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5" })
236548
+ }
236549
+ ),
236550
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236551
+ Button,
236552
+ {
236553
+ variant: "ghost",
236554
+ size: "icon",
236555
+ className: "size-7 text-destructive/50 hover:text-destructive hover:bg-destructive/10",
236556
+ onClick: (e2) => {
236557
+ e2.stopPropagation();
236558
+ void handleDelete2(schedule2);
236559
+ },
236560
+ title: t2("automation.delete", "Delete"),
236561
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5" })
236562
+ }
236563
+ )
236286
236564
  ] })
236287
- ] }),
236288
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ItemActions, { className: "gap-0.5", children: [
236289
- /* @__PURE__ */ jsxRuntimeExports.jsx(
236290
- Button,
236291
- {
236292
- variant: "ghost",
236293
- size: "icon",
236294
- className: "size-7 text-foreground/50 hover:text-foreground hover:bg-accent",
236295
- onClick: (e2) => {
236296
- e2.stopPropagation();
236297
- void handleTrigger(schedule2.id);
236298
- },
236299
- title: t2("automation.triggerNow", "Trigger now"),
236300
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3.5" })
236301
- }
236302
- ),
236303
- /* @__PURE__ */ jsxRuntimeExports.jsx(
236304
- Button,
236305
- {
236306
- variant: "ghost",
236307
- size: "icon",
236308
- className: "size-7 text-foreground/50 hover:text-foreground hover:bg-accent",
236309
- onClick: (e2) => {
236310
- e2.stopPropagation();
236311
- setEditSchedule(schedule2);
236312
- },
236313
- title: t2("automation.editSettings", "Edit settings"),
236314
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5" })
236315
- }
236316
- ),
236317
- /* @__PURE__ */ jsxRuntimeExports.jsx(
236318
- Button,
236319
- {
236320
- variant: "ghost",
236321
- size: "icon",
236322
- className: "size-7 text-destructive/50 hover:text-destructive hover:bg-destructive/10",
236323
- onClick: (e2) => {
236324
- e2.stopPropagation();
236325
- void handleDelete2(schedule2);
236326
- },
236327
- title: t2("automation.delete", "Delete"),
236328
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5" })
236329
- }
236330
- )
236331
- ] })
236332
- ]
236333
- }
236334
- ),
236565
+ ]
236566
+ }
236567
+ ) }),
236568
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
236569
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => void handleTrigger(schedule2.id), children: [
236570
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3.5 mr-2" }),
236571
+ t2("automation.triggerNow", "Trigger now")
236572
+ ] }),
236573
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => setEditSchedule(schedule2), children: [
236574
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5 mr-2" }),
236575
+ t2("automation.editSettings", "Edit settings")
236576
+ ] }),
236577
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
236578
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236579
+ ContextMenuItem,
236580
+ {
236581
+ variant: "destructive",
236582
+ onClick: () => void handleDelete2(schedule2),
236583
+ children: [
236584
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5 mr-2" }),
236585
+ t2("automation.delete", "Delete")
236586
+ ]
236587
+ }
236588
+ )
236589
+ ] })
236590
+ ] }),
236335
236591
  index2 < schedules.length - 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(ItemSeparator, {})
236336
236592
  ] }, schedule2.id)) }) }) }),
236337
236593
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -236357,7 +236613,7 @@ function Automation() {
236357
236613
  }
236358
236614
  function Schedule() {
236359
236615
  const { scheduleId } = useParams();
236360
- const { t: t2 } = useTranslation();
236616
+ const { t: t2, i18n } = useTranslation();
236361
236617
  const navigate = useNavigate();
236362
236618
  const location2 = useLocation();
236363
236619
  const { confirm: confirm2 } = useMessage();
@@ -236448,7 +236704,14 @@ function Schedule() {
236448
236704
  };
236449
236705
  if (loading) {
236450
236706
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: [
236451
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-12 shrink-0 border-b border-border flex items-center px-6", style: { WebkitAppRegion: "drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium", children: "—" }) }),
236707
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236708
+ "div",
236709
+ {
236710
+ className: "h-12 shrink-0 border-b border-border flex items-center px-6",
236711
+ style: { WebkitAppRegion: "drag" },
236712
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium", children: "—" })
236713
+ }
236714
+ ),
236452
236715
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-6 animate-spin text-muted-foreground" }) })
236453
236716
  ] });
236454
236717
  }
@@ -236456,75 +236719,140 @@ function Schedule() {
236456
236719
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col items-center justify-center relative overflow-hidden gap-3", children: [
236457
236720
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 right-0 h-12", style: { WebkitAppRegion: "drag" } }),
236458
236721
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-normal text-muted-foreground", children: t2("automation.scheduleNotFound", "Schedule not found") }),
236459
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", size: "sm", className: "h-7 text-xs", onClick: () => navigate("/automation"), children: [
236460
- /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3" }),
236461
- t2("automation.back", "Back")
236462
- ] })
236722
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236723
+ Button,
236724
+ {
236725
+ variant: "outline",
236726
+ size: "sm",
236727
+ className: "h-7 text-xs",
236728
+ onClick: () => navigate("/automation"),
236729
+ children: [
236730
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3" }),
236731
+ t2("automation.back", "Back")
236732
+ ]
236733
+ }
236734
+ )
236463
236735
  ] });
236464
236736
  }
236465
236737
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: [
236466
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-12 shrink-0 border-b border-border flex items-center gap-1 px-2", style: { WebkitAppRegion: "drag" }, children: [
236467
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "ghost", size: "icon", className: "size-7 shrink-0", onClick: () => navigate("/automation"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3.5" }) }) }),
236468
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
236469
- /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium truncate", children: schedule2.name }),
236470
- /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { variant: "outline", className: "px-1 text-[10px] uppercase shrink-0", children: schedule2.agentId })
236471
- ] }),
236472
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-muted-foreground hidden sm:block shrink-0 mr-2", children: [
236473
- schedule2.cron.type === "cron" ? schedule2.cron.expr : t2("automation.manual", "Manual"),
236474
- schedule2.nextRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
236475
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1", children: "·" }),
236476
- t2("automation.cron.nextRun", "Next"),
236477
- ": ",
236478
- new Date(schedule2.nextRunAt).toLocaleString(),
236479
- timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground/50 ml-0.5", children: [
236480
- "(",
236481
- timezone,
236482
- ")"
236483
- ] })
236484
- ] })
236485
- ] }),
236486
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", style: { WebkitAppRegion: "no-drag" }, children: [
236487
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "ghost", size: "icon", className: "size-7", onClick: () => setEditDialogOpen(true), title: t2("automation.editSettings", "Edit settings"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5" }) }),
236488
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "default", size: "sm", className: "h-7 text-xs shrink-0", onClick: handleTrigger, children: [
236489
- /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3 mr-1" }),
236490
- t2("automation.triggerNow", "Trigger now")
236491
- ] })
236492
- ] })
236493
- ] }),
236494
- tasks.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 text-center px-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: t2("automation.noTasksDesc", 'No runs yet. Click "Trigger now" to start the first run.') }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(ResizablePanelGroup, { className: "flex-1 min-h-0", children: [
236495
- /* @__PURE__ */ jsxRuntimeExports.jsx(ResizablePanel, { id: "taskList", groupResizeBehavior: "preserve-pixel-size", defaultSize: 200, minSize: 180, maxSize: 400, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full flex flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: [...tasks].sort((a2, b2) => b2.startedAt - a2.startedAt).map((task) => {
236496
- const isActive = location2.pathname.endsWith(`/task/${task.id}`);
236497
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
236498
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
236499
- ContextMenuTrigger,
236500
- {
236501
- render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
236502
- className: `group border-b border-border flex h-10 cursor-default items-center px-3 text-xs font-normal transition-colors ${isActive ? "bg-accent/70 hover:bg-accent text-accent-foreground/95" : "text-foreground/70 hover:bg-accent hover:text-foreground"}`,
236503
- onClick: () => navigate(`/automation/schedule/${scheduleId}/task/${task.id}`),
236504
- children: [
236505
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
236506
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate", children: new Date(task.startedAt).toLocaleDateString() }),
236507
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: new Date(task.startedAt).toLocaleTimeString() })
236508
- ] }),
236509
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 ml-2", children: getTaskIcon(task) })
236510
- ]
236511
- }
236512
- ),
236513
- /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
236514
- ContextMenuItem,
236738
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236739
+ "div",
236740
+ {
236741
+ className: "h-12 shrink-0 border-b border-border flex items-center gap-1 px-2",
236742
+ style: { WebkitAppRegion: "drag" },
236743
+ children: [
236744
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
236745
+ Button,
236515
236746
  {
236516
- variant: "destructive",
236517
- onClick: () => void handleDeleteTask(task),
236518
- children: [
236519
- /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5 mr-2" }),
236520
- t2("automation.delete", "Delete")
236521
- ]
236747
+ variant: "ghost",
236748
+ size: "icon",
236749
+ className: "size-7 shrink-0",
236750
+ onClick: () => navigate("/automation"),
236751
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3.5" })
236522
236752
  }
236523
- ) })
236524
- ] }, task.id);
236525
- }) }) }) }) }),
236753
+ ) }),
236754
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
236755
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium truncate", children: schedule2.name }),
236756
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { variant: "outline", className: "px-1 text-[10px] leading-none uppercase shrink-0", children: schedule2.agentId })
236757
+ ] }),
236758
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-muted-foreground hidden sm:block shrink-0 mr-2", children: [
236759
+ schedule2.cron.type === "cron" ? schedule2.cron.expr : t2("automation.manual", "Manual"),
236760
+ schedule2.nextRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
236761
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1", children: "·" }),
236762
+ t2("automation.cron.nextRun", "Next"),
236763
+ ":",
236764
+ " ",
236765
+ new Date(schedule2.nextRunAt).toLocaleString(i18n.language),
236766
+ timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground/50 ml-0.5", children: [
236767
+ "(",
236768
+ timezone,
236769
+ ")"
236770
+ ] })
236771
+ ] })
236772
+ ] }),
236773
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", style: { WebkitAppRegion: "no-drag" }, children: [
236774
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236775
+ Button,
236776
+ {
236777
+ variant: "ghost",
236778
+ size: "icon",
236779
+ className: "size-7",
236780
+ onClick: () => setEditDialogOpen(true),
236781
+ title: t2("automation.editSettings", "Edit settings"),
236782
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5" })
236783
+ }
236784
+ ),
236785
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236786
+ Button,
236787
+ {
236788
+ variant: "default",
236789
+ size: "sm",
236790
+ className: "h-7 text-xs shrink-0",
236791
+ onClick: handleTrigger,
236792
+ children: [
236793
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3 mr-1" }),
236794
+ t2("automation.triggerNow", "Trigger now")
236795
+ ]
236796
+ }
236797
+ )
236798
+ ] })
236799
+ ]
236800
+ }
236801
+ ),
236802
+ tasks.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center text-center px-6", children: [
236803
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-6 text-muted-foreground/60" }) }),
236804
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: t2(
236805
+ "automation.noTasksDesc",
236806
+ 'No runs yet. Click "Trigger now" to start the first run.'
236807
+ ) })
236808
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(ResizablePanelGroup, { className: "flex-1 min-h-0", children: [
236809
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
236810
+ ResizablePanel,
236811
+ {
236812
+ id: "taskList",
236813
+ groupResizeBehavior: "preserve-pixel-size",
236814
+ defaultSize: 200,
236815
+ minSize: 180,
236816
+ maxSize: 400,
236817
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full flex flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: [...tasks].sort((a2, b2) => b2.startedAt - a2.startedAt).map((task) => {
236818
+ const isActive = location2.pathname.endsWith(`/task/${task.id}`);
236819
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
236820
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
236821
+ ContextMenuTrigger,
236822
+ {
236823
+ render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
236824
+ className: `group border-b border-border flex h-10 cursor-default items-center px-3 text-xs font-normal transition-colors ${isActive ? "bg-accent/70 hover:bg-accent text-accent-foreground/95" : "text-foreground/70 hover:bg-accent hover:text-foreground"}`,
236825
+ onClick: () => navigate(`/automation/schedule/${scheduleId}/task/${task.id}`),
236826
+ children: [
236827
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
236828
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate", children: new Date(task.startedAt).toLocaleDateString(i18n.language) }),
236829
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: new Date(task.startedAt).toLocaleTimeString(i18n.language) })
236830
+ ] }),
236831
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 ml-2", children: getTaskIcon(task) })
236832
+ ]
236833
+ }
236834
+ ),
236835
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
236836
+ ContextMenuItem,
236837
+ {
236838
+ variant: "destructive",
236839
+ disabled: task.status === "running",
236840
+ onClick: () => void handleDeleteTask(task),
236841
+ children: [
236842
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5 mr-2" }),
236843
+ t2("automation.delete", "Delete")
236844
+ ]
236845
+ }
236846
+ ) })
236847
+ ] }, task.id);
236848
+ }) }) }) })
236849
+ }
236850
+ ),
236526
236851
  /* @__PURE__ */ jsxRuntimeExports.jsx(ResizableHandle, { className: "bg-border/70" }),
236527
- /* @__PURE__ */ jsxRuntimeExports.jsx(ResizablePanel, { id: "right", children: hasTaskRoute ? /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center justify-center h-full gap-2 text-center px-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: t2("automation.selectTaskToPreview", "Select a task to preview files") }) }) })
236852
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ResizablePanel, { id: "right", children: hasTaskRoute ? /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {}) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-center px-6", children: [
236853
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "size-6 text-muted-foreground/60" }) }),
236854
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: t2("automation.selectTaskToPreview", "Select a task to preview files") })
236855
+ ] }) })
236528
236856
  ] }),
236529
236857
  /* @__PURE__ */ jsxRuntimeExports.jsx(
236530
236858
  SettingDialog,
@@ -236645,22 +236973,38 @@ function isBinaryContent(content2) {
236645
236973
  }
236646
236974
  return nullCount > 0 || nonPrintableCount > len * 0.3;
236647
236975
  }
236648
- function FileDetail({ fileName, fileContent, fileLoading, hasTask, hasFiles }) {
236976
+ function FileDetail({
236977
+ fileName,
236978
+ fileContent,
236979
+ fileLoading,
236980
+ hasTask,
236981
+ hasFiles
236982
+ }) {
236649
236983
  const { t: t2 } = useTranslation();
236650
236984
  const fileKind = reactExports.useMemo(() => getFileKind(fileName), [fileName]);
236651
236985
  const isUnsupportedBinary = reactExports.useMemo(() => {
236652
236986
  if (!fileContent || !fileName) return false;
236653
- if (fileKind === "image" || fileKind === "pdf" || fileKind === "docx" || fileKind === "pptx" || fileKind === "xlsx") return false;
236987
+ if (fileKind === "image" || fileKind === "pdf" || fileKind === "docx" || fileKind === "pptx" || fileKind === "xlsx")
236988
+ return false;
236654
236989
  return isBinaryContent(fileContent);
236655
236990
  }, [fileContent, fileName, fileKind]);
236656
236991
  if (!hasTask) {
236657
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full text-xs text-muted-foreground", children: t2("automation.selectTaskToPreview", "Select a task to preview files") });
236992
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground", children: [
236993
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "size-6 text-muted-foreground/60" }) }),
236994
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.selectTaskToPreview", "Select a task to preview files") })
236995
+ ] });
236658
236996
  }
236659
236997
  if (!hasFiles) {
236660
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full text-xs text-muted-foreground", children: t2("automation.noFiles", "No files generated") });
236998
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground", children: [
236999
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-6 text-muted-foreground/60" }) }),
237000
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.noFiles", "No files generated") })
237001
+ ] });
236661
237002
  }
236662
237003
  if (!fileName) {
236663
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full text-xs text-muted-foreground", children: t2("automation.selectFileToPreview", "Select a file to preview") });
237004
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground", children: [
237005
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "size-6 text-muted-foreground/60" }) }),
237006
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.selectFileToPreview", "Select a file to preview") })
237007
+ ] });
236664
237008
  }
236665
237009
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full h-full min-w-0 relative overflow-hidden", children: [
236666
237010
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-10 shrink-0 border-b border-border flex items-center justify-between gap-2 px-2 bg-background", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex items-center gap-1.5", children: [
@@ -236692,7 +237036,17 @@ function buildTree2(paths) {
236692
237036
  if (existing.children) current = existing.children;
236693
237037
  }
236694
237038
  }
236695
- return root2;
237039
+ function sortNodes(nodes) {
237040
+ nodes.sort((a2, b2) => {
237041
+ if (a2.isFolder !== b2.isFolder) return a2.isFolder ? -1 : 1;
237042
+ return a2.name.localeCompare(b2.name);
237043
+ });
237044
+ for (const n2 of nodes) {
237045
+ if (n2.children) sortNodes(n2.children);
237046
+ }
237047
+ return nodes;
237048
+ }
237049
+ return sortNodes(root2);
236696
237050
  }
236697
237051
  function FileTree({
236698
237052
  nodes,
@@ -236722,10 +237076,12 @@ function FileTree({
236722
237076
  /* @__PURE__ */ jsxRuntimeExports.jsx(
236723
237077
  ChevronRight,
236724
237078
  {
236725
- className: cn$5("size-3.5 shrink-0 text-muted-foreground transition-transform", isOpen && "rotate-90")
237079
+ className: cn$5(
237080
+ "size-3.5 shrink-0 text-muted-foreground transition-transform scale-110",
237081
+ isOpen && "rotate-90"
237082
+ )
236726
237083
  }
236727
237084
  ),
236728
- /* @__PURE__ */ jsxRuntimeExports.jsx(Folder$1, { className: "size-4 shrink-0 text-muted-foreground/90" }),
236729
237085
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate leading-normal", children: node2.name })
236730
237086
  ]
236731
237087
  }
@@ -236758,8 +237114,7 @@ function FileTree({
236758
237114
  style: { paddingLeft: `${depth * 16 + 6}px` },
236759
237115
  onClick: () => onSelectFile(node2.path),
236760
237116
  children: [
236761
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-3.5 shrink-0" }),
236762
- /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node2.name, className: "size-4 shrink-0 text-muted-foreground/90" }),
237117
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node2.name, className: "size-3.5 shrink-0 text-muted-foreground/90" }),
236763
237118
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate leading-normal", children: node2.name })
236764
237119
  ]
236765
237120
  }
@@ -236828,7 +237183,13 @@ function Panel({
236828
237183
  }
236829
237184
  ) })
236830
237185
  ] }),
236831
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-1", children: !hasTask ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-3 py-4 text-xs text-muted-foreground text-center", children: t2("automation.selectTask", "Select a task") }) : files.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-3 py-4 text-xs text-muted-foreground text-center", children: t2("automation.noFiles", "No files") }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
237186
+ !hasTask ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center flex-1 min-h-0 -mt-10 text-muted-foreground", children: [
237187
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-10 rounded-full bg-muted flex items-center justify-center mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Folder$1, { className: "size-5 text-muted-foreground/60" }) }),
237188
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.selectTask", "Select a task") })
237189
+ ] }) : files.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center flex-1 min-h-0 -mt-10 text-muted-foreground", children: [
237190
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-10 rounded-full bg-muted flex items-center justify-center mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-5 text-muted-foreground/60" }) }),
237191
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.noFiles", "No files") })
237192
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1 pl-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
236832
237193
  FileTree,
236833
237194
  {
236834
237195
  nodes: tree,
@@ -236911,36 +237272,54 @@ function Task() {
236911
237272
  }
236912
237273
  ) }),
236913
237274
  /* @__PURE__ */ jsxRuntimeExports.jsx(ResizableHandle, { className: "bg-border/70" }),
236914
- /* @__PURE__ */ jsxRuntimeExports.jsx(ResizablePanel, { id: "filePanel", groupResizeBehavior: "preserve-pixel-size", defaultSize: 250, minSize: 250, maxSize: 400, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
236915
- Panel,
237275
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
237276
+ ResizablePanel,
236916
237277
  {
236917
- files: taskFiles,
236918
- selectedFile,
236919
- hasTask: true,
236920
- onSelectFile: setSelectedFile,
236921
- onCopyRelativePath: async (file) => {
236922
- try {
236923
- await copyText(file);
236924
- } catch {
236925
- }
236926
- },
236927
- onCopyAbsolutePath: async (file) => {
236928
- try {
236929
- const abs2 = await request.getTaskFileSystemPath({ scheduleId, taskId, filePath: file });
236930
- await copyText(abs2);
236931
- } catch {
236932
- }
236933
- },
236934
- onRevealInFinder: async (file) => {
236935
- if (isWebUI) return;
236936
- try {
236937
- const abs2 = await request.getTaskFileSystemPath({ scheduleId, taskId, filePath: file });
236938
- await electron.revealInFinder(abs2);
236939
- } catch {
237278
+ id: "filePanel",
237279
+ groupResizeBehavior: "preserve-pixel-size",
237280
+ defaultSize: 250,
237281
+ minSize: 250,
237282
+ maxSize: 400,
237283
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
237284
+ Panel,
237285
+ {
237286
+ files: taskFiles,
237287
+ selectedFile,
237288
+ hasTask: true,
237289
+ onSelectFile: setSelectedFile,
237290
+ onCopyRelativePath: async (file) => {
237291
+ try {
237292
+ await copyText(file);
237293
+ } catch {
237294
+ }
237295
+ },
237296
+ onCopyAbsolutePath: async (file) => {
237297
+ try {
237298
+ const abs2 = await request.getTaskFileSystemPath({
237299
+ scheduleId,
237300
+ taskId,
237301
+ filePath: file
237302
+ });
237303
+ await copyText(abs2);
237304
+ } catch {
237305
+ }
237306
+ },
237307
+ onRevealInFinder: async (file) => {
237308
+ if (isWebUI) return;
237309
+ try {
237310
+ const abs2 = await request.getTaskFileSystemPath({
237311
+ scheduleId,
237312
+ taskId,
237313
+ filePath: file
237314
+ });
237315
+ await electron.revealInFinder(abs2);
237316
+ } catch {
237317
+ }
237318
+ }
236940
237319
  }
236941
- }
237320
+ )
236942
237321
  }
236943
- ) })
237322
+ )
236944
237323
  ] });
236945
237324
  }
236946
237325
  function SessionWrapper() {