@xopcai/xopc 0.0.392 → 0.0.393
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CZmaQbC9.js → agent-avatar-dicebear-1AF2KGju.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CPJr7NRR.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-cjJXJj_3.js +1 -0
- package/dist/gateway/static/root/assets/agents-DW3TlnIg.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-znm6_dW_.js → agents-admin-api-B5aykqg_.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-B_MFhXXU.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-TYGidVnd.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-DOkyvOF0.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-dSkmoISk.js → archive-plugin-BrFfEp0u.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DhWRn0dZ.js → automations-page-B7OofUPF.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DIod-bfm.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BJlZrYym.js → binary-plugins-BfAWnYG8.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-OHBssIfN.js → block-editor-_Y-QwZ-3.js} +5 -5
- package/dist/gateway/static/root/assets/browser-automation-inputs-DH9QHI9m.js +1 -0
- package/dist/gateway/static/root/assets/browser-automations-page-B_SnD9B0.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BPlqYpMM.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-page-BtzZvMIK.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-CgDteXZH.js → capabilities-pt2M56-E.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-WzoG3oBb.js +8 -0
- package/dist/gateway/static/root/assets/capability-header-actions-CFVx3iaZ.js +1 -0
- package/dist/gateway/static/root/assets/channels-BXA55GY2.js +1 -0
- package/dist/gateway/static/root/assets/chat-terminal-dock-D3GuiG3N.js +36 -0
- package/dist/gateway/static/root/assets/computer-settings-page-CIbHDlp8.js +1 -0
- package/dist/gateway/static/root/assets/connector-service-page-CDyCHkpK.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-DA2b6cJu.js +1 -0
- package/dist/gateway/static/root/assets/date-picker-C424c_g9.js +1 -0
- package/dist/gateway/static/root/assets/dependency-picker-BVJh9sYc.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-Q52A8vjp.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-CZr1CXxu.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-Bd-aOI7N.js +30 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BuB0g8zv.css +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-D_WWTsze.js +1 -0
- package/dist/gateway/static/root/assets/directory-picker-path-field-C6cUgrvg.js +1 -0
- package/dist/gateway/static/root/assets/extension-debug-page-DyyfC4gA.js +1 -0
- package/dist/gateway/static/root/assets/extension-page-Dho9o3ZZ.js +1 -0
- package/dist/gateway/static/root/assets/extension-settings-page-CdnIGyCH.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-BM__9Fws.js → gateway-config-swr-BEePO3Wl.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DS_GDx-x.js → gateway-realtime-Dng_VOvI.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DtlBf7oH.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-D0KSQRNZ.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DosoyMIH.js → gateway-startup-retry-CDCiy7Cd.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-BYHXWIfK.js → highlighted-body-KQOG7T2V-BNpj_mIM.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CH_A0W29.js +2 -0
- package/dist/gateway/static/root/assets/image-generation-api-DwkO2y46.js +1 -0
- package/dist/gateway/static/root/assets/imports-page-BrYvomnU.js +1 -0
- package/dist/gateway/static/root/assets/index-CKdOZoVu.js +260 -0
- package/dist/gateway/static/root/assets/index-Rxjt-jc3.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-BveDYfYk.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-CcIi1BhT.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-B1a69mlV.js +1 -0
- package/dist/gateway/static/root/assets/{local-session-drafts-Bye3ZtsW.js → local-session-drafts-CYEDUPH7.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BKyOF23r.js → locale-store-CE7L6MlS.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-Us1jv3C4.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-C9RAM7-s.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-D_7clISS.js → markdown-view-PrKvVpRh.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-B_4o8hac.js → media-plugins-CR1fp6IL.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-DQdcaMiu.js +1 -0
- package/dist/gateway/static/root/assets/messages-CaeL_miw.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-Q4yRx9iZ.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C9qu16IN.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-Cn_WK68Y.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-DrP6hEcg.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-3NbiWGRG.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-KKE5-V8k.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-content-BM0oqNxi.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-CPZrwf8n.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Besfx_07.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DLHHYP_v.js → registry-api-BO2Ck3aA.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CTDghL5L.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-Dq_50s27.js → runtime-tools-api-B1sb8nlw.js} +1 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-W0X_Fy7b.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-DNM2Zdyr.js +1 -0
- package/dist/gateway/static/root/assets/{session-api-Br11ih_M.js → session-api-CaAUJvu1.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-DoFTlgNz.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-Dxtablvd.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7zklouD.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-DCSHPFAN.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-4odCW0_2.js → settings-page-B18UbbaJ.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-JoSfluza.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-BLnS3hoH.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-DcIuPJK3.js +1 -0
- package/dist/gateway/static/root/assets/skill-api-CcYGkRPL.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-PnUZjoPK.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-D3JAw62U.js +2 -0
- package/dist/gateway/static/root/assets/style-BQqU-1pP.js +7 -0
- package/dist/gateway/static/root/assets/system-settings-panel-C974myUM.js +1 -0
- package/dist/gateway/static/root/assets/tab-completion-input-CxtEp0aP.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-CiljFekC.js +2 -0
- package/dist/gateway/static/root/assets/{task-expandable-content-CmQt5uxa.js → task-expandable-content-DTEVoNrM.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-DEE75MUn.js +1 -0
- package/dist/gateway/static/root/assets/tunnel-api-DWyI3uA3.js +1 -0
- package/dist/gateway/static/root/assets/usage-page-DJYvbxk7.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-CY0YuljR.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-eHZJD6Fw.js +2 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-BNG4ixJE.js +1 -0
- package/dist/gateway/static/root/assets/{voice-config-api-CmDtDA4g.js → voice-config-api-D0Wscn9W.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-CohIoAre.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Czfs5XFH.js → workflow-run-setup-panel-BXI8eyYh.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CVti0u-l.js +6 -0
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-C_COnY_B.js +1 -0
- package/dist/gateway/static/root/index.html +19 -69
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
- package/dist/src/agent/agent-manager.d.ts +1 -1
- package/dist/src/agent/agent-manager.js +11 -20
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/child-agent-factory.d.ts +2 -1
- package/dist/src/agent/child-agent-factory.js +2 -1
- package/dist/src/agent/coding/projectEvidence.d.ts +9 -0
- package/dist/src/agent/coding/projectEvidence.js +177 -0
- package/dist/src/agent/coding/repository-instructions.d.ts +8 -1
- package/dist/src/agent/coding/repository-instructions.js +9 -4
- package/dist/src/agent/coding/run-verification.d.ts +17 -2
- package/dist/src/agent/coding/run-verification.js +82 -12
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/execution-context.d.ts +1 -0
- package/dist/src/agent/embedded/execution-context.js +4 -1
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -0
- package/dist/src/agent/embedded/run-turn.js +41 -5
- package/dist/src/agent/embedded/session-runner.js +1 -1
- package/dist/src/agent/embedded/session-tool-result-guard.js +5 -0
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +2 -1
- package/dist/src/agent/external-tools/cliProvider.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/independent-execution.d.ts +2 -0
- package/dist/src/agent/independent-execution.js +12 -0
- package/dist/src/agent/memory/compaction.js +1 -1
- package/dist/src/agent/orchestration/delegation-scope.d.ts +1 -0
- package/dist/src/agent/orchestration/delegation-scope.js +4 -1
- package/dist/src/agent/orchestration/loop-guard.js +6 -2
- package/dist/src/agent/prompt/sections/agent-identity.js +4 -6
- package/dist/src/agent/prompt/sections/behavior.d.ts +3 -2
- package/dist/src/agent/prompt/sections/behavior.js +34 -27
- package/dist/src/agent/prompt/sections/memory-skills.d.ts +1 -1
- package/dist/src/agent/prompt/sections/memory-skills.js +10 -11
- package/dist/src/agent/prompt/sections/messaging-runtime.d.ts +3 -2
- package/dist/src/agent/prompt/sections/messaging-runtime.js +21 -24
- package/dist/src/agent/prompt/sections/response-language.js +7 -6
- package/dist/src/agent/prompt/sections/tooling.js +11 -10
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -1
- package/dist/src/agent/prompt/system-prompt-params.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt-params.js +2 -0
- package/dist/src/agent/prompt/system-prompt.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt.js +21 -18
- package/dist/src/agent/prompt/types.d.ts +2 -0
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +3 -2
- package/dist/src/agent/skills/format-skills-prompt.js +5 -2
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +5 -0
- package/dist/src/agent/tools/dataBatch.d.ts +1 -0
- package/dist/src/agent/tools/dataBatch.js +4 -1
- package/dist/src/agent/tools/delegate-tool.d.ts +1 -0
- package/dist/src/agent/tools/delegate-tool.js +1 -0
- package/dist/src/agent/tools/error-tracker.js +4 -2
- package/dist/src/agent/tools/exec-command.js +4 -3
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +20 -21
- package/dist/src/agent/tools/{delegation-parent-policy.d.ts → noninteractive-tool-policy.d.ts} +1 -1
- package/dist/src/agent/tools/{delegation-parent-policy.js → noninteractive-tool-policy.js} +4 -4
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/search/cache.d.ts +3 -1
- package/dist/src/agent/tools/search/cache.js +4 -1
- package/dist/src/agent/tools/search/providers/deepseek-protocol.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek-protocol.js +84 -0
- package/dist/src/agent/tools/search/providers/deepseek.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek.js +55 -0
- package/dist/src/agent/tools/search/providers/xopc-cloud.d.ts +2 -1
- package/dist/src/agent/tools/search/providers/xopc-cloud.js +36 -1
- package/dist/src/agent/tools/search/registry.d.ts +1 -0
- package/dist/src/agent/tools/search/registry.js +32 -6
- package/dist/src/agent/tools/search/request-gate.d.ts +13 -0
- package/dist/src/agent/tools/search/request-gate.js +41 -0
- package/dist/src/agent/tools/search/resolve-config.js +1 -1
- package/dist/src/agent/tools/search/search-info.d.ts +8 -0
- package/dist/src/agent/tools/search/search-info.js +34 -0
- package/dist/src/agent/tools/search/types.d.ts +19 -1
- package/dist/src/agent/tools/toolExposure.d.ts +3 -0
- package/dist/src/agent/tools/toolExposure.js +25 -0
- package/dist/src/agent/tools/web.js +8 -1
- package/dist/src/agent/tools/xopc-use-tool.js +7 -3
- package/dist/src/agent/workflow/subagent-runner.d.ts +1 -0
- package/dist/src/agent/workflow/subagent-runner.js +3 -3
- package/dist/src/agent/workflow/workflow-child-tools.js +13 -8
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/service/action-executor.js +2 -2
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/commands/search.d.ts +2 -2
- package/dist/src/cli/commands/search.js +8 -6
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/model-adapter.d.ts +3 -0
- package/dist/src/computer/model-adapter.js +120 -3
- package/dist/src/computer/model-policy.d.ts +1 -1
- package/dist/src/computer/model-policy.js +13 -6
- package/dist/src/computer/runtime.js +1 -0
- package/dist/src/config/agent-model-intents.js +1 -1
- package/dist/src/config/agent-profile.js +2 -2
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +14 -8
- package/dist/src/config/models-json.js +3 -1
- package/dist/src/config/outbound-proxy.d.ts +11 -0
- package/dist/src/config/outbound-proxy.js +30 -0
- package/dist/src/config/rules.js +5 -0
- package/dist/src/config/schema.d.ts +29 -6
- package/dist/src/config/schema.js +21 -4
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/config-tools-web.js +15 -4
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +3 -0
- package/dist/src/gateway/hono/lib/config-payload.d.ts +5 -0
- package/dist/src/gateway/hono/lib/config-payload.js +6 -1
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +7 -0
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +5 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +8 -3
- package/dist/src/gateway/service.js +5 -3
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/infra/http-proxy-env.d.ts +3 -0
- package/dist/src/infra/http-proxy-env.js +22 -2
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/personal-agent/communication.d.ts +2 -1
- package/dist/src/personal-agent/communication.js +11 -2
- package/dist/src/personal-agent/persona.d.ts +2 -1
- package/dist/src/personal-agent/persona.js +3 -2
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/personal-agent/prompts.d.ts +2 -0
- package/dist/src/personal-agent/prompts.js +69 -7
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/reply-style.d.ts +4 -2
- package/dist/src/personal-agent/reply-style.js +19 -3
- package/dist/src/personal-agent/request-service.js +14 -9
- package/dist/src/personal-agent/service.js +2 -2
- package/dist/src/pets/loopi-artwork.d.ts +2 -0
- package/dist/src/pets/loopi-artwork.js +36 -0
- package/dist/src/pets/pointer.d.ts +6 -0
- package/dist/src/pets/pointer.js +16 -0
- package/dist/src/project-trust/trust-store.d.ts +5 -0
- package/dist/src/project-trust/trust-store.js +7 -1
- package/dist/src/providers/index.js +3 -3
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-registry.js +2 -0
- package/dist/src/providers/model-supplements.d.ts +0 -2
- package/dist/src/providers/model-supplements.js +2 -18
- package/dist/src/providers/xopc-cloud-credit-budget.d.ts +1 -0
- package/dist/src/providers/xopc-cloud-credit-budget.js +4 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +51 -40
- package/dist/src/tasks/task-application-service.js +5 -1
- package/dist/src/tasks/task-contract-planner.js +21 -6
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-language.d.ts +2 -0
- package/dist/src/tasks/task-language.js +13 -2
- package/dist/src/tasks/task-run-coordinator.js +5 -1
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +2 -3
- package/package.json +8 -4
- package/dist/gateway/static/root/assets/activity-YogQEteU.js +0 -1
- package/dist/gateway/static/root/assets/activity-store-DtTSRUyF.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-0GXoU7WL.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BxDqL7uc.js +0 -1
- package/dist/gateway/static/root/assets/agents-CYmRcXr-.js +0 -77
- package/dist/gateway/static/root/assets/app-chrome-BeB4KgOf.js +0 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-FhWeowCY.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-DXin262V.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-2M_l4Naz.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CVIWgoTx.js +0 -6
- package/dist/gateway/static/root/assets/browser-automation-inputs-uVEhZWHz.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-CEFnpvTO.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-sQpJic5b.js +0 -3
- package/dist/gateway/static/root/assets/button-aIC072nz.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-BSB93QBR.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-BKkN4sTh.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DCZTR8Hu.js +0 -8
- package/dist/gateway/static/root/assets/capability-header-actions-D0HwmxyW.js +0 -1
- package/dist/gateway/static/root/assets/channels-DRraXYSd.js +0 -1
- package/dist/gateway/static/root/assets/chat-terminal-dock-DpM489kK.js +0 -36
- package/dist/gateway/static/root/assets/chevron-left-DqFhpbvK.js +0 -1
- package/dist/gateway/static/root/assets/chevron-right-BweFrslA.js +0 -1
- package/dist/gateway/static/root/assets/circle-alert-BEjgurr2.js +0 -1
- package/dist/gateway/static/root/assets/circle-dashed-8qMD7gHf.js +0 -1
- package/dist/gateway/static/root/assets/circle-dot-BAseJTrF.js +0 -1
- package/dist/gateway/static/root/assets/cloud-C4-yfnnk.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-D0ir9aA1.js +0 -1
- package/dist/gateway/static/root/assets/connector-service-page-Y5SYaiJO.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DRSbj4gn.js +0 -1
- package/dist/gateway/static/root/assets/copy-text-row-C7egVuKr.js +0 -1
- package/dist/gateway/static/root/assets/date-formatters-CUZAyDEg.js +0 -1
- package/dist/gateway/static/root/assets/date-picker-DyUP-8hR.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-QF9qLWIG.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-Qfns4SO-.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CuITd-Xa.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BP6iMVw1.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C8RPqM_F.js +0 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-DnD9eyoU.js +0 -1
- package/dist/gateway/static/root/assets/dist-C3DSFZCi.js +0 -1
- package/dist/gateway/static/root/assets/electron-env-Dit0bHgy.js +0 -1
- package/dist/gateway/static/root/assets/extension-debug-page-B5ikNsSj.js +0 -1
- package/dist/gateway/static/root/assets/extension-page-D-PBMAtT.js +0 -1
- package/dist/gateway/static/root/assets/extension-provider-CdlACvkE.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BPUYMNb0.js +0 -1
- package/dist/gateway/static/root/assets/form-field-width-DJw_jULe.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-uEdmIROn.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BKj4PQs4.js +0 -1
- package/dist/gateway/static/root/assets/globe-DSSGFWFn.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D1ZBF3me.js +0 -2
- package/dist/gateway/static/root/assets/image-generation-api-BB3D6OV1.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-BCcWIxOO.js +0 -1
- package/dist/gateway/static/root/assets/index-Bo70AuAq.js +0 -260
- package/dist/gateway/static/root/assets/index-BxoR4_xr.css +0 -1
- package/dist/gateway/static/root/assets/index.module-Cd9ENXfk.js +0 -1
- package/dist/gateway/static/root/assets/interaction-BdhHBbYa.js +0 -1
- package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-Bc9UWPqr.js +0 -1
- package/dist/gateway/static/root/assets/loader-circle-CifKLtgG.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-jnK1j04U.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-page-DpN8UN_Y.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-DBR5mfxw.js +0 -2
- package/dist/gateway/static/root/assets/loopi-C09I2mNj.css +0 -1
- package/dist/gateway/static/root/assets/loopi-Djb8XU3l.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-rs2cdb5f.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Bl4kOOZT.js +0 -1
- package/dist/gateway/static/root/assets/message-square-plus-XP0tGdlV.js +0 -1
- package/dist/gateway/static/root/assets/messages-B7VtMXec.js +0 -3
- package/dist/gateway/static/root/assets/mic-CuUb7zc-.js +0 -1
- package/dist/gateway/static/root/assets/minimize-2-DtOGrlpo.js +0 -1
- package/dist/gateway/static/root/assets/models-hub-cache-D0vR7vex.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-B7R-cZWE.js +0 -5
- package/dist/gateway/static/root/assets/notes-api-DZkezSIy.js +0 -2
- package/dist/gateway/static/root/assets/notes-page-DY9MNatd.js +0 -8
- package/dist/gateway/static/root/assets/page-context-capture-button-C-X8J1IO.js +0 -1
- package/dist/gateway/static/root/assets/pencil-DmIY3Oa-.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CIZWUoUh.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DGKUpVsz.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-BJU2fmPn.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-CYV_8zRl.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-DfQ9h_YX.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-B_fYXcAW.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CHdeAtpp.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CbJWGHW_.js +0 -1
- package/dist/gateway/static/root/assets/rotate-ccw-JM1TBLpp.js +0 -1
- package/dist/gateway/static/root/assets/rotate-cw-LIg3Am9S.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-jqYXsCuk.js +0 -1
- package/dist/gateway/static/root/assets/schema-form-DNXZLVqh.js +0 -1
- package/dist/gateway/static/root/assets/search-DA7gz22f.js +0 -1
- package/dist/gateway/static/root/assets/secret-input-BxWHx6J6.js +0 -1
- package/dist/gateway/static/root/assets/send-session-input-NpLYu1ip.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-Bb9pevyM.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-DrGCnBhV.js +0 -1
- package/dist/gateway/static/root/assets/settings-2-D-csvaET.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-B61Eh7eB.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-draft-Dy10ldo8.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-num14vSv.js +0 -1
- package/dist/gateway/static/root/assets/settings-shell-dialog-layer-BU3UuiJr.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DaU9o0Ll.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-BhjQPZbF.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-LERhIwgz.js +0 -2
- package/dist/gateway/static/root/assets/shares-api-CgsiMdCX.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DmvyqIyT.js +0 -1
- package/dist/gateway/static/root/assets/skeleton-BI5TyibZ.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-plToSoFo.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-utils-C7V4JVXM.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BFw81Ar6.js +0 -1
- package/dist/gateway/static/root/assets/skill-wire-pattern-BPpeIcCi.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BLUsxGOo.js +0 -2
- package/dist/gateway/static/root/assets/style-1FPsMO2E.js +0 -7
- package/dist/gateway/static/root/assets/system-settings-panel-DL3WXRnL.js +0 -1
- package/dist/gateway/static/root/assets/tab-completion-input-D64VNmiA.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DWM5xGbe.js +0 -2
- package/dist/gateway/static/root/assets/theme-store-CPdeCbZI.js +0 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-m51enJFx.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-B5I53jzk.js +0 -1
- package/dist/gateway/static/root/assets/usage-page-B7qyfnMN.js +0 -1
- package/dist/gateway/static/root/assets/use-async-resource-GrnWNwMZ.js +0 -1
- package/dist/gateway/static/root/assets/use-autosave-C2__K1-y.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-61W-5Q6m.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-DZUWxdhm.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-DkIuYpuf.js +0 -2
- package/dist/gateway/static/root/assets/voice-api-key-field-DB--pFJX.js +0 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-Cp2uDvFO.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-Blwp7T-_.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-RN_QXcGY.js +0 -6
- package/dist/gateway/static/root/assets/workspace-api-lHTRLje0.js +0 -2
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-D31rz9OQ.js +0 -1
- package/dist/src/agent/bootstrap/project-agents-context.d.ts +0 -2
- package/dist/src/agent/bootstrap/project-agents-context.js +0 -30
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./createLucideIcon-DPHK1VkS.js";import{t as a}from"./check-DUBLcKHA.js";import{t as o}from"./cn-0WouolD0.js";import{t as s}from"./skeleton-BI5TyibZ.js";import{a as c,i as l,o as u,s as d}from"./dist-C3DSFZCi.js";import{a as f,s as p,t as m}from"./settings-shell-dialog-layer-BU3UuiJr.js";var h=i(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),g=e(t(),1),_=n();function v(e,t=!1){if(!t)return m;switch(e){case`modal`:return f;case`page`:return p;default:return`z-50`}}var y=r(),b=(0,g.createContext)({layer:`default`,portalContainer:null});function x(e,t){return e===`modal`||t===`modal`?`modal`:e===`page`||t===`page`?`page`:`default`}function S(e){let t=(0,_.c)(9),{layer:n,portalContainer:r,children:i}=e,a=(0,g.useContext)(b),o;t[0]!==n||t[1]!==a.layer?(o=x(a.layer,n),t[0]=n,t[1]=a.layer,t[2]=o):o=t[2];let s=o,c=r??a.portalContainer,l;t[3]!==s||t[4]!==c?(l={layer:s,portalContainer:c},t[3]=s,t[4]=c,t[5]=l):l=t[5];let u;return t[6]!==i||t[7]!==l?(u=(0,y.jsx)(b.Provider,{value:l,children:i}),t[6]=i,t[7]=l,t[8]=u):u=t[8],u}function C(){return(0,g.useContext)(b).layer}function w(){return(0,g.useContext)(b).portalContainer}function T(e){let t=(0,_.c)(3),n=w(),r;return t[0]!==n||t[1]!==e?(r=e?.closest(`[role="dialog"]`)??n,t[0]=n,t[1]=e,t[2]=r):r=t[2],r}function E(e){let t=(0,_.c)(14),{options:n,values:r,multiple:i,onChange:a,ariaLabel:s}=e,c=i===void 0?!1:i,l=(0,g.useId)(),u;if(t[0]!==c||t[1]!==l||t[2]!==a||t[3]!==n||t[4]!==r){let e;t[6]!==c||t[7]!==l||t[8]!==a||t[9]!==r?(e=e=>(0,y.jsxs)(`label`,{className:o(`touch-target flex min-h-10 min-w-0 items-center gap-3 rounded-md px-2 py-2 text-sm text-fg has-focus-visible:ring-2 has-focus-visible:ring-accent`,e.disabled?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-hover`),children:[(0,y.jsx)(`input`,{type:c?`checkbox`:`radio`,name:l,value:e.value,checked:r.includes(e.value),disabled:e.disabled,className:`shrink-0 accent-accent`,onChange:t=>a(c?t.target.checked?[...r,e.value]:r.filter(t=>t!==e.value):[e.value])}),e.icon,(0,y.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.label})]},e.value),t[6]=c,t[7]=l,t[8]=a,t[9]=r,t[10]=e):e=t[10],u=n.map(e),t[0]=c,t[1]=l,t[2]=a,t[3]=n,t[4]=r,t[5]=u}else u=t[5];let d;return t[11]!==s||t[12]!==u?(d=(0,y.jsx)(`fieldset`,{"aria-label":s,className:`min-w-0 space-y-0.5`,children:u}),t[11]=s,t[12]=u,t[13]=d):d=t[13],d}var D=`flex max-h-[min(20rem,var(--radix-popover-content-available-height))] flex-col overflow-hidden`,O=`min-h-0 flex-1 overflow-y-auto overscroll-y-contain touch-pan-y [scrollbar-gutter:stable]`;function k({value:e,options:t,placeholder:n,allowEmpty:r=!0,emptyLabel:i=n,emptyDisabled:f=!1,disabledValues:p,disabled:m,id:_,ariaLabel:b,ariaLabelledBy:x,title:S,triggerClassName:w,triggerIcon:E,contentClassName:k,side:A=`bottom`,align:j=`start`,onChange:M,searchPlaceholder:N,searchValue:P,onSearchChange:F,loading:I=!1,statusMessage:L,selectedLabel:R}){let[z,B]=(0,g.useState)(!1),[V,H]=(0,g.useState)(null),U=C(),W=T(V),G=v(U,W!==null),K=t.find(t=>t.value===e),q=R??K?.label??(e?`${e} · unavailable`:n),J;return(0,y.jsxs)(u,{open:z,onOpenChange:B,children:[(0,y.jsx)(d,{asChild:!0,children:(0,y.jsxs)(`button`,{ref:H,id:_,type:`button`,"aria-label":b,"aria-labelledby":x,title:S,disabled:m,className:o(`touch-target box-border flex h-10 w-full min-w-0 items-center justify-between gap-2 rounded-lg border border-edge bg-surface-inset px-3 text-left text-sm font-normal text-fg`,`hover:border-edge-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,m&&`cursor-not-allowed opacity-50 hover:border-edge`,w),children:[E,(0,y.jsx)(`span`,{className:o(`min-w-0 truncate`,!e&&`text-fg-subtle`),children:q}),(0,y.jsx)(h,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":`true`})]})}),(0,y.jsx)(c,{container:W??void 0,children:(0,y.jsxs)(l,{side:A,align:j,sideOffset:4,collisionPadding:8,className:o(G,D,`w-[var(--radix-popover-trigger-width)] min-w-[16rem] rounded-lg border border-edge bg-surface-overlay p-1 shadow-popover outline-none`,k),children:[N?(0,y.jsx)(`input`,{type:`search`,"aria-label":N,placeholder:N,value:P,onChange:e=>F?.(e.target.value),className:`mb-1 w-full shrink-0 rounded-md bg-surface-base px-3 py-2 text-base text-fg placeholder:text-fg-subtle sm:text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`}):null,(0,y.jsxs)(`div`,{"data-select-scroll-region":!0,className:o(O,`max-h-64`),children:[r?(0,y.jsxs)(`button`,{type:`button`,disabled:f,className:o(`touch-target flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm text-fg hover:bg-surface-hover`,e===``&&`bg-surface-active font-medium`,f&&`cursor-not-allowed opacity-45 hover:bg-transparent`),onClick:()=>{f||(M(``),B(!1))},children:[(0,y.jsx)(a,{className:o(`size-4 shrink-0`,e!==``&&`invisible`),"aria-hidden":`true`}),(0,y.jsx)(`span`,{className:`min-w-0 truncate text-fg-subtle`,children:i})]}):null,I?(0,y.jsx)(`div`,{className:`space-y-2 p-2`,"aria-busy":`true`,children:[0,1,2].map(e=>(0,y.jsx)(s,{className:`h-8 w-full`},e))}):null,L&&!I?(0,y.jsx)(`p`,{role:`status`,className:`px-3 py-2 text-xs text-fg-muted`,children:L}):null,(I?[]:t).map(t=>{let n=t.disabled===!0||p?.has(t.value)===!0&&t.value!==e,r=t.group&&t.group!==J;return J=t.group,(0,y.jsxs)(g.Fragment,{children:[r?(0,y.jsx)(`div`,{className:`px-2 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-fg-subtle`,children:t.group}):null,(0,y.jsxs)(`button`,{type:`button`,disabled:n,className:o(`touch-target flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm text-fg hover:bg-surface-hover`,t.value===e&&`bg-surface-active font-medium`,n&&`cursor-not-allowed opacity-45 hover:bg-transparent`),onClick:()=>{n||(M(t.value),B(!1))},children:[t.icon??(0,y.jsx)(a,{className:o(`size-4 shrink-0`,t.value!==e&&`invisible`),"aria-hidden":`true`}),(0,y.jsx)(`span`,{className:`min-w-0 truncate`,children:t.label}),t.icon?(0,y.jsx)(a,{className:o(`ml-auto size-4 shrink-0`,t.value!==e&&`invisible`),"aria-hidden":!0}):null]})]},`${t.group??``}:${t.value}`)})]})]})})]})}function A(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(A).join(``):(0,g.isValidElement)(e)?A(e.props.children):``}function j(e,t){let n=[];return g.Children.forEach(e,e=>{if(!(0,g.isValidElement)(e))return;if(e.type===g.Fragment){n.push(...j(e.props.children,t));return}if(e.type===N){let t=e.props;n.push(...j(t.children,A(t.label)));return}if(e.type!==M)return;let r=e.props,i=A(r.children).trim(),a=r.value==null?i:String(r.value);n.push({value:a,label:i,disabled:r.disabled,group:t})}),n}function M(e){return null}function N(e){return null}function P(e){if(!e)return;let t=e.split(/\s+/).filter(Boolean).filter(e=>{let t=e.includes(`:`)?e.slice(e.lastIndexOf(`:`)+1):e;return t===`block`||t===`inline-block`||t===`inline-flex`||t===`flex`||t===`flex-1`||t===`flex-auto`||t===`flex-initial`||t===`flex-none`||t===`grow`||t===`shrink`||t===`min-w-0`||t===`min-h-0`||t.startsWith(`w-`)||t.startsWith(`min-w-`)||t.startsWith(`max-w-`)||t.startsWith(`basis-`)||t.startsWith(`grow-`)||t.startsWith(`shrink-`)||t.startsWith(`self-`)||t.startsWith(`order-`)||t.startsWith(`col-`)||t.startsWith(`row-`)});return t.length===0?void 0:t.join(` `)}function F(e){let t=(0,_.c)(66),n,r,i,a,s,c,l,u,d,f,p,m;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12]):({align:n,children:r,className:i,contentClassName:a,disabled:s,id:c,onChange:l,placeholder:u,side:f,triggerClassName:p,value:m,...d}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m);let h=(0,g.useId)(),v=m==null?``:String(m),b,x,S,C,w,T,E,D,O,A;if(t[13]!==r||t[14]!==i||t[15]!==s||t[16]!==h||t[17]!==c||t[18]!==u||t[19]!==d.name||t[20]!==v){let e=j(r);C=e.find(L),x=C!==void 0,S=C?.label||u||``,D=s||void 0,t[31]===i?O=t[32]:(O=P(i),t[31]=i,t[32]=O),A=d.name,b=k,w=c??h,T=v,E=e.filter(I),t[13]=r,t[14]=i,t[15]=s,t[16]=h,t[17]=c,t[18]=u,t[19]=d.name,t[20]=v,t[21]=b,t[22]=x,t[23]=S,t[24]=C,t[25]=w,t[26]=T,t[27]=E,t[28]=D,t[29]=O,t[30]=A}else b=t[21],x=t[22],S=t[23],C=t[24],w=t[25],T=t[26],E=t[27],D=t[28],O=t[29],A=t[30];let M=u??S,N=C?.disabled===!0,F=d[`aria-label`],R=d[`aria-labelledby`],z=d.title,B;t[33]!==i||t[34]!==p?(B=o(i,p),t[33]=i,t[34]=p,t[35]=B):B=t[35];let V;t[36]===l?V=t[37]:(V=e=>l?.({target:{value:e},currentTarget:{value:e}}),t[36]=l,t[37]=V);let H;t[38]!==b||t[39]!==n||t[40]!==x||t[41]!==a||t[42]!==s||t[43]!==S||t[44]!==d.title||t[45]!==f||t[46]!==w||t[47]!==R||t[48]!==B||t[49]!==V||t[50]!==T||t[51]!==E||t[52]!==M||t[53]!==N||t[54]!==F?(H=(0,y.jsx)(b,{id:w,value:T,options:E,placeholder:M,allowEmpty:x,emptyLabel:S,emptyDisabled:N,disabled:s,ariaLabel:F,ariaLabelledBy:R,title:z,side:f,align:n,triggerClassName:B,contentClassName:a,onChange:V}),t[38]=b,t[39]=n,t[40]=x,t[41]=a,t[42]=s,t[43]=S,t[44]=d.title,t[45]=f,t[46]=w,t[47]=R,t[48]=B,t[49]=V,t[50]=T,t[51]=E,t[52]=M,t[53]=N,t[54]=F,t[55]=H):H=t[55];let U;t[56]!==s||t[57]!==d.name||t[58]!==v?(U=(0,y.jsx)(`input`,{name:d.name,value:v,readOnly:!0,hidden:!0,disabled:s}),t[56]=s,t[57]=d.name,t[58]=v,t[59]=U):U=t[59];let W;return t[60]!==H||t[61]!==U||t[62]!==D||t[63]!==O||t[64]!==A?(W=(0,y.jsxs)(`div`,{"aria-disabled":D,className:O,"data-select-name":A,children:[H,U]}),t[60]=H,t[61]=U,t[62]=D,t[63]=O,t[64]=A,t[65]=W):W=t[65],W}function I(e){return e.value!==``}function L(e){return e.value===``}export{D as a,T as c,h as d,E as i,C as l,F as n,O as o,M as r,S as s,k as t,v as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./download-Dk-ZjtO6.js";import{t as r}from"./external-link-DjqjBmc3.js";import{t as i}from"./cn-0WouolD0.js";import{n as a}from"./interaction-BdhHBbYa.js";import{n as o}from"./electron-env-Dit0bHgy.js";var s=e(),c=t();function l(e){let t=(0,s.c)(31),{message:l,downloadLabel:u,onDownload:d,openSystemLabel:f,onOpenWithSystemApp:p,chooseAppLabel:m,onChooseOpenWithApp:h,canOpenWithSystemApp:g,canChooseOpenWithApp:_}=e,v=g===void 0?!0:g,y=_===void 0?!0:_,b;t[0]!==v||t[1]!==p||t[2]!==f?(b=o()&&v&&typeof p==`function`&&typeof f==`string`&&f.length>0,t[0]=v,t[1]=p,t[2]=f,t[3]=b):b=t[3];let x=b,S;t[4]!==y||t[5]!==m||t[6]!==h?(S=o()&&y&&typeof h==`function`&&typeof m==`string`&&m.length>0,t[4]=y,t[5]=m,t[6]=h,t[7]=S):S=t[7];let C=S,w;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(w=i(`flex flex-col gap-2 rounded-lg border border-edge-subtle bg-surface-hover/60 p-3 sm:flex-row sm:items-center sm:justify-between dark:border-edge`),t[8]=w):w=t[8];let T;t[9]===l?T=t[10]:(T=(0,c.jsx)(`p`,{className:`min-w-0 text-xs leading-relaxed text-fg-muted`,children:l}),t[9]=l,t[10]=T);let E;t[11]!==p||t[12]!==f||t[13]!==x?(E=x?(0,c.jsxs)(`button`,{type:`button`,className:i(`inline-flex items-center gap-1.5 rounded-md border border-edge bg-surface-panel px-3 py-1.5 text-xs font-medium text-fg shadow-sm dark:border-edge`,a.transition,a.press,a.focusRingPanel),onClick:()=>void p?.(),children:[(0,c.jsx)(r,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),f]}):null,t[11]=p,t[12]=f,t[13]=x,t[14]=E):E=t[14];let D;t[15]!==m||t[16]!==h||t[17]!==C?(D=C?(0,c.jsxs)(`button`,{type:`button`,className:i(`inline-flex items-center gap-1.5 rounded-md border border-edge bg-surface-panel px-3 py-1.5 text-xs font-medium text-fg shadow-sm dark:border-edge`,a.transition,a.press,a.focusRingPanel),onClick:()=>void h?.(),children:[(0,c.jsx)(r,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),m]}):null,t[15]=m,t[16]=h,t[17]=C,t[18]=D):D=t[18];let O;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(O=i(`inline-flex items-center gap-1.5 rounded-md border border-accent bg-accent px-3 py-1.5 text-xs font-medium text-on-accent shadow-sm`,a.transition,a.press,a.focusRingPanel),t[19]=O):O=t[19];let k;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,c.jsx)(n,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[20]=k):k=t[20];let A;t[21]!==u||t[22]!==d?(A=(0,c.jsxs)(`button`,{type:`button`,className:O,onClick:d,children:[k,u]}),t[21]=u,t[22]=d,t[23]=A):A=t[23];let j;t[24]!==A||t[25]!==E||t[26]!==D?(j=(0,c.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:[E,D,A]}),t[24]=A,t[25]=E,t[26]=D,t[27]=j):j=t[27];let M;return t[28]!==j||t[29]!==T?(M=(0,c.jsxs)(`div`,{className:w,children:[T,j]}),t[28]=j,t[29]=T,t[30]=M):M=t[30],M}export{l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{d as n,r,t as i}from"./chunk-KS7C4IRE-B2HK1psj.js";import{n as a}from"./locale-store-BKyOF23r.js";import{a as o,r as s}from"./product-delivery-DwmnNJvk.js";import{i as c}from"./vendor-swr-BIWyz7Rc.js";import{t as l}from"./skeleton-BI5TyibZ.js";import{fr as u}from"./index-Bo70AuAq.js";import{t as d}from"./open-route-MyZ2sB9C.js";var f=e(),p=t();function m(){let e=(0,f.c)(14),t=n(),i=a(h)===`zh`,m=s(`xopc://open${t.search}`),_=m?.kind===`local_app`?m.id:null,{data:v,error:y}=c(_?[`local-app-open`,_]:null,()=>u(_));if(!m){let t=i?`这个打开链接无效。`:`This open link is invalid.`,n;return e[0]!==t||e[1]!==i?(n=(0,p.jsx)(g,{message:t,zh:i}),e[0]=t,e[1]=i,e[2]=n):n=e[2],n}if(m.kind!==`local_app`){let t=o({...m,title:m.id,capabilities:[`open`]}),n;return e[3]!==t||e[4]!==i?(n=t?(0,p.jsx)(r,{to:t,replace:!0}):(0,p.jsx)(g,{message:i?`这个内容无法在应用中打开。`:`This content cannot be opened in the app.`,zh:i}),e[3]=t,e[4]=i,e[5]=n):n=e[5],n}if(y){let t=typeof y==`object`&&y&&`status`in y&&y.status===404?i?`找不到这个应用,它可能已被删除。`:`This app was not found and may have been deleted.`:y instanceof Error?y.message:i?`无法打开这个应用。`:`Unable to open this app.`,n;return e[6]!==t||e[7]!==i?(n=(0,p.jsx)(g,{message:t,zh:i}),e[6]=t,e[7]=i,e[8]=n):n=e[8],n}if(v){let t;e[9]===v?t=e[10]:(t=d(v),e[9]=v,e[10]=t);let n;return e[11]===t?n=e[12]:(n=(0,p.jsx)(r,{to:t,replace:!0}),e[11]=t,e[12]=n),n}let b;return e[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,p.jsxs)(`div`,{className:`flex w-full flex-col gap-4 px-3 py-6 sm:px-5 xl:px-6`,"aria-busy":!0,children:[(0,p.jsx)(l,{className:`h-6 w-48`}),(0,p.jsx)(l,{className:`h-32 rounded-xl`})]}),e[13]=b):b=e[13],b}function h(e){return e.language}function g(e){let t=(0,f.c)(7),{message:n,zh:r}=e,a;t[0]===n?a=t[1]:(a=(0,p.jsx)(`p`,{children:n}),t[0]=n,t[1]=a);let o=r?`查看应用`:`View apps`,s;t[2]===o?s=t[3]:(s=(0,p.jsx)(i,{className:`mt-3 inline-flex font-medium text-accent hover:underline`,to:`/local-apps`,children:o}),t[2]=o,t[3]=s);let c;return t[4]!==a||t[5]!==s?(c=(0,p.jsxs)(`div`,{className:`m-6 rounded-xl border border-danger/30 bg-danger-soft p-4 text-sm text-danger`,role:`alert`,children:[a,s]}),t[4]=a,t[5]=s,t[6]=c):c=t[6],c}export{m as ProductOpenPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./chunk-KS7C4IRE-B2HK1psj.js";import{t as r}from"./markdown-view-D_7clISS.js";import{t as i}from"./messages-B7VtMXec.js";import{c as a,n as o,r as s}from"./locale-store-BKyOF23r.js";import{i as c}from"./vendor-swr-BIWyz7Rc.js";import{$r as l,Br as u,In as d,Pr as f,Ui as p,fr as m,h,l as g,mr as _,v}from"./index-Bo70AuAq.js";import{i as y}from"./automation-display-DCkjVzA0.js";import{t as b}from"./open-route-MyZ2sB9C.js";var x=e(),S=t();async function C(e){switch(e.kind){case`project`:return{kind:e.kind,value:await p(e.id)};case`workflow_run`:return{kind:e.kind,value:await h(e.id,{ownerAgentId:e.ownerAgentId})};case`workflow_definition`:{let t=await v();return{kind:e.kind,value:t.find(t=>t.id===e.id||t.name===e.id)}}case`automation`:{let[t,n]=await Promise.all([g.list(),g.runs(5,e.id)]);return{kind:e.kind,value:t.automations.find(t=>t.id===e.id),runs:n.runs}}case`local_app`:{let t=await m(e.id),n=e.sourceHash?await _(e.id,e.sourceHash):void 0;return{kind:e.kind,value:t,previewUrl:n?.previewUrl||t.draftPreviewUrl}}}}var w={pending:[`等待中`,`Pending`],planned:[`计划中`,`Planned`],active:[`进行中`,`Active`],paused:[`已暂停`,`Paused`],completed:[`已完成`,`Completed`],cancelled:[`已取消`,`Cancelled`],archived:[`已归档`,`Archived`],queued:[`排队中`,`Queued`],running:[`运行中`,`Running`],succeeded:[`成功`,`Succeeded`],failed:[`失败`,`Failed`],timeout:[`超时`,`Timed out`],cancelling:[`取消中`,`Cancelling`],unknown:[`尚未评估`,`Not assessed`],on_track:[`进展正常`,`On track`],at_risk:[`存在风险`,`At risk`],off_track:[`偏离计划`,`Off track`]};function T(e){let t=(0,x.c)(138),{target:r}=e,p=a(A),m=o(k),h=m===`zh`,g=i(m),_;t[0]===h?_=t[1]:(_=e=>w[e]?.[+!h]||e,t[0]=h,t[1]=_);let v=_,T;t[2]!==r.href||t[3]!==p?(T=[`chat-product-preview`,r.href,p],t[2]=r.href,t[3]=p,t[4]=T):T=t[4];let j;t[5]===r?j=t[6]:(j=()=>C(r),t[5]=r,t[6]=j);let M;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(M={shouldRetryOnError:!1,refreshInterval:O},t[7]=M):M=t[7];let{data:N,error:P,isLoading:F}=c(T,j,M);if(F){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(d,{}),t[8]=e):e=t[8],e}if(P){let e=h?`无法加载内容,它可能已删除或暂时不可用。`:`Unable to load this content. It may have been deleted or be temporarily unavailable.`,n;return t[9]===e?n=t[10]:(n=(0,S.jsx)(`p`,{role:`alert`,className:`text-sm text-fg-muted`,children:e}),t[9]=e,t[10]=n),n}if(!N?.value){let e=h?`内容不存在或已删除。`:`This content is unavailable or has been deleted.`,n;return t[11]===e?n=t[12]:(n=(0,S.jsx)(`p`,{className:`text-sm text-fg-muted`,children:e}),t[11]=e,t[12]=n),n}let I=D;if(N.kind===`project`){let e=N.value,n;t[13]===e.name?n=t[14]:(n=(0,S.jsx)(`h2`,{className:`break-words text-lg font-semibold text-fg`,children:e.name}),t[13]=e.name,t[14]=n);let r;t[15]!==e.status||t[16]!==v?(r=v(e.status),t[15]=e.status,t[16]=v,t[17]=r):r=t[17];let i;t[18]!==e.health||t[19]!==v?(i=v(e.health),t[18]=e.health,t[19]=v,t[20]=i):i=t[20];let a;t[21]!==r||t[22]!==i?(a=(0,S.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[r,` · `,i]}),t[21]=r,t[22]=i,t[23]=a):a=t[23];let o;t[24]!==I||t[25]!==e.description?(o=I(e.description),t[24]=I,t[25]=e.description,t[26]=o):o=t[26];let s;t[27]!==I||t[28]!==e.brief?(s=I(e.brief),t[27]=I,t[28]=e.brief,t[29]=s):s=t[29];let c;t[30]!==I||t[31]!==e.outcome?(c=I(e.outcome),t[30]=I,t[31]=e.outcome,t[32]=c):c=t[32];let l;t[33]!==s||t[34]!==c||t[35]!==n||t[36]!==a||t[37]!==o?(l=(0,S.jsxs)(`div`,{className:`space-y-3`,children:[n,a,o,s,c]}),t[33]=s,t[34]=c,t[35]=n,t[36]=a,t[37]=o,t[38]=l):l=t[38];let u;t[39]!==e.successCriteria||t[40]!==h?(u=e.successCriteria?.length>0&&(0,S.jsxs)(`section`,{className:`space-y-3`,children:[(0,S.jsx)(`h3`,{className:`font-medium text-fg`,children:h?`完成标准`:`Success criteria`}),(0,S.jsx)(`ul`,{className:`list-disc space-y-2 pl-5 text-sm text-fg`,children:e.successCriteria.map(E)})]}),t[39]=e.successCriteria,t[40]=h,t[41]=u):u=t[41];let d;t[42]!==e.milestones||t[43]!==v||t[44]!==h?(d=e.milestones?.length>0&&(0,S.jsxs)(`section`,{className:`space-y-3`,children:[(0,S.jsx)(`h3`,{className:`font-medium text-fg`,children:h?`里程碑`:`Milestones`}),e.milestones.slice(0,8).map(e=>(0,S.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[e.title,` · `,v(e.status)]},e.id))]}),t[42]=e.milestones,t[43]=v,t[44]=h,t[45]=d):d=t[45];let f;t[46]!==I||t[47]!==e.recentUpdates||t[48]!==h?(f=e.recentUpdates?.[0]&&(0,S.jsxs)(`section`,{className:`space-y-3`,children:[(0,S.jsx)(`h3`,{className:`font-medium text-fg`,children:h?`最近进展`:`Latest update`}),I(e.recentUpdates[0].summary)]}),t[46]=I,t[47]=e.recentUpdates,t[48]=h,t[49]=f):f=t[49];let p;return t[50]!==l||t[51]!==u||t[52]!==d||t[53]!==f?(p=(0,S.jsxs)(`div`,{className:`space-y-6`,children:[l,u,d,f]}),t[50]=l,t[51]=u,t[52]=d,t[53]=f,t[54]=p):p=t[54],p}if(N.kind===`workflow_run`){let{run:e,phases:n}=N.value,r;t[55]===e.title?r=t[56]:(r=(0,S.jsx)(`h2`,{className:`break-words text-lg font-semibold text-fg`,children:e.title}),t[55]=e.title,t[56]=r);let i;t[57]!==e.status||t[58]!==v?(i=v(e.status),t[57]=e.status,t[58]=v,t[59]=i):i=t[59];let a=e.metrics?` · ${e.metrics.doneAgentCount}/${e.metrics.agentCount} ${h?`执行单元完成`:`agents completed`}`:``,o;t[60]!==i||t[61]!==a?(o=(0,S.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[i,a]}),t[60]=i,t[61]=a,t[62]=o):o=t[62];let s;t[63]!==r||t[64]!==o?(s=(0,S.jsxs)(`div`,{className:`space-y-3`,children:[r,o]}),t[63]=r,t[64]=o,t[65]=s):s=t[65];let c;t[66]===e.error?c=t[67]:(c=e.error&&(0,S.jsx)(`p`,{role:`alert`,className:`rounded-lg border border-edge p-3 text-sm text-danger`,children:e.error.message}),t[66]=e.error,t[67]=c);let l;t[68]!==I||t[69]!==e.result||t[70]!==h?(l=f(e.result)?I(u(e.result)):(0,S.jsx)(`p`,{className:`text-sm text-fg-muted`,children:h?`尚无运行结果。`:`No result yet.`}),t[68]=I,t[69]=e.result,t[70]=h,t[71]=l):l=t[71];let d;t[72]!==n||t[73]!==v||t[74]!==h?(d=n.length>0&&(0,S.jsxs)(`section`,{className:`space-y-3`,children:[(0,S.jsx)(`h3`,{className:`font-medium text-fg`,children:h?`运行进度`:`Progress`}),n.map(e=>(0,S.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[e.title,` · `,v(e.status)]},e.id))]}),t[72]=n,t[73]=v,t[74]=h,t[75]=d):d=t[75];let p;return t[76]!==c||t[77]!==l||t[78]!==d||t[79]!==s?(p=(0,S.jsxs)(`div`,{className:`space-y-6`,children:[s,c,l,d]}),t[76]=c,t[77]=l,t[78]=d,t[79]=s,t[80]=p):p=t[80],p}if(N.kind===`workflow_definition`){let e=N.value,n,r,i,a;if(t[81]!==e||t[82]!==m||t[83]!==I){let o=l(e,m);n=`space-y-6`,r=(0,S.jsx)(`h2`,{className:`break-words text-lg font-semibold text-fg`,children:o.title}),i=I(o.description),a=I(o.whenToUse),t[81]=e,t[82]=m,t[83]=I,t[84]=n,t[85]=r,t[86]=i,t[87]=a}else n=t[84],r=t[85],i=t[86],a=t[87];let o;t[88]!==e.phases||t[89]!==I||t[90]!==h?(o=e.phases.length>0&&(0,S.jsxs)(`section`,{className:`space-y-3`,children:[(0,S.jsx)(`h3`,{className:`font-medium text-fg`,children:h?`执行阶段`:`Phases`}),e.phases.map(e=>(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h4`,{className:`text-sm font-medium text-fg`,children:e.title}),I(e.description)]},e.id))]}),t[88]=e.phases,t[89]=I,t[90]=h,t[91]=o):o=t[91];let s;return t[92]!==n||t[93]!==r||t[94]!==i||t[95]!==a||t[96]!==o?(s=(0,S.jsxs)(`div`,{className:n,children:[r,i,a,o]}),t[92]=n,t[93]=r,t[94]=i,t[95]=a,t[96]=o,t[97]=s):s=t[97],s}if(N.kind===`automation`){let e=N.value,n=e.action.kind===`agent`?e.action.instruction:e.action.kind===`workflow`?e.action.goal:void 0,r;t[98]===e.name?r=t[99]:(r=(0,S.jsx)(`h2`,{className:`break-words text-lg font-semibold text-fg`,children:e.name}),t[98]=e.name,t[99]=r);let i;t[100]!==e.description||t[101]!==I?(i=I(e.description),t[100]=e.description,t[101]=I,t[102]=i):i=t[102];let a;t[103]!==n||t[104]!==I?(a=I(n),t[103]=n,t[104]=I,t[105]=a):a=t[105];let o;t[106]!==e.state.nextRunAtMs||t[107]!==h?(o=e.state.nextRunAtMs&&(0,S.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[h?`下次运行`:`Next run`,` · `,new Date(e.state.nextRunAtMs).toLocaleString(h?`zh-CN`:`en-US`)]}),t[106]=e.state.nextRunAtMs,t[107]=h,t[108]=o):o=t[108];let s;t[109]===e.state.lastError?s=t[110]:(s=e.state.lastError&&(0,S.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:e.state.lastError}),t[109]=e.state.lastError,t[110]=s);let c=h?`最近运行`:`Recent runs`,l;t[111]===c?l=t[112]:(l=(0,S.jsx)(`h3`,{className:`font-medium text-fg`,children:c}),t[111]=c,t[112]=l);let u;t[113]!==N.runs||t[114]!==I||t[115]!==v||t[116]!==h?(u=N.runs.length?N.runs.map(e=>(0,S.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-edge p-3`,children:[(0,S.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[v(e.status),` · `,new Date(e.createdAtMs).toLocaleString(h?`zh-CN`:`en-US`)]}),I(e.summary),e.error&&(0,S.jsx)(`p`,{className:`text-sm text-danger`,children:e.error})]},e.id)):(0,S.jsx)(`p`,{className:`text-sm text-fg-muted`,children:h?`暂无运行记录。`:`No runs yet.`}),t[113]=N.runs,t[114]=I,t[115]=v,t[116]=h,t[117]=u):u=t[117];let d;return t[118]!==l||t[119]!==u?(d=(0,S.jsxs)(`section`,{className:`space-y-3`,children:[l,u]}),t[118]=l,t[119]=u,t[120]=d):d=t[120],(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsxs)(`div`,{className:`space-y-3`,children:[r,(0,S.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[e.enabled?h?`已启用`:`Enabled`:h?`已停用`:`Disabled`,` · `,y(e.trigger,g.automations,g.cron,m)]}),i,a,o,s]}),d]})}let L=N.value,R;t[121]===L.name?R=t[122]:(R=(0,S.jsx)(`h2`,{className:`break-words text-lg font-semibold text-fg`,children:L.name}),t[121]=L.name,t[122]=R);let z=L.description||L.idea,B;t[123]!==I||t[124]!==z?(B=I(z),t[123]=I,t[124]=z,t[125]=B):B=t[125];let V;t[126]!==L.name||t[127]!==N.previewUrl||t[128]!==h?(V=N.previewUrl&&(0,S.jsx)(`iframe`,{title:h?`${L.name} 交互预览`:`${L.name} interactive preview`,src:s(N.previewUrl),sandbox:`allow-scripts allow-forms`,className:`h-[min(30rem,55dvh)] w-full rounded-lg border border-edge bg-white`}),t[126]=L.name,t[127]=N.previewUrl,t[128]=h,t[129]=V):V=t[129];let H;t[130]!==L||t[131]!==h?(H=L.installationState===`installed`&&L.enabled&&L.status===`installed`&&(0,S.jsx)(n,{to:b(L),className:`inline-flex rounded-lg bg-accent px-3 py-2 text-sm text-white focus-visible:ring-2 focus-visible:ring-accent`,children:h?`使用应用`:`Use app`}),t[130]=L,t[131]=h,t[132]=H):H=t[132];let U;return t[133]!==R||t[134]!==B||t[135]!==V||t[136]!==H?(U=(0,S.jsxs)(`div`,{className:`space-y-5`,children:[R,B,V,H]}),t[133]=R,t[134]=B,t[135]=V,t[136]=H,t[137]=U):U=t[137],U}function E(e,t){return(0,S.jsx)(`li`,{children:e},t)}function D(e){return e?.trim()?(0,S.jsx)(r,{content:e,mermaidActions:!1}):null}function O(e){return e?.kind===`workflow_run`&&[`queued`,`running`].includes(e.value.run.status)||e?.kind===`automation`&&e.value?.state.runningRunId?3e3:0}function k(e){return e.language}function A(e){return e.conversationId}export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{f as i,g as a,m as o,t as s}from"./chunk-KS7C4IRE-B2HK1psj.js";import{t as c}from"./check-DUBLcKHA.js";import{t as l}from"./chevron-left-DqFhpbvK.js";import{t as u}from"./chevron-right-BweFrslA.js";import{n as d,r as f,t as p}from"./popover-select-DGKUpVsz.js";import{t as m}from"./circle-alert-BEjgurr2.js";import{t as h}from"./circle-check-C23XjkUj.js";import{t as g}from"./circle-dot-BAseJTrF.js";import{t as _}from"./copy-Dv6d4Dvw.js";import{t as v}from"./download-Dk-ZjtO6.js";import{t as y}from"./external-link-DjqjBmc3.js";import{M as b,N as x,P as S,S as C,_ as w,g as T,n as E,t as D,u as O,y as k}from"./use-composer-attachments-61W-5Q6m.js";import{F as A,V as j,t as M,z as N}from"./markdown-view-D_7clISS.js";import{E as P,N as F,b as I,g as L,i as R,k as z,s as B,v as ee,y as V,z as H}from"./notes-api-DZkezSIy.js";import{d as te,m as U,p as ne,u as W}from"./use-file-preview-expanded-DZUWxdhm.js";import{t as re}from"./loader-circle-CifKLtgG.js";import{t as G}from"./message-square-plus-XP0tGdlV.js";import{t as ie}from"./mic-CuUb7zc-.js";import{t as K}from"./plus-Q2yW6OE7.js";import{t as ae}from"./rotate-ccw-JM1TBLpp.js";import{t as oe}from"./search-DA7gz22f.js";import{t as se}from"./x-B_N4OPjy.js";import{t as ce}from"./messages-B7VtMXec.js";import{t as q}from"./cn-0WouolD0.js";import{a as J,c as le,f as ue,n as de,r as fe}from"./locale-store-BKyOF23r.js";import{a as pe,c as me,i as he,n as ge,o as _e,r as ve,s as ye,t as be}from"./dist-BGTk37IG.js";import{i as xe,t as Se}from"./tasks-PuIUgF9L.js";import{t as Ce}from"./copy-to-clipboard-HOJ79TWv.js";import{i as we}from"./vendor-swr-BIWyz7Rc.js";import{t as Y}from"./button-aIC072nz.js";import{t as Te}from"./skeleton-BI5TyibZ.js";import{a as Ee}from"./attachment-utils-core-BIOUBrpT.js";import{o as De}from"./agents-admin-api-znm6_dW_.js";import{r as Oe}from"./app-chrome-BeB4KgOf.js";import{a as ke,i as Ae,o as je,r as Me,s as Ne}from"./dist-C3DSFZCi.js";import{r as Pe}from"./settings-form-draft-Dy10ldo8.js";import{a as Fe,c as Ie,n as Le,p as Re,r as ze,t as Be}from"./workspace-api-lHTRLje0.js";import{n as Ve}from"./date-formatters-CUZAyDEg.js";import{$i as He,$r as Ue,A as We,Ai as Ge,Ao as Ke,Bi as qe,Bn as Je,Ca as Ye,Di as Xe,Ec as Ze,Er as Qe,Fi as $e,Gi as et,Go as tt,Hi as nt,Ho as rt,Ic as it,Ii as at,Ji as ot,Jo as st,Ki as ct,Ks as lt,Mc as ut,Oi as dt,Oo as ft,Po as pt,Qi as mt,So as ht,Ss as gt,Ti as _t,Ui as vt,Vc as yt,Vi as bt,Vo as xt,Wi as St,Xi as Ct,Xs as wt,Yc as Tt,Yi as Et,Yo as Dt,Zi as Ot,Zs as kt,_ as At,_c as jt,_s as Mt,ac as Nt,ar as Pt,bc as Ft,bi as It,cc as Lt,ea as Rt,er as zt,es as Bt,fl as Vt,gc as Ht,hs as Ut,ir as Wt,is as Gt,ki as Kt,ll as qt,mc as Jt,nr as Yt,ns as Xt,ol as Zt,or as Qt,os as $t,qc as en,qi as tn,rr as nn,sc as rn,ta as an,tl as on,tn as sn,tr as cn,ua as ln,ul as un,v as dn,vi as fn,vs as pn,ws as mn,xs as hn,zi as gn,zs as _n}from"./index-Bo70AuAq.js";import{n as vn,t as yn}from"./use-autosave-C2__K1-y.js";import{t as bn}from"./directory-picker-path-field-DnD9eyoU.js";import{d as xn,h as Sn,o as Cn}from"./skill-api-plToSoFo.js";import{t as wn}from"./date-picker-DyUP-8hR.js";import{t as Tn}from"./automations-workspace-CVIWgoTx.js";import{i as En,r as Dn,t as On}from"./workflow-run-setup-panel-Czfs5XFH.js";import{t as kn}from"./page-context-capture-button-C-X8J1IO.js";import{i as An,n as X,r as jn,t as Mn}from"./note-detail-panel-B7R-cZWE.js";import{c as Nn,l as Pn,n as Fn,o as In,r as Z,t as Ln,u as Rn}from"./style-1FPsMO2E.js";import{t as zn}from"./dependency-picker-QF9qLWIG.js";var Bn=n(),Q=e(t(),1),$=r();function Vn(e){let t=(0,Bn.c)(15),{noteId:n,attachmentId:r,className:i}=e,[a,o]=(0,Q.useState)(!1),s;t[0]!==r||t[1]!==n?(s=F(n,r),t[0]=r,t[1]=n,t[2]=s):s=t[2];let c=s;if(a){let e;t[3]===i?e=t[4]:(e=q(`flex size-12 shrink-0 items-center justify-center rounded-lg border border-edge-subtle bg-surface-hover text-fg-muted`,i),t[3]=i,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(H,{className:`size-4`}),t[5]=n):n=t[5];let r;return t[6]===e?r=t[7]:(r=(0,$.jsx)(`div`,{className:e,"aria-hidden":!0,children:n}),t[6]=e,t[7]=r),r}let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>o(!0),t[8]=l):l=t[8];let u;t[9]===i?u=t[10]:(u=q(`size-12 shrink-0 rounded-lg border border-edge-subtle bg-surface-hover object-cover`,i),t[9]=i,t[10]=u);let d;return t[11]!==n||t[12]!==c||t[13]!==u?(d=(0,$.jsx)(z,{src:c,expectedNoteId:n,alt:``,loading:`lazy`,draggable:!1,onLoadFailed:l,className:u}),t[11]=n,t[12]=c,t[13]=u,t[14]=d):d=t[14],d}function Hn(e){if(!Number.isFinite(e)||e<0)return`0:00`;let t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${String(n).padStart(2,`0`)}`}function Un(e){let t=(0,Bn.c)(38),{noteId:n,attachmentId:r,durationSec:i,className:a}=e,{playing:o,loading:s,currentTime:c,duration:l,noteId:u,attachmentId:d}=Qe(),f=Qe(Gn),p=u===n&&d===r,m=p&&o,h=p&&s,g=p?c:0,_=p&&l>0?l:i??0,v=_>0?Math.min(g/_*100,100):0,y;t[0]!==r||t[1]!==i||t[2]!==n||t[3]!==f?(y=e=>{e.stopPropagation(),f(n,r,i)},t[0]=r,t[1]=i,t[2]=n,t[3]=f,t[4]=y):y=t[4];let b=y,x;t[5]!==r||t[6]!==i||t[7]!==n||t[8]!==f?(x=e=>{(e.key===`Enter`||e.key===` `)&&(e.stopPropagation(),e.preventDefault(),f(n,r,i))},t[5]=r,t[6]=i,t[7]=n,t[8]=f,t[9]=x):x=t[9];let S=x,C;t[10]===a?C=t[11]:(C=q(`flex items-center gap-2`,a),t[10]=a,t[11]=C);let w=m?`bg-accent text-on-accent`:`bg-accent/10 text-accent hover:bg-accent/20`,T;t[12]===w?T=t[13]:(T=q(`flex size-7 shrink-0 items-center justify-center rounded-full transition-colors`,w),t[12]=w,t[13]=T);let E=m?`Pause`:`Play`,D;t[14]!==h||t[15]!==m?(D=h?(0,$.jsx)(re,{className:`size-3.5 animate-spin`}):m?(0,$.jsx)(hn,{className:`size-3.5`}):(0,$.jsx)(Ut,{className:`size-3.5 ml-0.5`}),t[14]=h,t[15]=m,t[16]=D):D=t[16];let O;t[17]!==b||t[18]!==S||t[19]!==T||t[20]!==E||t[21]!==D?(O=(0,$.jsx)(`button`,{type:`button`,onClick:b,onKeyDown:S,className:T,"aria-label":E,children:D}),t[17]=b,t[18]=S,t[19]=T,t[20]=E,t[21]=D,t[22]=O):O=t[22];let k=`${v}%`,A;t[23]===k?A=t[24]:(A=(0,$.jsx)(`div`,{className:`h-1 w-full overflow-hidden rounded-full bg-accent/10`,children:(0,$.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-[width] duration-200 ease-linear`,style:{width:k}})}),t[23]=k,t[24]=A);let j;t[25]!==_||t[26]!==p||t[27]!==g?(j=Hn(p&&g>0?g:_),t[25]=_,t[26]=p,t[27]=g,t[28]=j):j=t[28];let M;t[29]===j?M=t[30]:(M=(0,$.jsx)(`span`,{className:`text-[10px] tabular-nums text-fg-muted`,children:j}),t[29]=j,t[30]=M);let N;t[31]!==A||t[32]!==M?(N=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[A,M]}),t[31]=A,t[32]=M,t[33]=N):N=t[33];let P;return t[34]!==N||t[35]!==C||t[36]!==O?(P=(0,$.jsxs)(`div`,{className:C,onClick:Wn,children:[O,N]}),t[34]=N,t[35]=C,t[36]=O,t[37]=P):P=t[37],P}function Wn(e){return e.stopPropagation()}function Gn(e){return e.toggle}function Kn(e,t){return e.snippet?.trim()?e.snippet:e.coverAttachmentId?t.imageNote:t.noText}function qn(e){let t=(0,Bn.c)(89),{note:n,selected:r,onPress:i,onPin:a,onArchive:o,onDelete:s,labels:c,timeLabels:l}=e,u=r===void 0?!1:r,d=de(tr)===`zh`,f=n.kind===`voice`&&/^Discussion · \d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(n.title??``)?d?`语音笔记`:`Voice note`:n.title,p;t[0]!==c||t[1]!==n?(p=Kn(n,c),t[0]=c,t[1]=n,t[2]=p):p=t[2];let m=p,h=!n.snippet?.trim(),[g]=(0,Q.useState)(er),_;t[3]!==n.createdAt||t[4]!==g||t[5]!==l?(_=An(n.createdAt,g,l),t[3]=n.createdAt,t[4]=g,t[5]=l,t[6]=_):_=t[6];let v=_,y,b;t[7]!==n.id||t[8]!==i?(y=()=>i(n.id),b=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),i(n.id))},t[7]=n.id,t[8]=i,t[9]=y,t[10]=b):(y=t[9],b=t[10]);let x=u?`bg-surface-active hover:bg-surface-active`:`bg-transparent hover:bg-surface-panel/70`,S;t[11]===x?S=t[12]:(S=q(`group relative flex cursor-pointer flex-col gap-2 overflow-hidden rounded-lg px-3 py-2.5`,`transition-colors duration-150 ease-out`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface-rail`,x),t[11]=x,t[12]=S);let C=u?`true`:void 0,w;t[13]===u?w=t[14]:(w=u?(0,$.jsx)(`span`,{className:`pointer-events-none absolute inset-y-2 left-0 w-0.5 rounded-r-pill bg-accent`,"aria-hidden":!0}):null,t[13]=u,t[14]=w);let T;t[15]!==n.coverAttachmentId||t[16]!==n.id||t[17]!==n.kind||t[18]!==n.voiceAttachmentId||t[19]!==n.voiceDurationSec?(T=n.coverAttachmentId?(0,$.jsx)(Vn,{noteId:n.id,attachmentId:n.coverAttachmentId}):n.kind===`voice`&&n.voiceAttachmentId?(0,$.jsx)(Un,{noteId:n.id,attachmentId:n.voiceAttachmentId,durationSec:n.voiceDurationSec,className:`mt-0.5 w-28 shrink-0`}):null,t[15]=n.coverAttachmentId,t[16]=n.id,t[17]=n.kind,t[18]=n.voiceAttachmentId,t[19]=n.voiceDurationSec,t[20]=T):T=t[20];let E;t[21]!==f||t[22]!==n.title?(E=n.title&&(0,$.jsx)(`h3`,{className:`mb-0.5 truncate text-sm font-semibold text-fg`,children:f}),t[21]=f,t[22]=n.title,t[23]=E):E=t[23];let D=n.title?`text-fg-muted`:h?`italic text-fg-muted`:`text-fg`,O;t[24]===D?O=t[25]:(O=q(`truncate text-sm leading-5`,D),t[24]=D,t[25]=O);let k;t[26]!==m||t[27]!==O?(k=(0,$.jsx)(`p`,{className:O,children:m}),t[26]=m,t[27]=O,t[28]=k):k=t[28];let A;t[29]!==E||t[30]!==k?(A=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[E,k]}),t[29]=E,t[30]=k,t[31]=A):A=t[31];let j;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(Ze,{className:`size-4`}),t[32]=j):j=t[32];let M;t[33]===c.actions?M=t[34]:(M=(0,$.jsx)(Qt,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,onClick:$n,className:`shrink-0 rounded-md p-1 text-fg-muted opacity-100 transition-opacity hover:bg-surface-panel focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent lg:opacity-0 lg:group-hover:opacity-100 lg:focus-visible:opacity-100`,"aria-label":c.actions,title:c.actions,children:j})}),t[33]=c.actions,t[34]=M);let N;t[35]!==n.id||t[36]!==n.pinned||t[37]!==a?(N=()=>{a(n.id,!n.pinned).catch(Zn)},t[35]=n.id,t[36]=n.pinned,t[37]=a,t[38]=N):N=t[38];let P;t[39]===n.pinned?P=t[40]:(P=n.pinned?(0,$.jsx)(Mt,{className:`size-4`}):(0,$.jsx)(pn,{className:`size-4`}),t[39]=n.pinned,t[40]=P);let F=n.pinned?c.unpin:c.pin,I;t[41]!==N||t[42]!==P||t[43]!==F?(I=(0,$.jsxs)(Yt,{className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover`,onSelect:N,children:[P,F]}),t[41]=N,t[42]=P,t[43]=F,t[44]=I):I=t[44];let L;t[45]!==n.id||t[46]!==o?(L=()=>{o(n.id).catch(Xn)},t[45]=n.id,t[46]=o,t[47]=L):L=t[47];let R;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(Vt,{className:`size-4`}),t[48]=R):R=t[48];let z;t[49]!==c.archive||t[50]!==L?(z=(0,$.jsxs)(Yt,{className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover`,onSelect:L,children:[R,c.archive]}),t[49]=c.archive,t[50]=L,t[51]=z):z=t[51];let B;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(Pt,{className:`my-1 h-px bg-edge-subtle`}),t[52]=B):B=t[52];let ee;t[53]!==n.id||t[54]!==s?(ee=()=>{s(n.id).catch(Yn)},t[53]=n.id,t[54]=s,t[55]=ee):ee=t[55];let V;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(pt,{className:`size-4`}),t[56]=V):V=t[56];let H;t[57]!==c.delete||t[58]!==ee?(H=(0,$.jsxs)(Yt,{className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-red-500 outline-none hover:bg-surface-hover focus:bg-surface-hover`,onSelect:ee,children:[V,c.delete]}),t[57]=c.delete,t[58]=ee,t[59]=H):H=t[59];let te;t[60]!==I||t[61]!==z||t[62]!==H?(te=(0,$.jsx)(nn,{children:(0,$.jsxs)(cn,{className:`z-50 min-w-[140px] rounded-xl border border-edge bg-surface-panel p-1 shadow-lg`,sideOffset:4,align:`end`,onClick:Qn,children:[I,z,B,H]})}),t[60]=I,t[61]=z,t[62]=H,t[63]=te):te=t[63];let U;t[64]!==M||t[65]!==te?(U=(0,$.jsxs)(Wt,{children:[M,te]}),t[64]=M,t[65]=te,t[66]=U):U=t[66];let ne;t[67]!==T||t[68]!==A||t[69]!==U?(ne=(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[T,A,U]}),t[67]=T,t[68]=A,t[69]=U,t[70]=ne):ne=t[70];let W;t[71]===n.pinned?W=t[72]:(W=n.pinned&&(0,$.jsx)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-accent/10 px-1.5 py-0.5 text-xs font-medium text-accent`,children:(0,$.jsx)(pn,{className:`size-3`})}),t[71]=n.pinned,t[72]=W);let re;t[73]===n.tags?re=t[74]:(re=n.tags?.slice(0,2).map(Jn),t[73]=n.tags,t[74]=re);let G;t[75]===v?G=t[76]:(G=(0,$.jsx)(`span`,{className:`ml-auto text-xs text-fg-muted`,children:v}),t[75]=v,t[76]=G);let ie;t[77]!==W||t[78]!==re||t[79]!==G?(ie=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[W,re,G]}),t[77]=W,t[78]=re,t[79]=G,t[80]=ie):ie=t[80];let K;return t[81]!==ne||t[82]!==ie||t[83]!==y||t[84]!==b||t[85]!==S||t[86]!==C||t[87]!==w?(K=(0,$.jsxs)(`article`,{role:`button`,tabIndex:0,onClick:y,onKeyDown:b,className:S,"aria-current":C,children:[w,ne,ie]}),t[81]=ne,t[82]=ie,t[83]=y,t[84]=b,t[85]=S,t[86]=C,t[87]=w,t[88]=K):K=t[88],K}function Jn(e){return(0,$.jsx)(`span`,{className:`max-w-24 truncate rounded-md bg-surface-hover px-1.5 py-0.5 text-xs text-fg-muted`,children:e},e)}function Yn(){}function Xn(){}function Zn(){}function Qn(e){return e.stopPropagation()}function $n(e){return e.stopPropagation()}function er(){return Date.now()}function tr(e){return e.language}var nr=3e4;function rr(){if(!(typeof MediaRecorder>`u`))return[`audio/webm;codecs=opus`,`audio/webm`,`audio/mp4`,`audio/ogg;codecs=opus`].find(e=>MediaRecorder.isTypeSupported(e))}function ir({placeholder:e,submitLabel:t,actionsLabel:n,imageLabel:r,voiceLabel:i,stopRecordingLabel:a,onCapture:o,onImagePick:s,onVoiceCapture:c,onVoiceError:l,recordingLabel:u,imageDisabled:d=!1,voiceDisabled:f=!1,onDiscussionCapture:p,discussionCaptureLabel:m}){let[h,g]=(0,Q.useState)(``),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(0),[C,w]=(0,Q.useState)(!1),T=(0,Q.useRef)(null),E=(0,Q.useRef)(null),D=(0,Q.useRef)(null),O=(0,Q.useRef)([]),k=(0,Q.useRef)(0),A=(0,Q.useRef)(null),j=(0,Q.useRef)(null),M=(0,Q.useCallback)(()=>{A.current&&=(clearInterval(A.current),null),j.current&&=(clearTimeout(j.current),null),D.current?.getTracks().forEach(e=>e.stop()),D.current=null,E.current=null,O.current=[],b(!1),S(0)},[]);(0,Q.useEffect)(()=>()=>M(),[M]);let N=(0,Q.useCallback)(async()=>{let e=E.current;if(!e||e.state!==`recording`)return;w(!0),await new Promise(t=>{e.addEventListener(`stop`,()=>t(),{once:!0}),e.stop()});let t=Math.max(1,Math.round((Date.now()-k.current)/1e3)),n=e.mimeType||rr()||`audio/webm`,r=new Blob(O.current,{type:n});if(M(),r.size>0&&c){let e=n.includes(`mp4`)?`m4a`:n.includes(`ogg`)?`ogg`:`webm`,i=new File([r],`voice-${Date.now()}.${e}`,{type:n});try{await c(i,t)}finally{w(!1)}return}w(!1)},[M,c]),P=(0,Q.useCallback)(async()=>{if(!(!c||C||y)){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>`u`){l?.();return}try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});D.current=e;let t=rr(),n=t?new MediaRecorder(e,{mimeType:t}):new MediaRecorder(e);E.current=n,O.current=[],k.current=Date.now(),n.ondataavailable=e=>{e.data.size>0&&O.current.push(e.data)},n.start(),b(!0),S(0),A.current=setInterval(()=>{S(Math.round((Date.now()-k.current)/1e3))},250),j.current=setTimeout(()=>{N()},nr)}catch{M(),l?.()}}},[M,c,l,y,N,C]),F=(0,Q.useCallback)(async()=>{let e=h.trim();if(!(!e||_)){v(!0),g(``);try{await o(e)}catch{g(e)}finally{v(!1),T.current?.focus()}}},[h,_,o]),I=(0,Q.useCallback)(e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),F())},[F]),L=_||C,R=!!(s||c||p);return(0,$.jsxs)(`div`,{className:q(`flex items-center gap-1.5 rounded-2xl border border-edge bg-surface-panel p-2 shadow-float dark:shadow-elevated`,`focus-within:border-accent focus-within:ring-1 focus-within:ring-accent`,y&&`border-danger ring-1 ring-danger/40`),"aria-busy":L,children:[y?(0,$.jsx)(`button`,{type:`button`,onClick:()=>void N(),disabled:C,className:`shrink-0 rounded-lg bg-danger-soft p-2 text-danger transition-colors hover:bg-danger-soft disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":a,title:a,"aria-pressed":`true`,children:(0,$.jsx)(tt,{className:`size-4 fill-current`,"aria-hidden":!0})}):R?(0,$.jsxs)(Wt,{children:[(0,$.jsx)(Qt,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,disabled:L,className:`shrink-0 rounded-lg p-2 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":n,title:n,children:(0,$.jsx)(K,{className:`size-4`,"aria-hidden":!0})})}),(0,$.jsx)(nn,{children:(0,$.jsxs)(cn,{side:`top`,align:`start`,sideOffset:8,className:`z-50 min-w-44 rounded-xl border border-edge bg-surface-panel p-1 shadow-popover`,children:[s?(0,$.jsxs)(Yt,{disabled:d,onSelect:s,className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,children:[(0,$.jsx)(Nt,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),r]}):null,c?(0,$.jsxs)(Yt,{disabled:f,onSelect:()=>void P(),className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,children:[(0,$.jsx)(ie,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),i]}):null,p?(0,$.jsxs)(Yt,{onSelect:p,className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover`,children:[(0,$.jsx)(Zt,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),m]}):null]})})]}):null,y?(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate py-1.5 text-sm text-danger`,children:u.replace(`{{seconds}}`,String(x))}):(0,$.jsx)(`textarea`,{ref:T,value:h,onChange:e=>g(e.target.value),onKeyDown:I,placeholder:e,"aria-label":e,rows:1,disabled:L,className:`max-h-28 min-h-8 flex-1 resize-none overflow-y-auto bg-transparent py-1.5 text-sm leading-5 text-fg placeholder:text-fg-muted focus:outline-none disabled:opacity-60`,style:{fieldSizing:`content`}}),(0,$.jsx)(`button`,{type:`button`,disabled:!h.trim()||L||y,onClick:()=>void F(),"aria-label":t,title:t,className:q(`shrink-0 rounded-lg p-2 transition-colors disabled:cursor-not-allowed disabled:opacity-50`,h.trim()&&!L&&!y?`bg-accent text-on-accent hover:bg-accent-hover`:`text-fg-disabled`),children:(0,$.jsx)(Gt,{className:`size-4`,"aria-hidden":!0})})]})}var ar={statusFilter:`all`,kindFilter:`all`,pinnedOnly:!1},or=240,sr=320,cr=520,lr=560;function ur(e){if(globalThis.localStorage===void 0)return sr;try{let t=globalThis.localStorage.getItem(e);if(!t)return sr;let n=Number(t);return Number.isFinite(n)?n:sr}catch{return sr}}function dr(e,t){if(globalThis.localStorage!==void 0)try{globalThis.localStorage.setItem(e,String(Math.round(t)))}catch{}}var fr={thought:rt,todo:st,voice:ie,media:Nt,bookmark:on,mixed:rt,task:st};function pr(e,t){return e.snippet?.trim()?e.snippet:e.coverAttachmentId?t.imageNote:t.noText}function mr(e,t){return e.statusFilter===t.patch.statusFilter&&e.kindFilter===t.patch.kindFilter&&e.pinnedOnly===t.patch.pinnedOnly}function hr(e,t){return`${e.replace(/\/$/,``)}/${encodeURIComponent(t)}`}function gr({selectedNoteId:e,basePath:t,managePageHeader:n=!1,showLibrary:r=!0,allowMediaCapture:a=!0,projectId:o,listTitle:s,listDescription:c,emptyText:l,emptyDescription:u,listWidthStorageKey:p=`xopc.notes.listWidth`}){let m=de(e=>e.language),h=ce(m).notes,g=!!le(e=>e.conversationId),[_,v]=(0,Q.useReducer)(Pe,ar),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)(0),[T,E]=(0,Q.useState)(()=>ur(p)),[D,O]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(!1),[N,F]=(0,Q.useState)(null),[z,H]=(0,Q.useState)(null),te=(0,Q.useRef)(null),U=(0,Q.useRef)(null),[ne]=(0,Q.useState)(()=>Date.now()),W=i(),re=(0,Q.useCallback)(e=>{let t=te.current?.clientWidth??window.innerWidth,n=Math.max(or,t-lr);return Math.max(or,Math.min(Math.min(cr,n),e))},[]),G=(0,Q.useCallback)(e=>{let t=re(e);E(t),dr(p,t)},[re,p]);(0,Q.useLayoutEffect)(()=>{E(e=>re(e))},[re]);let{data:ae,mutate:J,isLoading:fe}=we((0,Q.useMemo)(()=>g?[`notes-list`,o,_.statusFilter,_.kindFilter,_.pinnedOnly]:null,[g,o,_.statusFilter,_.kindFilter,_.pinnedOnly]),()=>L({status:_.statusFilter===`all`?void 0:_.statusFilter,kind:_.kindFilter===`all`?void 0:_.kindFilter,projectId:o,pinned:_.pinnedOnly?!0:void 0,limit:100,sortBy:`createdAt`,sortOrder:`desc`}),{keepPreviousData:!0}),me=fe&&!ae,xe=ae?.items??[],Se=ae?.total??0,Ce=x.trim(),{data:Y,isLoading:Te}=we(g&&y&&Ce?[`notes-search`,o,Ce]:null,()=>L({search:Ce,projectId:o,limit:30,sortBy:`updatedAt`,sortOrder:`desc`})),Ee=Y?.items??[],De=e?xe.some(t=>t.id===e):!0;(0,Q.useEffect)(()=>{w(0)},[Ce]),(0,Q.useEffect)(()=>{C>=Ee.length&&w(Math.max(0,Ee.length-1))},[C,Ee.length]),(0,Q.useEffect)(()=>{let e=()=>{J().catch(e=>{F(`${h.refreshFailed}: ${e instanceof Error?e.message:h.quickCaptureFailedHint}`)})};return window.addEventListener(`note-updated`,e),()=>window.removeEventListener(`note-updated`,e)},[J,h.quickCaptureFailedHint,h.refreshFailed]);let ke=ln(e=>e.setPageHeader),Ae=ln(e=>e.clearPageHeader),je=h.noteCount.replace(`{{count}}`,String(Se)),Me=!r&&Se===0&&c?c:je,Ne=h.searchDialogTitle,Fe=h.searchClose,Ie=h.searchClear,Le=(0,Q.useMemo)(()=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>b(!0),className:q(`inline-flex h-9 items-center gap-2 rounded-lg border border-edge bg-surface-base px-3 text-sm font-medium text-fg`,`hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,Oe),"aria-label":Ne,children:[(0,$.jsx)(oe,{className:`size-4`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:Ne})]}),[Ne]);(0,Q.useLayoutEffect)(()=>{if(n)return g?(ke({startExtra:null,main:(0,$.jsxs)(`div`,{className:q(`flex min-w-0 items-center gap-2`,Oe),children:[(0,$.jsx)(`h1`,{className:`min-w-0 truncate text-base font-semibold tracking-tight text-fg`,children:s??h.title}),(0,$.jsx)(`button`,{type:`button`,className:`text-xs text-fg-muted`,onClick:()=>window.dispatchEvent(new CustomEvent(`open-recording-recoveries`)),children:h.discussionCapture.recoveredTitle}),je?(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted`,children:je}):null]}),end:Le}),()=>Ae()):(Ae(),()=>Ae())},[Ae,g,Le,s,n,h.title,h.discussionCapture.recoveredTitle,je,e,ke]);let Re=(0,Q.useMemo)(()=>({justNow:h.justNow,minutesAgo:h.minutesAgo,today:h.today,yesterday:h.yesterday,daysAgo:h.daysAgo,locale:ue(m)}),[m,h.justNow,h.minutesAgo,h.today,h.yesterday,h.daysAgo]),ze=(0,Q.useMemo)(()=>[{id:`recent`,label:h.viewRecent,patch:{statusFilter:`all`,kindFilter:`all`,pinnedOnly:!1}},{id:`inbox`,label:h.filterInbox,patch:{statusFilter:`inbox`,kindFilter:`all`,pinnedOnly:!1}},{id:`pinned`,label:h.pinned,patch:{statusFilter:`all`,kindFilter:`all`,pinnedOnly:!0}},{id:`tasks`,label:h.viewTasks,patch:{statusFilter:`all`,kindFilter:`todo`,pinnedOnly:!1}},{id:`voice`,label:h.kindVoice,patch:{statusFilter:`all`,kindFilter:`voice`,pinnedOnly:!1}},{id:`media`,label:h.kindMedia,patch:{statusFilter:`all`,kindFilter:`media`,pinnedOnly:!1}},{id:`bookmarks`,label:h.kindBookmark,patch:{statusFilter:`all`,kindFilter:`bookmark`,pinnedOnly:!1}},{id:`processed`,label:h.filterProcessed,patch:{statusFilter:`processed`,kindFilter:`all`,pinnedOnly:!1}},{id:`archive`,label:h.filterArchived,patch:{statusFilter:`archived`,kindFilter:`all`,pinnedOnly:!1}}],[h.filterArchived,h.filterInbox,h.filterProcessed,h.kindBookmark,h.kindMedia,h.kindVoice,h.pinned,h.viewRecent,h.viewTasks]),Be=ze.find(e=>mr(_,e))??ze[0],Ve=s??Be.label,He=(0,Q.useCallback)(async e=>{F(null);try{let n=o?await R({markdown:e,kind:`thought`,projectId:o,channel:`web`}):await ee(e,`web`);await J(),W(hr(t,n.id))}catch(e){throw F(`${h.quickCaptureFailed}: ${e instanceof Error?e.message:h.quickCaptureFailedHint}`),e}},[t,J,h.quickCaptureFailed,h.quickCaptureFailedHint,W,o]),Ue=(0,Q.useCallback)(async()=>{if(!j){M(!0),F(null);try{let e=await R({markdown:``,kind:`thought`,projectId:o,channel:`web`});v({type:`patch`,patch:ar}),await J(),H(e.id),W(hr(t,e.id))}catch(e){F(`${h.createBlankFailed}: ${e instanceof Error?e.message:h.createBlankFailedHint}`)}finally{M(!1)}}},[t,j,J,h.createBlankFailed,h.createBlankFailedHint,W,o]),We=(0,Q.useCallback)(()=>{let e=document.createElement(`input`);e.type=`file`,e.accept=`image/*`,e.onchange=async()=>{let t=e.files?.[0];if(t)try{F(null),await V(t,`web`),await J()}catch(e){F(`${h.imageUploadFailed}: ${e instanceof Error?e.message:h.imageUploadFailedHint}`)}},e.click()},[J,h.imageUploadFailed,h.imageUploadFailedHint]),Ge=(0,Q.useCallback)(async(e,t)=>{try{F(null),await I(e,t,`web`),await J()}catch(e){F(`${h.voiceUploadFailed}: ${e instanceof Error?e.message:h.voiceUploadFailedHint}`)}},[J,h.voiceUploadFailed,h.voiceUploadFailedHint]),Ke=(0,Q.useCallback)(()=>{F(`${h.voiceCaptureFailed}: ${h.voiceCaptureFailedHint}`)},[h.voiceCaptureFailed,h.voiceCaptureFailedHint]),qe=(0,Q.useCallback)(async(e,t)=>{F(null);try{await P(e,{pinned:t}),await J()}catch(e){F(`${h.actionFailed}: ${e instanceof Error?e.message:h.quickCaptureFailedHint}`)}},[J,h.actionFailed,h.quickCaptureFailedHint]),Je=(0,Q.useCallback)(async e=>{F(null);try{await P(e,{status:`archived`}),await J()}catch(e){F(`${h.actionFailed}: ${e instanceof Error?e.message:h.quickCaptureFailedHint}`)}},[J,h.actionFailed,h.quickCaptureFailedHint]),Ye=(0,Q.useCallback)(async e=>{F(null);try{await B(e),await J()}catch(e){F(`${h.actionFailed}: ${e instanceof Error?e.message:h.quickCaptureFailedHint}`)}},[J,h.actionFailed,h.quickCaptureFailedHint]),Xe=(0,Q.useCallback)(e=>{W(hr(t,e))},[t,W]),Ze=(0,Q.useCallback)(e=>{W(hr(t,e)),b(!1)},[t,W]),Qe=(0,Q.useCallback)(e=>{if(Ee.length){if(e.key===`ArrowDown`)e.preventDefault(),w(e=>Math.min(Ee.length-1,e+1));else if(e.key===`ArrowUp`)e.preventDefault(),w(e=>Math.max(0,e-1));else if(e.key===`Enter`){e.preventDefault();let t=Ee[C]??Ee[0];t&&Ze(t.id)}}},[C,Ze,Ee]),$e=(0,Q.useCallback)(e=>{e.preventDefault();let t=e.currentTarget,n=U.current;t.setPointerCapture(e.pointerId),O(!0);let r=te.current?.clientWidth??window.innerWidth,i=Math.max(or,r-lr),a=Math.min(cr,i),o=e=>Math.max(or,Math.min(a,e)),s=e.clientX,c=o(T),l=e.pointerId,u=0,d=c,f=c;n&&(n.style.transition=`none`,n.style.width=`${c}px`);let m=()=>{u=0,f=d,n&&(n.style.width=`${f}px`)},h=e=>{d=o(c+e.clientX-s),u===0&&(u=window.requestAnimationFrame(m))},g=()=>{u!==0&&(window.cancelAnimationFrame(u),m());try{t.releasePointerCapture(l)}catch{}O(!1),te.current?.style.setProperty(`--notes-list-width`,`${f}px`),n&&(n.style.removeProperty(`transition`),n.style.removeProperty(`width`)),E(f),dr(p,f),window.removeEventListener(`pointermove`,h),window.removeEventListener(`pointerup`,g),window.removeEventListener(`pointercancel`,g)};window.addEventListener(`pointermove`,h),window.addEventListener(`pointerup`,g),window.addEventListener(`pointercancel`,g)},[p,T]);(0,Q.useEffect)(()=>{let e=e=>{e.defaultPrevented||e.repeat||e.key.toLowerCase()!==`n`||!e.metaKey&&!e.ctrlKey||e.altKey||e.shiftKey||(e.preventDefault(),Ue())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Ue]);let et=(0,Q.useCallback)(e=>{e.key===`ArrowLeft`?(e.preventDefault(),G(T-16)):e.key===`ArrowRight`?(e.preventDefault(),G(T+16)):e.key===`Home`?(e.preventDefault(),G(or)):e.key===`End`&&(e.preventDefault(),G(cr))},[G,T]);return g?(0,$.jsxs)(`div`,{ref:te,className:`flex h-full min-h-0 w-full flex-1 overflow-hidden bg-surface-base`,style:{"--notes-list-width":`${T}px`},children:[(0,$.jsxs)(`section`,{ref:U,className:q(`relative flex min-h-0 w-full shrink-0 flex-col overflow-hidden bg-surface-rail`,!D&&`lg:transition-[width] lg:duration-[280ms] lg:ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:lg:transition-none`,k?`lg:w-0 lg:min-w-0 lg:max-w-0 lg:pointer-events-none`:`lg:w-[var(--notes-list-width)]`,e&&`hidden lg:flex`),"aria-hidden":k?!0:void 0,children:[(0,$.jsxs)(`div`,{className:`shrink-0 border-b border-edge-subtle p-3`,children:[N?(0,$.jsx)(`p`,{className:`mb-3 rounded-lg border border-danger/25 bg-danger-soft px-3 py-2 text-xs text-danger`,role:`alert`,children:N}):null,(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[r?(0,$.jsx)(d,{value:Be.id,onChange:e=>{let t=ze.find(t=>t.id===e.target.value);t&&v({type:`patch`,patch:t.patch})},className:`-ml-1 h-7 w-full max-w-44 rounded-lg border border-transparent bg-transparent px-2 text-sm font-semibold text-fg transition-colors hover:border-edge hover:bg-surface-base focus:border-accent focus:bg-surface-base focus:outline-none focus:ring-1 focus:ring-accent`,"aria-label":h.libraryTitle,children:ze.map(e=>(0,$.jsx)(f,{value:e.id,children:e.label},e.id))}):(0,$.jsx)(`h2`,{className:`truncate text-sm font-semibold text-fg`,children:Ve}),(0,$.jsx)(`p`,{className:`truncate text-xs text-fg-muted`,children:Me})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:()=>A(!0),className:`hidden size-11 items-center justify-center rounded-lg text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent lg:inline-flex`,"aria-label":h.collapseNotesList,title:h.collapseNotesList,children:(0,$.jsx)(mn,{className:`size-4`,strokeWidth:1.5,"aria-hidden":!0})}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>zt(o),"aria-label":m===`zh`?`开始录音`:`Start recording`,className:`inline-flex size-11 shrink-0 items-center justify-center rounded-full text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:(0,$.jsx)(ie,{className:`size-4`,"aria-hidden":!0})}),(0,$.jsx)(`button`,{type:`button`,onClick:Ue,disabled:j,className:`inline-flex size-11 items-center justify-center rounded-lg text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":h.createBlankNote,title:h.createBlankShortcut,children:(0,$.jsx)(K,{className:`size-4`,"aria-hidden":!0})}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>b(!0),className:`inline-flex size-11 items-center justify-center rounded-lg text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":h.searchDialogTitle,title:h.searchDialogTitle,children:(0,$.jsx)(oe,{className:`size-4`,"aria-hidden":!0})})]})]})]}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-3 [scrollbar-gutter:stable]`,children:me?(0,$.jsx)(`div`,{className:`flex flex-col gap-2`,children:[1,2,3,4].map(e=>(0,$.jsx)(`div`,{className:`h-20 animate-pulse rounded-lg bg-surface-hover`},e))}):xe.length===0?(0,$.jsxs)(`div`,{className:`flex h-full min-h-48 flex-col items-center justify-center gap-2 px-6 py-10 text-center`,children:[(0,$.jsx)(`span`,{className:`mb-1 inline-flex size-12 items-center justify-center rounded-xl border border-edge-subtle bg-surface-base text-fg-muted`,children:(0,$.jsx)(rt,{className:`size-6`,"aria-hidden":!0})}),(0,$.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:e&&!De?h.noteOutsideCurrentView:l??h.noNotes}),e&&!De?null:(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:u??h.noNotesDescription})]}):(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e&&!De?(0,$.jsx)(`div`,{className:`mb-2 rounded-lg border border-edge-subtle bg-surface-base px-3 py-2 text-xs leading-5 text-fg-muted`,children:h.noteOutsideCurrentView}):null,xe.map((t,n)=>{let r=n>0?X(xe[n-1].createdAt):null;return(0,$.jsxs)(`div`,{children:[X(t.createdAt)!==r&&(0,$.jsx)(`div`,{className:q(`px-3 pb-1.5 pt-2 text-xs font-medium text-fg-muted`,n===0&&`pt-0`),children:jn(t.createdAt,ne,Re)}),(0,$.jsx)(qn,{note:t,selected:t.id===e,onPress:Xe,onPin:qe,onArchive:Je,onDelete:Ye,timeLabels:Re,labels:{pin:h.pin,unpin:h.unpin,archive:h.archive,delete:h.delete,actions:h.noteActions,imageNote:h.imageNote,noText:h.noText}})]},t.id)})]})}),(0,$.jsx)(`div`,{className:`shrink-0 border-t border-edge-subtle p-3`,children:(0,$.jsx)(ir,{placeholder:h.quickCapturePlaceholder,submitLabel:h.quickCaptureSubmit,actionsLabel:h.quickCaptureActions,imageLabel:h.quickCaptureImage,voiceLabel:h.quickCaptureVoice,stopRecordingLabel:h.stopRecording,onCapture:He,onImagePick:a?We:void 0,onVoiceCapture:a?Ge:void 0,onVoiceError:Ke,recordingLabel:h.recording,discussionCaptureLabel:h.discussionCapture.title,onDiscussionCapture:()=>zt(o)})})]}),(0,$.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":h.resizeNotesList,"aria-valuemin":or,"aria-valuemax":cr,"aria-valuenow":Math.round(T),tabIndex:0,onPointerDown:$e,onDoubleClick:()=>G(sr),onKeyDown:et,title:h.resizeNotesList,className:q(`group relative z-10 hidden shrink-0 cursor-col-resize touch-none select-none items-center justify-center bg-transparent hover:bg-surface-hover/60 lg:flex`,`lg:transition-[width,opacity] lg:duration-[280ms] lg:ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:lg:transition-none`,k?`lg:w-0 lg:opacity-0 lg:pointer-events-none`:`lg:w-2 lg:opacity-100`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-0`),children:(0,$.jsx)(`span`,{"aria-hidden":!0,className:q(`h-full w-px bg-transparent transition-[background-color,transform] duration-150`,`group-hover:bg-accent/70 group-focus-visible:bg-accent`,D&&`bg-accent scale-x-[2]`)})}),(0,$.jsxs)(`section`,{className:q(`relative min-w-0 flex-1 bg-surface-base`,!e&&`hidden lg:flex`),children:[k?(0,$.jsx)(`button`,{type:`button`,onClick:()=>A(!1),className:`absolute left-3 top-3 z-10 hidden size-8 items-center justify-center rounded-lg border border-edge bg-surface-base text-fg-muted shadow-surface transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent lg:inline-flex`,"aria-label":h.expandNotesList,title:h.expandNotesList,children:(0,$.jsx)(mn,{className:`size-4`,strokeWidth:1.5,"aria-hidden":!0})}):null,e?(0,$.jsx)(Mn,{noteId:e,onBack:()=>W(t),onSaved:()=>{J().catch(e=>{F(`${h.refreshFailed}: ${e instanceof Error?e.message:h.quickCaptureFailedHint}`)})},backButtonClassName:`lg:hidden`,clearHeaderOnCleanup:!1,onOpenSearch:()=>b(!0),autoFocus:e===z,onAutoFocusConsumed:()=>H(null)}):(0,$.jsx)(`div`,{className:`flex h-full min-h-0 flex-1 items-center justify-center px-8 text-center`,children:(0,$.jsxs)(`div`,{className:`max-w-sm`,children:[(0,$.jsx)(rt,{className:`mx-auto size-9 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`h2`,{className:`mt-4 text-base font-semibold text-fg`,children:h.emptyEditorTitle}),(0,$.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:h.emptyEditorDescription}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>zt(o),"aria-label":m===`zh`?`开始录音`:`Start recording`,className:`inline-flex size-11 shrink-0 items-center justify-center rounded-full text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:(0,$.jsx)(ie,{className:`size-4`,"aria-hidden":!0})}),(0,$.jsxs)(`button`,{type:`button`,onClick:Ue,disabled:j,className:`mt-5 inline-flex items-center gap-2 rounded-lg bg-accent px-3 py-2 text-sm font-medium text-on-accent transition-colors hover:bg-accent-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50`,children:[(0,$.jsx)(K,{className:`size-4`,"aria-hidden":!0}),j?h.creatingBlankNote:h.createBlankNote]})]})})]}),(0,$.jsx)(be,{open:y,onOpenChange:b,children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-24 z-[90] w-[min(36rem,calc(100vw-2rem))] -translate-x-1/2 overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[(0,$.jsx)(ye,{className:`text-sm font-semibold text-fg`,children:Ne}),(0,$.jsx)(he,{className:`sr-only`,children:h.searchPlaceholder}),(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,className:`inline-flex size-8 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":Fe,children:(0,$.jsx)(se,{className:`size-4`,"aria-hidden":!0})})})]}),(0,$.jsxs)(`div`,{className:`p-4`,children:[(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(oe,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`input`,{type:`search`,value:x,onChange:e=>S(e.target.value),onKeyDown:Qe,placeholder:h.searchPlaceholder,className:`w-full rounded-lg border border-edge bg-surface-base py-2 pl-9 pr-10 text-sm text-fg placeholder:text-fg-muted focus:border-accent focus:outline-none focus:ring-1 focus:ring-accent`}),x?(0,$.jsx)(`button`,{type:`button`,onClick:()=>S(``),className:`absolute right-2 top-1/2 inline-flex size-7 -translate-y-1/2 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg`,"aria-label":Ie,children:(0,$.jsx)(se,{className:`size-3.5`,"aria-hidden":!0})}):null]}),(0,$.jsx)(`div`,{className:`mt-4 max-h-[min(28rem,calc(100vh-14rem))] overflow-y-auto [scrollbar-gutter:stable]`,children:Ce?Te&&!Y?(0,$.jsx)(`div`,{className:`flex flex-col gap-2`,children:[1,2,3].map(e=>(0,$.jsx)(`div`,{className:`h-16 animate-pulse rounded-lg bg-surface-hover`},e))}):Ee.length===0?(0,$.jsxs)(`div`,{className:`flex min-h-40 flex-col items-center justify-center gap-2 px-6 text-center`,children:[(0,$.jsx)(rt,{className:`size-7 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:h.searchNoResults}),(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:h.searchNoResultsDescription})]}):(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(`p`,{className:`px-2 pb-1 text-xs text-fg-muted`,children:h.searchResultsCount.replace(`{{count}}`,String(Y?.total??Ee.length))}),Ee.map((e,t)=>{let n=fr[e.kind]||rt,r=pr(e,{imageNote:h.imageNote,noText:h.noText});return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>Ze(e.id),onMouseEnter:()=>w(t),className:q(`flex w-full items-start gap-3 rounded-lg px-3 py-2.5 text-left transition-colors`,t===C?`bg-surface-active`:`hover:bg-surface-hover`),children:[(0,$.jsx)(n,{className:`mt-0.5 size-4 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.title||r}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted`,children:An(e.updatedAt,ne,Re)})]}),e.title?(0,$.jsx)(`span`,{className:`mt-0.5 block line-clamp-2 text-xs leading-5 text-fg-muted`,children:r}):null,e.tags?.length?(0,$.jsx)(`span`,{className:`mt-1 flex min-w-0 flex-wrap gap-1`,children:e.tags.slice(0,3).map(e=>(0,$.jsx)(`span`,{className:`max-w-24 truncate rounded-md bg-surface-hover px-1.5 py-0.5 text-xs text-fg-muted`,children:e},e))}):null]})]},e.id)})]}):(0,$.jsxs)(`div`,{className:`flex min-h-40 flex-col items-center justify-center gap-2 px-6 text-center`,children:[(0,$.jsx)(oe,{className:`size-7 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:h.searchEmptyTitle}),(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:h.searchEmptyDescription})]})})]})]})]})})]}):(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center`,children:[(0,$.jsx)(rt,{className:`size-10 text-fg-muted`}),(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:h.needToken})]})}var _r=()=>({goal:``,argValues:{},schemaInput:{},concurrency:``,maxSubagents:``});function vr({projectId:e}){let t=de(e=>e.language),n=ce(t).workflows,r=t===`zh`,[i,a]=(0,Q.useState)(!1),[o,l]=(0,Q.useState)(``),[u,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(_r),[g,_]=(0,Q.useState)([]),[v,y]=(0,Q.useState)(!0),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(null),E=we(i?`workflow-definitions`:null,dn,{revalidateOnFocus:!1}),D=we(i?`workflow-agents`:null,De,{revalidateOnFocus:!1}),O=we(i?[`workflow-project-presets`,e]:null,()=>At(e),{revalidateOnFocus:!1}),k=E.data?.find(e=>e.id===o),A=k?Ue(k,t):null,j=u||D.data?.defaultId,M=E.isLoading||D.isLoading||O.isLoading,N=E.error||D.error||O.error,P=En(k,m,v).valid,F=e=>{b||(e&&(l(``),p(``),h(_r()),_([]),y(!0),C(null),T(null)),a(e))},I=e=>{l(e),h(_r()),y(!0),C(null),_(O.data?.find(t=>t.definitionId===e)?.contextRefs??[])},L=async()=>{if(!(!k||!j||!P||b||w||M||N)){x(!0),C(null);try{T({runId:(await We({definitionId:k.id,agentId:j,projectId:e,goal:m.goal.trim()||A?.description||k.title,input:Dn(k,m),contextRefs:g,concurrency:m.concurrency.trim()?Number(m.concurrency):void 0,maxSubagents:m.maxSubagents.trim()?Number(m.maxSubagents):void 0})).runId,agentId:j})}catch(e){C(e instanceof Error?e.message:n.startFailed);return}finally{x(!1)}}};return(0,$.jsxs)(be,{open:i,onOpenChange:F,children:[(0,$.jsx)(me,{asChild:!0,children:(0,$.jsxs)(Y,{variant:`secondary`,className:`h-9 rounded-lg`,children:[(0,$.jsx)(Jt,{className:`size-4`,"aria-hidden":!0}),ce(t).projectDetailPage.common.runWorkflow]})}),(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-50 bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-50 flex h-[min(46rem,calc(100dvh-2rem))] w-[min(48rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-float`,children:[(0,$.jsxs)(`header`,{className:`flex shrink-0 items-start justify-between gap-4 border-b border-edge px-5 py-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:ce(t).projectDetailPage.common.runWorkflow}),(0,$.jsx)(he,{className:`mt-1 text-xs text-fg-muted`,children:r?`选择工作流并运行,结果将关联到当前项目。`:`Choose and run a workflow. The run will be linked to this project.`})]}),(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{variant:`ghost`,className:`size-8 p-0`,disabled:b,"aria-label":n.pickStartClose,children:(0,$.jsx)(se,{className:`size-4`,"aria-hidden":!0})})})]}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:w?(0,$.jsxs)(`div`,{role:`status`,className:`flex flex-col items-center gap-3 py-12 text-center`,children:[(0,$.jsx)(c,{className:`size-8 text-success`,"aria-hidden":!0}),(0,$.jsx)(`p`,{className:`text-base font-medium text-fg`,children:n.startSuccess}),(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:r?`工作流正在后台运行,你可以继续处理项目。`:`The workflow is running in the background. You can continue working on your project.`}),(0,$.jsx)(Y,{asChild:!0,variant:`secondary`,children:(0,$.jsx)(s,{to:`/workflows/runs/${encodeURIComponent(w.runId)}?agentId=${encodeURIComponent(w.agentId)}&projectId=${encodeURIComponent(e)}`,children:n.taskOpenDetails})})]}):M?(0,$.jsxs)(`div`,{className:`space-y-4`,"aria-label":r?`正在加载工作流`:`Loading workflows`,children:[(0,$.jsx)(Te,{className:`h-10 w-full rounded-lg`}),(0,$.jsx)(Te,{className:`h-10 w-full rounded-lg`}),(0,$.jsx)(Te,{className:`h-56 w-full rounded-xl`})]}):N?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:N instanceof Error?N.message:n.startFailed}):E.data?.length?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[n.chooseWorkflow,(0,$.jsxs)(d,{value:o,onChange:e=>I(e.target.value),disabled:b,"aria-label":n.chooseWorkflow,className:`mt-1 w-full`,children:[(0,$.jsx)(f,{value:``,children:n.chooseWorkflow}),E.data.map(e=>(0,$.jsx)(f,{value:e.id,children:Ue(e,t).title},e.id))]})]}),(0,$.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[r?`执行助手`:`Execution assistant`,(0,$.jsx)(d,{value:j??``,onChange:e=>p(e.target.value),disabled:b,"aria-label":r?`执行助手`:`Execution assistant`,className:`mt-1 w-full`,children:D.data?.agents.map(e=>(0,$.jsx)(f,{value:e.id,children:Je(e,ce(t).agentsSettings)},e.id))})]}),k&&A?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`text-sm leading-6 text-fg-muted`,children:A.description}),(0,$.jsx)(Rn,{projectId:e,language:t,value:g,onChange:_}),(0,$.jsx)(On,{definition:k,language:t,value:m,onChange:h,mode:`manual`,onValidityChange:e=>y(e.reason!==`raw-json`)})]}):null,S?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:S}):null]}):(0,$.jsx)(`p`,{className:`py-12 text-center text-sm text-fg-muted`,children:r?`还没有可运行的工作流,请先新建工作流。`:`No workflows are available. Create a workflow to get started.`})}),(0,$.jsxs)(`footer`,{className:`flex shrink-0 flex-wrap items-center justify-between gap-3 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(Y,{asChild:!0,variant:`ghost`,disabled:b,children:(0,$.jsx)(s,{to:`/workflows/new?projectId=${encodeURIComponent(e)}`,onClick:e=>{b&&e.preventDefault()},children:n.addWorkflow})}),w?(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{variant:`primary`,children:n.pickStartClose})}):(0,$.jsxs)(Y,{variant:`primary`,disabled:M||!!N||!k||!j||!P||b,onClick:()=>void L(),children:[(0,$.jsx)(Ut,{className:`size-4`,"aria-hidden":!0}),b?n.starting:n.runWorkflow]})]})]})]})]})}function yr(e){return J(fe(`/api/projects/${encodeURIComponent(e)}/skills`))}function br(e,t){return J(fe(`/api/projects/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`))}function xr(e,t){return J(fe(`/api/projects/${encodeURIComponent(e)}/workspace-trust`),{method:`PATCH`,body:JSON.stringify({trusted:t})})}function Sr(e,t){let n=new FormData;return n.set(`file`,t),J(fe(`/api/projects/${encodeURIComponent(e)}/skills/upload`),{method:`POST`,body:n})}function Cr(e,t,n={}){return J(fe(`/api/projects/${encodeURIComponent(e)}/skills/marketplace/install`),{method:`POST`,body:JSON.stringify({name:t,...n})})}function wr(e,t){return J(fe(`/api/projects/${encodeURIComponent(e)}/skills/source/install`),{method:`POST`,body:JSON.stringify({source:t})})}function Tr(e,t){return J(fe(`/api/projects/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`),{method:`DELETE`})}function Er({projectId:e,copy:t}){let n=de(e=>e.language),[r,i]=(0,Q.useState)([]),[a,o]=(0,Q.useState)([]),[s,c]=(0,Q.useState)([]),[d,f]=(0,Q.useState)([]),[m,h]=(0,Q.useState)(``),[g,_]=(0,Q.useState)(null),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(!0),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(null),[D,O]=(0,Q.useState)(``),[k,A]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(null),[N,P]=(0,Q.useState)(``),[F,I]=(0,Q.useState)(1),[L,R]=(0,Q.useState)(null),[z,B]=(0,Q.useState)(!1),[ee,V]=(0,Q.useState)(``),[H,te]=(0,Q.useState)(``),U=(0,Q.useRef)(null),ne=(0,Q.useCallback)(async()=>{S(!0),O(``);try{let t=await yr(e);i(t.items),o(t.inheritedItems),c(t.sources)}catch(e){O(e instanceof Error?e.message:String(e))}finally{S(!1)}},[e]);(0,Q.useEffect)(()=>{ne()},[ne]),(0,Q.useEffect)(()=>{let t=!1;return ot(e).then(e=>{t||f(e)}).catch(()=>{t||f([])}),()=>{t=!0}},[e]),(0,Q.useEffect)(()=>{if(!m){_(null);return}let e=d.find(e=>e.key===m),t=!1;return _(null),O(``),b(!0),fn(e?.agentId??e?.routing?.agentId,m,!0).then(e=>{t||_(e)}).catch(e=>{t||O(e instanceof Error?e.message:String(e))}).finally(()=>{t||b(!1)}),()=>{t=!0}},[m,d]),(0,Q.useEffect)(()=>{if(k!==`marketplace`)return;let e=new AbortController,t=window.setTimeout(()=>{B(!0),V(``),Cn({q:N,page:F,pageSize:8,sort:`downloads`,signal:e.signal}).then(R).catch(t=>{e.signal.aborted||V(t instanceof Error?t.message:String(t))}).finally(()=>{e.signal.aborted||B(!1)})},250);return()=>{window.clearTimeout(t),e.abort()}},[k,F,N]);async function W(e,t){w(!0),E(t??null),O(``);try{await e(),A(null),te(``),await ne()}catch(e){O(e instanceof Error?e.message:String(e))}finally{w(!1),E(null)}}async function re(t){O(``);try{M((await br(e,t)).skill)}catch(e){O(e instanceof Error?e.message:String(e))}}async function G(n){if(n.removable&&window.confirm(t.removeConfirm.replace(`{{name}}`,n.name))){w(!0);try{await Tr(e,n.directoryId),await ne()}catch(e){O(e instanceof Error?e.message:String(e))}finally{w(!1)}}}async function ie(){w(!0),O(``);try{await xr(e,!0),await ne()}catch(e){O(e instanceof Error?e.message:String(e))}finally{w(!1)}}let ae=s.find(e=>e.origin===`agents-workspace`),ce=new Map(g?.skills.map(e=>[e.name,e]));return(0,$.jsxs)(`section`,{id:`project-panel-skills`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-skills`,className:`grid content-start gap-4`,children:[(0,$.jsx)(`div`,{className:`rounded-lg bg-surface-panel p-4 shadow-surface`,children:(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:t.title}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:t.description})]}),(0,$.jsxs)(je,{children:[(0,$.jsx)(Ne,{asChild:!0,children:(0,$.jsxs)(Y,{type:`button`,children:[(0,$.jsx)(K,{className:`size-4`,"aria-hidden":!0}),t.add,(0,$.jsx)(en,{className:`size-3.5`,"aria-hidden":!0})]})}),(0,$.jsx)(ke,{children:(0,$.jsxs)(Ae,{align:`end`,sideOffset:8,className:`z-50 w-72 rounded-lg border border-edge bg-surface-panel p-1.5 shadow-xl`,children:[(0,$.jsx)(Ar,{icon:xt,title:t.marketplace,hint:t.marketplaceHint,onClick:()=>A(`marketplace`)}),(0,$.jsx)(Ar,{icon:Jt,title:t.source,hint:t.sourceHint,onClick:()=>A(`source`)}),(0,$.jsx)(Ar,{icon:Ke,title:t.upload,hint:t.uploadHint,onClick:()=>U.current?.click()})]})})]}),(0,$.jsx)(`input`,{ref:U,type:`file`,accept:`.zip,application/zip`,className:`hidden`,onChange:t=>{let n=t.target.files?.[0];n&&W(()=>Sr(e,n)),t.target.value=``}})]})}),D?(0,$.jsx)(`p`,{className:`rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:D}):null,ae?.state===`untrusted`?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,$.jsx)(_n,{className:`mt-0.5 size-4 shrink-0 text-amber-700 dark:text-amber-300`,"aria-hidden":!0}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:t.trustTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:t.trustHint})]})]}),(0,$.jsxs)(Y,{type:`button`,variant:`secondary`,disabled:C,onClick:()=>void ie(),children:[(0,$.jsx)(Bt,{className:`size-4`,"aria-hidden":!0}),C?t.trusting:t.trustAction]})]}):null,d.length?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3 rounded-lg border border-edge bg-surface-panel p-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:t.sessionViewLabel}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:y?t.sessionLoading:m?g?.agentId:t.sessionViewAll})]}),(0,$.jsx)(p,{value:m,options:d.map(e=>({value:e.key,label:e.name?.trim()||`${t.sessionFallback} · ${e.key.slice(-12)}`})),placeholder:t.sessionViewAll,emptyLabel:t.sessionViewAll,triggerClassName:`w-[min(24rem,calc(100vw-3rem))]`,onChange:h})]}):null,x?(0,$.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:[0,1,2].map(e=>(0,$.jsx)(Te,{className:`h-36 rounded-lg`},e))}):r.length?(0,$.jsx)(Dr,{title:t.localTitle,items:r,copy:t,busy:C,availabilityByName:ce,onPreview:re,onRemove:G}):(0,$.jsxs)(`div`,{className:`rounded-lg border border-dashed border-edge bg-surface-panel px-6 py-12 text-center`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:t.empty}),(0,$.jsx)(`p`,{className:`mt-2 text-sm text-fg-muted`,children:t.emptyHint})]}),!x&&a.length?(0,$.jsx)(Dr,{title:t.inheritedTitle,hint:t.inheritedHint,items:a,copy:t,busy:C,availabilityByName:ce,onPreview:re,onRemove:G}):null,(0,$.jsx)(be,{open:k!==null,onOpenChange:e=>{e||A(null)},children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-50 bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:q(`xopc-dialog-content fixed left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-xl`,k===`marketplace`?`h-[min(46rem,calc(100vh-2rem))] w-[min(58rem,calc(100vw-2rem))]`:`h-[min(22rem,calc(100vh-2rem))] w-[min(36rem,calc(100vw-2rem))]`),children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-edge px-5 py-4`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:k===`marketplace`?t.marketplace:t.source}),(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`size-9 p-0`,children:(0,$.jsx)(se,{className:`size-4`})})})]}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:k===`marketplace`?(0,$.jsxs)(`section`,{children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:t.marketplace}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:t.marketplaceHint}),(0,$.jsxs)(`div`,{className:`relative mt-3`,children:[(0,$.jsx)(oe,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`input`,{className:`h-10 w-full rounded-md border border-edge bg-surface-base pl-9 pr-3 text-sm outline-none focus:border-accent`,value:N,onChange:e=>{P(e.target.value),I(1)},placeholder:t.marketplacePlaceholder,autoFocus:!0})]}),ee?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-red-600 dark:text-red-300`,children:ee}):null,z&&!L?(0,$.jsx)(`div`,{className:`mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[0,1,2,3].map(e=>(0,$.jsx)(Te,{className:`h-32 rounded-lg`},e))}):L?.items.length?(0,$.jsx)(`div`,{className:`mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2`,children:L.items.map(i=>{let a=It(i,n),o=i.providerId??L.provider,s=Sn(i,o),c=r.some(e=>e.origin===`xopc-workspace`&&(e.directoryId===i.id||e.directoryId===s||e.name===i.name)),l=T===s;return(0,$.jsxs)(`article`,{className:`group flex min-h-32 gap-3 rounded-lg border border-edge bg-surface-base p-3`,children:[(0,$.jsx)(xn,{name:i.name,className:`size-10`}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,$.jsx)(`h4`,{className:`truncate text-sm font-semibold text-fg`,children:a.displayName}),(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs leading-5 text-fg-muted`,children:a.description||`—`}),(0,$.jsxs)(`div`,{className:`mt-auto flex items-end justify-between gap-2 pt-2`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-fg-subtle`,children:[(0,$.jsx)(v,{className:`size-3.5`,"aria-hidden":!0}),t.marketplaceDownloads,` `,i.downloads]}),(0,$.jsx)(Y,{type:`button`,className:`h-8 px-2.5 text-xs`,variant:c?`secondary`:`primary`,disabled:C||c,onClick:()=>void W(()=>Cr(e,s,{provider:o}),s),children:c?t.marketplaceInstalled:l?t.installing:t.install})]})]})]},`${o??`default`}:${i.id}`)})}):z?null:(0,$.jsx)(`p`,{className:`mt-6 text-center text-sm text-fg-muted`,children:t.marketplaceEmpty}),L&&L.meta.totalPages>1?(0,$.jsxs)(`div`,{className:`mt-3 flex items-center justify-between border-t border-edge-subtle pt-3`,children:[(0,$.jsx)(`span`,{className:`text-xs text-fg-muted`,children:t.marketplacePage.replace(`{{page}}`,String(L.meta.page)).replace(`{{total}}`,String(L.meta.totalPages))}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 px-2 text-xs`,disabled:z||F<=1,onClick:()=>I(e=>Math.max(1,e-1)),children:[(0,$.jsx)(l,{className:`size-4`}),t.marketplacePrevious]}),(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 px-2 text-xs`,disabled:z||F>=L.meta.totalPages,onClick:()=>I(e=>e+1),children:[t.marketplaceNext,(0,$.jsx)(u,{className:`size-4`})]})]})]}):null]}):(0,$.jsxs)(`section`,{className:`flex h-full flex-col`,children:[(0,$.jsx)(`p`,{className:`text-sm leading-6 text-fg-muted`,children:t.sourceHint}),(0,$.jsx)(`input`,{className:`mt-4 h-10 w-full rounded-md border border-edge bg-surface-base px-3 text-sm outline-none focus:border-accent`,value:H,onChange:e=>te(e.target.value),placeholder:t.sourcePlaceholder,autoFocus:!0}),(0,$.jsxs)(`div`,{className:`mt-auto flex justify-end gap-2 border-t border-edge pt-4`,children:[(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`secondary`,children:t.close})}),(0,$.jsx)(Y,{type:`button`,disabled:C||!H.trim(),onClick:()=>void W(()=>wr(e,H.trim())),children:C?t.installing:t.install})]})]})})]})]})}),(0,$.jsx)(be,{open:!!j,onOpenChange:e=>{e||M(null)},children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-50 bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-50 flex h-[min(42rem,calc(100vh-2rem))] w-[min(48rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-xl`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-edge px-5 py-4`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:j?.name}),(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`size-9 p-0`,children:(0,$.jsx)(se,{className:`size-4`})})})]}),(0,$.jsx)(`pre`,{className:`min-h-0 flex-1 overflow-auto whitespace-pre-wrap p-5 text-sm leading-6 text-fg-muted`,children:j?.bodyMarkdown})]})]})})]})}function Dr(e){let t=(0,Bn.c)(25),{title:n,hint:r,items:i,copy:a,busy:o,availabilityByName:s,onPreview:c,onRemove:l}=e,u;t[0]===n?u=t[1]:(u=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:n}),t[0]=n,t[1]=u);let d;t[2]===r?d=t[3]:(d=r?(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:r}):null,t[2]=r,t[3]=d);let f;t[4]!==u||t[5]!==d?(f=(0,$.jsxs)(`div`,{children:[u,d]}),t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;if(t[7]!==s||t[8]!==o||t[9]!==a||t[10]!==i||t[11]!==c||t[12]!==l){let e;t[14]!==s||t[15]!==o||t[16]!==a||t[17]!==c||t[18]!==l?(e=e=>{let t=e.effective?s.get(e.name):void 0;return(0,$.jsxs)(`article`,{className:q(`flex min-h-36 flex-col rounded-lg border border-edge bg-surface-panel p-4`,!e.effective&&`opacity-70`),children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Vt,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),(0,$.jsx)(`h4`,{className:`min-w-0 truncate text-sm font-semibold text-fg`,children:e.name})]}),(0,$.jsx)(`p`,{className:`mt-2 line-clamp-2 flex-1 text-sm leading-5 text-fg-muted`,children:e.description||e.directoryId}),(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5 text-[11px] text-fg-subtle`,children:[(0,$.jsx)(`span`,{className:`rounded-md bg-surface-hover/70 px-2 py-0.5`,children:Or(a,e.origin)}),e.writable?null:(0,$.jsx)(`span`,{className:`rounded-md bg-surface-hover/70 px-2 py-0.5`,children:a.sourceReadOnly}),e.effective?null:(0,$.jsx)(`span`,{className:`rounded-md bg-amber-500/10 px-2 py-0.5 text-amber-800 dark:text-amber-200`,children:a.shadowed}),t?(0,$.jsx)(`span`,{className:q(`rounded-md px-2 py-0.5`,t.availableForCurrentAgent?`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:`bg-amber-500/10 text-amber-800 dark:text-amber-200`),children:kr(a,t)}):null]}),(0,$.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-2`,children:[(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 px-2 text-xs`,onClick:()=>void c(e.key),children:[(0,$.jsx)(y,{className:`size-3.5`,"aria-hidden":!0}),a.view]}),e.removable?(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 px-2 text-xs text-red-600`,disabled:o,onClick:()=>void l(e),children:[(0,$.jsx)(pt,{className:`size-3.5`,"aria-hidden":!0}),a.remove]}):null]})]},e.key)},t[14]=s,t[15]=o,t[16]=a,t[17]=c,t[18]=l,t[19]=e):e=t[19],p=i.map(e),t[7]=s,t[8]=o,t[9]=a,t[10]=i,t[11]=c,t[12]=l,t[13]=p}else p=t[13];let m;t[20]===p?m=t[21]:(m=(0,$.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:p}),t[20]=p,t[21]=m);let h;return t[22]!==f||t[23]!==m?(h=(0,$.jsxs)(`section`,{className:`grid gap-3`,children:[f,m]}),t[22]=f,t[23]=m,t[24]=h):h=t[24],h}function Or(e,t){switch(t){case`xopc-workspace`:return e.xopcSource;case`agents-workspace`:return e.agentsSource;case`xopc-global`:case`custom-global`:return e.globalXopcSource;case`agents-global`:return e.globalAgentsSource;case`bundled`:return e.bundledSource;case`extra`:return e.extraSource}}function kr(e,t){if(t.availableForCurrentAgent)return e.sessionAvailable;switch(t.unavailableReason){case`agent-denied`:return e.sessionUnavailableAgent;case`disabled`:return e.sessionUnavailableDisabled;case`requirements-unmet`:return e.sessionUnavailableRequirements;case`model-invocation-disabled`:return e.sessionUnavailableModel;case`tool-gated`:return e.sessionUnavailableTools;default:return e.sessionUnavailableAgent}}function Ar(e){let t=(0,Bn.c)(13),{icon:n,title:r,hint:i,onClick:a}=e,o;t[0]===n?o=t[1]:(o=(0,$.jsx)(n,{className:`mt-0.5 size-4 shrink-0 text-accent-fg`,"aria-hidden":!0}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:r}),t[2]=r,t[3]=s);let c;t[4]===i?c=t[5]:(c=(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs leading-5 text-fg-muted`,children:i}),t[4]=i,t[5]=c);let l;t[6]!==s||t[7]!==c?(l=(0,$.jsxs)(`span`,{className:`min-w-0`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;return t[9]!==a||t[10]!==o||t[11]!==l?(u=(0,$.jsx)(Me,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full items-start gap-3 rounded-md px-3 py-2.5 text-left hover:bg-surface-hover`,onClick:a,children:[o,l]})}),t[9]=a,t[10]=o,t[11]=l,t[12]=u):u=t[12],u}function jr(e){return{name:e.name,description:e.description??``,status:e.status,defaultAgentId:e.defaultAgentId??``,executionMode:e.executionMode,workspaceRoot:e.workspaceRoot??``,brief:e.brief??``,instructions:e.instructions??``}}function Mr(e,t,n){let r=jr(t),i=jr(n),a=Object.keys(r).filter(t=>e[t]===r[t]);return{...e,...Object.fromEntries(a.map(e=>[e,i[e]]))}}var Nr={active:0,review:1,ready:2,backlog:3,closed:4},Pr={failed:0,blocked:1,waiting:2,verifying:3,running:4,queued:5,allocating:5,cancelled:6,idle:7},Fr={critical:0,high:1,normal:2,low:3};function Ir(e,t=4){return e.filter(e=>e.phase!==`closed`&&!(e.operationalState===`waiting`&&e.attention.length===0)).sort((e,t)=>{let n=Number(t.attention.length>0)-Number(e.attention.length>0);if(n!==0)return n;let r=Pr[e.operationalState]-Pr[t.operationalState];if(r!==0)return r;let i=Nr[e.phase]-Nr[t.phase];if(i!==0)return i;let a=Fr[e.priority]-Fr[t.priority];return a===0?t.updatedAt-e.updatedAt:a}).slice(0,t)}var Lr=[`backlog`,`ready`,`active`,`review`,`closed`];function Rr(e){return{backlog:e.filter(e=>e.phase===`backlog`),ready:e.filter(e=>e.phase===`ready`),active:e.filter(e=>e.phase===`active`),review:e.filter(e=>e.phase===`review`),closed:e.filter(e=>e.phase===`closed`)}}function zr(e,t){if(e.phase!==t){if(e.phase===`closed`&&t!==`closed`&&e.allowedCommands.includes(`reopen`))return`reopen_${t}`;if(t===`closed`&&e.phase===`review`&&e.allowedCommands.includes(`close`))return`complete`;if(t!==`closed`&&e.allowedCommands.includes(`move`))return`move_${t}`}}function Br(e){if(e.allowedCommands.includes(`resolve_wait`))return`resume`;if(e.allowedCommands.includes(`mark_ready`))return`ready`;if(e.allowedCommands.includes(`start`))return`run`;if(e.allowedCommands.includes(`request_review`))return`review`;if(e.phase===`review`&&e.allowedCommands.includes(`close`))return`complete`;if(e.allowedCommands.includes(`reopen`))return`reopen`;if(e.allowedCommands.includes(`add_wait`))return`pause`}function Vr(e){let t=new Map,n=new Map;for(let r of e)t.set(r.dependencyTaskId,[...t.get(r.dependencyTaskId)??[],r.dependentTaskId]),n.set(r.dependentTaskId,[...n.get(r.dependentTaskId)??[],r.dependencyTaskId]);return{outgoing:t,incoming:n}}function Hr(e,t){let n=new Set(e.map(e=>e.id)),{outgoing:r,incoming:i}=Vr(t.filter(e=>n.has(e.dependencyTaskId)&&n.has(e.dependentTaskId))),a=new Map(e.map(e=>[e.id,i.get(e.id)?.length??0])),o=new Map(e.map(e=>[e.id,0])),s=e.filter(e=>a.get(e.id)===0).sort((e,t)=>t.updatedAt-e.updatedAt).map(e=>e.id);for(let e=0;e<s.length;e+=1){let t=s[e];for(let e of r.get(t)??[]){o.set(e,Math.max(o.get(e)??0,(o.get(t)??0)+1));let n=(a.get(e)??1)-1;a.set(e,n),n===0&&s.push(e)}}let c=new Map;for(let t of e){let e=o.get(t.id)??0;c.set(e,[...c.get(e)??[],t.id])}let l=new Map;for(let[e,t]of c)t.forEach((t,n)=>l.set(t,{x:e*300,y:n*136}));return l}function Ur(e,t){let{incoming:n}=Vr(t),r=new Set(e.filter(e=>e.operationalState===`blocked`).map(e=>e.id)),i=[...r];for(let e=0;e<i.length;e+=1)for(let t of n.get(i[e])??[])r.has(t)||(r.add(t),i.push(t));return r}function Wr(e,t){let{incoming:n,outgoing:r}=Vr(t),i=new Set([e]);for(let t of[n,r]){let n=[e],r=new Set(n);for(let e=0;e<n.length;e+=1)for(let a of t.get(n[e])??[])r.has(a)||(r.add(a),i.add(a),n.push(a))}return i}var Gr={backlog:`border-edge`,ready:`border-edge`,active:`border-accent ring-2 ring-accent/15`,review:`border-amber-400/80`,closed:`border-emerald-400/60`};function Kr(e){let t=(0,Bn.c)(25),{data:n,selected:r}=e,i=n.task,a=i.operationalState===`waiting`||i.operationalState===`blocked`,o=Gr[i.phase],s=r&&`ring-2 ring-accent/30`,c=n.dimmed&&`opacity-30`,l;t[0]!==o||t[1]!==s||t[2]!==c?(l=q(`group w-56 rounded-xl border bg-surface-panel p-3 shadow-surface transition-opacity`,o,s,c),t[0]=o,t[1]=s,t[2]=c,t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Z,{type:`target`,position:Pn.Left,className:`!size-3 !border-2 !border-surface-panel !bg-accent opacity-60 transition-opacity group-hover:opacity-100`}),t[4]=u):u=t[4];let d;t[5]===i.title?d=t[6]:(d=(0,$.jsx)(`strong`,{className:`line-clamp-2 min-w-0 text-sm font-medium leading-5 text-fg`,children:i.title}),t[5]=i.title,t[6]=d);let f;t[7]===a?f=t[8]:(f=a?(0,$.jsx)(rn,{className:`mt-0.5 size-3.5 shrink-0 text-violet-600 dark:text-violet-300`,"aria-hidden":!0}):null,t[7]=a,t[8]=f);let p;t[9]!==d||t[10]!==f?(p=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[d,f]}),t[9]=d,t[10]=f,t[11]=p):p=t[11];let m;t[12]===n.phaseLabel?m=t[13]:(m=(0,$.jsx)(`span`,{children:n.phaseLabel}),t[12]=n.phaseLabel,t[13]=m);let h;t[14]!==a||t[15]!==i.blockedBy?(h=a&&i.blockedBy.length>0?(0,$.jsx)(`span`,{children:i.blockedBy.length}):null,t[14]=a,t[15]=i.blockedBy,t[16]=h):h=t[16];let g;t[17]!==h||t[18]!==m?(g=(0,$.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2 text-[11px] text-fg-subtle`,children:[m,h]}),t[17]=h,t[18]=m,t[19]=g):g=t[19];let _;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(Z,{type:`source`,position:Pn.Right,className:`!size-3 !border-2 !border-surface-panel !bg-accent opacity-60 transition-opacity group-hover:opacity-100`}),t[20]=_):_=t[20];let v;return t[21]!==g||t[22]!==l||t[23]!==p?(v=(0,$.jsxs)(`div`,{className:l,children:[u,p,g,_]}),t[21]=g,t[22]=l,t[23]=p,t[24]=v):v=t[24],v}var qr={taskNode:Kr};function Jr(e){let t=(0,Bn.c)(90),{tasks:n,dependencyEdges:r,returnTo:i,copy:a,onDependenciesChange:o}=e,[c,l]=(0,Q.useState)(!1),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(),[m,h]=(0,Q.useState)(),g=(0,Q.useRef)(null),_;t[0]!==r||t[1]!==n?(_=Ur(n,r),t[0]=r,t[1]=n,t[2]=_):_=t[2];let v=_,b;t[3]!==v||t[4]!==u||t[5]!==c||t[6]!==n?(b=u?n.filter(e=>v.has(e.id)):c?n:n.filter(ni),t[3]=v,t[4]=u,t[5]=c,t[6]=n,t[7]=b):b=t[7];let x=b,S;t[8]===x?S=t[9]:(S=new Set(x.map(ti)),t[8]=x,t[9]=S);let C=S,w;if(t[10]!==r||t[11]!==C){let e;t[13]===C?e=t[14]:(e=e=>C.has(e.dependencyTaskId)&&C.has(e.dependentTaskId),t[13]=C,t[14]=e),w=r.filter(e),t[10]=r,t[11]=C,t[12]=w}else w=t[12];let T=w,E;t[15]!==T||t[16]!==x?(E=Hr(x,T),t[15]=T,t[16]=x,t[17]=E):E=t[17];let D=E,O;t[18]!==f||t[19]!==T?(O=f?Wr(f,T):void 0,t[18]=f,t[19]=T,t[20]=O):O=t[20];let k=O,j;t[21]===f?j=t[22]:(j=e=>e.id===f,t[21]=f,t[22]=j);let M=x.find(j),N;t[23]===x?N=t[24]:(N=new Map(x.map(ei)),t[23]=x,t[24]=N);let P=N,F;if(t[25]!==a.phases||t[26]!==D||t[27]!==k||t[28]!==x){let e;t[30]!==a.phases||t[31]!==D||t[32]!==k?(e=e=>({id:e.id,type:`taskNode`,position:D.get(e.id)??{x:0,y:0},data:{task:e,phaseLabel:a.phases[e.phase],dimmed:!!(k&&!k.has(e.id))}}),t[30]=a.phases,t[31]=D,t[32]=k,t[33]=e):e=t[33],F=x.map(e),t[25]=a.phases,t[26]=D,t[27]=k,t[28]=x,t[29]=F}else F=t[29];let I=F,L;if(t[34]!==k||t[35]!==P||t[36]!==T){let e;t[38]!==k||t[39]!==P?(e=e=>{let t=P.get(e.dependencyTaskId),n=t?.phase===`closed`&&t.resolution===`done`,r=!!(k&&(!k.has(e.dependencyTaskId)||!k.has(e.dependentTaskId)));return{id:`${e.dependencyTaskId}:${e.dependentTaskId}`,source:e.dependencyTaskId,target:e.dependentTaskId,markerEnd:{type:Nn.ArrowClosed},style:{stroke:n?`var(--color-edge-strong)`:`var(--color-accent)`,strokeWidth:n?1.25:1.75,opacity:r?.18:1,strokeDasharray:n?`5 5`:void 0}}},t[38]=k,t[39]=P,t[40]=e):e=t[40],L=T.map(e),t[34]=k,t[35]=P,t[36]=T,t[37]=L}else L=t[37];let R=L,z,B;t[41]!==f||t[42]!==C?(z=()=>{f&&!C.has(f)&&p(void 0)},B=[f,C],t[41]=f,t[42]=C,t[43]=z,t[44]=B):(z=t[43],B=t[44]),(0,Q.useEffect)(z,B);let ee,V;t[45]!==R||t[46]!==m?(ee=()=>{m&&!R.some(e=>e.id===m)&&h(void 0)},V=[R,m],t[45]=R,t[46]=m,t[47]=ee,t[48]=V):(ee=t[47],V=t[48]),(0,Q.useEffect)(ee,V);let H;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>{let e=window.requestAnimationFrame(()=>{g.current?.fitView({padding:.2,minZoom:.35,maxZoom:1,duration:250})});return()=>window.cancelAnimationFrame(e)},t[49]=H):H=t[49];let te;t[50]!==u||t[51]!==c||t[52]!==x.length?(te=[u,c,x.length],t[50]=u,t[51]=c,t[52]=x.length,t[53]=te):te=t[53],(0,Q.useEffect)(H,te);let U;t[54]===f?U=t[55]:(U=()=>{f&&g.current?.fitView({nodes:[{id:f}],padding:1.5,minZoom:.7,maxZoom:1,duration:250})},t[54]=f,t[55]=U);let ne=U,W;t[56]!==r||t[57]!==o?(W=e=>{if(!e.source||!e.target||e.source===e.target)return;let t=r.filter(t=>t.dependentTaskId===e.target).map($r);t.includes(e.source)||o(e.target,[...t,e.source])},t[56]=r,t[57]=o,t[58]=W):W=t[58];let re=W,G;t[59]!==r||t[60]!==o||t[61]!==m?(G=()=>{if(!m)return;let e=r.find(e=>`${e.dependencyTaskId}:${e.dependentTaskId}`===m);e&&(h(void 0),o(e.dependentTaskId,r.filter(t=>t.dependentTaskId===e.dependentTaskId&&t.dependencyTaskId!==e.dependencyTaskId).map(Qr)))},t[59]=r,t[60]=o,t[61]=m,t[62]=G):G=t[62];let ie=G,K;t[63]===a.connectHint?K=t[64]:(K=(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:a.connectHint}),t[63]=a.connectHint,t[64]=K);let ae=u?`secondary`:`ghost`,oe;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(oe=()=>d(Zr),t[65]=oe):oe=t[65];let se=u?a.allTasks:a.blockedChains,ce;t[66]!==u||t[67]!==ae||t[68]!==se?(ce=(0,$.jsx)(Y,{type:`button`,variant:ae,className:`h-8 rounded-lg px-2.5 text-xs`,"aria-pressed":u,onClick:oe,children:se}),t[66]=u,t[67]=ae,t[68]=se,t[69]=ce):ce=t[69];let J;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(J=()=>l(Xr),t[70]=J):J=t[70];let le=c?a.hideCompleted:a.showCompleted,ue;t[71]!==u||t[72]!==c||t[73]!==le?(ue=(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`h-8 rounded-lg px-2.5 text-xs`,"aria-pressed":c,onClick:J,disabled:u,children:le}),t[71]=u,t[72]=c,t[73]=le,t[74]=ue):ue=t[74];let de=M?(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 rounded-lg px-2.5 text-xs`,onClick:ne,children:[(0,$.jsx)(Ft,{className:`size-3.5`,"aria-hidden":!0}),a.locateTask]}):null,fe;t[75]!==a.removeDependency||t[76]!==ie||t[77]!==m?(fe=m?(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`h-8 rounded-lg px-2.5 text-xs text-danger`,onClick:ie,children:a.removeDependency}):null,t[75]=a.removeDependency,t[76]=ie,t[77]=m,t[78]=fe):fe=t[78];let pe;t[79]!==ce||t[80]!==ue||t[81]!==de||t[82]!==fe?(pe=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[ce,ue,de,fe]}),t[79]=ce,t[80]=ue,t[81]=de,t[82]=fe,t[83]=pe):pe=t[83];let me;t[84]!==K||t[85]!==pe?(me=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-b border-edge bg-surface-panel px-3 py-2.5`,children:[K,pe]}),t[84]=K,t[85]=pe,t[86]=me):me=t[86];let he=x.length>0?(0,$.jsxs)(`div`,{className:q(`grid h-[min(42rem,calc(100vh-14rem))] min-h-[28rem]`,M&&`lg:grid-cols-[minmax(0,1fr)_18rem]`),children:[(0,$.jsxs)(In,{nodes:I,edges:R,nodeTypes:qr,nodesDraggable:!1,nodesConnectable:!0,elementsSelectable:!0,onNodeClick:(e,t)=>p(t.id),onEdgeClick:(e,t)=>h(t.id),onConnect:re,onPaneClick:()=>{p(void 0),h(void 0)},onInit:e=>{g.current=e},fitView:!0,minZoom:.25,maxZoom:1.25,panOnScroll:!0,zoomOnDoubleClick:!1,proOptions:{hideAttribution:!0},children:[(0,$.jsx)(Ln,{color:`var(--color-edge)`,gap:22,size:1}),(0,$.jsx)(Fn,{showInteractive:!1,className:`!border-edge !bg-surface-panel !shadow-surface`})]}),M?(0,$.jsxs)(`aside`,{className:`overflow-y-auto border-t border-edge bg-surface-panel p-4 lg:border-l lg:border-t-0`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-accent-fg`,children:a.phases[M.phase]}),(0,$.jsx)(`h3`,{className:`mt-2 text-sm font-semibold leading-6 text-fg`,children:M.title}),M.operationalState===`blocked`&&M.blockedBy.length>0?(0,$.jsxs)(`div`,{className:`mt-4 rounded-lg bg-violet-500/8 p-3`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-violet-700 dark:text-violet-300`,children:a.blockedBy.replace(`{{count}}`,String(M.blockedBy.length))}),(0,$.jsx)(`ul`,{className:`mt-2 space-y-1 text-xs leading-5 text-fg-muted`,children:M.blockedBy.map(Yr)})]}):null,(0,$.jsxs)(s,{to:A(i,M.id),className:`mt-4 inline-flex items-center gap-1.5 text-xs font-medium text-accent-fg hover:underline`,children:[(0,$.jsx)(y,{className:`size-3.5`,"aria-hidden":!0}),a.openTask]})]}):null]}):(0,$.jsx)(`div`,{className:`flex min-h-72 items-center justify-center px-6 text-center text-sm text-fg-muted`,children:a.empty}),ge;return t[87]!==me||t[88]!==he?(ge=(0,$.jsxs)(`section`,{className:`overflow-hidden rounded-xl border border-edge bg-surface-base/40`,children:[me,he]}),t[87]=me,t[88]=he,t[89]=ge):ge=t[89],ge}function Yr(e){return(0,$.jsx)(`li`,{children:e.title},e.id)}function Xr(e){return!e}function Zr(e){return!e}function Qr(e){return e.dependencyTaskId}function $r(e){return e.dependencyTaskId}function ei(e){return[e.id,e]}function ti(e){return e.id}function ni(e){return e.phase!==`closed`}function ri(e){return e instanceof Element?!!e.closest(`a,button,input,select,textarea,[contenteditable="true"],[draggable="true"],[data-board-pan-skip="true"]`):!0}var ii={backlog:g,ready:g,active:lt,review:ft,closed:h},ai={backlog:`bg-surface-hover text-fg-muted`,ready:`bg-surface-panel text-fg-muted`,active:`bg-accent-soft text-accent-fg`,review:`bg-amber-500/10 text-amber-700 dark:text-amber-300`,closed:`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`};function oi(e){return e===`running`||e===`queued`?`border-accent/20 bg-accent-soft text-accent-fg`:e===`verifying`?`border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:e===`waiting`?`border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300`:e===`failed`?`border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300`:e===`blocked`?`border-violet-500/20 bg-violet-500/10 text-violet-700 dark:text-violet-300`:`border-edge-subtle bg-surface-hover text-fg-muted`}function si(e){return e===`passed`?`border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:e===`failed`?`border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300`:`border-edge-subtle bg-surface-hover text-fg-muted`}function ci(e){let t=(0,Bn.c)(83),{task:n,returnTo:r,copy:i,busy:a,onAction:o,onDragStart:c,onDropBefore:l}=e,u,d,f,p,g,_,v,y,b,x,S,C,w,T,E,D;t[0]!==c||t[1]!==l||t[2]!==r||t[3]!==n?(g=Br(n),_=g!==`review`&&n.allowedCommands.includes(`request_review`)?`review`:void 0,f=n.phase===`closed`,p=!!(n.dueAt&&n.dueAt<Date.now()&&!f),d=f?h:yt,y=n.priority!==`normal`,v=y||n.operationalState!==`idle`||!!n.latestVerification||n.acceptanceCriteriaCount>0||!!n.dueAt||!!n.nextCheckAt,S=!0,t[20]!==c||t[21]!==n.id?(C=e=>{e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,n.id),c(n.id)},t[20]=c,t[21]=n.id,t[22]=C):C=t[22],t[23]===c?w=t[24]:(w=()=>c(``),t[23]=c,t[24]=w),T=ui,t[25]!==l||t[26]!==n.id?(E=e=>{e.preventDefault(),e.stopPropagation(),l(n.id)},t[25]=l,t[26]=n.id,t[27]=E):E=t[27],D=`group relative min-h-max min-w-0 shrink-0 overflow-hidden rounded-xl border border-edge-subtle bg-surface-base shadow-surface transition-[border-color,box-shadow] hover:border-edge focus-within:border-accent/40`,u=s,t[28]!==r||t[29]!==n.id?(b=A(r,n.id),t[28]=r,t[29]=n.id,t[30]=b):b=t[30],x=q(`block min-w-0 p-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,_?`pr-19`:g&&`pr-11`),t[0]=c,t[1]=l,t[2]=r,t[3]=n,t[4]=u,t[5]=d,t[6]=f,t[7]=p,t[8]=g,t[9]=_,t[10]=v,t[11]=y,t[12]=b,t[13]=x,t[14]=S,t[15]=C,t[16]=w,t[17]=T,t[18]=E,t[19]=D):(u=t[4],d=t[5],f=t[6],p=t[7],g=t[8],_=t[9],v=t[10],y=t[11],b=t[12],x=t[13],S=t[14],C=t[15],w=t[16],T=t[17],E=t[18],D=t[19]);let O=f?`text-emerald-600 dark:text-emerald-400`:`text-fg-subtle`,k;t[31]===O?k=t[32]:(k=q(`mt-0.5 size-4 shrink-0`,O),t[31]=O,t[32]=k);let j;t[33]!==d||t[34]!==k?(j=(0,$.jsx)(d,{className:k,"aria-hidden":!0}),t[33]=d,t[34]=k,t[35]=j):j=t[35];let M=f?`text-fg-subtle`:`text-fg`,N;t[36]===M?N=t[37]:(N=q(`min-w-0 break-words text-sm font-semibold leading-5`,M),t[36]=M,t[37]=N);let P;t[38]!==N||t[39]!==n.title?(P=(0,$.jsx)(`h3`,{className:N,children:n.title}),t[38]=N,t[39]=n.title,t[40]=P):P=t[40];let F;t[41]!==j||t[42]!==P?(F=(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[j,P]}),t[41]=j,t[42]=P,t[43]=F):F=t[43];let I;t[44]!==i||t[45]!==n.attention||t[46]!==n.blockedBy||t[47]!==n.operationalState?(I=n.operationalState===`blocked`&&n.blockedBy.length>0?(0,$.jsxs)(`div`,{className:`ml-6.5 mt-2.5 rounded-lg bg-violet-500/8 px-2.5 py-2 text-xs text-violet-700 dark:text-violet-300`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-medium`,children:[(0,$.jsx)(rn,{className:`size-3.5`,"aria-hidden":!0}),i.blockedBy.replace(`{{count}}`,String(n.blockedBy.length))]}),(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 leading-5 text-fg-muted`,children:n.blockedBy.map(li).join(`、`)})]}):n.attention[0]?(0,$.jsxs)(`p`,{className:`ml-6.5 mt-2.5 flex items-start gap-1.5 text-xs leading-5 text-fg-muted`,children:[(0,$.jsx)(m,{className:`mt-0.5 size-3.5 shrink-0 text-amber-600 dark:text-amber-400`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`line-clamp-2`,children:n.attention[0].summary})]}):null,t[44]=i,t[45]=n.attention,t[46]=n.blockedBy,t[47]=n.operationalState,t[48]=I):I=t[48];let L;t[49]!==i||t[50]!==p||t[51]!==v||t[52]!==y||t[53]!==n.acceptanceCriteriaCount||t[54]!==n.dueAt||t[55]!==n.latestVerification||t[56]!==n.nextCheckAt||t[57]!==n.operationalState||t[58]!==n.priority?(L=v?(0,$.jsxs)(`div`,{className:`ml-6.5 mt-2.5 flex flex-wrap items-center gap-1.5 text-[11px]`,children:[y?(0,$.jsx)(`span`,{className:q(`inline-flex min-h-6 items-center rounded-md border px-2 font-medium`,n.priority===`critical`?`border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300`:n.priority===`high`?`border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300`:`border-edge-subtle bg-surface-hover text-fg-muted`),children:i.priorityOptions[n.priority]}):null,n.operationalState===`idle`?null:(0,$.jsx)(`span`,{className:q(`inline-flex min-h-6 items-center rounded-md border px-2 font-medium`,oi(n.operationalState)),children:i.operationalStates[n.operationalState]}),n.latestVerification?(0,$.jsx)(`span`,{className:q(`inline-flex min-h-6 items-center rounded-md border px-2 font-medium`,si(n.latestVerification)),children:i.verification[n.latestVerification]}):null,n.acceptanceCriteriaCount>0?(0,$.jsxs)(`span`,{className:`inline-flex min-h-6 items-center gap-1 rounded-md border border-edge-subtle bg-surface-hover px-2 text-fg-muted`,children:[(0,$.jsx)(lt,{className:`size-3`,"aria-hidden":!0}),i.acceptanceCriteria.replace(`{{count}}`,String(n.acceptanceCriteriaCount))]}):null,n.dueAt?(0,$.jsxs)(`span`,{className:q(`inline-flex min-h-6 items-center gap-1 rounded-md border px-2`,p?`border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300`:`border-edge-subtle bg-surface-hover text-fg-muted`),children:[(0,$.jsx)(Tt,{className:`size-3`,"aria-hidden":!0}),Ve(new Date(n.dueAt))]}):null,n.nextCheckAt?(0,$.jsxs)(`span`,{className:`inline-flex min-h-6 items-center gap-1 rounded-md border border-accent/20 bg-accent-soft px-2 text-accent-fg`,children:[(0,$.jsx)(Tt,{className:`size-3`,"aria-hidden":!0}),Ve(new Date(n.nextCheckAt))]}):null]}):null,t[49]=i,t[50]=p,t[51]=v,t[52]=y,t[53]=n.acceptanceCriteriaCount,t[54]=n.dueAt,t[55]=n.latestVerification,t[56]=n.nextCheckAt,t[57]=n.operationalState,t[58]=n.priority,t[59]=L):L=t[59];let R;t[60]!==u||t[61]!==b||t[62]!==F||t[63]!==I||t[64]!==L||t[65]!==x?(R=(0,$.jsxs)(u,{to:b,className:x,children:[F,I,L]}),t[60]=u,t[61]=b,t[62]=F,t[63]=I,t[64]=L,t[65]=x,t[66]=R):R=t[66];let z;t[67]!==a||t[68]!==i||t[69]!==o||t[70]!==g||t[71]!==_||t[72]!==n?(z=g?(0,$.jsxs)(`div`,{className:`absolute right-2.5 top-2.5 z-10 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 [@media(hover:none)]:opacity-100`,children:[_?(0,$.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>o(n,_),className:`inline-flex size-7 items-center justify-center rounded-md bg-surface-hover text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-wait disabled:opacity-50`,"aria-label":i.actions[_],title:i.actions[_],children:(0,$.jsx)(ft,{className:`size-3.5`,"aria-hidden":!0})}):null,(0,$.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>o(n,g),className:`inline-flex size-7 items-center justify-center rounded-md bg-accent-soft text-accent-fg hover:bg-accent-soft/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-wait disabled:opacity-50`,"aria-label":i.actions[g],title:i.actions[g],children:(0,$.jsx)(qt,{className:`size-3.5`,"aria-hidden":!0})})]}):null,t[67]=a,t[68]=i,t[69]=o,t[70]=g,t[71]=_,t[72]=n,t[73]=z):z=t[73];let B;return t[74]!==R||t[75]!==z||t[76]!==S||t[77]!==C||t[78]!==w||t[79]!==T||t[80]!==E||t[81]!==D?(B=(0,$.jsxs)(`article`,{draggable:S,onDragStart:C,onDragEnd:w,onDragOver:T,onDrop:E,className:D,children:[R,z]}),t[74]=R,t[75]=z,t[76]=S,t[77]=C,t[78]=w,t[79]=T,t[80]=E,t[81]=D,t[82]=B):B=t[82],B}function li(e){return e.title}function ui(e){e.preventDefault(),e.stopPropagation()}function di({tasks:e,dependencyEdges:t,returnTo:n,copy:r,onAction:i,onReorder:a,onUndoMove:o,onDependenciesChange:s,onCreate:c,actionBusyId:l,ref:u}){let p=(0,Q.useRef)(null),m=(0,Q.useRef)(null),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(`board`),[C,w]=(0,Q.useState)(!1),[T,O]=(0,Q.useState)(()=>crypto.randomUUID()),[k,A]=(0,Q.useState)(``),[j,M]=(0,Q.useState)(`normal`),[N,P]=(0,Q.useState)(``),[F,I]=(0,Q.useState)([]),[L,R]=(0,Q.useState)(!1),[z,B]=(0,Q.useState)(null),ee=de(e=>e.language),V=D({chat:ce(ee).chat}),H=Rr(e),te=e.filter(e=>e.phase!==`closed`),U=(e,t)=>void i(e,t),ne=async(t,n)=>{let r=e.find(e=>e.id===h);if(g(null),!r||r.id===n)return;let o=H[r.phase],s=o.findIndex(e=>e.id===r.id),c=s>=0?o[s+1]?.id??null:null;if(r.phase===t&&c===n)return;let l=zr(r,t);r.phase!==t&&!l||l&&!await i(r,l)||await a(r.id,n)&&b({taskId:r.id,phase:r.phase,beforeTaskId:c})},W=async e=>{e.preventDefault();let t=k.trim();if(!(!t||L)){R(!0),B(null);try{let e=N?new Date(`${N}T23:59:59.999`).getTime():void 0;await c({requestId:T,objective:t,priority:j,dependsOnTaskIds:F,attachments:V.wireAttachmentsPayload(),...e===void 0?{}:{dueAt:e}}),A(``),M(`normal`),P(``),I([]),V.clearAttachments(),O(crypto.randomUUID()),w(!1)}catch(e){B(e instanceof Error?e.message:r.createFailed)}finally{R(!1)}}},re=()=>{O(crypto.randomUUID()),A(``),M(`normal`),P(``),I([]),V.clearAttachments(),B(null),w(!0)};(0,Q.useImperativeHandle)(u,()=>({openCreate:re})),(0,Q.useEffect)(()=>{if(!y)return;let e=window.setTimeout(()=>b(null),6e3);return()=>window.clearTimeout(e)},[y]);let G=(0,Q.useCallback)(e=>{let t=m.current;!t||t.pointerId!==e.pointerId||(m.current=null,v(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},[]),ie=(0,Q.useCallback)(e=>{if(e.button!==0||ri(e.target))return;let t=p.current;t&&(m.current={pointerId:e.pointerId,startX:e.clientX,scrollLeft:t.scrollLeft,active:!1},e.currentTarget.setPointerCapture(e.pointerId))},[]),K=(0,Q.useCallback)(e=>{let t=m.current,n=p.current;if(!t||!n||t.pointerId!==e.pointerId)return;let r=e.clientX-t.startX;!t.active&&Math.abs(r)<5||(t.active||(t.active=!0,v(!0)),e.preventDefault(),n.scrollLeft=t.scrollLeft-r)},[]);return(0,$.jsxs)(`section`,{id:`project-panel-board`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-board`,className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,$.jsxs)(`div`,{className:`mb-4 flex shrink-0 flex-wrap items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:r.title}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:r.description})]}),(0,$.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:(0,$.jsxs)(`div`,{className:`flex rounded-lg border border-edge bg-surface-panel p-0.5`,children:[(0,$.jsxs)(`button`,{type:`button`,"aria-pressed":x===`board`,onClick:()=>S(`board`),className:q(`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium`,x===`board`?`bg-surface-hover text-fg`:`text-fg-muted hover:text-fg`),children:[(0,$.jsx)(wt,{className:`size-3.5`,"aria-hidden":!0}),r.views.board]}),(0,$.jsxs)(`button`,{type:`button`,"aria-pressed":x===`graph`,onClick:()=>S(`graph`),className:q(`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium`,x===`graph`?`bg-surface-hover text-fg`:`text-fg-muted hover:text-fg`),children:[(0,$.jsx)(Jt,{className:`size-3.5`,"aria-hidden":!0}),r.views.graph]})]})})]}),x===`board`?(0,$.jsx)(`div`,{ref:p,className:q(`min-h-0 w-full min-w-0 flex-1 overflow-x-auto overflow-y-hidden overscroll-x-contain pb-2 [scrollbar-width:thin]`,_?`cursor-grabbing select-none`:`cursor-grab`),onPointerDown:ie,onPointerMove:K,onPointerUp:G,onPointerCancel:G,onLostPointerCapture:e=>{m.current?.pointerId===e.pointerId&&(m.current=null,v(!1))},children:(0,$.jsx)(`div`,{className:`grid h-full min-h-0 min-w-[103rem] grid-cols-5 gap-3`,children:Lr.map(t=>{let i=ii[t],a=H[t];return(0,$.jsxs)(`section`,{onDragOver:n=>{let r=e.find(e=>e.id===h);r&&(r.phase===t||zr(r,t))&&n.preventDefault()},onDrop:e=>{e.preventDefault(),ne(t,null)},className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border border-edge-subtle bg-surface-inset/70 p-2.5`,children:[(0,$.jsxs)(`header`,{className:`mb-2.5 flex shrink-0 items-center gap-2 px-0.5`,children:[(0,$.jsxs)(`div`,{className:q(`flex items-center gap-1.5 rounded-md px-2 py-1`,ai[t]),children:[(0,$.jsx)(i,{className:`size-3.5`,"aria-hidden":!0}),(0,$.jsx)(`h3`,{className:`text-sm font-semibold`,children:r.phases[t]})]}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:a.length})]}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-y-contain pr-1 [scrollbar-gutter:stable] [scrollbar-width:thin]`,children:(0,$.jsx)(`div`,{className:`flex flex-col gap-2`,children:a.map(e=>(0,$.jsx)(ci,{task:e,returnTo:n,copy:r,busy:l===e.id,onAction:U,onDragStart:g,onDropBefore:e=>void ne(t,e)},e.id))})})]},t)})})}):(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:(0,$.jsx)(Jr,{tasks:e,dependencyEdges:t,returnTo:n,copy:{...r.graph,phases:r.phases},onDependenciesChange:s})}),(0,$.jsx)(be,{open:C,onOpenChange:e=>{L||w(e)},children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(40rem,calc(100vh-2rem))] w-[min(38rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`shrink-0 border-b border-edge px-5 py-4`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:r.createTitle}),(0,$.jsx)(he,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:r.createDescription})]}),(0,$.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:e=>void W(e),children:[(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-5 py-4`,children:[(0,$.jsxs)(`div`,{className:`grid gap-2 text-sm`,children:[(0,$.jsx)(`label`,{htmlFor:`project-task-objective`,className:`font-medium text-fg-muted`,children:r.objective}),(0,$.jsxs)(`div`,{className:q(`overflow-hidden rounded-lg border border-edge bg-surface-base transition-colors focus-within:border-accent`,V.isDragging&&`border-accent bg-accent-soft/30`),onDragOver:e=>{e.preventDefault(),L||V.setIsDragging(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||V.setIsDragging(!1)},onDrop:e=>{e.preventDefault(),V.setIsDragging(!1),L||V.processFiles(Array.from(e.dataTransfer.files))},children:[(0,$.jsx)(`textarea`,{id:`project-task-objective`,autoFocus:!0,className:`min-h-28 w-full resize-y bg-transparent px-3 py-3 text-sm leading-6 text-fg outline-none placeholder:text-fg-subtle`,value:k,onChange:e=>{A(e.target.value),B(null)},placeholder:r.objectivePlaceholder,maxLength:12e3,disabled:L}),(0,$.jsx)(E,{attachments:V.attachments,topPadded:!1,onRemove:e=>{L||V.removeAttachment(e)}}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-t border-edge-subtle px-2.5 py-2`,children:[(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 rounded-lg px-2.5 text-xs`,disabled:L,onClick:()=>V.fileInputRef.current?.click(),children:[(0,$.jsx)(gt,{className:`size-3.5`,"aria-hidden":!0}),r.addFiles]}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:r.attachmentsDescription}),(0,$.jsx)(`input`,{ref:V.fileInputRef,type:`file`,multiple:!0,className:`hidden`,onChange:e=>{V.processFiles(Array.from(e.target.files??[])),e.currentTarget.value=``}})]})]})]}),(0,$.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm`,children:[(0,$.jsx)(`span`,{className:`font-medium text-fg-muted`,children:r.priority}),(0,$.jsx)(d,{value:j,onChange:e=>M(e.target.value),disabled:L,children:[`low`,`normal`,`high`,`critical`].map(e=>(0,$.jsx)(f,{value:e,children:r.priorityOptions[e]},e))})]}),(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm`,children:[(0,$.jsxs)(`span`,{className:`font-medium text-fg-muted`,children:[r.dueDate,` `,(0,$.jsx)(`span`,{className:`font-normal text-fg-subtle`,children:r.optional})]}),(0,$.jsx)(wn,{className:`min-h-10 bg-surface-base`,value:N,onChange:P,disabled:L,ariaLabel:r.dueDate})]})]}),(0,$.jsxs)(`fieldset`,{className:`grid gap-2`,children:[(0,$.jsxs)(`legend`,{className:`text-sm font-medium text-fg-muted`,children:[r.dependencies,` `,(0,$.jsx)(`span`,{className:`font-normal text-fg-subtle`,children:r.optional})]}),(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-subtle`,children:r.dependenciesDescription}),(0,$.jsx)(zn,{candidates:te,selectedIds:F,disabled:L,onChange:I,labels:{link:r.linkDependencies,linked:r.linkedDependencies,searchPlaceholder:r.dependencySearchPlaceholder,noMatches:r.noDependencyMatches,noCandidates:r.noDependencyCandidates,remove:r.removeDependency}})]}),z?(0,$.jsx)(`p`,{className:`text-sm text-red-600 dark:text-red-400`,children:z}):null]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg`,disabled:L,children:r.cancel})}),(0,$.jsx)(Y,{type:`submit`,variant:`primary`,className:`rounded-lg`,disabled:L||!k.trim(),children:L?r.creating:ee===`zh`?`保存待安排任务`:`Save for later`})]})]})]})]})}),y?(0,$.jsxs)(`div`,{role:`status`,className:`fixed bottom-5 left-1/2 z-50 flex -translate-x-1/2 items-center gap-4 rounded-lg border border-edge bg-surface-panel px-4 py-3 text-sm text-fg shadow-float`,children:[(0,$.jsx)(`span`,{children:r.moved}),(0,$.jsx)(`button`,{type:`button`,className:`font-medium text-accent-fg hover:underline`,onClick:()=>{let e=y;b(null),o(e.taskId,e.phase,e.beforeTaskId).then(t=>{t||b(e)})},children:r.undo})]}):null]})}var fi=new Set([{id:`overview`,icon:kt},{id:`tasks`,icon:ut},{id:`automations`,icon:ht},{id:`files`,icon:Ht},{id:`notes`,icon:S},{id:`skills`,icon:Dt},{id:`sessions`,icon:G},{id:`progress`,icon:Lt},{id:`settings`,icon:Xt}].map(e=>e.id)),pi=`xopc.projectFiles.panelWidthPx`,mi=320,hi=220,gi=560;function _i(e,t){return e.name!==t.name||e.description!==(t.description??``)||e.status!==t.status||e.defaultAgentId!==(t.defaultAgentId??``)||e.executionMode!==t.executionMode||e.brief!==(t.brief??``)||e.instructions!==(t.instructions??``)}function vi(e){return Math.min(gi,Math.max(hi,Math.round(e)))}function yi(){try{let e=window.localStorage.getItem(pi);if(e==null)return mi;let t=Number.parseInt(e,10);return Number.isFinite(t)?vi(t):mi}catch{return mi}}function bi(e){try{window.localStorage.setItem(pi,String(vi(e)))}catch{}}function xi(e){return!!(e&&fi.has(e))}function Si(e,t){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>String(t[n]??``))}function Ci(e,t=``){if(!e)return t;let n=new Date(e);return Number.isNaN(n.getTime())?String(e):Ve(n)}function wi(e){return e===`active`?`bg-accent-soft text-accent-fg`:e===`done`?`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:e===`paused`?`bg-amber-500/10 text-amber-700 dark:text-amber-300`:e===`archived`?`bg-surface-inset text-fg-subtle`:`bg-surface-hover text-fg-muted`}function Ti(e){let t=(0,Bn.c)(8),{label:n,hint:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`span`,{className:`font-medium text-fg-muted`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`span`,{className:`text-xs leading-5 text-fg-subtle`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)(`label`,{className:`grid gap-1.5 text-sm`,children:[a,i,o]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Ei(e=!1){return q(`w-full rounded-md border border-edge bg-surface-base px-3 text-sm text-fg outline-none focus:border-accent`,e?`min-h-24 py-2 leading-5`:`min-h-10`)}function Di(e){let t=(0,Bn.c)(10),{label:n,value:r,mono:i}=e,a=i===void 0?!1:i,o;t[0]===n?o=t[1]:(o=(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-subtle`,children:n}),t[0]=n,t[1]=o);let s=a&&`font-mono text-xs`,c;t[2]===s?c=t[3]:(c=q(`mt-1 min-w-0 truncate text-sm text-fg`,s),t[2]=s,t[3]=c);let l;t[4]!==c||t[5]!==r?(l=(0,$.jsx)(`div`,{className:c,title:r,children:r}),t[4]=c,t[5]=r,t[6]=l):l=t[6];let u;return t[7]!==o||t[8]!==l?(u=(0,$.jsxs)(`div`,{className:`min-w-0 rounded-md bg-surface-base px-3 py-2`,children:[o,l]}),t[7]=o,t[8]=l,t[9]=u):u=t[9],u}function Oi(e){return[e.name,e.slug,e.workspaceRoot,e.description,e.brief].filter(Boolean).join(` `).toLowerCase()}function ki(e){let t=e.lastActiveAt??e.updatedAt??e.createdAt,n=t?new Date(t).getTime():0;return Number.isFinite(n)?n:0}function Ai(e){return e.trim().replace(/[\\/]+$/,``).split(/[\\/]/).filter(Boolean).pop()??``}function ji(e){let t=e?.body;return t?.code===`workspace_root_missing`&&t.workspaceRoot?t.workspaceRoot:null}function Mi(e){let t=e.actor;return t.name?t.name:t.agentId?t.agentId:t.id?t.id:t.conversationId?t.conversationId:t.kind}function Ni(e){return e.primaryObject.title?.trim()||e.primaryObject.id}function Pi(e){let t=e.source;return t.toolCallId?`${t.kind} · ${t.toolCallId}`:t.runId?`${t.kind} · ${t.runId}`:t.requestId?`${t.kind} · ${t.requestId}`:t.kind}function Fi(e){let t=e.sourceChannel?.trim();return t?Ii(t):``}function Ii(e){let t=e.trim().toLowerCase();return t?t===`tui`?`TUI`:t===`acp`?`ACP`:t===`webchat`?`Webchat`:t:``}function Li(e){let t=e.payload.changes;if(Array.isArray(t)&&t.length)return t.filter(e=>typeof e==`string`).join(`, `);let n=e.payload.contentPreview;if(typeof n==`string`&&n.trim())return n.trim();let r=e.payload.title??e.payload.name;return typeof r==`string`&&r.trim()?r.trim():``}function Ri(e){return e.map(e=>({fileId:e.fileId,name:e.name,path:e.path,isDirectory:e.type===`directory`,children:e.type===`directory`?[]:void 0}))}function zi(e,t,n){return e.map(e=>e.path===t?{...e,children:n}:e.isDirectory&&e.children?.length?{...e,children:zi(e.children,t,n)}:e)}function Bi({currentProject:e,pm:t,projectsText:n,wd:r}){let a=i(),[o,s]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)([e]),[d,f]=(0,Q.useState)(``),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)(`new`),[x,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)(``),[T,E]=(0,Q.useState)(!1),[D,O]=(0,Q.useState)(!0),[k,A]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(null),N=(0,Q.useCallback)(async()=>{m(!0),g(null);try{let t=await Et({limit:100});u(n=>{let r=new Map;r.set(e.id,e);for(let e of n)r.set(e.id,e);for(let e of t.items)r.set(e.id,e);return Array.from(r.values())})}catch(e){g(e instanceof Error?e.message:String(e))}finally{m(!1)}},[e]);(0,Q.useEffect)(()=>{u(t=>[e,...t.filter(t=>t.id!==e.id)])},[e]),(0,Q.useEffect)(()=>{o&&N()},[N,o]);let P=(0,Q.useMemo)(()=>{let t=d.trim().toLowerCase().split(/\s+/).filter(Boolean);return l.filter(t=>t.id!==e.id).filter(e=>{if(t.length===0)return!0;let n=Oi(e);return t.every(e=>n.includes(e))}).sort((e,t)=>ki(t)-ki(e))},[e.id,l,d]),F=e=>t.statuses[e.status]??e.status,I=e=>e.description||e.brief||t.common.defaultWorkspace,L=e=>{b(e),S(``),w(``),A(null),v(!0),s(!1)},R=(0,Q.useCallback)(async(e={})=>{let t=C.trim(),n=x.trim()||(y===`directory`?Ai(t):``);if(n){E(!0),A(null),M(null);try{let r=await qe({autoUnderstand:D,name:n,...t?{workspaceRoot:t}:{},...e.createWorkspaceRoot?{createWorkspaceRoot:!0}:{}});v(!1),S(``),w(``),O(!0),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:r.id}})),u(e=>[r,...e.filter(e=>e.id!==r.id)]),a(`/projects/${encodeURIComponent(r.id)}`)}catch(e){let t=ji(e);t?(M(t),v(!1)):A(e instanceof Error?e.message:String(e))}finally{E(!1)}}},[y,x,a,C,D]),z=(0,Q.useCallback)(e=>{e.preventDefault(),R()},[R]),B=(0,Q.useCallback)(()=>{R({createWorkspaceRoot:!0})},[R]),ee=(0,Q.useCallback)(()=>{M(null),v(!0)},[]),V=e=>{w(e),y===`directory`&&!x.trim()&&S(Ai(e))},H=(e,t)=>(0,$.jsxs)(`button`,{type:`button`,className:q(`grid w-full grid-cols-[1rem_minmax(0,1fr)_auto] items-center gap-2 rounded-md p-2 text-left hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,t&&`bg-accent-soft/55 hover:bg-accent-soft/70`),onClick:()=>{s(!1),t||a(`/projects/${encodeURIComponent(e.id)}`)},children:[(0,$.jsx)(c,{className:q(`size-4 text-accent-fg`,!t&&`invisible`),"aria-hidden":!0}),(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:e.name}),(0,$.jsx)(`span`,{className:`block truncate text-xs text-fg-muted`,children:I(e)})]}),(0,$.jsx)(`span`,{className:q(`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium`,wi(e.status)),children:F(e)})]},e.id);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(je,{open:o,onOpenChange:s,children:[(0,$.jsx)(Ne,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,className:`group flex max-w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1 text-left hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,"aria-label":t.projectSwitcher.switchProject,title:t.projectSwitcher.switchProject,children:[(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:e.name}),(0,$.jsx)(`span`,{className:q(`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium`,wi(e.status)),children:F(e)})]}),(0,$.jsx)(`span`,{className:`block truncate text-xs text-fg-muted`,children:I(e)})]}),(0,$.jsx)(en,{className:`size-4 shrink-0 text-fg-subtle transition-transform group-data-[state=open]:rotate-180`,"aria-hidden":!0})]})}),(0,$.jsx)(ke,{children:(0,$.jsxs)(Ae,{side:`bottom`,align:`start`,sideOffset:6,className:`z-[70] w-[min(26rem,calc(100vw-2rem))] overflow-hidden rounded-xl border border-edge bg-surface-panel p-1.5 shadow-popover outline-none`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,$.jsxs)(`label`,{className:`relative block`,children:[(0,$.jsx)(oe,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`input`,{type:`search`,className:`h-9 w-full rounded-lg border border-edge bg-surface-base pl-9 pr-3 text-sm text-fg outline-none placeholder:text-fg-muted focus:border-accent`,value:d,onChange:e=>f(e.target.value),placeholder:t.projectSwitcher.searchPlaceholder,"aria-label":t.projectSwitcher.searchPlaceholder})]}),(0,$.jsxs)(`div`,{className:`mt-1 max-h-[min(54vh,24rem)] overflow-y-auto pr-0.5 [scrollbar-gutter:stable]`,children:[(0,$.jsx)(`div`,{className:`px-2 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-fg-subtle`,children:t.projectSwitcher.current}),H(e,!0),(0,$.jsx)(`div`,{className:`px-2 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-fg-subtle`,children:t.projectSwitcher.recent}),h?(0,$.jsx)(`div`,{className:`p-2 text-xs text-red-600 dark:text-red-400`,children:h}):null,p&&P.length===0?(0,$.jsx)(`div`,{className:`px-2 py-3 text-center text-xs text-fg-muted`,children:t.projectSwitcher.loading}):null,!p&&P.length===0?(0,$.jsx)(`div`,{className:`px-2 py-3 text-center text-xs text-fg-muted`,children:t.projectSwitcher.noMatches}):null,P.map(e=>H(e,!1))]}),(0,$.jsxs)(`div`,{className:`mt-1 border-t border-edge-subtle pt-1`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm text-fg hover:bg-surface-hover`,onClick:()=>L(`new`),children:[(0,$.jsx)(K,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:t.projectSwitcher.newProject})]}),(0,$.jsxs)(`button`,{type:`button`,className:`flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm text-fg hover:bg-surface-hover`,onClick:()=>L(`directory`),children:[(0,$.jsx)(Ht,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:t.projectSwitcher.openDirectory})]}),(0,$.jsxs)(`button`,{type:`button`,className:`flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm text-fg hover:bg-surface-hover`,onClick:()=>{s(!1),a(`/projects`)},children:[(0,$.jsx)(Xt,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:t.projectSwitcher.manageProjects})]})]})]})})]}),(0,$.jsx)(be,{open:_,onOpenChange:e=>!T&&v(e),children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(32rem,calc(100vh-2rem))] w-[min(40rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`shrink-0 border-b border-edge px-5 py-4`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:y===`directory`?t.projectSwitcher.createFromDirectoryTitle:n.createTitle}),(0,$.jsx)(he,{className:`mt-1 text-sm text-fg-muted`,children:y===`directory`?t.projectSwitcher.createFromDirectoryDescription:n.createDescription})]}),(0,$.jsxs)(`form`,{onSubmit:z,className:`flex min-h-0 flex-1 flex-col`,children:[(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-5 py-4`,children:[k?(0,$.jsx)(`div`,{className:`rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:k}):null,(0,$.jsxs)(`label`,{className:`grid gap-1.5 text-sm`,children:[(0,$.jsx)(`span`,{className:`font-medium text-fg-muted`,children:n.projectName}),(0,$.jsx)(`input`,{className:`min-h-10 rounded-md border border-edge bg-surface-base px-3 text-sm text-fg outline-none placeholder:text-fg-muted focus:border-accent`,value:x,onChange:e=>S(e.target.value),placeholder:`xopc`})]}),(0,$.jsxs)(`div`,{className:`grid gap-1.5 text-sm`,children:[(0,$.jsx)(`span`,{className:`font-medium text-fg-muted`,children:n.workspaceRoot}),(0,$.jsx)(bn,{value:C,onChange:V,disabled:T,wd:r,placeholder:n.workspacePlaceholder,inputClassName:`min-h-10 rounded-md border border-edge bg-surface-base px-3 text-sm text-fg outline-none placeholder:text-fg-muted focus:border-accent`}),(0,$.jsx)(`p`,{className:`text-xs text-fg-subtle`,children:n.workspaceHint})]}),(0,$.jsx)($e,{checked:D,onChange:O,disabled:T})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg`,disabled:T,children:n.cancel})}),(0,$.jsxs)(Y,{type:`submit`,variant:`primary`,className:`rounded-lg`,disabled:T||!(x.trim()||y===`directory`&&Ai(C)),children:[(0,$.jsx)(K,{className:`size-4`,"aria-hidden":!0}),n.create]})]})]})]})]})}),(0,$.jsx)(be,{open:!!j,onOpenChange:e=>{e||M(null)},children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-[100] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[110] flex w-[min(30rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`border-b border-edge px-5 py-4`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:n.workspaceMissingTitle}),(0,$.jsx)(he,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:j?Si(n.workspaceMissingDescription,{workspace:j}):null})]}),j?(0,$.jsx)(`div`,{className:`px-5 py-4`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-surface-inset px-3 py-2 text-sm text-fg-muted`,children:[(0,$.jsx)(Ht,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:j})]})}):null,(0,$.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg`,onClick:ee,disabled:T,children:n.workspaceMissingBack}),(0,$.jsxs)(Y,{type:`button`,variant:`primary`,className:`rounded-lg`,onClick:B,disabled:T,children:[(0,$.jsx)(jt,{className:`size-4`,"aria-hidden":!0}),n.workspaceMissingCreate]})]})]})]})})]})}function Vi(){let{projectId:e=``,tabId:t,noteId:n}=o(),r=i(),[c]=a(),l=de(e=>e.language),u=ce(l),p=u.chat.workingDirectory,h=u.projectDetailPage,g=u.projectsPage,v=ln(e=>e.setPageHeader),y=ln(e=>e.clearPageHeader),[E,D]=(0,Q.useState)(null),P=(0,Q.useRef)(E);(0,Q.useLayoutEffect)(()=>{P.current=E},[E]);let[F,I]=(0,Q.useState)(null),[L,R]=(0,Q.useState)([]),[z,B]=(0,Q.useState)(``),[ee,V]=(0,Q.useState)([]),[H,re]=(0,Q.useState)(0),[ie,J]=(0,Q.useState)(!1),[le,ue]=(0,Q.useState)(!1),[fe,me]=(0,Q.useState)(!1),[we,Oe]=(0,Q.useState)([]),[ke,Ae]=(0,Q.useState)(null),je=(0,Q.useRef)(new Set),[Me,Ne]=(0,Q.useState)(null),[Pe,Ve]=(0,Q.useState)(null),[Ue,We]=(0,Q.useState)(null),[Ke,qe]=(0,Q.useState)(yi),[Ze,Qe]=(0,Q.useState)(!1),[$e,tt]=(0,Q.useState)(!1),[rt,st]=(0,Q.useState)(``),[lt,ft]=(0,Q.useState)([]),[gt,yt]=(0,Q.useState)(!1),[xt,wt]=(0,Q.useState)(null),[Tt,Et]=(0,Q.useState)(!1),[At,Nt]=(0,Q.useState)(null),[Pt,Ft]=(0,Q.useState)([]),[It,zt]=(0,Q.useState)(``),[Bt,Ut]=(0,Q.useState)(!0),[Wt,Gt]=(0,Q.useState)(!1),[qt,Jt]=(0,Q.useState)(!1),[Yt,Zt]=(0,Q.useState)(null),[Qt,en]=(0,Q.useState)(!1),[nn,rn]=(0,Q.useState)(`fixed`),[on,cn]=(0,Q.useState)(``),[dn,fn]=(0,Q.useState)(null),[mn,hn]=(0,Q.useState)(!1),[_n,xn]=(0,Q.useState)(!1),[Sn,Cn]=(0,Q.useState)(!1),[wn,En]=(0,Q.useState)(null),Dn=(0,Q.useRef)(null),On=(0,Q.useRef)(!1),[An,X]=(0,Q.useState)(null),[jn,Mn]=(0,Q.useState)({title:``,reason:``}),[Nn,Pn]=(0,Q.useState)({name:``,description:``,status:`active`,defaultAgentId:``,executionMode:`local_checkout`,workspaceRoot:``,brief:``,instructions:``}),Fn=(0,Q.useRef)(Nn),In=`overview`,Z=n?`notes`:xi(t)?t:In,Ln=(0,Q.useMemo)(()=>N(c.get(`returnTo`),`/projects`,[`/chat`]),[c]),Rn=(0,Q.useCallback)(t=>{if(!e)return`/projects`;let n=`/projects/${encodeURIComponent(e)}/${t}`;return Ln===`/projects`?n:j(n,Ln)},[Ln,e]),zn=(0,Q.useCallback)(t=>{e&&r(Rn(t))},[r,e,Rn]),Bn=(0,Q.useCallback)(()=>{if(Z===`tasks`&&Dn.current){Dn.current.openCreate();return}On.current=!0,zn(`tasks`)},[zn,Z]);(0,Q.useEffect)(()=>{Z!==`tasks`||!On.current||(On.current=!1,Dn.current?.openCreate())},[Z]);let Vn=(0,Q.useCallback)(t=>{e&&r(Rn(t),{replace:!0})},[r,e,Rn]),Hn=(0,Q.useCallback)(e=>t=>{t.defaultPrevented||t.button!==0||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||Vn(e)},[Vn]),Un=(0,Q.useCallback)(e=>e.startsWith(`/chat/`)?`sessions`:e.startsWith(`/notes`)?`notes`:Z,[Z]);(0,Q.useEffect)(()=>{!e||!t||xi(t)||r(Rn(In),{replace:!0})},[In,r,e,Rn,t]),(0,Q.useEffect)(()=>{if(!e)return;let t=!1;return Ut(!0),X(null),Promise.all([vt(e),ct(e),ot(e),De().catch(()=>null),tn(e).catch(()=>null)]).then(([e,n,r,i,a])=>{if(t)return;D(e),I(n),R(r),Ae(a),Ft(i?.agents??[]),zt(e.defaultAgentId??``);let o=jr(e);Fn.current=o,Pn(o)}).catch(e=>{t||(Ae(null),X(e instanceof Error?e.message:String(e)))}).finally(()=>{t||Ut(!1)}),()=>{t=!0}},[e]);let Wn=(0,Q.useCallback)(async()=>{e&&I(await ct(e))},[e]);(0,Q.useEffect)(()=>{if(Bt)return;let t=!0,n=0,r=r=>{let i=r.detail?.id;if(!e||i&&i!==e)return;let a=++n;Promise.all([vt(e),ct(e)]).then(([e,r])=>{if(!t||n!==a)return;let i=P.current;if(!(i?.id===e.id&&i.version>e.version)){if(i?.id===e.id){let t=Mr(Fn.current,i,e);Fn.current=t,Pn(t)}P.current=e,D(e),I(r)}}).catch(e=>{!t||n!==a||e instanceof Error&&`status`in e&&e.status===404&&(D(null),I(null),X(e.message))})};return window.addEventListener(`project-resource-changed`,r),r(new Event(`project-resource-changed`)),()=>{t=!1,window.removeEventListener(`project-resource-changed`,r)}},[e,Bt]),(0,Q.useEffect)(()=>{let t,n=n=>{let r=Se.safeParse(n.detail);!r.success||r.data.projectId!==e||(window.clearTimeout(t),t=window.setTimeout(()=>void Wn(),120))},r=n=>{let r=xe.safeParse(n.detail);!r.success||r.data.projectId!==e||(window.clearTimeout(t),t=window.setTimeout(()=>void Wn(),120))};return window.addEventListener(`task-changed-v2`,n),window.addEventListener(`task-deleted-v1`,r),()=>{window.clearTimeout(t),window.removeEventListener(`task-changed-v2`,n),window.removeEventListener(`task-deleted-v1`,r)}},[e,Wn]);let Gn=(0,Q.useCallback)(async(e,t)=>{En(e.id),X(null);try{let n=await C(e.id),r=t.startsWith(`move_`)?{type:`move`,phase:t.slice(5)}:t.startsWith(`reopen_`)?{type:`reopen`,phase:t.slice(7)}:t===`ready`?{type:`mark_ready`}:t===`run`?{type:`start`,executor:{kind:`agent`,agentId:n.task.delegateAgentId??(await k(e.id)).agentId}}:t===`pause`?{type:`add_wait`,wait:{kind:`paused`,reason:`Paused by user`,condition:{}}}:t===`review`?{type:`request_review`}:t===`complete`?{type:`close`,resolution:`done`}:t===`reopen`?{type:`reopen`,phase:`ready`}:{type:`resolve_wait`,waitId:n.waits[0]?.id??``};if(r.type===`resolve_wait`&&!r.waitId)throw Error(`No active wait to resolve`);return await T(e.id,r,n.task.version),await Wn(),!0}catch(e){return await Wn().catch(()=>void 0),X(e instanceof Error?e.message:h.board.actionFailed),!1}finally{En(null)}},[F,h.board.actionFailed,Wn]),Kn=(0,Q.useCallback)(async t=>{e&&(X(null),await w({idempotencyKey:t.requestId,title:t.objective,projectId:e,priority:t.priority,dueAt:t.dueAt,locale:l,contract:{objective:t.objective,expectedOutputs:[],acceptanceCriteria:[],constraints:[],approvalRequired:[],assumptions:[],risks:[],acceptancePolicy:`manual`,outputDestinations:[]},dependencies:t.dependsOnTaskIds,context:t.attachments.map((e,t)=>({targetKind:`file`,targetId:e.uri??e.name??`attachment-${t+1}`,role:`input`,title:e.name,pinned:!0,retrievalPolicy:{},metadata:{mimeType:e.mimeType,size:e.size,data:e.data}})),authorityGrants:[],activation:{mode:`capture`,phase:`backlog`}}),await Wn())},[l,e,Wn]),qn=(0,Q.useCallback)(async(e,t)=>{En(e),X(null);try{return await b(e,t,(await C(e)).task.version),await Wn(),!0}catch(e){return await Wn().catch(()=>void 0),X(e instanceof Error?e.message:h.board.actionFailed),!1}finally{En(null)}},[h.board.actionFailed,Wn]),Jn=(0,Q.useCallback)(async(e,t,n)=>{En(e),X(null);try{let r=await C(e);return r.task.phase!==t&&(r=await T(e,r.task.phase===`closed`?{type:`reopen`,phase:t===`closed`?`ready`:t}:t===`closed`?{type:`close`,resolution:`done`}:{type:`move`,phase:t},r.task.version)),await b(e,n,r.task.version),await Wn(),!0}catch(e){return await Wn().catch(()=>void 0),X(e instanceof Error?e.message:h.board.actionFailed),!1}finally{En(null)}},[h.board.actionFailed,Wn]),Yn=(0,Q.useCallback)(async(e,t)=>{En(e),X(null);try{await x(e,t,(await C(e)).task.version),await Wn()}catch(e){await Wn().catch(()=>void 0),X(e instanceof Error?e.message:h.board.actionFailed)}finally{En(null)}},[h.board.actionFailed,Wn]),Xn=(0,Q.useCallback)(async()=>{if(E){J(!0),X(null);try{let e=await St(E.id,{includeRelated:le,limit:100});V(e.items),re(e.total)}catch(e){X(e instanceof Error?e.message:String(e))}finally{J(!1)}}},[E,le]);(0,Q.useEffect)(()=>{Z===`progress`&&Xn()},[Xn,Z]);let Zn=(0,Q.useCallback)(async()=>{if(!E?.effectiveWorkspaceRoot?.trim()){Oe([]),je.current.clear(),Nt(null);return}Et(!0),Nt(null),je.current.clear();try{Oe(Ri((await et(E.id,``)).entries)),je.current.add(``)}catch(e){Oe([]),je.current.clear(),Nt(e instanceof Error?e.message:String(e))}finally{Et(!1)}},[E]),Qn=(0,Q.useCallback)(async e=>{if(!(!E?.effectiveWorkspaceRoot?.trim()||je.current.has(e))){je.current.add(e),Nt(null);try{let t=await et(E.id,e);Oe(n=>zi(n,e,Ri(t.entries)))}catch(t){je.current.delete(e),Nt(t instanceof Error?t.message:String(t))}}},[E]),$n=(0,Q.useCallback)(async e=>{if(!E?.effectiveWorkspaceRoot?.trim())return;let t=Ri((await et(E.id,e)).entries);Oe(e?n=>zi(n,e,t):t),je.current.add(e)},[E]);(0,Q.useEffect)(()=>{Z===`files`&&Zn()},[Zn,Z]);let er=rt.trim();(0,Q.useEffect)(()=>{if(Z!==`files`||!E||!$e||!er){ft([]),yt(!1),wt(null);return}let e=!1;yt(!0),wt(null),ft([]);let t=window.setTimeout(()=>{He(E.id,er,50).then(t=>{e||ft(t)}).catch(t=>{e||wt(t instanceof Error?t.message:String(t))}).finally(()=>{e||yt(!1)})},180);return()=>{e=!0,window.clearTimeout(t)}},[er,E,$e,Z]);let tr=(0,Q.useCallback)(async()=>{if(!E)return;let[e,t]=await Promise.all([vt(E.id),ct(E.id)]);I(t),D(e)},[E]),nr=(0,Q.useCallback)(async e=>{if(e.preventDefault(),!(!E||!jn.title.trim())){xn(!0),X(null);try{await bt(E.id,{title:jn.title.trim(),reason:jn.reason.trim()||void 0}),Mn({title:``,reason:``}),Cn(!1),await tr()}catch(e){X(e instanceof Error?e.message:String(e))}finally{xn(!1)}}},[jn.reason,jn.title,E,tr]),rr=(0,Q.useMemo)(()=>(0,$.jsx)(s,{to:Ln,className:`inline-flex size-9 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg`,"aria-label":Ln===`/projects`?h.backToProjects:u.sidebar.back,children:(0,$.jsx)(un,{className:`size-4`,"aria-hidden":!0})}),[Ln,u.sidebar.back,h.backToProjects]),ir=(0,Q.useMemo)(()=>E?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(kn,{resource:{kind:`project`,id:E.id,revision:String(E.version)},disabled:Wt||_i(Nn,E)}),(0,$.jsx)(vr,{projectId:E.id},E.id),(0,$.jsxs)(Y,{variant:`secondary`,className:`h-9 rounded-lg`,onClick:Bn,children:[(0,$.jsx)(K,{className:`size-4`,"aria-hidden":!0}),h.board.create]}),(0,$.jsx)(Y,{asChild:!0,variant:`primary`,className:`h-9 rounded-lg`,children:(0,$.jsxs)(s,{to:O(E.id),state:{forceNewChat:!0,agentId:E.defaultAgentId},onClick:Hn(`sessions`),children:[(0,$.jsx)(G,{className:`size-4`,"aria-hidden":!0}),h.common.newChat]})})]}):null,[Bn,Hn,h.board.create,h.common.newChat,E,Wt,Nn]);(0,Q.useLayoutEffect)(()=>(v({startExtra:rr,main:E?(0,$.jsx)(Bi,{currentProject:E,pm:h,projectsText:g,wd:p}):(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:h.fallbackTitle}),(0,$.jsx)(`p`,{className:`truncate text-xs text-fg-muted`,children:h.fallbackContext})]}),end:ir}),()=>y()),[y,ir,rr,h,E,g,v,p]);function ar(e){D(t=>t?{...t,...e}:null),zt(e.defaultAgentId??``),tn(e.id).then(Ae).catch(()=>Ae(null)),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:e.id}}))}async function or(e=Fn.current){if(!(!E||!_i(e,E))){X(null),Zt(null);try{let t=await an(E.id,{name:e.name.trim(),status:e.status,description:e.description,defaultAgentId:e.defaultAgentId,executionMode:e.executionMode,brief:e.brief,instructions:e.instructions},E.version);ar(t);let n=Fn.current,r={...n,name:n.name===e.name?t.name:n.name,description:n.description===e.description?t.description??``:n.description,status:n.status===e.status?t.status:n.status,defaultAgentId:n.defaultAgentId===e.defaultAgentId?t.defaultAgentId??``:n.defaultAgentId,executionMode:n.executionMode===e.executionMode?t.executionMode:n.executionMode,brief:n.brief===e.brief?t.brief??``:n.brief,instructions:n.instructions===e.instructions?t.instructions??``:n.instructions};Fn.current=r,Pn(r)}catch(e){let t=ji(e);throw t?Zt(t):X(e instanceof Error?e.message:String(e)),e}}}function sr(e){e.preventDefault(),Tr.flush()}function cr(e,t=!1){let n={...Fn.current,...e};Fn.current=n,Pn(n),t&&Tr.saveNow(n)}let lr=(0,Q.useCallback)(()=>{if(!E)return;let e=E.workspaceRoot?.trim()??``;rn(e?`fixed`:`follow`),cn(e||E.effectiveWorkspaceRoot||``),en(!0)},[E]);async function ur(e={}){if(!E)return;let t=nn===`fixed`?on.trim():``;if(!(nn===`fixed`&&!t)){Gt(!0),X(null),Zt(null);try{let n=await an(E.id,{workspaceRoot:t,...e.createWorkspaceRoot?{createWorkspaceRoot:!0}:{}},E.version);ar(n),cr({workspaceRoot:n.workspaceRoot??``}),en(!1),Zt(null)}catch(e){let t=ji(e);t?(Zt(t),en(!1)):X(e instanceof Error?e.message:String(e))}finally{Gt(!1)}}}async function dr(){if(!(!E||dn)){fn(`pin`),X(null);try{ar(E.pinnedAt?await Rt(E.id,E.version):await Ct(E.id,E.version))}catch(e){X(e instanceof Error?e.message:String(e))}finally{fn(null)}}}async function fr(){if(!(!E||dn)){fn(`archive`),X(null);try{let e=E.status===`archived`?await Ot(E.id,E.version):await gn(E.id,E.version);ar(e),cr({status:e.status})}catch(e){X(e instanceof Error?e.message:String(e))}finally{fn(null)}}}async function pr(){if(E){hn(!0),X(null);try{await nt(E.id,E.version),Jt(!1),r(`/projects`)}catch(e){X(e instanceof Error?e.message:String(e))}finally{hn(!1)}}}async function mr(){if(!(!E||fe)){me(!0),X(null);try{await mt(E.id)}catch(e){X(e instanceof Error?e.message:String(e))}finally{me(!1)}}}let hr=(0,Q.useCallback)(e=>{Ne(e)},[]),_r=(0,Q.useCallback)((e,t)=>{t||Ne(e)},[]),yr=(0,Q.useCallback)(async(e,t,n)=>{let r=E?.id;if(r)switch(e){case`preview`:t.isDirectory||Ne(t.path);break;case`download`:if(t.isDirectory)return;try{let e=te(t.path);if(ne(W(e))!==`text`){let n=await Fe(t.path,{projectId:r}),i=Ee(e)??`application/octet-stream`;Le(e,await n.arrayBuffer(),i)}else{let{content:n}=await Ie(t.path,{projectId:r});ze(e,n)}}catch(e){U(`warning`,e instanceof Error?e.message:String(e),void 0,{duration:4e3})}break;case`copyPath`:try{await Ce(t.path)&&U(`success`,u.workspace.pathCopied,void 0,{duration:2500})}catch{U(`warning`,u.clipboard.copyFailed,void 0,{duration:4e3})}break;case`openDefault`:await Xe(()=>window.electronAPI?.shell?.openFileResource?.(t.fileId),u.workspace.openFileFailed);break;case`openWith`:await Xe(()=>window.electronAPI?.shell?.chooseAppAndOpenFileResource?.(t.fileId),u.workspace.openFileFailed);break;case`openWithApp`:if(!n)return;await Xe(()=>window.electronAPI?.shell?.openFileResourceWithApp?.(t.fileId,n),u.workspace.openFileFailed);break;case`revealInFolder`:await Xe(()=>window.electronAPI?.shell?.showFileResourceInFolder?.(t.fileId),u.workspace.revealFileFailed);break;case`trash`:Ve(t);break;case`delete`:t.isDirectory||We(t);break;default:break}},[u.clipboard.copyFailed,u.workspace.openFileFailed,u.workspace.pathCopied,u.workspace.revealFileFailed,E?.id]),br=(0,Q.useCallback)(async()=>{let e=Pe;if(!e)return;let t=await window.electronAPI?.shell?.trashFileResource?.(e.fileId);if(!t?.ok){U(`warning`,t?.error??u.workspace.trashFailed,void 0,{duration:4e3});return}Me===e.path&&Ne(null),Ve(null),await Zn(),U(`success`,u.workspace.trashSuccess,void 0,{duration:2500})},[u.workspace.trashFailed,u.workspace.trashSuccess,Pe,Me,Zn]),xr=(0,Q.useCallback)(async(e,t)=>{let n=E?.id;if(n)try{await Promise.all(e.map(e=>Re(e,t,{projectId:n}))),await $n(t).catch(()=>void 0),U(`success`,u.workspace.uploadSuccess.replace(`{{count}}`,String(e.length)),void 0,{duration:2500})}catch(e){await $n(t).catch(()=>void 0),U(`warning`,`${u.workspace.uploadFailed}: ${e instanceof Error?e.message:String(e)}`,void 0,{duration:4e3})}},[u.workspace.uploadFailed,u.workspace.uploadSuccess,E?.id,$n]),Sr=(0,Q.useCallback)(async()=>{let e=Ue;if(e)try{await Be(e.fileId),Me===e.path&&Ne(null),We(null);let t=e.path.lastIndexOf(`/`);await $n(t<0?``:e.path.slice(0,t)).catch(()=>void 0),U(`success`,u.workspace.deleteSuccess,void 0,{duration:2500})}catch(e){U(`warning`,`${u.workspace.deleteFailed}: ${e instanceof Error?e.message:String(e)}`,void 0,{duration:4e3})}},[u.workspace.deleteFailed,u.workspace.deleteSuccess,Ue,Me,$n]),Cr=(0,Q.useCallback)(e=>{if(!window.matchMedia(`(min-width: 1024px)`).matches)return;e.preventDefault();let t=e.currentTarget,n=t.closest(`[data-project-files-grid]`);if(!n)return;t.setPointerCapture(e.pointerId),Qe(!0);let r=e.clientX,i=Ke,a=e.pointerId,o=0,s=i,c=i,l=()=>{o=0,c=s,n.style.setProperty(`--project-files-panel-width`,`${c}px`)},u=e=>{s=vi(i+(e.clientX-r)),o===0&&(o=window.requestAnimationFrame(l))},d=()=>{o!==0&&(window.cancelAnimationFrame(o),l());try{t.releasePointerCapture(a)}catch{}Qe(!1),qe(c),bi(c),window.removeEventListener(`pointermove`,u),window.removeEventListener(`pointerup`,d),window.removeEventListener(`pointercancel`,d)};window.addEventListener(`pointermove`,u),window.addEventListener(`pointerup`,d),window.addEventListener(`pointercancel`,d)},[Ke]);(0,Q.useEffect)(()=>{Z!==`files`&&Ne(null)},[e,Z]);let wr=!!(E&&_i(Nn,E)),Tr=yn({value:E?Nn:null,dirty:wr,onSave:or,validate:e=>e.name.trim()?null:h.settings.nameRequired});if(Bt)return(0,$.jsx)(`main`,{className:`w-full flex-1 p-3 text-sm text-fg-muted sm:px-5 sm:py-4 xl:px-6`,children:h.loading});if(!E)return(0,$.jsxs)(`main`,{className:`w-full flex-1 p-3 sm:px-5 sm:py-4 xl:px-6`,children:[(0,$.jsxs)(s,{to:Ln,className:`inline-flex items-center gap-2 text-sm text-accent-fg hover:underline`,children:[(0,$.jsx)(un,{className:`size-4`,"aria-hidden":!0}),Ln===`/projects`?h.backToProjects:u.sidebar.back]}),(0,$.jsx)(`p`,{className:`mt-6 rounded-lg bg-surface-panel p-4 shadow-surface text-sm text-fg-muted`,children:An||h.notFound})]});let Dr=L.slice(0,3),Or=F?.blockers??[],kr=Ir(F?.tasks??[]),Ar=F?.tasks.filter(e=>[`queued`,`running`,`waiting`,`verifying`].includes(e.operationalState)).length??0,Nr=e=>h.statuses[e]??e,Pr=e=>Si(h.common.messages,{count:e}),Fr=z.trim().toLowerCase(),Lr=Fr?L.filter(e=>{let t=Ci(e.updatedAt),n=e.routing?.agentId||e.agentId||h.common.agent,r=e.name?.trim()||h.sessions.fallbackTitle,i=Pr(e.messageCount??0),a=Fi(e);return[r,e.key,n,a,t,i].filter(Boolean).join(` `).toLowerCase().includes(Fr)}):L,Rr=L.length>0&&Lr.length===0,zr=Pt.find(e=>e.id===E.defaultAgentId)?.name||E.defaultAgentId||h.settings.globalDefaultAgent,Br=Pt.find(e=>e.id===Nn.defaultAgentId),Vr=E.workspaceRoot?.trim()||``,Hr=E.status===`archived`,Ur=!!E.pinnedAt,Wr=!Vr,Gr=Vr||Br?.workspace||E.effectiveWorkspaceRoot||h.common.defaultWorkspace,Kr=nn===`fixed`?on.trim()||h.settings.workspacePlaceholder:Br?.workspace||E.effectiveWorkspaceRoot||h.common.defaultWorkspace,qr=(nn===`fixed`?on.trim():``)!==Vr&&(nn===`follow`||!!on.trim()),Jr=[{id:`overview`,icon:kt,label:h.tabs.overview},{id:`tasks`,icon:ut,label:h.tabs.tasks},{id:`automations`,icon:ht,label:h.tabs.automations},{id:`files`,icon:Ht,label:h.tabs.files},{id:`notes`,icon:S,label:h.tabs.notes},{id:`skills`,icon:Dt,label:h.tabs.skills},{id:`sessions`,icon:G,label:h.tabs.sessions},{id:`progress`,icon:Lt,label:h.tabs.progress}];async function Yr(){if(!Gr)return;let e=await Ce(Gr);U(e?`success`:`warning`,e?u.workspace.pathCopied:u.clipboard.copyFailed,void 0,{duration:e?2500:4e3})}function Xr(){Zt(null),en(!0)}return(0,$.jsxs)(`main`,{className:`flex h-full min-h-0 w-full flex-1 flex-col overflow-hidden p-3 sm:px-5 sm:py-4 xl:px-6`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3`,children:[(0,$.jsx)(Ye,{items:Jr,activeTab:Z,onChange:zn,ariaLabel:h.navAria,tabIdPrefix:`project-primary-tab`,className:`min-w-0 flex-1`}),(0,$.jsxs)(Y,{id:`project-primary-tab-settings`,type:`button`,variant:Z===`settings`?`secondary`:`ghost`,className:`h-9 shrink-0 rounded-lg px-3`,"aria-current":Z===`settings`?`page`:void 0,onClick:()=>zn(`settings`),children:[(0,$.jsx)(Xt,{className:`size-4`,"aria-hidden":!0}),h.tabs.settings,wr?(0,$.jsx)(`span`,{className:`size-1.5 rounded-full bg-amber-500`,"aria-label":h.settings.unsavedChanges}):null]})]}),An?(0,$.jsx)(`p`,{className:`mt-3 shrink-0 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:An}):null,(0,$.jsxs)(`div`,{className:q(`mt-3 min-h-0 flex-1`,Z===`overview`?`overflow-y-auto pr-1 [scrollbar-gutter:stable] xl:overflow-hidden xl:pr-0`:Z===`tasks`?`overflow-hidden`:`overflow-y-auto pr-1 [scrollbar-gutter:stable]`),children:[Z===`overview`?(0,$.jsxs)(`section`,{id:`project-panel-overview`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-overview`,className:`grid min-h-full gap-4 xl:h-full xl:min-h-0 xl:grid-cols-[minmax(0,1fr)_20rem] xl:overflow-hidden`,children:[(0,$.jsxs)(`div`,{className:`grid min-w-0 content-start gap-4 xl:min-h-0 xl:overflow-y-auto xl:pr-1 xl:[scrollbar-gutter:stable]`,children:[(0,$.jsx)(at,{projectId:E.id},E.id),(0,$.jsxs)(`div`,{className:`min-w-0 overflow-hidden rounded-xl bg-surface-panel shadow-surface`,children:[(0,$.jsx)(`div`,{className:`p-5`,children:(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.overview.directionTitle}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:Si(h.overview.activitySummary,{moving:Ar,attention:Or.length})})]}),(0,$.jsx)(`p`,{className:`mt-2 max-w-3xl text-base font-medium leading-7 text-fg`,children:E.outcome||E.description||E.brief||h.overview.directionFallback}),F?.digest.recommendedAction?(0,$.jsx)(`p`,{className:`mt-3 max-w-3xl rounded-lg bg-surface-hover px-3 py-2.5 text-sm font-medium leading-6 text-fg`,children:Si(h.overview.recommendedNext,{action:F.digest.recommendedAction})}):null]}),(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 shrink-0 rounded-lg px-2 text-xs`,onClick:()=>void mr(),disabled:fe,children:[(0,$.jsx)($t,{className:`size-3.5`,"aria-hidden":!0}),fe?h.overview.savingDigest:h.overview.saveDigest]})]})}),(0,$.jsxs)(`div`,{className:`border-t border-edge-subtle`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-5 py-3.5`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.overview.nextActions}),(0,$.jsx)(`button`,{type:`button`,className:`text-xs font-medium text-fg-muted transition-colors hover:text-fg`,onClick:()=>zn(`tasks`),children:h.common.viewAll})]}),(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle border-t border-edge-subtle`,children:kr.length?kr.map(e=>(0,$.jsxs)(s,{to:A(Rn(`overview`),e.id),className:`block px-5 py-3 transition-colors hover:bg-surface-hover`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-fg`,children:e.title}),(0,$.jsxs)(`span`,{className:q(`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium`,e.attention.length?`bg-warning/10 text-warning`:`bg-surface-hover text-fg-muted`),children:[h.board.phases[e.phase],e.operationalState===`idle`?``:` · ${h.board.operationalStates[e.operationalState]}`]})]}),e.attention[0]?(0,$.jsx)(`p`,{className:`mt-1 line-clamp-2 text-sm leading-5 text-fg-muted`,children:e.attention[0].summary}):null]},e.id)):(0,$.jsx)(`div`,{className:`px-4 py-6 text-sm text-fg-muted`,children:h.overview.noNextActions})})]})]}),F?.recentResults.length?(0,$.jsxs)(`div`,{className:`min-w-0 overflow-hidden rounded-xl bg-surface-panel`,children:[(0,$.jsx)(`div`,{className:`border-b border-edge-subtle px-5 py-3.5`,children:(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.overview.recentResults})}),(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:F.recentResults.slice(0,3).map(({taskId:e,taskTitle:t,receipt:n})=>(0,$.jsxs)(s,{to:A(Rn(`overview`),e),className:`block px-5 py-3 transition-colors hover:bg-surface-hover`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-fg`,children:t}),(0,$.jsxs)(`span`,{className:`shrink-0 rounded-full bg-surface-hover px-2 py-0.5 text-xs text-fg-muted`,children:[h.overview.resultStatuses[n.status],` · `,h.board.verification[n.verification.status]]})]}),(0,$.jsx)(`div`,{className:`mt-1 line-clamp-3 text-sm leading-5 text-fg-muted`,children:(0,$.jsx)(M,{content:n.summary,compact:!0})})]},n.runId))})]}):null,E.milestones.length||E.recentUpdates.length?(0,$.jsxs)(`div`,{className:`grid min-w-0 gap-4 md:grid-cols-2`,children:[E.milestones.length?(0,$.jsxs)(`div`,{className:`overflow-hidden rounded-xl bg-surface-panel`,children:[(0,$.jsx)(`div`,{className:`border-b border-edge-subtle px-5 py-3.5`,children:(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.overview.milestones})}),(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:E.milestones.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-5 py-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-fg`,children:e.title}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted`,children:h.statuses[e.status]})]},e.id))})]}):null,E.recentUpdates.length?(0,$.jsxs)(`div`,{className:`overflow-hidden rounded-xl bg-surface-panel`,children:[(0,$.jsx)(`div`,{className:`border-b border-edge-subtle px-5 py-3.5`,children:(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.overview.projectUpdates})}),(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:E.recentUpdates.slice(0,3).map(e=>(0,$.jsxs)(`div`,{className:`px-5 py-3`,children:[(0,$.jsx)(`p`,{className:`text-sm leading-5 text-fg`,children:e.summary}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:h.overview.healthLabels[e.health]})]},e.id))})]}):null]}):null]}),(0,$.jsxs)(`aside`,{className:`grid min-w-0 content-start gap-4 xl:min-h-0 xl:overflow-y-auto xl:pr-1 xl:[scrollbar-gutter:stable]`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 rounded-xl bg-surface-panel p-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.overview.attention}),(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-8 shrink-0 rounded-lg px-2 text-xs`,"aria-expanded":Sn,onClick:()=>Cn(e=>!e),children:[(0,$.jsx)(K,{className:q(`size-3.5 transition-transform`,Sn&&`rotate-45`),"aria-hidden":!0}),h.overview.addBlocker]})]}),Or.length?(0,$.jsx)(`div`,{className:`mt-3 grid gap-3`,children:Or.map(e=>{let t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(m,{className:`size-4 text-amber-600 dark:text-amber-300`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-fg`,children:e.title})]}),(0,$.jsxs)(`p`,{className:`mt-1 line-clamp-2 text-xs leading-5 text-fg-muted`,children:[h.overview.attentionKinds[e.kind]??e.kind,e.detail?` · ${e.detail}`:e.status?` · ${Nr(e.status)}`:``]})]});return e.href?(0,$.jsx)(s,{to:e.href,onClick:Hn(Un(e.href)),className:`min-w-0 rounded-md bg-surface-base p-3 hover:bg-surface-hover`,children:t},e.id):(0,$.jsx)(`div`,{className:`min-w-0 rounded-md bg-surface-base p-3`,children:t},e.id)})}):(0,$.jsx)(`p`,{className:`mt-2 text-sm text-fg-muted`,children:h.overview.noBlockedTasks}),Sn?(0,$.jsxs)(`form`,{onSubmit:nr,className:`mt-4 flex gap-2 border-t border-edge-subtle pt-4`,children:[(0,$.jsx)(`input`,{className:`min-h-9 min-w-0 flex-1 rounded-md border border-edge bg-surface-base px-3 text-sm text-fg outline-none focus:border-accent`,value:jn.title,onChange:e=>Mn(t=>({...t,title:e.target.value})),placeholder:h.overview.blockerTitlePlaceholder}),(0,$.jsx)(Y,{type:`submit`,variant:`secondary`,className:`shrink-0 rounded-lg px-3`,disabled:_n||!jn.title.trim(),"aria-label":_n?h.overview.addingBlocker:h.overview.addBlocker,title:_n?h.overview.addingBlocker:h.overview.addBlocker,children:(0,$.jsx)(K,{className:`size-4`,"aria-hidden":!0})})]}):null]}),(0,$.jsxs)(`div`,{className:`min-w-0 overflow-hidden rounded-xl bg-surface-panel`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-edge-subtle px-4 py-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(it,{className:`size-4 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`h2`,{className:`min-w-0 truncate text-sm font-semibold text-fg`,children:h.overview.recentSessions})]}),(0,$.jsx)(`button`,{type:`button`,className:`shrink-0 text-xs font-medium text-accent-fg hover:underline`,onClick:()=>zn(`sessions`),children:h.common.viewAll})]}),(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:Dr.length?Dr.map(e=>(0,$.jsxs)(s,{to:`/chat/${encodeURIComponent(e.key)}`,onClick:Hn(`sessions`),className:`block px-4 py-3 hover:bg-surface-hover`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-fg`,children:e.name||e.key}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-subtle`,children:Ci(e.updatedAt)})]}),(e.routing?.agentId||e.agentId)&&(e.routing?.agentId||e.agentId)!==E.defaultAgentId?(0,$.jsx)(`p`,{className:`mt-1 truncate text-xs text-fg-muted`,children:e.routing?.agentId||e.agentId}):null]},e.key)):(0,$.jsx)(`div`,{className:`px-4 py-6 text-sm text-fg-muted`,children:h.overview.noSessions})})]})]})]}):null,Z===`tasks`?(0,$.jsx)(di,{ref:Dn,tasks:F?.tasks??[],dependencyEdges:F?.dependencyEdges??[],returnTo:Rn(`tasks`),copy:h.board,onAction:Gn,onReorder:qn,onUndoMove:Jn,onDependenciesChange:Yn,onCreate:Kn,actionBusyId:wn}):null,Z===`automations`?(0,$.jsx)(`section`,{id:`project-panel-automations`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-automations`,className:`grid min-h-full content-start gap-4`,children:(0,$.jsx)(Tn,{projectId:E.id,embedded:!0,title:h.automations.title,subtitle:h.automations.hint})}):null,Z===`notes`?(0,$.jsx)(`section`,{id:`project-panel-notes`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-notes`,className:`flex h-full min-h-[28rem] overflow-hidden rounded-lg bg-surface-panel shadow-surface`,children:(0,$.jsx)(gr,{selectedNoteId:n,basePath:`/projects/${encodeURIComponent(E.id)}/notes`,showLibrary:!1,allowMediaCapture:!1,projectId:E.id,listTitle:h.notes.title,listDescription:h.notes.hint,emptyText:h.notes.emptyTitle,emptyDescription:h.notes.emptyDescription,listWidthStorageKey:`xopc.projectNotes.listWidth.${E.id}`})}):null,Z===`skills`?(0,$.jsx)(Er,{projectId:E.id,copy:h.skills}):null,Z===`files`?(0,$.jsx)(`section`,{id:`project-panel-files`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-files`,className:`flex h-full min-h-[28rem] flex-col`,children:(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl bg-surface-panel`,children:E.effectiveWorkspaceRoot?(0,$.jsxs)(`div`,{"data-project-files-grid":!0,className:q(`grid min-h-0 flex-1 grid-cols-1 overflow-hidden lg:grid-cols-[var(--project-files-panel-width)_8px_minmax(0,1fr)]`,Ze&&`cursor-col-resize select-none`),style:{"--project-files-panel-width":`${Ke}px`},children:[(0,$.jsxs)(`aside`,{className:`flex min-h-0 flex-col border-b border-edge bg-surface-panel lg:border-b-0`,children:[(0,$.jsxs)(`div`,{className:`flex h-11 items-center gap-1 bg-surface-hover/30 px-3 text-sm`,children:[ke?(0,$.jsx)(_t,{resourceId:ke.fileId,displayName:ke.name}):null,(0,$.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,$.jsx)(`button`,{type:`button`,className:q(`inline-flex size-7 shrink-0 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg`,$e&&`bg-surface-hover text-fg`),onClick:()=>tt(!0),"aria-label":h.files.search,title:h.files.search,"aria-pressed":$e,children:(0,$.jsx)(oe,{className:`size-3.5`,"aria-hidden":!0})}),(0,$.jsx)(Kt,{className:`size-7 shrink-0 rounded-md p-0`,loading:Tt,label:u.cron.refresh,onClick:()=>void Zn()})]})]}),$e?(0,$.jsx)(`div`,{className:`shrink-0 bg-surface-hover/20 px-3 py-2`,children:(0,$.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-md bg-surface-base px-2 focus-within:ring-2 focus-within:ring-accent/30`,children:[(0,$.jsx)(oe,{className:`size-3.5 shrink-0 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`input`,{type:`text`,role:`searchbox`,value:rt,onChange:e=>st(e.target.value),placeholder:h.files.searchPlaceholder,"aria-label":h.files.searchPlaceholder,className:`min-w-0 flex-1 bg-transparent text-xs text-fg outline-none placeholder:text-fg-subtle`}),(0,$.jsx)(`button`,{type:`button`,className:`flex size-6 shrink-0 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg`,"aria-label":h.files.clearSearch,title:h.files.clearSearch,onClick:()=>{st(``),tt(!1)},children:(0,$.jsx)(se,{className:`size-3.5`,"aria-hidden":!0})})]})}):null,At?(0,$.jsx)(`div`,{className:`bg-red-500/10 px-4 py-3 text-sm text-red-700 dark:text-red-300`,children:At}):null,er?(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto py-2`,children:gt?(0,$.jsxs)(`div`,{className:`space-y-2 px-3 py-1`,children:[(0,$.jsx)(Te,{className:`h-11 w-full`}),(0,$.jsx)(Te,{className:`h-11 w-full`}),(0,$.jsx)(Te,{className:`h-11 w-full`})]}):xt?(0,$.jsxs)(`p`,{className:`px-3 py-2 text-xs text-red-600 dark:text-red-400`,children:[u.workspace.loadError,`: `,xt]}):lt.length===0?(0,$.jsx)(`p`,{className:`px-3 py-2 text-xs text-fg-muted`,children:h.files.noSearchResults}):lt.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:q(`flex w-full min-w-0 items-center gap-2 px-3 py-2 text-left hover:bg-surface-hover`,Me===e.path&&`bg-accent-soft text-accent-fg`),onClick:()=>Ne(e.path),title:e.path,children:[(0,$.jsx)(S,{className:`size-4 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`span`,{className:`block truncate text-sm text-fg`,children:e.name}),(0,$.jsx)(`span`,{className:`block truncate text-xs text-fg-subtle`,children:e.path})]})]},e.path))}):Tt&&we.length===0?(0,$.jsx)(`div`,{className:`px-4 py-6 text-sm text-fg-muted`,children:h.files.loading}):(0,$.jsx)(dt,{tree:we,selectedPath:Me,onSelectFile:hr,onSelectEntry:_r,onExpandDir:e=>void Qn(e),onAction:yr,onUploadFiles:(e,t)=>void xr(e,t),uploadDropHint:u.workspace.dropToUpload,actionLabels:{preview:u.workspace.preview,download:u.workspace.download,copyPath:u.workspace.copyPath,openDefault:u.workspace.openSystemApp,openDirectory:u.workspace.openInFileManager,openWith:u.workspace.openWith,revealInFolder:u.workspace.revealInFolder,trash:u.workspace.moveToTrash,delete:u.workspace.deleteFile,recommendedApps:u.workspace.recommendedApps,desktopUpdateRequired:u.workspace.desktopUpdateRequired},emptyHint:h.files.emptyDirectory})]}),(0,$.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":h.files.resizeHandle,className:q(`group hidden cursor-col-resize touch-none items-stretch justify-center bg-transparent transition-colors hover:bg-surface-hover/60 lg:flex`,Ze&&`bg-surface-hover/70`),onPointerDown:Cr,children:(0,$.jsx)(`div`,{className:q(`my-3 w-px rounded-full bg-transparent transition-colors`,`group-hover:bg-edge-strong/55`,Ze&&`bg-accent/60`)})}),(0,$.jsx)(`div`,{className:`min-h-0 min-w-0 overflow-hidden bg-surface-base`,children:Me?(0,$.jsx)(sn,{filePath:Me,projectId:E.id,agentId:E.defaultAgentId||It||void 0,onClose:()=>Ne(null)}):(0,$.jsx)(`div`,{className:`flex h-full min-h-[18rem] items-center justify-center px-6 text-center`,children:(0,$.jsxs)(`div`,{className:`max-w-sm`,children:[(0,$.jsx)(Ht,{className:`mx-auto size-8 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`p`,{className:`mt-3 text-sm font-medium text-fg`,children:h.files.previewEmptyTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:h.files.previewEmptyDescription})]})})})]}):(0,$.jsxs)(`div`,{className:`grid gap-3 px-4 py-8 text-sm text-fg-muted`,children:[(0,$.jsx)(`p`,{children:h.files.needWorkspace}),(0,$.jsx)(`div`,{children:(0,$.jsx)(Y,{type:`button`,variant:`secondary`,className:`rounded-lg`,onClick:()=>zn(`settings`),children:h.files.openSettings})})]})})}):null,Z===`sessions`?(0,$.jsxs)(`section`,{id:`project-panel-sessions`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-sessions`,className:`grid min-h-full content-start gap-3`,children:[L.length?(0,$.jsxs)(`label`,{className:`relative flex min-h-9 w-full max-w-lg cursor-text items-center rounded-lg bg-surface-panel py-1.5 pl-9 pr-9 shadow-surface`,children:[(0,$.jsx)(oe,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-disabled`,"aria-hidden":!0}),(0,$.jsx)(`input`,{type:`search`,enterKeyHint:`search`,value:z,onChange:e=>B(e.currentTarget.value),placeholder:h.sessions.searchPlaceholder,"aria-label":h.sessions.searchPlaceholder,className:`min-w-0 flex-1 appearance-none border-0 bg-transparent py-0.5 text-sm leading-normal text-fg caret-current placeholder:text-fg-disabled focus:border-0 focus:shadow-none focus:outline-none focus:ring-0 focus-visible:outline-none`}),z?(0,$.jsx)(`button`,{type:`button`,className:`absolute right-2 top-1/2 inline-flex size-6 -translate-y-1/2 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,"aria-label":h.sessions.clearSearch,onClick:()=>B(``),children:(0,$.jsx)(se,{className:`size-3.5`,"aria-hidden":!0})}):null]}):null,Lr.length?(0,$.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:Lr.map(e=>{let t=Ci(e.updatedAt),n=e.routing?.agentId||e.agentId||h.common.agent,r=Fi(e),i=e.name?.trim()||h.sessions.fallbackTitle,a=Pr(e.messageCount??0);return(0,$.jsxs)(s,{to:`/chat/${encodeURIComponent(e.key)}`,onClick:Hn(`sessions`),className:`group flex min-h-[8.75rem] min-w-0 flex-col rounded-lg bg-surface-panel p-4 shadow-surface transition-colors hover:bg-surface-hover/45 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-base text-fg-muted`,children:(0,$.jsx)(G,{className:`size-4`,"aria-hidden":!0})}),(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`h3`,{className:`min-w-0 flex-1 truncate text-sm font-semibold text-fg`,children:i}),r?(0,$.jsx)(`span`,{className:`shrink-0 rounded-md bg-surface-base px-2 py-0.5 text-[11px] font-medium leading-5 text-fg-muted`,children:r}):null]})})]}),(0,$.jsxs)(`div`,{className:`mt-auto grid gap-2 pt-4 text-xs text-fg-muted`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,$.jsxs)(`span`,{className:`min-w-0 max-w-full truncate rounded-md bg-surface-base px-2 py-1`,children:[h.sessions.agent,`: `,n]}),(0,$.jsx)(`span`,{className:`rounded-md bg-surface-base px-2 py-1`,children:a})]}),t?(0,$.jsxs)(`span`,{className:`truncate rounded-md bg-surface-base px-2 py-1`,children:[h.sessions.updated,`: `,t]}):null]})]},e.key)})}):Rr?(0,$.jsx)(`div`,{className:`grid gap-1 rounded-lg bg-surface-panel px-4 py-8 text-center shadow-surface`,children:(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:h.sessions.noMatches})}):(0,$.jsx)(`div`,{className:`grid gap-1 rounded-lg bg-surface-panel px-4 py-8 text-center shadow-surface`,children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:h.sessions.emptyTitle}),(0,$.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm leading-6 text-fg-muted`,children:h.sessions.emptyDescription})]})})]}):null,Z===`progress`?(0,$.jsxs)(`section`,{id:`project-panel-progress`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-progress`,className:`grid min-h-full content-start gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.progress.title}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:Si(h.progress.count,{count:H})})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsxs)(`label`,{className:`inline-flex min-h-9 items-center gap-2 rounded-lg bg-surface-panel px-3 text-sm text-fg-muted shadow-surface`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:le,onChange:e=>ue(e.currentTarget.checked),className:`size-4 rounded border-edge text-accent focus:ring-accent/30`}),h.progress.includeRelated]}),(0,$.jsxs)(Y,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg px-3`,onClick:()=>void Xn(),disabled:ie,children:[(0,$.jsx)(ae,{className:q(`size-4`,ie&&`animate-spin`),"aria-hidden":!0}),h.common.refresh]})]})]}),(0,$.jsx)(`div`,{className:`overflow-hidden rounded-lg bg-surface-panel shadow-surface`,children:ie&&ee.length===0?(0,$.jsx)(`div`,{className:`px-4 py-8 text-sm text-fg-muted`,children:h.progress.loading}):ee.length?(0,$.jsx)(`div`,{className:`divide-y divide-edge`,children:ee.map(e=>{let t=h.progress.types[e.type]??e.type,n=h.progress.objectKinds[e.primaryObject.kind]??e.primaryObject.kind,r=Li(e),i=e.relatedProjects.length>0&&!e.scopes.some(e=>e.scopeKind===`project`&&e.scopeId===E.id);return(0,$.jsxs)(`article`,{className:`grid gap-2 px-4 py-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-fg`,children:t}),i?(0,$.jsx)(`span`,{className:`rounded-full bg-surface-inset px-2 py-0.5 text-xs font-medium text-fg-muted`,children:h.progress.related}):null]}),(0,$.jsxs)(`p`,{className:`mt-1 min-w-0 truncate text-sm text-fg-muted`,children:[n,`: `,Ni(e)]})]}),(0,$.jsx)(`time`,{className:`shrink-0 text-xs text-fg-subtle`,dateTime:new Date(e.createdAt).toISOString(),children:Ci(e.createdAt)})]}),r?(0,$.jsx)(`p`,{className:`line-clamp-2 text-sm leading-5 text-fg-muted`,children:r}):null,(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2 text-xs text-fg-subtle`,children:[(0,$.jsxs)(`span`,{className:`rounded-md bg-surface-base px-2 py-1`,children:[h.progress.actor,`: `,Mi(e)]}),(0,$.jsxs)(`span`,{className:`max-w-full truncate rounded-md bg-surface-base px-2 py-1`,children:[h.progress.source,`: `,Pi(e)]})]})]},e.id)})}):(0,$.jsx)(`div`,{className:`px-4 py-8 text-sm text-fg-muted`,children:h.progress.empty})})]}):null,Z===`settings`?(0,$.jsxs)(`form`,{id:`project-panel-settings`,role:`tabpanel`,"aria-labelledby":`project-primary-tab-settings`,onSubmit:sr,onBlurCapture:Tr.onBlurCapture,className:`grid min-h-full content-start gap-4 pb-1`,children:[(0,$.jsxs)(`section`,{className:`flex min-w-0 items-start justify-between gap-3 rounded-lg bg-surface-panel p-4 shadow-surface`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.settings.summaryTitle}),(0,$.jsx)(`p`,{className:`mt-1 max-w-3xl text-sm leading-6 text-fg-muted`,children:h.settings.summaryHint})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 flex-col items-end gap-2`,children:[(0,$.jsx)(`span`,{className:q(`rounded-full px-2 py-0.5 text-xs font-medium`,wi(Nn.status)),children:h.settings.statuses[Nn.status]}),(0,$.jsx)(vn,{status:Tr.status,error:Tr.error})]})]}),(0,$.jsxs)(`div`,{className:`grid items-start gap-4 xl:grid-cols-[minmax(0,1fr)_22rem]`,children:[(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsxs)(`section`,{className:`grid gap-4 rounded-lg bg-surface-panel p-4 shadow-surface`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.settings.detailsTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:h.settings.detailsHint})]}),(0,$.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,$.jsx)(Ti,{label:h.settings.name,children:(0,$.jsx)(`input`,{className:Ei(),value:Nn.name,onChange:e=>cr({name:e.target.value})})}),(0,$.jsx)(Ti,{label:h.settings.defaultAgent,children:(0,$.jsxs)(d,{className:Ei(),value:Nn.defaultAgentId,onChange:e=>cr({defaultAgentId:e.target.value},!0),children:[(0,$.jsx)(f,{value:``,children:h.settings.globalDefaultAgent}),Pt.map(e=>(0,$.jsx)(f,{value:e.id,children:Je(e,u.agentsSettings)},e.id))]})}),(0,$.jsx)(Ti,{label:h.settings.status,children:Hr?(0,$.jsx)(`div`,{className:`grid min-h-10 content-center rounded-md border border-edge bg-surface-inset px-3 text-sm text-fg-muted`,children:h.settings.statuses.archived}):(0,$.jsxs)(d,{className:Ei(),value:Nn.status===`archived`?`active`:Nn.status,onChange:e=>cr({status:e.target.value},!0),children:[(0,$.jsx)(f,{value:`active`,children:h.settings.statuses.active}),(0,$.jsx)(f,{value:`paused`,children:h.settings.statuses.paused})]})}),(0,$.jsx)(Ti,{label:h.settings.executionMode,hint:h.settings.executionModeHint,children:(0,$.jsxs)(d,{className:Ei(),value:Nn.executionMode,onChange:e=>cr({executionMode:e.target.value},!0),children:[(0,$.jsx)(f,{value:`managed_worktree`,children:h.settings.executionModeWorktree}),(0,$.jsx)(f,{value:`local_checkout`,children:h.settings.executionModeLocal})]})}),(0,$.jsx)(Ti,{label:h.settings.description,hint:h.settings.descriptionHint,children:(0,$.jsx)(`textarea`,{className:Ei(!0),value:Nn.description,onChange:e=>cr({description:e.target.value})})})]})]}),(0,$.jsxs)(`section`,{className:`grid gap-4 rounded-lg bg-surface-panel p-4 shadow-surface`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.settings.projectGuidanceTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:h.settings.projectGuidanceHint})]}),(0,$.jsx)(Ti,{label:h.settings.brief,hint:h.settings.briefHint,children:(0,$.jsx)(`textarea`,{className:Ei(!0),value:Nn.brief,onChange:e=>cr({brief:e.target.value})})}),(0,$.jsx)(Ti,{label:h.settings.instructions,hint:h.settings.instructionsHint,children:(0,$.jsx)(`textarea`,{className:Ei(!0),value:Nn.instructions,onChange:e=>cr({instructions:e.target.value})})})]})]}),(0,$.jsxs)(`aside`,{className:`grid gap-4 xl:sticky xl:top-0`,children:[(0,$.jsxs)(`section`,{className:`grid gap-3 rounded-lg bg-surface-panel p-4 shadow-surface`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.settings.workspaceRoot}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:h.settings.workspaceIndependentHint})]}),(0,$.jsxs)(`div`,{className:`grid gap-3 rounded-md border border-edge bg-surface-base p-3`,children:[(0,$.jsx)(`span`,{className:`w-fit rounded-md bg-surface-inset px-2 py-0.5 text-xs font-medium text-fg-muted`,children:Wr?h.settings.workspaceModeFollow:h.settings.workspaceModeFixed}),(0,$.jsx)(`div`,{className:`break-all font-mono text-xs leading-5 text-fg`,title:Gr,children:Gr}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg`,onClick:()=>void Yr(),children:[(0,$.jsx)(_,{className:`size-4`,"aria-hidden":!0}),h.settings.copyWorkspacePath]}),ke?(0,$.jsx)(_t,{resourceId:ke.fileId,displayName:ke.name}):null,(0,$.jsxs)(Y,{type:`button`,variant:`secondary`,className:`rounded-lg`,onClick:lr,children:[(0,$.jsx)(jt,{className:`size-4`,"aria-hidden":!0}),h.settings.migrateWorkspace]})]})]})]}),(0,$.jsxs)(`section`,{className:`grid gap-3 rounded-lg bg-surface-panel p-4 shadow-surface`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.settings.currentProjectTitle}),(0,$.jsxs)(`div`,{className:`grid gap-2`,children:[(0,$.jsx)(Di,{label:h.settings.defaultAgent,value:zr}),(0,$.jsx)(Di,{label:h.settings.pinState,value:Ur?h.settings.pinned:h.settings.notPinned}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,$.jsx)(Di,{label:h.settings.createdAt,value:Ci(E.createdAt)||h.common.never}),(0,$.jsx)(Di,{label:h.settings.updatedAt,value:Ci(E.updatedAt)||h.common.never})]})]})]}),(0,$.jsxs)(`section`,{className:`grid gap-4 rounded-lg bg-surface-panel p-4 shadow-surface`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:h.settings.managementTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:h.settings.managementHint})]}),(0,$.jsxs)(`div`,{className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`grid gap-3 rounded-md border border-edge bg-surface-base p-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:Ur?h.settings.pinnedTitle:h.settings.pinTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:h.settings.pinHint})]}),(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`w-fit rounded-lg`,disabled:dn===`pin`,onClick:()=>void dr(),children:[Ur?(0,$.jsx)(Mt,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(pn,{className:`size-4`,"aria-hidden":!0}),Ur?h.settings.unpinProject:h.settings.pinProject]})]}),(0,$.jsxs)(`div`,{className:`grid gap-3 rounded-md border border-edge bg-surface-base p-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:Hr?h.settings.restoreTitle:h.settings.archiveTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:Hr?h.settings.restoreHint:h.settings.archiveHint})]}),(0,$.jsxs)(Y,{type:`button`,variant:Hr?`primary`:`ghost`,className:`w-fit rounded-lg`,disabled:dn===`archive`,onClick:()=>void fr(),children:[Hr?(0,$.jsx)(ae,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(Vt,{className:`size-4`,"aria-hidden":!0}),Hr?h.settings.restoreProject:h.settings.archiveProject]})]})]})]}),(0,$.jsxs)(`section`,{className:`grid gap-3 rounded-lg border border-red-500/20 bg-red-500/5 p-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-red-700 dark:text-red-300`,children:h.settings.dangerTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-red-700/80 dark:text-red-200/80`,children:h.settings.dangerHint})]}),(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`w-fit text-red-600 hover:bg-red-500/10 hover:text-red-700 focus-visible:ring-red-500 dark:text-red-400 dark:hover:text-red-300`,onClick:()=>Jt(!0),children:[(0,$.jsx)(pt,{className:`size-4`,"aria-hidden":!0}),h.settings.deleteConfirmAction]})]})]})]})]}):null]}),(0,$.jsx)(be,{open:qt,onOpenChange:e=>{mn||Jt(e)},children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-edge bg-surface-overlay p-5 shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg bg-red-500/10 text-red-600 dark:text-red-400`,children:(0,$.jsx)(m,{className:`size-5`,strokeWidth:1.75,"aria-hidden":!0})}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:h.settings.deleteConfirmTitle}),(0,$.jsx)(he,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:E?Si(h.settings.deleteConfirm,{name:E.name}):h.settings.deleteConfirmFallback})]})]}),(0,$.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg`,disabled:mn,children:h.common.cancel})}),(0,$.jsxs)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg text-red-600 hover:bg-red-500/10 hover:text-red-700 focus-visible:ring-red-500 dark:text-red-400 dark:hover:text-red-300`,disabled:mn||!E,onClick:()=>void pr(),children:[(0,$.jsx)(pt,{className:`size-4`,"aria-hidden":!0}),h.settings.deleteConfirmAction]})]})]})]})}),(0,$.jsx)(Ge,{open:!!Pe,title:u.workspace.trashConfirmTitle,description:u.workspace.trashConfirmDescription.replace(`{{name}}`,Pe?.name??``),confirmLabel:u.workspace.moveToTrash,cancelLabel:u.workspace.cancel,destructive:!0,onConfirm:()=>void br(),onCancel:()=>Ve(null)}),(0,$.jsx)(Ge,{open:!!Ue,title:u.workspace.deleteConfirmTitle,description:u.workspace.deleteConfirmDescription.replace(`{{name}}`,Ue?.name??``),confirmLabel:u.workspace.deleteFile,cancelLabel:u.workspace.cancel,destructive:!0,onConfirm:()=>void Sr(),onCancel:()=>We(null)}),(0,$.jsx)(be,{open:Qt,onOpenChange:e=>{Wt||en(e)},children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(34rem,calc(100vh-2rem))] w-[min(36rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`shrink-0 border-b border-edge px-5 py-4`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:h.settings.workspaceMigrationTitle}),(0,$.jsx)(he,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:h.settings.workspaceMigrationDescription})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-5 py-4`,children:[(0,$.jsxs)(`div`,{className:`grid gap-2 text-sm`,children:[(0,$.jsx)(`span`,{className:`font-medium text-fg-muted`,children:h.settings.workspaceMode}),(0,$.jsxs)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:[(0,$.jsxs)(`label`,{className:q(`flex min-h-10 items-start gap-2 rounded-md border px-3 py-2`,nn===`fixed`?`border-accent bg-accent-soft/40 text-fg`:`border-edge bg-surface-base text-fg-muted`),children:[(0,$.jsx)(`input`,{type:`radio`,className:`mt-0.5 size-4`,checked:nn===`fixed`,onChange:()=>rn(`fixed`),disabled:Wt}),(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block font-medium`,children:h.settings.workspaceModeFixed}),(0,$.jsx)(`span`,{className:`block text-xs leading-5 text-fg-subtle`,children:h.settings.workspaceMigrationFixedHint})]})]}),(0,$.jsxs)(`label`,{className:q(`flex min-h-10 items-start gap-2 rounded-md border px-3 py-2`,nn===`follow`?`border-accent bg-accent-soft/40 text-fg`:`border-edge bg-surface-base text-fg-muted`),children:[(0,$.jsx)(`input`,{type:`radio`,className:`mt-0.5 size-4`,checked:nn===`follow`,onChange:()=>rn(`follow`),disabled:Wt}),(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block font-medium`,children:h.settings.workspaceModeFollow}),(0,$.jsx)(`span`,{className:`block text-xs leading-5 text-fg-subtle`,children:h.settings.workspaceHint})]})]})]})]}),nn===`fixed`?(0,$.jsx)(bn,{value:on,onChange:cn,disabled:Wt,wd:p,placeholder:h.settings.workspacePlaceholder,inputClassName:Ei(),autoFocus:!0}):null,(0,$.jsx)(`div`,{className:`rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm leading-6 text-amber-800 dark:text-amber-200`,children:h.settings.workspaceMigrationImpact}),(0,$.jsx)(`div`,{className:`rounded-lg bg-surface-inset px-3 py-2 text-xs leading-5 text-fg-subtle`,children:Si(h.settings.workspaceCurrent,{workspace:Kr})})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(ge,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg`,disabled:Wt,children:h.common.cancel})}),(0,$.jsxs)(Y,{type:`button`,variant:`primary`,className:`rounded-lg`,disabled:Wt||!qr,onClick:()=>void ur(),children:[(0,$.jsx)(jt,{className:`size-4`,"aria-hidden":!0}),h.settings.workspaceMigrationConfirm]})]})]})]})}),(0,$.jsx)(be,{open:!!Yt,onOpenChange:e=>{e||Zt(null)},children:(0,$.jsxs)(_e,{children:[(0,$.jsx)(pe,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ve,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex w-[min(30rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`border-b border-edge px-5 py-4`,children:[(0,$.jsx)(ye,{className:`text-base font-semibold text-fg`,children:h.settings.workspaceMissingTitle}),(0,$.jsx)(he,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:Yt?Si(h.settings.workspaceMissingDescription,{workspace:Yt}):null})]}),Yt?(0,$.jsx)(`div`,{className:`px-5 py-4`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-surface-inset px-3 py-2 text-sm text-fg-muted`,children:[(0,$.jsx)(Ht,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:Yt})]})}):null,(0,$.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,$.jsx)(Y,{type:`button`,variant:`ghost`,className:`rounded-lg`,onClick:Xr,disabled:Wt,children:h.settings.workspaceMissingBack}),(0,$.jsxs)(Y,{type:`button`,variant:`primary`,className:`rounded-lg`,onClick:()=>void ur({createWorkspaceRoot:!0}),disabled:Wt,children:[(0,$.jsx)(jt,{className:`size-4`,"aria-hidden":!0}),h.settings.workspaceMissingCreate]})]})]})]})})]})}export{Vi as ProjectDetailPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./chunk-KS7C4IRE-B2HK1psj.js";import{n as a,r as o}from"./popover-select-DGKUpVsz.js";import{t as s}from"./folder-open-CyzJ19I9.js";import{t as c}from"./loader-circle-CifKLtgG.js";import{t as l}from"./plus-Q2yW6OE7.js";import{t as u}from"./rotate-ccw-JM1TBLpp.js";import{t as d}from"./search-DA7gz22f.js";import{t as f}from"./x-B_N4OPjy.js";import{t as ee}from"./messages-B7VtMXec.js";import{t as p}from"./cn-0WouolD0.js";import{n as m}from"./locale-store-BKyOF23r.js";import{a as h,i as g,n as _,o as v,r as y,s as b,t as x}from"./dist-BGTk37IG.js";import{t as S}from"./button-aIC072nz.js";import{t as C}from"./skeleton-BI5TyibZ.js";import{t as w}from"./date-formatters-CUZAyDEg.js";import{Bi as T,Fi as E,Mi as D,Xi as O,Yi as k,Zi as A,_s as te,ea as j,fl as M,ji as ne,ll as N,ua as re,vc as ie,vs as P,zi as ae}from"./index-Bo70AuAq.js";var F=n(),I=e(t(),1),L=r();function R(e,t){if(e==null)return t;let n=new Date(e);return Number.isNaN(n.getTime())?t:w(n)}function oe(e){return[...e].sort((e,t)=>{let n=Number(!!t.pinnedAt)-Number(!!e.pinnedAt);return n===0?new Date(t.lastActiveAt??t.updatedAt).getTime()-new Date(e.lastActiveAt??e.updatedAt).getTime():n})}function se(){let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,"aria-busy":!0,children:Array.from({length:6},z)}),e[0]=t):t=e[0],t}function z(e,t){return(0,L.jsx)(C,{className:`h-40 rounded-xl`},t)}function ce(e){let t=(0,F.c)(59),{project:n,busy:r,onTogglePin:a,onToggleArchive:o}=e,s=m(B),c,l,d,f,p,h,g,_;if(t[0]!==s||t[1]!==n.brief||t[2]!==n.description||t[3]!==n.id||t[4]!==n.lastActiveAt||t[5]!==n.name||t[6]!==n.status||t[7]!==n.updatedAt||t[8]!==n.workspaceRoot){let e=ee(s).projectsPage;c=e.management,g=`flex h-full flex-col rounded-xl border border-edge-subtle bg-surface-base p-4`;let r;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-hover text-fg-muted`,children:(0,L.jsx)(ie,{className:`size-4`,"aria-hidden":!0})}),t[17]=r):r=t[17];let a;t[18]===n.name?a=t[19]:(a=(0,L.jsx)(`h2`,{className:`truncate text-base font-semibold sm:text-sm text-fg`,children:n.name}),t[18]=n.name,t[19]=a);let o=(0,L.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,L.jsx)(`p`,{className:`mt-0.5 text-xs text-fg-subtle`,children:e.statuses[n.status]})]}),u;t[20]===o?u=t[21]:(u=(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[r,o]}),t[20]=o,t[21]=u);let m;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,L.jsx)(N,{className:`mt-2 size-4 shrink-0 text-fg-subtle transition-transform group-hover:translate-x-0.5`,"aria-hidden":!0}),t[22]=m):m=t[22];let v;t[23]===u?v=t[24]:(v=(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[u,m]}),t[23]=u,t[24]=v),_=(0,L.jsxs)(i,{to:`/projects/${encodeURIComponent(n.id)}`,className:`group flex min-w-0 flex-1 flex-col rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[v,(0,L.jsx)(`p`,{className:`mt-3 line-clamp-2 min-h-10 text-sm leading-6 sm:text-xs sm:leading-5 text-fg-muted`,children:n.description||n.brief||e.noDescription})]}),h=`mt-3 flex shrink-0 items-end justify-between gap-3 border-t border-edge-subtle pt-3`,f=`min-w-0 text-xs text-fg-muted`,p=(0,L.jsx)(`p`,{className:`hidden truncate sm:block`,children:n.workspaceRoot||e.agentDefault}),l=`mt-1`,d=R(n.lastActiveAt??n.updatedAt,e.never),t[0]=s,t[1]=n.brief,t[2]=n.description,t[3]=n.id,t[4]=n.lastActiveAt,t[5]=n.name,t[6]=n.status,t[7]=n.updatedAt,t[8]=n.workspaceRoot,t[9]=c,t[10]=l,t[11]=d,t[12]=f,t[13]=p,t[14]=h,t[15]=g,t[16]=_}else c=t[9],l=t[10],d=t[11],f=t[12],p=t[13],h=t[14],g=t[15],_=t[16];let v;t[25]!==l||t[26]!==d?(v=(0,L.jsx)(`p`,{className:l,children:d}),t[25]=l,t[26]=d,t[27]=v):v=t[27];let y;t[28]!==f||t[29]!==p||t[30]!==v?(y=(0,L.jsxs)(`div`,{className:f,children:[p,v]}),t[28]=f,t[29]=p,t[30]=v,t[31]=y):y=t[31];let b=n.pinnedAt?c.unpin:c.pin,x=n.pinnedAt?c.unpin:c.pin,C;t[32]===n.pinnedAt?C=t[33]:(C=n.pinnedAt?(0,L.jsx)(te,{className:`size-4`,"aria-hidden":!0}):(0,L.jsx)(P,{className:`size-4`,"aria-hidden":!0}),t[32]=n.pinnedAt,t[33]=C);let w;t[34]!==r||t[35]!==a||t[36]!==b||t[37]!==x||t[38]!==C?(w=(0,L.jsx)(S,{type:`button`,variant:`ghost`,className:`size-8 p-0`,disabled:r,onClick:a,"aria-label":b,title:x,children:C}),t[34]=r,t[35]=a,t[36]=b,t[37]=x,t[38]=C,t[39]=w):w=t[39];let T=n.status===`archived`?c.restore:c.archive,E=n.status===`archived`?c.restore:c.archive,D;t[40]===n.status?D=t[41]:(D=n.status===`archived`?(0,L.jsx)(u,{className:`size-4`,"aria-hidden":!0}):(0,L.jsx)(M,{className:`size-4`,"aria-hidden":!0}),t[40]=n.status,t[41]=D);let O;t[42]!==r||t[43]!==o||t[44]!==T||t[45]!==E||t[46]!==D?(O=(0,L.jsx)(S,{type:`button`,variant:`ghost`,className:`size-8 p-0`,disabled:r,onClick:o,"aria-label":T,title:E,children:D}),t[42]=r,t[43]=o,t[44]=T,t[45]=E,t[46]=D,t[47]=O):O=t[47];let k;t[48]!==w||t[49]!==O?(k=(0,L.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[w,O]}),t[48]=w,t[49]=O,t[50]=k):k=t[50];let A;t[51]!==k||t[52]!==h||t[53]!==y?(A=(0,L.jsxs)(`div`,{className:h,children:[y,k]}),t[51]=k,t[52]=h,t[53]=y,t[54]=A):A=t[54];let j;return t[55]!==A||t[56]!==g||t[57]!==_?(j=(0,L.jsxs)(`article`,{className:g,children:[_,A]}),t[55]=A,t[56]=g,t[57]=_,t[58]=j):j=t[58],j}function B(e){return e.language}function V(){let e=ee(m(e=>e.language)),t=e.projectsPage,n=t.management,r=e.chat.workingDirectory,i=re(e=>e.setPageHeader),u=re(e=>e.clearPageHeader),[C,w]=(0,I.useState)([]),[te,M]=(0,I.useState)(!0),[N,P]=(0,I.useState)(null),[F,R]=(0,I.useState)(``),[z,B]=(0,I.useState)(!1),[V,le]=(0,I.useState)(`active`),[ue,de]=(0,I.useState)(null),[fe,H]=(0,I.useState)(!1),[U,W]=(0,I.useState)(null),[G,pe]=(0,I.useState)(!1),[K,me]=(0,I.useState)(!0),[q,he]=(0,I.useState)(``),[J,ge]=(0,I.useState)(``),[Y,_e]=(0,I.useState)(``),X=D({initialPath:Y,onPicked:_e}),Z=(0,I.useRef)(0),Q=(0,I.useCallback)(async(e=!1)=>{let t=++Z.current;e||(M(!0),P(null));try{let e=await k({limit:100,sortBy:`updatedAt`,sortOrder:`desc`});t===Z.current&&w(oe(e.items))}catch(n){!e&&t===Z.current&&P(n instanceof Error?n.message:String(n))}finally{t===Z.current&&M(!1)}},[]);(0,I.useEffect)(()=>(Q(),()=>{Z.current++}),[Q]),(0,I.useEffect)(()=>{let e=()=>{Q(!0)};return window.addEventListener(`project-resource-changed`,e),()=>{window.removeEventListener(`project-resource-changed`,e)}},[Q]);let $=(0,I.useMemo)(()=>{let e=F.trim().toLocaleLowerCase();return C.filter(e=>V===`all`||e.status===V).filter(t=>!e||[t.name,t.description,t.brief,t.workspaceRoot].filter(Boolean).some(t=>t.toLocaleLowerCase().includes(e)))},[V,C,F]),ve=(0,I.useMemo)(()=>(0,L.jsxs)(S,{type:`button`,variant:`primary`,className:`h-9 rounded-lg`,onClick:()=>H(!0),children:[(0,L.jsx)(l,{className:`size-4`,"aria-hidden":!0}),t.create]}),[t.create]);(0,I.useLayoutEffect)(()=>(i({startExtra:null,main:(0,L.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:n.title}),end:ve}),()=>u()),[u,ve,n.title,i]);let ye=(0,I.useCallback)(async e=>{e.preventDefault();let t=q.trim(),n=Y.trim();if(!(!t||!n||G)){pe(!0),W(null);try{let e=await T({autoUnderstand:K,name:t,...J.trim()?{description:J.trim()}:{},workspaceRoot:n});w(t=>[e,...t.filter(t=>t.id!==e.id)]),he(``),ge(``),_e(``),me(!0),H(!1),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:e.id}}))}catch(e){W(e instanceof Error?e.message:String(e))}finally{pe(!1)}}},[G,J,q,Y,K]),be=(0,I.useCallback)(async(e,t)=>{de(e.id),P(null);try{let n;n=t===`pin`?e.pinnedAt?await j(e.id,e.version):await O(e.id,e.version):e.status===`archived`?await A(e.id,e.version):await ae(e.id,e.version),w(e=>e.map(e=>e.id===n.id?n:e)),window.dispatchEvent(new CustomEvent(`project-updated`,{detail:{id:e.id}}))}catch(e){P(e instanceof Error?e.message:String(e))}finally{de(null)}},[]),xe=[{id:`active`,label:t.statuses.active},{id:`paused`,label:t.statuses.paused},{id:`archived`,label:t.statuses.archived},{id:`all`,label:t.all}],Se=xe.find(e=>e.id===V)?.label??t.all,Ce=n.resultCount.replace(`{{status}}`,Se).replace(`{{count}}`,String($.length));return(0,L.jsxs)(`main`,{className:`mx-auto flex w-full max-w-7xl flex-1 flex-col gap-5 px-4 pb-7 pt-3 sm:px-6 lg:px-8 lg:pb-9 lg:pt-4`,children:[(0,L.jsx)(x,{open:fe,onOpenChange:e=>{H(e),e||W(null)},children:(0,L.jsxs)(v,{children:[(0,L.jsx)(h,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,L.jsxs)(y,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(34rem,calc(100vh-2rem))] w-[min(38rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,L.jsxs)(`div`,{className:`shrink-0 border-b border-edge px-5 py-4`,children:[(0,L.jsx)(b,{className:`text-base font-semibold text-fg`,children:t.createTitle}),(0,L.jsx)(g,{className:`mt-1 text-sm text-fg-muted`,children:t.createDescription})]}),(0,L.jsxs)(`form`,{onSubmit:ye,className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-5 py-4`,children:[(0,L.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[t.projectName,(0,L.jsx)(`input`,{className:`h-10 rounded-lg border border-edge bg-surface-base px-3 font-normal outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:q,onChange:e=>he(e.target.value),maxLength:160})]}),(0,L.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium text-fg`,children:[n.descriptionLabel,(0,L.jsx)(`textarea`,{className:`min-h-28 resize-none rounded-lg border border-edge bg-surface-base px-3 py-2 font-normal leading-6 outline-none focus:border-accent focus:ring-2 focus:ring-accent/20`,value:J,onChange:e=>ge(e.target.value),maxLength:2e3,placeholder:n.descriptionPlaceholder})]}),(0,L.jsxs)(`div`,{className:`grid gap-1.5 text-sm`,children:[(0,L.jsx)(`span`,{className:`font-medium text-fg`,children:t.workspaceRoot}),(0,L.jsxs)(`button`,{type:`button`,className:`flex min-h-12 w-full items-center gap-3 rounded-lg border border-edge bg-surface-base px-3 py-2 text-left outline-none transition-colors hover:bg-surface-hover focus-visible:border-accent focus-visible:ring-2 focus-visible:ring-accent/20 disabled:cursor-not-allowed disabled:opacity-60`,onClick:X.pick,disabled:G||X.picking,children:[X.picking?(0,L.jsx)(c,{className:`size-5 shrink-0 animate-spin text-accent`,"aria-hidden":!0}):(0,L.jsx)(s,{className:`size-5 shrink-0 text-accent`,"aria-hidden":!0}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:Y?r.chooseFolder:r.selectWorkingDirectory}),(0,L.jsx)(`span`,{className:p(`mt-0.5 block truncate font-mono text-xs font-normal`,Y?`text-fg-muted`:`text-fg-subtle`),title:Y||void 0,children:Y||t.workspaceSelectionPlaceholder})]})]}),(0,L.jsx)(`p`,{className:`text-xs font-normal text-fg-subtle`,children:t.workspaceSelectionHint})]}),(0,L.jsx)(E,{checked:K,onChange:me,disabled:G}),U?(0,L.jsx)(`p`,{className:`rounded-lg bg-danger-soft px-3 py-2 text-xs text-danger`,role:`alert`,children:U}):null]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-5 py-4`,children:[(0,L.jsx)(_,{asChild:!0,children:(0,L.jsx)(S,{type:`button`,variant:`ghost`,children:t.cancel})}),(0,L.jsx)(S,{type:`submit`,variant:`primary`,disabled:G||!q.trim()||!Y.trim(),children:G?t.home.creating:t.create})]})]})]})]})}),X.hasNativePicker?null:(0,L.jsx)(ne,{open:X.modalOpen,onOpenChange:X.setModalOpen,initialAbsolutePath:Y||void 0,onConfirm:X.confirmPick,wd:r}),(0,L.jsxs)(`section`,{className:`flex min-h-10 flex-wrap items-center justify-between gap-3`,"aria-label":n.filterLabel,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium text-fg-muted`,"aria-live":`polite`,children:Ce}),(0,L.jsxs)(`div`,{className:p(`ml-auto flex min-w-0 items-center justify-end gap-2`,z&&`w-full sm:w-auto`),children:[z?(0,L.jsxs)(`div`,{className:`relative min-w-0 flex-1 sm:w-64 sm:flex-none`,children:[(0,L.jsx)(d,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,L.jsx)(`input`,{autoFocus:!0,className:`h-11 w-full rounded-lg border border-edge bg-surface-panel pl-9 pr-12 text-base sm:h-9 sm:text-sm text-fg outline-none placeholder:text-fg-muted focus:border-accent`,value:F,onChange:e=>R(e.target.value),placeholder:t.searchPlaceholder,"aria-label":t.searchPlaceholder}),(0,L.jsx)(`button`,{type:`button`,className:`touch-target absolute right-0 top-1/2 flex size-6 -translate-y-1/2 items-center justify-center rounded-md text-fg-subtle transition-colors hover:bg-surface-hover hover:text-fg`,onClick:()=>{R(``),B(!1)},"aria-label":n.clearSearch,title:n.clearSearch,children:(0,L.jsx)(f,{className:`size-3.5`,"aria-hidden":!0})})]}):(0,L.jsx)(S,{type:`button`,variant:`ghost`,className:`size-9 shrink-0 p-0`,onClick:()=>B(!0),"aria-label":t.searchPlaceholder,title:t.searchPlaceholder,children:(0,L.jsx)(d,{className:`size-4`,"aria-hidden":!0})}),(0,L.jsx)(a,{className:`w-28 sm:w-32`,triggerClassName:`h-9 border-edge bg-surface-panel px-2.5 text-xs font-medium`,contentClassName:`min-w-36`,align:`end`,value:V,"aria-label":n.filterLabel,onChange:e=>le(e.target.value),children:xe.map(e=>(0,L.jsx)(o,{value:e.id,children:e.label},e.id))})]})]}),N?(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl border border-danger/25 bg-danger-soft px-4 py-3 text-sm text-danger`,role:`alert`,children:[(0,L.jsx)(`span`,{children:N}),(0,L.jsx)(S,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>void Q(),children:t.home.retry})]}):null,te?(0,L.jsx)(se,{}):$.length?(0,L.jsx)(`section`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,children:$.map(e=>(0,L.jsx)(ce,{project:e,busy:ue===e.id,onTogglePin:()=>void be(e,`pin`),onToggleArchive:()=>void be(e,`archive`)},e.id))}):(0,L.jsxs)(`section`,{className:`py-16 text-center`,children:[(0,L.jsx)(ie,{className:`mx-auto size-7 text-fg-subtle`,"aria-hidden":!0}),(0,L.jsx)(`h2`,{className:`mt-3 text-sm font-semibold text-fg`,children:n.emptyTitle}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:n.emptyHint})]})]})}export{V as ProjectsPage};
|