@zythum02/fello-server 0.1.30 → 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 +10 -2
- package/out/renderer/assets/{_baseUniq-DLyIzzT_.js → _baseUniq-DNNr8R6Z.js} +1 -1
- package/out/renderer/assets/{arc-Zxienobv.js → arc-fZlBtxL9.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-Q4EWVU46-DLh2t5mE.js → architectureDiagram-Q4EWVU46-k4E5eOG6.js} +5 -5
- package/out/renderer/assets/{blockDiagram-DXYQGD6D-CtAylmzM.js → blockDiagram-DXYQGD6D-DUXfUO2U.js} +6 -6
- package/out/renderer/assets/{c4Diagram-AHTNJAMY-ntNDbqWz.js → c4Diagram-AHTNJAMY-Chff2Ong.js} +2 -2
- package/out/renderer/assets/{channel-Z4VgLguf.js → channel-C3mo-Wfq.js} +1 -1
- package/out/renderer/assets/{chunk-4BX2VUAB-BQWjQSCS.js → chunk-4BX2VUAB-DGQRb5sN.js} +1 -1
- package/out/renderer/assets/{chunk-4TB4RGXK-DQ4qdRMQ.js → chunk-4TB4RGXK-BSCZx5Py.js} +5 -5
- package/out/renderer/assets/{chunk-55IACEB6-CLBQrnT7.js → chunk-55IACEB6-BVIv0C3q.js} +1 -1
- package/out/renderer/assets/{chunk-EDXVE4YY-ycJtaU57.js → chunk-EDXVE4YY-DPmCmhx8.js} +1 -1
- package/out/renderer/assets/{chunk-FMBD7UC4-D3ZuAVef.js → chunk-FMBD7UC4-DM66-_hG.js} +1 -1
- package/out/renderer/assets/{chunk-OYMX7WX6-CAHx1d_X.js → chunk-OYMX7WX6-Tff_uZlx.js} +3 -3
- package/out/renderer/assets/{chunk-QZHKN3VN-eKV97jed.js → chunk-QZHKN3VN-C86eKqSd.js} +1 -1
- package/out/renderer/assets/{chunk-YZCP3GAM-DkaxW5D7.js → chunk-YZCP3GAM-CHuoIosP.js} +1 -1
- package/out/renderer/assets/{classDiagram-6PBFFD2Q-CpuoT-Jx.js → classDiagram-6PBFFD2Q-pm-iptmM.js} +6 -6
- package/out/renderer/assets/{classDiagram-v2-HSJHXN6E-CpuoT-Jx.js → classDiagram-v2-HSJHXN6E-pm-iptmM.js} +6 -6
- package/out/renderer/assets/{clone-C_55Gq29.js → clone-5TzmfoWe.js} +1 -1
- package/out/renderer/assets/{cose-bilkent-S5V4N54A-DqTN-_zY.js → cose-bilkent-S5V4N54A-DVrDSw12.js} +1 -1
- package/out/renderer/assets/{dagre-KV5264BT-NIF-wzAb.js → dagre-KV5264BT-DdjpmydK.js} +6 -6
- package/out/renderer/assets/{diagram-5BDNPKRD-Cln0uWD9.js → diagram-5BDNPKRD-CdTSROj9.js} +6 -6
- package/out/renderer/assets/{diagram-G4DWMVQ6-BlnD83ee.js → diagram-G4DWMVQ6-DQ1x-vhi.js} +6 -6
- package/out/renderer/assets/{diagram-MMDJMWI5-B7PHcRvh.js → diagram-MMDJMWI5-40ryNdvI.js} +5 -5
- package/out/renderer/assets/{diagram-TYMM5635-B-O4bvMT.js → diagram-TYMM5635-tf8FuJg1.js} +5 -5
- package/out/renderer/assets/{erDiagram-SMLLAGMA-1ZgzBjAm.js → erDiagram-SMLLAGMA-BciRZ0dO.js} +4 -4
- package/out/renderer/assets/{flowDiagram-DWJPFMVM-CYt7MUO6.js → flowDiagram-DWJPFMVM-CYDqfzx3.js} +6 -6
- package/out/renderer/assets/{ganttDiagram-T4ZO3ILL-nHro8zN9.js → ganttDiagram-T4ZO3ILL-CRhxy6fZ.js} +2 -2
- package/out/renderer/assets/{gitGraphDiagram-UUTBAWPF-4nzL1En3.js → gitGraphDiagram-UUTBAWPF-BadxOCq2.js} +6 -6
- package/out/renderer/assets/{graph-9FzrK4FU.js → graph-B3RLQ95r.js} +2 -2
- package/out/renderer/assets/{highlighted-body-OFNGDK62-VELQyUbs.js → highlighted-body-OFNGDK62-CrGFRrSX.js} +1 -1
- package/out/renderer/assets/{index-DChNtXAm.js → index-B1oSpSBX.js} +1128 -320
- package/out/renderer/assets/index-COLJTco3.css +382 -0
- package/out/renderer/assets/{infoDiagram-42DDH7IO-BgCd2fMi.js → infoDiagram-42DDH7IO-DLMGtQF0.js} +4 -4
- package/out/renderer/assets/{ishikawaDiagram-UXIWVN3A-Dc9zBgQ3.js → ishikawaDiagram-UXIWVN3A-D8djsZeF.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-VCZTEJTY-Cl5-PgKK.js → journeyDiagram-VCZTEJTY-567Gpkxf.js} +4 -4
- package/out/renderer/assets/{kanban-definition-6JOO6SKY-CTdiOO_t.js → kanban-definition-6JOO6SKY-DPjxCDrA.js} +2 -2
- package/out/renderer/assets/{layout-pad9cNSQ.js → layout-CGQjv10p.js} +4 -4
- package/out/renderer/assets/{linear-C9kOAOci.js → linear-S4Y_UBCp.js} +1 -1
- package/out/renderer/assets/{min-B7SQAamY.js → min-DpKM6qkq.js} +2 -2
- package/out/renderer/assets/{mindmap-definition-QFDTVHPH-DYc59m-R.js → mindmap-definition-QFDTVHPH-BtxeumQc.js} +3 -3
- package/out/renderer/assets/{pieDiagram-DEJITSTG-DyXeoEBp.js → pieDiagram-DEJITSTG-n1UTGYDH.js} +6 -6
- package/out/renderer/assets/{quadrantDiagram-34T5L4WZ-hFY-GkiJ.js → quadrantDiagram-34T5L4WZ-DXaOIoV-.js} +2 -2
- package/out/renderer/assets/{requirementDiagram-MS252O5E-ecRwwTfv.js → requirementDiagram-MS252O5E-CTmWVt-P.js} +3 -3
- package/out/renderer/assets/{sankeyDiagram-XADWPNL6-BTL3sclU.js → sankeyDiagram-XADWPNL6-BXOndA46.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-FGHM5R23-AV2u_2fd.js → sequenceDiagram-FGHM5R23-C5v5_yv_.js} +3 -3
- package/out/renderer/assets/{stateDiagram-FHFEXIEX-DoTCNWMJ.js → stateDiagram-FHFEXIEX-D6Vd4_MM.js} +8 -8
- package/out/renderer/assets/{stateDiagram-v2-QKLJ7IA2--Ezn8EQY.js → stateDiagram-v2-QKLJ7IA2-De00f0TU.js} +4 -4
- package/out/renderer/assets/{timeline-definition-GMOUNBTQ-CQvZXAlZ.js → timeline-definition-GMOUNBTQ-DxOCmdWf.js} +2 -2
- package/out/renderer/assets/{vennDiagram-DHZGUBPP-zJ6WGEop.js → vennDiagram-DHZGUBPP-VNGucDZS.js} +1 -1
- package/out/renderer/assets/{wardley-RL74JXVD-BPlNC-BP.js → wardley-RL74JXVD-BbxXQNlq.js} +3 -3
- package/out/renderer/assets/{wardleyDiagram-NUSXRM2D-BAQ1Om89.js → wardleyDiagram-NUSXRM2D-BqldBvm5.js} +5 -5
- package/out/renderer/assets/{xychartDiagram-5P7HB3ND--HADKQzk.js → xychartDiagram-5P7HB3ND-BrCeeMZz.js} +2 -2
- package/out/renderer/index.html +2 -2
- package/out/server/main.js +174 -157
- package/package.json +1 -1
- package/out/renderer/assets/index-I1XmNFoX.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];
|
|
@@ -15113,7 +15113,7 @@ const fileDetail$1 = { "fileNotFound": "File not found", "fileTooLarge": "File i
|
|
|
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
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", "emptyHint": "Schedule AI tasks to run automatically with cron expressions", "noTasksDesc": 'No runs yet. Click "Trigger now" to start the first run.', "prompt": "Prompt", "promptPlaceholder": "What should the agent do?", "save": "Save", "schedule": "Schedule", "scheduleName": "Schedule Name", "scheduleNamePlaceholder": "e.g. Morning Standup Summary", "scheduleNotFound": "Schedule not found", "schedules": "schedules", "selectFileToPreview": "Select a file to preview", "selectTaskToPreview": "Select a task to preview files", "timedExecution": "Timed (cron)", "triggerNow": "Trigger now", "validation": { "nameRequired": "Name is required", "agentRequired": "Agent is required", "promptRequired": "Prompt is required" }, "cron": { "at": "at", "atMinute": "at min", "custom": "Custom", "daily": "Every day", "hourly": "Every N hours", "weekdays": "Weekdays", "weekly": "Every week", "nextRun": "Next run", "nextRunIn": "Next run in", "lastRun": "Last run", "days": { "0": "Sun", "1": "Mon", "2": "Tue", "3": "Wed", "4": "Thu", "5": "Fri", "6": "Sat" } } };
|
|
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": "创建你的第一个计划", "delete": "删除", "deleteConfirm": "确定永久删除「{{name}}」?", "deleteTaskConfirm": "确定永久删除此任务?", "deleteTaskTitle": "删除任务", "deleteTitle": "删除计划", "dialogDesc": "配置自动化计划的执行规则和 Prompt。", "editSchedule": "编辑计划", "editSettings": "编辑设置", "features": "功能", "lastRun": "上次", "lessThanMinute": "不到 1 分钟", "manual": "手动", "manualDesc": "仅手动触发,无定时计划。", "mcpServers": "MCP 服务器", "newSchedule": "新建计划", "nextRun": "下次", "noFiles": "暂无生成文件", "noSchedules": "暂无计划", "emptyHint": "通过 cron 表达式配置定时 AI 任务,让 Agent 自动执行", "noTasksDesc": "暂无运行记录。点击「立即触发」开始第一次运行。", "prompt": "提示词", "promptPlaceholder": "智能体需要执行什么任务?", "save": "保存", "schedule": "计划", "scheduleName": "计划名称", "scheduleNamePlaceholder": "例如:每日站会摘要", "scheduleNotFound": "计划未找到", "schedules": "计划", "selectFileToPreview": "选择文件预览", "selectTaskToPreview": "选择任务查看文件", "timedExecution": "定时(cron)", "triggerNow": "立即触发", "validation": { "nameRequired": "名称不能为空", "agentRequired": "请选择智能体", "promptRequired": "提示词不能为空" }, "cron": { "at": "在", "atMinute": "第", "custom": "自定义", "daily": "每天", "hourly": "每隔 N 小时", "weekdays": "工作日", "weekly": "每周", "nextRun": "下次执行", "nextRunIn": "距离下次执行还有", "lastRun": "上次执行", "days": { "0": "周日", "1": "周一", "2": "周二", "3": "周三", "4": "周四", "5": "周五", "6": "周六" } } };
|
|
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
|
|
@@ -41636,46 +41813,52 @@ function Sidebar() {
|
|
|
41636
41813
|
] }),
|
|
41637
41814
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
41638
41815
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: t2("sidebar.newSessionDialog.mcp", { defaultValue: "MCP" }) }),
|
|
41639
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41640
|
-
|
|
41641
|
-
|
|
41642
|
-
|
|
41643
|
-
|
|
41644
|
-
|
|
41645
|
-
|
|
41646
|
-
|
|
41647
|
-
|
|
41648
|
-
|
|
41649
|
-
|
|
41650
|
-
|
|
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
|
+
}
|
|
41651
41836
|
),
|
|
41652
|
-
|
|
41653
|
-
|
|
41654
|
-
|
|
41655
|
-
|
|
41656
|
-
|
|
41657
|
-
|
|
41658
|
-
|
|
41659
|
-
|
|
41660
|
-
|
|
41661
|
-
|
|
41662
|
-
|
|
41663
|
-
|
|
41664
|
-
|
|
41665
|
-
|
|
41666
|
-
|
|
41667
|
-
|
|
41668
|
-
|
|
41669
|
-
|
|
41670
|
-
|
|
41671
|
-
|
|
41672
|
-
|
|
41673
|
-
|
|
41674
|
-
|
|
41675
|
-
|
|
41676
|
-
|
|
41677
|
-
}) })
|
|
41678
|
-
] })
|
|
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
|
+
)
|
|
41679
41862
|
] })
|
|
41680
41863
|
] }),
|
|
41681
41864
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(DialogFooter, { children: [
|
|
@@ -41766,7 +41949,7 @@ function SettingsLayout() {
|
|
|
41766
41949
|
{
|
|
41767
41950
|
to: tab2.href,
|
|
41768
41951
|
className: ({ isActive }) => cn$5(
|
|
41769
|
-
"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",
|
|
41770
41953
|
isActive ? "bg-accent text-accent-foreground font-medium" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
|
41771
41954
|
),
|
|
41772
41955
|
children: [
|
|
@@ -41988,7 +42171,7 @@ function Welcome() {
|
|
|
41988
42171
|
children: [
|
|
41989
42172
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "absolute bottom-3 right-4 text-[11px] text-muted-foreground/40 z-10 pointer-events-none", children: [
|
|
41990
42173
|
"v",
|
|
41991
|
-
"0.1.
|
|
42174
|
+
"0.1.32"
|
|
41992
42175
|
] }),
|
|
41993
42176
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41994
42177
|
"div",
|
|
@@ -68662,7 +68845,7 @@ var lr$2 = (e2) => {
|
|
|
68662
68845
|
for (; t2 > 0 && e2[t2 - 1] === `
|
|
68663
68846
|
`; ) t2--;
|
|
68664
68847
|
return e2.slice(0, t2);
|
|
68665
|
-
}, 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 }) => {
|
|
68666
68849
|
let i3 = y$9(), d2 = reactExports.useMemo(() => lr$2(e2), [e2]), c2 = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: d2.split(`
|
|
68667
68850
|
`).map((p3) => [{ content: p3, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [d2]);
|
|
68668
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 }) })] }) });
|
|
@@ -93503,12 +93686,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
93503
93686
|
registerLayoutLoaders([
|
|
93504
93687
|
{
|
|
93505
93688
|
name: "dagre",
|
|
93506
|
-
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")
|
|
93507
93690
|
},
|
|
93508
93691
|
...[
|
|
93509
93692
|
{
|
|
93510
93693
|
name: "cose-bilkent",
|
|
93511
|
-
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")
|
|
93512
93695
|
}
|
|
93513
93696
|
]
|
|
93514
93697
|
]);
|
|
@@ -93964,7 +94147,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
93964
94147
|
}, "detector");
|
|
93965
94148
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
93966
94149
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
93967
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-
|
|
94150
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AHTNJAMY-Chff2Ong.js");
|
|
93968
94151
|
return { diagram: diagram22 };
|
|
93969
94152
|
}, true ? __vite__mapDeps([8,9]) : void 0, import.meta.url);
|
|
93970
94153
|
return { id, diagram: diagram2 };
|
|
@@ -93984,7 +94167,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
93984
94167
|
}, "detector");
|
|
93985
94168
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
93986
94169
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
93987
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
94170
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYDqfzx3.js");
|
|
93988
94171
|
return { diagram: diagram22 };
|
|
93989
94172
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
93990
94173
|
return { id: id2, diagram: diagram2 };
|
|
@@ -94010,7 +94193,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94010
94193
|
}, "detector");
|
|
94011
94194
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
94012
94195
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94013
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
94196
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYDqfzx3.js");
|
|
94014
94197
|
return { diagram: diagram22 };
|
|
94015
94198
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
94016
94199
|
return { id: id3, diagram: diagram2 };
|
|
@@ -94027,7 +94210,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
94027
94210
|
}, "detector");
|
|
94028
94211
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
94029
94212
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94030
|
-
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-
|
|
94213
|
+
const { diagram: diagram22 } = await import("./erDiagram-SMLLAGMA-BciRZ0dO.js");
|
|
94031
94214
|
return { diagram: diagram22 };
|
|
94032
94215
|
}, true ? __vite__mapDeps([15,12,13,14]) : void 0, import.meta.url);
|
|
94033
94216
|
return { id: id4, diagram: diagram2 };
|
|
@@ -94044,7 +94227,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
94044
94227
|
}, "detector");
|
|
94045
94228
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
94046
94229
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94047
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-
|
|
94230
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-UUTBAWPF-BadxOCq2.js");
|
|
94048
94231
|
return { diagram: diagram22 };
|
|
94049
94232
|
}, true ? __vite__mapDeps([16,17,18,19,4,2]) : void 0, import.meta.url);
|
|
94050
94233
|
return { id: id5, diagram: diagram2 };
|
|
@@ -94061,7 +94244,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
94061
94244
|
}, "detector");
|
|
94062
94245
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
94063
94246
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94064
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-
|
|
94247
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-T4ZO3ILL-CRhxy6fZ.js");
|
|
94065
94248
|
return { diagram: diagram22 };
|
|
94066
94249
|
}, true ? __vite__mapDeps([20,21,22,23]) : void 0, import.meta.url);
|
|
94067
94250
|
return { id: id6, diagram: diagram2 };
|
|
@@ -94078,7 +94261,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
94078
94261
|
}, "detector");
|
|
94079
94262
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
94080
94263
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94081
|
-
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-
|
|
94264
|
+
const { diagram: diagram22 } = await import("./infoDiagram-42DDH7IO-DLMGtQF0.js");
|
|
94082
94265
|
return { diagram: diagram22 };
|
|
94083
94266
|
}, true ? __vite__mapDeps([24,19,4,2]) : void 0, import.meta.url);
|
|
94084
94267
|
return { id: id7, diagram: diagram2 };
|
|
@@ -94094,7 +94277,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
94094
94277
|
}, "detector");
|
|
94095
94278
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
94096
94279
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94097
|
-
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-
|
|
94280
|
+
const { diagram: diagram22 } = await import("./pieDiagram-DEJITSTG-n1UTGYDH.js");
|
|
94098
94281
|
return { diagram: diagram22 };
|
|
94099
94282
|
}, true ? __vite__mapDeps([25,17,19,4,2,26,27,22]) : void 0, import.meta.url);
|
|
94100
94283
|
return { id: id8, diagram: diagram2 };
|
|
@@ -94110,7 +94293,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
94110
94293
|
}, "detector");
|
|
94111
94294
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
94112
94295
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94113
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-
|
|
94296
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-34T5L4WZ-DXaOIoV-.js");
|
|
94114
94297
|
return { diagram: diagram22 };
|
|
94115
94298
|
}, true ? __vite__mapDeps([28,21,22,23]) : void 0, import.meta.url);
|
|
94116
94299
|
return { id: id9, diagram: diagram2 };
|
|
@@ -94127,7 +94310,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
94127
94310
|
}, "detector");
|
|
94128
94311
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
94129
94312
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94130
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND
|
|
94313
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-5P7HB3ND-BrCeeMZz.js");
|
|
94131
94314
|
return { diagram: diagram22 };
|
|
94132
94315
|
}, true ? __vite__mapDeps([29,22,27,21,23]) : void 0, import.meta.url);
|
|
94133
94316
|
return { id: id10, diagram: diagram2 };
|
|
@@ -94144,7 +94327,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
94144
94327
|
}, "detector");
|
|
94145
94328
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
94146
94329
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94147
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-
|
|
94330
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-MS252O5E-CTmWVt-P.js");
|
|
94148
94331
|
return { diagram: diagram22 };
|
|
94149
94332
|
}, true ? __vite__mapDeps([30,12,13]) : void 0, import.meta.url);
|
|
94150
94333
|
return { id: id11, diagram: diagram2 };
|
|
@@ -94161,7 +94344,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
94161
94344
|
}, "detector");
|
|
94162
94345
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
94163
94346
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94164
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-
|
|
94347
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-FGHM5R23-C5v5_yv_.js");
|
|
94165
94348
|
return { diagram: diagram22 };
|
|
94166
94349
|
}, true ? __vite__mapDeps([31,9,18]) : void 0, import.meta.url);
|
|
94167
94350
|
return { id: id12, diagram: diagram2 };
|
|
@@ -94181,7 +94364,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94181
94364
|
}, "detector");
|
|
94182
94365
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
94183
94366
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94184
|
-
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-
|
|
94367
|
+
const { diagram: diagram22 } = await import("./classDiagram-6PBFFD2Q-pm-iptmM.js");
|
|
94185
94368
|
return { diagram: diagram22 };
|
|
94186
94369
|
}, true ? __vite__mapDeps([32,33,11,9,12,13]) : void 0, import.meta.url);
|
|
94187
94370
|
return { id: id13, diagram: diagram2 };
|
|
@@ -94201,7 +94384,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94201
94384
|
}, "detector");
|
|
94202
94385
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
94203
94386
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94204
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-
|
|
94387
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-HSJHXN6E-pm-iptmM.js");
|
|
94205
94388
|
return { diagram: diagram22 };
|
|
94206
94389
|
}, true ? __vite__mapDeps([34,33,11,9,12,13]) : void 0, import.meta.url);
|
|
94207
94390
|
return { id: id14, diagram: diagram2 };
|
|
@@ -94221,7 +94404,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94221
94404
|
}, "detector");
|
|
94222
94405
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
94223
94406
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94224
|
-
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-
|
|
94407
|
+
const { diagram: diagram22 } = await import("./stateDiagram-FHFEXIEX-D6Vd4_MM.js");
|
|
94225
94408
|
return { diagram: diagram22 };
|
|
94226
94409
|
}, true ? __vite__mapDeps([35,36,12,13,1,2,3,4]) : void 0, import.meta.url);
|
|
94227
94410
|
return { id: id15, diagram: diagram2 };
|
|
@@ -94244,7 +94427,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
94244
94427
|
}, "detector");
|
|
94245
94428
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
94246
94429
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94247
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2
|
|
94430
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-QKLJ7IA2-De00f0TU.js");
|
|
94248
94431
|
return { diagram: diagram22 };
|
|
94249
94432
|
}, true ? __vite__mapDeps([37,36,12,13]) : void 0, import.meta.url);
|
|
94250
94433
|
return { id: id16, diagram: diagram2 };
|
|
@@ -94261,7 +94444,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
94261
94444
|
}, "detector");
|
|
94262
94445
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
94263
94446
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94264
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-
|
|
94447
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-VCZTEJTY-567Gpkxf.js");
|
|
94265
94448
|
return { diagram: diagram22 };
|
|
94266
94449
|
}, true ? __vite__mapDeps([38,11,9,26]) : void 0, import.meta.url);
|
|
94267
94450
|
return { id: id17, diagram: diagram2 };
|
|
@@ -94331,7 +94514,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
94331
94514
|
}, "detector");
|
|
94332
94515
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
94333
94516
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94334
|
-
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-
|
|
94517
|
+
const { diagram: diagram22 } = await import("./flowDiagram-DWJPFMVM-CYDqfzx3.js");
|
|
94335
94518
|
return { diagram: diagram22 };
|
|
94336
94519
|
}, true ? __vite__mapDeps([10,11,9,12,13,14]) : void 0, import.meta.url);
|
|
94337
94520
|
return { id: id18, diagram: diagram2 };
|
|
@@ -94348,7 +94531,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
94348
94531
|
}, "detector");
|
|
94349
94532
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
94350
94533
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94351
|
-
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-
|
|
94534
|
+
const { diagram: diagram22 } = await import("./timeline-definition-GMOUNBTQ-DxOCmdWf.js");
|
|
94352
94535
|
return { diagram: diagram22 };
|
|
94353
94536
|
}, true ? __vite__mapDeps([39,26]) : void 0, import.meta.url);
|
|
94354
94537
|
return { id: id19, diagram: diagram2 };
|
|
@@ -94365,7 +94548,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
94365
94548
|
}, "detector");
|
|
94366
94549
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
94367
94550
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94368
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-
|
|
94551
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-QFDTVHPH-BtxeumQc.js");
|
|
94369
94552
|
return { diagram: diagram22 };
|
|
94370
94553
|
}, true ? __vite__mapDeps([40,12,13]) : void 0, import.meta.url);
|
|
94371
94554
|
return { id: id20, diagram: diagram2 };
|
|
@@ -94382,7 +94565,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
94382
94565
|
}, "detector");
|
|
94383
94566
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
94384
94567
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94385
|
-
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-
|
|
94568
|
+
const { diagram: diagram22 } = await import("./kanban-definition-6JOO6SKY-DPjxCDrA.js");
|
|
94386
94569
|
return { diagram: diagram22 };
|
|
94387
94570
|
}, true ? __vite__mapDeps([41,11]) : void 0, import.meta.url);
|
|
94388
94571
|
return { id: id21, diagram: diagram2 };
|
|
@@ -94399,7 +94582,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
94399
94582
|
}, "detector");
|
|
94400
94583
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
94401
94584
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94402
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-
|
|
94585
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-XADWPNL6-BXOndA46.js");
|
|
94403
94586
|
return { diagram: diagram22 };
|
|
94404
94587
|
}, true ? __vite__mapDeps([42,27,22]) : void 0, import.meta.url);
|
|
94405
94588
|
return { id: id22, diagram: diagram2 };
|
|
@@ -94416,7 +94599,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
94416
94599
|
}, "detector");
|
|
94417
94600
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
94418
94601
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94419
|
-
const { diagram: diagram22 } = await import("./diagram-TYMM5635-
|
|
94602
|
+
const { diagram: diagram22 } = await import("./diagram-TYMM5635-tf8FuJg1.js");
|
|
94420
94603
|
return { diagram: diagram22 };
|
|
94421
94604
|
}, true ? __vite__mapDeps([43,17,19,4,2]) : void 0, import.meta.url);
|
|
94422
94605
|
return { id: id23, diagram: diagram2 };
|
|
@@ -94432,7 +94615,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
94432
94615
|
}, "detector");
|
|
94433
94616
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
94434
94617
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94435
|
-
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-
|
|
94618
|
+
const { diagram: diagram22 } = await import("./diagram-MMDJMWI5-40ryNdvI.js");
|
|
94436
94619
|
return { diagram: diagram22 };
|
|
94437
94620
|
}, true ? __vite__mapDeps([44,17,19,4,2]) : void 0, import.meta.url);
|
|
94438
94621
|
return { id: id24, diagram: diagram2 };
|
|
@@ -94448,7 +94631,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
94448
94631
|
}, "detector");
|
|
94449
94632
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
94450
94633
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94451
|
-
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-
|
|
94634
|
+
const { diagram: diagram22 } = await import("./blockDiagram-DXYQGD6D-DUXfUO2U.js");
|
|
94452
94635
|
return { diagram: diagram22 };
|
|
94453
94636
|
}, true ? __vite__mapDeps([45,11,5,1,2,14]) : void 0, import.meta.url);
|
|
94454
94637
|
return { id: id25, diagram: diagram2 };
|
|
@@ -94465,7 +94648,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
94465
94648
|
}, "detector");
|
|
94466
94649
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
94467
94650
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94468
|
-
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-
|
|
94651
|
+
const { diagram: diagram22 } = await import("./diagram-5BDNPKRD-CdTSROj9.js");
|
|
94469
94652
|
return { diagram: diagram22 };
|
|
94470
94653
|
}, true ? __vite__mapDeps([46,17,18,19,4,2]) : void 0, import.meta.url);
|
|
94471
94654
|
return { id: id26, diagram: diagram2 };
|
|
@@ -94482,7 +94665,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
94482
94665
|
}, "detector");
|
|
94483
94666
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
94484
94667
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94485
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-
|
|
94668
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-Q4EWVU46-k4E5eOG6.js");
|
|
94486
94669
|
return { diagram: diagram22 };
|
|
94487
94670
|
}, true ? __vite__mapDeps([47,17,19,4,2,7]) : void 0, import.meta.url);
|
|
94488
94671
|
return { id: id27, diagram: diagram2 };
|
|
@@ -94499,7 +94682,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
94499
94682
|
}, "detector");
|
|
94500
94683
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
94501
94684
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94502
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-
|
|
94685
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-UXIWVN3A-D8djsZeF.js");
|
|
94503
94686
|
return { diagram: diagram22 };
|
|
94504
94687
|
}, true ? [] : void 0, import.meta.url);
|
|
94505
94688
|
return { id: id28, diagram: diagram2 };
|
|
@@ -94515,7 +94698,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
94515
94698
|
}, "detector");
|
|
94516
94699
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
94517
94700
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94518
|
-
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-
|
|
94701
|
+
const { diagram: diagram22 } = await import("./vennDiagram-DHZGUBPP-VNGucDZS.js");
|
|
94519
94702
|
return { diagram: diagram22 };
|
|
94520
94703
|
}, true ? [] : void 0, import.meta.url);
|
|
94521
94704
|
return { id: id29, diagram: diagram2 };
|
|
@@ -94532,7 +94715,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
94532
94715
|
}, "detector");
|
|
94533
94716
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
94534
94717
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94535
|
-
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-
|
|
94718
|
+
const { diagram: diagram22 } = await import("./diagram-G4DWMVQ6-DQ1x-vhi.js");
|
|
94536
94719
|
return { diagram: diagram22 };
|
|
94537
94720
|
}, true ? __vite__mapDeps([48,13,17,19,4,2,23,27,22]) : void 0, import.meta.url);
|
|
94538
94721
|
return { id: id30, diagram: diagram2 };
|
|
@@ -94548,7 +94731,7 @@ var detector31 = /* @__PURE__ */ __name((text2) => {
|
|
|
94548
94731
|
}, "detector");
|
|
94549
94732
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
94550
94733
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
94551
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-
|
|
94734
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-NUSXRM2D-BqldBvm5.js");
|
|
94552
94735
|
return { diagram: diagram22 };
|
|
94553
94736
|
}, true ? __vite__mapDeps([49,17,19,4,2]) : void 0, import.meta.url);
|
|
94554
94737
|
return { id: id31, diagram: diagram2 };
|
|
@@ -132033,6 +132216,25 @@ function TableHead({ className, ...props }) {
|
|
|
132033
132216
|
function TableCell({ className, ...props }) {
|
|
132034
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 });
|
|
132035
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
|
+
}
|
|
132036
132238
|
function CodeBlock({
|
|
132037
132239
|
language,
|
|
132038
132240
|
highlightLang,
|
|
@@ -132113,14 +132315,38 @@ const components = {
|
|
|
132113
132315
|
tbody: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableBody, { ...props, className, children: children2 }),
|
|
132114
132316
|
tr: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableRow, { ...props, className: cn$5(className, "border-border"), children: children2 }),
|
|
132115
132317
|
th: ({ className, children: children2, node: _node, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { ...props, className: cn$5(className, "py-2"), children: children2 }),
|
|
132116
|
-
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" }) })
|
|
132117
132320
|
};
|
|
132118
132321
|
function StreamMarkdown({
|
|
132119
132322
|
className,
|
|
132120
132323
|
children: children2,
|
|
132121
132324
|
isStreaming,
|
|
132122
|
-
forceBreaks
|
|
132325
|
+
forceBreaks,
|
|
132326
|
+
imageSource,
|
|
132327
|
+
onLinkClick
|
|
132123
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]);
|
|
132124
132350
|
const remarkPlugins = reactExports.useMemo(() => {
|
|
132125
132351
|
return forceBreaks ? [remarkBreaks] : void 0;
|
|
132126
132352
|
}, [forceBreaks]);
|
|
@@ -132142,12 +132368,13 @@ function StreamMarkdown({
|
|
|
132142
132368
|
Qs$1,
|
|
132143
132369
|
{
|
|
132144
132370
|
plugins: { mermaid: f$5, math: h$4, cjk: A$4 },
|
|
132145
|
-
components,
|
|
132371
|
+
components: resolvedComponents,
|
|
132146
132372
|
shikiTheme: ["github-light", "github-dark"],
|
|
132147
132373
|
isAnimating: isStreaming,
|
|
132148
132374
|
animated: { sep: "char" },
|
|
132149
132375
|
linkSafety: { enabled: false },
|
|
132150
132376
|
remarkPlugins,
|
|
132377
|
+
rehypePlugins,
|
|
132151
132378
|
controls: {
|
|
132152
132379
|
table: { fullscreen: false },
|
|
132153
132380
|
mermaid: { fullscreen: false }
|
|
@@ -132191,7 +132418,7 @@ const typographyClasses = {
|
|
|
132191
132418
|
agent_message: cn$5(
|
|
132192
132419
|
baseClasses$1,
|
|
132193
132420
|
"prose prose-sm dark:prose-invert",
|
|
132194
|
-
"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]",
|
|
132195
132422
|
"prose-headings:text-foreground prose-headings:font-medium prose-headings:mt-2.5 prose-headings:mb-1",
|
|
132196
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]",
|
|
132197
132424
|
"prose-strong:text-foreground prose-strong:font-medium",
|
|
@@ -137020,6 +137247,44 @@ function ChatInput({ session: session2 }) {
|
|
|
137020
137247
|
const isStreaming = session2.isStreaming;
|
|
137021
137248
|
const availableModels = session2.models?.availableModels ?? [];
|
|
137022
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]);
|
|
137023
137288
|
const availableModes = session2.modes?.availableModes ?? [];
|
|
137024
137289
|
const currentModeId = session2.modes?.currentModeId ?? null;
|
|
137025
137290
|
const initializeInfo = session2.initializeInfo;
|
|
@@ -137583,38 +137848,25 @@ function ChatInput({ session: session2 }) {
|
|
|
137583
137848
|
},
|
|
137584
137849
|
children: [
|
|
137585
137850
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
137586
|
-
availableModes.length > 0 && /* @__PURE__ */ jsxRuntimeExports.
|
|
137587
|
-
|
|
137588
|
-
|
|
137589
|
-
|
|
137590
|
-
|
|
137591
|
-
|
|
137592
|
-
|
|
137593
|
-
|
|
137594
|
-
|
|
137595
|
-
|
|
137596
|
-
|
|
137597
|
-
|
|
137598
|
-
|
|
137599
|
-
|
|
137600
|
-
|
|
137601
|
-
|
|
137602
|
-
|
|
137603
|
-
|
|
137604
|
-
|
|
137605
|
-
console.error("Failed to set mode:", err);
|
|
137606
|
-
useAppStore.getState().updateSession(session2);
|
|
137607
|
-
}
|
|
137608
|
-
},
|
|
137609
|
-
children: [
|
|
137610
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { size: "sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: t2("chatInput.mode", "Mode") }) }),
|
|
137611
|
-
/* @__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: [
|
|
137612
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: mode.name }),
|
|
137613
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "wrap-break-word text-[10px] text-muted-foreground/60 line-clamp-2", children: mode.description })
|
|
137614
|
-
] }) }, mode.id)) })
|
|
137615
|
-
]
|
|
137616
|
-
}
|
|
137617
|
-
) }),
|
|
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
|
+
] }),
|
|
137618
137870
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
|
137619
137871
|
initializeInfo?.agentCapabilities?.promptCapabilities?.embeddedContext || initializeInfo?.agentCapabilities?.promptCapabilities?.image ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
137620
137872
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -137676,38 +137928,45 @@ function ChatInput({ session: session2 }) {
|
|
|
137676
137928
|
] })
|
|
137677
137929
|
] }),
|
|
137678
137930
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
137679
|
-
availableModels.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
137680
|
-
|
|
137681
|
-
|
|
137682
|
-
|
|
137683
|
-
|
|
137684
|
-
|
|
137685
|
-
|
|
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
|
-
|
|
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,
|
|
137711
137970
|
isStreaming ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
137712
137971
|
Button,
|
|
137713
137972
|
{
|
|
@@ -137925,6 +138184,7 @@ function AskUserOptions({
|
|
|
137925
138184
|
}).then(() => onResolved());
|
|
137926
138185
|
};
|
|
137927
138186
|
const handleKeyDown = (e2) => {
|
|
138187
|
+
if (e2.nativeEvent.isComposing) return;
|
|
137928
138188
|
if (e2.key === "Enter" && !e2.shiftKey) {
|
|
137929
138189
|
e2.preventDefault();
|
|
137930
138190
|
handleSubmitInput();
|
|
@@ -137988,7 +138248,7 @@ function AskUserOptions({
|
|
|
137988
138248
|
onChange: (e2) => setInputValue(e2.target.value),
|
|
137989
138249
|
onKeyDown: handleKeyDown,
|
|
137990
138250
|
placeholder: t2("askUser.inputPlaceholder", "Type your response... (Enter to send)"),
|
|
137991
|
-
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",
|
|
137992
138252
|
autoFocus: true
|
|
137993
138253
|
}
|
|
137994
138254
|
),
|
|
@@ -138037,14 +138297,14 @@ function FileViewTabs({ viewMode, viewModes, onViewModeChange }) {
|
|
|
138037
138297
|
if (viewModes.length <= 1) return null;
|
|
138038
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)) }) }) });
|
|
138039
138299
|
}
|
|
138040
|
-
function LoadingState() {
|
|
138300
|
+
function LoadingState$1() {
|
|
138041
138301
|
const { t: t2 } = useTranslation();
|
|
138042
138302
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground text-center mt-10", children: t2("fileDetail.loading") });
|
|
138043
138303
|
}
|
|
138044
|
-
function ErrorState({ message: message2 }) {
|
|
138304
|
+
function ErrorState$1({ message: message2 }) {
|
|
138045
138305
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground text-center mt-10", children: message2 });
|
|
138046
138306
|
}
|
|
138047
|
-
function base64ToArrayBuffer(base642) {
|
|
138307
|
+
function base64ToArrayBuffer$1(base642) {
|
|
138048
138308
|
const base64Data = base642.includes(",") ? base642.split(",")[1] : base642;
|
|
138049
138309
|
const binaryStr = atob(base64Data);
|
|
138050
138310
|
const bytes = new Uint8Array(binaryStr.length);
|
|
@@ -138109,7 +138369,7 @@ function useFile(projectId, file, options = {}) {
|
|
|
138109
138369
|
};
|
|
138110
138370
|
}, [projectId, file, encoding, gitHead, t2]);
|
|
138111
138371
|
const arrayBuffer = reactExports.useMemo(
|
|
138112
|
-
() => encoding === "base64" ? base64ToArrayBuffer(content2) : new ArrayBuffer(0),
|
|
138372
|
+
() => encoding === "base64" ? base64ToArrayBuffer$1(content2) : new ArrayBuffer(0),
|
|
138113
138373
|
[content2, encoding]
|
|
138114
138374
|
);
|
|
138115
138375
|
return { content: content2, gitContent, arrayBuffer, loading, errorMsg };
|
|
@@ -138392,8 +138652,8 @@ function CodeDetail$1({ projectId, file }) {
|
|
|
138392
138652
|
const absPath = await request.getSystemFilePath({ projectId, path: file, isAbsolute: true });
|
|
138393
138653
|
electron.revealInFinder(absPath);
|
|
138394
138654
|
}, [projectId, file]);
|
|
138395
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
138396
|
-
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 });
|
|
138397
138657
|
const contextMenuItems = /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
138398
138658
|
contextSelectedText && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleCopySelected, children: [
|
|
138399
138659
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
@@ -138473,6 +138733,40 @@ function MarkdownDetail$1({ projectId, file }) {
|
|
|
138473
138733
|
const { content: content2, gitContent, loading, errorMsg } = useFile(projectId, file, { gitHead: true });
|
|
138474
138734
|
const [viewMode, setViewMode] = reactExports.useState("preview");
|
|
138475
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]);
|
|
138476
138770
|
const viewModes = gitContent != null ? ["preview", "code", "compare"] : ["preview", "code"];
|
|
138477
138771
|
const handleMenuOpenChange = reactExports.useCallback((open2) => {
|
|
138478
138772
|
if (open2) setContextSelectedText(window.getSelection()?.toString() ?? "");
|
|
@@ -138502,8 +138796,8 @@ function MarkdownDetail$1({ projectId, file }) {
|
|
|
138502
138796
|
const absPath = await request.getSystemFilePath({ projectId, path: file, isAbsolute: true });
|
|
138503
138797
|
electron.revealInFinder(absPath);
|
|
138504
138798
|
}, [projectId, file]);
|
|
138505
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
138506
|
-
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 });
|
|
138507
138801
|
const contextMenuItems = /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
138508
138802
|
contextSelectedText && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleCopySelected, children: [
|
|
138509
138803
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, {}),
|
|
@@ -138540,7 +138834,21 @@ function MarkdownDetail$1({ projectId, file }) {
|
|
|
138540
138834
|
] });
|
|
138541
138835
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-full overflow-hidden", children: [
|
|
138542
138836
|
viewMode === "preview" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { onOpenChange: handleMenuOpenChange, children: [
|
|
138543
|
-
/* @__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
|
+
) }) }),
|
|
138544
138852
|
contextMenuItems
|
|
138545
138853
|
] }) }) : viewMode === "code" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { onOpenChange: handleMenuOpenChange, children: [
|
|
138546
138854
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -140629,7 +140937,7 @@ var useControls = function() {
|
|
|
140629
140937
|
var libraryContext = useTransformContext();
|
|
140630
140938
|
return getControls(libraryContext);
|
|
140631
140939
|
};
|
|
140632
|
-
function Controls() {
|
|
140940
|
+
function Controls$1() {
|
|
140633
140941
|
const { zoomIn: zoomIn2, zoomOut: zoomOut2, resetTransform: resetTransform2 } = useControls();
|
|
140634
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: [
|
|
140635
140943
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -140666,8 +140974,8 @@ function Controls() {
|
|
|
140666
140974
|
}
|
|
140667
140975
|
function ImageDetail$1({ projectId, file }) {
|
|
140668
140976
|
const { content: content2, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
140669
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
140670
|
-
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 });
|
|
140671
140979
|
const ext = file.split(".").pop()?.toLowerCase() || "";
|
|
140672
140980
|
let mimeType = ext;
|
|
140673
140981
|
if (ext === "svg") mimeType = "svg+xml";
|
|
@@ -140682,7 +140990,7 @@ function ImageDetail$1({ projectId, file }) {
|
|
|
140682
140990
|
centerOnInit: true,
|
|
140683
140991
|
wheel: { step: 2e-3 },
|
|
140684
140992
|
children: [
|
|
140685
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Controls, {}),
|
|
140993
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Controls$1, {}),
|
|
140686
140994
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
140687
140995
|
TransformComponent,
|
|
140688
140996
|
{
|
|
@@ -171721,8 +172029,8 @@ function PdfView({ data }) {
|
|
|
171721
172029
|
}
|
|
171722
172030
|
function PdfDetail$1({ projectId, file }) {
|
|
171723
172031
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
171724
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
171725
|
-
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 });
|
|
171726
172034
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PdfView, { data: arrayBuffer, filename: file }) });
|
|
171727
172035
|
}
|
|
171728
172036
|
function commonjsRequire(path2) {
|
|
@@ -178057,8 +178365,8 @@ function DocxView({ data }) {
|
|
|
178057
178365
|
}
|
|
178058
178366
|
function DocxDetail$1({ projectId, file }) {
|
|
178059
178367
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
178060
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
178061
|
-
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 });
|
|
178062
178370
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DocxView, { data: arrayBuffer, filename: file }) });
|
|
178063
178371
|
}
|
|
178064
178372
|
var D$2 = Uint8Array, nt$2 = Uint16Array, He$2 = Int32Array, he$1 = new D$2([
|
|
@@ -182169,8 +182477,8 @@ function PptxView({ data }) {
|
|
|
182169
182477
|
}
|
|
182170
182478
|
function PptxDetail$1({ projectId, file }) {
|
|
182171
182479
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
182172
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
182173
|
-
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 });
|
|
182174
182482
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PptxView, { data: arrayBuffer, filename: file }) });
|
|
182175
182483
|
}
|
|
182176
182484
|
var current_ansi = 1252;
|
|
@@ -208936,8 +209244,8 @@ function XlsxView({ data }) {
|
|
|
208936
209244
|
}
|
|
208937
209245
|
function XlsxDetail$1({ projectId, file }) {
|
|
208938
209246
|
const { arrayBuffer, loading, errorMsg } = useFile(projectId, file, { encoding: "base64" });
|
|
208939
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingState, {});
|
|
208940
|
-
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 });
|
|
208941
209249
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(XlsxView, { data: arrayBuffer, filename: file }) });
|
|
208942
209250
|
}
|
|
208943
209251
|
function HtmlDetail$1({ projectId, file }) {
|
|
@@ -208963,7 +209271,7 @@ function HtmlDetail$1({ projectId, file }) {
|
|
|
208963
209271
|
return null;
|
|
208964
209272
|
}, [webUIStatus, isWebUI]);
|
|
208965
209273
|
const iframeUrl = reactExports.useMemo(() => {
|
|
208966
|
-
if (httpBaseUrl) {
|
|
209274
|
+
if (isWebUI && httpBaseUrl) {
|
|
208967
209275
|
return `${httpBaseUrl}/project/${projectId}/${file}`;
|
|
208968
209276
|
}
|
|
208969
209277
|
return `web://project/${projectId}/${file}`;
|
|
@@ -209083,7 +209391,7 @@ function HtmlDetail$1({ projectId, file }) {
|
|
|
209083
209391
|
] });
|
|
209084
209392
|
if (hasError) {
|
|
209085
209393
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-full flex flex-col items-center justify-center gap-4 p-8", children: [
|
|
209086
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState, { message: errorMsg }),
|
|
209394
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorState$1, { message: errorMsg }),
|
|
209087
209395
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
209088
209396
|
"button",
|
|
209089
209397
|
{
|
|
@@ -218251,6 +218559,15 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
218251
218559
|
const containerRef = reactExports.useRef(null);
|
|
218252
218560
|
const [data, setData] = reactExports.useState([]);
|
|
218253
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]);
|
|
218254
218571
|
const [selectedIds, setSelectedIds] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
218255
218572
|
const [lastSelectedId, setLastSelectedId] = reactExports.useState(null);
|
|
218256
218573
|
const [openFolders, setOpenFolders] = reactExports.useState(() => {
|
|
@@ -219092,11 +219409,10 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219092
219409
|
if (!projectId) {
|
|
219093
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") });
|
|
219094
219411
|
}
|
|
219095
|
-
if (
|
|
219096
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full items-center justify-center
|
|
219097
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
219098
|
-
" ",
|
|
219099
|
-
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") })
|
|
219100
219416
|
] });
|
|
219101
219417
|
}
|
|
219102
219418
|
const sharedProps = {
|
|
@@ -219114,7 +219430,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219114
219430
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "flex h-full min-h-0 flex-col text-xs w-full", children: [
|
|
219115
219431
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
|
|
219116
219432
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
|
|
219117
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-
|
|
219433
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-3.5" }),
|
|
219118
219434
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-nowrap", children: t2("filePanel.title") })
|
|
219119
219435
|
] }),
|
|
219120
219436
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto mr-2 flex items-center gap-0.5", children: [
|
|
@@ -219124,6 +219440,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219124
219440
|
variant: "ghost",
|
|
219125
219441
|
size: "icon",
|
|
219126
219442
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219443
|
+
disabled: loading,
|
|
219127
219444
|
onClick: () => createIn(getSelectedFolder(), false),
|
|
219128
219445
|
title: t2("filePanel.newFile"),
|
|
219129
219446
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilePlus, { className: "size-3.5" })
|
|
@@ -219135,6 +219452,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219135
219452
|
variant: "ghost",
|
|
219136
219453
|
size: "icon",
|
|
219137
219454
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219455
|
+
disabled: loading,
|
|
219138
219456
|
onClick: () => createIn(getSelectedFolder(), true),
|
|
219139
219457
|
title: t2("filePanel.newFolder"),
|
|
219140
219458
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderPlus, { className: "size-3.5" })
|
|
@@ -219146,6 +219464,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219146
219464
|
variant: "ghost",
|
|
219147
219465
|
size: "icon",
|
|
219148
219466
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219467
|
+
disabled: loading,
|
|
219149
219468
|
onClick: collapseAll,
|
|
219150
219469
|
title: t2("filePanel.collapseFolders"),
|
|
219151
219470
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronsDownUp, { className: "size-3.5" })
|
|
@@ -219157,6 +219476,7 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219157
219476
|
variant: "ghost",
|
|
219158
219477
|
size: "icon",
|
|
219159
219478
|
className: "size-6 text-muted-foreground hover:text-foreground",
|
|
219479
|
+
disabled: loading,
|
|
219160
219480
|
onClick: refresh,
|
|
219161
219481
|
title: t2("filePanel.refresh", "Refresh"),
|
|
219162
219482
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" })
|
|
@@ -219164,8 +219484,22 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219164
219484
|
)
|
|
219165
219485
|
] })
|
|
219166
219486
|
] }),
|
|
219167
|
-
|
|
219168
|
-
|
|
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(
|
|
219169
219503
|
ContextMenuTrigger,
|
|
219170
219504
|
{
|
|
219171
219505
|
render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
|
|
@@ -219207,19 +219541,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
|
|
|
219207
219541
|
setDragIds([]);
|
|
219208
219542
|
refresh();
|
|
219209
219543
|
},
|
|
219210
|
-
children:
|
|
219211
|
-
|
|
219212
|
-
|
|
219213
|
-
|
|
219214
|
-
|
|
219215
|
-
|
|
219216
|
-
|
|
219217
|
-
|
|
219218
|
-
|
|
219219
|
-
|
|
219220
|
-
)),
|
|
219221
|
-
data.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-6 text-center text-xs text-muted-foreground", children: t2("filePanel.emptyDirectory") })
|
|
219222
|
-
]
|
|
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
|
+
))
|
|
219223
219554
|
}
|
|
219224
219555
|
),
|
|
219225
219556
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
@@ -219295,7 +219626,7 @@ function TerminalPanel({
|
|
|
219295
219626
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
219296
219627
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
|
|
219297
219628
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
|
|
219298
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SquareTerminal, { className: "size-
|
|
219629
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SquareTerminal, { className: "size-3.5" }),
|
|
219299
219630
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-nowrap", children: t2("panel.terminal") })
|
|
219300
219631
|
] }),
|
|
219301
219632
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto mr-2 flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -219310,7 +219641,10 @@ function TerminalPanel({
|
|
|
219310
219641
|
}
|
|
219311
219642
|
) })
|
|
219312
219643
|
] }),
|
|
219313
|
-
|
|
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(
|
|
219314
219648
|
"button",
|
|
219315
219649
|
{
|
|
219316
219650
|
type: "button",
|
|
@@ -236144,7 +236478,7 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
236144
236478
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldGroup, { children: [
|
|
236145
236479
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[2fr_1fr] gap-3", children: [
|
|
236146
236480
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236147
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-name", className: "text-
|
|
236481
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-name", className: "text-xs text-muted-foreground", children: t2("automation.scheduleName", "Schedule Name") }),
|
|
236148
236482
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236149
236483
|
Input,
|
|
236150
236484
|
{
|
|
@@ -236155,12 +236489,12 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
236155
236489
|
),
|
|
236156
236490
|
value: name2,
|
|
236157
236491
|
onChange: (e2) => setName(e2.target.value),
|
|
236158
|
-
className: "h-8 text-
|
|
236492
|
+
className: "h-8 text-xs! text-foreground/70 focus-visible:ring-0.5"
|
|
236159
236493
|
}
|
|
236160
236494
|
)
|
|
236161
236495
|
] }),
|
|
236162
236496
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236163
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-agent", className: "text-
|
|
236497
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-agent", className: "text-xs text-muted-foreground", children: t2("automation.agent", "Agent") }),
|
|
236164
236498
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236165
236499
|
Select,
|
|
236166
236500
|
{
|
|
@@ -236173,7 +236507,7 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
236173
236507
|
SelectTrigger,
|
|
236174
236508
|
{
|
|
236175
236509
|
id: "auto-agent",
|
|
236176
|
-
className: "w-full text-
|
|
236510
|
+
className: "w-full text-xs! text-muted-foreground",
|
|
236177
236511
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {})
|
|
236178
236512
|
}
|
|
236179
236513
|
),
|
|
@@ -236184,7 +236518,7 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
236184
236518
|
] })
|
|
236185
236519
|
] }),
|
|
236186
236520
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236187
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-prompt", className: "text-
|
|
236521
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "auto-prompt", className: "text-xs text-muted-foreground", children: t2("automation.prompt", "Prompt") }),
|
|
236188
236522
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236189
236523
|
Textarea,
|
|
236190
236524
|
{
|
|
@@ -236270,9 +236604,9 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
236270
236604
|
)
|
|
236271
236605
|
] }),
|
|
236272
236606
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Field, { children: [
|
|
236273
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { className: "text-
|
|
236607
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { className: "text-xs text-muted-foreground", children: t2("automation.schedule", "Schedule") }),
|
|
236274
236608
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
236275
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("
|
|
236609
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-foreground/70", children: [
|
|
236276
236610
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236277
236611
|
Switch,
|
|
236278
236612
|
{
|
|
@@ -236282,7 +236616,7 @@ function SettingDialog({ schedule: schedule2, open: open2, onOpenChange, onSucce
|
|
|
236282
236616
|
),
|
|
236283
236617
|
t2("automation.timedExecution", "Timed (cron)")
|
|
236284
236618
|
] }),
|
|
236285
|
-
cronType === "cron" ? /* @__PURE__ */ jsxRuntimeExports.jsx(CronEditor, { value: cronExpr, onChange: setCronExpr, timezone }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-
|
|
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.") })
|
|
236286
236620
|
] })
|
|
236287
236621
|
] })
|
|
236288
236622
|
] })
|
|
@@ -236323,7 +236657,8 @@ function Automation() {
|
|
|
236323
236657
|
const navigate = useNavigate();
|
|
236324
236658
|
const { confirm: confirm2, toast: toast2 } = useMessage();
|
|
236325
236659
|
const [schedules, setSchedules] = reactExports.useState([]);
|
|
236326
|
-
const [loading, setLoading] = reactExports.useState(
|
|
236660
|
+
const [loading, setLoading] = reactExports.useState(false);
|
|
236661
|
+
const [showLoading, setShowLoading] = reactExports.useState(false);
|
|
236327
236662
|
const [newDialogOpen, setNewDialogOpen] = reactExports.useState(false);
|
|
236328
236663
|
const [editSchedule, setEditSchedule] = reactExports.useState(null);
|
|
236329
236664
|
const [timezone, setTimezone] = reactExports.useState("");
|
|
@@ -236331,8 +236666,17 @@ function Automation() {
|
|
|
236331
236666
|
request.getServerTimezone().then(setTimezone).catch(() => {
|
|
236332
236667
|
});
|
|
236333
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]);
|
|
236334
236677
|
const loadSchedules = reactExports.useCallback(async () => {
|
|
236335
236678
|
try {
|
|
236679
|
+
setLoading(true);
|
|
236336
236680
|
const list2 = await request.listSchedules();
|
|
236337
236681
|
setSchedules(list2 ?? []);
|
|
236338
236682
|
} catch (err) {
|
|
@@ -236344,10 +236688,11 @@ function Automation() {
|
|
|
236344
236688
|
reactExports.useEffect(() => {
|
|
236345
236689
|
void loadSchedules();
|
|
236346
236690
|
}, [loadSchedules]);
|
|
236691
|
+
const [, setTick] = reactExports.useState(0);
|
|
236347
236692
|
reactExports.useEffect(() => {
|
|
236348
|
-
const timer2 = setInterval(() =>
|
|
236693
|
+
const timer2 = setInterval(() => setTick((t22) => t22 + 1), 3e4);
|
|
236349
236694
|
return () => clearInterval(timer2);
|
|
236350
|
-
}, [
|
|
236695
|
+
}, []);
|
|
236351
236696
|
reactExports.useEffect(() => {
|
|
236352
236697
|
const handleChanged = () => void loadSchedules();
|
|
236353
236698
|
subscribe$1.on("schedules-changed", handleChanged);
|
|
@@ -236404,18 +236749,29 @@ function Automation() {
|
|
|
236404
236749
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236405
236750
|
"div",
|
|
236406
236751
|
{
|
|
236407
|
-
className: "h-12 shrink-0 border-b border-border flex items-center
|
|
236752
|
+
className: "h-12 shrink-0 border-b border-border flex items-center justify-between pl-4 pr-2",
|
|
236408
236753
|
style: { WebkitAppRegion: "drag" },
|
|
236409
236754
|
children: [
|
|
236410
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
236411
|
-
|
|
236412
|
-
"
|
|
236413
|
-
|
|
236414
|
-
|
|
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
|
+
) })
|
|
236415
236771
|
]
|
|
236416
236772
|
}
|
|
236417
236773
|
),
|
|
236418
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-6 animate-spin text-muted-foreground" }) })
|
|
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" }) })
|
|
236419
236775
|
] });
|
|
236420
236776
|
}
|
|
236421
236777
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: [
|
|
@@ -236450,10 +236806,10 @@ function Automation() {
|
|
|
236450
236806
|
]
|
|
236451
236807
|
}
|
|
236452
236808
|
),
|
|
236453
|
-
|
|
236454
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClockCheck, { className: "size-6 text-muted-foreground/60" }) }),
|
|
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" }) }),
|
|
236455
236811
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-foreground/70 mb-1", children: t2("automation.noSchedules", "No schedules yet") }),
|
|
236456
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70 mb-4 max-w-
|
|
236812
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70 mb-4 max-w-60 text-center", children: t2(
|
|
236457
236813
|
"automation.emptyHint",
|
|
236458
236814
|
"Schedule AI tasks to run automatically with cron expressions"
|
|
236459
236815
|
) }),
|
|
@@ -236470,13 +236826,13 @@ function Automation() {
|
|
|
236470
236826
|
]
|
|
236471
236827
|
}
|
|
236472
236828
|
)
|
|
236473
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ItemGroup, { className: "gap-0", children: schedules.map((schedule2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
|
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: [
|
|
236474
236830
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
|
|
236475
236831
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { className: "group/ctx", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
236476
236832
|
Item,
|
|
236477
236833
|
{
|
|
236478
236834
|
size: "sm",
|
|
236479
|
-
className: "hover:bg-muted group-data-
|
|
236835
|
+
className: "hover:bg-muted group-data-popup-open/ctx:bg-muted select-none",
|
|
236480
236836
|
onClick: () => navigate(`/automation/schedule/${schedule2.id}`),
|
|
236481
236837
|
children: [
|
|
236482
236838
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ItemContent, { className: "gap-1.5", children: [
|
|
@@ -236703,17 +237059,52 @@ function Schedule() {
|
|
|
236703
237059
|
}
|
|
236704
237060
|
};
|
|
236705
237061
|
if (loading) {
|
|
236706
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
236707
|
-
|
|
236708
|
-
|
|
236709
|
-
|
|
236710
|
-
|
|
236711
|
-
|
|
236712
|
-
|
|
236713
|
-
|
|
236714
|
-
|
|
236715
|
-
|
|
236716
|
-
|
|
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
|
+
) });
|
|
236717
237108
|
}
|
|
236718
237109
|
if (!schedule2) {
|
|
236719
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: [
|
|
@@ -236883,7 +237274,70 @@ function getFileKind(filename) {
|
|
|
236883
237274
|
if (ext === "md") return "markdown";
|
|
236884
237275
|
return "text";
|
|
236885
237276
|
}
|
|
236886
|
-
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);
|
|
236887
237341
|
const displayContent = reactExports.useMemo(() => {
|
|
236888
237342
|
if (fileName.endsWith(".json")) {
|
|
236889
237343
|
try {
|
|
@@ -236894,13 +237348,169 @@ function CodeDetail({ fileName, content: content2 }) {
|
|
|
236894
237348
|
}
|
|
236895
237349
|
return content2;
|
|
236896
237350
|
}, [fileName, content2]);
|
|
236897
|
-
|
|
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
|
+
) });
|
|
236898
237396
|
}
|
|
236899
|
-
function MarkdownDetail({
|
|
237397
|
+
function MarkdownDetail({
|
|
237398
|
+
scheduleId,
|
|
237399
|
+
taskId,
|
|
237400
|
+
fileName,
|
|
237401
|
+
onCopyPath,
|
|
237402
|
+
onCopyAbsolutePath,
|
|
237403
|
+
onRevealInFinder,
|
|
237404
|
+
onNavigateFile
|
|
237405
|
+
}) {
|
|
236900
237406
|
const { t: t2 } = useTranslation();
|
|
237407
|
+
const { content: content2, loading, errorMsg } = useTaskFile(scheduleId, taskId, fileName);
|
|
236901
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
|
+
] });
|
|
236902
237478
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-full overflow-hidden", children: [
|
|
236903
|
-
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
|
+
) }),
|
|
236904
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(
|
|
236905
237515
|
Tabs,
|
|
236906
237516
|
{
|
|
@@ -236915,79 +237525,261 @@ function MarkdownDetail({ fileName, content: content2 }) {
|
|
|
236915
237525
|
) })
|
|
236916
237526
|
] });
|
|
236917
237527
|
}
|
|
236918
|
-
function
|
|
236919
|
-
|
|
236920
|
-
|
|
236921
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236922
|
-
|
|
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
|
+
] });
|
|
236923
237562
|
}
|
|
236924
|
-
function
|
|
236925
|
-
|
|
236926
|
-
|
|
236927
|
-
|
|
236928
|
-
|
|
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
|
+
) });
|
|
236929
237610
|
}
|
|
236930
|
-
function
|
|
236931
|
-
|
|
236932
|
-
|
|
236933
|
-
|
|
236934
|
-
|
|
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 }) });
|
|
236935
237616
|
}
|
|
236936
|
-
function
|
|
236937
|
-
|
|
236938
|
-
|
|
236939
|
-
|
|
236940
|
-
|
|
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 }) });
|
|
236941
237622
|
}
|
|
236942
|
-
function
|
|
236943
|
-
|
|
236944
|
-
|
|
236945
|
-
|
|
236946
|
-
|
|
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 }) });
|
|
237628
|
+
}
|
|
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 }) });
|
|
236947
237634
|
}
|
|
236948
|
-
function HtmlDetail({
|
|
236949
|
-
|
|
236950
|
-
|
|
236951
|
-
|
|
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
|
+
}
|
|
236952
237659
|
}
|
|
236953
|
-
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);
|
|
236954
237676
|
}, [content2]);
|
|
236955
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236956
|
-
|
|
236957
|
-
|
|
236958
|
-
|
|
236959
|
-
className: "
|
|
236960
|
-
|
|
236961
|
-
|
|
236962
|
-
|
|
236963
|
-
|
|
236964
|
-
|
|
236965
|
-
|
|
236966
|
-
|
|
236967
|
-
|
|
236968
|
-
|
|
236969
|
-
|
|
236970
|
-
|
|
236971
|
-
|
|
236972
|
-
|
|
236973
|
-
|
|
236974
|
-
|
|
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
|
+
] });
|
|
236975
237770
|
}
|
|
236976
237771
|
function FileDetail({
|
|
237772
|
+
scheduleId,
|
|
237773
|
+
taskId,
|
|
236977
237774
|
fileName,
|
|
236978
|
-
fileContent,
|
|
236979
|
-
fileLoading,
|
|
236980
237775
|
hasTask,
|
|
236981
|
-
hasFiles
|
|
237776
|
+
hasFiles,
|
|
237777
|
+
onCopyPath,
|
|
237778
|
+
onCopyAbsolutePath,
|
|
237779
|
+
onRevealInFinder
|
|
236982
237780
|
}) {
|
|
236983
237781
|
const { t: t2 } = useTranslation();
|
|
236984
237782
|
const fileKind = reactExports.useMemo(() => getFileKind(fileName), [fileName]);
|
|
236985
|
-
const isUnsupportedBinary = reactExports.useMemo(() => {
|
|
236986
|
-
if (!fileContent || !fileName) return false;
|
|
236987
|
-
if (fileKind === "image" || fileKind === "pdf" || fileKind === "docx" || fileKind === "pptx" || fileKind === "xlsx")
|
|
236988
|
-
return false;
|
|
236989
|
-
return isBinaryContent(fileContent);
|
|
236990
|
-
}, [fileContent, fileName, fileKind]);
|
|
236991
237783
|
if (!hasTask) {
|
|
236992
237784
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground", children: [
|
|
236993
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" }) }),
|
|
@@ -237006,12 +237798,20 @@ function FileDetail({
|
|
|
237006
237798
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: t2("automation.selectFileToPreview", "Select a file to preview") })
|
|
237007
237799
|
] });
|
|
237008
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
|
+
};
|
|
237009
237809
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full h-full min-w-0 relative overflow-hidden", children: [
|
|
237010
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: [
|
|
237011
237811
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: fileName, className: "size-4 shrink-0 text-muted-foreground/80" }),
|
|
237012
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 }) })
|
|
237013
237813
|
] }) }) }),
|
|
237014
|
-
/* @__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 }) })
|
|
237015
237815
|
] });
|
|
237016
237816
|
}
|
|
237017
237817
|
function buildTree2(paths) {
|
|
@@ -237120,13 +237920,13 @@ function FileTree({
|
|
|
237120
237920
|
}
|
|
237121
237921
|
),
|
|
237122
237922
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
|
|
237123
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () =>
|
|
237923
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onCopyAbsolutePath(node2.path), children: [
|
|
237124
237924
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3.5 mr-2" }),
|
|
237125
237925
|
t2("filePanel.copyPath", "Copy Path")
|
|
237126
237926
|
] }),
|
|
237127
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () =>
|
|
237927
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onCopyRelativePath(node2.path), children: [
|
|
237128
237928
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3.5 mr-2" }),
|
|
237129
|
-
t2("filePanel.
|
|
237929
|
+
t2("filePanel.copyRelativePath", "Copy Relative Path")
|
|
237130
237930
|
] }),
|
|
237131
237931
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
|
|
237132
237932
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onRevealInFinder(node2.path), children: [
|
|
@@ -237170,7 +237970,7 @@ function Panel({
|
|
|
237170
237970
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full min-h-0 flex-col text-xs w-full", children: [
|
|
237171
237971
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
|
|
237172
237972
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
|
|
237173
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-
|
|
237973
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-3.5" }),
|
|
237174
237974
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-nowrap", children: t2("automation.files", "Files") })
|
|
237175
237975
|
] }),
|
|
237176
237976
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto mr-2 flex items-center gap-0.5", children: tree.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -237207,11 +238007,8 @@ function Panel({
|
|
|
237207
238007
|
}
|
|
237208
238008
|
function Task() {
|
|
237209
238009
|
const { scheduleId, taskId } = useParams();
|
|
237210
|
-
const { t: t2 } = useTranslation();
|
|
237211
238010
|
const [taskFiles, setTaskFiles] = reactExports.useState([]);
|
|
237212
238011
|
const [selectedFile, setSelectedFile] = reactExports.useState(null);
|
|
237213
|
-
const [fileContent, setFileContent] = reactExports.useState(null);
|
|
237214
|
-
const [fileLoading, setFileLoading] = reactExports.useState(false);
|
|
237215
238012
|
const [loading, setLoading] = reactExports.useState(true);
|
|
237216
238013
|
const loadFiles = reactExports.useCallback(async () => {
|
|
237217
238014
|
if (!scheduleId || !taskId) return;
|
|
@@ -237220,7 +238017,6 @@ function Task() {
|
|
|
237220
238017
|
setTaskFiles(files ?? []);
|
|
237221
238018
|
const readme = (files ?? []).find((f2) => f2.toLowerCase() === "readme.md");
|
|
237222
238019
|
setSelectedFile(readme ?? null);
|
|
237223
|
-
setFileContent(null);
|
|
237224
238020
|
} catch {
|
|
237225
238021
|
setTaskFiles([]);
|
|
237226
238022
|
} finally {
|
|
@@ -237240,23 +238036,6 @@ function Task() {
|
|
|
237240
238036
|
subscribe$1.on("task-update", handler);
|
|
237241
238037
|
return () => subscribe$1.off("task-update", handler);
|
|
237242
238038
|
}, [scheduleId, taskId, loadFiles]);
|
|
237243
|
-
reactExports.useEffect(() => {
|
|
237244
|
-
if (!selectedFile || !scheduleId || !taskId) {
|
|
237245
|
-
setFileContent(null);
|
|
237246
|
-
return;
|
|
237247
|
-
}
|
|
237248
|
-
setFileLoading(true);
|
|
237249
|
-
(async () => {
|
|
237250
|
-
try {
|
|
237251
|
-
const content2 = await request.readTaskFile({ scheduleId, taskId, filePath: selectedFile });
|
|
237252
|
-
setFileContent(content2 ?? null);
|
|
237253
|
-
} catch {
|
|
237254
|
-
setFileContent("// Error loading file");
|
|
237255
|
-
} finally {
|
|
237256
|
-
setFileLoading(false);
|
|
237257
|
-
}
|
|
237258
|
-
})();
|
|
237259
|
-
}, [selectedFile, scheduleId, taskId]);
|
|
237260
238039
|
if (loading) {
|
|
237261
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" }) });
|
|
237262
238041
|
}
|
|
@@ -237264,11 +238043,40 @@ function Task() {
|
|
|
237264
238043
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ResizablePanel, { id: "fileDetail", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
237265
238044
|
FileDetail,
|
|
237266
238045
|
{
|
|
238046
|
+
scheduleId,
|
|
238047
|
+
taskId,
|
|
237267
238048
|
fileName: selectedFile,
|
|
237268
|
-
fileContent,
|
|
237269
|
-
fileLoading,
|
|
237270
238049
|
hasTask: true,
|
|
237271
|
-
hasFiles: taskFiles.length > 0
|
|
238050
|
+
hasFiles: taskFiles.length > 0,
|
|
238051
|
+
onCopyPath: async (file) => {
|
|
238052
|
+
try {
|
|
238053
|
+
await copyText(file);
|
|
238054
|
+
} catch {
|
|
238055
|
+
}
|
|
238056
|
+
},
|
|
238057
|
+
onCopyAbsolutePath: async (file) => {
|
|
238058
|
+
try {
|
|
238059
|
+
const abs2 = await request.getTaskFileSystemPath({
|
|
238060
|
+
scheduleId,
|
|
238061
|
+
taskId,
|
|
238062
|
+
filePath: file
|
|
238063
|
+
});
|
|
238064
|
+
await copyText(abs2);
|
|
238065
|
+
} catch {
|
|
238066
|
+
}
|
|
238067
|
+
},
|
|
238068
|
+
onRevealInFinder: async (file) => {
|
|
238069
|
+
if (isWebUI) return;
|
|
238070
|
+
try {
|
|
238071
|
+
const abs2 = await request.getTaskFileSystemPath({
|
|
238072
|
+
scheduleId,
|
|
238073
|
+
taskId,
|
|
238074
|
+
filePath: file
|
|
238075
|
+
});
|
|
238076
|
+
await electron.revealInFinder(abs2);
|
|
238077
|
+
} catch {
|
|
238078
|
+
}
|
|
238079
|
+
}
|
|
237272
238080
|
}
|
|
237273
238081
|
) }),
|
|
237274
238082
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ResizableHandle, { className: "bg-border/70" }),
|