@zythum02/fello-server 0.1.29 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/out/renderer/assets/{_baseUniq-BApwm7pv.js → _baseUniq-DNNr8R6Z.js} +1 -1
- package/out/renderer/assets/{arc-yKenDsmO.js → arc-fZlBtxL9.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-Q4EWVU46-C31yFVWH.js → architectureDiagram-Q4EWVU46-k4E5eOG6.js} +5 -5
- package/out/renderer/assets/{blockDiagram-DXYQGD6D-6liCvTXv.js → blockDiagram-DXYQGD6D-DUXfUO2U.js} +6 -6
- package/out/renderer/assets/{c4Diagram-AHTNJAMY-Co_b_6bH.js → c4Diagram-AHTNJAMY-Chff2Ong.js} +2 -2
- package/out/renderer/assets/{channel-Dc_jjyUr.js → channel-C3mo-Wfq.js} +1 -1
- package/out/renderer/assets/{chunk-4BX2VUAB-Cg18SQei.js → chunk-4BX2VUAB-DGQRb5sN.js} +1 -1
- package/out/renderer/assets/{chunk-4TB4RGXK-CvSqwINq.js → chunk-4TB4RGXK-BSCZx5Py.js} +5 -5
- package/out/renderer/assets/{chunk-55IACEB6-CfBiPWtx.js → chunk-55IACEB6-BVIv0C3q.js} +1 -1
- package/out/renderer/assets/{chunk-EDXVE4YY-DMjVfNdS.js → chunk-EDXVE4YY-DPmCmhx8.js} +1 -1
- package/out/renderer/assets/{chunk-FMBD7UC4-BbpFqyFG.js → chunk-FMBD7UC4-DM66-_hG.js} +1 -1
- package/out/renderer/assets/{chunk-OYMX7WX6-Cf724x--.js → chunk-OYMX7WX6-Tff_uZlx.js} +3 -3
- package/out/renderer/assets/{chunk-QZHKN3VN-4ZNIwknr.js → chunk-QZHKN3VN-C86eKqSd.js} +1 -1
- package/out/renderer/assets/{chunk-YZCP3GAM-D1j7xGGR.js → chunk-YZCP3GAM-CHuoIosP.js} +1 -1
- package/out/renderer/assets/{classDiagram-6PBFFD2Q-OFMeoPav.js → classDiagram-6PBFFD2Q-pm-iptmM.js} +6 -6
- package/out/renderer/assets/{classDiagram-v2-HSJHXN6E-OFMeoPav.js → classDiagram-v2-HSJHXN6E-pm-iptmM.js} +6 -6
- package/out/renderer/assets/{clone-Cm3RO2Zl.js → clone-5TzmfoWe.js} +1 -1
- package/out/renderer/assets/{cose-bilkent-S5V4N54A-lCfWcP6y.js → cose-bilkent-S5V4N54A-DVrDSw12.js} +1 -1
- package/out/renderer/assets/{dagre-KV5264BT-4I0h4wyh.js → dagre-KV5264BT-DdjpmydK.js} +6 -6
- package/out/renderer/assets/{diagram-5BDNPKRD-C1mEpAlt.js → diagram-5BDNPKRD-CdTSROj9.js} +6 -6
- package/out/renderer/assets/{diagram-G4DWMVQ6-C_g_DZm9.js → diagram-G4DWMVQ6-DQ1x-vhi.js} +6 -6
- package/out/renderer/assets/{diagram-MMDJMWI5-Di6wZV6-.js → diagram-MMDJMWI5-40ryNdvI.js} +5 -5
- package/out/renderer/assets/{diagram-TYMM5635-aF8hIDx1.js → diagram-TYMM5635-tf8FuJg1.js} +5 -5
- package/out/renderer/assets/{erDiagram-SMLLAGMA-Bk9QFZ27.js → erDiagram-SMLLAGMA-BciRZ0dO.js} +4 -4
- package/out/renderer/assets/{flowDiagram-DWJPFMVM-Dfg0LLup.js → flowDiagram-DWJPFMVM-CYDqfzx3.js} +6 -6
- package/out/renderer/assets/{ganttDiagram-T4ZO3ILL-lTjaJTs0.js → ganttDiagram-T4ZO3ILL-CRhxy6fZ.js} +2 -2
- package/out/renderer/assets/{gitGraphDiagram-UUTBAWPF-C74WBszH.js → gitGraphDiagram-UUTBAWPF-BadxOCq2.js} +6 -6
- package/out/renderer/assets/{graph-DGEX1eV1.js → graph-B3RLQ95r.js} +2 -2
- package/out/renderer/assets/{highlighted-body-OFNGDK62-DQWoSdTY.js → highlighted-body-OFNGDK62-CrGFRrSX.js} +1 -1
- package/out/renderer/assets/{index-BZzw3jIU.js → index-B1oSpSBX.js} +2137 -950
- package/out/renderer/assets/index-COLJTco3.css +382 -0
- package/out/renderer/assets/{infoDiagram-42DDH7IO-CR4ZLAM1.js → infoDiagram-42DDH7IO-DLMGtQF0.js} +4 -4
- package/out/renderer/assets/{ishikawaDiagram-UXIWVN3A-uXL-4FGw.js → ishikawaDiagram-UXIWVN3A-D8djsZeF.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-VCZTEJTY-Ds2OL3Lo.js → journeyDiagram-VCZTEJTY-567Gpkxf.js} +4 -4
- package/out/renderer/assets/{kanban-definition-6JOO6SKY-CZ1CZVyP.js → kanban-definition-6JOO6SKY-DPjxCDrA.js} +2 -2
- package/out/renderer/assets/{layout-CNGveWdi.js → layout-CGQjv10p.js} +4 -4
- package/out/renderer/assets/{linear-CnHAiAJ3.js → linear-S4Y_UBCp.js} +1 -1
- package/out/renderer/assets/{min-D63AfN0e.js → min-DpKM6qkq.js} +2 -2
- package/out/renderer/assets/{mindmap-definition-QFDTVHPH-C3U3xkIJ.js → mindmap-definition-QFDTVHPH-BtxeumQc.js} +3 -3
- package/out/renderer/assets/{pieDiagram-DEJITSTG-C8AxK_-F.js → pieDiagram-DEJITSTG-n1UTGYDH.js} +6 -6
- package/out/renderer/assets/{quadrantDiagram-34T5L4WZ-BdiZmi7w.js → quadrantDiagram-34T5L4WZ-DXaOIoV-.js} +2 -2
- package/out/renderer/assets/{requirementDiagram-MS252O5E-BHIfl5Tz.js → requirementDiagram-MS252O5E-CTmWVt-P.js} +3 -3
- package/out/renderer/assets/{sankeyDiagram-XADWPNL6-SthTR8cL.js → sankeyDiagram-XADWPNL6-BXOndA46.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-FGHM5R23-COKEbCYM.js → sequenceDiagram-FGHM5R23-C5v5_yv_.js} +3 -3
- package/out/renderer/assets/{stateDiagram-FHFEXIEX-7zRGBf7O.js → stateDiagram-FHFEXIEX-D6Vd4_MM.js} +8 -8
- package/out/renderer/assets/{stateDiagram-v2-QKLJ7IA2-BqHJ_ZBX.js → stateDiagram-v2-QKLJ7IA2-De00f0TU.js} +4 -4
- package/out/renderer/assets/{timeline-definition-GMOUNBTQ-AvZAT5J-.js → timeline-definition-GMOUNBTQ-DxOCmdWf.js} +2 -2
- package/out/renderer/assets/{vennDiagram-DHZGUBPP-oSTndBDY.js → vennDiagram-DHZGUBPP-VNGucDZS.js} +1 -1
- package/out/renderer/assets/{wardley-RL74JXVD-C8hIuf19.js → wardley-RL74JXVD-BbxXQNlq.js} +3 -3
- package/out/renderer/assets/{wardleyDiagram-NUSXRM2D-Dv2kSOMM.js → wardleyDiagram-NUSXRM2D-BqldBvm5.js} +5 -5
- package/out/renderer/assets/{xychartDiagram-5P7HB3ND-J9z4uuMK.js → xychartDiagram-5P7HB3ND-BrCeeMZz.js} +2 -2
- package/out/renderer/index.html +2 -2
- package/out/server/main.js +210 -165
- package/package.json +1 -1
- 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-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-DdjpmydK.js","./graph-B3RLQ95r.js","./_baseUniq-DNNr8R6Z.js","./layout-CGQjv10p.js","./min-DpKM6qkq.js","./clone-5TzmfoWe.js","./cose-bilkent-S5V4N54A-DVrDSw12.js","./cytoscape.esm-Bm8DJGmZ.js","./c4Diagram-AHTNJAMY-Chff2Ong.js","./chunk-YZCP3GAM-CHuoIosP.js","./flowDiagram-DWJPFMVM-CYDqfzx3.js","./chunk-FMBD7UC4-DM66-_hG.js","./chunk-55IACEB6-BVIv0C3q.js","./chunk-EDXVE4YY-DPmCmhx8.js","./channel-C3mo-Wfq.js","./erDiagram-SMLLAGMA-BciRZ0dO.js","./gitGraphDiagram-UUTBAWPF-BadxOCq2.js","./chunk-4BX2VUAB-DGQRb5sN.js","./chunk-QZHKN3VN-C86eKqSd.js","./wardley-RL74JXVD-BbxXQNlq.js","./ganttDiagram-T4ZO3ILL-CRhxy6fZ.js","./linear-S4Y_UBCp.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-42DDH7IO-DLMGtQF0.js","./pieDiagram-DEJITSTG-n1UTGYDH.js","./arc-fZlBtxL9.js","./ordinal-CxptdPJm.js","./quadrantDiagram-34T5L4WZ-DXaOIoV-.js","./xychartDiagram-5P7HB3ND-BrCeeMZz.js","./requirementDiagram-MS252O5E-CTmWVt-P.js","./sequenceDiagram-FGHM5R23-C5v5_yv_.js","./classDiagram-6PBFFD2Q-pm-iptmM.js","./chunk-4TB4RGXK-BSCZx5Py.js","./classDiagram-v2-HSJHXN6E-pm-iptmM.js","./stateDiagram-FHFEXIEX-D6Vd4_MM.js","./chunk-OYMX7WX6-Tff_uZlx.js","./stateDiagram-v2-QKLJ7IA2-De00f0TU.js","./journeyDiagram-VCZTEJTY-567Gpkxf.js","./timeline-definition-GMOUNBTQ-DxOCmdWf.js","./mindmap-definition-QFDTVHPH-BtxeumQc.js","./kanban-definition-6JOO6SKY-DPjxCDrA.js","./sankeyDiagram-XADWPNL6-BXOndA46.js","./diagram-TYMM5635-tf8FuJg1.js","./diagram-MMDJMWI5-40ryNdvI.js","./blockDiagram-DXYQGD6D-DUXfUO2U.js","./diagram-5BDNPKRD-CdTSROj9.js","./architectureDiagram-Q4EWVU46-k4E5eOG6.js","./diagram-G4DWMVQ6-DQ1x-vhi.js","./wardleyDiagram-NUSXRM2D-BqldBvm5.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 (
|
|
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", "files": "Files", "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", "selectTask": "Select a task", "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": "
|
|
15182
|
+
const automation = { "title": "自动化", "agent": "智能体", "alwaysDisabled": "始终禁用", "anyMoment": "即将执行", "back": "返回", "cancel": "取消", "create": "创建", "createFirst": "创建你的第一个计划", "delete": "删除", "deleteConfirm": "确定永久删除「{{name}}」?", "deleteTaskConfirm": "确定永久删除此任务?", "deleteTaskTitle": "删除任务", "deleteTitle": "删除计划", "dialogDesc": "配置自动化计划的执行规则和 Prompt。", "editSchedule": "编辑计划", "editSettings": "编辑设置", "features": "功能", "files": "文件", "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": "选择任务查看文件", "selectTask": "选择一个任务", "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,
|
|
@@ -33113,6 +33113,18 @@ const MenuRoot = fastComponent(function MenuRoot2(props) {
|
|
|
33113
33113
|
}
|
|
33114
33114
|
return content2;
|
|
33115
33115
|
});
|
|
33116
|
+
function MenuSubmenuRoot(props) {
|
|
33117
|
+
const parentMenu = useMenuRootContext().store;
|
|
33118
|
+
const contextValue = reactExports.useMemo(() => ({
|
|
33119
|
+
parentMenu
|
|
33120
|
+
}), [parentMenu]);
|
|
33121
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(MenuSubmenuRootContext.Provider, {
|
|
33122
|
+
value: contextValue,
|
|
33123
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(MenuRoot, {
|
|
33124
|
+
...props
|
|
33125
|
+
})
|
|
33126
|
+
});
|
|
33127
|
+
}
|
|
33116
33128
|
function getPseudoElementBounds(element2) {
|
|
33117
33129
|
const elementRect = element2.getBoundingClientRect();
|
|
33118
33130
|
const win = getWindow$1(element2);
|
|
@@ -33528,6 +33540,124 @@ const Separator$1 = /* @__PURE__ */ reactExports.forwardRef(function SeparatorCo
|
|
|
33528
33540
|
function isElementDisabled(element2) {
|
|
33529
33541
|
return element2 == null || element2.hasAttribute("disabled") || element2.getAttribute("aria-disabled") === "true";
|
|
33530
33542
|
}
|
|
33543
|
+
const MenuSubmenuTrigger = /* @__PURE__ */ reactExports.forwardRef(function SubmenuTriggerComponent(componentProps, forwardedRef) {
|
|
33544
|
+
const {
|
|
33545
|
+
render: render4,
|
|
33546
|
+
className,
|
|
33547
|
+
label,
|
|
33548
|
+
id: idProp,
|
|
33549
|
+
nativeButton = false,
|
|
33550
|
+
openOnHover = true,
|
|
33551
|
+
delay = 100,
|
|
33552
|
+
closeDelay = 0,
|
|
33553
|
+
disabled: disabledProp = false,
|
|
33554
|
+
style: style2,
|
|
33555
|
+
...elementProps
|
|
33556
|
+
} = componentProps;
|
|
33557
|
+
const listItem2 = useCompositeListItem();
|
|
33558
|
+
const menuPositionerContext = useMenuPositionerContext();
|
|
33559
|
+
const {
|
|
33560
|
+
store
|
|
33561
|
+
} = useMenuRootContext();
|
|
33562
|
+
const thisTriggerId = useBaseUiId(idProp);
|
|
33563
|
+
const open2 = store.useState("open");
|
|
33564
|
+
const floatingRootContext = store.useState("floatingRootContext");
|
|
33565
|
+
const floatingTreeRoot = store.useState("floatingTreeRoot");
|
|
33566
|
+
const baseRegisterTrigger = useTriggerRegistration(thisTriggerId, store);
|
|
33567
|
+
const registerTrigger = reactExports.useCallback((element22) => {
|
|
33568
|
+
const cleanup = baseRegisterTrigger(element22);
|
|
33569
|
+
if (element22 !== null && store.select("open") && store.select("activeTriggerId") == null) {
|
|
33570
|
+
store.update({
|
|
33571
|
+
activeTriggerId: thisTriggerId,
|
|
33572
|
+
activeTriggerElement: element22,
|
|
33573
|
+
closeDelay
|
|
33574
|
+
});
|
|
33575
|
+
}
|
|
33576
|
+
return cleanup;
|
|
33577
|
+
}, [baseRegisterTrigger, closeDelay, store, thisTriggerId]);
|
|
33578
|
+
const triggerElementRef = reactExports.useRef(null);
|
|
33579
|
+
const handleTriggerElementRef = reactExports.useCallback((el2) => {
|
|
33580
|
+
triggerElementRef.current = el2;
|
|
33581
|
+
store.set("activeTriggerElement", el2);
|
|
33582
|
+
}, [store]);
|
|
33583
|
+
const submenuRootContext = useMenuSubmenuRootContext();
|
|
33584
|
+
if (!submenuRootContext?.parentMenu) {
|
|
33585
|
+
throw new Error(formatErrorMessage(37));
|
|
33586
|
+
}
|
|
33587
|
+
store.useSyncedValue("closeDelay", closeDelay);
|
|
33588
|
+
const parentMenuStore = submenuRootContext.parentMenu;
|
|
33589
|
+
const itemProps = parentMenuStore.useState("itemProps");
|
|
33590
|
+
const highlighted = parentMenuStore.useState("isActive", listItem2.index);
|
|
33591
|
+
const itemMetadata = reactExports.useMemo(() => ({
|
|
33592
|
+
type: "submenu-trigger",
|
|
33593
|
+
setActive() {
|
|
33594
|
+
parentMenuStore.set("activeIndex", listItem2.index);
|
|
33595
|
+
}
|
|
33596
|
+
}), [parentMenuStore, listItem2.index]);
|
|
33597
|
+
const rootDisabled = store.useState("disabled");
|
|
33598
|
+
const disabled2 = disabledProp || rootDisabled;
|
|
33599
|
+
const {
|
|
33600
|
+
getItemProps,
|
|
33601
|
+
itemRef
|
|
33602
|
+
} = useMenuItem({
|
|
33603
|
+
closeOnClick: false,
|
|
33604
|
+
disabled: disabled2,
|
|
33605
|
+
highlighted,
|
|
33606
|
+
id: thisTriggerId,
|
|
33607
|
+
store,
|
|
33608
|
+
typingRef: parentMenuStore.context.typingRef,
|
|
33609
|
+
nativeButton,
|
|
33610
|
+
itemMetadata,
|
|
33611
|
+
nodeId: menuPositionerContext?.context.nodeId
|
|
33612
|
+
});
|
|
33613
|
+
const hoverEnabled = store.useState("hoverEnabled");
|
|
33614
|
+
const allowMouseEnter = parentMenuStore.useState("allowMouseEnter");
|
|
33615
|
+
const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
|
|
33616
|
+
enabled: hoverEnabled && openOnHover && !disabled2,
|
|
33617
|
+
handleClose: safePolygon({
|
|
33618
|
+
blockPointerEvents: true
|
|
33619
|
+
}),
|
|
33620
|
+
mouseOnly: true,
|
|
33621
|
+
move: true,
|
|
33622
|
+
restMs: delay,
|
|
33623
|
+
delay: allowMouseEnter ? {
|
|
33624
|
+
open: delay,
|
|
33625
|
+
close: closeDelay
|
|
33626
|
+
} : 0,
|
|
33627
|
+
triggerElementRef,
|
|
33628
|
+
externalTree: floatingTreeRoot,
|
|
33629
|
+
isClosing: () => store.select("transitionStatus") === "ending"
|
|
33630
|
+
});
|
|
33631
|
+
const click = useClick(floatingRootContext, {
|
|
33632
|
+
enabled: !disabled2,
|
|
33633
|
+
event: "mousedown",
|
|
33634
|
+
toggle: !openOnHover,
|
|
33635
|
+
ignoreMouse: openOnHover,
|
|
33636
|
+
stickIfOpen: false
|
|
33637
|
+
});
|
|
33638
|
+
const localInteractionProps = useInteractions([click]);
|
|
33639
|
+
const rootTriggerProps = store.useState("triggerProps", true);
|
|
33640
|
+
delete rootTriggerProps.id;
|
|
33641
|
+
const state2 = {
|
|
33642
|
+
disabled: disabled2,
|
|
33643
|
+
highlighted,
|
|
33644
|
+
open: open2
|
|
33645
|
+
};
|
|
33646
|
+
const element2 = useRenderElement("div", componentProps, {
|
|
33647
|
+
state: state2,
|
|
33648
|
+
stateAttributesMapping: triggerOpenStateMapping$1,
|
|
33649
|
+
props: [localInteractionProps.getReferenceProps(), hoverProps, rootTriggerProps, itemProps, {
|
|
33650
|
+
tabIndex: open2 || highlighted ? 0 : -1,
|
|
33651
|
+
onBlur() {
|
|
33652
|
+
if (highlighted) {
|
|
33653
|
+
parentMenuStore.set("activeIndex", null);
|
|
33654
|
+
}
|
|
33655
|
+
}
|
|
33656
|
+
}, elementProps, getItemProps],
|
|
33657
|
+
ref: [forwardedRef, listItem2.ref, itemRef, registerTrigger, handleTriggerElementRef]
|
|
33658
|
+
});
|
|
33659
|
+
return element2;
|
|
33660
|
+
});
|
|
33531
33661
|
function DropdownMenu({ ...props }) {
|
|
33532
33662
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(MenuRoot, { "data-slot": "dropdown-menu", ...props });
|
|
33533
33663
|
}
|
|
@@ -33566,7 +33696,7 @@ function DropdownMenuContent({
|
|
|
33566
33696
|
MenuPopup,
|
|
33567
33697
|
{
|
|
33568
33698
|
"data-slot": "dropdown-menu-content",
|
|
33569
|
-
className: cn$5("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover py-1 px-1
|
|
33699
|
+
className: cn$5("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover py-1 px-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
33570
33700
|
...props
|
|
33571
33701
|
}
|
|
33572
33702
|
)
|
|
@@ -33593,6 +33723,53 @@ function DropdownMenuItem({
|
|
|
33593
33723
|
}
|
|
33594
33724
|
);
|
|
33595
33725
|
}
|
|
33726
|
+
function DropdownMenuSub({ ...props }) {
|
|
33727
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(MenuSubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
33728
|
+
}
|
|
33729
|
+
function DropdownMenuSubTrigger({
|
|
33730
|
+
className,
|
|
33731
|
+
inset,
|
|
33732
|
+
children: children2,
|
|
33733
|
+
...props
|
|
33734
|
+
}) {
|
|
33735
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
33736
|
+
MenuSubmenuTrigger,
|
|
33737
|
+
{
|
|
33738
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
33739
|
+
"data-inset": inset,
|
|
33740
|
+
className: cn$5(
|
|
33741
|
+
"flex cursor-default items-center gap-1.5 rounded-sm px-1.5 py-1 text-xs text-muted-foreground/90 outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
33742
|
+
className
|
|
33743
|
+
),
|
|
33744
|
+
...props,
|
|
33745
|
+
children: [
|
|
33746
|
+
children2,
|
|
33747
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "ml-auto" })
|
|
33748
|
+
]
|
|
33749
|
+
}
|
|
33750
|
+
);
|
|
33751
|
+
}
|
|
33752
|
+
function DropdownMenuSubContent({
|
|
33753
|
+
align = "start",
|
|
33754
|
+
alignOffset = -3,
|
|
33755
|
+
side = "right",
|
|
33756
|
+
sideOffset = 0,
|
|
33757
|
+
className,
|
|
33758
|
+
...props
|
|
33759
|
+
}) {
|
|
33760
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33761
|
+
DropdownMenuContent,
|
|
33762
|
+
{
|
|
33763
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
33764
|
+
className: cn$5("w-auto min-w-24 rounded-lg bg-popover py-1 px-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
33765
|
+
align,
|
|
33766
|
+
alignOffset,
|
|
33767
|
+
side,
|
|
33768
|
+
sideOffset,
|
|
33769
|
+
...props
|
|
33770
|
+
}
|
|
33771
|
+
);
|
|
33772
|
+
}
|
|
33596
33773
|
function DropdownMenuSeparator({
|
|
33597
33774
|
className,
|
|
33598
33775
|
...props
|
|
@@ -40956,6 +41133,15 @@ function Sidebar() {
|
|
|
40956
41133
|
window.addEventListener("fello:add-project", handler);
|
|
40957
41134
|
return () => window.removeEventListener("fello:add-project", handler);
|
|
40958
41135
|
}, []);
|
|
41136
|
+
const handleNewSessionRef = reactExports.useRef(void 0);
|
|
41137
|
+
reactExports.useEffect(() => {
|
|
41138
|
+
const handler = (e2) => {
|
|
41139
|
+
const projectId = e2.detail?.projectId;
|
|
41140
|
+
if (projectId) handleNewSessionRef.current?.(projectId);
|
|
41141
|
+
};
|
|
41142
|
+
window.addEventListener("fello:new-session", handler);
|
|
41143
|
+
return () => window.removeEventListener("fello:new-session", handler);
|
|
41144
|
+
}, []);
|
|
40959
41145
|
const handleNavigate = (path2) => {
|
|
40960
41146
|
setOptimisticPath(path2);
|
|
40961
41147
|
setTimeout(() => {
|
|
@@ -41097,6 +41283,7 @@ function Sidebar() {
|
|
|
41097
41283
|
setNewSessionPermissionMode("allow-all");
|
|
41098
41284
|
setNewSessionDialogOpen(true);
|
|
41099
41285
|
};
|
|
41286
|
+
handleNewSessionRef.current = openNewSessionDialog;
|
|
41100
41287
|
const handleCreateNewSession = async () => {
|
|
41101
41288
|
if (!newSessionProjectId || !newSessionAgentId) return;
|
|
41102
41289
|
const ok2 = await handleNewChat(newSessionProjectId, newSessionAgentId, {
|
|
@@ -41128,13 +41315,14 @@ function Sidebar() {
|
|
|
41128
41315
|
variant: "destructive",
|
|
41129
41316
|
value: async () => {
|
|
41130
41317
|
const store = useAppStore.getState();
|
|
41318
|
+
if (activeSessionId === session2.id) {
|
|
41319
|
+
handleNavigate("/");
|
|
41320
|
+
}
|
|
41321
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
41131
41322
|
setSessions(store.sessions.filter((s16) => s16.id !== session2.id));
|
|
41132
41323
|
const map2 = new Map(store.sessionStates);
|
|
41133
41324
|
map2.delete(session2.id);
|
|
41134
41325
|
useAppStore.setState({ sessionStates: map2 });
|
|
41135
|
-
if (activeSessionId === session2.id) {
|
|
41136
|
-
handleNavigate("/");
|
|
41137
|
-
}
|
|
41138
41326
|
await request.deleteSession(session2.id);
|
|
41139
41327
|
await refreshData();
|
|
41140
41328
|
return "deleted";
|
|
@@ -41177,22 +41365,20 @@ function Sidebar() {
|
|
|
41177
41365
|
{
|
|
41178
41366
|
text: t2("sidebar.delete"),
|
|
41179
41367
|
value: async () => {
|
|
41180
|
-
|
|
41181
|
-
const
|
|
41182
|
-
|
|
41368
|
+
const state2 = useAppStore.getState();
|
|
41369
|
+
const activeSession = state2.sessions.find((session2) => session2.id === activeSessionId);
|
|
41370
|
+
if (activeSession && activeSession.projectId === project.id) {
|
|
41371
|
+
handleNavigate("/");
|
|
41372
|
+
}
|
|
41373
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
41374
|
+
const map2 = new Map(state2.sessionStates);
|
|
41375
|
+
for (const session2 of state2.sessions) {
|
|
41183
41376
|
if (session2.projectId === project.id) map2.delete(session2.id);
|
|
41184
41377
|
}
|
|
41185
41378
|
useAppStore.setState({ sessionStates: map2 });
|
|
41186
|
-
|
|
41187
|
-
|
|
41188
|
-
|
|
41189
|
-
if (next2) {
|
|
41190
|
-
handleNavigate(`/session-view/${next2.id}`);
|
|
41191
|
-
} else {
|
|
41192
|
-
handleNavigate("/");
|
|
41193
|
-
}
|
|
41194
|
-
}
|
|
41195
|
-
return "confirm";
|
|
41379
|
+
await request.deleteProject(project.id);
|
|
41380
|
+
await refreshData();
|
|
41381
|
+
return "deleted";
|
|
41196
41382
|
},
|
|
41197
41383
|
variant: "destructive"
|
|
41198
41384
|
}
|
|
@@ -41280,258 +41466,225 @@ function Sidebar() {
|
|
|
41280
41466
|
}
|
|
41281
41467
|
)
|
|
41282
41468
|
] }),
|
|
41283
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.
|
|
41284
|
-
|
|
41285
|
-
|
|
41286
|
-
|
|
41287
|
-
|
|
41288
|
-
|
|
41289
|
-
|
|
41290
|
-
{
|
|
41291
|
-
|
|
41292
|
-
|
|
41293
|
-
|
|
41294
|
-
|
|
41295
|
-
|
|
41296
|
-
|
|
41469
|
+
/* @__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) => {
|
|
41470
|
+
const projectSessions = sessionsByProject[project.id] ?? [];
|
|
41471
|
+
const expanded = isProjectExpanded(project.id);
|
|
41472
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-0.5", children: [
|
|
41473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41474
|
+
ContextMenu,
|
|
41475
|
+
{
|
|
41476
|
+
onOpenChange: (open2) => {
|
|
41477
|
+
setOpenProjectMenuId(
|
|
41478
|
+
(prev2) => open2 ? project.id : prev2 === project.id ? null : prev2
|
|
41479
|
+
);
|
|
41480
|
+
},
|
|
41481
|
+
children: [
|
|
41482
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41483
|
+
ContextMenuTrigger,
|
|
41484
|
+
{
|
|
41485
|
+
render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
|
|
41486
|
+
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" : ""}`,
|
|
41487
|
+
onClick: () => toggleProject(project.id),
|
|
41488
|
+
onContextMenu: (e2) => {
|
|
41489
|
+
e2.stopPropagation();
|
|
41490
|
+
},
|
|
41491
|
+
children: [
|
|
41492
|
+
expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FolderClosed, { className: "size-3.5" }),
|
|
41493
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate leading-normal font-normal uppercase select-none", children: project.title }),
|
|
41494
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41495
|
+
"button",
|
|
41496
|
+
{
|
|
41497
|
+
type: "button",
|
|
41498
|
+
onClick: (e2) => {
|
|
41499
|
+
e2.stopPropagation();
|
|
41500
|
+
openNewSessionDialog(project.id);
|
|
41501
|
+
},
|
|
41502
|
+
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"}`,
|
|
41503
|
+
"aria-label": t2("sidebar.createChatInProject", {
|
|
41504
|
+
defaultValue: "Create chat in {{title}}",
|
|
41505
|
+
title: project.title
|
|
41506
|
+
}),
|
|
41507
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, {})
|
|
41508
|
+
}
|
|
41509
|
+
)
|
|
41510
|
+
]
|
|
41511
|
+
}
|
|
41512
|
+
),
|
|
41513
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { onClick: (e2) => e2.stopPropagation(), className: "w-auto", children: [
|
|
41297
41514
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41298
|
-
|
|
41515
|
+
ContextMenuItem,
|
|
41299
41516
|
{
|
|
41300
|
-
|
|
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) => {
|
|
41517
|
+
onClick: (e2) => {
|
|
41304
41518
|
e2.stopPropagation();
|
|
41519
|
+
openNewSessionDialog(project.id);
|
|
41305
41520
|
},
|
|
41306
41521
|
children: [
|
|
41307
|
-
|
|
41308
|
-
|
|
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
|
-
)
|
|
41522
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MessageCirclePlus, {}),
|
|
41523
|
+
t2("sidebar.newChat", "New Chat")
|
|
41325
41524
|
]
|
|
41326
41525
|
}
|
|
41327
41526
|
),
|
|
41328
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
41329
|
-
|
|
41330
|
-
|
|
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,
|
|
41527
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
41528
|
+
!isWebUI && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41529
|
+
ContextMenuItem,
|
|
41399
41530
|
{
|
|
41400
|
-
|
|
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) => {
|
|
41531
|
+
onClick: (e2) => {
|
|
41404
41532
|
e2.stopPropagation();
|
|
41533
|
+
void handleRevealProjectInFinder(project);
|
|
41405
41534
|
},
|
|
41406
|
-
children:
|
|
41407
|
-
(
|
|
41408
|
-
|
|
41409
|
-
|
|
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
|
-
] })
|
|
41535
|
+
children: [
|
|
41536
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, {}),
|
|
41537
|
+
t2("sidebar.revealInFinder")
|
|
41538
|
+
]
|
|
41437
41539
|
}
|
|
41438
41540
|
),
|
|
41439
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41440
|
-
|
|
41441
|
-
|
|
41442
|
-
{
|
|
41443
|
-
|
|
41444
|
-
|
|
41445
|
-
|
|
41446
|
-
|
|
41447
|
-
|
|
41448
|
-
|
|
41449
|
-
|
|
41450
|
-
|
|
41451
|
-
|
|
41452
|
-
|
|
41453
|
-
|
|
41454
|
-
|
|
41455
|
-
|
|
41456
|
-
|
|
41457
|
-
|
|
41458
|
-
|
|
41459
|
-
|
|
41460
|
-
|
|
41461
|
-
|
|
41462
|
-
|
|
41463
|
-
|
|
41464
|
-
|
|
41465
|
-
|
|
41466
|
-
|
|
41467
|
-
|
|
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")
|
|
41541
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41542
|
+
ContextMenuItem,
|
|
41543
|
+
{
|
|
41544
|
+
onClick: (e2) => {
|
|
41545
|
+
e2.stopPropagation();
|
|
41546
|
+
handleRenameProject(project);
|
|
41547
|
+
},
|
|
41548
|
+
children: [
|
|
41549
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, {}),
|
|
41550
|
+
t2("sidebar.rename")
|
|
41551
|
+
]
|
|
41552
|
+
}
|
|
41553
|
+
),
|
|
41554
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
41555
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41556
|
+
ContextMenuItem,
|
|
41557
|
+
{
|
|
41558
|
+
variant: "destructive",
|
|
41559
|
+
onClick: (e2) => {
|
|
41560
|
+
e2.stopPropagation();
|
|
41561
|
+
handleDeleteProject(project);
|
|
41562
|
+
},
|
|
41563
|
+
children: [
|
|
41564
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
|
|
41565
|
+
t2("sidebar.delete")
|
|
41566
|
+
]
|
|
41567
|
+
}
|
|
41568
|
+
)
|
|
41569
|
+
] })
|
|
41515
41570
|
]
|
|
41516
41571
|
}
|
|
41517
|
-
)
|
|
41518
|
-
|
|
41519
|
-
|
|
41520
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41521
|
-
Button,
|
|
41572
|
+
),
|
|
41573
|
+
expanded && projectSessions.map((session2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41574
|
+
ContextMenu,
|
|
41522
41575
|
{
|
|
41523
|
-
|
|
41524
|
-
|
|
41525
|
-
|
|
41526
|
-
|
|
41576
|
+
onOpenChange: (open2) => {
|
|
41577
|
+
setOpenSessionMenuId(
|
|
41578
|
+
(prev2) => open2 ? session2.id : prev2 === session2.id ? null : prev2
|
|
41579
|
+
);
|
|
41580
|
+
},
|
|
41527
41581
|
children: [
|
|
41528
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41529
|
-
|
|
41582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41583
|
+
ContextMenuTrigger,
|
|
41584
|
+
{
|
|
41585
|
+
render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
|
|
41586
|
+
onClick: () => handleSelectSession(session2),
|
|
41587
|
+
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" : ""}`,
|
|
41588
|
+
onContextMenu: (e2) => {
|
|
41589
|
+
e2.stopPropagation();
|
|
41590
|
+
},
|
|
41591
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
41592
|
+
(() => {
|
|
41593
|
+
const state2 = sessionStates.get(session2.id);
|
|
41594
|
+
const hasAskUser = (state2?.askUserRequests?.length ?? 0) > 0;
|
|
41595
|
+
const isStreaming = session2.isStreaming;
|
|
41596
|
+
const completedStatus = state2?.completedStatus;
|
|
41597
|
+
if (hasAskUser) {
|
|
41598
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { className: "size-3 shrink-0 text-sky-500" });
|
|
41599
|
+
}
|
|
41600
|
+
if (isStreaming) {
|
|
41601
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin shrink-0" });
|
|
41602
|
+
}
|
|
41603
|
+
if (completedStatus === "success" || state2?.completedAt && !completedStatus) {
|
|
41604
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 shrink-0 text-green-500" });
|
|
41605
|
+
}
|
|
41606
|
+
if (completedStatus === "error") {
|
|
41607
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-3 shrink-0 text-yellow-500" });
|
|
41608
|
+
}
|
|
41609
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-3 shrink-0" });
|
|
41610
|
+
})(),
|
|
41611
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41612
|
+
Badge,
|
|
41613
|
+
{
|
|
41614
|
+
variant: "outline",
|
|
41615
|
+
className: "px-1 -ml-0.5 text-[10px] uppercase max-w-15 truncate text-center leading-normal py-0 select-none",
|
|
41616
|
+
children: configuredAgents.find((a2) => a2.id === session2.agentId)?.id || session2.agentId
|
|
41617
|
+
}
|
|
41618
|
+
),
|
|
41619
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1 truncate leading-normal select-none", children: session2.title || t2("sidebar.newChat", "New Chat") }),
|
|
41620
|
+
activeIlinkSessionId === session2.id && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, { className: "size-3 shrink-0 text-green-500" })
|
|
41621
|
+
] })
|
|
41622
|
+
}
|
|
41623
|
+
),
|
|
41624
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { onClick: (e2) => e2.stopPropagation(), className: "w-auto", children: [
|
|
41625
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41626
|
+
ContextMenuItem,
|
|
41627
|
+
{
|
|
41628
|
+
onClick: (e2) => {
|
|
41629
|
+
e2.stopPropagation();
|
|
41630
|
+
handleRenameSession(session2);
|
|
41631
|
+
},
|
|
41632
|
+
children: [
|
|
41633
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, {}),
|
|
41634
|
+
t2("sidebar.rename")
|
|
41635
|
+
]
|
|
41636
|
+
}
|
|
41637
|
+
),
|
|
41638
|
+
ilinkStatus.connected && activeIlinkSessionId !== session2.id && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41639
|
+
ContextMenuItem,
|
|
41640
|
+
{
|
|
41641
|
+
onClick: (e2) => {
|
|
41642
|
+
e2.stopPropagation();
|
|
41643
|
+
request.setActiveIlinkSession({ sessionId: session2.id }).catch(() => {
|
|
41644
|
+
});
|
|
41645
|
+
},
|
|
41646
|
+
children: [
|
|
41647
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, {}),
|
|
41648
|
+
t2("sidebar.ilinkSetActive", "Set as WeChat Active")
|
|
41649
|
+
]
|
|
41650
|
+
}
|
|
41651
|
+
),
|
|
41652
|
+
ilinkStatus.connected && activeIlinkSessionId === session2.id && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41653
|
+
ContextMenuItem,
|
|
41654
|
+
{
|
|
41655
|
+
onClick: (e2) => {
|
|
41656
|
+
e2.stopPropagation();
|
|
41657
|
+
request.setActiveIlinkSession({ sessionId: "" }).catch(() => {
|
|
41658
|
+
});
|
|
41659
|
+
},
|
|
41660
|
+
children: [
|
|
41661
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, {}),
|
|
41662
|
+
t2("sidebar.ilinkUnsetActive", "Unset WeChat Active")
|
|
41663
|
+
]
|
|
41664
|
+
}
|
|
41665
|
+
),
|
|
41666
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
41667
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41668
|
+
ContextMenuItem,
|
|
41669
|
+
{
|
|
41670
|
+
variant: "destructive",
|
|
41671
|
+
onClick: (e2) => {
|
|
41672
|
+
e2.stopPropagation();
|
|
41673
|
+
void handleDeleteSession(session2);
|
|
41674
|
+
},
|
|
41675
|
+
children: [
|
|
41676
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
|
|
41677
|
+
t2("sidebar.delete")
|
|
41678
|
+
]
|
|
41679
|
+
}
|
|
41680
|
+
)
|
|
41681
|
+
] })
|
|
41530
41682
|
]
|
|
41531
|
-
}
|
|
41532
|
-
|
|
41533
|
-
|
|
41534
|
-
|
|
41683
|
+
},
|
|
41684
|
+
session2.id
|
|
41685
|
+
))
|
|
41686
|
+
] }, project.id);
|
|
41687
|
+
}) }) }),
|
|
41535
41688
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-auto border-t border-border", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41536
41689
|
Button,
|
|
41537
41690
|
{
|
|
@@ -41660,46 +41813,52 @@ function Sidebar() {
|
|
|
41660
41813
|
] }),
|
|
41661
41814
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
41662
41815
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("sidebar.newSessionDialog.mcp", { defaultValue: "MCP" }) }),
|
|
41663
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41664
|
-
|
|
41665
|
-
|
|
41666
|
-
|
|
41667
|
-
|
|
41668
|
-
|
|
41669
|
-
|
|
41670
|
-
|
|
41671
|
-
|
|
41672
|
-
|
|
41673
|
-
|
|
41674
|
-
|
|
41816
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41817
|
+
"div",
|
|
41818
|
+
{
|
|
41819
|
+
className: configuredMcpServers.length > 5 ? "grid grid-cols-2 gap-1" : "flex flex-col gap-1",
|
|
41820
|
+
children: [
|
|
41821
|
+
configuredMcpServers.map((mcp) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41822
|
+
"div",
|
|
41823
|
+
{
|
|
41824
|
+
className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7",
|
|
41825
|
+
children: [
|
|
41826
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41827
|
+
"div",
|
|
41828
|
+
{
|
|
41829
|
+
className: cn$5(
|
|
41830
|
+
"text-xs truncate",
|
|
41831
|
+
!newSessionMcpIds.has(mcp.id) ? "text-muted-foreground/50" : "text-muted-foreground"
|
|
41832
|
+
),
|
|
41833
|
+
title: mcp.id,
|
|
41834
|
+
children: mcp.id
|
|
41835
|
+
}
|
|
41675
41836
|
),
|
|
41676
|
-
|
|
41677
|
-
|
|
41678
|
-
|
|
41679
|
-
|
|
41680
|
-
|
|
41681
|
-
|
|
41682
|
-
|
|
41683
|
-
|
|
41684
|
-
|
|
41685
|
-
|
|
41686
|
-
|
|
41687
|
-
|
|
41688
|
-
|
|
41689
|
-
|
|
41690
|
-
|
|
41691
|
-
|
|
41692
|
-
|
|
41693
|
-
|
|
41694
|
-
|
|
41695
|
-
|
|
41696
|
-
|
|
41697
|
-
|
|
41698
|
-
|
|
41699
|
-
|
|
41700
|
-
|
|
41701
|
-
}) })
|
|
41702
|
-
] })
|
|
41837
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41838
|
+
Switch,
|
|
41839
|
+
{
|
|
41840
|
+
size: "sm",
|
|
41841
|
+
checked: newSessionMcpIds.has(mcp.id),
|
|
41842
|
+
onCheckedChange: (checked) => {
|
|
41843
|
+
setNewSessionMcpIds((prev2) => {
|
|
41844
|
+
const next2 = new Set(prev2);
|
|
41845
|
+
if (checked) next2.add(mcp.id);
|
|
41846
|
+
else next2.delete(mcp.id);
|
|
41847
|
+
return next2;
|
|
41848
|
+
});
|
|
41849
|
+
}
|
|
41850
|
+
}
|
|
41851
|
+
)
|
|
41852
|
+
]
|
|
41853
|
+
},
|
|
41854
|
+
mcp.id
|
|
41855
|
+
)),
|
|
41856
|
+
configuredMcpServers.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("sidebar.newSessionDialog.noMcp", {
|
|
41857
|
+
defaultValue: "No MCP servers configured"
|
|
41858
|
+
}) })
|
|
41859
|
+
]
|
|
41860
|
+
}
|
|
41861
|
+
)
|
|
41703
41862
|
] })
|
|
41704
41863
|
] }),
|
|
41705
41864
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(DialogFooter, { children: [
|
|
@@ -41790,7 +41949,7 @@ function SettingsLayout() {
|
|
|
41790
41949
|
{
|
|
41791
41950
|
to: tab2.href,
|
|
41792
41951
|
className: ({ isActive }) => cn$5(
|
|
41793
|
-
"flex items-center gap-2 rounded-md px-3 py-2 text-xs transition-colors",
|
|
41952
|
+
"flex items-center gap-2 rounded-md px-3 py-2 text-xs transition-colors cursor-default",
|
|
41794
41953
|
isActive ? "bg-accent text-accent-foreground font-medium" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
41795
41954
|
),
|
|
41796
41955
|
children: [
|
|
@@ -41804,6 +41963,34 @@ function SettingsLayout() {
|
|
|
41804
41963
|
] })
|
|
41805
41964
|
] });
|
|
41806
41965
|
}
|
|
41966
|
+
function Card({
|
|
41967
|
+
className,
|
|
41968
|
+
size: size2 = "default",
|
|
41969
|
+
...props
|
|
41970
|
+
}) {
|
|
41971
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41972
|
+
"div",
|
|
41973
|
+
{
|
|
41974
|
+
"data-slot": "card",
|
|
41975
|
+
"data-size": size2,
|
|
41976
|
+
className: cn$5(
|
|
41977
|
+
"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",
|
|
41978
|
+
className
|
|
41979
|
+
),
|
|
41980
|
+
...props
|
|
41981
|
+
}
|
|
41982
|
+
);
|
|
41983
|
+
}
|
|
41984
|
+
function CardContent({ className, ...props }) {
|
|
41985
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41986
|
+
"div",
|
|
41987
|
+
{
|
|
41988
|
+
"data-slot": "card-content",
|
|
41989
|
+
className: cn$5("px-3 pb-3", className),
|
|
41990
|
+
...props
|
|
41991
|
+
}
|
|
41992
|
+
);
|
|
41993
|
+
}
|
|
41807
41994
|
const PARTICLE_COUNT = 70;
|
|
41808
41995
|
const CONNECTION_DIST = 140;
|
|
41809
41996
|
const RIPPLE_MAX_RADIUS = 200;
|
|
@@ -41957,11 +42144,13 @@ function Welcome() {
|
|
|
41957
42144
|
const [tilt, setTilt] = reactExports.useState({ x: 0, y: 0 });
|
|
41958
42145
|
const agents = useAppStore((s16) => s16.configuredAgents);
|
|
41959
42146
|
const projects = useAppStore((s16) => s16.projects);
|
|
42147
|
+
const sessions = useAppStore((s16) => s16.sessions);
|
|
41960
42148
|
const setI18n2 = useAppStore((s16) => s16.setI18n);
|
|
41961
42149
|
const enabledAgentCount = reactExports.useMemo(() => agents.filter((a2) => !a2.disabled).length, [agents]);
|
|
41962
42150
|
const hasAgents = enabledAgentCount > 0;
|
|
41963
42151
|
const hasProjects = projects.length > 0;
|
|
41964
42152
|
const allDone = hasAgents && hasProjects;
|
|
42153
|
+
const showGuide = !allDone || projects.length <= 1 && sessions.length === 0;
|
|
41965
42154
|
const handleMouseMove = reactExports.useCallback((e2) => {
|
|
41966
42155
|
const rect2 = containerRef.current?.getBoundingClientRect();
|
|
41967
42156
|
if (!rect2) return;
|
|
@@ -41982,7 +42171,7 @@ function Welcome() {
|
|
|
41982
42171
|
children: [
|
|
41983
42172
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "absolute bottom-3 right-4 text-[11px] text-muted-foreground/40 z-10 pointer-events-none", children: [
|
|
41984
42173
|
"v",
|
|
41985
|
-
"0.1.
|
|
42174
|
+
"0.1.32"
|
|
41986
42175
|
] }),
|
|
41987
42176
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41988
42177
|
"div",
|
|
@@ -42025,48 +42214,50 @@ function Welcome() {
|
|
|
42025
42214
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
42026
42215
|
"p",
|
|
42027
42216
|
{
|
|
42028
|
-
className: "mt-2 max-w-md text-sm text-muted-foreground animate-text-fade-in",
|
|
42217
|
+
className: "mt-2 max-w-md text-sm text-muted-foreground animate-text-fade-in min-h-10",
|
|
42029
42218
|
style: { animationDelay: "0.6s", animationFillMode: "both" },
|
|
42030
42219
|
children: t2("welcome.desc")
|
|
42031
42220
|
}
|
|
42032
42221
|
)
|
|
42033
42222
|
] }),
|
|
42034
|
-
|
|
42035
|
-
|
|
42223
|
+
showGuide && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
42224
|
+
Card,
|
|
42036
42225
|
{
|
|
42037
|
-
|
|
42226
|
+
size: "sm",
|
|
42227
|
+
className: "relative z-10 w-100 bg-card/80 backdrop-blur-sm animate-text-fade-in",
|
|
42038
42228
|
style: { animationDelay: "0.8s", animationFillMode: "both" },
|
|
42039
|
-
children: [
|
|
42040
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
42041
|
-
|
|
42042
|
-
|
|
42043
|
-
|
|
42044
|
-
|
|
42045
|
-
|
|
42046
|
-
|
|
42047
|
-
|
|
42048
|
-
|
|
42049
|
-
|
|
42050
|
-
|
|
42051
|
-
|
|
42052
|
-
|
|
42053
|
-
|
|
42054
|
-
|
|
42055
|
-
|
|
42056
|
-
|
|
42057
|
-
|
|
42058
|
-
|
|
42229
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "flex flex-col gap-2.5 px-3 py-3", children: [
|
|
42230
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-3", children: [
|
|
42231
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-medium text-muted-foreground/90 uppercase tracking-wide", children: t2("welcome.getStarted") }),
|
|
42232
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
42233
|
+
Tabs,
|
|
42234
|
+
{
|
|
42235
|
+
value: i18n.language,
|
|
42236
|
+
onValueChange: (lang) => {
|
|
42237
|
+
if (!lang) return;
|
|
42238
|
+
setI18n2({ language: lang });
|
|
42239
|
+
i18n.changeLanguage(lang);
|
|
42240
|
+
request.updateSettings({ i18n: { language: lang } }).catch(() => {
|
|
42241
|
+
});
|
|
42242
|
+
},
|
|
42243
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { children: [
|
|
42244
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "en", className: "text-[11px] h-6 px-1.5", children: "English" }),
|
|
42245
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "zh-CN", className: "text-[11px] h-6 px-1.5", children: "简体中文" })
|
|
42246
|
+
] })
|
|
42247
|
+
}
|
|
42248
|
+
)
|
|
42249
|
+
] }),
|
|
42059
42250
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
42060
42251
|
"button",
|
|
42061
42252
|
{
|
|
42062
42253
|
type: "button",
|
|
42063
42254
|
onClick: () => !hasAgents && navigate("/settings/agents"),
|
|
42064
|
-
className: `flex items-center gap-3 rounded-lg border px-
|
|
42255
|
+
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
42256
|
children: [
|
|
42066
42257
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
42067
42258
|
"div",
|
|
42068
42259
|
{
|
|
42069
|
-
className: `flex size-
|
|
42260
|
+
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
42261
|
children: hasAgents ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Bot, { className: "size-3.5" })
|
|
42071
42262
|
}
|
|
42072
42263
|
),
|
|
@@ -42082,17 +42273,17 @@ function Welcome() {
|
|
|
42082
42273
|
{
|
|
42083
42274
|
type: "button",
|
|
42084
42275
|
onClick: () => {
|
|
42085
|
-
if (!hasProjects) {
|
|
42276
|
+
if (!hasProjects && hasAgents) {
|
|
42086
42277
|
window.dispatchEvent(new CustomEvent("fello:add-project"));
|
|
42087
42278
|
}
|
|
42088
42279
|
},
|
|
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
42280
|
disabled: !hasAgents,
|
|
42281
|
+
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
42282
|
children: [
|
|
42092
42283
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
42093
42284
|
"div",
|
|
42094
42285
|
{
|
|
42095
|
-
className: `flex size-
|
|
42286
|
+
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
42287
|
children: hasProjects ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FolderPlus, { className: "size-3.5" })
|
|
42097
42288
|
}
|
|
42098
42289
|
),
|
|
@@ -42104,11 +42295,25 @@ function Welcome() {
|
|
|
42104
42295
|
}
|
|
42105
42296
|
),
|
|
42106
42297
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
42107
|
-
"
|
|
42298
|
+
"button",
|
|
42108
42299
|
{
|
|
42109
|
-
|
|
42300
|
+
type: "button",
|
|
42301
|
+
onClick: () => {
|
|
42302
|
+
if (allDone) {
|
|
42303
|
+
const firstProject = projects[0];
|
|
42304
|
+
if (firstProject) {
|
|
42305
|
+
window.dispatchEvent(
|
|
42306
|
+
new CustomEvent("fello:new-session", {
|
|
42307
|
+
detail: { projectId: firstProject.id }
|
|
42308
|
+
})
|
|
42309
|
+
);
|
|
42310
|
+
}
|
|
42311
|
+
}
|
|
42312
|
+
},
|
|
42313
|
+
disabled: !allDone,
|
|
42314
|
+
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
42315
|
children: [
|
|
42111
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-
|
|
42316
|
+
/* @__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
42317
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
42113
42318
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium", children: t2("welcome.stepChat") }),
|
|
42114
42319
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[11px] text-muted-foreground mt-0.5", children: t2("welcome.stepChatDesc") })
|
|
@@ -42116,17 +42321,7 @@ function Welcome() {
|
|
|
42116
42321
|
]
|
|
42117
42322
|
}
|
|
42118
42323
|
)
|
|
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
|
-
]
|
|
42324
|
+
] })
|
|
42130
42325
|
}
|
|
42131
42326
|
)
|
|
42132
42327
|
]
|
|
@@ -68650,7 +68845,7 @@ var lr$2 = (e2) => {
|
|
|
68650
68845
|
for (; t2 > 0 && e2[t2 - 1] === `
|
|
68651
68846
|
`; ) t2--;
|
|
68652
68847
|
return e2.slice(0, t2);
|
|
68653
|
-
}, cr$1 = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-OFNGDK62-
|
|
68848
|
+
}, cr$1 = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-OFNGDK62-CrGFRrSX.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
68849
|
let i3 = y$9(), d2 = reactExports.useMemo(() => lr$2(e2), [e2]), c2 = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: d2.split(`
|
|
68655
68850
|
`).map((p3) => [{ content: p3, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [d2]);
|
|
68656
68851
|
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 +93686,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
93491
93686
|
registerLayoutLoaders([
|
|
93492
93687
|
{
|
|
93493
93688
|
name: "dagre",
|
|
93494
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-
|
|
93689
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-KV5264BT-DdjpmydK.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "loader")
|
|
93495
93690
|
},
|
|
93496
93691
|
...[
|
|
93497
93692
|
{
|
|
93498
93693
|
name: "cose-bilkent",
|
|
93499
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-
|
|
93694
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-DVrDSw12.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "loader")
|
|
93500
93695
|
}
|
|
93501
93696
|
]
|
|
93502
93697
|
]);
|
|
@@ -93952,7 +94147,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
93952
94147
|
}, "detector");
|
|
93953
94148
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
93954
94149
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
93955
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-
|
|
94150
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-Chff2Ong.js");
|
|
93956
94151
|
return { diagram: diagram22 };
|
|
93957
94152
|
}, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
|
|
93958
94153
|
return { id, diagram: diagram2 };
|
|
@@ -93972,7 +94167,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
93972
94167
|
}, "detector");
|
|
93973
94168
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
93974
94169
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
93975
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
94170
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYDqfzx3.js");
|
|
93976
94171
|
return { diagram: diagram22 };
|
|
93977
94172
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
93978
94173
|
return { id: id2, diagram: diagram2 };
|
|
@@ -93998,7 +94193,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
93998
94193
|
}, "detector");
|
|
93999
94194
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
94000
94195
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94001
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
94196
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYDqfzx3.js");
|
|
94002
94197
|
return { diagram: diagram22 };
|
|
94003
94198
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
94004
94199
|
return { id: id3, diagram: diagram2 };
|
|
@@ -94015,7 +94210,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
94015
94210
|
}, "detector");
|
|
94016
94211
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
94017
94212
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94018
|
-
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-
|
|
94213
|
+
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-BciRZ0dO.js");
|
|
94019
94214
|
return { diagram: diagram22 };
|
|
94020
94215
|
}, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
|
|
94021
94216
|
return { id: id4, diagram: diagram2 };
|
|
@@ -94032,7 +94227,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
94032
94227
|
}, "detector");
|
|
94033
94228
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
94034
94229
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94035
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-
|
|
94230
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-BadxOCq2.js");
|
|
94036
94231
|
return { diagram: diagram22 };
|
|
94037
94232
|
}, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
|
|
94038
94233
|
return { id: id5, diagram: diagram2 };
|
|
@@ -94049,7 +94244,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
94049
94244
|
}, "detector");
|
|
94050
94245
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
94051
94246
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94052
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-
|
|
94247
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-CRhxy6fZ.js");
|
|
94053
94248
|
return { diagram: diagram22 };
|
|
94054
94249
|
}, true ? __vite__mapDeps([20,21,22,23]) : void 0, import.meta.url);
|
|
94055
94250
|
return { id: id6, diagram: diagram2 };
|
|
@@ -94066,7 +94261,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
94066
94261
|
}, "detector");
|
|
94067
94262
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
94068
94263
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94069
|
-
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-
|
|
94264
|
+
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-DLMGtQF0.js");
|
|
94070
94265
|
return { diagram: diagram22 };
|
|
94071
94266
|
}, true ? __vite__mapDeps([24,19,4,2]) : void 0, import.meta.url);
|
|
94072
94267
|
return { id: id7, diagram: diagram2 };
|
|
@@ -94082,7 +94277,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
94082
94277
|
}, "detector");
|
|
94083
94278
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
94084
94279
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94085
|
-
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-
|
|
94280
|
+
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-n1UTGYDH.js");
|
|
94086
94281
|
return { diagram: diagram22 };
|
|
94087
94282
|
}, true ? __vite__mapDeps([25,17,19,4,2,26,27,22]) : void 0, import.meta.url);
|
|
94088
94283
|
return { id: id8, diagram: diagram2 };
|
|
@@ -94098,7 +94293,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
94098
94293
|
}, "detector");
|
|
94099
94294
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
94100
94295
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94101
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-
|
|
94296
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-DXaOIoV-.js");
|
|
94102
94297
|
return { diagram: diagram22 };
|
|
94103
94298
|
}, true ? __vite__mapDeps([28,21,22,23]) : void 0, import.meta.url);
|
|
94104
94299
|
return { id: id9, diagram: diagram2 };
|
|
@@ -94115,7 +94310,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
94115
94310
|
}, "detector");
|
|
94116
94311
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
94117
94312
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94118
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-
|
|
94313
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-BrCeeMZz.js");
|
|
94119
94314
|
return { diagram: diagram22 };
|
|
94120
94315
|
}, true ? __vite__mapDeps([29,22,27,21,23]) : void 0, import.meta.url);
|
|
94121
94316
|
return { id: id10, diagram: diagram2 };
|
|
@@ -94132,7 +94327,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
94132
94327
|
}, "detector");
|
|
94133
94328
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
94134
94329
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94135
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-
|
|
94330
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-CTmWVt-P.js");
|
|
94136
94331
|
return { diagram: diagram22 };
|
|
94137
94332
|
}, true ? __vite__mapDeps([30,12,13]) : void 0, import.meta.url);
|
|
94138
94333
|
return { id: id11, diagram: diagram2 };
|
|
@@ -94149,7 +94344,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
94149
94344
|
}, "detector");
|
|
94150
94345
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
94151
94346
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94152
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-
|
|
94347
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-C5v5_yv_.js");
|
|
94153
94348
|
return { diagram: diagram22 };
|
|
94154
94349
|
}, true ? __vite__mapDeps([31,9,18]) : void 0, import.meta.url);
|
|
94155
94350
|
return { id: id12, diagram: diagram2 };
|
|
@@ -94169,7 +94364,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94169
94364
|
}, "detector");
|
|
94170
94365
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
94171
94366
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94172
|
-
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-
|
|
94367
|
+
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-pm-iptmM.js");
|
|
94173
94368
|
return { diagram: diagram22 };
|
|
94174
94369
|
}, true ? __vite__mapDeps([32,33,11,9,12,13]) : void 0, import.meta.url);
|
|
94175
94370
|
return { id: id13, diagram: diagram2 };
|
|
@@ -94189,7 +94384,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94189
94384
|
}, "detector");
|
|
94190
94385
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
94191
94386
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94192
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-
|
|
94387
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-pm-iptmM.js");
|
|
94193
94388
|
return { diagram: diagram22 };
|
|
94194
94389
|
}, true ? __vite__mapDeps([34,33,11,9,12,13]) : void 0, import.meta.url);
|
|
94195
94390
|
return { id: id14, diagram: diagram2 };
|
|
@@ -94209,7 +94404,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94209
94404
|
}, "detector");
|
|
94210
94405
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
94211
94406
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94212
|
-
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-
|
|
94407
|
+
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-D6Vd4_MM.js");
|
|
94213
94408
|
return { diagram: diagram22 };
|
|
94214
94409
|
}, true ? __vite__mapDeps([35,36,12,13,1,2,3,4]) : void 0, import.meta.url);
|
|
94215
94410
|
return { id: id15, diagram: diagram2 };
|
|
@@ -94232,7 +94427,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94232
94427
|
}, "detector");
|
|
94233
94428
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
94234
94429
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94235
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-
|
|
94430
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-De00f0TU.js");
|
|
94236
94431
|
return { diagram: diagram22 };
|
|
94237
94432
|
}, true ? __vite__mapDeps([37,36,12,13]) : void 0, import.meta.url);
|
|
94238
94433
|
return { id: id16, diagram: diagram2 };
|
|
@@ -94249,7 +94444,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
94249
94444
|
}, "detector");
|
|
94250
94445
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
94251
94446
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94252
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-
|
|
94447
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-567Gpkxf.js");
|
|
94253
94448
|
return { diagram: diagram22 };
|
|
94254
94449
|
}, true ? __vite__mapDeps([38,11,9,26]) : void 0, import.meta.url);
|
|
94255
94450
|
return { id: id17, diagram: diagram2 };
|
|
@@ -94319,7 +94514,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
94319
94514
|
}, "detector");
|
|
94320
94515
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
94321
94516
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94322
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
94517
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYDqfzx3.js");
|
|
94323
94518
|
return { diagram: diagram22 };
|
|
94324
94519
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
94325
94520
|
return { id: id18, diagram: diagram2 };
|
|
@@ -94336,7 +94531,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
94336
94531
|
}, "detector");
|
|
94337
94532
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
94338
94533
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94339
|
-
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-
|
|
94534
|
+
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-DxOCmdWf.js");
|
|
94340
94535
|
return { diagram: diagram22 };
|
|
94341
94536
|
}, true ? __vite__mapDeps([39,26]) : void 0, import.meta.url);
|
|
94342
94537
|
return { id: id19, diagram: diagram2 };
|
|
@@ -94353,7 +94548,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
94353
94548
|
}, "detector");
|
|
94354
94549
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
94355
94550
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94356
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-
|
|
94551
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-BtxeumQc.js");
|
|
94357
94552
|
return { diagram: diagram22 };
|
|
94358
94553
|
}, true ? __vite__mapDeps([40,12,13]) : void 0, import.meta.url);
|
|
94359
94554
|
return { id: id20, diagram: diagram2 };
|
|
@@ -94370,7 +94565,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
94370
94565
|
}, "detector");
|
|
94371
94566
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
94372
94567
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94373
|
-
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-
|
|
94568
|
+
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-DPjxCDrA.js");
|
|
94374
94569
|
return { diagram: diagram22 };
|
|
94375
94570
|
}, true ? __vite__mapDeps([41,11]) : void 0, import.meta.url);
|
|
94376
94571
|
return { id: id21, diagram: diagram2 };
|
|
@@ -94387,7 +94582,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
94387
94582
|
}, "detector");
|
|
94388
94583
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
94389
94584
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94390
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-
|
|
94585
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-BXOndA46.js");
|
|
94391
94586
|
return { diagram: diagram22 };
|
|
94392
94587
|
}, true ? __vite__mapDeps([42,27,22]) : void 0, import.meta.url);
|
|
94393
94588
|
return { id: id22, diagram: diagram2 };
|
|
@@ -94404,7 +94599,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
94404
94599
|
}, "detector");
|
|
94405
94600
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
94406
94601
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94407
|
-
const { diagram: diagram22 } = await import("./diagram-TYMM5635-
|
|
94602
|
+
const { diagram: diagram22 } = await import("./diagram-TYMM5635-tf8FuJg1.js");
|
|
94408
94603
|
return { diagram: diagram22 };
|
|
94409
94604
|
}, true ? __vite__mapDeps([43,17,19,4,2]) : void 0, import.meta.url);
|
|
94410
94605
|
return { id: id23, diagram: diagram2 };
|
|
@@ -94420,7 +94615,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
94420
94615
|
}, "detector");
|
|
94421
94616
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
94422
94617
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94423
|
-
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-
|
|
94618
|
+
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-40ryNdvI.js");
|
|
94424
94619
|
return { diagram: diagram22 };
|
|
94425
94620
|
}, true ? __vite__mapDeps([44,17,19,4,2]) : void 0, import.meta.url);
|
|
94426
94621
|
return { id: id24, diagram: diagram2 };
|
|
@@ -94436,7 +94631,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
94436
94631
|
}, "detector");
|
|
94437
94632
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
94438
94633
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94439
|
-
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-
|
|
94634
|
+
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-DUXfUO2U.js");
|
|
94440
94635
|
return { diagram: diagram22 };
|
|
94441
94636
|
}, true ? __vite__mapDeps([45,11,5,1,2,14]) : void 0, import.meta.url);
|
|
94442
94637
|
return { id: id25, diagram: diagram2 };
|
|
@@ -94453,7 +94648,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
94453
94648
|
}, "detector");
|
|
94454
94649
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
94455
94650
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94456
|
-
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-
|
|
94651
|
+
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-CdTSROj9.js");
|
|
94457
94652
|
return { diagram: diagram22 };
|
|
94458
94653
|
}, true ? __vite__mapDeps([46,17,18,19,4,2]) : void 0, import.meta.url);
|
|
94459
94654
|
return { id: id26, diagram: diagram2 };
|
|
@@ -94470,7 +94665,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
94470
94665
|
}, "detector");
|
|
94471
94666
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
94472
94667
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94473
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-
|
|
94668
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-k4E5eOG6.js");
|
|
94474
94669
|
return { diagram: diagram22 };
|
|
94475
94670
|
}, true ? __vite__mapDeps([47,17,19,4,2,7]) : void 0, import.meta.url);
|
|
94476
94671
|
return { id: id27, diagram: diagram2 };
|
|
@@ -94487,7 +94682,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
94487
94682
|
}, "detector");
|
|
94488
94683
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
94489
94684
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94490
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-
|
|
94685
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-D8djsZeF.js");
|
|
94491
94686
|
return { diagram: diagram22 };
|
|
94492
94687
|
}, true ? [] : void 0, import.meta.url);
|
|
94493
94688
|
return { id: id28, diagram: diagram2 };
|
|
@@ -94503,7 +94698,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
94503
94698
|
}, "detector");
|
|
94504
94699
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
94505
94700
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94506
|
-
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-
|
|
94701
|
+
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-VNGucDZS.js");
|
|
94507
94702
|
return { diagram: diagram22 };
|
|
94508
94703
|
}, true ? [] : void 0, import.meta.url);
|
|
94509
94704
|
return { id: id29, diagram: diagram2 };
|
|
@@ -94520,7 +94715,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
94520
94715
|
}, "detector");
|
|
94521
94716
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
94522
94717
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94523
|
-
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-
|
|
94718
|
+
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-DQ1x-vhi.js");
|
|
94524
94719
|
return { diagram: diagram22 };
|
|
94525
94720
|
}, true ? __vite__mapDeps([48,13,17,19,4,2,23,27,22]) : void 0, import.meta.url);
|
|
94526
94721
|
return { id: id30, diagram: diagram2 };
|
|
@@ -94536,7 +94731,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
|
|
|
94536
94731
|
}, "detector");
|
|
94537
94732
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
94538
94733
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94539
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-
|
|
94734
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-BqldBvm5.js");
|
|
94540
94735
|
return { diagram: diagram22 };
|
|
94541
94736
|
}, true ? __vite__mapDeps([49,17,19,4,2]) : void 0, import.meta.url);
|
|
94542
94737
|
return { id: id31, diagram: diagram2 };
|
|
@@ -132021,6 +132216,25 @@ function TableHead({ className, ...props }) {
|
|
|
132021
132216
|
function TableCell({ className, ...props }) {
|
|
132022
132217
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: cn$5("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props });
|
|
132023
132218
|
}
|
|
132219
|
+
function buildImageRehypePlugins(transformSrc) {
|
|
132220
|
+
const { raw: raw2, sanitize: sanitize2, harden: harden2 } = xt$2;
|
|
132221
|
+
const [sanitizePlugin, sanitizeSchema] = sanitize2;
|
|
132222
|
+
const protocols = sanitizeSchema.protocols;
|
|
132223
|
+
const extendedSchema = {
|
|
132224
|
+
...sanitizeSchema,
|
|
132225
|
+
protocols: { ...protocols, src: [...protocols.src || [], "web"] }
|
|
132226
|
+
};
|
|
132227
|
+
const rehypeResolveImages = () => (tree) => {
|
|
132228
|
+
const walk = (node2) => {
|
|
132229
|
+
if (node2.type === "element" && node2.tagName === "img" && node2.properties?.src) {
|
|
132230
|
+
node2.properties.src = transformSrc(node2.properties.src);
|
|
132231
|
+
}
|
|
132232
|
+
if (node2.children) node2.children.forEach(walk);
|
|
132233
|
+
};
|
|
132234
|
+
walk(tree);
|
|
132235
|
+
};
|
|
132236
|
+
return [raw2, [sanitizePlugin, extendedSchema], rehypeResolveImages, harden2];
|
|
132237
|
+
}
|
|
132024
132238
|
function CodeBlock({
|
|
132025
132239
|
language,
|
|
132026
132240
|
highlightLang,
|
|
@@ -132101,14 +132315,38 @@ const components = {
|
|
|
132101
132315
|
tbody: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableBody, { ...props, className, children: children2 }),
|
|
132102
132316
|
tr: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableRow, { ...props, className: cn$5(className, "border-border"), children: children2 }),
|
|
132103
132317
|
th: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { ...props, className: cn$5(className, "py-2"), children: children2 }),
|
|
132104
|
-
td: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { ...props, className, children: children2 })
|
|
132318
|
+
td: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { ...props, className, children: children2 }),
|
|
132319
|
+
img: ({ node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full rounded-sm overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { ...props, className: "max-w-full m-auto" }) })
|
|
132105
132320
|
};
|
|
132106
132321
|
function StreamMarkdown({
|
|
132107
132322
|
className,
|
|
132108
132323
|
children: children2,
|
|
132109
132324
|
isStreaming,
|
|
132110
|
-
forceBreaks
|
|
132325
|
+
forceBreaks,
|
|
132326
|
+
imageSource,
|
|
132327
|
+
onLinkClick
|
|
132111
132328
|
}) {
|
|
132329
|
+
const rehypePlugins = reactExports.useMemo(() => {
|
|
132330
|
+
if (!imageSource) return void 0;
|
|
132331
|
+
return buildImageRehypePlugins(imageSource);
|
|
132332
|
+
}, [imageSource]);
|
|
132333
|
+
const resolvedComponents = reactExports.useMemo(() => {
|
|
132334
|
+
if (!onLinkClick) return components;
|
|
132335
|
+
return {
|
|
132336
|
+
...components,
|
|
132337
|
+
a: ({ href, children: children22, node: _node, ...props }) => {
|
|
132338
|
+
if (href && !/^(https?:|data:|#|mailto:|blob:|web:)/.test(href)) {
|
|
132339
|
+
const handleClick = (e2) => {
|
|
132340
|
+
if (onLinkClick(href, e2) === false) {
|
|
132341
|
+
e2.preventDefault();
|
|
132342
|
+
}
|
|
132343
|
+
};
|
|
132344
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href, onClick: handleClick, ...props, children: children22 });
|
|
132345
|
+
}
|
|
132346
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noopener noreferrer", ...props, children: children22 });
|
|
132347
|
+
}
|
|
132348
|
+
};
|
|
132349
|
+
}, [onLinkClick]);
|
|
132112
132350
|
const remarkPlugins = reactExports.useMemo(() => {
|
|
132113
132351
|
return forceBreaks ? [remarkBreaks] : void 0;
|
|
132114
132352
|
}, [forceBreaks]);
|
|
@@ -132130,12 +132368,13 @@ function StreamMarkdown({
|
|
|
132130
132368
|
Qs$1,
|
|
132131
132369
|
{
|
|
132132
132370
|
plugins: { mermaid: f$5, math: h$4, cjk: A$4 },
|
|
132133
|
-
components,
|
|
132371
|
+
components: resolvedComponents,
|
|
132134
132372
|
shikiTheme: ["github-light", "github-dark"],
|
|
132135
132373
|
isAnimating: isStreaming,
|
|
132136
132374
|
animated: { sep: "char" },
|
|
132137
132375
|
linkSafety: { enabled: false },
|
|
132138
132376
|
remarkPlugins,
|
|
132377
|
+
rehypePlugins,
|
|
132139
132378
|
controls: {
|
|
132140
132379
|
table: { fullscreen: false },
|
|
132141
132380
|
mermaid: { fullscreen: false }
|
|
@@ -132179,7 +132418,7 @@ const typographyClasses = {
|
|
|
132179
132418
|
agent_message: cn$5(
|
|
132180
132419
|
baseClasses$1,
|
|
132181
132420
|
"prose prose-sm dark:prose-invert",
|
|
132182
|
-
"prose-p:leading-normal prose-p:text-foreground/
|
|
132421
|
+
"prose-p:leading-normal prose-p:text-foreground/80 prose-p:my-2 prose-p:text-[13px]",
|
|
132183
132422
|
"prose-headings:text-foreground prose-headings:font-medium prose-headings:mt-2.5 prose-headings:mb-1",
|
|
132184
132423
|
"prose-h1:text-[15px] prose-h2:text-[14px] prose-h3:text-[13px] prose-h4:text-[12px] prose-h5:text-[12px] prose-h6:text-[11px]",
|
|
132185
132424
|
"prose-strong:text-foreground prose-strong:font-medium",
|
|
@@ -132223,24 +132462,6 @@ const TextBlock = reactExports.memo(function TextBlock2({
|
|
|
132223
132462
|
}
|
|
132224
132463
|
) });
|
|
132225
132464
|
});
|
|
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
132465
|
const ImageBlock = reactExports.memo(function ImageBlock2({
|
|
132245
132466
|
block,
|
|
132246
132467
|
role: _role,
|
|
@@ -132355,7 +132576,7 @@ const TextResourceBlock = reactExports.memo(function TextResourceBlock2({
|
|
|
132355
132576
|
{
|
|
132356
132577
|
render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
|
|
132357
132578
|
nativeButton: false,
|
|
132358
|
-
className: "flex h-8
|
|
132579
|
+
className: "flex h-8 items-center gap-1 py-1 px-2 hover:bg-muted/50 select-none",
|
|
132359
132580
|
children: [
|
|
132360
132581
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "size-3.5 text-blue-400 shrink-0" }),
|
|
132361
132582
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium min-w-40 truncate flex-1", children: getBasename(resource.uri) }),
|
|
@@ -132982,7 +133203,7 @@ const ThinkingBubble = reactExports.memo(function ThinkingBubble2({
|
|
|
132982
133203
|
open: open2,
|
|
132983
133204
|
onOpenChange: setOpen,
|
|
132984
133205
|
children: [
|
|
132985
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(CollapsibleTrigger, { className: "w-full bg-transparent border-0
|
|
133206
|
+
/* @__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
133207
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Lightbulb, { className: `size-3.5 ${isStreaming ? "animate-pulse" : ""}` }),
|
|
132987
133208
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isStreaming ? t2("thinkingBubble.thinking", "Thinking...") : t2("thinkingBubble.thought", "Thought") })
|
|
132988
133209
|
] }),
|
|
@@ -133184,7 +133405,7 @@ const PlanBubble = reactExports.memo(function PlanBubble2({
|
|
|
133184
133405
|
),
|
|
133185
133406
|
defaultOpen: true,
|
|
133186
133407
|
children: [
|
|
133187
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(CollapsibleTrigger, { className: "w-full bg-transparent border-0 flex
|
|
133408
|
+
/* @__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
133409
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Notebook, { className: "size-3 text-muted-foreground" }),
|
|
133189
133410
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-foreground", children: t2("planBubble.title") }) }),
|
|
133190
133411
|
total > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-muted-foreground", children: t2("planBubble.summary", { completed, total }) })
|
|
@@ -137026,6 +137247,44 @@ function ChatInput({ session: session2 }) {
|
|
|
137026
137247
|
const isStreaming = session2.isStreaming;
|
|
137027
137248
|
const availableModels = session2.models?.availableModels ?? [];
|
|
137028
137249
|
const currentModelId = session2.models?.currentModelId ?? null;
|
|
137250
|
+
const groupedModels = reactExports.useMemo(() => {
|
|
137251
|
+
const groups = /* @__PURE__ */ new Map();
|
|
137252
|
+
for (const m2 of availableModels) {
|
|
137253
|
+
const slashIdx = m2.name.indexOf("/");
|
|
137254
|
+
const key2 = slashIdx > 0 ? m2.name.slice(0, slashIdx) : "";
|
|
137255
|
+
if (!groups.has(key2)) groups.set(key2, []);
|
|
137256
|
+
groups.get(key2).push(m2);
|
|
137257
|
+
}
|
|
137258
|
+
return groups;
|
|
137259
|
+
}, [availableModels]);
|
|
137260
|
+
const handleModelChange = reactExports.useCallback(async (modelId) => {
|
|
137261
|
+
const sid = session2.id;
|
|
137262
|
+
if (!sid) return;
|
|
137263
|
+
useAppStore.getState().updateSession({
|
|
137264
|
+
...session2,
|
|
137265
|
+
models: { ...session2.models, currentModelId: modelId }
|
|
137266
|
+
});
|
|
137267
|
+
try {
|
|
137268
|
+
await request.setModel({ sessionId: sid, modelId });
|
|
137269
|
+
} catch (err) {
|
|
137270
|
+
console.error("Failed to set model:", err);
|
|
137271
|
+
useAppStore.getState().updateSession(session2);
|
|
137272
|
+
}
|
|
137273
|
+
}, [session2]);
|
|
137274
|
+
const handleModeChange = reactExports.useCallback(async (modeId) => {
|
|
137275
|
+
const sid = session2.id;
|
|
137276
|
+
if (!sid) return;
|
|
137277
|
+
useAppStore.getState().updateSession({
|
|
137278
|
+
...session2,
|
|
137279
|
+
modes: { ...session2.modes, currentModeId: modeId }
|
|
137280
|
+
});
|
|
137281
|
+
try {
|
|
137282
|
+
await request.setMode({ sessionId: sid, modeId });
|
|
137283
|
+
} catch (err) {
|
|
137284
|
+
console.error("Failed to set mode:", err);
|
|
137285
|
+
useAppStore.getState().updateSession(session2);
|
|
137286
|
+
}
|
|
137287
|
+
}, [session2]);
|
|
137029
137288
|
const availableModes = session2.modes?.availableModes ?? [];
|
|
137030
137289
|
const currentModeId = session2.modes?.currentModeId ?? null;
|
|
137031
137290
|
const initializeInfo = session2.initializeInfo;
|
|
@@ -137455,7 +137714,7 @@ function ChatInput({ session: session2 }) {
|
|
|
137455
137714
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
137456
137715
|
HoverCardTrigger,
|
|
137457
137716
|
{
|
|
137458
|
-
render: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex
|
|
137717
|
+
render: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-muted-foreground hover:text-foreground", children: [
|
|
137459
137718
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Image$1, { className: "size-3.5" }),
|
|
137460
137719
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "max-w-25 truncate", children: att.filename })
|
|
137461
137720
|
] })
|
|
@@ -137589,38 +137848,25 @@ function ChatInput({ session: session2 }) {
|
|
|
137589
137848
|
},
|
|
137590
137849
|
children: [
|
|
137591
137850
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
137592
|
-
availableModes.length > 0 && /* @__PURE__ */ jsxRuntimeExports.
|
|
137593
|
-
|
|
137594
|
-
|
|
137595
|
-
|
|
137596
|
-
|
|
137597
|
-
|
|
137598
|
-
|
|
137599
|
-
|
|
137600
|
-
|
|
137601
|
-
|
|
137602
|
-
|
|
137603
|
-
|
|
137604
|
-
|
|
137605
|
-
|
|
137606
|
-
|
|
137607
|
-
|
|
137608
|
-
|
|
137609
|
-
|
|
137610
|
-
|
|
137611
|
-
console.error("Failed to set mode:", err);
|
|
137612
|
-
useAppStore.getState().updateSession(session2);
|
|
137613
|
-
}
|
|
137614
|
-
},
|
|
137615
|
-
children: [
|
|
137616
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { size: "sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: t2("chatInput.mode", "Mode") }) }),
|
|
137617
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { alignItemWithTrigger: false, className: "w-60", children: availableModes.map((mode) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: mode.id, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-col gap-1 whitespace-normal", children: [
|
|
137618
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: mode.name }),
|
|
137619
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "wrap-break-word text-[10px] text-muted-foreground/60 line-clamp-2", children: mode.description })
|
|
137620
|
-
] }) }, mode.id)) })
|
|
137621
|
-
]
|
|
137622
|
-
}
|
|
137623
|
-
) }),
|
|
137851
|
+
availableModes.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
|
|
137852
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
137853
|
+
DropdownMenuTrigger,
|
|
137854
|
+
{
|
|
137855
|
+
render: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", className: "h-7 text-xs text-muted-foreground hover:text-foreground gap-1 max-w-48" }),
|
|
137856
|
+
children: [
|
|
137857
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: availableModes.find((m2) => m2.id === currentModeId)?.name ?? t2("chatInput.mode", "Mode") }),
|
|
137858
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-3 opacity-60 shrink-0" })
|
|
137859
|
+
]
|
|
137860
|
+
}
|
|
137861
|
+
),
|
|
137862
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuContent, { align: "start", className: "w-auto! max-h-none! max-w-60 min-w-(--anchor-width)", children: availableModes.map((mode) => /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => handleModeChange(mode.id), className: "gap-2", children: [
|
|
137863
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: `size-3 shrink-0 ${mode.id === currentModeId ? "opacity-100" : "opacity-0"}` }),
|
|
137864
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pr-3", children: [
|
|
137865
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: mode.name }),
|
|
137866
|
+
mode.description && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-muted-foreground/60 line-clamp-2", children: mode.description })
|
|
137867
|
+
] })
|
|
137868
|
+
] }, mode.id)) })
|
|
137869
|
+
] }),
|
|
137624
137870
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
|
137625
137871
|
initializeInfo?.agentCapabilities?.promptCapabilities?.embeddedContext || initializeInfo?.agentCapabilities?.promptCapabilities?.image ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
137626
137872
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -137682,38 +137928,45 @@ function ChatInput({ session: session2 }) {
|
|
|
137682
137928
|
] })
|
|
137683
137929
|
] }),
|
|
137684
137930
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
137685
|
-
availableModels.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
137686
|
-
|
|
137687
|
-
|
|
137688
|
-
|
|
137689
|
-
|
|
137690
|
-
|
|
137691
|
-
|
|
137692
|
-
|
|
137693
|
-
|
|
137694
|
-
|
|
137695
|
-
|
|
137696
|
-
|
|
137697
|
-
|
|
137698
|
-
|
|
137699
|
-
|
|
137700
|
-
|
|
137701
|
-
|
|
137702
|
-
|
|
137703
|
-
|
|
137704
|
-
|
|
137705
|
-
|
|
137706
|
-
|
|
137707
|
-
|
|
137708
|
-
|
|
137709
|
-
|
|
137710
|
-
|
|
137711
|
-
|
|
137712
|
-
|
|
137713
|
-
|
|
137714
|
-
|
|
137715
|
-
|
|
137716
|
-
|
|
137931
|
+
availableModels.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
|
|
137932
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
137933
|
+
DropdownMenuTrigger,
|
|
137934
|
+
{
|
|
137935
|
+
render: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", className: "h-7 text-xs text-muted-foreground hover:text-foreground gap-1 max-w-48" }),
|
|
137936
|
+
children: [
|
|
137937
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: availableModels.find((m2) => m2.modelId === currentModelId)?.name ?? t2("chatInput.selectModel", "Select model") }),
|
|
137938
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-3 opacity-60 shrink-0" })
|
|
137939
|
+
]
|
|
137940
|
+
}
|
|
137941
|
+
),
|
|
137942
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuContent, { align: "end", className: "w-auto! max-h-none! max-w-64 min-w-(--anchor-width)", children: groupedModels.size <= 1 ? availableModels.map((m2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => handleModelChange(m2.modelId), className: "gap-2", children: [
|
|
137943
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: `size-3 shrink-0 ${m2.modelId === currentModelId ? "opacity-100" : "opacity-0"}` }),
|
|
137944
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pr-3", children: [
|
|
137945
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: m2.name }),
|
|
137946
|
+
m2.description && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-muted-foreground/60 line-clamp-2", children: m2.description })
|
|
137947
|
+
] })
|
|
137948
|
+
] }, m2.modelId)) : Array.from(groupedModels.entries()).map(
|
|
137949
|
+
([group, models]) => group ? /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuSub, { children: [
|
|
137950
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
|
|
137951
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: `size-3 shrink-0 ${models.some((m2) => m2.modelId === currentModelId) ? "opacity-100" : "opacity-0"}` }),
|
|
137952
|
+
group
|
|
137953
|
+
] }),
|
|
137954
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuSubContent, { className: "max-h-80 overflow-y-auto min-w-40", children: models.map((m2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => handleModelChange(m2.modelId), className: "gap-2", children: [
|
|
137955
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: `size-3 shrink-0 ${m2.modelId === currentModelId ? "opacity-100" : "opacity-0"}` }),
|
|
137956
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pr-3", children: [
|
|
137957
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: m2.name.slice(group.length + 1) }),
|
|
137958
|
+
m2.description && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-muted-foreground/60 line-clamp-2", children: m2.description })
|
|
137959
|
+
] })
|
|
137960
|
+
] }, m2.modelId)) })
|
|
137961
|
+
] }, group) : models.map((m2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => handleModelChange(m2.modelId), className: "gap-2", children: [
|
|
137962
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: `size-3 shrink-0 ${m2.modelId === currentModelId ? "opacity-100" : "opacity-0"}` }),
|
|
137963
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pr-3", children: [
|
|
137964
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: m2.name }),
|
|
137965
|
+
m2.description && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-muted-foreground/60 line-clamp-2", children: m2.description })
|
|
137966
|
+
] })
|
|
137967
|
+
] }, m2.modelId))
|
|
137968
|
+
) })
|
|
137969
|
+
] }) : null,
|
|
137717
137970
|
isStreaming ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
137718
137971
|
Button,
|
|
137719
137972
|
{
|
|
@@ -137931,6 +138184,7 @@ function AskUserOptions({
|
|
|
137931
138184
|
}).then(() => onResolved());
|
|
137932
138185
|
};
|
|
137933
138186
|
const handleKeyDown = (e2) => {
|
|
138187
|
+
if (e2.nativeEvent.isComposing) return;
|
|
137934
138188
|
if (e2.key === "Enter" && !e2.shiftKey) {
|
|
137935
138189
|
e2.preventDefault();
|
|
137936
138190
|
handleSubmitInput();
|
|
@@ -137994,7 +138248,7 @@ function AskUserOptions({
|
|
|
137994
138248
|
onChange: (e2) => setInputValue(e2.target.value),
|
|
137995
138249
|
onKeyDown: handleKeyDown,
|
|
137996
138250
|
placeholder: t2("askUser.inputPlaceholder", "Type your response... (Enter to send)"),
|
|
137997
|
-
className: "min-h-19 max-h-50 block resize-none border-none shadow-none focus-visible:ring-0 leading-relaxed p-2 pb-8 text-foreground/80 placeholder:text-muted-foreground/50 break-all",
|
|
138251
|
+
className: "min-h-19 text-xs! max-h-50 block resize-none border-none shadow-none focus-visible:ring-0 leading-relaxed p-2 pb-8 text-foreground/80 placeholder:text-muted-foreground/50 break-all",
|
|
137998
138252
|
autoFocus: true
|
|
137999
138253
|
}
|
|
138000
138254
|
),
|
|
@@ -138043,14 +138297,14 @@ function FileViewTabs({ viewMode, viewModes, onViewModeChange }) {
|
|
|
138043
138297
|
if (viewModes.length <= 1) return null;
|
|
138044
138298
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-4 left-0 right-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs, { value: viewMode, onValueChange: (v4) => onViewModeChange(v4), children: /* @__PURE__ */ jsxRuntimeExports.jsx(TabsList, { className: "h-8 border border-border shadow-lg", children: viewModes.map((mode) => /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: mode, className: "text-xs min-w-18", children: mode === "preview" ? t2("fileDetail.preview") : mode === "code" ? t2("fileDetail.code") : t2("fileDetail.compare") }, mode)) }) }) });
|
|
138045
138299
|
}
|
|
138046
|
-
function LoadingState() {
|
|
138300
|
+
function LoadingState$1() {
|
|
138047
138301
|
const { t: t2 } = useTranslation();
|
|
138048
138302
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground text-center mt-10", children: t2("fileDetail.loading") });
|
|
138049
138303
|
}
|
|
138050
|
-
function ErrorState({ message: message2 }) {
|
|
138304
|
+
function ErrorState$1({ message: message2 }) {
|
|
138051
138305
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground text-center mt-10", children: message2 });
|
|
138052
138306
|
}
|
|
138053
|
-
function base64ToArrayBuffer(base642) {
|
|
138307
|
+
function base64ToArrayBuffer$1(base642) {
|
|
138054
138308
|
const base64Data = base642.includes(",") ? base642.split(",")[1] : base642;
|
|
138055
138309
|
const binaryStr = atob(base64Data);
|
|
138056
138310
|
const bytes = new Uint8Array(binaryStr.length);
|
|
@@ -138115,7 +138369,7 @@ function useFile(projectId, file, options = {}) {
|
|
|
138115
138369
|
};
|
|
138116
138370
|
}, [projectId, file, encoding, gitHead, t2]);
|
|
138117
138371
|
const arrayBuffer = reactExports.useMemo(
|
|
138118
|
-
() => encoding === "base64" ? base64ToArrayBuffer(content2) : new ArrayBuffer(0),
|
|
138372
|
+
() => encoding === "base64" ? base64ToArrayBuffer$1(content2) : new ArrayBuffer(0),
|
|
138119
138373
|
[content2, encoding]
|
|
138120
138374
|
);
|
|
138121
138375
|
return { content: content2, gitContent, arrayBuffer, loading, errorMsg };
|
|
@@ -138398,8 +138652,8 @@ function CodeDetail$1({ projectId, file }) {
|
|
|
138398
138652
|
const absPath = await request.getSystemFilePath({ projectId, path: file, isAbsolute: true });
|
|
138399
138653
|
electron.revealInFinder(absPath);
|
|
138400
138654
|
}, [projectId, file]);
|
|
138401
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
138402
|
-
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
138655
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState$1, {});
|
|
138656
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg });
|
|
138403
138657
|
const contextMenuItems = /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
138404
138658
|
contextSelectedText && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleCopySelected, children: [
|
|
138405
138659
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
@@ -138479,6 +138733,40 @@ function MarkdownDetail$1({ projectId, file }) {
|
|
|
138479
138733
|
const { content: content2, gitContent, loading, errorMsg } = useFile(projectId, file, { gitHead: true });
|
|
138480
138734
|
const [viewMode, setViewMode] = reactExports.useState("preview");
|
|
138481
138735
|
const [contextSelectedText, setContextSelectedText] = reactExports.useState(null);
|
|
138736
|
+
const webUIStatus = useAppStore((s16) => s16.webUIStatus);
|
|
138737
|
+
const resolvePath2 = reactExports.useCallback(
|
|
138738
|
+
(src) => {
|
|
138739
|
+
if (!src || /^(https?:|data:|#|mailto:|blob:)/.test(src)) return src;
|
|
138740
|
+
const dir = file.includes("/") ? file.substring(0, file.lastIndexOf("/")) : "";
|
|
138741
|
+
const raw2 = src.startsWith("/") ? src.slice(1) : dir ? `${dir}/${src}` : src;
|
|
138742
|
+
const parts = raw2.split("/");
|
|
138743
|
+
const normalized = [];
|
|
138744
|
+
for (const p3 of parts) {
|
|
138745
|
+
if (p3 === "." || p3 === "") continue;
|
|
138746
|
+
if (p3 === ".." && normalized.length) normalized.pop();
|
|
138747
|
+
else if (p3 !== "..") normalized.push(p3);
|
|
138748
|
+
}
|
|
138749
|
+
return normalized.join("/");
|
|
138750
|
+
},
|
|
138751
|
+
[file]
|
|
138752
|
+
);
|
|
138753
|
+
const imageSource = reactExports.useMemo(() => {
|
|
138754
|
+
let httpBase = null;
|
|
138755
|
+
if (webUIStatus.enabled && webUIStatus.url) {
|
|
138756
|
+
try {
|
|
138757
|
+
const parsed = new URL(webUIStatus.url);
|
|
138758
|
+
const port = new URLSearchParams(parsed.search).get("port") || parsed.port;
|
|
138759
|
+
httpBase = `${parsed.protocol}//${parsed.hostname}:${port}`;
|
|
138760
|
+
} catch {
|
|
138761
|
+
}
|
|
138762
|
+
}
|
|
138763
|
+
return (src) => {
|
|
138764
|
+
if (!src || /^(https?:|data:|#|mailto:|blob:)/.test(src)) return src;
|
|
138765
|
+
const resolved = resolvePath2(src);
|
|
138766
|
+
if (isWebUI && httpBase) return `${httpBase}/project/${projectId}/${resolved}`;
|
|
138767
|
+
return `web://project/${projectId}/${resolved}`;
|
|
138768
|
+
};
|
|
138769
|
+
}, [projectId, resolvePath2, webUIStatus]);
|
|
138482
138770
|
const viewModes = gitContent != null ? ["preview", "code", "compare"] : ["preview", "code"];
|
|
138483
138771
|
const handleMenuOpenChange = reactExports.useCallback((open2) => {
|
|
138484
138772
|
if (open2) setContextSelectedText(window.getSelection()?.toString() ?? "");
|
|
@@ -138508,8 +138796,8 @@ function MarkdownDetail$1({ projectId, file }) {
|
|
|
138508
138796
|
const absPath = await request.getSystemFilePath({ projectId, path: file, isAbsolute: true });
|
|
138509
138797
|
electron.revealInFinder(absPath);
|
|
138510
138798
|
}, [projectId, file]);
|
|
138511
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
138512
|
-
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
138799
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState$1, {});
|
|
138800
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg });
|
|
138513
138801
|
const contextMenuItems = /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
138514
138802
|
contextSelectedText && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleCopySelected, children: [
|
|
138515
138803
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
@@ -138546,7 +138834,21 @@ function MarkdownDetail$1({ projectId, file }) {
|
|
|
138546
138834
|
] });
|
|
138547
138835
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-full overflow-hidden", children: [
|
|
138548
138836
|
viewMode === "preview" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { onOpenChange: handleMenuOpenChange, children: [
|
|
138549
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none p-6 min-h-full bg-background font-sans pb-20", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
138837
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full select-text", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none p-6 min-h-full bg-background font-sans pb-20", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
138838
|
+
StreamMarkdown,
|
|
138839
|
+
{
|
|
138840
|
+
imageSource,
|
|
138841
|
+
onLinkClick: (href) => {
|
|
138842
|
+
document.dispatchEvent(
|
|
138843
|
+
new CustomEvent("fello-preview-file", {
|
|
138844
|
+
detail: { projectId, relativePath: resolvePath2(href) }
|
|
138845
|
+
})
|
|
138846
|
+
);
|
|
138847
|
+
return false;
|
|
138848
|
+
},
|
|
138849
|
+
children: content2
|
|
138850
|
+
}
|
|
138851
|
+
) }) }),
|
|
138550
138852
|
contextMenuItems
|
|
138551
138853
|
] }) }) : viewMode === "code" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { onOpenChange: handleMenuOpenChange, children: [
|
|
138552
138854
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -140635,7 +140937,7 @@ var useControls = function() {
|
|
|
140635
140937
|
var libraryContext = useTransformContext();
|
|
140636
140938
|
return getControls(libraryContext);
|
|
140637
140939
|
};
|
|
140638
|
-
function Controls() {
|
|
140940
|
+
function Controls$1() {
|
|
140639
140941
|
const { zoomIn: zoomIn2, zoomOut: zoomOut2, resetTransform: resetTransform2 } = useControls();
|
|
140640
140942
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex items-center gap-1 bg-popover/90 backdrop-blur border border-border rounded-lg shadow-lg px-2 py-1.5", children: [
|
|
140641
140943
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -140672,8 +140974,8 @@ function Controls() {
|
|
|
140672
140974
|
}
|
|
140673
140975
|
function ImageDetail$1({ projectId, file }) {
|
|
140674
140976
|
const { content: content2, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
140675
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
140676
|
-
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
140977
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState$1, {});
|
|
140978
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg });
|
|
140677
140979
|
const ext = file.split(".").pop()?.toLowerCase() || "";
|
|
140678
140980
|
let mimeType = ext;
|
|
140679
140981
|
if (ext === "svg") mimeType = "svg+xml";
|
|
@@ -140688,7 +140990,7 @@ function ImageDetail$1({ projectId, file }) {
|
|
|
140688
140990
|
centerOnInit: true,
|
|
140689
140991
|
wheel: { step: 2e-3 },
|
|
140690
140992
|
children: [
|
|
140691
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Controls, {}),
|
|
140993
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Controls$1, {}),
|
|
140692
140994
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
140693
140995
|
TransformComponent,
|
|
140694
140996
|
{
|
|
@@ -171727,8 +172029,8 @@ function PdfView({ data }) {
|
|
|
171727
172029
|
}
|
|
171728
172030
|
function PdfDetail$1({ projectId, file }) {
|
|
171729
172031
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
171730
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
171731
|
-
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
172032
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState$1, {});
|
|
172033
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg });
|
|
171732
172034
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PdfView, { data: arrayBuffer, filename: file }) });
|
|
171733
172035
|
}
|
|
171734
172036
|
function commonjsRequire(path2) {
|
|
@@ -178063,8 +178365,8 @@ function DocxView({ data }) {
|
|
|
178063
178365
|
}
|
|
178064
178366
|
function DocxDetail$1({ projectId, file }) {
|
|
178065
178367
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
178066
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
178067
|
-
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
178368
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState$1, {});
|
|
178369
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg });
|
|
178068
178370
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DocxView, { data: arrayBuffer, filename: file }) });
|
|
178069
178371
|
}
|
|
178070
178372
|
var D$2 = Uint8Array, nt$2 = Uint16Array, He$2 = Int32Array, he$1 = new D$2([
|
|
@@ -182175,8 +182477,8 @@ function PptxView({ data }) {
|
|
|
182175
182477
|
}
|
|
182176
182478
|
function PptxDetail$1({ projectId, file }) {
|
|
182177
182479
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
182178
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
182179
|
-
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
182480
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState$1, {});
|
|
182481
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg });
|
|
182180
182482
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PptxView, { data: arrayBuffer, filename: file }) });
|
|
182181
182483
|
}
|
|
182182
182484
|
var current_ansi = 1252;
|
|
@@ -208942,8 +209244,8 @@ function XlsxView({ data }) {
|
|
|
208942
209244
|
}
|
|
208943
209245
|
function XlsxDetail$1({ projectId, file }) {
|
|
208944
209246
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
208945
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
208946
|
-
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
209247
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState$1, {});
|
|
209248
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg });
|
|
208947
209249
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(XlsxView, { data: arrayBuffer, filename: file }) });
|
|
208948
209250
|
}
|
|
208949
209251
|
function HtmlDetail$1({ projectId, file }) {
|
|
@@ -208969,7 +209271,7 @@ function HtmlDetail$1({ projectId, file }) {
|
|
|
208969
209271
|
return null;
|
|
208970
209272
|
}, [webUIStatus, isWebUI]);
|
|
208971
209273
|
const iframeUrl = reactExports.useMemo(() => {
|
|
208972
|
-
if (httpBaseUrl) {
|
|
209274
|
+
if (isWebUI && httpBaseUrl) {
|
|
208973
209275
|
return `${httpBaseUrl}/project/${projectId}/${file}`;
|
|
208974
209276
|
}
|
|
208975
209277
|
return `web://project/${projectId}/${file}`;
|
|
@@ -209089,7 +209391,7 @@ function HtmlDetail$1({ projectId, file }) {
|
|
|
209089
209391
|
] });
|
|
209090
209392
|
if (hasError) {
|
|
209091
209393
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-full flex flex-col items-center justify-center gap-4 p-8", children: [
|
|
209092
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg }),
|
|
209394
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg }),
|
|
209093
209395
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
209094
209396
|
"button",
|
|
209095
209397
|
{
|
|
@@ -218084,12 +218386,11 @@ function TreeItem({
|
|
|
218084
218386
|
ChevronRight,
|
|
218085
218387
|
{
|
|
218086
218388
|
className: cn$5(
|
|
218087
|
-
"size-3.5 shrink-0 text-muted-foreground transition-transform",
|
|
218389
|
+
"size-3.5 shrink-0 text-muted-foreground scale-110 transition-transform",
|
|
218088
218390
|
isOpen && "rotate-90"
|
|
218089
218391
|
)
|
|
218090
218392
|
}
|
|
218091
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
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" }),
|
|
218393
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node2.name, className: "size-3.5 shrink-0 text-muted-foreground/90" }),
|
|
218093
218394
|
isEditing ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
218094
218395
|
"input",
|
|
218095
218396
|
{
|
|
@@ -218258,6 +218559,15 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
218258
218559
|
const containerRef = reactExports.useRef(null);
|
|
218259
218560
|
const [data, setData] = reactExports.useState([]);
|
|
218260
218561
|
const [loading, setLoading] = reactExports.useState(false);
|
|
218562
|
+
const [showLoading, setShowLoading] = reactExports.useState(false);
|
|
218563
|
+
reactExports.useEffect(() => {
|
|
218564
|
+
if (!loading) {
|
|
218565
|
+
setShowLoading(false);
|
|
218566
|
+
return;
|
|
218567
|
+
}
|
|
218568
|
+
const timer2 = setTimeout(() => setShowLoading(true), 500);
|
|
218569
|
+
return () => clearTimeout(timer2);
|
|
218570
|
+
}, [loading]);
|
|
218261
218571
|
const [selectedIds, setSelectedIds] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
218262
218572
|
const [lastSelectedId, setLastSelectedId] = reactExports.useState(null);
|
|
218263
218573
|
const [openFolders, setOpenFolders] = reactExports.useState(() => {
|
|
@@ -218469,9 +218779,14 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
218469
218779
|
const next2 = new Set(prev2);
|
|
218470
218780
|
if (next2.has(id32)) {
|
|
218471
218781
|
next2.delete(id32);
|
|
218782
|
+
const prefix = id32 + "/";
|
|
218783
|
+
for (const key2 of prev2) {
|
|
218784
|
+
if (key2.startsWith(prefix)) next2.delete(key2);
|
|
218785
|
+
}
|
|
218472
218786
|
} else {
|
|
218473
218787
|
next2.add(id32);
|
|
218474
218788
|
}
|
|
218789
|
+
openFoldersRef.current = next2;
|
|
218475
218790
|
return next2;
|
|
218476
218791
|
});
|
|
218477
218792
|
if (node2.isFolder && activeProjectId) {
|
|
@@ -218505,6 +218820,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
218505
218820
|
);
|
|
218506
218821
|
const collapseAll = reactExports.useCallback(() => {
|
|
218507
218822
|
setOpenFolders(/* @__PURE__ */ new Set());
|
|
218823
|
+
openFoldersRef.current = /* @__PURE__ */ new Set();
|
|
218508
218824
|
}, []);
|
|
218509
218825
|
const handleSelect = reactExports.useCallback(
|
|
218510
218826
|
(id32, e2) => {
|
|
@@ -218595,7 +218911,11 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
218595
218911
|
children: isFolder ? [] : void 0
|
|
218596
218912
|
};
|
|
218597
218913
|
if (parentId) {
|
|
218598
|
-
setOpenFolders((prev2) =>
|
|
218914
|
+
setOpenFolders((prev2) => {
|
|
218915
|
+
const next2 = new Set(prev2).add(parentId);
|
|
218916
|
+
openFoldersRef.current = next2;
|
|
218917
|
+
return next2;
|
|
218918
|
+
});
|
|
218599
218919
|
let needsFetch = false;
|
|
218600
218920
|
for (const root2 of data) {
|
|
218601
218921
|
const p3 = findNode(root2, parentId);
|
|
@@ -219089,11 +219409,10 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219089
219409
|
if (!projectId) {
|
|
219090
219410
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full items-center justify-center text-xs text-muted-foreground", children: t2("filePanel.noProject", "No project selected") });
|
|
219091
219411
|
}
|
|
219092
|
-
if (
|
|
219093
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full items-center justify-center
|
|
219094
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
219095
|
-
" ",
|
|
219096
|
-
t2("filePanel.loading")
|
|
219412
|
+
if (showLoading && data.length === 0) {
|
|
219413
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col items-center justify-center text-muted-foreground", children: [
|
|
219414
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-10 rounded-full bg-muted flex items-center justify-center mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-5 text-muted-foreground/60 animate-spin" }) }),
|
|
219415
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70", children: t2("filePanel.loading") })
|
|
219097
219416
|
] });
|
|
219098
219417
|
}
|
|
219099
219418
|
const sharedProps = {
|
|
@@ -219111,7 +219430,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219111
219430
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "flex h-full min-h-0 flex-col text-xs w-full", children: [
|
|
219112
219431
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
|
|
219113
219432
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
|
|
219114
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-
|
|
219433
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-3.5" }),
|
|
219115
219434
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-nowrap", children: t2("filePanel.title") })
|
|
219116
219435
|
] }),
|
|
219117
219436
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto mr-2 flex items-center gap-0.5", children: [
|
|
@@ -219121,6 +219440,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219121
219440
|
variant: "ghost",
|
|
219122
219441
|
size: "icon",
|
|
219123
219442
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219443
|
+
disabled: loading,
|
|
219124
219444
|
onClick: () => createIn(getSelectedFolder(), false),
|
|
219125
219445
|
title: t2("filePanel.newFile"),
|
|
219126
219446
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilePlus, { className: "size-3.5" })
|
|
@@ -219132,6 +219452,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219132
219452
|
variant: "ghost",
|
|
219133
219453
|
size: "icon",
|
|
219134
219454
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219455
|
+
disabled: loading,
|
|
219135
219456
|
onClick: () => createIn(getSelectedFolder(), true),
|
|
219136
219457
|
title: t2("filePanel.newFolder"),
|
|
219137
219458
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderPlus, { className: "size-3.5" })
|
|
@@ -219143,6 +219464,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219143
219464
|
variant: "ghost",
|
|
219144
219465
|
size: "icon",
|
|
219145
219466
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219467
|
+
disabled: loading,
|
|
219146
219468
|
onClick: collapseAll,
|
|
219147
219469
|
title: t2("filePanel.collapseFolders"),
|
|
219148
219470
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronsDownUp, { className: "size-3.5" })
|
|
@@ -219154,6 +219476,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219154
219476
|
variant: "ghost",
|
|
219155
219477
|
size: "icon",
|
|
219156
219478
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219479
|
+
disabled: loading,
|
|
219157
219480
|
onClick: refresh,
|
|
219158
219481
|
title: t2("filePanel.refresh", "Refresh"),
|
|
219159
219482
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" })
|
|
@@ -219161,8 +219484,22 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219161
219484
|
)
|
|
219162
219485
|
] })
|
|
219163
219486
|
] }),
|
|
219164
|
-
|
|
219165
|
-
|
|
219487
|
+
data.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
219488
|
+
"div",
|
|
219489
|
+
{
|
|
219490
|
+
className: "flex-1 flex flex-col items-center justify-center text-muted-foreground",
|
|
219491
|
+
onDragOver: (e2) => {
|
|
219492
|
+
e2.preventDefault();
|
|
219493
|
+
e2.dataTransfer.dropEffect = "copy";
|
|
219494
|
+
},
|
|
219495
|
+
onDrop: (e2) => void handleExternalDrop(e2, ""),
|
|
219496
|
+
children: [
|
|
219497
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-10 rounded-full bg-muted flex items-center justify-center mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-5 text-muted-foreground/60" }) }),
|
|
219498
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70", children: t2("filePanel.emptyDirectory") })
|
|
219499
|
+
]
|
|
219500
|
+
}
|
|
219501
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1 pl-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
|
|
219502
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
219166
219503
|
ContextMenuTrigger,
|
|
219167
219504
|
{
|
|
219168
219505
|
render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
|
|
@@ -219204,19 +219541,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219204
219541
|
setDragIds([]);
|
|
219205
219542
|
refresh();
|
|
219206
219543
|
},
|
|
219207
|
-
children:
|
|
219208
|
-
|
|
219209
|
-
|
|
219210
|
-
|
|
219211
|
-
|
|
219212
|
-
|
|
219213
|
-
|
|
219214
|
-
|
|
219215
|
-
|
|
219216
|
-
|
|
219217
|
-
)),
|
|
219218
|
-
data.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-6 text-center text-xs text-muted-foreground", children: t2("filePanel.emptyDirectory") })
|
|
219219
|
-
]
|
|
219544
|
+
children: data.map((node2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
219545
|
+
TreeItem,
|
|
219546
|
+
{
|
|
219547
|
+
previewId: previewFileId,
|
|
219548
|
+
node: node2,
|
|
219549
|
+
depth: 0,
|
|
219550
|
+
...sharedProps
|
|
219551
|
+
},
|
|
219552
|
+
node2.id
|
|
219553
|
+
))
|
|
219220
219554
|
}
|
|
219221
219555
|
),
|
|
219222
219556
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
@@ -219292,7 +219626,7 @@ function TerminalPanel({
|
|
|
219292
219626
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
219293
219627
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
|
|
219294
219628
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
|
|
219295
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SquareTerminal, { className: "size-
|
|
219629
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SquareTerminal, { className: "size-3.5" }),
|
|
219296
219630
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-nowrap", children: t2("panel.terminal") })
|
|
219297
219631
|
] }),
|
|
219298
219632
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto mr-2 flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -219307,7 +219641,10 @@ function TerminalPanel({
|
|
|
219307
219641
|
}
|
|
219308
219642
|
) })
|
|
219309
219643
|
] }),
|
|
219310
|
-
|
|
219644
|
+
terminals.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center text-muted-foreground", children: [
|
|
219645
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-10 rounded-full bg-muted flex items-center justify-center mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SquareTerminal, { className: "size-5 text-muted-foreground/60" }) }),
|
|
219646
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70", children: t2("terminalPanel.noTerminalSelected", "No terminals") })
|
|
219647
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-0.5 py-1 px-1", children: terminals.map((terminal) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
219311
219648
|
"button",
|
|
219312
219649
|
{
|
|
219313
219650
|
type: "button",
|
|
@@ -233454,7 +233791,14 @@ function SettingsAgentApiDialog({
|
|
|
233454
233791
|
name: "provider",
|
|
233455
233792
|
control: form.control,
|
|
233456
233793
|
render: ({ field, fieldState }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { "data-invalid": fieldState.invalid, children: [
|
|
233457
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233794
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233795
|
+
FieldLabel,
|
|
233796
|
+
{
|
|
233797
|
+
htmlFor: "api-provider",
|
|
233798
|
+
className: "text-[11px] text-muted-foreground",
|
|
233799
|
+
children: t2("settings.agents.apiProvider", "Provider")
|
|
233800
|
+
}
|
|
233801
|
+
),
|
|
233458
233802
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { name: field.name, value: field.value, onValueChange: field.onChange, children: [
|
|
233459
233803
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233460
233804
|
SelectTrigger,
|
|
@@ -233648,7 +233992,14 @@ function SettingsAgentApiDialog({
|
|
|
233648
233992
|
name: "modelIdTemplate",
|
|
233649
233993
|
control: form.control,
|
|
233650
233994
|
render: ({ field, fieldState }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { "data-invalid": fieldState.invalid, children: [
|
|
233651
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233995
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233996
|
+
FieldLabel,
|
|
233997
|
+
{
|
|
233998
|
+
htmlFor: "api-model-template",
|
|
233999
|
+
className: "text-[11px] text-muted-foreground",
|
|
234000
|
+
children: t2("settings.agents.modelIdTemplate", "Model Id Template")
|
|
234001
|
+
}
|
|
234002
|
+
),
|
|
233652
234003
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233653
234004
|
Input,
|
|
233654
234005
|
{
|
|
@@ -235360,7 +235711,7 @@ function SkillsLayout() {
|
|
|
235360
235711
|
{
|
|
235361
235712
|
to: tab2.href,
|
|
235362
235713
|
className: ({ isActive }) => cn$5(
|
|
235363
|
-
"flex items-center gap-2 rounded-md px-3 py-2 text-xs transition-colors",
|
|
235714
|
+
"flex items-center gap-2 rounded-md px-3 py-2 text-xs transition-colors cursor-default",
|
|
235364
235715
|
isActive ? "bg-accent text-accent-foreground font-medium" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
235365
235716
|
),
|
|
235366
235717
|
children: [
|
|
@@ -235785,8 +236136,19 @@ function parseParts(expr) {
|
|
|
235785
236136
|
if (parts.length !== 5) return { hour: 9, minute: 0, interval: 2, dow: "1" };
|
|
235786
236137
|
const [min2, hr2] = parts;
|
|
235787
236138
|
const dow = parts[4];
|
|
235788
|
-
if (hr2.startsWith("*/"))
|
|
235789
|
-
|
|
236139
|
+
if (hr2.startsWith("*/"))
|
|
236140
|
+
return {
|
|
236141
|
+
hour: 9,
|
|
236142
|
+
minute: parseInt(min2) || 0,
|
|
236143
|
+
interval: parseInt(hr2.slice(2)) || 2,
|
|
236144
|
+
dow: /^\d$/.test(dow) ? dow : "1"
|
|
236145
|
+
};
|
|
236146
|
+
return {
|
|
236147
|
+
hour: parseInt(hr2) || 9,
|
|
236148
|
+
minute: parseInt(min2) || 0,
|
|
236149
|
+
interval: 2,
|
|
236150
|
+
dow: /^\d$/.test(dow) ? dow : "1"
|
|
236151
|
+
};
|
|
235790
236152
|
}
|
|
235791
236153
|
function buildCron(preset, hour, minute, interval2, dow) {
|
|
235792
236154
|
switch (preset) {
|
|
@@ -235803,7 +236165,7 @@ function buildCron(preset, hour, minute, interval2, dow) {
|
|
|
235803
236165
|
}
|
|
235804
236166
|
}
|
|
235805
236167
|
function CronEditor({ value, onChange, timezone }) {
|
|
235806
|
-
const { t: t2 } = useTranslation();
|
|
236168
|
+
const { t: t2, i18n } = useTranslation();
|
|
235807
236169
|
const [preset, setPreset] = reactExports.useState(() => detectPreset(value));
|
|
235808
236170
|
const [parts, setParts] = reactExports.useState(() => parseParts(value));
|
|
235809
236171
|
reactExports.useEffect(() => {
|
|
@@ -235834,20 +236196,34 @@ function CronEditor({ value, onChange, timezone }) {
|
|
|
235834
236196
|
{ value: "custom", label: t2("automation.cron.custom", "Custom") }
|
|
235835
236197
|
];
|
|
235836
236198
|
const intervalItems = INTERVALS.map((n2) => ({ value: String(n2), label: `${n2}h` }));
|
|
235837
|
-
const minuteItems = MINUTES.map((m2) => ({
|
|
236199
|
+
const minuteItems = MINUTES.map((m2) => ({
|
|
236200
|
+
value: String(m2),
|
|
236201
|
+
label: `${String(m2).padStart(2, "0")}`
|
|
236202
|
+
}));
|
|
235838
236203
|
const hourItems = HOURS.map((h3) => ({ value: String(h3), label: String(h3).padStart(2, "0") }));
|
|
235839
236204
|
const dowItems = DAYS_OF_WEEK_VALUES.map((v4) => ({
|
|
235840
236205
|
value: v4,
|
|
235841
|
-
label: t2(
|
|
236206
|
+
label: t2(
|
|
236207
|
+
`automation.cron.days.${v4}`,
|
|
236208
|
+
["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][parseInt(v4)]
|
|
236209
|
+
)
|
|
235842
236210
|
}));
|
|
235843
236211
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2.5", children: [
|
|
235844
236212
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
235845
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
235846
|
-
|
|
235847
|
-
|
|
235848
|
-
|
|
235849
|
-
|
|
235850
|
-
|
|
236213
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236214
|
+
Select,
|
|
236215
|
+
{
|
|
236216
|
+
items: presetItems,
|
|
236217
|
+
value: preset,
|
|
236218
|
+
onValueChange: (v4) => {
|
|
236219
|
+
if (v4) handlePresetChange(v4);
|
|
236220
|
+
},
|
|
236221
|
+
children: [
|
|
236222
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-8 text-xs! w-32 shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
236223
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: presetItems.map((p3) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: p3.value, children: p3.label }, p3.value)) })
|
|
236224
|
+
]
|
|
236225
|
+
}
|
|
236226
|
+
),
|
|
235851
236227
|
preset === "custom" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
235852
236228
|
Input,
|
|
235853
236229
|
{
|
|
@@ -235857,40 +236233,80 @@ function CronEditor({ value, onChange, timezone }) {
|
|
|
235857
236233
|
className: "h-8 text-xs! font-mono text-foreground/70 focus-visible:ring-0.5 flex-1"
|
|
235858
236234
|
}
|
|
235859
236235
|
) : preset === "hourly" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
235860
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
235861
|
-
|
|
235862
|
-
|
|
235863
|
-
|
|
235864
|
-
|
|
235865
|
-
|
|
236236
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236237
|
+
Select,
|
|
236238
|
+
{
|
|
236239
|
+
items: intervalItems,
|
|
236240
|
+
value: String(parts.interval),
|
|
236241
|
+
onValueChange: (v4) => {
|
|
236242
|
+
if (v4) updateParts({ interval: parseInt(v4) });
|
|
236243
|
+
},
|
|
236244
|
+
children: [
|
|
236245
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
236246
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: intervalItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
|
|
236247
|
+
]
|
|
236248
|
+
}
|
|
236249
|
+
),
|
|
235866
236250
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground", children: t2("automation.cron.atMinute", "at min") }),
|
|
235867
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
235868
|
-
|
|
235869
|
-
|
|
235870
|
-
|
|
235871
|
-
|
|
235872
|
-
|
|
236251
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236252
|
+
Select,
|
|
236253
|
+
{
|
|
236254
|
+
items: minuteItems,
|
|
236255
|
+
value: String(parts.minute),
|
|
236256
|
+
onValueChange: (v4) => {
|
|
236257
|
+
if (v4) updateParts({ minute: parseInt(v4) });
|
|
236258
|
+
},
|
|
236259
|
+
children: [
|
|
236260
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
236261
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: minuteItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
|
|
236262
|
+
]
|
|
236263
|
+
}
|
|
236264
|
+
)
|
|
235873
236265
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
235874
|
-
preset === "weekly" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
235875
|
-
|
|
235876
|
-
|
|
235877
|
-
|
|
235878
|
-
|
|
235879
|
-
|
|
236266
|
+
preset === "weekly" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236267
|
+
Select,
|
|
236268
|
+
{
|
|
236269
|
+
items: dowItems,
|
|
236270
|
+
value: parts.dow,
|
|
236271
|
+
onValueChange: (v4) => {
|
|
236272
|
+
if (v4) updateParts({ dow: v4 });
|
|
236273
|
+
},
|
|
236274
|
+
children: [
|
|
236275
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-18", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
236276
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: dowItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
|
|
236277
|
+
]
|
|
236278
|
+
}
|
|
236279
|
+
),
|
|
235880
236280
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground", children: t2("automation.cron.at", "at") }),
|
|
235881
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
235882
|
-
|
|
235883
|
-
|
|
235884
|
-
|
|
235885
|
-
|
|
235886
|
-
|
|
236281
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236282
|
+
Select,
|
|
236283
|
+
{
|
|
236284
|
+
items: hourItems,
|
|
236285
|
+
value: String(parts.hour),
|
|
236286
|
+
onValueChange: (v4) => {
|
|
236287
|
+
if (v4) updateParts({ hour: parseInt(v4) });
|
|
236288
|
+
},
|
|
236289
|
+
children: [
|
|
236290
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
236291
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: hourItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
|
|
236292
|
+
]
|
|
236293
|
+
}
|
|
236294
|
+
),
|
|
235887
236295
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground", children: ":" }),
|
|
235888
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
235889
|
-
|
|
235890
|
-
|
|
235891
|
-
|
|
235892
|
-
|
|
235893
|
-
|
|
236296
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236297
|
+
Select,
|
|
236298
|
+
{
|
|
236299
|
+
items: minuteItems,
|
|
236300
|
+
value: String(parts.minute),
|
|
236301
|
+
onValueChange: (v4) => {
|
|
236302
|
+
if (v4) updateParts({ minute: parseInt(v4) });
|
|
236303
|
+
},
|
|
236304
|
+
children: [
|
|
236305
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-7 text-xs! w-15", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
236306
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: minuteItems.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
|
|
236307
|
+
]
|
|
236308
|
+
}
|
|
236309
|
+
)
|
|
235894
236310
|
] })
|
|
235895
236311
|
] }),
|
|
235896
236312
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-[11px] text-muted-foreground", children: [
|
|
@@ -235898,7 +236314,7 @@ function CronEditor({ value, onChange, timezone }) {
|
|
|
235898
236314
|
" · ",
|
|
235899
236315
|
t2("automation.cron.nextRun", "Next run"),
|
|
235900
236316
|
": ",
|
|
235901
|
-
formatNextCron(value),
|
|
236317
|
+
formatNextCron(value, i18n.language),
|
|
235902
236318
|
timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-1 text-muted-foreground/50", children: [
|
|
235903
236319
|
"(",
|
|
235904
236320
|
timezone,
|
|
@@ -235907,11 +236323,16 @@ function CronEditor({ value, onChange, timezone }) {
|
|
|
235907
236323
|
] })
|
|
235908
236324
|
] });
|
|
235909
236325
|
}
|
|
235910
|
-
function formatNextCron(expr) {
|
|
236326
|
+
function formatNextCron(expr, locale) {
|
|
235911
236327
|
try {
|
|
235912
236328
|
const next2 = getNextCronDate(expr);
|
|
235913
236329
|
if (!next2) return "—";
|
|
235914
|
-
return next2.toLocaleString(
|
|
236330
|
+
return next2.toLocaleString(locale, {
|
|
236331
|
+
month: "short",
|
|
236332
|
+
day: "numeric",
|
|
236333
|
+
hour: "2-digit",
|
|
236334
|
+
minute: "2-digit"
|
|
236335
|
+
});
|
|
235915
236336
|
} catch {
|
|
235916
236337
|
return "—";
|
|
235917
236338
|
}
|
|
@@ -235951,8 +236372,14 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
235951
236372
|
const { toast: toast2 } = useMessage();
|
|
235952
236373
|
const configuredAgents = useAppStore((s16) => s16.configuredAgents);
|
|
235953
236374
|
const configuredMcpServers = useAppStore((s16) => s16.configuredMcpServers);
|
|
235954
|
-
const enabledAgents = reactExports.useMemo(
|
|
235955
|
-
|
|
236375
|
+
const enabledAgents = reactExports.useMemo(
|
|
236376
|
+
() => configuredAgents.filter((a2) => !a2.disabled),
|
|
236377
|
+
[configuredAgents]
|
|
236378
|
+
);
|
|
236379
|
+
const enabledMcpServers = reactExports.useMemo(
|
|
236380
|
+
() => configuredMcpServers.filter((s16) => !s16.disabled),
|
|
236381
|
+
[configuredMcpServers]
|
|
236382
|
+
);
|
|
235956
236383
|
const [timezone, setTimezone] = reactExports.useState("");
|
|
235957
236384
|
reactExports.useEffect(() => {
|
|
235958
236385
|
request.getServerTimezone().then(setTimezone).catch(() => {
|
|
@@ -235961,10 +236388,18 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
235961
236388
|
const [name2, setName] = reactExports.useState(isEdit ? schedule2.name : "");
|
|
235962
236389
|
const [agentId, setAgentId] = reactExports.useState(isEdit ? schedule2.agentId : enabledAgents[0]?.id ?? "");
|
|
235963
236390
|
const [prompt, setPrompt] = reactExports.useState(isEdit ? schedule2.prompt : "");
|
|
235964
|
-
const [cronType, setCronType] = reactExports.useState(
|
|
235965
|
-
|
|
235966
|
-
|
|
235967
|
-
const [
|
|
236391
|
+
const [cronType, setCronType] = reactExports.useState(
|
|
236392
|
+
isEdit ? schedule2.cron.type : "cron"
|
|
236393
|
+
);
|
|
236394
|
+
const [cronExpr, setCronExpr] = reactExports.useState(
|
|
236395
|
+
isEdit ? schedule2.cron.expr ?? "0 9 * * 1-5" : "0 9 * * 1-5"
|
|
236396
|
+
);
|
|
236397
|
+
const [features, setFeatures] = reactExports.useState(
|
|
236398
|
+
isEdit ? schedule2.features ?? ["skills"] : ["skills"]
|
|
236399
|
+
);
|
|
236400
|
+
const [mcpServerIds, setMcpServerIds] = reactExports.useState(
|
|
236401
|
+
isEdit ? schedule2.mcpServers ?? [] : enabledMcpServers.map((s16) => s16.id)
|
|
236402
|
+
);
|
|
235968
236403
|
const [saving, setSaving] = reactExports.useState(false);
|
|
235969
236404
|
reactExports.useEffect(() => {
|
|
235970
236405
|
if (!open2) return;
|
|
@@ -235987,9 +236422,12 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
235987
236422
|
}
|
|
235988
236423
|
}, [schedule2, open2]);
|
|
235989
236424
|
const handleSave = async () => {
|
|
235990
|
-
if (!name2.trim())
|
|
235991
|
-
|
|
235992
|
-
if (!
|
|
236425
|
+
if (!name2.trim())
|
|
236426
|
+
return void toast2.error(t2("automation.validation.nameRequired", "Name is required"));
|
|
236427
|
+
if (!agentId)
|
|
236428
|
+
return void toast2.error(t2("automation.validation.agentRequired", "Agent is required"));
|
|
236429
|
+
if (!prompt.trim())
|
|
236430
|
+
return void toast2.error(t2("automation.validation.promptRequired", "Prompt is required"));
|
|
235993
236431
|
setSaving(true);
|
|
235994
236432
|
try {
|
|
235995
236433
|
if (isEdit) {
|
|
@@ -236022,125 +236460,205 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
236022
236460
|
setSaving(false);
|
|
236023
236461
|
}
|
|
236024
236462
|
};
|
|
236025
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236026
|
-
|
|
236027
|
-
|
|
236028
|
-
|
|
236029
|
-
|
|
236030
|
-
|
|
236031
|
-
|
|
236032
|
-
|
|
236033
|
-
|
|
236034
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236035
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236036
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
236037
|
-
|
|
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
|
-
] })
|
|
236463
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236464
|
+
Dialog,
|
|
236465
|
+
{
|
|
236466
|
+
open: open2,
|
|
236467
|
+
onOpenChange: (open22, eventDetails) => {
|
|
236468
|
+
if (!open22 && (eventDetails?.reason === "escape-key" || eventDetails?.reason === "outside-press"))
|
|
236469
|
+
return;
|
|
236470
|
+
onOpenChange(open22);
|
|
236471
|
+
},
|
|
236472
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "sm:max-w-3xl", children: [
|
|
236473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
|
|
236474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: isEdit ? t2("automation.editSchedule", "Edit Schedule") : t2("automation.newSchedule", "New Schedule") }),
|
|
236475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: t2("automation.dialogDesc", "Configure the automated task schedule and prompt.") })
|
|
236058
236476
|
] }),
|
|
236059
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236060
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
236061
|
-
|
|
236062
|
-
|
|
236063
|
-
|
|
236064
|
-
|
|
236065
|
-
|
|
236066
|
-
|
|
236067
|
-
|
|
236068
|
-
|
|
236069
|
-
|
|
236070
|
-
|
|
236071
|
-
|
|
236072
|
-
|
|
236073
|
-
|
|
236074
|
-
|
|
236075
|
-
|
|
236076
|
-
|
|
236077
|
-
|
|
236078
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
236477
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-5", children: [
|
|
236478
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldGroup, { children: [
|
|
236479
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[2fr_1fr] gap-3", children: [
|
|
236480
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236481
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-name", className: "text-xs text-muted-foreground", children: t2("automation.scheduleName", "Schedule Name") }),
|
|
236482
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236483
|
+
Input,
|
|
236484
|
+
{
|
|
236485
|
+
id: "auto-name",
|
|
236486
|
+
placeholder: t2(
|
|
236487
|
+
"automation.scheduleNamePlaceholder",
|
|
236488
|
+
"e.g. Morning Standup Summary"
|
|
236489
|
+
),
|
|
236490
|
+
value: name2,
|
|
236491
|
+
onChange: (e2) => setName(e2.target.value),
|
|
236492
|
+
className: "h-8 text-xs! text-foreground/70 focus-visible:ring-0.5"
|
|
236493
|
+
}
|
|
236494
|
+
)
|
|
236495
|
+
] }),
|
|
236496
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236497
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-agent", className: "text-xs text-muted-foreground", children: t2("automation.agent", "Agent") }),
|
|
236498
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236499
|
+
Select,
|
|
236500
|
+
{
|
|
236501
|
+
value: agentId,
|
|
236502
|
+
onValueChange: (v4) => {
|
|
236503
|
+
if (v4) setAgentId(v4);
|
|
236504
|
+
},
|
|
236505
|
+
children: [
|
|
236506
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236507
|
+
SelectTrigger,
|
|
236508
|
+
{
|
|
236509
|
+
id: "auto-agent",
|
|
236510
|
+
className: "w-full text-xs! text-muted-foreground",
|
|
236511
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {})
|
|
236512
|
+
}
|
|
236513
|
+
),
|
|
236514
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: enabledAgents.map((a2) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: a2.id, children: a2.id }, a2.id)) })
|
|
236515
|
+
]
|
|
236516
|
+
}
|
|
236517
|
+
)
|
|
236518
|
+
] })
|
|
236519
|
+
] }),
|
|
236520
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236521
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-prompt", className: "text-xs text-muted-foreground", children: t2("automation.prompt", "Prompt") }),
|
|
236079
236522
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236080
|
-
|
|
236523
|
+
Textarea,
|
|
236081
236524
|
{
|
|
236082
|
-
|
|
236083
|
-
|
|
236084
|
-
|
|
236525
|
+
id: "auto-prompt",
|
|
236526
|
+
placeholder: t2("automation.promptPlaceholder", "What should the agent do?"),
|
|
236527
|
+
value: prompt,
|
|
236528
|
+
onChange: (e2) => setPrompt(e2.target.value),
|
|
236529
|
+
className: "text-xs! min-h-46 flex-1 text-foreground/70 focus-visible:ring-0.5"
|
|
236085
236530
|
}
|
|
236086
236531
|
)
|
|
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
236532
|
] })
|
|
236099
|
-
] })
|
|
236100
|
-
|
|
236101
|
-
|
|
236102
|
-
|
|
236103
|
-
|
|
236104
|
-
|
|
236105
|
-
|
|
236106
|
-
|
|
236107
|
-
|
|
236108
|
-
|
|
236109
|
-
|
|
236110
|
-
|
|
236111
|
-
|
|
236533
|
+
] }),
|
|
236534
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldGroup, { children: [
|
|
236535
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
236536
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("automation.features", "Features") }),
|
|
236537
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
236538
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7", children: [
|
|
236539
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236540
|
+
"div",
|
|
236541
|
+
{
|
|
236542
|
+
className: `text-xs truncate ${features.includes("skills") ? "text-muted-foreground" : "text-muted-foreground/50"}`,
|
|
236543
|
+
children: t2("constant.feature.skills", "Skills")
|
|
236544
|
+
}
|
|
236545
|
+
),
|
|
236546
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236547
|
+
Switch,
|
|
236548
|
+
{
|
|
236549
|
+
size: "sm",
|
|
236550
|
+
checked: features.includes("skills"),
|
|
236551
|
+
onCheckedChange: (c2) => setFeatures(c2 ? ["skills"] : [])
|
|
236552
|
+
}
|
|
236553
|
+
)
|
|
236554
|
+
] }),
|
|
236555
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7", children: [
|
|
236556
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs truncate text-muted-foreground/50", children: [
|
|
236557
|
+
t2("constant.feature.askUser", "Ask User"),
|
|
236558
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] ml-1", children: [
|
|
236559
|
+
"(",
|
|
236560
|
+
t2("automation.alwaysDisabled", "always disabled"),
|
|
236561
|
+
")"
|
|
236562
|
+
] })
|
|
236563
|
+
] }),
|
|
236564
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Switch, { size: "sm", checked: false, disabled: true })
|
|
236565
|
+
] })
|
|
236566
|
+
] })
|
|
236567
|
+
] }),
|
|
236568
|
+
configuredMcpServers.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
236569
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("automation.mcpServers", "MCP Servers") }),
|
|
236570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236571
|
+
"div",
|
|
236572
|
+
{
|
|
236573
|
+
className: configuredMcpServers.length > 5 ? "grid grid-cols-2 gap-1" : "flex flex-col gap-1",
|
|
236574
|
+
children: configuredMcpServers.map((s16) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236575
|
+
"div",
|
|
236576
|
+
{
|
|
236577
|
+
className: "flex items-center justify-between rounded border bg-secondary/50 px-2 h-7",
|
|
236578
|
+
children: [
|
|
236579
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236580
|
+
"div",
|
|
236581
|
+
{
|
|
236582
|
+
className: `text-xs truncate ${mcpServerIds.includes(s16.id) ? "text-muted-foreground" : "text-muted-foreground/50"}`,
|
|
236583
|
+
title: s16.id,
|
|
236584
|
+
children: s16.id
|
|
236585
|
+
}
|
|
236586
|
+
),
|
|
236587
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236588
|
+
Switch,
|
|
236589
|
+
{
|
|
236590
|
+
size: "sm",
|
|
236591
|
+
checked: mcpServerIds.includes(s16.id),
|
|
236592
|
+
onCheckedChange: (c2) => {
|
|
236593
|
+
setMcpServerIds(
|
|
236594
|
+
(prev2) => c2 ? [...prev2, s16.id] : prev2.filter((id32) => id32 !== s16.id)
|
|
236595
|
+
);
|
|
236596
|
+
}
|
|
236597
|
+
}
|
|
236598
|
+
)
|
|
236599
|
+
]
|
|
236600
|
+
},
|
|
236601
|
+
s16.id
|
|
236602
|
+
))
|
|
236112
236603
|
}
|
|
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)")
|
|
236604
|
+
)
|
|
236123
236605
|
] }),
|
|
236124
|
-
|
|
236606
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236607
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { className: "text-xs text-muted-foreground", children: t2("automation.schedule", "Schedule") }),
|
|
236608
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
236609
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-foreground/70", children: [
|
|
236610
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236611
|
+
Switch,
|
|
236612
|
+
{
|
|
236613
|
+
checked: cronType === "cron",
|
|
236614
|
+
onCheckedChange: (c2) => setCronType(c2 ? "cron" : "manual")
|
|
236615
|
+
}
|
|
236616
|
+
),
|
|
236617
|
+
t2("automation.timedExecution", "Timed (cron)")
|
|
236618
|
+
] }),
|
|
236619
|
+
cronType === "cron" ? /* @__PURE__ */ jsxRuntimeExports.jsx(CronEditor, { value: cronExpr, onChange: setCronExpr, timezone }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: t2("automation.manualDesc", "Manual trigger only. No automatic scheduling.") })
|
|
236620
|
+
] })
|
|
236621
|
+
] })
|
|
236125
236622
|
] })
|
|
236623
|
+
] }),
|
|
236624
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(DialogFooter, { children: [
|
|
236625
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236626
|
+
Button,
|
|
236627
|
+
{
|
|
236628
|
+
type: "button",
|
|
236629
|
+
variant: "outline",
|
|
236630
|
+
size: "sm",
|
|
236631
|
+
onClick: () => onOpenChange(false),
|
|
236632
|
+
className: "h-7 text-xs",
|
|
236633
|
+
children: t2("automation.cancel", "Cancel")
|
|
236634
|
+
}
|
|
236635
|
+
),
|
|
236636
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236637
|
+
Button,
|
|
236638
|
+
{
|
|
236639
|
+
type: "button",
|
|
236640
|
+
size: "sm",
|
|
236641
|
+
disabled: saving,
|
|
236642
|
+
onClick: handleSave,
|
|
236643
|
+
className: "h-7 text-xs",
|
|
236644
|
+
children: [
|
|
236645
|
+
saving && /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin mr-1" }),
|
|
236646
|
+
isEdit ? t2("automation.save", "Save") : t2("automation.create", "Create")
|
|
236647
|
+
]
|
|
236648
|
+
}
|
|
236649
|
+
)
|
|
236126
236650
|
] })
|
|
236127
236651
|
] })
|
|
236128
|
-
|
|
236129
|
-
|
|
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
|
-
] }) });
|
|
236652
|
+
}
|
|
236653
|
+
);
|
|
236137
236654
|
}
|
|
236138
236655
|
function Automation() {
|
|
236139
|
-
const { t: t2 } = useTranslation();
|
|
236656
|
+
const { t: t2, i18n } = useTranslation();
|
|
236140
236657
|
const navigate = useNavigate();
|
|
236141
236658
|
const { confirm: confirm2, toast: toast2 } = useMessage();
|
|
236142
236659
|
const [schedules, setSchedules] = reactExports.useState([]);
|
|
236143
|
-
const [loading, setLoading] = reactExports.useState(
|
|
236660
|
+
const [loading, setLoading] = reactExports.useState(false);
|
|
236661
|
+
const [showLoading, setShowLoading] = reactExports.useState(false);
|
|
236144
236662
|
const [newDialogOpen, setNewDialogOpen] = reactExports.useState(false);
|
|
236145
236663
|
const [editSchedule, setEditSchedule] = reactExports.useState(null);
|
|
236146
236664
|
const [timezone, setTimezone] = reactExports.useState("");
|
|
@@ -236148,8 +236666,17 @@ function Automation() {
|
|
|
236148
236666
|
request.getServerTimezone().then(setTimezone).catch(() => {
|
|
236149
236667
|
});
|
|
236150
236668
|
}, []);
|
|
236669
|
+
reactExports.useEffect(() => {
|
|
236670
|
+
if (!loading) {
|
|
236671
|
+
setShowLoading(false);
|
|
236672
|
+
return;
|
|
236673
|
+
}
|
|
236674
|
+
const timer2 = setTimeout(() => setShowLoading(true), 500);
|
|
236675
|
+
return () => clearTimeout(timer2);
|
|
236676
|
+
}, [loading]);
|
|
236151
236677
|
const loadSchedules = reactExports.useCallback(async () => {
|
|
236152
236678
|
try {
|
|
236679
|
+
setLoading(true);
|
|
236153
236680
|
const list2 = await request.listSchedules();
|
|
236154
236681
|
setSchedules(list2 ?? []);
|
|
236155
236682
|
} catch (err) {
|
|
@@ -236161,10 +236688,19 @@ function Automation() {
|
|
|
236161
236688
|
reactExports.useEffect(() => {
|
|
236162
236689
|
void loadSchedules();
|
|
236163
236690
|
}, [loadSchedules]);
|
|
236691
|
+
const [, setTick] = reactExports.useState(0);
|
|
236692
|
+
reactExports.useEffect(() => {
|
|
236693
|
+
const timer2 = setInterval(() => setTick((t22) => t22 + 1), 3e4);
|
|
236694
|
+
return () => clearInterval(timer2);
|
|
236695
|
+
}, []);
|
|
236164
236696
|
reactExports.useEffect(() => {
|
|
236165
236697
|
const handleChanged = () => void loadSchedules();
|
|
236166
236698
|
subscribe$1.on("schedules-changed", handleChanged);
|
|
236167
|
-
|
|
236699
|
+
subscribe$1.on("task-update", handleChanged);
|
|
236700
|
+
return () => {
|
|
236701
|
+
subscribe$1.off("schedules-changed", handleChanged);
|
|
236702
|
+
subscribe$1.off("task-update", handleChanged);
|
|
236703
|
+
};
|
|
236168
236704
|
}, [loadSchedules]);
|
|
236169
236705
|
const handleTrigger = async (scheduleId) => {
|
|
236170
236706
|
try {
|
|
@@ -236177,7 +236713,9 @@ function Automation() {
|
|
|
236177
236713
|
const handleDelete2 = async (schedule2) => {
|
|
236178
236714
|
await confirm2({
|
|
236179
236715
|
title: t2("automation.deleteTitle", "Delete Schedule"),
|
|
236180
|
-
content: t2("automation.deleteConfirm", 'Delete "{{name}}" permanently?', {
|
|
236716
|
+
content: t2("automation.deleteConfirm", 'Delete "{{name}}" permanently?', {
|
|
236717
|
+
name: schedule2.name
|
|
236718
|
+
}),
|
|
236181
236719
|
buttons: [
|
|
236182
236720
|
{ text: t2("automation.cancel", "Cancel"), value: null, variant: "outline" },
|
|
236183
236721
|
{
|
|
@@ -236208,14 +236746,32 @@ function Automation() {
|
|
|
236208
236746
|
};
|
|
236209
236747
|
if (loading) {
|
|
236210
236748
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: [
|
|
236211
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236212
|
-
|
|
236213
|
-
|
|
236214
|
-
"
|
|
236215
|
-
|
|
236216
|
-
|
|
236217
|
-
|
|
236218
|
-
|
|
236749
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236750
|
+
"div",
|
|
236751
|
+
{
|
|
236752
|
+
className: "h-12 shrink-0 border-b border-border flex items-center justify-between pl-4 pr-2",
|
|
236753
|
+
style: { WebkitAppRegion: "drag" },
|
|
236754
|
+
children: [
|
|
236755
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
236756
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium", children: t2("automation.title", "Automation") }),
|
|
236757
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground font-normal" })
|
|
236758
|
+
] }),
|
|
236759
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236760
|
+
Button,
|
|
236761
|
+
{
|
|
236762
|
+
variant: "default",
|
|
236763
|
+
size: "sm",
|
|
236764
|
+
className: "h-7 text-xs",
|
|
236765
|
+
children: [
|
|
236766
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3" }),
|
|
236767
|
+
t2("automation.newSchedule", "New Schedule")
|
|
236768
|
+
]
|
|
236769
|
+
}
|
|
236770
|
+
) })
|
|
236771
|
+
]
|
|
236772
|
+
}
|
|
236773
|
+
),
|
|
236774
|
+
showLoading && /* @__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
236775
|
] });
|
|
236220
236776
|
}
|
|
236221
236777
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: [
|
|
@@ -236234,104 +236790,160 @@ function Automation() {
|
|
|
236234
236790
|
schedules.length
|
|
236235
236791
|
] })
|
|
236236
236792
|
] }),
|
|
236237
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236238
|
-
|
|
236239
|
-
|
|
236240
|
-
|
|
236793
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236794
|
+
Button,
|
|
236795
|
+
{
|
|
236796
|
+
variant: "default",
|
|
236797
|
+
size: "sm",
|
|
236798
|
+
className: "h-7 text-xs",
|
|
236799
|
+
onClick: () => setNewDialogOpen(true),
|
|
236800
|
+
children: [
|
|
236801
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3" }),
|
|
236802
|
+
t2("automation.newSchedule", "New Schedule")
|
|
236803
|
+
]
|
|
236804
|
+
}
|
|
236805
|
+
) })
|
|
236241
236806
|
]
|
|
236242
236807
|
}
|
|
236243
236808
|
),
|
|
236244
|
-
|
|
236245
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
236246
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
236247
|
-
|
|
236248
|
-
|
|
236249
|
-
|
|
236250
|
-
|
|
236809
|
+
schedules.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center py-20 text-muted-foreground", children: [
|
|
236810
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4 -mt-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClockCheck, { className: "size-6 text-muted-foreground/60" }) }),
|
|
236811
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-foreground/70 mb-1", children: t2("automation.noSchedules", "No schedules yet") }),
|
|
236812
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70 mb-4 max-w-60 text-center", children: t2(
|
|
236813
|
+
"automation.emptyHint",
|
|
236814
|
+
"Schedule AI tasks to run automatically with cron expressions"
|
|
236815
|
+
) }),
|
|
236251
236816
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236252
|
-
|
|
236817
|
+
Button,
|
|
236253
236818
|
{
|
|
236819
|
+
variant: "outline",
|
|
236254
236820
|
size: "sm",
|
|
236255
|
-
className: "
|
|
236256
|
-
onClick: () =>
|
|
236821
|
+
className: "h-7 text-xs",
|
|
236822
|
+
onClick: () => setNewDialogOpen(true),
|
|
236257
236823
|
children: [
|
|
236258
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
236259
|
-
|
|
236260
|
-
|
|
236261
|
-
|
|
236262
|
-
|
|
236263
|
-
|
|
236264
|
-
|
|
236265
|
-
|
|
236266
|
-
|
|
236267
|
-
|
|
236268
|
-
|
|
236269
|
-
|
|
236824
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3 mr-1" }),
|
|
236825
|
+
t2("automation.createFirst", "Create your first schedule")
|
|
236826
|
+
]
|
|
236827
|
+
}
|
|
236828
|
+
)
|
|
236829
|
+
] }) : /* @__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: /* @__PURE__ */ jsxRuntimeExports.jsx(ItemGroup, { className: "gap-0", children: schedules.map((schedule2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
|
236830
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
|
|
236831
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "group/ctx", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236832
|
+
Item,
|
|
236833
|
+
{
|
|
236834
|
+
size: "sm",
|
|
236835
|
+
className: "hover:bg-muted group-data-popup-open/ctx:bg-muted select-none",
|
|
236836
|
+
onClick: () => navigate(`/automation/schedule/${schedule2.id}`),
|
|
236837
|
+
children: [
|
|
236838
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ItemContent, { className: "gap-1.5", children: [
|
|
236839
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ItemTitle, { className: "truncate", children: [
|
|
236840
|
+
schedule2.name,
|
|
236841
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236842
|
+
Badge,
|
|
236843
|
+
{
|
|
236844
|
+
variant: "outline",
|
|
236845
|
+
className: "px-1 text-[10px] leading-none uppercase shrink-0",
|
|
236846
|
+
children: schedule2.agentId
|
|
236847
|
+
}
|
|
236848
|
+
)
|
|
236270
236849
|
] }),
|
|
236271
|
-
|
|
236272
|
-
|
|
236273
|
-
|
|
236274
|
-
|
|
236275
|
-
|
|
236276
|
-
|
|
236277
|
-
|
|
236278
|
-
|
|
236279
|
-
|
|
236280
|
-
|
|
236281
|
-
|
|
236282
|
-
|
|
236283
|
-
"
|
|
236850
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ItemDescription, { className: "line-clamp-1 text-xs", children: [
|
|
236851
|
+
getScheduleLabel(schedule2),
|
|
236852
|
+
schedule2.lastRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
236853
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
|
|
236854
|
+
t2("automation.cron.lastRun", "Last run"),
|
|
236855
|
+
":",
|
|
236856
|
+
" ",
|
|
236857
|
+
new Date(schedule2.lastRunAt).toLocaleString(i18n.language)
|
|
236858
|
+
] }),
|
|
236859
|
+
schedule2.nextRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
236860
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
|
|
236861
|
+
t2("automation.cron.nextRun", "Next run"),
|
|
236862
|
+
":",
|
|
236863
|
+
" ",
|
|
236864
|
+
new Date(schedule2.nextRunAt).toLocaleString(i18n.language),
|
|
236865
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1.5", children: "·" }),
|
|
236866
|
+
t2("automation.cron.nextRunIn", "Next run in"),
|
|
236867
|
+
" ",
|
|
236868
|
+
formatNextRun(schedule2),
|
|
236869
|
+
timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground/50 ml-0.5", children: [
|
|
236870
|
+
"(",
|
|
236871
|
+
timezone,
|
|
236872
|
+
")"
|
|
236873
|
+
] })
|
|
236284
236874
|
] })
|
|
236285
236875
|
] })
|
|
236876
|
+
] }),
|
|
236877
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ItemActions, { className: "gap-0.5", children: [
|
|
236878
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236879
|
+
Button,
|
|
236880
|
+
{
|
|
236881
|
+
variant: "ghost",
|
|
236882
|
+
size: "icon",
|
|
236883
|
+
className: "size-7 text-foreground/50 hover:text-foreground hover:bg-accent",
|
|
236884
|
+
onClick: (e2) => {
|
|
236885
|
+
e2.stopPropagation();
|
|
236886
|
+
void handleTrigger(schedule2.id);
|
|
236887
|
+
},
|
|
236888
|
+
title: t2("automation.triggerNow", "Trigger now"),
|
|
236889
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3.5" })
|
|
236890
|
+
}
|
|
236891
|
+
),
|
|
236892
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236893
|
+
Button,
|
|
236894
|
+
{
|
|
236895
|
+
variant: "ghost",
|
|
236896
|
+
size: "icon",
|
|
236897
|
+
className: "size-7 text-foreground/50 hover:text-foreground hover:bg-accent",
|
|
236898
|
+
onClick: (e2) => {
|
|
236899
|
+
e2.stopPropagation();
|
|
236900
|
+
setEditSchedule(schedule2);
|
|
236901
|
+
},
|
|
236902
|
+
title: t2("automation.editSettings", "Edit settings"),
|
|
236903
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5" })
|
|
236904
|
+
}
|
|
236905
|
+
),
|
|
236906
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236907
|
+
Button,
|
|
236908
|
+
{
|
|
236909
|
+
variant: "ghost",
|
|
236910
|
+
size: "icon",
|
|
236911
|
+
className: "size-7 text-destructive/50 hover:text-destructive hover:bg-destructive/10",
|
|
236912
|
+
onClick: (e2) => {
|
|
236913
|
+
e2.stopPropagation();
|
|
236914
|
+
void handleDelete2(schedule2);
|
|
236915
|
+
},
|
|
236916
|
+
title: t2("automation.delete", "Delete"),
|
|
236917
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5" })
|
|
236918
|
+
}
|
|
236919
|
+
)
|
|
236286
236920
|
] })
|
|
236287
|
-
]
|
|
236288
|
-
|
|
236289
|
-
|
|
236290
|
-
|
|
236291
|
-
|
|
236292
|
-
|
|
236293
|
-
|
|
236294
|
-
|
|
236295
|
-
|
|
236296
|
-
|
|
236297
|
-
|
|
236298
|
-
|
|
236299
|
-
|
|
236300
|
-
|
|
236301
|
-
|
|
236302
|
-
|
|
236303
|
-
|
|
236304
|
-
|
|
236305
|
-
|
|
236306
|
-
|
|
236307
|
-
|
|
236308
|
-
|
|
236309
|
-
|
|
236310
|
-
|
|
236311
|
-
|
|
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
|
-
),
|
|
236921
|
+
]
|
|
236922
|
+
}
|
|
236923
|
+
) }),
|
|
236924
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
236925
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => void handleTrigger(schedule2.id), children: [
|
|
236926
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3.5 mr-2" }),
|
|
236927
|
+
t2("automation.triggerNow", "Trigger now")
|
|
236928
|
+
] }),
|
|
236929
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => setEditSchedule(schedule2), children: [
|
|
236930
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5 mr-2" }),
|
|
236931
|
+
t2("automation.editSettings", "Edit settings")
|
|
236932
|
+
] }),
|
|
236933
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
236934
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236935
|
+
ContextMenuItem,
|
|
236936
|
+
{
|
|
236937
|
+
variant: "destructive",
|
|
236938
|
+
onClick: () => void handleDelete2(schedule2),
|
|
236939
|
+
children: [
|
|
236940
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5 mr-2" }),
|
|
236941
|
+
t2("automation.delete", "Delete")
|
|
236942
|
+
]
|
|
236943
|
+
}
|
|
236944
|
+
)
|
|
236945
|
+
] })
|
|
236946
|
+
] }),
|
|
236335
236947
|
index2 < schedules.length - 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(ItemSeparator, {})
|
|
236336
236948
|
] }, schedule2.id)) }) }) }),
|
|
236337
236949
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -236357,7 +236969,7 @@ function Automation() {
|
|
|
236357
236969
|
}
|
|
236358
236970
|
function Schedule() {
|
|
236359
236971
|
const { scheduleId } = useParams();
|
|
236360
|
-
const { t: t2 } = useTranslation();
|
|
236972
|
+
const { t: t2, i18n } = useTranslation();
|
|
236361
236973
|
const navigate = useNavigate();
|
|
236362
236974
|
const location2 = useLocation();
|
|
236363
236975
|
const { confirm: confirm2 } = useMessage();
|
|
@@ -236447,84 +237059,191 @@ function Schedule() {
|
|
|
236447
237059
|
}
|
|
236448
237060
|
};
|
|
236449
237061
|
if (loading) {
|
|
236450
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
236451
|
-
|
|
236452
|
-
|
|
236453
|
-
|
|
237062
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237063
|
+
"div",
|
|
237064
|
+
{
|
|
237065
|
+
className: "h-12 shrink-0 border-b border-border flex items-center gap-1 px-2",
|
|
237066
|
+
style: { WebkitAppRegion: "drag" },
|
|
237067
|
+
children: [
|
|
237068
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237069
|
+
Button,
|
|
237070
|
+
{
|
|
237071
|
+
variant: "ghost",
|
|
237072
|
+
size: "icon",
|
|
237073
|
+
className: "size-7 shrink-0",
|
|
237074
|
+
onClick: () => navigate("/automation"),
|
|
237075
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3.5" })
|
|
237076
|
+
}
|
|
237077
|
+
) }),
|
|
237078
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 flex-1 min-w-0" }),
|
|
237079
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground hidden sm:block shrink-0 mr-2" }),
|
|
237080
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", style: { WebkitAppRegion: "no-drag" }, children: [
|
|
237081
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237082
|
+
Button,
|
|
237083
|
+
{
|
|
237084
|
+
variant: "ghost",
|
|
237085
|
+
size: "icon",
|
|
237086
|
+
className: "size-7",
|
|
237087
|
+
title: t2("automation.editSettings", "Edit settings"),
|
|
237088
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5" })
|
|
237089
|
+
}
|
|
237090
|
+
),
|
|
237091
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237092
|
+
Button,
|
|
237093
|
+
{
|
|
237094
|
+
variant: "default",
|
|
237095
|
+
size: "sm",
|
|
237096
|
+
className: "h-7 text-xs shrink-0",
|
|
237097
|
+
onClick: handleTrigger,
|
|
237098
|
+
children: [
|
|
237099
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3 mr-1" }),
|
|
237100
|
+
t2("automation.triggerNow", "Trigger now")
|
|
237101
|
+
]
|
|
237102
|
+
}
|
|
237103
|
+
)
|
|
237104
|
+
] })
|
|
237105
|
+
]
|
|
237106
|
+
}
|
|
237107
|
+
) });
|
|
236454
237108
|
}
|
|
236455
237109
|
if (!schedule2) {
|
|
236456
237110
|
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
237111
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 right-0 h-12", style: { WebkitAppRegion: "drag" } }),
|
|
236458
237112
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-normal text-muted-foreground", children: t2("automation.scheduleNotFound", "Schedule not found") }),
|
|
236459
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236460
|
-
|
|
236461
|
-
|
|
236462
|
-
|
|
237113
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237114
|
+
Button,
|
|
237115
|
+
{
|
|
237116
|
+
variant: "outline",
|
|
237117
|
+
size: "sm",
|
|
237118
|
+
className: "h-7 text-xs",
|
|
237119
|
+
onClick: () => navigate("/automation"),
|
|
237120
|
+
children: [
|
|
237121
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3" }),
|
|
237122
|
+
t2("automation.back", "Back")
|
|
237123
|
+
]
|
|
237124
|
+
}
|
|
237125
|
+
)
|
|
236463
237126
|
] });
|
|
236464
237127
|
}
|
|
236465
237128
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: [
|
|
236466
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236467
|
-
|
|
236468
|
-
|
|
236469
|
-
|
|
236470
|
-
|
|
236471
|
-
|
|
236472
|
-
|
|
236473
|
-
|
|
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,
|
|
237129
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237130
|
+
"div",
|
|
237131
|
+
{
|
|
237132
|
+
className: "h-12 shrink-0 border-b border-border flex items-center gap-1 px-2",
|
|
237133
|
+
style: { WebkitAppRegion: "drag" },
|
|
237134
|
+
children: [
|
|
237135
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { WebkitAppRegion: "no-drag" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237136
|
+
Button,
|
|
236515
237137
|
{
|
|
236516
|
-
variant: "
|
|
236517
|
-
|
|
236518
|
-
|
|
236519
|
-
|
|
236520
|
-
|
|
236521
|
-
]
|
|
237138
|
+
variant: "ghost",
|
|
237139
|
+
size: "icon",
|
|
237140
|
+
className: "size-7 shrink-0",
|
|
237141
|
+
onClick: () => navigate("/automation"),
|
|
237142
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3.5" })
|
|
236522
237143
|
}
|
|
236523
|
-
) })
|
|
236524
|
-
|
|
236525
|
-
|
|
237144
|
+
) }),
|
|
237145
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
237146
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-sm font-medium truncate", children: schedule2.name }),
|
|
237147
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { variant: "outline", className: "px-1 text-[10px] leading-none uppercase shrink-0", children: schedule2.agentId })
|
|
237148
|
+
] }),
|
|
237149
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-muted-foreground hidden sm:block shrink-0 mr-2", children: [
|
|
237150
|
+
schedule2.cron.type === "cron" ? schedule2.cron.expr : t2("automation.manual", "Manual"),
|
|
237151
|
+
schedule2.nextRunAt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
237152
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/40 mx-1", children: "·" }),
|
|
237153
|
+
t2("automation.cron.nextRun", "Next"),
|
|
237154
|
+
":",
|
|
237155
|
+
" ",
|
|
237156
|
+
new Date(schedule2.nextRunAt).toLocaleString(i18n.language),
|
|
237157
|
+
timezone && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground/50 ml-0.5", children: [
|
|
237158
|
+
"(",
|
|
237159
|
+
timezone,
|
|
237160
|
+
")"
|
|
237161
|
+
] })
|
|
237162
|
+
] })
|
|
237163
|
+
] }),
|
|
237164
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", style: { WebkitAppRegion: "no-drag" }, children: [
|
|
237165
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237166
|
+
Button,
|
|
237167
|
+
{
|
|
237168
|
+
variant: "ghost",
|
|
237169
|
+
size: "icon",
|
|
237170
|
+
className: "size-7",
|
|
237171
|
+
onClick: () => setEditDialogOpen(true),
|
|
237172
|
+
title: t2("automation.editSettings", "Edit settings"),
|
|
237173
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-3.5" })
|
|
237174
|
+
}
|
|
237175
|
+
),
|
|
237176
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237177
|
+
Button,
|
|
237178
|
+
{
|
|
237179
|
+
variant: "default",
|
|
237180
|
+
size: "sm",
|
|
237181
|
+
className: "h-7 text-xs shrink-0",
|
|
237182
|
+
onClick: handleTrigger,
|
|
237183
|
+
children: [
|
|
237184
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Play, { className: "size-3 mr-1" }),
|
|
237185
|
+
t2("automation.triggerNow", "Trigger now")
|
|
237186
|
+
]
|
|
237187
|
+
}
|
|
237188
|
+
)
|
|
237189
|
+
] })
|
|
237190
|
+
]
|
|
237191
|
+
}
|
|
237192
|
+
),
|
|
237193
|
+
tasks.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center text-center px-6", children: [
|
|
237194
|
+
/* @__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" }) }),
|
|
237195
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: t2(
|
|
237196
|
+
"automation.noTasksDesc",
|
|
237197
|
+
'No runs yet. Click "Trigger now" to start the first run.'
|
|
237198
|
+
) })
|
|
237199
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(ResizablePanelGroup, { className: "flex-1 min-h-0", children: [
|
|
237200
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237201
|
+
ResizablePanel,
|
|
237202
|
+
{
|
|
237203
|
+
id: "taskList",
|
|
237204
|
+
groupResizeBehavior: "preserve-pixel-size",
|
|
237205
|
+
defaultSize: 200,
|
|
237206
|
+
minSize: 180,
|
|
237207
|
+
maxSize: 400,
|
|
237208
|
+
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) => {
|
|
237209
|
+
const isActive = location2.pathname.endsWith(`/task/${task.id}`);
|
|
237210
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
|
|
237211
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237212
|
+
ContextMenuTrigger,
|
|
237213
|
+
{
|
|
237214
|
+
render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
|
|
237215
|
+
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"}`,
|
|
237216
|
+
onClick: () => navigate(`/automation/schedule/${scheduleId}/task/${task.id}`),
|
|
237217
|
+
children: [
|
|
237218
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
237219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate", children: new Date(task.startedAt).toLocaleDateString(i18n.language) }),
|
|
237220
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: new Date(task.startedAt).toLocaleTimeString(i18n.language) })
|
|
237221
|
+
] }),
|
|
237222
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 ml-2", children: getTaskIcon(task) })
|
|
237223
|
+
]
|
|
237224
|
+
}
|
|
237225
|
+
),
|
|
237226
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237227
|
+
ContextMenuItem,
|
|
237228
|
+
{
|
|
237229
|
+
variant: "destructive",
|
|
237230
|
+
disabled: task.status === "running",
|
|
237231
|
+
onClick: () => void handleDeleteTask(task),
|
|
237232
|
+
children: [
|
|
237233
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-3.5 mr-2" }),
|
|
237234
|
+
t2("automation.delete", "Delete")
|
|
237235
|
+
]
|
|
237236
|
+
}
|
|
237237
|
+
) })
|
|
237238
|
+
] }, task.id);
|
|
237239
|
+
}) }) }) })
|
|
237240
|
+
}
|
|
237241
|
+
),
|
|
236526
237242
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ResizableHandle, { className: "bg-border/70" }),
|
|
236527
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ResizablePanel, { id: "right", children: hasTaskRoute ? /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {}) : /* @__PURE__ */ jsxRuntimeExports.
|
|
237243
|
+
/* @__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: [
|
|
237244
|
+
/* @__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" }) }),
|
|
237245
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground", children: t2("automation.selectTaskToPreview", "Select a task to preview files") })
|
|
237246
|
+
] }) })
|
|
236528
237247
|
] }),
|
|
236529
237248
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236530
237249
|
SettingDialog,
|
|
@@ -236555,7 +237274,70 @@ function getFileKind(filename) {
|
|
|
236555
237274
|
if (ext === "md") return "markdown";
|
|
236556
237275
|
return "text";
|
|
236557
237276
|
}
|
|
236558
|
-
function
|
|
237277
|
+
function base64ToArrayBuffer(base642) {
|
|
237278
|
+
const binaryStr = atob(base642);
|
|
237279
|
+
const bytes = new Uint8Array(binaryStr.length);
|
|
237280
|
+
for (let i3 = 0; i3 < binaryStr.length; i3++) {
|
|
237281
|
+
bytes[i3] = binaryStr.charCodeAt(i3);
|
|
237282
|
+
}
|
|
237283
|
+
return bytes.buffer;
|
|
237284
|
+
}
|
|
237285
|
+
function useTaskFile(scheduleId, taskId, filePath, options = {}) {
|
|
237286
|
+
const { encoding = "text" } = options;
|
|
237287
|
+
const { t: t2 } = useTranslation();
|
|
237288
|
+
const [content2, setContent] = reactExports.useState("");
|
|
237289
|
+
const [loading, setLoading] = reactExports.useState(true);
|
|
237290
|
+
const [errorMsg, setErrorMsg] = reactExports.useState("");
|
|
237291
|
+
reactExports.useEffect(() => {
|
|
237292
|
+
let active = true;
|
|
237293
|
+
setLoading(true);
|
|
237294
|
+
setErrorMsg("");
|
|
237295
|
+
setContent("");
|
|
237296
|
+
async function load2() {
|
|
237297
|
+
try {
|
|
237298
|
+
const data = await request.readTaskFile({
|
|
237299
|
+
scheduleId,
|
|
237300
|
+
taskId,
|
|
237301
|
+
filePath,
|
|
237302
|
+
encoding: encoding === "base64" ? "base64" : void 0
|
|
237303
|
+
});
|
|
237304
|
+
if (!active) return;
|
|
237305
|
+
setContent(data ?? "");
|
|
237306
|
+
} catch {
|
|
237307
|
+
if (active) setErrorMsg(t2("fileDetail.errorLoading", "Failed to load file"));
|
|
237308
|
+
} finally {
|
|
237309
|
+
if (active) setLoading(false);
|
|
237310
|
+
}
|
|
237311
|
+
}
|
|
237312
|
+
load2();
|
|
237313
|
+
return () => {
|
|
237314
|
+
active = false;
|
|
237315
|
+
};
|
|
237316
|
+
}, [scheduleId, taskId, filePath, encoding, t2]);
|
|
237317
|
+
const arrayBuffer = reactExports.useMemo(
|
|
237318
|
+
() => encoding === "base64" ? base64ToArrayBuffer(content2) : new ArrayBuffer(0),
|
|
237319
|
+
[content2, encoding]
|
|
237320
|
+
);
|
|
237321
|
+
return { content: content2, arrayBuffer, loading, errorMsg };
|
|
237322
|
+
}
|
|
237323
|
+
function LoadingState() {
|
|
237324
|
+
const { t: t2 } = useTranslation();
|
|
237325
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground text-center mt-10", children: t2("fileDetail.loading") });
|
|
237326
|
+
}
|
|
237327
|
+
function ErrorState({ message: message2 }) {
|
|
237328
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground text-center mt-10", children: message2 });
|
|
237329
|
+
}
|
|
237330
|
+
function CodeDetail({
|
|
237331
|
+
scheduleId,
|
|
237332
|
+
taskId,
|
|
237333
|
+
fileName,
|
|
237334
|
+
onCopyPath,
|
|
237335
|
+
onCopyAbsolutePath,
|
|
237336
|
+
onRevealInFinder
|
|
237337
|
+
}) {
|
|
237338
|
+
const { t: t2 } = useTranslation();
|
|
237339
|
+
const { content: content2, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName);
|
|
237340
|
+
const [contextSelectedText, setContextSelectedText] = reactExports.useState(null);
|
|
236559
237341
|
const displayContent = reactExports.useMemo(() => {
|
|
236560
237342
|
if (fileName.endsWith(".json")) {
|
|
236561
237343
|
try {
|
|
@@ -236566,13 +237348,169 @@ function CodeDetail({ fileName, content: content2 }) {
|
|
|
236566
237348
|
}
|
|
236567
237349
|
return content2;
|
|
236568
237350
|
}, [fileName, content2]);
|
|
236569
|
-
|
|
237351
|
+
const handleCopyContent = reactExports.useCallback(() => {
|
|
237352
|
+
copyText(displayContent);
|
|
237353
|
+
}, [displayContent]);
|
|
237354
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237355
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237356
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237357
|
+
ContextMenu,
|
|
237358
|
+
{
|
|
237359
|
+
onOpenChange: (open2) => {
|
|
237360
|
+
if (open2) setContextSelectedText(window.getSelection()?.toString() ?? "");
|
|
237361
|
+
else setContextSelectedText(null);
|
|
237362
|
+
},
|
|
237363
|
+
children: [
|
|
237364
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeView, { className: "min-h-full", content: displayContent, filename: fileName }) }),
|
|
237365
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
237366
|
+
contextSelectedText && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => copyText(contextSelectedText), children: [
|
|
237367
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237368
|
+
" ",
|
|
237369
|
+
t2("contextMenu.copy")
|
|
237370
|
+
] }),
|
|
237371
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleCopyContent, children: [
|
|
237372
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237373
|
+
" ",
|
|
237374
|
+
t2("fileDetail.copyFileContent", "Copy file content")
|
|
237375
|
+
] }),
|
|
237376
|
+
(onCopyPath || onCopyAbsolutePath || onRevealInFinder) && /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
237377
|
+
onCopyAbsolutePath && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onCopyAbsolutePath, children: [
|
|
237378
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237379
|
+
" ",
|
|
237380
|
+
t2("filePanel.copyPath", "Copy Path")
|
|
237381
|
+
] }),
|
|
237382
|
+
onCopyPath && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onCopyPath, children: [
|
|
237383
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237384
|
+
" ",
|
|
237385
|
+
t2("filePanel.copyRelativePath", "Copy Relative Path")
|
|
237386
|
+
] }),
|
|
237387
|
+
!isWebUI && onRevealInFinder && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onRevealInFinder, children: [
|
|
237388
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, {}),
|
|
237389
|
+
" ",
|
|
237390
|
+
t2("filePanel.revealInFinder", "Reveal in Finder")
|
|
237391
|
+
] })
|
|
237392
|
+
] })
|
|
237393
|
+
]
|
|
237394
|
+
}
|
|
237395
|
+
) });
|
|
236570
237396
|
}
|
|
236571
|
-
function MarkdownDetail({
|
|
237397
|
+
function MarkdownDetail({
|
|
237398
|
+
scheduleId,
|
|
237399
|
+
taskId,
|
|
237400
|
+
fileName,
|
|
237401
|
+
onCopyPath,
|
|
237402
|
+
onCopyAbsolutePath,
|
|
237403
|
+
onRevealInFinder,
|
|
237404
|
+
onNavigateFile
|
|
237405
|
+
}) {
|
|
236572
237406
|
const { t: t2 } = useTranslation();
|
|
237407
|
+
const { content: content2, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName);
|
|
236573
237408
|
const [viewMode, setViewMode] = reactExports.useState("preview");
|
|
237409
|
+
const [contextSelectedText, setContextSelectedText] = reactExports.useState(null);
|
|
237410
|
+
const webUIStatus = useAppStore((s16) => s16.webUIStatus);
|
|
237411
|
+
const resolvePath2 = reactExports.useCallback(
|
|
237412
|
+
(src) => {
|
|
237413
|
+
if (!src || /^(https?:|data:|#|mailto:|blob:)/.test(src)) return src;
|
|
237414
|
+
const dir = fileName.includes("/") ? fileName.substring(0, fileName.lastIndexOf("/")) : "";
|
|
237415
|
+
const raw2 = src.startsWith("/") ? src.slice(1) : dir ? `${dir}/${src}` : src;
|
|
237416
|
+
const parts = raw2.split("/");
|
|
237417
|
+
const normalized = [];
|
|
237418
|
+
for (const p3 of parts) {
|
|
237419
|
+
if (p3 === "." || p3 === "") continue;
|
|
237420
|
+
if (p3 === ".." && normalized.length) normalized.pop();
|
|
237421
|
+
else if (p3 !== "..") normalized.push(p3);
|
|
237422
|
+
}
|
|
237423
|
+
return normalized.join("/");
|
|
237424
|
+
},
|
|
237425
|
+
[fileName]
|
|
237426
|
+
);
|
|
237427
|
+
const imageSource = reactExports.useMemo(() => {
|
|
237428
|
+
let httpBase = null;
|
|
237429
|
+
if (webUIStatus.enabled && webUIStatus.url) {
|
|
237430
|
+
try {
|
|
237431
|
+
const parsed = new URL(webUIStatus.url);
|
|
237432
|
+
const port = new URLSearchParams(parsed.search).get("port") || parsed.port;
|
|
237433
|
+
httpBase = `${parsed.protocol}//${parsed.hostname}:${port}`;
|
|
237434
|
+
} catch {
|
|
237435
|
+
}
|
|
237436
|
+
}
|
|
237437
|
+
const basePath = `automation/${scheduleId}/task/${taskId}`;
|
|
237438
|
+
return (src) => {
|
|
237439
|
+
if (!src || /^(https?:|data:|#|mailto:|blob:)/.test(src)) return src;
|
|
237440
|
+
const resolved = resolvePath2(src);
|
|
237441
|
+
if (isWebUI && httpBase) return `${httpBase}/${basePath}/${resolved}`;
|
|
237442
|
+
return `web://${basePath}/${resolved}`;
|
|
237443
|
+
};
|
|
237444
|
+
}, [scheduleId, taskId, resolvePath2, webUIStatus]);
|
|
237445
|
+
const handleCopyContent = reactExports.useCallback(() => {
|
|
237446
|
+
copyText(content2);
|
|
237447
|
+
}, [content2]);
|
|
237448
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237449
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237450
|
+
const contextMenuItems = /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
237451
|
+
contextSelectedText && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => copyText(contextSelectedText), children: [
|
|
237452
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237453
|
+
" ",
|
|
237454
|
+
t2("contextMenu.copy")
|
|
237455
|
+
] }),
|
|
237456
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleCopyContent, children: [
|
|
237457
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237458
|
+
" ",
|
|
237459
|
+
t2("fileDetail.copyFileContent", "Copy file content")
|
|
237460
|
+
] }),
|
|
237461
|
+
(onCopyPath || onCopyAbsolutePath || onRevealInFinder) && /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
237462
|
+
onCopyAbsolutePath && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onCopyAbsolutePath, children: [
|
|
237463
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237464
|
+
" ",
|
|
237465
|
+
t2("filePanel.copyPath", "Copy Path")
|
|
237466
|
+
] }),
|
|
237467
|
+
onCopyPath && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onCopyPath, children: [
|
|
237468
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237469
|
+
" ",
|
|
237470
|
+
t2("filePanel.copyRelativePath", "Copy Relative Path")
|
|
237471
|
+
] }),
|
|
237472
|
+
!isWebUI && onRevealInFinder && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onRevealInFinder, children: [
|
|
237473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, {}),
|
|
237474
|
+
" ",
|
|
237475
|
+
t2("filePanel.revealInFinder", "Reveal in Finder")
|
|
237476
|
+
] })
|
|
237477
|
+
] });
|
|
236574
237478
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-full overflow-hidden", children: [
|
|
236575
|
-
viewMode === "preview" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.
|
|
237479
|
+
viewMode === "preview" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237480
|
+
ContextMenu,
|
|
237481
|
+
{
|
|
237482
|
+
onOpenChange: (open2) => {
|
|
237483
|
+
if (open2) setContextSelectedText(window.getSelection()?.toString() ?? "");
|
|
237484
|
+
else setContextSelectedText(null);
|
|
237485
|
+
},
|
|
237486
|
+
children: [
|
|
237487
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full select-text", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 max-w-3xl", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237488
|
+
StreamMarkdown,
|
|
237489
|
+
{
|
|
237490
|
+
imageSource,
|
|
237491
|
+
onLinkClick: onNavigateFile ? (href) => {
|
|
237492
|
+
onNavigateFile(resolvePath2(href));
|
|
237493
|
+
return false;
|
|
237494
|
+
} : void 0,
|
|
237495
|
+
children: content2
|
|
237496
|
+
}
|
|
237497
|
+
) }) }),
|
|
237498
|
+
contextMenuItems
|
|
237499
|
+
]
|
|
237500
|
+
}
|
|
237501
|
+
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237502
|
+
ContextMenu,
|
|
237503
|
+
{
|
|
237504
|
+
onOpenChange: (open2) => {
|
|
237505
|
+
if (open2) setContextSelectedText(window.getSelection()?.toString() ?? "");
|
|
237506
|
+
else setContextSelectedText(null);
|
|
237507
|
+
},
|
|
237508
|
+
children: [
|
|
237509
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeView, { className: "min-h-full", content: content2, filename: fileName }) }),
|
|
237510
|
+
contextMenuItems
|
|
237511
|
+
]
|
|
237512
|
+
}
|
|
237513
|
+
) }),
|
|
236576
237514
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-4 left-0 right-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236577
237515
|
Tabs,
|
|
236578
237516
|
{
|
|
@@ -236587,87 +237525,293 @@ function MarkdownDetail({ fileName, content: content2 }) {
|
|
|
236587
237525
|
) })
|
|
236588
237526
|
] });
|
|
236589
237527
|
}
|
|
236590
|
-
function
|
|
236591
|
-
|
|
236592
|
-
|
|
236593
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236594
|
-
|
|
237528
|
+
function Controls() {
|
|
237529
|
+
const { zoomIn: zoomIn2, zoomOut: zoomOut2, resetTransform: resetTransform2 } = useControls();
|
|
237530
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex items-center gap-1 bg-popover/90 backdrop-blur border border-border rounded-lg shadow-lg px-2 py-1.5", children: [
|
|
237531
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237532
|
+
"button",
|
|
237533
|
+
{
|
|
237534
|
+
type: "button",
|
|
237535
|
+
onClick: () => zoomOut2(),
|
|
237536
|
+
className: "flex size-7 items-center justify-center rounded hover:bg-muted transition-colors",
|
|
237537
|
+
"aria-label": "Zoom out",
|
|
237538
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ZoomOut, { className: "size-4" })
|
|
237539
|
+
}
|
|
237540
|
+
),
|
|
237541
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237542
|
+
"button",
|
|
237543
|
+
{
|
|
237544
|
+
type: "button",
|
|
237545
|
+
onClick: () => resetTransform2(),
|
|
237546
|
+
className: "flex size-7 items-center justify-center rounded hover:bg-muted transition-colors",
|
|
237547
|
+
"aria-label": "Reset",
|
|
237548
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Undo2, { className: "size-3.5" })
|
|
237549
|
+
}
|
|
237550
|
+
),
|
|
237551
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237552
|
+
"button",
|
|
237553
|
+
{
|
|
237554
|
+
type: "button",
|
|
237555
|
+
onClick: () => zoomIn2(),
|
|
237556
|
+
className: "flex size-7 items-center justify-center rounded hover:bg-muted transition-colors",
|
|
237557
|
+
"aria-label": "Zoom in",
|
|
237558
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ZoomIn, { className: "size-4" })
|
|
237559
|
+
}
|
|
237560
|
+
)
|
|
237561
|
+
] });
|
|
236595
237562
|
}
|
|
236596
|
-
function
|
|
236597
|
-
|
|
236598
|
-
|
|
236599
|
-
|
|
236600
|
-
|
|
237563
|
+
function ImageDetail({ scheduleId, taskId, fileName }) {
|
|
237564
|
+
const { content: content2, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName, { encoding: "base64" });
|
|
237565
|
+
const src = reactExports.useMemo(() => {
|
|
237566
|
+
if (!content2) return "";
|
|
237567
|
+
const ext = fileName.split(".").pop()?.toLowerCase() || "";
|
|
237568
|
+
let mimeType = ext;
|
|
237569
|
+
if (ext === "svg") mimeType = "svg+xml";
|
|
237570
|
+
else if (ext === "jpg") mimeType = "jpeg";
|
|
237571
|
+
return `data:image/${mimeType};base64,${content2}`;
|
|
237572
|
+
}, [fileName, content2]);
|
|
237573
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237574
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237575
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237576
|
+
TransformWrapper,
|
|
237577
|
+
{
|
|
237578
|
+
initialScale: 1,
|
|
237579
|
+
minScale: 0.1,
|
|
237580
|
+
maxScale: 10,
|
|
237581
|
+
centerOnInit: true,
|
|
237582
|
+
wheel: { step: 2e-3 },
|
|
237583
|
+
children: [
|
|
237584
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Controls, {}),
|
|
237585
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237586
|
+
TransformComponent,
|
|
237587
|
+
{
|
|
237588
|
+
wrapperStyle: { width: "100%", height: "100%" },
|
|
237589
|
+
contentStyle: {
|
|
237590
|
+
width: "100%",
|
|
237591
|
+
height: "100%",
|
|
237592
|
+
display: "flex",
|
|
237593
|
+
alignItems: "center",
|
|
237594
|
+
justifyContent: "center"
|
|
237595
|
+
},
|
|
237596
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237597
|
+
"img",
|
|
237598
|
+
{
|
|
237599
|
+
src,
|
|
237600
|
+
alt: fileName,
|
|
237601
|
+
className: "max-w-full max-h-full object-contain select-none",
|
|
237602
|
+
draggable: false
|
|
237603
|
+
}
|
|
237604
|
+
)
|
|
237605
|
+
}
|
|
237606
|
+
)
|
|
237607
|
+
]
|
|
237608
|
+
}
|
|
237609
|
+
) });
|
|
236601
237610
|
}
|
|
236602
|
-
function
|
|
236603
|
-
|
|
236604
|
-
|
|
236605
|
-
|
|
236606
|
-
|
|
237611
|
+
function PdfDetail({ scheduleId, taskId, fileName }) {
|
|
237612
|
+
const { arrayBuffer, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName, { encoding: "base64" });
|
|
237613
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237614
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237615
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PdfView, { data: arrayBuffer, filename: fileName }) });
|
|
236607
237616
|
}
|
|
236608
|
-
function
|
|
236609
|
-
|
|
236610
|
-
|
|
236611
|
-
|
|
236612
|
-
|
|
237617
|
+
function DocxDetail({ scheduleId, taskId, fileName }) {
|
|
237618
|
+
const { arrayBuffer, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName, { encoding: "base64" });
|
|
237619
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237620
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237621
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DocxView, { data: arrayBuffer, filename: fileName }) });
|
|
236613
237622
|
}
|
|
236614
|
-
function
|
|
236615
|
-
|
|
236616
|
-
|
|
236617
|
-
|
|
236618
|
-
|
|
237623
|
+
function PptxDetail({ scheduleId, taskId, fileName }) {
|
|
237624
|
+
const { arrayBuffer, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName, { encoding: "base64" });
|
|
237625
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237626
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237627
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PptxView, { data: arrayBuffer, filename: fileName }) });
|
|
236619
237628
|
}
|
|
236620
|
-
function
|
|
236621
|
-
const
|
|
236622
|
-
|
|
236623
|
-
|
|
237629
|
+
function XlsxDetail({ scheduleId, taskId, fileName }) {
|
|
237630
|
+
const { arrayBuffer, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName, { encoding: "base64" });
|
|
237631
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237632
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237633
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(XlsxView, { data: arrayBuffer, filename: fileName }) });
|
|
237634
|
+
}
|
|
237635
|
+
function HtmlDetail({
|
|
237636
|
+
scheduleId,
|
|
237637
|
+
taskId,
|
|
237638
|
+
fileName,
|
|
237639
|
+
onCopyPath,
|
|
237640
|
+
onCopyAbsolutePath,
|
|
237641
|
+
onRevealInFinder
|
|
237642
|
+
}) {
|
|
237643
|
+
const { t: t2 } = useTranslation();
|
|
237644
|
+
const { content: content2, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName);
|
|
237645
|
+
const [viewMode, setViewMode] = reactExports.useState("preview");
|
|
237646
|
+
const [retryKey, setRetryKey] = reactExports.useState(0);
|
|
237647
|
+
const [contextSelectedText, setContextSelectedText] = reactExports.useState(null);
|
|
237648
|
+
const webUIStatus = useAppStore((s16) => s16.webUIStatus);
|
|
237649
|
+
const httpBaseUrl = reactExports.useMemo(() => {
|
|
237650
|
+
if (webUIStatus.enabled && webUIStatus.url) {
|
|
237651
|
+
try {
|
|
237652
|
+
const parsed = new URL(webUIStatus.url);
|
|
237653
|
+
const urlParams = new URLSearchParams(parsed.search);
|
|
237654
|
+
const port = urlParams.get("port") || parsed.port;
|
|
237655
|
+
return `${parsed.protocol}//${parsed.hostname}:${port}`;
|
|
237656
|
+
} catch {
|
|
237657
|
+
return webUIStatus.url;
|
|
237658
|
+
}
|
|
236624
237659
|
}
|
|
236625
|
-
return
|
|
237660
|
+
return null;
|
|
237661
|
+
}, [webUIStatus]);
|
|
237662
|
+
const iframeUrl = reactExports.useMemo(() => {
|
|
237663
|
+
const path2 = `/automation/${scheduleId}/task/${taskId}/${fileName}`;
|
|
237664
|
+
if (isWebUI && httpBaseUrl) return `${httpBaseUrl}${path2}`;
|
|
237665
|
+
return `web://automation/${scheduleId}/task/${taskId}/${fileName}`;
|
|
237666
|
+
}, [httpBaseUrl, scheduleId, taskId, fileName]);
|
|
237667
|
+
const httpUrl = reactExports.useMemo(() => {
|
|
237668
|
+
if (!httpBaseUrl) return null;
|
|
237669
|
+
return `${httpBaseUrl}/automation/${scheduleId}/task/${taskId}/${fileName}`;
|
|
237670
|
+
}, [httpBaseUrl, scheduleId, taskId, fileName]);
|
|
237671
|
+
const handleOpenExternal = reactExports.useCallback(() => {
|
|
237672
|
+
if (httpUrl) window.open(httpUrl, "_blank", "noopener,noreferrer");
|
|
237673
|
+
}, [httpUrl]);
|
|
237674
|
+
const handleCopyContent = reactExports.useCallback(() => {
|
|
237675
|
+
copyText(content2);
|
|
236626
237676
|
}, [content2]);
|
|
236627
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236628
|
-
|
|
236629
|
-
|
|
236630
|
-
|
|
236631
|
-
className: "
|
|
236632
|
-
|
|
236633
|
-
|
|
236634
|
-
|
|
236635
|
-
|
|
236636
|
-
|
|
236637
|
-
|
|
236638
|
-
|
|
236639
|
-
|
|
236640
|
-
|
|
236641
|
-
|
|
236642
|
-
|
|
236643
|
-
|
|
236644
|
-
|
|
236645
|
-
|
|
236646
|
-
|
|
237677
|
+
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
237678
|
+
if (errorMsg) return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg });
|
|
237679
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-full w-full overflow-hidden", children: [
|
|
237680
|
+
viewMode === "preview" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-full w-full flex flex-col", children: [
|
|
237681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-10 shrink-0 flex items-center justify-between pl-3 pr-2 border-b border-border bg-background/80", children: [
|
|
237682
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-muted-foreground truncate mr-4", children: iframeUrl }),
|
|
237683
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center shrink-0", children: [
|
|
237684
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237685
|
+
"button",
|
|
237686
|
+
{
|
|
237687
|
+
type: "button",
|
|
237688
|
+
onClick: handleOpenExternal,
|
|
237689
|
+
disabled: !httpUrl,
|
|
237690
|
+
className: "flex items-center size-6 justify-center rounded text-xs text-muted-foreground hover:text-foreground hover:bg-muted transition-colors disabled:opacity-40 disabled:pointer-events-none",
|
|
237691
|
+
title: t2("htmlDetail.openInBrowser", "Open in browser"),
|
|
237692
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "size-3.5" })
|
|
237693
|
+
}
|
|
237694
|
+
),
|
|
237695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237696
|
+
"button",
|
|
237697
|
+
{
|
|
237698
|
+
type: "button",
|
|
237699
|
+
onClick: () => setRetryKey((k2) => k2 + 1),
|
|
237700
|
+
className: "flex items-center size-6 justify-center rounded text-xs text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
237701
|
+
title: t2("htmlDetail.refresh", "Refresh"),
|
|
237702
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-3" })
|
|
237703
|
+
}
|
|
237704
|
+
)
|
|
237705
|
+
] })
|
|
237706
|
+
] }),
|
|
237707
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237708
|
+
"iframe",
|
|
237709
|
+
{
|
|
237710
|
+
src: iframeUrl,
|
|
237711
|
+
className: "flex-1 w-full border-0 bg-white",
|
|
237712
|
+
sandbox: "allow-scripts allow-popups allow-forms allow-modals",
|
|
237713
|
+
title: fileName
|
|
237714
|
+
},
|
|
237715
|
+
retryKey
|
|
237716
|
+
)
|
|
237717
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
237718
|
+
ContextMenu,
|
|
237719
|
+
{
|
|
237720
|
+
onOpenChange: (open2) => {
|
|
237721
|
+
if (open2) setContextSelectedText(window.getSelection()?.toString() ?? "");
|
|
237722
|
+
else setContextSelectedText(null);
|
|
237723
|
+
},
|
|
237724
|
+
children: [
|
|
237725
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeView, { className: "min-h-full", content: content2, filename: fileName }) }),
|
|
237726
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
237727
|
+
contextSelectedText && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => copyText(contextSelectedText), children: [
|
|
237728
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237729
|
+
" ",
|
|
237730
|
+
t2("contextMenu.copy")
|
|
237731
|
+
] }),
|
|
237732
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleCopyContent, children: [
|
|
237733
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237734
|
+
" ",
|
|
237735
|
+
t2("fileDetail.copyFileContent", "Copy file content")
|
|
237736
|
+
] }),
|
|
237737
|
+
(onCopyPath || onCopyAbsolutePath || onRevealInFinder) && /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
237738
|
+
onCopyAbsolutePath && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onCopyAbsolutePath, children: [
|
|
237739
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237740
|
+
" ",
|
|
237741
|
+
t2("filePanel.copyPath", "Copy Path")
|
|
237742
|
+
] }),
|
|
237743
|
+
onCopyPath && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onCopyPath, children: [
|
|
237744
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
237745
|
+
" ",
|
|
237746
|
+
t2("filePanel.copyRelativePath", "Copy Relative Path")
|
|
237747
|
+
] }),
|
|
237748
|
+
!isWebUI && onRevealInFinder && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: onRevealInFinder, children: [
|
|
237749
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, {}),
|
|
237750
|
+
" ",
|
|
237751
|
+
t2("filePanel.revealInFinder", "Reveal in Finder")
|
|
237752
|
+
] })
|
|
237753
|
+
] })
|
|
237754
|
+
]
|
|
237755
|
+
}
|
|
237756
|
+
) }),
|
|
237757
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-4 left-0 right-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237758
|
+
Tabs,
|
|
237759
|
+
{
|
|
237760
|
+
value: viewMode,
|
|
237761
|
+
onValueChange: (v4) => setViewMode(v4),
|
|
237762
|
+
className: "pointer-events-auto",
|
|
237763
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { className: "h-8 border border-border shadow-lg", children: [
|
|
237764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "preview", className: "text-xs min-w-18", children: t2("fileDetail.preview", "Preview") }),
|
|
237765
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "code", className: "text-xs min-w-18", children: t2("fileDetail.code", "Code") })
|
|
237766
|
+
] })
|
|
237767
|
+
}
|
|
237768
|
+
) })
|
|
237769
|
+
] });
|
|
236647
237770
|
}
|
|
236648
|
-
function FileDetail({
|
|
237771
|
+
function FileDetail({
|
|
237772
|
+
scheduleId,
|
|
237773
|
+
taskId,
|
|
237774
|
+
fileName,
|
|
237775
|
+
hasTask,
|
|
237776
|
+
hasFiles,
|
|
237777
|
+
onCopyPath,
|
|
237778
|
+
onCopyAbsolutePath,
|
|
237779
|
+
onRevealInFinder
|
|
237780
|
+
}) {
|
|
236649
237781
|
const { t: t2 } = useTranslation();
|
|
236650
237782
|
const fileKind = reactExports.useMemo(() => getFileKind(fileName), [fileName]);
|
|
236651
|
-
const isUnsupportedBinary = reactExports.useMemo(() => {
|
|
236652
|
-
if (!fileContent || !fileName) return false;
|
|
236653
|
-
if (fileKind === "image" || fileKind === "pdf" || fileKind === "docx" || fileKind === "pptx" || fileKind === "xlsx") return false;
|
|
236654
|
-
return isBinaryContent(fileContent);
|
|
236655
|
-
}, [fileContent, fileName, fileKind]);
|
|
236656
237783
|
if (!hasTask) {
|
|
236657
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
237784
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground", children: [
|
|
237785
|
+
/* @__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" }) }),
|
|
237786
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.selectTaskToPreview", "Select a task to preview files") })
|
|
237787
|
+
] });
|
|
236658
237788
|
}
|
|
236659
237789
|
if (!hasFiles) {
|
|
236660
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
237790
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground", children: [
|
|
237791
|
+
/* @__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" }) }),
|
|
237792
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.noFiles", "No files generated") })
|
|
237793
|
+
] });
|
|
236661
237794
|
}
|
|
236662
237795
|
if (!fileName) {
|
|
236663
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
237796
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground", children: [
|
|
237797
|
+
/* @__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" }) }),
|
|
237798
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.selectFileToPreview", "Select a file to preview") })
|
|
237799
|
+
] });
|
|
236664
237800
|
}
|
|
237801
|
+
const contextProps = {
|
|
237802
|
+
scheduleId,
|
|
237803
|
+
taskId,
|
|
237804
|
+
fileName,
|
|
237805
|
+
onCopyPath: onCopyPath ? () => onCopyPath(fileName) : void 0,
|
|
237806
|
+
onCopyAbsolutePath: onCopyAbsolutePath ? () => onCopyAbsolutePath(fileName) : void 0,
|
|
237807
|
+
onRevealInFinder: onRevealInFinder ? () => onRevealInFinder(fileName) : void 0
|
|
237808
|
+
};
|
|
236665
237809
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full h-full min-w-0 relative overflow-hidden", children: [
|
|
236666
237810
|
/* @__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: [
|
|
236667
237811
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: fileName, className: "size-4 shrink-0 text-muted-foreground/80" }),
|
|
236668
237812
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col min-w-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs truncate leading-tight text-foreground/60", children: fileName }) })
|
|
236669
237813
|
] }) }) }),
|
|
236670
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative flex-1 min-h-0 overflow-hidden", children:
|
|
237814
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative flex-1 min-h-0 overflow-hidden", children: fileKind === "image" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ImageDetail, { ...contextProps }) : fileKind === "markdown" ? /* @__PURE__ */ jsxRuntimeExports.jsx(MarkdownDetail, { ...contextProps }) : fileKind === "html" ? /* @__PURE__ */ jsxRuntimeExports.jsx(HtmlDetail, { ...contextProps }) : fileKind === "pdf" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PdfDetail, { ...contextProps }) : fileKind === "docx" ? /* @__PURE__ */ jsxRuntimeExports.jsx(DocxDetail, { ...contextProps }) : fileKind === "pptx" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PptxDetail, { ...contextProps }) : fileKind === "xlsx" ? /* @__PURE__ */ jsxRuntimeExports.jsx(XlsxDetail, { ...contextProps }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CodeDetail, { ...contextProps }) })
|
|
236671
237815
|
] });
|
|
236672
237816
|
}
|
|
236673
237817
|
function buildTree2(paths) {
|
|
@@ -236692,7 +237836,17 @@ function buildTree2(paths) {
|
|
|
236692
237836
|
if (existing.children) current = existing.children;
|
|
236693
237837
|
}
|
|
236694
237838
|
}
|
|
236695
|
-
|
|
237839
|
+
function sortNodes(nodes) {
|
|
237840
|
+
nodes.sort((a2, b2) => {
|
|
237841
|
+
if (a2.isFolder !== b2.isFolder) return a2.isFolder ? -1 : 1;
|
|
237842
|
+
return a2.name.localeCompare(b2.name);
|
|
237843
|
+
});
|
|
237844
|
+
for (const n2 of nodes) {
|
|
237845
|
+
if (n2.children) sortNodes(n2.children);
|
|
237846
|
+
}
|
|
237847
|
+
return nodes;
|
|
237848
|
+
}
|
|
237849
|
+
return sortNodes(root2);
|
|
236696
237850
|
}
|
|
236697
237851
|
function FileTree({
|
|
236698
237852
|
nodes,
|
|
@@ -236722,10 +237876,12 @@ function FileTree({
|
|
|
236722
237876
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236723
237877
|
ChevronRight,
|
|
236724
237878
|
{
|
|
236725
|
-
className: cn$5(
|
|
237879
|
+
className: cn$5(
|
|
237880
|
+
"size-3.5 shrink-0 text-muted-foreground transition-transform scale-110",
|
|
237881
|
+
isOpen && "rotate-90"
|
|
237882
|
+
)
|
|
236726
237883
|
}
|
|
236727
237884
|
),
|
|
236728
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Folder$1, { className: "size-4 shrink-0 text-muted-foreground/90" }),
|
|
236729
237885
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate leading-normal", children: node2.name })
|
|
236730
237886
|
]
|
|
236731
237887
|
}
|
|
@@ -236758,20 +237914,19 @@ function FileTree({
|
|
|
236758
237914
|
style: { paddingLeft: `${depth * 16 + 6}px` },
|
|
236759
237915
|
onClick: () => onSelectFile(node2.path),
|
|
236760
237916
|
children: [
|
|
236761
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236762
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node2.name, className: "size-4 shrink-0 text-muted-foreground/90" }),
|
|
237917
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node2.name, className: "size-3.5 shrink-0 text-muted-foreground/90" }),
|
|
236763
237918
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate leading-normal", children: node2.name })
|
|
236764
237919
|
]
|
|
236765
237920
|
}
|
|
236766
237921
|
),
|
|
236767
237922
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
236768
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () =>
|
|
237923
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onCopyAbsolutePath(node2.path), children: [
|
|
236769
237924
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3.5 mr-2" }),
|
|
236770
237925
|
t2("filePanel.copyPath", "Copy Path")
|
|
236771
237926
|
] }),
|
|
236772
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () =>
|
|
237927
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onCopyRelativePath(node2.path), children: [
|
|
236773
237928
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3.5 mr-2" }),
|
|
236774
|
-
t2("filePanel.
|
|
237929
|
+
t2("filePanel.copyRelativePath", "Copy Relative Path")
|
|
236775
237930
|
] }),
|
|
236776
237931
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
236777
237932
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onRevealInFinder(node2.path), children: [
|
|
@@ -236815,7 +237970,7 @@ function Panel({
|
|
|
236815
237970
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full min-h-0 flex-col text-xs w-full", children: [
|
|
236816
237971
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
|
|
236817
237972
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
|
|
236818
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-
|
|
237973
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-3.5" }),
|
|
236819
237974
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-nowrap", children: t2("automation.files", "Files") })
|
|
236820
237975
|
] }),
|
|
236821
237976
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto mr-2 flex items-center gap-0.5", children: tree.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -236828,7 +237983,13 @@ function Panel({
|
|
|
236828
237983
|
}
|
|
236829
237984
|
) })
|
|
236830
237985
|
] }),
|
|
236831
|
-
|
|
237986
|
+
!hasTask ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center flex-1 min-h-0 -mt-10 text-muted-foreground", children: [
|
|
237987
|
+
/* @__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" }) }),
|
|
237988
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.selectTask", "Select a task") })
|
|
237989
|
+
] }) : 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: [
|
|
237990
|
+
/* @__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" }) }),
|
|
237991
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.noFiles", "No files") })
|
|
237992
|
+
] }) : /* @__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
237993
|
FileTree,
|
|
236833
237994
|
{
|
|
236834
237995
|
nodes: tree,
|
|
@@ -236846,11 +238007,8 @@ function Panel({
|
|
|
236846
238007
|
}
|
|
236847
238008
|
function Task() {
|
|
236848
238009
|
const { scheduleId, taskId } = useParams();
|
|
236849
|
-
const { t: t2 } = useTranslation();
|
|
236850
238010
|
const [taskFiles, setTaskFiles] = reactExports.useState([]);
|
|
236851
238011
|
const [selectedFile, setSelectedFile] = reactExports.useState(null);
|
|
236852
|
-
const [fileContent, setFileContent] = reactExports.useState(null);
|
|
236853
|
-
const [fileLoading, setFileLoading] = reactExports.useState(false);
|
|
236854
238012
|
const [loading, setLoading] = reactExports.useState(true);
|
|
236855
238013
|
const loadFiles = reactExports.useCallback(async () => {
|
|
236856
238014
|
if (!scheduleId || !taskId) return;
|
|
@@ -236859,7 +238017,6 @@ function Task() {
|
|
|
236859
238017
|
setTaskFiles(files ?? []);
|
|
236860
238018
|
const readme = (files ?? []).find((f2) => f2.toLowerCase() === "readme.md");
|
|
236861
238019
|
setSelectedFile(readme ?? null);
|
|
236862
|
-
setFileContent(null);
|
|
236863
238020
|
} catch {
|
|
236864
238021
|
setTaskFiles([]);
|
|
236865
238022
|
} finally {
|
|
@@ -236879,23 +238036,6 @@ function Task() {
|
|
|
236879
238036
|
subscribe$1.on("task-update", handler);
|
|
236880
238037
|
return () => subscribe$1.off("task-update", handler);
|
|
236881
238038
|
}, [scheduleId, taskId, loadFiles]);
|
|
236882
|
-
reactExports.useEffect(() => {
|
|
236883
|
-
if (!selectedFile || !scheduleId || !taskId) {
|
|
236884
|
-
setFileContent(null);
|
|
236885
|
-
return;
|
|
236886
|
-
}
|
|
236887
|
-
setFileLoading(true);
|
|
236888
|
-
(async () => {
|
|
236889
|
-
try {
|
|
236890
|
-
const content2 = await request.readTaskFile({ scheduleId, taskId, filePath: selectedFile });
|
|
236891
|
-
setFileContent(content2 ?? null);
|
|
236892
|
-
} catch {
|
|
236893
|
-
setFileContent("// Error loading file");
|
|
236894
|
-
} finally {
|
|
236895
|
-
setFileLoading(false);
|
|
236896
|
-
}
|
|
236897
|
-
})();
|
|
236898
|
-
}, [selectedFile, scheduleId, taskId]);
|
|
236899
238039
|
if (loading) {
|
|
236900
238040
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-5 animate-spin text-muted-foreground" }) });
|
|
236901
238041
|
}
|
|
@@ -236903,22 +238043,12 @@ function Task() {
|
|
|
236903
238043
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ResizablePanel, { id: "fileDetail", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236904
238044
|
FileDetail,
|
|
236905
238045
|
{
|
|
238046
|
+
scheduleId,
|
|
238047
|
+
taskId,
|
|
236906
238048
|
fileName: selectedFile,
|
|
236907
|
-
fileContent,
|
|
236908
|
-
fileLoading,
|
|
236909
238049
|
hasTask: true,
|
|
236910
|
-
hasFiles: taskFiles.length > 0
|
|
236911
|
-
|
|
236912
|
-
) }),
|
|
236913
|
-
/* @__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,
|
|
236916
|
-
{
|
|
236917
|
-
files: taskFiles,
|
|
236918
|
-
selectedFile,
|
|
236919
|
-
hasTask: true,
|
|
236920
|
-
onSelectFile: setSelectedFile,
|
|
236921
|
-
onCopyRelativePath: async (file) => {
|
|
238050
|
+
hasFiles: taskFiles.length > 0,
|
|
238051
|
+
onCopyPath: async (file) => {
|
|
236922
238052
|
try {
|
|
236923
238053
|
await copyText(file);
|
|
236924
238054
|
} catch {
|
|
@@ -236926,7 +238056,11 @@ function Task() {
|
|
|
236926
238056
|
},
|
|
236927
238057
|
onCopyAbsolutePath: async (file) => {
|
|
236928
238058
|
try {
|
|
236929
|
-
const abs2 = await request.getTaskFileSystemPath({
|
|
238059
|
+
const abs2 = await request.getTaskFileSystemPath({
|
|
238060
|
+
scheduleId,
|
|
238061
|
+
taskId,
|
|
238062
|
+
filePath: file
|
|
238063
|
+
});
|
|
236930
238064
|
await copyText(abs2);
|
|
236931
238065
|
} catch {
|
|
236932
238066
|
}
|
|
@@ -236934,13 +238068,66 @@ function Task() {
|
|
|
236934
238068
|
onRevealInFinder: async (file) => {
|
|
236935
238069
|
if (isWebUI) return;
|
|
236936
238070
|
try {
|
|
236937
|
-
const abs2 = await request.getTaskFileSystemPath({
|
|
238071
|
+
const abs2 = await request.getTaskFileSystemPath({
|
|
238072
|
+
scheduleId,
|
|
238073
|
+
taskId,
|
|
238074
|
+
filePath: file
|
|
238075
|
+
});
|
|
236938
238076
|
await electron.revealInFinder(abs2);
|
|
236939
238077
|
} catch {
|
|
236940
238078
|
}
|
|
236941
238079
|
}
|
|
236942
238080
|
}
|
|
236943
|
-
) })
|
|
238081
|
+
) }),
|
|
238082
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ResizableHandle, { className: "bg-border/70" }),
|
|
238083
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
238084
|
+
ResizablePanel,
|
|
238085
|
+
{
|
|
238086
|
+
id: "filePanel",
|
|
238087
|
+
groupResizeBehavior: "preserve-pixel-size",
|
|
238088
|
+
defaultSize: 250,
|
|
238089
|
+
minSize: 250,
|
|
238090
|
+
maxSize: 400,
|
|
238091
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
238092
|
+
Panel,
|
|
238093
|
+
{
|
|
238094
|
+
files: taskFiles,
|
|
238095
|
+
selectedFile,
|
|
238096
|
+
hasTask: true,
|
|
238097
|
+
onSelectFile: setSelectedFile,
|
|
238098
|
+
onCopyRelativePath: async (file) => {
|
|
238099
|
+
try {
|
|
238100
|
+
await copyText(file);
|
|
238101
|
+
} catch {
|
|
238102
|
+
}
|
|
238103
|
+
},
|
|
238104
|
+
onCopyAbsolutePath: async (file) => {
|
|
238105
|
+
try {
|
|
238106
|
+
const abs2 = await request.getTaskFileSystemPath({
|
|
238107
|
+
scheduleId,
|
|
238108
|
+
taskId,
|
|
238109
|
+
filePath: file
|
|
238110
|
+
});
|
|
238111
|
+
await copyText(abs2);
|
|
238112
|
+
} catch {
|
|
238113
|
+
}
|
|
238114
|
+
},
|
|
238115
|
+
onRevealInFinder: async (file) => {
|
|
238116
|
+
if (isWebUI) return;
|
|
238117
|
+
try {
|
|
238118
|
+
const abs2 = await request.getTaskFileSystemPath({
|
|
238119
|
+
scheduleId,
|
|
238120
|
+
taskId,
|
|
238121
|
+
filePath: file
|
|
238122
|
+
});
|
|
238123
|
+
await electron.revealInFinder(abs2);
|
|
238124
|
+
} catch {
|
|
238125
|
+
}
|
|
238126
|
+
}
|
|
238127
|
+
}
|
|
238128
|
+
)
|
|
238129
|
+
}
|
|
238130
|
+
)
|
|
236944
238131
|
] });
|
|
236945
238132
|
}
|
|
236946
238133
|
function SessionWrapper() {
|