agent-tower 0.6.0-beta.2 → 0.6.0-beta.3
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/app.d.ts.map +1 -1
- package/dist/app.js +10 -2
- package/dist/app.js.map +1 -1
- package/dist/app.test.js +10 -0
- package/dist/app.test.js.map +1 -1
- package/dist/core/container.d.ts +2 -0
- package/dist/core/container.d.ts.map +1 -1
- package/dist/core/container.js +9 -1
- package/dist/core/container.js.map +1 -1
- package/dist/executors/__tests__/codex.executor.test.js +50 -0
- package/dist/executors/__tests__/codex.executor.test.js.map +1 -1
- package/dist/executors/codex.executor.d.ts +2 -0
- package/dist/executors/codex.executor.d.ts.map +1 -1
- package/dist/executors/codex.executor.js +8 -0
- package/dist/executors/codex.executor.js.map +1 -1
- package/dist/executors/execution-env.d.ts +1 -1
- package/dist/executors/execution-env.d.ts.map +1 -1
- package/dist/executors/execution-env.js +2 -0
- package/dist/executors/execution-env.js.map +1 -1
- package/dist/mcp/http-client.d.ts +24 -0
- package/dist/mcp/http-client.d.ts.map +1 -1
- package/dist/mcp/http-client.js +66 -8
- package/dist/mcp/http-client.js.map +1 -1
- package/dist/mcp/http-client.test.d.ts +2 -0
- package/dist/mcp/http-client.test.d.ts.map +1 -0
- package/dist/mcp/http-client.test.js +67 -0
- package/dist/mcp/http-client.test.js.map +1 -0
- package/dist/mcp/index.js +9 -2
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +7 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/__tests__/workspace-services.test.d.ts +2 -0
- package/dist/mcp/tools/__tests__/workspace-services.test.d.ts.map +1 -0
- package/dist/mcp/tools/__tests__/workspace-services.test.js +84 -0
- package/dist/mcp/tools/__tests__/workspace-services.test.js.map +1 -0
- package/dist/mcp/tools/workspace-services.d.ts +6 -0
- package/dist/mcp/tools/workspace-services.d.ts.map +1 -0
- package/dist/mcp/tools/workspace-services.js +102 -0
- package/dist/mcp/tools/workspace-services.js.map +1 -0
- package/dist/mcp/types.d.ts +55 -2
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/mcp/types.js +29 -0
- package/dist/mcp/types.js.map +1 -1
- package/dist/middleware/__tests__/access-auth.test.js +229 -2
- package/dist/middleware/__tests__/access-auth.test.js.map +1 -1
- package/dist/middleware/access-auth.d.ts +7 -0
- package/dist/middleware/access-auth.d.ts.map +1 -1
- package/dist/middleware/access-auth.js +50 -9
- package/dist/middleware/access-auth.js.map +1 -1
- package/dist/prompts/agent-output-intents.d.ts +2 -0
- package/dist/prompts/agent-output-intents.d.ts.map +1 -0
- package/dist/prompts/agent-output-intents.js +11 -0
- package/dist/prompts/agent-output-intents.js.map +1 -0
- package/dist/prompts/agent-output-intents.test.d.ts +2 -0
- package/dist/prompts/agent-output-intents.test.d.ts.map +1 -0
- package/dist/prompts/agent-output-intents.test.js +12 -0
- package/dist/prompts/agent-output-intents.test.js.map +1 -0
- package/dist/prompts/workspace-background-service-policy.d.ts +9 -0
- package/dist/prompts/workspace-background-service-policy.d.ts.map +1 -0
- package/dist/prompts/workspace-background-service-policy.js +17 -0
- package/dist/prompts/workspace-background-service-policy.js.map +1 -0
- package/dist/prompts/workspace-background-service-policy.test.d.ts +2 -0
- package/dist/prompts/workspace-background-service-policy.test.d.ts.map +1 -0
- package/dist/prompts/workspace-background-service-policy.test.js +19 -0
- package/dist/prompts/workspace-background-service-policy.test.js.map +1 -0
- package/dist/routes/__tests__/previews.integration.test.js +1 -0
- package/dist/routes/__tests__/previews.integration.test.js.map +1 -1
- package/dist/routes/__tests__/previews.test.js +6 -1
- package/dist/routes/__tests__/previews.test.js.map +1 -1
- package/dist/routes/__tests__/providers.test.js +1 -0
- package/dist/routes/__tests__/providers.test.js.map +1 -1
- package/dist/routes/__tests__/sessions-visualizations.test.d.ts +2 -0
- package/dist/routes/__tests__/sessions-visualizations.test.d.ts.map +1 -0
- package/dist/routes/__tests__/sessions-visualizations.test.js +89 -0
- package/dist/routes/__tests__/sessions-visualizations.test.js.map +1 -0
- package/dist/routes/__tests__/workspace-services.test.d.ts +2 -0
- package/dist/routes/__tests__/workspace-services.test.d.ts.map +1 -0
- package/dist/routes/__tests__/workspace-services.test.js +148 -0
- package/dist/routes/__tests__/workspace-services.test.js.map +1 -0
- package/dist/routes/access-auth.d.ts.map +1 -1
- package/dist/routes/access-auth.js +24 -11
- package/dist/routes/access-auth.js.map +1 -1
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +3 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/previews.d.ts.map +1 -1
- package/dist/routes/previews.js +4 -6
- package/dist/routes/previews.js.map +1 -1
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +93 -0
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/tasks.d.ts.map +1 -1
- package/dist/routes/tasks.js +2 -2
- package/dist/routes/tasks.js.map +1 -1
- package/dist/routes/workspace-services.d.ts +7 -0
- package/dist/routes/workspace-services.d.ts.map +1 -0
- package/dist/routes/workspace-services.js +129 -0
- package/dist/routes/workspace-services.js.map +1 -0
- package/dist/runtime/__tests__/acp-agent-definitions.test.js +43 -0
- package/dist/runtime/__tests__/acp-agent-definitions.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-driver-lifecycle.test.js +61 -1
- package/dist/runtime/__tests__/acp-driver-lifecycle.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-driver.test.js +2 -0
- package/dist/runtime/__tests__/acp-driver.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-process-manager.test.js +40 -1
- package/dist/runtime/__tests__/acp-process-manager.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-projector.test.js +55 -0
- package/dist/runtime/__tests__/acp-projector.test.js.map +1 -1
- package/dist/runtime/__tests__/runtime-coordinator.test.js +5 -2
- package/dist/runtime/__tests__/runtime-coordinator.test.js.map +1 -1
- package/dist/runtime/acp/acp-driver.js +79 -27
- package/dist/runtime/acp/acp-driver.js.map +1 -1
- package/dist/runtime/acp/agents/codex-frame-normalizer.d.ts +4 -0
- package/dist/runtime/acp/agents/codex-frame-normalizer.d.ts.map +1 -0
- package/dist/runtime/acp/agents/codex-frame-normalizer.js +51 -0
- package/dist/runtime/acp/agents/codex-frame-normalizer.js.map +1 -0
- package/dist/runtime/acp/agents/codex.d.ts.map +1 -1
- package/dist/runtime/acp/agents/codex.js +21 -0
- package/dist/runtime/acp/agents/codex.js.map +1 -1
- package/dist/runtime/acp/agents/types.d.ts +4 -0
- package/dist/runtime/acp/agents/types.d.ts.map +1 -1
- package/dist/runtime/acp/codex-provider-config.d.ts +1 -0
- package/dist/runtime/acp/codex-provider-config.d.ts.map +1 -1
- package/dist/runtime/acp/codex-provider-config.js +4 -0
- package/dist/runtime/acp/codex-provider-config.js.map +1 -1
- package/dist/runtime/acp/process-manager.d.ts +3 -0
- package/dist/runtime/acp/process-manager.d.ts.map +1 -1
- package/dist/runtime/acp/process-manager.js +31 -12
- package/dist/runtime/acp/process-manager.js.map +1 -1
- package/dist/runtime/acp/projector.d.ts.map +1 -1
- package/dist/runtime/acp/projector.js +71 -5
- package/dist/runtime/acp/projector.js.map +1 -1
- package/dist/runtime/contracts.d.ts +1 -0
- package/dist/runtime/contracts.d.ts.map +1 -1
- package/dist/runtime/runtime-coordinator.d.ts.map +1 -1
- package/dist/runtime/runtime-coordinator.js +1 -0
- package/dist/runtime/runtime-coordinator.js.map +1 -1
- package/dist/services/__tests__/access-auth.service.test.js +41 -0
- package/dist/services/__tests__/access-auth.service.test.js.map +1 -1
- package/dist/services/__tests__/agent-artifact.service.test.d.ts +2 -0
- package/dist/services/__tests__/agent-artifact.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/agent-artifact.service.test.js +133 -0
- package/dist/services/__tests__/agent-artifact.service.test.js.map +1 -0
- package/dist/services/__tests__/agent-visualization.service.test.d.ts +2 -0
- package/dist/services/__tests__/agent-visualization.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/agent-visualization.service.test.js +57 -0
- package/dist/services/__tests__/agent-visualization.service.test.js.map +1 -0
- package/dist/services/__tests__/preview-runtime-manager.test.js +5 -0
- package/dist/services/__tests__/preview-runtime-manager.test.js.map +1 -1
- package/dist/services/__tests__/project.service.test.js +6 -2
- package/dist/services/__tests__/project.service.test.js.map +1 -1
- package/dist/services/__tests__/provider-config.service.test.js +32 -0
- package/dist/services/__tests__/provider-config.service.test.js.map +1 -1
- package/dist/services/__tests__/session-manager.lifecycle.test.js +153 -1
- package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
- package/dist/services/__tests__/session-manager.team-run.test.js +18 -5
- package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
- package/dist/services/__tests__/task.service.test.js +16 -3
- package/dist/services/__tests__/task.service.test.js.map +1 -1
- package/dist/services/__tests__/workspace-background-process-manager.test.d.ts +2 -0
- package/dist/services/__tests__/workspace-background-process-manager.test.d.ts.map +1 -0
- package/dist/services/__tests__/workspace-background-process-manager.test.js +412 -0
- package/dist/services/__tests__/workspace-background-process-manager.test.js.map +1 -0
- package/dist/services/__tests__/workspace-background-service.service.test.d.ts +2 -0
- package/dist/services/__tests__/workspace-background-service.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/workspace-background-service.service.test.js +418 -0
- package/dist/services/__tests__/workspace-background-service.service.test.js.map +1 -0
- package/dist/services/__tests__/workspace.service.test.js +137 -0
- package/dist/services/__tests__/workspace.service.test.js.map +1 -1
- package/dist/services/access-auth.service.d.ts +15 -1
- package/dist/services/access-auth.service.d.ts.map +1 -1
- package/dist/services/access-auth.service.js +75 -15
- package/dist/services/access-auth.service.js.map +1 -1
- package/dist/services/agent-artifact.service.d.ts +28 -0
- package/dist/services/agent-artifact.service.d.ts.map +1 -0
- package/dist/services/agent-artifact.service.js +287 -0
- package/dist/services/agent-artifact.service.js.map +1 -0
- package/dist/services/agent-visualization.service.d.ts +12 -0
- package/dist/services/agent-visualization.service.d.ts.map +1 -0
- package/dist/services/agent-visualization.service.js +239 -0
- package/dist/services/agent-visualization.service.js.map +1 -0
- package/dist/services/mcp-config.service.d.ts.map +1 -1
- package/dist/services/mcp-config.service.js +8 -1
- package/dist/services/mcp-config.service.js.map +1 -1
- package/dist/services/mcp-config.service.test.js +14 -0
- package/dist/services/mcp-config.service.test.js.map +1 -1
- package/dist/services/preview-runtime-manager.d.ts.map +1 -1
- package/dist/services/preview-runtime-manager.js +15 -12
- package/dist/services/preview-runtime-manager.js.map +1 -1
- package/dist/services/project.service.d.ts +4 -1
- package/dist/services/project.service.d.ts.map +1 -1
- package/dist/services/project.service.js +43 -32
- package/dist/services/project.service.js.map +1 -1
- package/dist/services/provider-config.service.d.ts.map +1 -1
- package/dist/services/provider-config.service.js +11 -0
- package/dist/services/provider-config.service.js.map +1 -1
- package/dist/services/session-manager.d.ts +34 -32
- package/dist/services/session-manager.d.ts.map +1 -1
- package/dist/services/session-manager.js +43 -23
- package/dist/services/session-manager.js.map +1 -1
- package/dist/services/task-cleanup.service.d.ts +4 -1
- package/dist/services/task-cleanup.service.d.ts.map +1 -1
- package/dist/services/task-cleanup.service.js +13 -1
- package/dist/services/task-cleanup.service.js.map +1 -1
- package/dist/services/task.service.d.ts +22 -20
- package/dist/services/task.service.d.ts.map +1 -1
- package/dist/services/task.service.js +21 -8
- package/dist/services/task.service.js.map +1 -1
- package/dist/services/workspace-background-process-manager.d.ts +66 -0
- package/dist/services/workspace-background-process-manager.d.ts.map +1 -0
- package/dist/services/workspace-background-process-manager.js +328 -0
- package/dist/services/workspace-background-process-manager.js.map +1 -0
- package/dist/services/workspace-background-service.service.d.ts +39 -0
- package/dist/services/workspace-background-service.service.d.ts.map +1 -0
- package/dist/services/workspace-background-service.service.js +520 -0
- package/dist/services/workspace-background-service.service.js.map +1 -0
- package/dist/services/workspace-lifecycle-barrier.d.ts +10 -0
- package/dist/services/workspace-lifecycle-barrier.d.ts.map +1 -0
- package/dist/services/workspace-lifecycle-barrier.js +35 -0
- package/dist/services/workspace-lifecycle-barrier.js.map +1 -0
- package/dist/services/workspace.service.d.ts +42 -36
- package/dist/services/workspace.service.d.ts.map +1 -1
- package/dist/services/workspace.service.js +100 -39
- package/dist/services/workspace.service.js.map +1 -1
- package/dist/socket/__tests__/socket-gateway.test.js +23 -0
- package/dist/socket/__tests__/socket-gateway.test.js.map +1 -1
- package/dist/socket/middleware/__tests__/auth.test.js +3 -3
- package/dist/socket/middleware/__tests__/auth.test.js.map +1 -1
- package/dist/utils/agent-api-credential.d.ts +11 -0
- package/dist/utils/agent-api-credential.d.ts.map +1 -0
- package/dist/utils/agent-api-credential.js +40 -0
- package/dist/utils/agent-api-credential.js.map +1 -0
- package/dist/utils/internal-api-token.d.ts +2 -0
- package/dist/utils/internal-api-token.d.ts.map +1 -1
- package/dist/utils/internal-api-token.js +2 -0
- package/dist/utils/internal-api-token.js.map +1 -1
- package/dist/utils/process-launch.d.ts.map +1 -1
- package/dist/utils/process-launch.js +156 -22
- package/dist/utils/process-launch.js.map +1 -1
- package/dist/utils/process-launch.test.js +7 -0
- package/dist/utils/process-launch.test.js.map +1 -1
- package/dist/utils/unix-process-identity.d.ts +23 -0
- package/dist/utils/unix-process-identity.d.ts.map +1 -0
- package/dist/utils/unix-process-identity.js +165 -0
- package/dist/utils/unix-process-identity.js.map +1 -0
- package/dist/web/assets/{AgentDemoPage-XrttOpQW.js → AgentDemoPage-CLemSpf6.js} +1 -1
- package/dist/web/assets/{AgentEnvironmentSettingsPage-CAo0bCpZ.js → AgentEnvironmentSettingsPage-CPggaJvZ.js} +1 -1
- package/dist/web/assets/{AgentLogo-BCwbooTN.js → AgentLogo-DJFjaRFS.js} +1 -1
- package/dist/web/assets/ConversationPage-CB4PoHYi.js +3 -0
- package/dist/web/assets/CreateTaskInput-CXWGjX_a.js +1 -0
- package/dist/web/assets/{DemoPage-DHMh9-zU.js → DemoPage-djW4NeHW.js} +3 -3
- package/dist/web/assets/{GeneralSettingsPage-DvWaqR9O.js → GeneralSettingsPage-0a2VgV74.js} +1 -1
- package/dist/web/assets/{Icons-DADUmnB1.js → Icons-tvQ3lNxT.js} +1 -1
- package/dist/web/assets/{LoadingPreviewPage-Dk91Ua1W.js → LoadingPreviewPage-D8GpQ-Ic.js} +1 -1
- package/dist/web/assets/McpSettingsPage-BxPMmwHH.js +1 -0
- package/dist/web/assets/{MemberAvatar-l-WCdlLA.js → MemberAvatar-JbGgXa3r.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-Byu8b9X3.js → NotificationSettingsPage-BtN0fYTA.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-BdylqWUj.js → ProfileSettingsPage-CVSHbAtS.js} +1 -1
- package/dist/web/assets/ProjectKanbanPage-Dq0pufE1.js +90 -0
- package/dist/web/assets/ProjectSettingsPage-CChSA5A4.js +2 -0
- package/dist/web/assets/ProviderSettingsPage-giXaDHmU.js +95 -0
- package/dist/web/assets/{SettingsMasterDetail-DTGIIGdI.js → SettingsMasterDetail-D-TeBuLx.js} +1 -1
- package/dist/web/assets/{TeamSettingsPage-BXuG4Bou.js → TeamSettingsPage-DNLp2l2E.js} +1 -1
- package/dist/web/assets/{arc-DrcjdWTE.js → arc-B5sdSA9b.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-CAoBhXSL.js → architectureDiagram-3BPJPVTR-ClsPKWjN.js} +1 -1
- package/dist/web/assets/{arrow-left-CCWDjOmp.js → arrow-left-B7C-fOb5.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-CcTSBbUq.js → blockDiagram-GPEHLZMM-HHViBKvL.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-BuUKdgUg.js → c4Diagram-AAUBKEIU-CRreiVUs.js} +1 -1
- package/dist/web/assets/channel-Bhjxgyee.js +1 -0
- package/dist/web/assets/check-Dtr-nHO5.js +1 -0
- package/dist/web/assets/{chevron-down-BQcW9sFf.js → chevron-down-BZnZAd2n.js} +1 -1
- package/dist/web/assets/{chevron-right-pH923eYp.js → chevron-right-nnOI2p8q.js} +1 -1
- package/dist/web/assets/{chevron-up-DyQW115F.js → chevron-up-Cl6FGZ8R.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-BWNSmQa8.js → chunk-2J33WTMH-_s2AOnis.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-Blldhw0k.js → chunk-4BX2VUAB-Ds1jhNjB.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-hTffyPXL.js → chunk-55IACEB6-B2SvpbB1.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-Cd48r7c-.js → chunk-727SXJPM-B6qjWdxn.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-BdDrOIL7.js → chunk-AQP2D5EJ-myECS-o9.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-6XIvQYVJ.js → chunk-FMBD7UC4-CFDf13jX.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-BJlcb_pB.js → chunk-ND2GUHAM-62aJufBH.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-3TZzFkxK.js → chunk-QZHKN3VN-DEWvzHCx.js} +1 -1
- package/dist/web/assets/{circle-alert-oa-BQ5e7.js → circle-alert-BSGJzTSj.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-BxnIeW8e.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BxnIeW8e.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-xJQWFyR7.js → code-block-OCS4YCEC-DWj3hzdw.js} +1 -1
- package/dist/web/assets/{confirm-dialog-CRiC3xBd.js → confirm-dialog-oStWxmjS.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-Cjcm-rW_.js → cose-bilkent-S5V4N54A-DNYqhVNu.js} +1 -1
- package/dist/web/assets/cssMode-Cn68yhOS.js +1 -0
- package/dist/web/assets/{dagre-BM42HDAG-YqubcAJi.js → dagre-BM42HDAG-gQbGUd4s.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-Dk4ayFqg.js → diagram-2AECGRRQ-BeMaPQBR.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-CQ0joYfB.js → diagram-5GNKFQAL-CStJaSd8.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-DmuZzIdW.js → diagram-KO2AKTUF-BmEeaazt.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-YTPEfEZy.js → diagram-LMA3HP47-ClNnKUvt.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-DmwRuz8-.js → diagram-OG6HWLK6-C24GKhLk.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-LRL_DMXa.js → erDiagram-TEJ5UH35-6Xp8w1WL.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-ELBDyOvk.js → flowDiagram-I6XJVG4X-BCih6e9O.js} +1 -1
- package/dist/web/assets/folder-picker-DcY2P8zf.js +1 -0
- package/dist/web/assets/{freemarker2-DxJFkRz5.js → freemarker2-C6kMBtOW.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-D0e9ILuF.js → ganttDiagram-6RSMTGT7-_9GX-BOi.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-Ck6OXXw0.js → gitGraphDiagram-PVQCEYII-DEe9VMLq.js} +1 -1
- package/dist/web/assets/handlebars-BxZgdhY8.js +1 -0
- package/dist/web/assets/html-bhMfD_X9.js +1 -0
- package/dist/web/assets/htmlMode-CC7AVUJ4.js +1 -0
- package/dist/web/assets/index-018g9RN4.css +1 -0
- package/dist/web/assets/{index-D9kBRMR0.js → index-ToY1NCNr.js} +3 -3
- package/dist/web/assets/{index-CjdqAcbu.js → index-cl-QFuts.js} +4 -4
- package/dist/web/assets/{infoDiagram-5YYISTIA-Cx8be-MV.js → infoDiagram-5YYISTIA-CU3D8SMZ.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-Dlc7akl7.js → ishikawaDiagram-YF4QCWOH-ClffgdSa.js} +1 -1
- package/dist/web/assets/javascript-8UIdW5Gd.js +1 -0
- package/dist/web/assets/{journeyDiagram-JHISSGLW-BVDSbS9-.js → journeyDiagram-JHISSGLW-Cy7Rr0_y.js} +1 -1
- package/dist/web/assets/{jsonMode-B5CJhoWd.js → jsonMode-JLBoaKf1.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-nFR0zB7B.js → kanban-definition-UN3LZRKU-14piuQEq.js} +1 -1
- package/dist/web/assets/{layers-Bo4aml98.js → layers-C93epAjs.js} +1 -1
- package/dist/web/assets/{linear-BCWZjcpP.js → linear-BtH62ya4.js} +1 -1
- package/dist/web/assets/liquid-BntTiwt7.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-Cbk7wEkj.js → lspLanguageFeatures-Dk65AKZD.js} +1 -1
- package/dist/web/assets/mdx-ToUKdFio.js +1 -0
- package/dist/web/assets/{mermaid-NOHMQCX5-DWQaYVL0.js → mermaid-NOHMQCX5-CPO3gPWp.js} +66 -65
- package/dist/web/assets/{message-square-DxbkpGqF.js → message-square-BBENHwpb.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-LI7W1FIX.js → mindmap-definition-RKZ34NQL-gWYqFXbP.js} +1 -1
- package/dist/web/assets/{modal-Cymk-6Df.js → modal-D-sNOVPw.js} +1 -1
- package/dist/web/assets/{monaco-Bc-Z2u8N.js → monaco-B9Zd90UG.js} +3 -3
- package/dist/web/assets/{pencil-DOL2nlgg.js → pencil-BRPix314.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-mgUzAFkk.js → pieDiagram-4H26LBE5-C3cHgEuO.js} +1 -1
- package/dist/web/assets/python-BeGIUwrY.js +1 -0
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-CaDF2kqA.js → quadrantDiagram-W4KKPZXB-DZFYp-mp.js} +1 -1
- package/dist/web/assets/razor-CnCuqD7W.js +1 -0
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-DhmHdr_0.js → requirementDiagram-4Y6WPE33-DSQRXAFH.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-B7qnGfue.js → sankeyDiagram-5OEKKPKP-CEXk2v3C.js} +1 -1
- package/dist/web/assets/{select-BpKQyMvD.js → select-CGNclv1f.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-D2LhPgpM.js → sequenceDiagram-3UESZ5HK-CHVF_25M.js} +1 -1
- package/dist/web/assets/server-UA3ZvpjF.js +1 -0
- package/dist/web/assets/{stateDiagram-AJRCARHV-ClkO4Gu5.js → stateDiagram-AJRCARHV-TMqBR1_f.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DqCjP1u1.js +1 -0
- package/dist/web/assets/{switch-BJ4Ar_OA.js → switch-C7qsQ1x2.js} +1 -1
- package/dist/web/assets/{textarea-DjwjAAG8.js → textarea-CDdCks2T.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-DhGIG-GC.js → timeline-definition-PNZ67QCA-CxC3mFt7.js} +1 -1
- package/dist/web/assets/{trash-2-R46i6Uus.js → trash-2-Bye7VGcW.js} +1 -1
- package/dist/web/assets/{tsMode-CKaqpIrz.js → tsMode-8nvc-x2E.js} +1 -1
- package/dist/web/assets/typescript-P7JXXc42.js +1 -0
- package/dist/web/assets/{upload-CgWqsmdI.js → upload-wJO5M1ZY.js} +1 -1
- package/dist/web/assets/{use-profiles-BlGgvdYm.js → use-profiles-CYJIKesy.js} +1 -1
- package/dist/web/assets/{use-projects-Cuv0A0RC.js → use-projects-Ds_YI2En.js} +1 -1
- package/dist/web/assets/{use-providers-DLcAY6E1.js → use-providers-B9FaTKyw.js} +1 -1
- package/dist/web/assets/{useNormalizedLogs-tfxFAJOF.js → useNormalizedLogs-B8um63GF.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-BngQhsYJ.js → vennDiagram-CIIHVFJN-DX0jm9G-.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-BEY6sftT.js → wardley-L42UT6IY-Ce-rqtq2.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-IH_Yh-cw.js → wardleyDiagram-YWT4CUSO-Gpxnu2av.js} +1 -1
- package/dist/web/assets/xml-1G4iEdpK.js +1 -0
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-BdrGFDsr.js → xychartDiagram-2RQKCTM6-COe6opx2.js} +1 -1
- package/dist/web/assets/yaml-HqUdsAk3.js +1 -0
- package/dist/web/index.html +2 -2
- package/node_modules/@agent-tower/shared/dist/agent-download-intent.d.ts +6 -0
- package/node_modules/@agent-tower/shared/dist/agent-download-intent.d.ts.map +1 -0
- package/node_modules/@agent-tower/shared/dist/agent-download-intent.js +46 -0
- package/node_modules/@agent-tower/shared/dist/agent-download-intent.js.map +1 -0
- package/node_modules/@agent-tower/shared/dist/index.d.ts +1 -0
- package/node_modules/@agent-tower/shared/dist/index.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/index.js +1 -0
- package/node_modules/@agent-tower/shared/dist/index.js.map +1 -1
- package/node_modules/@agent-tower/shared/dist/provider-capabilities.d.ts +1 -0
- package/node_modules/@agent-tower/shared/dist/provider-capabilities.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/provider-capabilities.js +4 -0
- package/node_modules/@agent-tower/shared/dist/provider-capabilities.js.map +1 -1
- package/node_modules/@agent-tower/shared/dist/types.d.ts +56 -2
- package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20260728000000_add_agent_artifacts/migration.sql +23 -0
- package/prisma/schema.prisma +48 -0
- package/dist/web/assets/ConversationPage-kyHuICil.js +0 -3
- package/dist/web/assets/CreateTaskInput-B67vzMJD.js +0 -1
- package/dist/web/assets/McpSettingsPage-CH8jFyxp.js +0 -1
- package/dist/web/assets/ProjectKanbanPage--cx6wNDR.js +0 -90
- package/dist/web/assets/ProjectSettingsPage-6psG0Vfc.js +0 -2
- package/dist/web/assets/ProviderSettingsPage-BPEEkhtA.js +0 -93
- package/dist/web/assets/channel-Bh_PCZNP.js +0 -1
- package/dist/web/assets/check-BN_PVKzE.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-B0lQFDoP.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-B0lQFDoP.js +0 -1
- package/dist/web/assets/copy-DaoAUKTO.js +0 -1
- package/dist/web/assets/cssMode-_D6u4YDd.js +0 -1
- package/dist/web/assets/folder-picker-WUhXxIM5.js +0 -1
- package/dist/web/assets/handlebars-djdO6ZKR.js +0 -1
- package/dist/web/assets/html-CHeBxmFi.js +0 -1
- package/dist/web/assets/htmlMode-SZh8FaPi.js +0 -1
- package/dist/web/assets/index-CjAJoGg5.css +0 -1
- package/dist/web/assets/javascript-l6fV6hf7.js +0 -1
- package/dist/web/assets/liquid-DkFOeJ6J.js +0 -1
- package/dist/web/assets/mdx-BOPNdexu.js +0 -1
- package/dist/web/assets/python-D_wlYLCL.js +0 -1
- package/dist/web/assets/razor-DBFVg4JU.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-YnSeSD_N.js +0 -1
- package/dist/web/assets/typescript-DsixnGVt.js +0 -1
- package/dist/web/assets/xml-dEcQ1gzo.js +0 -1
- package/dist/web/assets/yaml-BfGVqGj4.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as X,o as he,n as ke,q as W,p as ce,m as Je,r,P as gt,Q as ae,u as ge,j as e,a3 as xe,l as k,ae as He,V as bt,D as vt,E as yt,W as Qe,X as Nt,z as wt,af as kt,ag as Ct}from"./index-D9kBRMR0.js";import{S as Ve,T as Ae,R as ie,h as ye,W as L,u as jt,A as St}from"./mermaid-NOHMQCX5-DWQaYVL0.js";import{A as pe}from"./AgentLogo-BCwbooTN.js";import{C as fe}from"./chevron-down-BQcW9sFf.js";import{C as se}from"./check-BN_PVKzE.js";import{d as Tt,F as Et}from"./use-projects-Cuv0A0RC.js";import{M as Ye}from"./MemberAvatar-l-WCdlLA.js";import{u as Mt}from"./use-providers-DLcAY6E1.js";import{P as It}from"./trash-2-R46i6Uus.js";import{P as Rt}from"./useNormalizedLogs-tfxFAJOF.js";const At=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],_n=X("arrow-down",At);const Lt=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_t=X("arrow-up",Lt);const Dt=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Ot=X("gauge",Dt);const Pt=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],zt=X("git-branch",Pt);const $t=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dn=X("search",$t);const Ft=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],qt=X("shield-alert",Ft);const Gt=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Wt=X("shield",Gt);const Bt=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],On=X("square-pen",Bt);const Ut=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Kt=X("zap",Ut);function et(t){const s=he(),a=Je({queryKey:W.sessions.runtime(t),queryFn:()=>ce.get(`/sessions/${t}/runtime`),enabled:!!t});return r.useEffect(()=>{if(!t)return;const o=gt.connect(),l=g=>{g.sessionId===t&&s.invalidateQueries({queryKey:W.sessions.runtime(t)})},u=g=>{g.sessionId===t&&s.setQueryData(W.sessions.runtime(t),g.state)},f=()=>{s.invalidateQueries({queryKey:W.sessions.runtime(t)})};return o.on(ae.SESSION_PERMISSION_REQUESTED,l),o.on(ae.SESSION_PERMISSION_INVALIDATED,l),o.on(ae.SESSION_RUNTIME_STATE_CHANGED,u),o.on("connect",f),()=>{o.off(ae.SESSION_PERMISSION_REQUESTED,l),o.off(ae.SESSION_PERMISSION_INVALIDATED,l),o.off(ae.SESSION_RUNTIME_STATE_CHANGED,u),o.off("connect",f)}},[t,s]),a}function Ht(t){return t==="RUNNING"||t==="AWAITING_PERMISSION"||t==="CANCELLING"}function Qt(t){return t===Ve.RUNNING||t===Ve.PENDING}function Pn(t,s){const{data:a}=et(t);return{runtimeState:a,isActive:Qt(s)||Ht(a?.turnState),isCancelling:a?.turnState==="CANCELLING"}}function Vt(){const t=he();return ke({mutationFn:({sessionId:s,requestId:a,optionId:o})=>ce.post(`/sessions/${s}/permissions/${a}/resolve`,{optionId:o}),onSettled:(s,a,o)=>{t.invalidateQueries({queryKey:W.sessions.runtime(o.sessionId)})}})}function zn(){const t=he();return ke({mutationFn:s=>ce.post(`/sessions/${s}/start`),onSuccess:(s,a)=>{t.invalidateQueries({queryKey:W.sessions.detail(a)}),t.invalidateQueries({queryKey:W.tasks.all})}})}function $n(){const t=he();return ke({mutationFn:s=>ce.post(`/sessions/${s}/stop`),onSuccess:(s,a)=>{t.invalidateQueries({queryKey:W.sessions.detail(a)})}})}function Fn(){const t=he();return ke({mutationFn:({id:s,message:a,providerId:o})=>ce.post(`/sessions/${s}/message`,{message:a,providerId:o}),onSuccess:()=>{t.invalidateQueries({queryKey:W.workspaces.all}),t.invalidateQueries({queryKey:W.tasks.all})}})}function qn({sessionId:t,compact:s=!1}){const{t:a}=ge(),{data:o}=et(t),l=Vt(),u=o?.pendingPermissions[0],f=u?.requestId,g=l.reset;return r.useEffect(()=>{g()},[f,g]),u?e.jsx("div",{className:k("mb-2 border-l-2 border-warning bg-warning/5 px-3 py-2.5",s&&"px-2.5 py-2"),children:e.jsxs("div",{className:"flex min-w-0 items-start gap-2",children:[e.jsx(qt,{className:"mt-0.5 h-4 w-4 shrink-0 text-warning","aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:a("Permission required")}),e.jsx("div",{className:"mt-0.5 break-words text-xs text-muted-foreground",children:u.toolSummary||u.toolName||a("The agent needs approval to continue.")}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:u.options.map(x=>e.jsxs("button",{type:"button",disabled:l.isPending,onClick:()=>l.mutate({sessionId:t,requestId:u.requestId,optionId:x.optionId}),className:k("inline-flex min-h-8 items-center gap-1.5 border px-3 text-xs font-medium transition-colors disabled:opacity-50",x.kind.startsWith("reject")?"border-destructive/30 text-destructive hover:bg-destructive/10":"border-border bg-background text-foreground hover:bg-muted"),children:[l.isPending&&l.variables?.requestId===u.requestId&&l.variables.optionId===x.optionId?e.jsx(xe,{className:"h-3.5 w-3.5 animate-spin","aria-hidden":"true"}):null,x.name]},x.optionId))}),l.error?e.jsx("div",{className:"mt-1.5 text-xs text-destructive",role:"alert",children:l.error.message}):null]})]})}):null}function Ne(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}function Yt(t){return t>=.9?"text-red-500":t>=.7?"text-amber-500":"text-neutral-400"}function Gn({usage:t,tooltipSide:s="top"}){const{t:a}=ge();if(!t)return null;const o=t.modelContextWindow,l=o?t.totalTokens/o:0,u=o?Math.min(Math.round(l*100),100):null,f=o?Yt(l):"text-neutral-400",g=o?e.jsx("span",{children:a("上下文: {used} / {max} tokens",{used:Ne(t.totalTokens),max:Ne(o)})}):e.jsx("span",{children:a("已使用: {used} tokens",{used:Ne(t.totalTokens)})});return e.jsx(Ae,{content:g,side:s,children:e.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 text-xs rounded-lg hover:bg-neutral-100 transition-colors cursor-default select-none",children:[e.jsx(Ot,{size:14,className:f}),e.jsxs("span",{className:`tabular-nums ${f}`,children:[Ne(t.totalTokens),u!==null&&e.jsxs("span",{className:"text-neutral-300 ml-0.5",children:["/ ",u,"%"]})]})]})})}const Xt={damping:.7,stiffness:.05,mass:1.25},Zt=70,Jt=1e3/60,en=350;let Ce=!1;globalThis.document?.addEventListener("mousedown",()=>{Ce=!0});globalThis.document?.addEventListener("mouseup",()=>{Ce=!1});globalThis.document?.addEventListener("click",()=>{Ce=!1});const Wn=(t={})=>{const[s,a]=r.useState(!1),[o,l]=r.useState(t.initial!==!1),[u,f]=r.useState(!1),g=r.useRef(null);g.current=t;const x=r.useCallback(()=>{if(!Ce)return!1;const d=window.getSelection();if(!d||!d.rangeCount)return!1;const h=d.getRangeAt(0);return h.commonAncestorContainer.contains(p.current)||p.current?.contains(h.commonAncestorContainer)},[]),y=r.useCallback(d=>{n.isAtBottom=d,l(d)},[]),C=r.useCallback(d=>{n.escapedFromLock=d,a(d)},[]),n=r.useMemo(()=>{let d;return{escapedFromLock:s,isAtBottom:o,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return p.current?.scrollTop??0},set scrollTop(h){p.current&&(p.current.scrollTop=h,n.ignoreScrollToTop=p.current.scrollTop)},get targetScrollTop(){return!p.current||!I.current?0:p.current.scrollHeight-1-p.current.clientHeight},get calculatedTargetScrollTop(){if(!p.current||!I.current)return 0;const{targetScrollTop:h}=this;if(!t.targetScrollTop)return h;if(d?.targetScrollTop===h)return d.calculatedScrollTop;const v=Math.max(Math.min(t.targetScrollTop(h,{scrollElement:p.current,contentElement:I.current}),h),0);return d={targetScrollTop:h,calculatedScrollTop:v},requestAnimationFrame(()=>{d=void 0}),v},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Zt}}},[]),b=r.useCallback((d={})=>{typeof d=="string"&&(d={animation:d}),d.preserveScrollPosition||y(!0);const h=Date.now()+(Number(d.wait)||0),v=Re(g.current,d.animation),{ignoreEscapes:j=!1}=d;let S,M=n.calculatedTargetScrollTop;d.duration instanceof Promise?d.duration.finally(()=>{S=Date.now()}):S=h+(d.duration??0);const A=async()=>{const B=new Promise(requestAnimationFrame).then(()=>{if(!n.isAtBottom)return n.animation=void 0,!1;const{scrollTop:D}=n,U=performance.now(),K=(U-(n.lastTick??U))/Jt;if(n.animation||(n.animation={behavior:v,promise:B,ignoreEscapes:j}),n.animation.behavior===v&&(n.lastTick=U),x()||h>Date.now())return A();if(D<Math.min(M,n.calculatedTargetScrollTop)){if(n.animation?.behavior===v){if(v==="instant")return n.scrollTop=n.calculatedTargetScrollTop,A();n.velocity=(v.damping*n.velocity+v.stiffness*n.scrollDifference)/v.mass,n.accumulated+=n.velocity*K,n.scrollTop+=n.accumulated,n.scrollTop!==D&&(n.accumulated=0)}return A()}return S>Date.now()?(M=n.calculatedTargetScrollTop,A()):(n.animation=void 0,n.scrollTop<n.calculatedTargetScrollTop?b({animation:Re(g.current,g.current.resize),ignoreEscapes:j,duration:Math.max(0,S-Date.now())||void 0}):n.isAtBottom)});return B.then(D=>(requestAnimationFrame(()=>{n.animation||(n.lastTick=void 0,n.velocity=0)}),D))};return d.wait!==!0&&(n.animation=void 0),n.animation?.behavior===v?n.animation.promise:A()},[y,x,n]),m=r.useCallback(()=>{C(!0),y(!1)},[C,y]),N=r.useCallback(({target:d})=>{if(d!==p.current)return;const{scrollTop:h,ignoreScrollToTop:v}=n;let{lastScrollTop:j=h}=n;n.lastScrollTop=h,n.ignoreScrollToTop=void 0,v&&v>h&&(j=v),f(n.isNearBottom),setTimeout(()=>{if(n.resizeDifference||h===v)return;if(x()){C(!0),y(!1);return}const S=h>j,M=h<j;if(n.animation?.ignoreEscapes){n.scrollTop=j;return}M&&(C(!0),y(!1)),S&&C(!1),!n.escapedFromLock&&n.isNearBottom&&y(!0)},1)},[C,y,x,n]),_=r.useCallback(({target:d,deltaY:h})=>{let v=d;for(;!["scroll","auto"].includes(getComputedStyle(v).overflow);){if(!v.parentElement)return;v=v.parentElement}v===p.current&&h<0&&p.current.scrollHeight>p.current.clientHeight&&!n.animation?.ignoreEscapes&&(C(!0),y(!1))},[C,y,n]),p=Xe(d=>{p.current?.removeEventListener("scroll",N),p.current?.removeEventListener("wheel",_),d?.addEventListener("scroll",N,{passive:!0}),d?.addEventListener("wheel",_,{passive:!0})},[]),I=Xe(d=>{if(n.resizeObserver?.disconnect(),!d)return;let h;n.resizeObserver=new ResizeObserver(([v])=>{const{height:j}=v.contentRect,S=j-(h??j);if(n.resizeDifference=S,n.scrollTop>n.targetScrollTop&&(n.scrollTop=n.targetScrollTop),f(n.isNearBottom),S>=0){const M=Re(g.current,h?g.current.resize:g.current.initial);b({animation:M,wait:!0,preserveScrollPosition:!0,duration:M==="instant"?void 0:en})}else n.isNearBottom&&(C(!1),y(!0));h=j,requestAnimationFrame(()=>{setTimeout(()=>{n.resizeDifference===S&&(n.resizeDifference=0)},1)})}),n.resizeObserver?.observe(d)},[]);return{contentRef:I,scrollRef:p,scrollToBottom:b,stopScroll:m,isAtBottom:o||u,isNearBottom:u,escapedFromLock:s,state:n}};function Xe(t,s){const a=r.useCallback(o=>(a.current=o,t(o)),s);return a}const Ie=new Map;function Re(...t){const s={...Xt};let a=!1;for(const l of t){if(l==="instant"){a=!0;continue}typeof l=="object"&&(a=!1,s.damping=l.damping??s.damping,s.stiffness=l.stiffness??s.stiffness,s.mass=l.mass??s.mass)}const o=JSON.stringify(s);return Ie.has(o)||Ie.set(o,Object.freeze(s)),a?"instant":Ie.get(o)}function Bn({providers:t,currentProviderId:s,agentType:a,runtimeType:o,onSelect:l}){const{t:u}=ge(),[f,g]=r.useState(!1),x=r.useRef(null),y=o===ie.ACP?ie.ACP:ie.CLI,C=t.filter(b=>String(b.provider.agentType)===a&&(b.provider.runtimeType===ie.ACP?ie.ACP:ie.CLI)===y),n=t.find(b=>b.provider.id===s);return r.useEffect(()=>{function b(m){x.current&&!x.current.contains(m.target)&&g(!1)}if(f)return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[f]),C.length<=1?e.jsxs("div",{className:"flex items-center gap-1 text-xs text-neutral-400 px-2 py-1.5 select-none cursor-default",children:[e.jsx(pe,{agentType:n?.provider.agentType??a,className:"size-3.5"}),e.jsx("span",{className:"min-w-0 truncate",children:n?.provider.name?He(n.provider.name,12):a})]}):e.jsxs("div",{className:"relative",ref:x,children:[e.jsxs("button",{onClick:()=>g(!f),className:"flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg transition-colors cursor-pointer hover:bg-neutral-100 text-neutral-400 hover:text-neutral-600",title:`Provider: ${n?.provider.name??a} (click to change)`,children:[e.jsx(pe,{agentType:n?.provider.agentType??a,className:"size-3.5"}),e.jsx("span",{className:"min-w-0 truncate",children:n?.provider.name?He(n.provider.name,12):a}),e.jsx(fe,{size:12,className:`shrink-0 transition-transform ${f?"rotate-180":""}`})]}),f&&e.jsxs("div",{className:"absolute bottom-full right-0 mb-1 bg-white rounded-lg border border-neutral-200 shadow-lg py-1 min-w-[160px] z-50",children:[e.jsx("div",{className:"px-2 py-1 text-xs text-neutral-400 border-b border-neutral-100",children:u("切换渠道")}),C.map(b=>e.jsxs("button",{onClick:()=>{l(b.provider.id),g(!1)},className:`w-full flex items-center justify-between px-3 py-2 text-sm text-left hover:bg-neutral-50 transition-colors ${b.provider.id===s?"bg-blue-50 text-blue-600":"text-neutral-700"}`,children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(pe,{agentType:b.provider.agentType,className:"size-4"}),e.jsx("span",{className:"truncate max-w-[120px]",children:b.provider.name}),b.provider.isDefault&&e.jsx("span",{className:"text-xs text-neutral-400",children:u("(默认)")})]}),b.provider.id===s&&e.jsx(se,{size:14,className:"shrink-0"})]},b.provider.id))]})]})}function Un(t,s){return r.useMemo(()=>{for(let a=t.length-1;a>=0;a--){const o=t[a];if(o.tokenUsage&&typeof o.tokenUsage.totalTokens=="number"&&o.tokenUsage.totalTokens>0)return{totalTokens:o.tokenUsage.totalTokens,modelContextWindow:o.tokenUsage.modelContextWindow}}return s??null},[t,s])}function Ze(t,s,a,o){if(a.filter(f=>f===o).length<=1)return t;const u=a.slice(0,s+1).filter(f=>f===o).length;return`${t} #${u}`}function tn(t){return Object.values(t).filter(Boolean).length}function nn({mode:t,setMode:s,selectedTemplateId:a,setSelectedTemplateId:o,selectedMemberPresetIds:l,setSelectedMemberPresetIds:u,disabled:f=!1,compact:g=!1}){const{t:x}=ge(),{preserveDesktopSearch:y}=bt(),[C,n]=r.useState(!1),{data:b}=Mt(),{data:m,isError:N,isFetching:_,isLoading:p,refetch:I}=vt(),{data:d,isError:h,isFetching:v,isLoading:j,refetch:S}=yt(),M=r.useMemo(()=>new Map((b??[]).map(({provider:c,availability:w})=>[c.id,c.name+(w.type==="NOT_FOUND"?x(" (不可用)"):"")])),[b,x]),A=r.useMemo(()=>new Map((m??[]).map(c=>[c.id,c])),[m]),B=r.useMemo(()=>new Map((d??[]).map(c=>[c.id,c])),[d]),D=r.useMemo(()=>l.map(c=>A.get(c)).filter(c=>!!c),[A,l]);r.useEffect(()=>{m!==void 0&&u(c=>{const w=c.filter(z=>A.has(z));return w.length===c.length&&w.every((z,F)=>z===c[F])?c:w})},[m,A,u]),r.useEffect(()=>{d!==void 0&&o(c=>!c||B.has(c)?c:null)},[o,B,d]);const U=c=>{f||o(w=>w===c?null:c)},K=c=>{f||u(w=>[...w,c])},te=c=>{f||u(w=>w.filter((z,F)=>F!==c))},H=e.jsxs("section",{className:"min-w-0",children:[e.jsx("div",{className:"text-[11px] font-medium text-muted-foreground mb-1.5",children:x("团队模板")}),h?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive",children:[e.jsx("span",{children:x("团队模板加载失败")}),e.jsx("button",{type:"button",onClick:()=>{S()},disabled:f||v,className:"ml-2 underline hover:no-underline",children:x("重试")})]}):j?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(xe,{size:12,className:"animate-spin"}),x("加载中...")]}):(d??[]).length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-border bg-background px-3 py-3 text-xs text-muted-foreground",children:[x("当前没有团队模板"),e.jsx(Qe,{to:y("/settings/team"),className:"ml-1.5 text-info hover:underline",children:x("去创建")})]}):e.jsx("div",{className:k("space-y-1.5",g&&"sm:grid sm:grid-cols-2 sm:gap-1.5 sm:space-y-0"),children:(d??[]).map(c=>{const w=c.id===a,z=c.members?.length??0,F=c.members?.map(V=>V.memberPresetId)??[],q=c.members?.slice(0,3).map((V,le)=>Ze(V.memberPreset?.name??V.memberPresetId,le,F,V.memberPresetId)).join(", ");return e.jsx("button",{type:"button",onClick:()=>U(c.id),disabled:f,className:k("w-full rounded-lg px-3 py-2 text-left border transition-all disabled:cursor-not-allowed disabled:opacity-60",w?"bg-background border-foreground/20 shadow-sm":"bg-background border-border/60 hover:border-border hover:bg-accent"),children:e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:k("text-xs truncate",w?"font-medium text-foreground":"text-foreground"),children:c.name}),e.jsxs("span",{className:"text-[10px] text-muted-foreground shrink-0",children:[z,x("人")]})]}),q&&e.jsx("div",{className:"mt-0.5 text-[10px] text-muted-foreground truncate",children:q})]}),w&&e.jsx(se,{size:13,className:"shrink-0 text-foreground"})]})},c.id)})})]}),ne=D.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:D.map((c,w)=>{const z=Ze(c.name,w,l,c.id);return e.jsxs("div",{className:"inline-flex items-center gap-1 pl-1 pr-0.5 py-0.5 rounded-md border border-border/60 bg-background text-[10px] text-foreground",children:[e.jsx(Ye,{name:c.name,avatar:c.avatar,className:"h-3.5 w-3.5 text-[7px]"}),e.jsx("span",{className:"max-w-[80px] truncate",children:z}),e.jsx("button",{type:"button",onClick:()=>te(w),disabled:f,className:"p-0.5 text-muted-foreground hover:text-destructive disabled:opacity-30 rounded transition-colors",children:e.jsx(Nt,{size:9})})]},`${c.id}-${w}`)})}),re=N?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive",children:[e.jsx("span",{children:x("成员预设加载失败")}),e.jsx("button",{type:"button",onClick:()=>{I()},disabled:f||_,className:"ml-2 underline hover:no-underline",children:x("重试")})]}):p?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(xe,{size:12,className:"animate-spin"}),x("加载中...")]}):(m??[]).length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-border bg-background px-3 py-3 text-xs text-muted-foreground",children:[x("当前没有成员预设"),e.jsx(Qe,{to:y("/settings/team"),className:"ml-1.5 text-info hover:underline",children:x("去创建")})]}):e.jsx("div",{className:"space-y-1 max-h-[180px] overflow-y-auto pr-1",children:(m??[]).map(c=>{const w=l.filter(q=>q===c.id).length,z=M.get(c.providerId)??c.providerId,F=tn(c.capabilities);return e.jsxs("button",{type:"button",onClick:()=>K(c.id),disabled:f,className:k("flex items-center gap-2 w-full px-2 py-1.5 rounded-lg text-left border border-transparent transition-all",f&&"cursor-not-allowed opacity-60","bg-background hover:bg-accent hover:border-border/60"),children:[e.jsx(Ye,{name:c.name,avatar:c.avatar,className:"h-6 w-6 text-[9px] shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-xs text-foreground truncate",children:c.name}),e.jsxs("div",{className:"text-[10px] text-muted-foreground truncate",children:[z," · ",F,"/10"]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[w>0&&e.jsxs("span",{className:"text-[10px] text-foreground font-semibold",children:["×",w]}),e.jsx(It,{size:12,className:"text-muted-foreground"})]})]},c.id)})}),Q=D.length>0&&e.jsx("span",{className:"inline-flex items-center justify-center min-w-[16px] h-4 rounded-full bg-primary text-[10px] font-semibold text-primary-foreground px-1.5",children:D.length}),Z=e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-muted-foreground shrink-0",children:x("执行模式")}),e.jsxs("div",{className:"inline-flex items-center h-7 rounded-md border border-border/70 bg-background p-0.5",children:[e.jsxs("button",{type:"button",onClick:()=>!f&&s("AUTO"),disabled:f,className:k("flex items-center gap-1.5 rounded h-full px-2.5 text-xs transition-all disabled:cursor-not-allowed disabled:opacity-50",t==="AUTO"?"bg-primary text-primary-foreground font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[e.jsx(Kt,{size:11}),x("自动模式")]}),e.jsxs("button",{type:"button",onClick:()=>!f&&s("CONFIRM"),disabled:f,className:k("flex items-center gap-1.5 rounded h-full px-2.5 text-xs transition-all disabled:cursor-not-allowed disabled:opacity-50",t==="CONFIRM"?"bg-primary text-primary-foreground font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[e.jsx(Wt,{size:11}),x("确认模式")]})]})]});return g?e.jsxs("div",{className:"space-y-3",children:[Z,H,e.jsxs("div",{className:"border-t border-border/50 pt-2.5",children:[e.jsxs("button",{type:"button",onClick:()=>!f&&n(c=>!c),disabled:f,"aria-expanded":C,className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground hover:text-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(fe,{size:12,className:k("transition-transform",C?"":"-rotate-90")}),x("追加独立成员"),Q]}),C&&e.jsxs("div",{className:"mt-2",children:[ne,re]})]})]}):e.jsxs("div",{className:"space-y-3.5",children:[Z,e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[H,e.jsxs("section",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:x("追加成员")}),Q]}),ne,re]})]})]})}function sn({commands:t,selectedIndex:s,query:a,hasCatalog:o,title:l="Slash Commands",queryPrefix:u="/",emptyCatalogMessage:f="No slash commands catalog for this agent yet.",emptyQueryMessage:g,insertionHint:x="Enter / Tab to insert",compact:y=!1,onSelect:C}){const n=y?"px-1.5 pb-1.5":"px-2 pb-2",b=y?"px-2 py-1.5":"px-2.5 py-2",m=y?"max-h-36":"max-h-48";return e.jsxs("div",{className:y?"pt-1.5":"pt-2",children:[e.jsxs("div",{className:`mb-1 flex items-center justify-between ${y?"px-2 pt-0.5":"px-3 pt-1"}`,children:[e.jsx("span",{className:"text-[10px] font-medium uppercase tracking-[0.14em] text-neutral-400",children:l}),e.jsx("span",{className:"text-[10px] text-neutral-400",children:x})]}),t.length===0?e.jsx("div",{className:`${y?"px-2 pb-2 pt-1.5 text-[11px]":"px-3 pb-3 pt-2 text-xs"} text-neutral-400`,children:o?g??`No matches for ${u}${a}`:f}):e.jsx("div",{className:`${n} ${m} overflow-y-auto`,children:t.map((N,_)=>e.jsxs("button",{type:"button",onMouseDown:p=>p.preventDefault(),onClick:()=>C(N),className:`w-full rounded-lg border text-left transition-colors ${_===s?"border-neutral-300 bg-neutral-50":"border-transparent hover:border-neutral-200 hover:bg-neutral-50/80"} ${b}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"font-mono text-[13px] text-neutral-900",children:N.command}),N.kind&&N.kind!=="builtin"?e.jsx("span",{className:"rounded-full border border-neutral-200 px-1.5 py-0.5 text-[9px] uppercase tracking-[0.12em] text-neutral-500",children:N.scope?`${N.scope} ${N.kind}`:N.kind}):null]}),e.jsx("div",{className:`${y?"mt-0.5 text-[11px]":"mt-1 text-xs"} text-neutral-500`,children:N.description})]},N.command))})]})}const ee=12,we=8;function rn({open:t,anchorRef:s,commands:a,selectedIndex:o,query:l,hasCatalog:u,title:f,queryPrefix:g,emptyCatalogMessage:x,emptyQueryMessage:y,insertionHint:C,compact:n=!1,onSelect:b}){const m=r.useRef(null),[N,_]=r.useState(null);return r.useLayoutEffect(()=>{if(!t){_(null);return}const p=s.current;if(!p)return;let I=0;const d=()=>{const j=s.current;if(!j)return;const S=j.getBoundingClientRect(),M=window.innerWidth,A=window.innerHeight,B=n?260:320,D=n?M-ee*2:560,U=Math.min(Math.max(S.width,B),Math.max(B,D)),K=Math.min(Math.max(ee,S.left),Math.max(ee,M-ee-U)),te=A-S.bottom-we-ee,H=S.top-we-ee,ne=m.current?.offsetHeight??(n?220:280),re=n?240:320,Q=te<180&&H>te,c=Math.max(120,Math.min(re,Q?H:te)),w=Q?Math.max(ee,S.top-we-Math.min(ne,c)):Math.min(A-ee-Math.min(ne,c),S.bottom+we);_({top:w,left:K,width:U,maxHeight:c})},h=()=>{cancelAnimationFrame(I),I=requestAnimationFrame(d)};h();const v=new ResizeObserver(h);return v.observe(p),m.current&&v.observe(m.current),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),window.visualViewport?.addEventListener("resize",h),window.visualViewport?.addEventListener("scroll",h),()=>{cancelAnimationFrame(I),v.disconnect(),window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0),window.visualViewport?.removeEventListener("resize",h),window.visualViewport?.removeEventListener("scroll",h)}},[s,a.length,n,t,l,o]),!t||!N||typeof document>"u"?null:wt.createPortal(e.jsx("div",{className:"pointer-events-none fixed inset-0 z-[120]",children:e.jsx("div",{ref:m,className:"pointer-events-auto fixed overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-lg shadow-neutral-200/70",style:{top:N.top,left:N.left,width:N.width,maxHeight:N.maxHeight},children:e.jsx(sn,{commands:a,selectedIndex:o,query:l,hasCatalog:u,title:f,queryPrefix:g,emptyCatalogMessage:x,emptyQueryMessage:y,insertionHint:C,compact:n,onSelect:b})})}),document.body)}function on({agentType:t,workingDir:s}){return Je({queryKey:W.system.slashCommandCatalog(t,s),queryFn:async()=>(await ce.get("/system/slash-command-catalog",{params:{agentType:String(t),...s?{workingDir:s}:{}}})).commands,enabled:!!t,staleTime:3e4})}function an(t,s){const a=new Set,o=[];for(const l of[...t,...s]){const u=l.command.trim().toLowerCase();!u||a.has(u)||(a.add(u),o.push(l.kind?l:{...l,kind:"builtin"}))}return o}function je(t){return t.trim().toLowerCase().replace(/^[/$]/,"")}function cn(t){return je(t.command)}function ln(t,s){if(!s)return 1e3;const a=cn(t),o=t.aliases?.map(je)??[],l=[a,...o];let u=0;for(const g of l)g===s?u=Math.max(u,500):g.startsWith(s)?u=Math.max(u,400-(g.length-s.length)):g.includes(s)&&(u=Math.max(u,250-g.indexOf(s)));return u>0?u:`${a} ${o.join(" ")} ${t.description}`.toLowerCase().includes(s)?100:0}function Kn(t){const s=/(^|[\s])\$([^\s]*)$/.exec(t);if(!s||s.index===void 0)return null;const a=s.index+s[1].length;return{query:je(s[2]),replaceStart:a}}function dn(t,s){const a=je(s);return a?t.map((o,l)=>({command:o,index:l,score:ln(o,a)})).filter(o=>o.score>0).sort((o,l)=>l.score-o.score||o.index-l.index||o.command.command.localeCompare(l.command.command)).map(o=>o.command):t.slice()}const mn=[{command:"/permissions",description:"Manage what Codex can do without approval"},{command:"/sandbox-add-read-dir",description:"Grant read access to another directory"},{command:"/agent",description:"Switch between built-in agent personas"},{command:"/apps",description:"Manage connected apps"},{command:"/clear",description:"Start a fresh conversation"},{command:"/compact",description:"Replace chat context with a summary"},{command:"/copy",description:"Copy the last assistant message to your clipboard"},{command:"/diff",description:"Show the current git diff"},{command:"/experimental",description:"Toggle experimental features"},{command:"/feedback",description:"Share feedback on Codex CLI"},{command:"/init",description:"Create or update AGENTS.md for the repo"},{command:"/logout",description:"Sign out of Codex"},{command:"/mcp",description:"Manage MCP servers"},{command:"/mention",description:"Add files or directories to the conversation context"},{command:"/model",description:"Change the active model"},{command:"/fast",description:"Toggle low reasoning mode"},{command:"/plan",description:"Toggle plan mode for code changes"},{command:"/personality",description:"Select how Codex communicates"},{command:"/ps",description:"List running background tasks"},{command:"/fork",description:"Fork the current conversation state"},{command:"/resume",description:"Resume a previous conversation"},{command:"/new",description:"Open a conversation picker to start or resume"},{command:"/quit",description:"Exit Codex CLI",aliases:["exit"]},{command:"/review",description:"Run a code review"},{command:"/status",description:"Show session and configuration status"},{command:"/debug-config",description:"Inspect the effective configuration"},{command:"/statusline",description:"Configure the custom status line"},{command:"/skills",description:"Browse available skills and insert a $skill mention"}],un=[{command:"/clear",description:"Clear the conversation history"},{command:"/compact",description:"Compact the conversation context",aliases:["compact focus"]},{command:"/config",description:"Open the configuration panel"},{command:"/cost",description:"Show token usage and cost"},{command:"/doctor",description:"Check Claude Code installation health"},{command:"/help",description:"Show help and available commands"},{command:"/init",description:"Initialize project instructions"},{command:"/login",description:"Sign in to Claude Code"},{command:"/logout",description:"Sign out of Claude Code"},{command:"/mcp",description:"Manage MCP servers"},{command:"/memory",description:"Edit project memory files"},{command:"/model",description:"Change the active model"},{command:"/permissions",description:"Review or update tool permissions"},{command:"/pr_comments",description:"Read pull request review comments"},{command:"/review",description:"Run a code review"},{command:"/status",description:"Show account and system status"},{command:"/terminal-setup",description:"Configure terminal newline shortcuts"},{command:"/vim",description:"Toggle vim mode"}],pn=[{command:"/bug",description:"File an issue about Gemini CLI"},{command:"/chat",description:"Manage chat checkpoints and exports"},{command:"/clear",description:"Clear the terminal display"},{command:"/compress",description:"Replace chat context with a summary"},{command:"/copy",description:"Copy the last Gemini CLI output"},{command:"/directory",description:"Manage additional workspace directories",aliases:["dir"]},{command:"/editor",description:"Choose the preferred editor"},{command:"/extensions",description:"List active Gemini CLI extensions"},{command:"/help",description:"Show help and command usage",aliases:["?"]},{command:"/mcp",description:"Show MCP servers and tools"},{command:"/memory",description:"Manage loaded GEMINI.md memory"},{command:"/restore",description:"Restore files from a tool checkpoint"},{command:"/settings",description:"Open the Gemini CLI settings editor"},{command:"/stats",description:"Show session statistics and token usage"},{command:"/theme",description:"Change the Gemini CLI theme"},{command:"/auth",description:"Change the authentication method"},{command:"/about",description:"Show version information"},{command:"/tools",description:"List currently available tools"},{command:"/privacy",description:"Review privacy and data collection settings"},{command:"/quit",description:"Exit Gemini CLI",aliases:["exit"]},{command:"/vim",description:"Toggle vim mode"},{command:"/init",description:"Generate a tailored GEMINI.md file"}],fn=[{command:"/model",description:"Change the active model"},{command:"/plan",description:"Create or reopen a plan"},{command:"/ask",description:"Toggle ask mode (read-only Q&A)"},{command:"/debug",description:"Toggle debug mode"},{command:"/clear",description:"Start a new chat session",aliases:["new","new-chat","newchat"]},{command:"/compress",description:"Summarize the conversation to reduce context"},{command:"/vim",description:"Toggle vim mode"},{command:"/shell",description:"Enter shell mode"},{command:"/about",description:"Show CLI, system, and account information"},{command:"/setup-terminal",description:"Configure terminal newline shortcuts"},{command:"/feedback",description:"Share feedback with the Cursor team"},{command:"/open",description:"Open the repository git root in Cursor"},{command:"/cursor",description:"Alias for /open",aliases:["open"]},{command:"/resume-chat",description:"Resume a previous chat by folder name",aliases:["resume"]},{command:"/copy-request-id",description:"Copy the last request ID"},{command:"/copy-conversation-id",description:"Copy the current conversation ID"},{command:"/logout",description:"Sign out from Cursor"},{command:"/quit",description:"Exit Cursor Agent",aliases:["exit"]},{command:"/mcp",description:"Manage MCP servers"}],xn={[ye.CODEX]:mn,[ye.CLAUDE_CODE]:un,[ye.GEMINI_CLI]:pn,[ye.CURSOR_AGENT]:fn};function tt(t){return t.trim().toLowerCase().replace(/^\//,"")}function hn(t){return t?(xn[t]??[]).map(s=>({...s,kind:s.kind??"builtin"})):[]}function gn(t){const s=t.match(/^\s*\/([^\s]*)$/);return s?tt(s[1]):null}function bn(t,s){return dn(t,tt(s))}function vn(t){const s=t.key==="Enter"&&!t.shiftKey&&!t.repeat&&!t.nativeEvent.isComposing&&t.nativeEvent.keyCode!==229,a=t.key==="Tab"&&!t.shiftKey;return s||a}function yn({agentType:t,workingDir:s,input:a,setInput:o,textareaRef:l,minHeight:u,maxHeight:f}){const[g,x]=r.useState(0),{data:y=[]}=on({agentType:t,workingDir:s}),C=r.useMemo(()=>an(hn(t),y),[t,y]),n=r.useMemo(()=>gn(a),[a]),b=r.useMemo(()=>n===null?[]:bn(C,n),[C,n]),m=r.useCallback(()=>{const p=l.current;p&&(p.style.height="auto",p.style.height=`${Math.max(u,Math.min(p.scrollHeight,f))}px`)},[f,u,l]);r.useEffect(()=>{x(0)},[t,n]),r.useEffect(()=>{g<b.length||x(0)},[b.length,g]);const N=r.useCallback(p=>{const d=`${a.match(/^(\s*)\/[^\s]*$/)?.[1]??""}${p.command} `;o(d),requestAnimationFrame(()=>{const h=l.current;h&&(m(),h.focus(),h.setSelectionRange(d.length,d.length))})},[a,m,o,l]),_=r.useCallback(p=>n===null||b.length===0?!1:p.key==="ArrowDown"?(p.preventDefault(),x(I=>(I+1)%b.length),!0):p.key==="ArrowUp"?(p.preventDefault(),x(I=>(I-1+b.length)%b.length),!0):vn(p)?(p.preventDefault(),N(b[g]??b[0]),!0):!1,[N,b,n,g]);return{allCommands:C,query:n,filteredCommands:b,selectedIndex:g,setSelectedIndex:x,applyCommand:N,handleKeyDown:_}}const Nn="/assets/agent-tower-lockup-DPAcheCt.png";function Hn({className:t="h-6 w-auto max-[359px]:h-[22px]"}){return e.jsx("img",{src:Nn,alt:"Agent Tower",className:`block shrink-0 select-none object-contain ${t}`})}const wn={idle:"","creating-task":"Creating Task...","creating-teamrun":"Creating TeamRun...","creating-workspace":"Creating Workspace...","creating-session":"Creating Session...","starting-session":"Starting Agent..."};function Qn({variant:t="task",projects:s,providers:a,isProvidersLoading:o,onSubmit:l,defaultProjectId:u="",defaultProviderId:f="",onProjectChange:g,createStep:x,placeholder:y,submitLabel:C,pendingLabel:n,submitTitle:b}){const{t:m}=ge(),[N,_]=r.useState(""),[p,I]=r.useState(u),[d,h]=r.useState(f),[v,j]=r.useState("SOLO"),[S,M]=r.useState(L.WORKTREE),[A,B]=r.useState({}),[D,U]=r.useState("AUTO"),[K,te]=r.useState(null),[H,ne]=r.useState([]),[re,Q]=r.useState(!1),[Z,c]=r.useState(!1),[w,z]=r.useState(!1),[F,q]=r.useState(!1),V=r.useRef(null),le=r.useRef(null),Se=r.useRef(null),Le=r.useRef(null),_e=r.useRef(null),De=r.useRef(null),{files:Oe,addFiles:oe,removeFile:nt,clear:Pe,buildMarkdownLinks:ze,getDoneAttachments:$e,isUploading:be}=jt(),de=Tt(),T=t==="conversation",E=t==="task"||t==="conversation",st=C??m(T?"开始":"创建");r.useEffect(()=>{I(u),g?.(u)},[u,g]),r.useEffect(()=>{h(f)},[f]),r.useEffect(()=>{if(!Z)return;const i=R=>{V.current&&!V.current.contains(R.target)&&c(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[Z]),r.useEffect(()=>{if(!w)return;const i=R=>{le.current&&!le.current.contains(R.target)&&z(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[w]),r.useEffect(()=>{if(!F)return;const i=R=>{Se.current&&!Se.current.contains(R.target)&&q(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[F]);const G=r.useMemo(()=>s.find(i=>i.id===p),[s,p]),ve=r.useMemo(()=>a.find(i=>i.id===d),[a,d]),Te=p?A[p]:void 0,rt=(Te?.isGitRepo??G?.isGitRepo)!==!1,ot=(Te?.worktreeReady??G?.worktreeReady)!==!1,$=!T&&!(rt&&ot),O=$?"SOLO":v,Y=$?L.MAIN_DIRECTORY:S,at=Y===L.MAIN_DIRECTORY?m("本地模式"):m("工作树模式"),Fe=m("工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。"),it=m("本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。"),ct=Te?.reason??G?.reason,qe=m(ct==="NO_HEAD"?"已检测到 Git,但需要先提交一次才能使用工作树模式。":"初始化 Git 后可使用工作树模式。"),Ge=T||O==="SOLO"?ve?.agentType:null,J=yn({agentType:Ge,workingDir:T?void 0:G?.repoPath,input:N,setInput:_,textareaRef:_e,minHeight:76,maxHeight:220}),P=x!=="idle",We=!!K||H.length>0,me=!P&&!be&&N.trim().length>0&&(T?!!d:!!p&&(O==="SOLO"?!!d:We));r.useEffect(()=>{$&&(j("SOLO"),M(L.MAIN_DIRECTORY),Q(!1),q(!1))},[$]),r.useEffect(()=>{$||T||M(L.WORKTREE)},[T,$,G?.id]);const lt=r.useCallback(async()=>{if(!G||de.isPending)return;const i=await de.mutateAsync({id:G.id});B(R=>({...R,[G.id]:i})),i.worktreeReady&&(j("SOLO"),M(L.WORKTREE),q(!1))},[de,G]),Ee=r.useCallback(async()=>{if(!me)return;const i=E?ze():"",R=E?$e().map(ue=>ue.id):[];try{await l({title:N.trim(),description:"",projectId:T?"":p,providerId:d,mode:T?"SOLO":O,workspaceMode:!T&&O==="SOLO"?Y:L.WORKTREE,teamRunMode:T?"AUTO":D,teamTemplateId:T||$?null:K,memberPresetIds:T||$?[]:H,attachmentLinks:i,attachmentIds:R}),_(""),E&&Pe()}catch{}},[me,E,ze,$e,l,N,T,p,d,O,Y,D,$,K,H,Pe]),dt=r.useCallback(i=>{J.handleKeyDown(i)||i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&i.nativeEvent.keyCode!==229&&(i.preventDefault(),Ee())},[Ee,J]),mt=r.useCallback(i=>{const R=i.target.files;R&&R.length>0&&oe(Array.from(R)),i.target.value=""},[oe]),ut=r.useCallback(i=>{I(i),g?.(i),c(!1)},[g]),pt=r.useCallback(i=>{if(!E)return;const R=i.clipboardData.items,ue=[];for(const Ue of R)if(Ue.kind==="file"){const Ke=Ue.getAsFile();Ke&&ue.push(Ke)}ue.length>0&&(i.preventDefault(),oe(ue))},[oe,E]),[Be,Me]=r.useState(!1),ft=r.useCallback(i=>{E&&(i.preventDefault(),Me(!0))},[E]),xt=r.useCallback(i=>{E&&(i.preventDefault(),Me(!1))},[E]),ht=r.useCallback(i=>{if(!E)return;i.preventDefault(),Me(!1);const R=i.dataTransfer.files;R.length>0&&oe(Array.from(R))},[oe,E]);return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{ref:Le,className:k("relative bg-background rounded-xl border transition-colors duration-200","shadow-[0_1px_2px_rgba(0,0,0,0.05)]","hover:border-ring/40 focus-within:border-ring/60",Be?"border-info bg-info/5":"border-border",P&&"opacity-80"),onDragOver:E?ft:void 0,onDragLeave:E?xt:void 0,onDrop:E?ht:void 0,children:[E&&Oe.length>0&&e.jsx("div",{className:"px-4 pt-3",children:e.jsx(St,{files:Oe,onRemove:nt})}),e.jsx("textarea",{ref:_e,value:N,onChange:i=>_(i.target.value),onKeyDown:dt,onPaste:E?pt:void 0,placeholder:m(y||"Describe your task..."),disabled:P,autoFocus:!0,rows:1,className:"w-full px-4 pt-4 pb-2 bg-transparent border-none focus:outline-none resize-none text-[15px] text-foreground placeholder:text-muted-foreground/80 leading-relaxed",style:{minHeight:"76px",maxHeight:"220px",fieldSizing:"content"}}),E&&Be&&e.jsx("div",{className:"px-4 pb-2",children:e.jsx("div",{className:"flex items-center justify-center py-3 border border-dashed border-info/40 rounded-lg text-xs font-medium text-info",children:m("Drop files here")})}),e.jsxs("div",{className:"flex items-center justify-between px-2 pb-2 pt-1",children:[e.jsx("div",{className:"flex items-center gap-1",children:E?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>De.current?.click(),disabled:P||be,className:"p-2 text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:m("Attach files"),children:e.jsx(Rt,{size:18})}),e.jsx("input",{ref:De,type:"file",multiple:!0,onChange:mt,className:"hidden"})]}):null}),e.jsxs("div",{className:"flex items-center gap-2",children:[E&&be&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(xe,{size:14,className:"animate-spin"}),m("Uploading...")]}),P&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(xe,{size:14,className:"animate-spin"}),m(n??wn[x])]}),!T&&!P&&!be&&O==="TEAM"&&!We&&N.trim().length>0&&e.jsx("span",{className:"text-[11px] text-warning",children:m("请选择团队模板或追加成员")}),me&&e.jsxs("span",{className:"hidden sm:inline-flex items-center gap-1 text-[11px] text-muted-foreground/80 select-none",children:[e.jsx("kbd",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded border border-border bg-muted/60 text-[10px] font-medium text-muted-foreground leading-none",children:"⏎"}),st]}),e.jsx("button",{type:"button",onClick:Ee,disabled:!me,className:k("flex items-center justify-center size-8 rounded-lg transition-all duration-200",me?"bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm":"bg-muted text-muted-foreground/40 cursor-not-allowed"),title:m(b||"Create & Start"),children:e.jsx(_t,{size:16,strokeWidth:2.5})})]})]})]}),e.jsx(rn,{open:!!Ge&&J.query!==null,anchorRef:Le,commands:J.filteredCommands,selectedIndex:J.selectedIndex,query:J.query??"",hasCatalog:J.allCommands.length>0,compact:!0,onSelect:J.applyCommand}),e.jsxs("div",{className:"flex items-center flex-wrap gap-1.5 mt-2.5 px-0.5",children:[!T&&e.jsxs("div",{className:"relative",ref:V,children:[e.jsxs("button",{type:"button",onClick:()=>{P||c(i=>!i)},disabled:P,className:k("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed",G?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(Et,{size:14,className:"shrink-0",style:{color:G?.color??"var(--muted-foreground)"}}),e.jsx("span",{className:"max-w-[120px] truncate",children:G?.name??m("Project")}),e.jsx(fe,{size:12,className:k("text-muted-foreground transition-transform",Z&&"rotate-180")})]}),Z&&e.jsx("div",{className:"absolute top-full left-0 mt-1.5 w-56 bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 max-h-[240px] overflow-y-auto z-50",children:s.map(i=>e.jsxs("button",{type:"button",onClick:()=>ut(i.id),className:"flex items-center w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",children:[e.jsx("span",{className:"size-2 rounded-full shrink-0 mr-2",style:{backgroundColor:i.color??"var(--muted-foreground)"}}),e.jsx("span",{className:k("truncate flex-1",i.id===p?"text-foreground font-medium":"text-muted-foreground"),children:i.name}),e.jsx(se,{size:14,className:k("ml-2 shrink-0 text-foreground",i.id===p?"opacity-100":"opacity-0")})]},i.id))})]}),(T||O==="SOLO")&&e.jsxs("div",{className:"relative",ref:le,children:[e.jsxs("button",{type:"button",onClick:()=>{P||z(i=>!i)},disabled:P,className:k("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed",ve?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(pe,{agentType:ve?.agentType,className:"size-3.5"}),e.jsx("span",{className:"max-w-[120px] truncate",children:ve?.name??m(o?"Loading...":"Agent")}),e.jsx(fe,{size:12,className:k("text-muted-foreground transition-transform",w&&"rotate-180")})]}),w&&e.jsx("div",{className:"absolute top-full left-0 mt-1.5 w-56 bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 max-h-[240px] overflow-y-auto z-50",children:a.map(i=>e.jsxs("button",{type:"button",disabled:!i.available,onClick:()=>{h(i.id),z(!1)},className:k("flex items-center w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",!i.available&&"opacity-40 cursor-not-allowed"),children:[e.jsx(se,{size:14,className:k("mr-2 shrink-0 text-foreground",i.id===d?"opacity-100":"opacity-0")}),e.jsx(pe,{agentType:i.agentType,className:"mr-2 size-3.5"}),e.jsxs("span",{className:k("min-w-0 truncate",i.id===d?"text-foreground font-medium":"text-muted-foreground"),children:[i.name,i.available?"":m(" (unavailable)")]})]},i.id))})]}),!T&&O==="SOLO"&&e.jsxs("div",{className:"relative",ref:Se,children:[e.jsxs("button",{type:"button",onClick:()=>{P||q(i=>!i)},disabled:P,className:k("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed text-foreground/80"),children:[e.jsx(zt,{size:14,className:"text-muted-foreground"}),e.jsx("span",{className:"max-w-[96px] truncate",children:at}),e.jsx(fe,{size:12,className:k("text-muted-foreground transition-transform",F&&"rotate-180")})]}),F&&e.jsxs("div",{className:"absolute top-full left-0 mt-1.5 w-72 max-w-[calc(100vw-2rem)] bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 z-50",children:[$?e.jsx(Ae,{side:"bottom",className:"block w-full",content:qe,children:e.jsxs("div",{tabIndex:0,"aria-label":qe,className:"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[e.jsxs("button",{type:"button",disabled:!0,className:"flex w-full cursor-not-allowed items-center px-3 py-2 text-left text-xs opacity-40 transition-colors",children:[e.jsx(se,{size:14,className:"mr-2 mt-0.5 shrink-0 text-foreground opacity-0"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate text-muted-foreground",children:m("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:Fe})]})]}),e.jsx("button",{type:"button",onClick:lt,disabled:de.isPending,className:"flex w-full items-center px-3 py-2 text-left text-xs text-muted-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50",children:de.isPending?m("检测中..."):m("重新检测 Git 状态")})]})}):e.jsxs("button",{type:"button",onClick:()=>{M(L.WORKTREE),q(!1)},className:"flex w-full items-center px-3 py-2 text-left text-xs transition-colors hover:bg-accent",children:[e.jsx(se,{size:14,className:k("mr-2 mt-0.5 shrink-0 text-foreground",Y===L.WORKTREE?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:k("block truncate",Y===L.WORKTREE?"text-foreground font-medium":"text-muted-foreground"),children:m("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:Fe})]})]}),e.jsxs("button",{type:"button",onClick:()=>{M(L.MAIN_DIRECTORY),q(!1)},className:"flex items-start w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",children:[e.jsx(se,{size:14,className:k("mr-2 mt-0.5 shrink-0 text-foreground",Y===L.MAIN_DIRECTORY?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:k("block truncate",Y===L.MAIN_DIRECTORY?"text-foreground font-medium":"text-muted-foreground"),children:m("本地模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:it})]})]})]})]}),!T&&e.jsx(Ae,{side:"bottom",className:"ml-auto",content:$?m("Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun."):Y===L.MAIN_DIRECTORY?m("TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。"):m("启用 TeamRun 后可选择团队模板或成员。"),children:e.jsxs("button",{type:"button",role:"switch","aria-checked":O==="TEAM",onClick:()=>{P||$||(v==="TEAM"?(j("SOLO"),Q(!1)):(j("TEAM"),q(!1),M(L.WORKTREE),Q(!0)))},disabled:P||$,className:k("flex items-center gap-2 h-7 pl-2 pr-2 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",O==="TEAM"?"text-foreground/80":"text-muted-foreground"),"aria-label":m("启用团队模式"),children:[e.jsx(kt,{size:14,className:O==="TEAM"?"text-foreground/80":"text-muted-foreground"}),e.jsx("span",{children:m("团队模式")}),($||Y===L.MAIN_DIRECTORY)&&O!=="TEAM"?e.jsx(Ct,{size:12,className:"text-muted-foreground/70","aria-hidden":"true"}):null,e.jsx("span",{className:k("relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors",O==="TEAM"?"bg-primary":"bg-border"),children:e.jsx("span",{className:k("inline-block size-3 rounded-full bg-background shadow-sm transition-transform",O==="TEAM"?"translate-x-3.5":"translate-x-0.5")})})]})})]}),!T&&O==="TEAM"&&re&&e.jsx("div",{className:"mt-2.5 rounded-xl border border-border/60 bg-muted/40 p-3 animate-[fadeInUp_0.25s_cubic-bezier(0.16,1,0.3,1)]",children:e.jsx(nn,{mode:D,setMode:U,selectedTemplateId:K,setSelectedTemplateId:te,selectedMemberPresetIds:H,setSelectedMemberPresetIds:ne,disabled:P,compact:!0})})]})}export{_n as A,Hn as B,Qn as C,zt as G,Bn as P,qn as R,On as S,Gn as T,Kt as Z,Un as a,Pn as b,_t as c,Dn as d,zn as e,nn as f,Fn as g,Kn as h,dn as i,yn as j,$n as k,rn as l,Wt as m,Wn as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as x,m,q as o,p as u,u as p,r as g,t as n,j as e,S as a,a3 as f,B as i,a5 as h}from"./index-D9kBRMR0.js";import{C as j}from"./copy-DaoAUKTO.js";import{C as b}from"./check-BN_PVKzE.js";const y=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],N=x("server",y);function C(){return m({queryKey:o.system.mcpConfig,queryFn:()=>u.get("/system/mcp-config")})}function v({mode:s,label:t}){const r=s==="desktop-packaged";return e.jsx("span",{className:`inline-flex items-center rounded-md px-2 py-1 text-[11px] font-medium ${r?"bg-emerald-50 text-emerald-700":"bg-amber-50 text-amber-700"}`,children:t})}function z(){const{t:s}=p(),{data:t,isLoading:r,isError:l,refetch:d}=C(),c=g.useCallback(async()=>{if(t?.configJson)try{await navigator.clipboard.writeText(t.configJson),n.success(s("MCP 配置已复制"))}catch{n.error(s("复制 MCP 配置失败"))}},[t?.configJson,s]);return r?e.jsx(a,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(f,{className:"h-5 w-5 animate-spin text-neutral-500"})})}):l||!t?e.jsxs(a,{children:[e.jsx("h2",{className:"mb-1 text-base font-semibold text-neutral-900",children:s("MCP 配置")}),e.jsx("div",{className:"mt-5 rounded-lg border border-red-100 bg-red-50 px-4 py-3 text-sm text-red-700",children:s("MCP 配置加载失败")}),e.jsx(i,{className:"mt-4",size:"sm",variant:"outline",onClick:()=>{d()},children:s("重试")})]}):e.jsxs(a,{children:[e.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-neutral-900",children:s("MCP 配置")}),e.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-neutral-500",children:s("复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。")})]}),e.jsxs(i,{size:"sm",onClick:c,children:[e.jsx(j,{size:14}),s("复制配置")]})]}),e.jsxs("div",{className:"space-y-3 border-b border-neutral-100 pb-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(v,{mode:t.runtimeMode,label:t.runtimeMode==="desktop-packaged"?s("桌面打包 runtime"):s("工作区 runtime")}),e.jsx("span",{className:"text-[12px] text-neutral-400",children:t.serverName})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-neutral-100 bg-neutral-50/70 p-3",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-[11px] font-medium uppercase text-neutral-400",children:[e.jsx(h,{size:12}),"Command"]}),e.jsx("div",{className:"break-all font-mono text-[12px] leading-relaxed text-neutral-800",children:t.command})]}),e.jsxs("div",{className:"rounded-lg border border-neutral-100 bg-neutral-50/70 p-3",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-[11px] font-medium uppercase text-neutral-400",children:[e.jsx(N,{size:12}),"Entry"]}),e.jsx("div",{className:"break-all font-mono text-[12px] leading-relaxed text-neutral-800",children:t.args.at(-1)??""})]})]})]}),e.jsxs("div",{className:"pt-5",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("label",{className:"text-[12px] font-medium text-neutral-600",children:"mcpServers JSON"}),t.runtimeMode==="desktop-packaged"&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] text-emerald-600",children:[e.jsx(b,{size:12}),s("无需全局 CLI")]})]}),e.jsx("textarea",{readOnly:!0,value:t.configJson,rows:14,className:"w-full resize-y rounded-lg border border-neutral-200 bg-neutral-950 px-3 py-3 font-mono text-[12px] leading-relaxed text-neutral-100 outline-none"}),e.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-neutral-400",children:s("当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。")})]})]})}export{z as McpSettingsPage};
|