agent-tower 0.7.2-beta.6 → 0.7.2-beta.8
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 +4 -1
- package/dist/app.js.map +1 -1
- package/dist/app.test.js +80 -1
- package/dist/app.test.js.map +1 -1
- package/dist/cli.js +4 -10
- package/dist/cli.js.map +1 -1
- package/dist/core/container.d.ts +8 -0
- package/dist/core/container.d.ts.map +1 -1
- package/dist/core/container.js +42 -0
- package/dist/core/container.js.map +1 -1
- package/dist/core/event-bus.d.ts +2 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/executors/__tests__/image-utils.test.d.ts +2 -0
- package/dist/executors/__tests__/image-utils.test.d.ts.map +1 -0
- package/dist/executors/__tests__/image-utils.test.js +25 -0
- package/dist/executors/__tests__/image-utils.test.js.map +1 -0
- package/dist/executors/base.executor.d.ts +2 -0
- package/dist/executors/base.executor.d.ts.map +1 -1
- package/dist/executors/base.executor.js +6 -0
- package/dist/executors/base.executor.js.map +1 -1
- package/dist/executors/image-utils.d.ts.map +1 -1
- package/dist/executors/image-utils.js +10 -8
- package/dist/executors/image-utils.js.map +1 -1
- package/dist/git/git-cli.d.ts +2 -0
- package/dist/git/git-cli.d.ts.map +1 -1
- package/dist/git/git-cli.js +2 -0
- package/dist/git/git-cli.js.map +1 -1
- package/dist/git/worktree.manager.d.ts +2 -1
- package/dist/git/worktree.manager.d.ts.map +1 -1
- package/dist/git/worktree.manager.js +18 -12
- package/dist/git/worktree.manager.js.map +1 -1
- package/dist/index.js +16 -31
- package/dist/index.js.map +1 -1
- package/dist/mcp/http-client.d.ts +1 -0
- package/dist/mcp/http-client.d.ts.map +1 -1
- package/dist/mcp/http-client.js +3 -0
- package/dist/mcp/http-client.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +15 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/sessions.js +2 -2
- package/dist/mcp/tools/sessions.js.map +1 -1
- package/dist/mcp/tools/workspaces.d.ts.map +1 -1
- package/dist/mcp/tools/workspaces.js +2 -1
- package/dist/mcp/tools/workspaces.js.map +1 -1
- package/dist/middleware/access-auth.d.ts +1 -0
- package/dist/middleware/access-auth.d.ts.map +1 -1
- package/dist/middleware/access-auth.js +1 -1
- package/dist/middleware/access-auth.js.map +1 -1
- package/dist/output/__tests__/text-block-lifecycle.test.d.ts +2 -0
- package/dist/output/__tests__/text-block-lifecycle.test.d.ts.map +1 -0
- package/dist/output/__tests__/text-block-lifecycle.test.js +241 -0
- package/dist/output/__tests__/text-block-lifecycle.test.js.map +1 -0
- package/dist/output/claude-code-parser.d.ts +3 -0
- package/dist/output/claude-code-parser.d.ts.map +1 -1
- package/dist/output/claude-code-parser.js +58 -7
- package/dist/output/claude-code-parser.js.map +1 -1
- package/dist/output/codex-parser.d.ts.map +1 -1
- package/dist/output/codex-parser.js +4 -6
- package/dist/output/codex-parser.js.map +1 -1
- package/dist/output/cursor-agent-parser.d.ts.map +1 -1
- package/dist/output/cursor-agent-parser.js +4 -0
- package/dist/output/cursor-agent-parser.js.map +1 -1
- package/dist/output/gemini-parser.d.ts +18 -0
- package/dist/output/gemini-parser.d.ts.map +1 -0
- package/dist/output/gemini-parser.js +91 -0
- package/dist/output/gemini-parser.js.map +1 -0
- package/dist/output/msg-store.d.ts +6 -0
- package/dist/output/msg-store.d.ts.map +1 -1
- package/dist/output/msg-store.js +17 -0
- package/dist/output/msg-store.js.map +1 -1
- package/dist/output/text-block-tracker.d.ts +29 -0
- package/dist/output/text-block-tracker.d.ts.map +1 -0
- package/dist/output/text-block-tracker.js +149 -0
- package/dist/output/text-block-tracker.js.map +1 -0
- package/dist/output/types.d.ts +9 -0
- package/dist/output/types.d.ts.map +1 -1
- package/dist/output/types.js +0 -4
- package/dist/output/types.js.map +1 -1
- package/dist/routes/__tests__/sessions-runtime.test.js +3 -0
- package/dist/routes/__tests__/sessions-runtime.test.js.map +1 -1
- package/dist/routes/__tests__/team-run-translations.test.d.ts +2 -0
- package/dist/routes/__tests__/team-run-translations.test.d.ts.map +1 -0
- package/dist/routes/__tests__/team-run-translations.test.js +418 -0
- package/dist/routes/__tests__/team-run-translations.test.js.map +1 -0
- package/dist/routes/__tests__/translations.test.d.ts +2 -0
- package/dist/routes/__tests__/translations.test.d.ts.map +1 -0
- package/dist/routes/__tests__/translations.test.js +286 -0
- package/dist/routes/__tests__/translations.test.js.map +1 -0
- package/dist/routes/__tests__/workspaces.test.js +140 -0
- package/dist/routes/__tests__/workspaces.test.js.map +1 -1
- package/dist/routes/conversations.d.ts.map +1 -1
- package/dist/routes/conversations.js +19 -2
- package/dist/routes/conversations.js.map +1 -1
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +2 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +32 -3
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/team-runs.d.ts.map +1 -1
- package/dist/routes/team-runs.js +84 -15
- package/dist/routes/team-runs.js.map +1 -1
- package/dist/routes/translations.d.ts +4 -0
- package/dist/routes/translations.d.ts.map +1 -0
- package/dist/routes/translations.js +148 -0
- package/dist/routes/translations.js.map +1 -0
- package/dist/routes/user-input-origin.d.ts +4 -0
- package/dist/routes/user-input-origin.d.ts.map +1 -0
- package/dist/routes/user-input-origin.js +7 -0
- package/dist/routes/user-input-origin.js.map +1 -0
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/routes/workspaces.js +32 -2
- package/dist/routes/workspaces.js.map +1 -1
- package/dist/runtime/__tests__/acp-driver-lifecycle.test.js +2 -2
- package/dist/runtime/__tests__/acp-driver-lifecycle.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-driver-submission.test.d.ts +2 -0
- package/dist/runtime/__tests__/acp-driver-submission.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/acp-driver-submission.test.js +88 -0
- package/dist/runtime/__tests__/acp-driver-submission.test.js.map +1 -0
- package/dist/runtime/__tests__/acp-history-reconciler.test.js +244 -0
- package/dist/runtime/__tests__/acp-history-reconciler.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-projector.test.js +36 -0
- package/dist/runtime/__tests__/acp-projector.test.js.map +1 -1
- package/dist/runtime/__tests__/claude-cli-control.test.js +20 -0
- package/dist/runtime/__tests__/claude-cli-control.test.js.map +1 -1
- package/dist/runtime/__tests__/cli-driver-submission.test.d.ts +2 -0
- package/dist/runtime/__tests__/cli-driver-submission.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/cli-driver-submission.test.js +61 -0
- package/dist/runtime/__tests__/cli-driver-submission.test.js.map +1 -0
- package/dist/runtime/__tests__/codex-cli-control.test.js +25 -0
- package/dist/runtime/__tests__/codex-cli-control.test.js.map +1 -1
- package/dist/runtime/acp/acp-driver.js +38 -1
- package/dist/runtime/acp/acp-driver.js.map +1 -1
- package/dist/runtime/acp/history-reconciler.d.ts.map +1 -1
- package/dist/runtime/acp/history-reconciler.js +95 -36
- package/dist/runtime/acp/history-reconciler.js.map +1 -1
- package/dist/runtime/acp/projector.d.ts +5 -2
- package/dist/runtime/acp/projector.d.ts.map +1 -1
- package/dist/runtime/acp/projector.js +50 -23
- package/dist/runtime/acp/projector.js.map +1 -1
- package/dist/runtime/claude-cli-control.d.ts +4 -1
- package/dist/runtime/claude-cli-control.d.ts.map +1 -1
- package/dist/runtime/claude-cli-control.js +3 -1
- package/dist/runtime/claude-cli-control.js.map +1 -1
- package/dist/runtime/cli-driver.js +21 -7
- package/dist/runtime/cli-driver.js.map +1 -1
- package/dist/runtime/cli-parser.d.ts.map +1 -1
- package/dist/runtime/cli-parser.js +3 -0
- package/dist/runtime/cli-parser.js.map +1 -1
- package/dist/runtime/codex-cli-control.d.ts +4 -1
- package/dist/runtime/codex-cli-control.d.ts.map +1 -1
- package/dist/runtime/codex-cli-control.js +9 -6
- package/dist/runtime/codex-cli-control.js.map +1 -1
- package/dist/runtime/codex-cli-projector.d.ts +1 -1
- package/dist/runtime/codex-cli-projector.d.ts.map +1 -1
- package/dist/runtime/codex-cli-projector.js +4 -2
- package/dist/runtime/codex-cli-projector.js.map +1 -1
- package/dist/runtime/contracts.d.ts +15 -2
- 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 +34 -1
- package/dist/runtime/runtime-coordinator.js.map +1 -1
- package/dist/services/__tests__/conflict-admission.test.d.ts +2 -0
- package/dist/services/__tests__/conflict-admission.test.d.ts.map +1 -0
- package/dist/services/__tests__/conflict-admission.test.js +37 -0
- package/dist/services/__tests__/conflict-admission.test.js.map +1 -0
- package/dist/services/__tests__/conflict-recovery-key.test.d.ts +2 -0
- package/dist/services/__tests__/conflict-recovery-key.test.d.ts.map +1 -0
- package/dist/services/__tests__/conflict-recovery-key.test.js +143 -0
- package/dist/services/__tests__/conflict-recovery-key.test.js.map +1 -0
- package/dist/services/__tests__/message-delivery.integration.test.d.ts +2 -0
- package/dist/services/__tests__/message-delivery.integration.test.d.ts.map +1 -0
- package/dist/services/__tests__/message-delivery.integration.test.js +1137 -0
- package/dist/services/__tests__/message-delivery.integration.test.js.map +1 -0
- package/dist/services/__tests__/review-team-user-counterexamples.test.d.ts +2 -0
- package/dist/services/__tests__/review-team-user-counterexamples.test.d.ts.map +1 -0
- package/dist/services/__tests__/review-team-user-counterexamples.test.js +200 -0
- package/dist/services/__tests__/review-team-user-counterexamples.test.js.map +1 -0
- package/dist/services/__tests__/session-manager.lifecycle.test.js +37 -0
- package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
- package/dist/services/__tests__/session-manager.team-run.test.js +19 -2
- package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
- package/dist/services/__tests__/team-initial-delivery.integration.test.d.ts +2 -0
- package/dist/services/__tests__/team-initial-delivery.integration.test.d.ts.map +1 -0
- package/dist/services/__tests__/team-initial-delivery.integration.test.js +469 -0
- package/dist/services/__tests__/team-initial-delivery.integration.test.js.map +1 -0
- package/dist/services/__tests__/team-reconciler.service.test.js +102 -101
- package/dist/services/__tests__/team-reconciler.service.test.js.map +1 -1
- package/dist/services/__tests__/team-room-delivery.test.d.ts +2 -0
- package/dist/services/__tests__/team-room-delivery.test.d.ts.map +1 -0
- package/dist/services/__tests__/team-room-delivery.test.js +670 -0
- package/dist/services/__tests__/team-room-delivery.test.js.map +1 -0
- package/dist/services/__tests__/team-user-delivery.integration.test.d.ts +2 -0
- package/dist/services/__tests__/team-user-delivery.integration.test.d.ts.map +1 -0
- package/dist/services/__tests__/team-user-delivery.integration.test.js +622 -0
- package/dist/services/__tests__/team-user-delivery.integration.test.js.map +1 -0
- package/dist/services/__tests__/translation-client.test.d.ts +2 -0
- package/dist/services/__tests__/translation-client.test.d.ts.map +1 -0
- package/dist/services/__tests__/translation-client.test.js +240 -0
- package/dist/services/__tests__/translation-client.test.js.map +1 -0
- package/dist/services/__tests__/translation-protection.test.d.ts +2 -0
- package/dist/services/__tests__/translation-protection.test.d.ts.map +1 -0
- package/dist/services/__tests__/translation-protection.test.js +156 -0
- package/dist/services/__tests__/translation-protection.test.js.map +1 -0
- package/dist/services/__tests__/translation-queue.test.d.ts +2 -0
- package/dist/services/__tests__/translation-queue.test.d.ts.map +1 -0
- package/dist/services/__tests__/translation-queue.test.js +277 -0
- package/dist/services/__tests__/translation-queue.test.js.map +1 -0
- package/dist/services/__tests__/translation-room-admission.test.d.ts +2 -0
- package/dist/services/__tests__/translation-room-admission.test.d.ts.map +1 -0
- package/dist/services/__tests__/translation-room-admission.test.js +371 -0
- package/dist/services/__tests__/translation-room-admission.test.js.map +1 -0
- package/dist/services/__tests__/translation-session-blocks.test.d.ts +2 -0
- package/dist/services/__tests__/translation-session-blocks.test.d.ts.map +1 -0
- package/dist/services/__tests__/translation-session-blocks.test.js +367 -0
- package/dist/services/__tests__/translation-session-blocks.test.js.map +1 -0
- package/dist/services/__tests__/translation-settings.service.test.d.ts +2 -0
- package/dist/services/__tests__/translation-settings.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/translation-settings.service.test.js +154 -0
- package/dist/services/__tests__/translation-settings.service.test.js.map +1 -0
- package/dist/services/__tests__/translation.service.test.d.ts +2 -0
- package/dist/services/__tests__/translation.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/translation.service.test.js +480 -0
- package/dist/services/__tests__/translation.service.test.js.map +1 -0
- package/dist/services/access-auth.service.d.ts +1 -0
- package/dist/services/access-auth.service.d.ts.map +1 -1
- package/dist/services/access-auth.service.js +8 -0
- package/dist/services/access-auth.service.js.map +1 -1
- package/dist/services/attachment-context.d.ts +7 -1
- package/dist/services/attachment-context.d.ts.map +1 -1
- package/dist/services/attachment-context.js +23 -2
- package/dist/services/attachment-context.js.map +1 -1
- package/dist/services/conflict-admission.d.ts +37 -0
- package/dist/services/conflict-admission.d.ts.map +1 -0
- package/dist/services/conflict-admission.js +97 -0
- package/dist/services/conflict-admission.js.map +1 -0
- package/dist/services/conflict-resolution-context.d.ts +33 -0
- package/dist/services/conflict-resolution-context.d.ts.map +1 -0
- package/dist/services/conflict-resolution-context.js +434 -0
- package/dist/services/conflict-resolution-context.js.map +1 -0
- package/dist/services/message-delivery.service.d.ts +195 -0
- package/dist/services/message-delivery.service.d.ts.map +1 -0
- package/dist/services/message-delivery.service.js +956 -0
- package/dist/services/message-delivery.service.js.map +1 -0
- package/dist/services/project.service.d.ts +1 -1
- package/dist/services/session-manager.d.ts +94 -74
- package/dist/services/session-manager.d.ts.map +1 -1
- package/dist/services/session-manager.js +91 -17
- package/dist/services/session-manager.js.map +1 -1
- package/dist/services/task.service.d.ts +26 -20
- package/dist/services/task.service.d.ts.map +1 -1
- package/dist/services/task.service.js +9 -26
- package/dist/services/task.service.js.map +1 -1
- package/dist/services/team-room-delivery.d.ts +541 -0
- package/dist/services/team-room-delivery.d.ts.map +1 -0
- package/dist/services/team-room-delivery.js +123 -0
- package/dist/services/team-room-delivery.js.map +1 -0
- package/dist/services/team-run.service.d.ts +83 -0
- package/dist/services/team-run.service.d.ts.map +1 -1
- package/dist/services/team-run.service.js +207 -18
- package/dist/services/team-run.service.js.map +1 -1
- package/dist/services/team-scheduler.service.d.ts +3 -0
- package/dist/services/team-scheduler.service.d.ts.map +1 -1
- package/dist/services/team-scheduler.service.js +65 -11
- package/dist/services/team-scheduler.service.js.map +1 -1
- package/dist/services/team-task-input.d.ts +37 -0
- package/dist/services/team-task-input.d.ts.map +1 -0
- package/dist/services/team-task-input.js +98 -0
- package/dist/services/team-task-input.js.map +1 -0
- package/dist/services/team-task-input.service.d.ts +72 -0
- package/dist/services/team-task-input.service.d.ts.map +1 -0
- package/dist/services/team-task-input.service.js +205 -0
- package/dist/services/team-task-input.service.js.map +1 -0
- package/dist/services/translation-client.d.ts +31 -0
- package/dist/services/translation-client.d.ts.map +1 -0
- package/dist/services/translation-client.js +169 -0
- package/dist/services/translation-client.js.map +1 -0
- package/dist/services/translation-errors.d.ts +14 -0
- package/dist/services/translation-errors.d.ts.map +1 -0
- package/dist/services/translation-errors.js +16 -0
- package/dist/services/translation-errors.js.map +1 -0
- package/dist/services/translation-protection.d.ts +27 -0
- package/dist/services/translation-protection.d.ts.map +1 -0
- package/dist/services/translation-protection.js +547 -0
- package/dist/services/translation-protection.js.map +1 -0
- package/dist/services/translation-queue.d.ts +49 -0
- package/dist/services/translation-queue.d.ts.map +1 -0
- package/dist/services/translation-queue.js +211 -0
- package/dist/services/translation-queue.js.map +1 -0
- package/dist/services/translation-settings.service.d.ts +152 -0
- package/dist/services/translation-settings.service.d.ts.map +1 -0
- package/dist/services/translation-settings.service.js +174 -0
- package/dist/services/translation-settings.service.js.map +1 -0
- package/dist/services/translation.service.d.ts +168 -0
- package/dist/services/translation.service.d.ts.map +1 -0
- package/dist/services/translation.service.js +861 -0
- package/dist/services/translation.service.js.map +1 -0
- package/dist/services/workspace.service.d.ts +84 -93
- package/dist/services/workspace.service.d.ts.map +1 -1
- package/dist/services/workspace.service.js +69 -5
- package/dist/services/workspace.service.js.map +1 -1
- package/dist/socket/__tests__/socket-gateway.test.js +131 -1
- package/dist/socket/__tests__/socket-gateway.test.js.map +1 -1
- package/dist/socket/socket-gateway.d.ts +6 -0
- package/dist/socket/socket-gateway.d.ts.map +1 -1
- package/dist/socket/socket-gateway.js +312 -6
- package/dist/socket/socket-gateway.js.map +1 -1
- package/dist/utils/database-schema.d.ts +9 -0
- package/dist/utils/database-schema.d.ts.map +1 -0
- package/dist/utils/database-schema.js +434 -0
- package/dist/utils/database-schema.js.map +1 -0
- package/dist/utils/database-schema.test.d.ts +2 -0
- package/dist/utils/database-schema.test.d.ts.map +1 -0
- package/dist/utils/database-schema.test.js +359 -0
- package/dist/utils/database-schema.test.js.map +1 -0
- package/dist/utils/database-team-foundation.test.d.ts +2 -0
- package/dist/utils/database-team-foundation.test.d.ts.map +1 -0
- package/dist/utils/database-team-foundation.test.js +467 -0
- package/dist/utils/database-team-foundation.test.js.map +1 -0
- package/dist/utils/owned-child-process.test.js +6 -3
- package/dist/utils/owned-child-process.test.js.map +1 -1
- package/dist/utils/text-preview.d.ts +4 -0
- package/dist/utils/text-preview.d.ts.map +1 -0
- package/dist/utils/text-preview.js +21 -0
- package/dist/utils/text-preview.js.map +1 -0
- package/dist/web/assets/AgentDemoPage-CtCYXopw.js +1 -0
- package/dist/web/assets/{AgentEnvironmentSettingsPage-BnWVgvNe.js → AgentEnvironmentSettingsPage-DSWN546Y.js} +1 -1
- package/dist/web/assets/AttachmentPreview-DRG5_cfN.js +2 -0
- package/dist/web/assets/BranchSelect-Dxs7HnMM.js +1 -0
- package/dist/web/assets/BrandLogo-Ilm880Xs.js +1 -0
- package/dist/web/assets/ConversationPage-B55Bj_ft.js +1 -0
- package/dist/web/assets/CreateTaskInput-CxWPeToI.js +1 -0
- package/dist/web/assets/{DemoPage-BwX2SvcN.js → DemoPage-Dyn-U9JO.js} +3 -3
- package/dist/web/assets/DesignSystemPage-BxypsRUZ.js +12 -0
- package/dist/web/assets/EditableTaskTitle-Dh-SmvFW.js +70 -0
- package/dist/web/assets/{ExecutionPermissionSelector-DeeNd4Kh.js → ExecutionPermissionSelector-CQ_GNxR0.js} +10 -10
- package/dist/web/assets/GeneralSettingsPage-CzoejPZP.js +1 -0
- package/dist/web/assets/{LoadingPreviewPage-BxEFnEQh.js → LoadingPreviewPage-BlW2PJhI.js} +1 -1
- package/dist/web/assets/McpSettingsPage-DD7EqD4L.js +1 -0
- package/dist/web/assets/MemberAvatar-B2pAdWUi.js +1 -0
- package/dist/web/assets/MobileTaskDetail-CvmNW0BQ.js +3 -0
- package/dist/web/assets/NotificationSettingsPage-BIqldIRf.js +1 -0
- package/dist/web/assets/ProfileSettingsPage-DMxpHmF1.js +3 -0
- package/dist/web/assets/ProjectKanbanPage-CHW79td4.js +12 -0
- package/dist/web/assets/ProjectSettingsPage-DKiEUkoa.js +2 -0
- package/dist/web/assets/ProviderSettingsPage-DZT7wyE2.js +67 -0
- package/dist/web/assets/SettingsMasterDetail-DnF0lsV1.js +1 -0
- package/dist/web/assets/TaskDetail-D_970BDY.js +1 -0
- package/dist/web/assets/TeamSettingsPage-BJIEZ7xL.js +1 -0
- package/dist/web/assets/TranslationSettingsPage-D3mazqEW.js +1 -0
- package/dist/web/assets/arc-hUh7ykl8.js +1 -0
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-B5EIiXuX.js → architectureDiagram-3BPJPVTR-CcV9CLkm.js} +1 -1
- package/dist/web/assets/{at-sign-BE17rU5b.js → at-sign-B-nhoGyH.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-GFwnvSLM.js → blockDiagram-GPEHLZMM-5q3Y9y0e.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-iJfLTxEa.js → c4Diagram-AAUBKEIU-CorBXi06.js} +1 -1
- package/dist/web/assets/channel-By24WpLg.js +1 -0
- package/dist/web/assets/check-DqPSoX0r.js +1 -0
- package/dist/web/assets/{chevron-down-BaQEBzp3.js → chevron-down-CPnvItQw.js} +1 -1
- package/dist/web/assets/{chevron-up-D0y6skqr.js → chevron-up-B8PE5N0G.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-CDxRPp-8.js → chunk-2J33WTMH-BUf5B4z4.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-mzPbgyiz.js → chunk-4BX2VUAB-CdnOHkro.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-KNAJbQyw.js → chunk-55IACEB6-U7edZDpP.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-BqGfqkDK.js → chunk-727SXJPM-B64Tuhla.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-D27ue-H0.js → chunk-AQP2D5EJ-dXfe56jB.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-DRza-3q8.js → chunk-FMBD7UC4-DDYbxc1Q.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-CUgkviLu.js → chunk-ND2GUHAM-BQDGMv0R.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-BAlOJwZb.js → chunk-QZHKN3VN-DB8q4xAj.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-DxHoimtR.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-DxHoimtR.js +1 -0
- package/dist/web/assets/code-block-OCS4YCEC-BSdICyOa.js +2 -0
- package/dist/web/assets/confirm-dialog-DxEBZEbV.js +1 -0
- package/dist/web/assets/content-CMUL3HGx.js +2 -0
- package/dist/web/assets/{copy-DejkmIHZ.js → copy-DyxlXxiU.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-8TBY7BP_.js → cose-bilkent-S5V4N54A-Dx6eMnll.js} +1 -1
- package/dist/web/assets/cssMode-ZnNWfjZ6.js +1 -0
- package/dist/web/assets/{dagre-BM42HDAG-CkMzDiim.js → dagre-BM42HDAG-Cxe8pLgD.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-CAOQJ2N1.js → diagram-2AECGRRQ-RMsswEBe.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-DKhE0hiI.js → diagram-5GNKFQAL-Bi4E0hzx.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-DBdkXSpa.js → diagram-KO2AKTUF-Mv6CDCyn.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-DRi2t32c.js → diagram-LMA3HP47-CJ3qKNzK.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-DtP92tI1.js → diagram-OG6HWLK6-D8SBY4ft.js} +1 -1
- package/dist/web/assets/dialog-BYdeYC2Y.js +5 -0
- package/dist/web/assets/{erDiagram-TEJ5UH35-DWFKXtst.js → erDiagram-TEJ5UH35-DwVSCU6X.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-LDE0h4ri.js → flowDiagram-I6XJVG4X-CyipYAWd.js} +1 -1
- package/dist/web/assets/{freemarker2-CLksOOZX.js → freemarker2-DbH_yMCO.js} +2 -2
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-DD2RfdyV.js → ganttDiagram-6RSMTGT7-CsC6Wjt4.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DkKrR8ex.js → gitGraphDiagram-PVQCEYII-E5jNbqlq.js} +1 -1
- package/dist/web/assets/{globe-CD4g63c9.js → globe-B2rgTPH3.js} +1 -1
- package/dist/web/assets/handlebars-C5VY_S-z.js +1 -0
- package/dist/web/assets/hooks-Ct0srfV-.js +1 -0
- package/dist/web/assets/html-e5uLnAgN.js +1 -0
- package/dist/web/assets/htmlMode-BeNiGozX.js +1 -0
- package/dist/web/assets/icon-button-BEMJj_6T.js +1 -0
- package/dist/web/assets/index-0XPZayUU.css +1 -0
- package/dist/web/assets/index-BYPOXP6w.js +1 -0
- package/dist/web/assets/{index-D_QVcsLn.js → index-C-M0QDqc.js} +5 -5
- package/dist/web/assets/index-CAjqC8pT.js +41 -0
- package/dist/web/assets/index-CPGzLjEC.js +1 -0
- package/dist/web/assets/index-Cm6snkmR.js +122 -0
- package/dist/web/assets/index-DNdMmXBr.js +1 -0
- package/dist/web/assets/index-DppwrK2G.js +1 -0
- package/dist/web/assets/index-IMdA08Ok.js +1 -0
- package/dist/web/assets/index-kr6U6_pi.js +1 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-BdPA9Xfi.js → infoDiagram-5YYISTIA-5_0wrRXl.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-220u4uiv.js → ishikawaDiagram-YF4QCWOH-aQujIFZw.js} +5 -5
- package/dist/web/assets/javascript-D7QVj9jR.js +1 -0
- package/dist/web/assets/{journeyDiagram-JHISSGLW-BvE0Y3tZ.js → journeyDiagram-JHISSGLW-ClMzHdqI.js} +1 -1
- package/dist/web/assets/jsonMode-nHmLVf-n.js +7 -0
- package/dist/web/assets/{kanban-definition-UN3LZRKU-Q0JH1P6D.js → kanban-definition-UN3LZRKU-BFVlt0tz.js} +1 -1
- package/dist/web/assets/kbd-Bfq5K6Ux.js +1 -0
- package/dist/web/assets/{key-round-DZm1FLLr.js → key-round-BqsaQdce.js} +1 -1
- package/dist/web/assets/{layers-Dda7MM7a.js → layers-DI4vFJ4F.js} +1 -1
- package/dist/web/assets/{linear-Dr6SfnSn.js → linear-DZ-6PAPS.js} +1 -1
- package/dist/web/assets/{link-BUeSP3T7.js → link-BU4PN723.js} +1 -1
- package/dist/web/assets/liquid-BPIyogoj.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-Bbp4PWlJ.js → lspLanguageFeatures-DH4Z8jiM.js} +1 -1
- package/dist/web/assets/mdx-CI8yO2pV.js +1 -0
- package/dist/web/assets/menu-C3uB3M7p.js +1 -0
- package/dist/web/assets/menu-styles-DWynpVVz.js +1 -0
- package/dist/web/assets/mermaid-NOHMQCX5-BqeX1osS.js +123 -0
- package/dist/web/assets/{message-square-CFriSt4D.js → message-square-E5K8E3A-.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-bvDaNfKs.js → mindmap-definition-RKZ34NQL-C7dea0db.js} +1 -1
- package/dist/web/assets/modal-Cz1iIVeD.js +1 -0
- package/dist/web/assets/{monaco-BuDK9Fat.js → monaco-DM3DuGN5.js} +3 -3
- package/dist/web/assets/{paperclip-BOSklTt7.js → paperclip-COXNce_v.js} +1 -1
- package/dist/web/assets/{pencil-BRQ9W_a-.js → pencil-BFc4n44f.js} +1 -1
- package/dist/web/assets/people-BaCetIqh.js +1 -0
- package/dist/web/assets/{pieDiagram-4H26LBE5-BQCca9Cq.js → pieDiagram-4H26LBE5-2q5medug.js} +2 -2
- package/dist/web/assets/popover-CJCQLoGu.js +1 -0
- package/dist/web/assets/python-CSxVPG9p.js +1 -0
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-BEM2U7Cd.js → quadrantDiagram-W4KKPZXB-DHPEM56s.js} +1 -1
- package/dist/web/assets/razor-CVoIieeS.js +1 -0
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-CcmFIALZ.js → requirementDiagram-4Y6WPE33-B_KyH7PP.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-D9Nrfbqk.js → sankeyDiagram-5OEKKPKP-CrqkZAYW.js} +1 -1
- package/dist/web/assets/search-CkiBPir_.js +1 -0
- package/dist/web/assets/search-field-CbM2P2KE.js +1 -0
- package/dist/web/assets/select-Br0TAs7A.js +1 -0
- package/dist/web/assets/select-DJsEG0jq.js +1 -0
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-5udQDi0x.js → sequenceDiagram-3UESZ5HK-BRTm1WQA.js} +1 -1
- package/dist/web/assets/{server-DJaSJ9m1.js → server-DYeSE1wn.js} +1 -1
- package/dist/web/assets/stateDiagram-AJRCARHV-qN49iyR2.js +1 -0
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-B1clBPkJ.js +1 -0
- package/dist/web/assets/{textarea-Ft9KMoEI.js → textarea-B7vtoRE3.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-DXS236a-.js → timeline-definition-PNZ67QCA-BzarcDi3.js} +1 -1
- package/dist/web/assets/toggles-jo27o0AH.js +1 -0
- package/dist/web/assets/tooltip-DbVtCXcO.js +1 -0
- package/dist/web/assets/track-C0vxnITw.js +1 -0
- package/dist/web/assets/{trash-2-Bc-URu8c.js → trash-2-CUM-XX8B.js} +1 -1
- package/dist/web/assets/tsMode-7D3gqep6.js +11 -0
- package/dist/web/assets/typescript-CbOVEQNg.js +1 -0
- package/dist/web/assets/{upload-C9Z4jLtv.js → upload-CJ6jVmte.js} +1 -1
- package/dist/web/assets/use-profiles-B0xXAf7Z.js +1 -0
- package/dist/web/assets/{use-projects-DI27nNwl.js → use-projects-BlTwWxkY.js} +1 -1
- package/dist/web/assets/{use-providers-DB9ghBPq.js → use-providers-FMSfyTD1.js} +1 -1
- package/dist/web/assets/use-translation-settings-BOlszecX.js +1 -0
- package/dist/web/assets/use-workspaces-DYrEp0Lw.js +1 -0
- package/dist/web/assets/useNormalizedLogs-D0N8MJdH.js +1 -0
- package/dist/web/assets/useTokenUsage-WB3ZQ25v.js +1 -0
- package/dist/web/assets/{vennDiagram-CIIHVFJN-BzyNrP06.js → vennDiagram-CIIHVFJN-B6oZetvf.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-BQ4SyU9_.js → wardley-L42UT6IY-Bzuhm76f.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-CcCqmB58.js → wardleyDiagram-YWT4CUSO-DaC-FUf5.js} +1 -1
- package/dist/web/assets/xml-Cfa9tkdT.js +1 -0
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-RWm1MtQk.js → xychartDiagram-2RQKCTM6-CCvRIJRL.js} +1 -1
- package/dist/web/assets/yaml-C86f7VLL.js +1 -0
- package/dist/web/index.html +2 -2
- 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/log-adapter.d.ts +11 -0
- package/node_modules/@agent-tower/shared/dist/log-adapter.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/log-adapter.js +2 -0
- package/node_modules/@agent-tower/shared/dist/log-adapter.js.map +1 -1
- package/node_modules/@agent-tower/shared/dist/socket/events.d.ts +5 -2
- package/node_modules/@agent-tower/shared/dist/socket/events.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/socket/events.js +2 -0
- package/node_modules/@agent-tower/shared/dist/socket/events.js.map +1 -1
- package/node_modules/@agent-tower/shared/dist/translation.d.ts +306 -0
- package/node_modules/@agent-tower/shared/dist/translation.d.ts.map +1 -0
- package/node_modules/@agent-tower/shared/dist/translation.js +8 -0
- package/node_modules/@agent-tower/shared/dist/translation.js.map +1 -0
- package/node_modules/@agent-tower/shared/dist/types.d.ts +23 -0
- 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/20261016000000_add_translation_foundation/migration.sql +104 -0
- package/prisma/migrations/20261016010000_add_message_deliveries/migration.sql +158 -0
- package/prisma/migrations/20261019000000_add_room_translation_eligibility/migration.sql +3 -0
- package/prisma/migrations/20261019100000_add_team_delivery_foundation/migration.sql +217 -0
- package/prisma/schema.prisma +224 -0
- package/dist/web/assets/AgentDemoPage-D0LQRcXm.js +0 -1
- package/dist/web/assets/AgentLogo-BDyW3ihb.js +0 -1
- package/dist/web/assets/BranchSelect-Dmp5hq0i.js +0 -1
- package/dist/web/assets/BrandLogo-YGT4Vlw5.js +0 -1
- package/dist/web/assets/ConversationPage-BhapUYGe.js +0 -3
- package/dist/web/assets/CreateTaskInput-GLF3Oyc1.js +0 -1
- package/dist/web/assets/DesignSystemPage-j-1-1JtQ.js +0 -16
- package/dist/web/assets/EditableTaskTitle-mHT39coo.js +0 -70
- package/dist/web/assets/GeneralSettingsPage-BBe3EXcj.js +0 -1
- package/dist/web/assets/McpSettingsPage-DDA8yUxu.js +0 -1
- package/dist/web/assets/MemberAvatar-CCRbS97s.js +0 -1
- package/dist/web/assets/MobileTaskDetail-BOIFPybn.js +0 -5
- package/dist/web/assets/NotificationSettingsPage-B2kUnE8w.js +0 -1
- package/dist/web/assets/ProfileSettingsPage-DPZpUoFd.js +0 -3
- package/dist/web/assets/ProjectKanbanPage-DQnwUBFg.js +0 -12
- package/dist/web/assets/ProjectSettingsPage-CcXAOYb7.js +0 -2
- package/dist/web/assets/ProviderSettingsPage-BAIRvcAS.js +0 -67
- package/dist/web/assets/SettingsMasterDetail-BuxwsR9R.js +0 -1
- package/dist/web/assets/TaskDetail-B3pOSx3f.js +0 -3
- package/dist/web/assets/TeamSettingsPage-DoWmzvKu.js +0 -1
- package/dist/web/assets/agent-meta-MzuGtqxl.js +0 -1
- package/dist/web/assets/arc-Bm_QIbJA.js +0 -1
- package/dist/web/assets/arrow-down-BVePf1ZM.js +0 -1
- package/dist/web/assets/channel-CYYV7_Oi.js +0 -1
- package/dist/web/assets/check-qs0S_9rB.js +0 -1
- package/dist/web/assets/circle-alert-Cbvy2cMo.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-Cl-3ikxt.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-Cl-3ikxt.js +0 -1
- package/dist/web/assets/code-block-OCS4YCEC-CO23R1Os.js +0 -2
- package/dist/web/assets/confirm-dialog-BrgNTypL.js +0 -1
- package/dist/web/assets/cssMode-hzDRnxMx.js +0 -1
- package/dist/web/assets/gauge-CPlvCZUV.js +0 -1
- package/dist/web/assets/handlebars-C1M9t0Lo.js +0 -1
- package/dist/web/assets/html-DKVKQovh.js +0 -1
- package/dist/web/assets/htmlMode-BSWjg5ir.js +0 -1
- package/dist/web/assets/index-BnqdwOEH.css +0 -1
- package/dist/web/assets/index-CMJV-mgF.js +0 -122
- package/dist/web/assets/javascript-WwrMY2Bg.js +0 -1
- package/dist/web/assets/jsonMode-Dz0hnnvg.js +0 -7
- package/dist/web/assets/liquid-CzGEh0ls.js +0 -1
- package/dist/web/assets/mdx-y6S3OMMk.js +0 -1
- package/dist/web/assets/mermaid-NOHMQCX5-C72362la.js +0 -123
- package/dist/web/assets/modal-DeigO7aN.js +0 -1
- package/dist/web/assets/play-Mxkwq69n.js +0 -1
- package/dist/web/assets/python-CMnGKsU9.js +0 -1
- package/dist/web/assets/razor-mLurbGgY.js +0 -1
- package/dist/web/assets/select-DKS02St6.js +0 -1
- package/dist/web/assets/stateDiagram-AJRCARHV-D-cF1NGV.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-a4ugQnZs.js +0 -1
- package/dist/web/assets/status-styles-sQm4KLdp.js +0 -1
- package/dist/web/assets/switch-7LWQ_sEx.js +0 -1
- package/dist/web/assets/task-CDYaC_No.js +0 -42
- package/dist/web/assets/task-priority-acVgTiil.js +0 -1
- package/dist/web/assets/tsMode-Vr3bndW1.js +0 -11
- package/dist/web/assets/typescript-BfjoaUSn.js +0 -1
- package/dist/web/assets/use-attachments-EypT-7PI.js +0 -2
- package/dist/web/assets/use-profiles-nMPGwy3v.js +0 -1
- package/dist/web/assets/use-workspaces-d4n9m9cX.js +0 -1
- package/dist/web/assets/useNormalizedLogs-DRoPbP0w.js +0 -1
- package/dist/web/assets/useTokenUsage-4qTDa8SY.js +0 -1
- package/dist/web/assets/xml-BGVoPR0b.js +0 -1
- package/dist/web/assets/yaml-eFhNavrs.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owned-child-process.test.js","sourceRoot":"","sources":["../../src/utils/owned-child-process.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAA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QAAQ,EAAE,CAAC,IAAI,EAAE,oCAAoC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,gDAAgD,CAAC,EAAE;YACnK,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM;SAC3C,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QAC9E,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACnF,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;QACnD,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrB,UAAU,CAAC,KAAK,EAAE,CAAC;QACnB,MAAM,QAAQ,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC,CAAC;AACb,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function compactWhitespace(value: string): string;
|
|
2
|
+
export declare function truncateWithEllipsis(value: string, maxLength: number): string;
|
|
3
|
+
export declare function buildTextPreview(value: string | null | undefined, maxLength?: number): string;
|
|
4
|
+
//# sourceMappingURL=text-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-preview.d.ts","sourceRoot":"","sources":["../../src/utils/text-preview.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAgB7E;AAGD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,SAAM,GAAG,MAAM,CAM1F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function compactWhitespace(value) {
|
|
2
|
+
return value.replace(/\s+/g, ' ').trim();
|
|
3
|
+
}
|
|
4
|
+
export function truncateWithEllipsis(value, maxLength) {
|
|
5
|
+
if (value.length <= maxLength) {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
const limit = Math.max(1, maxLength - 3);
|
|
9
|
+
const sliced = value.slice(0, limit);
|
|
10
|
+
const boundary = Math.max(sliced.lastIndexOf(' '), sliced.lastIndexOf(','), sliced.lastIndexOf('。'), sliced.lastIndexOf(','), sliced.lastIndexOf('.'));
|
|
11
|
+
const candidate = boundary >= Math.floor(limit * 0.6) ? sliced.slice(0, boundary) : sliced;
|
|
12
|
+
return `${candidate.trimEnd()}...`;
|
|
13
|
+
}
|
|
14
|
+
export function buildTextPreview(value, maxLength = 240) {
|
|
15
|
+
const trimmed = (value ?? '').trim();
|
|
16
|
+
if (trimmed.length <= maxLength) {
|
|
17
|
+
return trimmed;
|
|
18
|
+
}
|
|
19
|
+
return truncateWithEllipsis(compactWhitespace(trimmed), maxLength);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=text-preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-preview.js","sourceRoot":"","sources":["../../src/utils/text-preview.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAa,EAAE,SAAiB;IACnE,IAAI,KAAK,CAAC,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js";import{a as de}from"./mermaid-NOHMQCX5-BqeX1osS.js";import"./AttachmentPreview-DRG5_cfN.js";import{d as xe}from"./use-profiles-B0xXAf7Z.js";import{C as me}from"./chevron-up-B8PE5N0G.js";import{C as ue}from"./chevron-down-CPnvItQw.js";import{P as pe}from"./paperclip-COXNce_v.js";import{A as he}from"./at-sign-B-nhoGyH.js";import{G as ge}from"./globe-B2rgTPH3.js";import"./track-C0vxnITw.js";import"./use-translation-settings-BOlszecX.js";import"./copy-DyxlXxiU.js";import"./index-kr6U6_pi.js";import"./index-CAjqC8pT.js";import"./index-DNdMmXBr.js";import"./tooltip-DbVtCXcO.js";import"./kbd-Bfq5K6Ux.js";import"./index-DppwrK2G.js";const fe=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],be=H("hash",fe);const je=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ve=H("send",je),B=({className:s})=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:s,xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),e.jsx("circle",{cx:"8",cy:"8",r:"3",fill:"currentColor"})]}),ye=({className:s})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:s,xmlns:"http://www.w3.org/2000/svg",children:e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"})}),Ne=({className:s})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:s,xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M13.5 4.5L6.5 11.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),we=!0;function Oe(){const{t:s}=te(),{preserveDesktopSearch:M}=se(),[w,U]=r.useState([]),[o,S]=r.useState(""),[x,k]=r.useState("DEFAULT"),[i,A]=r.useState(""),[a,C]=r.useState(null),[V,D]=r.useState(null),[l,c]=r.useState("idle"),[g,E]=r.useState(!1),[m,j]=r.useState(""),$=r.useRef(null),I=r.useRef(null),u=r.useRef(null),{data:p}=xe(o),F=p?Object.keys(p):["DEFAULT"],O=t=>{S(t),k("DEFAULT")},_=r.useCallback(t=>{c(t===0?"stopped":"error")},[]),G=r.useCallback(t=>{console.error("Agent error:",t),c("error")},[]),{isConnected:h,isAttached:f,isOutputActive:W,lastExitAt:K,logs:v,entries:q,agentSessionId:L,attach:z,clearLogs:P}=le({sessionId:a||"",sessionStartedAt:V,onExit:_,onError:G}),{todos:R}=oe(q);r.useEffect(()=>{b.get("/demo/agents").then(t=>{U(t.agents);const n=t.agents.find(y=>y.available);n&&S(n.type)})},[]),r.useEffect(()=>{$.current?.scrollToBottom("smooth")},[v]),r.useEffect(()=>{console.log(`[AgentDemoPage:useEffect] t=${Date.now()} sessionId=${a} isConnected=${h} isAttached=${f}`),a&&h&&!f&&(console.log(`[AgentDemoPage:useEffect] t=${Date.now()} calling attach()`),z())},[a,h,f,z]);const J=t=>{if(j(t.target.value),u.current){u.current.style.height="auto";const y=Math.min(u.current.scrollHeight,210);u.current.style.height=`${y}px`}},Q=async()=>{if(!o||!i.trim())return;const t=Date.now();console.log(`[AgentDemoPage:handleStart] t=${t} starting...`),c("starting"),P();try{const n=await b.post("/demo/start",{agentType:o,prompt:i.trim(),variant:x});we&&console.log(`[AgentDemoPage:handleStart] t=${Date.now()} apiTime=${Date.now()-t}ms sessionId=${n.sessionId}`),C(n.sessionId),D(t),c("running")}catch(n){console.error("Start failed:",n),c("error")}},T=async()=>{if(!a||!m.trim())return;const t=m.trim();j("");try{await b.post(`/demo/${a}/message`,{message:t})}catch(n){console.error("Send failed:",n)}},X=async()=>{if(a)try{await b.post(`/demo/${a}/stop`),c("stopped")}catch(t){console.error("Stop failed:",t)}},Y=()=>{C(null),D(null),c("idle"),A(""),j(""),P()},Z=l==="running",d=a!==null,ee=w.find(t=>t.type===o);return e.jsxs("div",{className:"flex flex-col h-full bg-white",children:[e.jsxs("div",{className:"px-8 py-5 border-b border-neutral-100 bg-white transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-base font-medium text-blue-600",children:"Agent Demo"}),e.jsx("span",{className:"text-neutral-300 text-sm",children:"/"}),e.jsx("span",{className:"text-xl font-bold text-neutral-900 tracking-tight",children:d?i.slice(0,50)+(i.length>50?"...":""):s("新会话")})]}),e.jsxs("div",{className:"flex items-center",children:[l==="running"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-blue-50 text-blue-700 rounded-full text-xs font-medium border border-blue-100",children:[e.jsx(B,{className:"w-3.5 h-3.5 animate-pulse"}),e.jsx("span",{children:"Running"})]}),l==="stopped"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-emerald-50 text-emerald-700 rounded-full text-xs font-medium border border-emerald-100",children:[e.jsx(Ne,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Done"})]}),l==="idle"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-neutral-100 text-neutral-600 rounded-full text-xs font-medium border border-neutral-200",children:[e.jsx(ye,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Idle"})]}),l==="starting"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-amber-50 text-amber-700 rounded-full text-xs font-medium border border-amber-100",children:[e.jsx(B,{className:"w-3.5 h-3.5 animate-spin"}),e.jsx("span",{children:"Starting..."})]}),l==="error"&&e.jsx("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-red-50 text-red-700 rounded-full text-xs font-medium border border-red-100",children:e.jsx("span",{children:"Error"})})]})]}),d&&e.jsxs("div",{className:"mt-1.5 flex items-start gap-2 group max-w-4xl",children:[e.jsx("div",{className:`text-sm text-neutral-600 leading-relaxed cursor-pointer transition-all ${g?"":"truncate"}`,onClick:()=>E(!g),children:i}),e.jsx("button",{onClick:()=>E(!g),className:"mt-0.5 text-neutral-400 opacity-0 group-hover:opacity-100 hover:text-neutral-600 transition-opacity",children:g?e.jsx(me,{size:14}):e.jsx(ue,{size:14})})]}),e.jsxs("div",{className:"flex items-center gap-6 mt-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:"Agent"}),e.jsx("div",{className:"flex items-center gap-1.5 text-neutral-900 font-medium bg-neutral-50 px-2 py-1 rounded border border-neutral-100",children:ee?.name||o||s("未选择")})]}),x!=="DEFAULT"&&e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:"Variant"}),e.jsx("div",{className:"flex items-center gap-1.5 text-neutral-700 font-medium bg-blue-50 px-2 py-1 rounded border border-blue-100",children:x})]}),L&&e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:"Session"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-neutral-700 font-mono bg-neutral-50 px-2 py-1 rounded border border-neutral-100",children:[L.slice(0,8),"..."]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:s("连接")}),e.jsx("div",{className:`flex items-center gap-1.5 font-medium px-2 py-1 rounded border ${h?"text-emerald-700 bg-emerald-50 border-emerald-100":"text-neutral-500 bg-neutral-50 border-neutral-100"}`,children:s(h?f?"已连接":"连接中...":"未连接")})]}),d&&e.jsx(N,{variant:"outline",size:"sm",onClick:Y,className:"ml-auto",children:s("新会话")}),e.jsxs(re,{to:M("/settings/profiles"),className:`flex items-center gap-1.5 text-xs text-neutral-500 hover:text-neutral-900 transition-colors ${d?"":"ml-auto"}`,children:[e.jsx(ne,{size:14}),e.jsx("span",{children:s("Profiles 设置")})]})]})]}),e.jsx("div",{ref:I,className:"flex-1 overflow-y-auto px-8 py-6",children:d?e.jsx("div",{className:"min-h-[200px]",children:v.length===0?e.jsx("div",{className:"text-neutral-400 text-center py-8",children:s("等待 Agent 响应...")}):e.jsx(ie,{children:e.jsx(de,{ref:$,logs:v,isOutputActive:W,lastExitAt:K,scrollElementRef:I})})}):e.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3 text-neutral-900",children:s("选择 Agent")}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:w.map(t=>e.jsxs(N,{variant:o===t.type?"default":"outline",disabled:!t.available,onClick:()=>O(t.type),children:[t.name,t.available&&t.version&&` (${t.version})`,!t.available&&s(" (不可用)")]},t.type))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3 text-neutral-900",children:s("配置变体 (Profile Variant)")}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:F.map(t=>e.jsx("button",{onClick:()=>k(t),className:`px-3 py-1.5 rounded-full text-sm font-medium border transition-colors ${x===t?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-400"}`,children:t},t))}),p&&p[x]&&e.jsx("p",{className:"mt-2 text-xs text-neutral-500 font-mono",children:Object.entries(p[x]).map(([t,n])=>`${t}: ${JSON.stringify(n)}`).join(", ")})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3 text-neutral-900",children:s("输入任务")}),e.jsxs("div",{className:"relative border border-neutral-200 rounded-xl shadow-sm bg-white focus-within:ring-1 focus-within:ring-neutral-300 focus-within:border-neutral-300 transition-all duration-200",children:[e.jsx("textarea",{value:i,onChange:t=>A(t.target.value),rows:4,placeholder:s("描述你想让 Agent 完成的任务..."),className:"w-full px-4 py-3 bg-transparent border-none focus:outline-none focus:ring-0 resize-none text-neutral-900 placeholder-neutral-400 leading-relaxed text-sm"}),e.jsx("div",{className:"flex items-center justify-end px-3 pb-3 pt-1",children:e.jsx(N,{onClick:Q,disabled:l==="starting"||!o||!i.trim(),children:s(l==="starting"?"启动中...":"开始")})})]})]})]})}),d&&R.length>0&&e.jsx("div",{className:"px-8 py-2 bg-white border-t border-neutral-100",children:e.jsx(ce,{todos:R})}),d&&e.jsx("div",{className:"px-8 py-6 border-t border-neutral-100 bg-white",children:e.jsxs("div",{className:"relative border border-neutral-200 rounded-xl shadow-sm bg-white focus-within:ring-1 focus-within:ring-neutral-300 focus-within:border-neutral-300 transition-all duration-200",children:[e.jsx("textarea",{ref:u,value:m,onChange:J,rows:3,placeholder:s("发送消息给 Agent..."),className:"w-full px-4 py-3 bg-transparent border-none focus:outline-none focus:ring-0 resize-none text-neutral-900 placeholder-neutral-400 leading-relaxed text-sm scrollbar-thin scrollbar-thumb-neutral-200 scrollbar-track-transparent",style:{minHeight:"80px",maxHeight:"210px"},onKeyDown:t=>{t.key==="Enter"&&!t.shiftKey&&!t.repeat&&!t.nativeEvent.isComposing&&t.nativeEvent.keyCode!==229&&(t.preventDefault(),T())}}),e.jsxs("div",{className:"flex items-center justify-between px-3 pb-3 pt-1 border-t border-transparent",children:[e.jsxs("div",{className:"flex items-center gap-1 text-neutral-400",children:[e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Attach File",children:e.jsx(pe,{size:18})}),e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Mention",children:e.jsx(he,{size:18})}),e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Reference Issue",children:e.jsx(be,{size:18})}),e.jsx("div",{className:"w-px h-4 bg-neutral-200 mx-1"}),e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Search Web",children:e.jsx(ge,{size:18})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[Z&&e.jsxs("button",{onClick:X,className:"flex items-center gap-2 px-3 py-2 text-xs font-semibold text-red-600 bg-red-50 hover:bg-red-100 rounded-lg transition-colors",children:[e.jsx(ae,{size:12,fill:"currentColor"}),e.jsx("span",{children:s("停止")})]}),e.jsxs("button",{onClick:T,disabled:!m.trim(),className:`flex items-center gap-2 px-3 py-2 text-xs font-semibold rounded-lg transition-all ${m.trim()?"bg-neutral-900 text-white hover:bg-black shadow-sm":"bg-neutral-100 text-neutral-400 cursor-not-allowed"}`,children:[e.jsx("span",{children:s("发送")}),e.jsx(ve,{size:14})]})]})]})]})})]})}export{Oe as AgentDemoPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e,j as n,
|
|
1
|
+
import{u as e,j as n,i as s,k as i,A as r}from"./index-Cm6snkmR.js";function g(){const{t}=e();return n.jsxs(s,{children:[n.jsx(i,{title:t("Agent 环境"),description:t("检测并安装本机 Agent CLI。安装前会展示官方来源、风险和校验摘要。")}),n.jsx(r,{})]})}export{g as AgentEnvironmentSettingsPage};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as M,b6 as N,b7 as T,q as U,o as D,r as h,p as H,s as X,v as k,aI as P,a2 as W,j as f,n as q,u as G,Q as V,X as Y}from"./index-Cm6snkmR.js";import{T as Z,F as ee}from"./tooltip-DbVtCXcO.js";const te=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],se=M("image",te),S=new Map,B="tower:system-submission:",I=e=>Object.fromEntries(Object.entries(e).filter(([t])=>t!=="resolutionContextToken")),v=e=>"resolutionContextToken"in e?String(e.resolutionContextToken):void 0,E=e=>T(v(e))??I(e);let b=!1;const ye=()=>b;function K(e){if(!e||typeof e!="object")return;const t=e;if(!(typeof t.id!="string"||!/^[0-9a-f-]{36}$/i.test(t.id)||typeof t.key!="string"||!t.identity||typeof t.identity!="object"||t.body!==void 0&&(!t.body||typeof t.body!="object"||Array.isArray(t.body))))return t}function pe(e){const t=T(e);if(t)return z(),[...S.values()].find(s=>JSON.stringify(s.identity)===JSON.stringify(t)&&s.key.startsWith("message:"))?.key.slice(8)}function z(){try{for(let e=0;e<sessionStorage.length;e++){const t=sessionStorage.key(e);if(t?.startsWith(B)){const s=K(JSON.parse(sessionStorage.getItem(t)));s?S.set(t,s):b=!0}}}catch{b=!0}}function ne(e,t){z();for(const s of S.values()){if(!s.body||!s.key.startsWith("message:"))continue;const n=v(s.body),i=N(n);if(i?.actor===e&&i.context.sourceWorkspaceId===t)return{token:n,receiverSessionId:s.key.slice(8),identity:s.identity}}}async function he(e,t,s){const n="systemAction"in t&&t.systemAction==="resolve_conflicts",i=n?E(t):t,c=n?N(v(t)):void 0,m=c?.context?.sourceWorkspaceId,d=c&&m?ne(c.actor,m):void 0;if(d&&(JSON.stringify(d.identity)!==JSON.stringify(i)||e!==`message:${d.receiverSessionId}`))throw new Error("Check the original conflict submission with its original Session, UUID and body before starting another request.");const g=n?`${B}${e}:${JSON.stringify(i)}`:`tower:user-submission:${e}:${JSON.stringify(t)}`;let l=S.get(g);const w=[];try{const r=sessionStorage.getItem(g);if(r){const o=n?K(JSON.parse(r)):{id:r,key:e,identity:i};if(!o||o.key!==e||JSON.stringify(o.identity)!==JSON.stringify(i))throw new Error("Invalid pending submission");l=o}if(n&&!l){const o=`tower:user-submission:${e}:`;for(let y=0;y<sessionStorage.length;y++){const u=sessionStorage.key(y);if(!u?.startsWith(o)||u.endsWith(":body"))continue;const p=JSON.parse(u.slice(o.length)),J=sessionStorage.getItem(`${u}:body`),x=J?JSON.parse(J):p,A=N(v(x)),C=N(v(t));if(!A&&C&&JSON.stringify(I(x))===JSON.stringify(I(t)))throw new Error("Incomplete legacy submission");if(A||C){if(JSON.stringify(E(x))!==JSON.stringify(i))continue}else if(JSON.stringify(I(x))!==JSON.stringify(I(t)))continue;const F=sessionStorage.getItem(u);if(F){l={id:F,key:e,identity:i,body:x},w.push(u,`${u}:body`);break}}}}catch{if(b=!0,n)throw new Error("Pending submission storage is unavailable or damaged. Preserve the operation details and check the original submission before sending again.")}l??={id:crypto.randomUUID(),key:e,identity:i},n&&(l.body??=t),S.set(g,l);try{sessionStorage.setItem(g,n?JSON.stringify(l):l.id);for(const r of w)sessionStorage.removeItem(r)}catch{b=!0}let a;try{a=await s({...l.body??t,clientSubmissionId:l.id})}catch(r){if(n&&r.details?.accepted===!1){l.body=void 0;try{sessionStorage.setItem(g,JSON.stringify(l))}catch{b=!0}}throw r}S.delete(g);try{sessionStorage.removeItem(g)}catch{b=!0}return a}function Q(e,t,s){const n=`tower:user-submission:${e}:${JSON.stringify(t)}`;S.get(n)?.id===s&&S.delete(n);try{sessionStorage.getItem(n)===s&&sessionStorage.removeItem(n)}catch{b=!0}}const R="tower:outgoing:",j=e=>["outgoing-submissions",e];function $(e){try{const t=JSON.parse(sessionStorage.getItem(R+e)??"[]");return Array.isArray(t)?t.filter(s=>s&&s.scope===e&&typeof s.id=="string"&&typeof s.path=="string"&&typeof s.text=="string"&&s.body?.clientSubmissionId===s.id).map(s=>({...s,failed:!0})):[]}catch{return[]}}function O(e,t,s){const n=s(e.getQueryData(j(t))??$(t));e.setQueryData(j(t),n);try{sessionStorage.setItem(R+t,JSON.stringify(n))}catch{}}function be(e,t=[]){const s=U(),n=D({queryKey:j(e),queryFn:()=>$(e),initialData:()=>$(e),staleTime:1/0});return h.useEffect(()=>{const i=n.data.filter(c=>t.includes(c.id));if(i.length){for(const c of i)Q(L(c),_(c.body),c.id);O(s,e,c=>c.filter(m=>!t.includes(m.id)))}},[s,e,n.data,t]),n.data}async function ie(e,t,s,n,i){const c="message"in n?String(n.message):"prompt"in n?String(n.prompt):"";if("systemAction"in n)return k.post(s,n);O(e,t,m=>[...m.filter(d=>d.id!==n.clientSubmissionId),{id:n.clientSubmissionId,scope:t,path:s,body:n,text:c,createdAt:m.find(d=>d.id===n.clientSubmissionId)?.createdAt??new Date().toISOString(),failed:!1}]);try{const m=await k.post(s,n),d=i?await i(m):m;return d&&typeof d=="object"&&"operationId"in d&&P(e,d.delivery),O(e,t,g=>g.filter(l=>l.id!==n.clientSubmissionId)),d}catch(m){throw O(e,t,d=>d.map(g=>g.id===n.clientSubmissionId?{...g,failed:!0}:g)),m}}function _(e){return Object.fromEntries(Object.entries(e).filter(([t])=>t!=="clientSubmissionId"))}function L(e){return e.path==="/conversations"?"conversation:create":e.path.startsWith("/sessions/")?`message:${e.scope}`:`conversation:message:${e.path.split("/")[2]}`}async function re(e,t){return"operationId"in t&&"sessionId"in t?(P(e,t.delivery),k.get(`/conversations/${t.destinationId}`)):t}function Se(e){const t=U();return H({mutationFn:()=>oe(t,e),onSuccess:s=>(e.path==="/conversations"&&"id"in s&&t.setQueryData(X.conversations.detail(s.id),s),t.invalidateQueries())})}async function oe(e,t){const s=await ie(e,t.scope,t.path,t.body,t.path==="/conversations"?n=>re(e,n):void 0);return Q(L(t),_(t.body),t.id),s}const ae=W();async function ce(e){const t=new FormData;t.append("file",e);const s=await fetch(`${ae}/attachments/upload`,{method:"POST",body:t});if(!s.ok){const n=await s.json().catch(()=>({}));throw new Error(n.error||`Upload failed (${s.status})`)}return s.json()}let de=0;function xe(){const[e,t]=h.useState([]),s=h.useRef(e);s.current=e;const n=h.useCallback(async a=>{const r=a.map(o=>({tempId:`tmp-${++de}`,file:o,progress:0,status:"uploading"}));t(o=>[...o,...r]),await Promise.allSettled(r.map(async o=>{try{const y=await ce(o.file);t(u=>u.map(p=>p.tempId===o.tempId?{...p,status:"done",progress:100,attachment:y}:p))}catch(y){t(u=>u.map(p=>p.tempId===o.tempId?{...p,status:"error",error:y instanceof Error?y.message:"Upload failed"}:p))}}))},[]),i=h.useCallback(()=>s.current.filter(a=>a.status==="done"&&a.attachment).map(a=>a.attachment),[]),c=h.useCallback(a=>{t(r=>r.filter(o=>o.tempId!==a))},[]),m=h.useCallback(()=>{t([])},[]),d=h.useCallback(a=>{a.length!==0&&t(r=>{const o=new Set(r.map(u=>u.attachment?.id??u.tempId)),y=a.filter(u=>{const p=u.attachment?.id??u.tempId;return o.has(p)?!1:(o.add(p),!0)});return y.length>0?[...r,...y]:r})},[]),g=h.useCallback(()=>{const a=i();return a.length===0?"":a.map(r=>`${r.mimeType.startsWith("image/")?"!":""}[${r.originalName}](${r.storagePath})`).join(`
|
|
2
|
+
`)},[i]),l=e.length>0,w=e.some(a=>a.status==="uploading");return{files:e,addFiles:n,removeFile:c,clear:m,restoreFiles:d,buildMarkdownLinks:g,getDoneAttachments:i,hasFiles:l,isUploading:w}}function Ie(e){const t=h.useMemo(()=>Array.from(new Set(e.filter(Boolean))),[e]);return D({queryKey:["attachments","metadata",t],queryFn:()=>k.get("/attachments/metadata",{params:{ids:t.join(",")}}),enabled:t.length>0,staleTime:300*1e3})}function ve({content:e,children:t,className:s,side:n="top",align:i="center"}){return f.jsx(Z,{content:e,side:n,align:i,children:f.jsx("div",{className:q("relative inline-block [&>:disabled]:pointer-events-none",s),children:t})})}const ue=W();function le(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function we({files:e,onRemove:t}){return e.length===0?null:f.jsx("div",{"aria-label":"Attachments",className:"flex flex-wrap gap-2 px-4 pt-3 pb-1",children:e.map(s=>f.jsx(fe,{item:s,onRemove:t},s.tempId))})}function fe({item:e,onRemove:t}){const{t:s}=G(),n=e.file.type.startsWith("image/"),i=e.status==="error",c=e.status==="uploading";return f.jsxs("div",{className:q("relative group flex items-center gap-2 px-3 py-2 rounded-lg border text-xs max-w-[200px]",i?"border-destructive/25 bg-destructive/[0.06] text-destructive-ink":"border-border bg-muted/50 text-foreground/80"),children:[n&&e.status==="done"&&e.attachment?f.jsx("img",{src:`${ue}${e.attachment.url}`,alt:e.file.name,className:"w-8 h-8 rounded object-cover flex-shrink-0"}):f.jsx("span",{className:"flex-shrink-0",children:c?f.jsx(V,{size:16,className:"animate-spin motion-reduce:[animation-duration:2.4s] text-muted-foreground"}):n?f.jsx(se,{size:16,className:"text-muted-foreground"}):f.jsx(ee,{size:16,className:"text-muted-foreground"})}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("div",{className:"truncate font-medium",children:e.file.name}),i?f.jsx("div",{className:"truncate",children:e.error}):f.jsx("div",{className:"text-muted-foreground",children:le(e.file.size)})]}),f.jsx("button",{type:"button",onClick:()=>t(e.tempId),"aria-label":`${s("Remove")} ${e.file.name}`,className:"absolute -top-1.5 -right-1.5 flex size-5 items-center justify-center rounded-full bg-inverse text-inverse-foreground opacity-0 shadow-raised transition-opacity hover:bg-inverse/90 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 group-hover:opacity-100 pointer-coarse:opacity-100",children:f.jsx(Y,{size:10})})]})}export{we as A,ve as T,he as a,be as b,Ie as c,ye as d,ne as e,Se as f,pe as p,re as r,ie as s,xe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as I,r as i,j as a,N as M,O as S,n as j,Q as A}from"./index-Cm6snkmR.js";import{S as B}from"./search-field-CbM2P2KE.js";import{M as P,a as z,b as K}from"./menu-styles-DWynpVVz.js";import{P as U,a as O,b as R}from"./popover-CJCQLoGu.js";import{C as $}from"./chevron-down-CPnvItQw.js";import{C as L}from"./check-DqPSoX0r.js";function G({id:y,label:p,value:o,branches:l,disabled:N,isRefreshing:k,onChange:v,onOpen:C}){const{t}=I(),m=i.useId(),x=i.useRef(null),[c,g]=i.useState(!1),[r,f]=i.useState(""),[h,s]=i.useState(0),n=l.filter(e=>e.toLowerCase().includes(r.trim().toLowerCase())),u=n[h],D=l.includes(o),w=e=>{g(e),e&&(f(""),s(Math.max(0,l.indexOf(o))),C())},b=e=>{v(e),g(!1)};i.useEffect(()=>{c&&x.current?.querySelector("[data-highlighted]")?.scrollIntoView?.({block:"nearest"})},[c,h,r]);const E=e=>{e.nativeEvent.isComposing||(e.key==="ArrowDown"||e.key==="ArrowUp"?(e.preventDefault(),s(d=>Math.max(0,Math.min(n.length-1,d+(e.key==="ArrowDown"?1:-1))))):!r&&(e.key==="Home"||e.key==="End")?(e.preventDefault(),s(e.key==="Home"?0:Math.max(0,n.length-1))):e.key==="Enter"&&u&&(e.preventDefault(),b(u)))};return a.jsxs(U,{open:c,onOpenChange:w,children:[a.jsx(O,{asChild:!0,children:a.jsxs(M,{id:y,"aria-label":p,"aria-haspopup":"listbox",disabled:N,size:"lg",title:o,className:"w-full min-w-0 justify-between border border-input px-3 font-normal shadow-none ring-0 hover:border-ring/50 hover:bg-background focus-visible:border-ring focus-visible:ring-0 data-[state=open]:border-ring",onKeyDown:e=>{!c&&(e.key==="ArrowDown"||e.key==="ArrowUp")&&(e.preventDefault(),w(!0))},children:[a.jsx(S,{className:"size-3.5 text-muted-foreground"}),a.jsxs("span",{className:"min-w-0 flex-1 truncate text-left",children:[o,!D&&` (${t("Unavailable")})`]}),a.jsx($,{className:j("size-3.5 text-muted-foreground transition-transform",c&&"rotate-180")})]})}),a.jsxs(R,{"aria-label":p,className:"z-[70] flex max-h-[min(24rem,var(--radix-popover-content-available-height))] w-(--radix-popover-trigger-width) max-w-[calc(100vw-1rem)] flex-col overflow-hidden p-1",onKeyDown:e=>{e.key==="Escape"&&e.stopPropagation()},onEscapeKeyDown:e=>{e.stopPropagation(),r&&(e.preventDefault(),f(""),s(0))},children:[a.jsx("div",{className:"shrink-0 p-1",children:a.jsx(B,{"aria-label":t("Search branches"),placeholder:t("Search branches"),role:"combobox","aria-expanded":!0,"aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":u?`${m}-${h}`:void 0,value:r,onValueChange:e=>{f(e),s(0)},onKeyDown:E})}),a.jsxs("div",{ref:x,id:m,role:"listbox","aria-label":p,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:[n.map((e,d)=>a.jsxs("button",{id:`${m}-${d}`,type:"button",role:"option","aria-selected":e===o,"data-highlighted":d===h?"":void 0,tabIndex:-1,title:e,onPointerMove:()=>s(d),onClick:()=>b(e),className:j(K,z,e===o&&"font-medium text-foreground"),children:[a.jsx("span",{className:"min-w-0 flex-1 truncate",children:e}),e===o&&a.jsx("span",{className:P,children:a.jsx(L,{className:"size-3.5"})})]},e)),n.length===0&&a.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:t("No matching branches")})]}),a.jsxs("div",{role:"status",className:"flex shrink-0 items-center gap-1.5 border-t border-border/60 px-2 pt-2 pb-1 text-xs tabular-nums text-muted-foreground",children:[k&&a.jsx(A,{className:"size-3 animate-spin motion-reduce:[animation-duration:2.4s]","aria-label":t("Refreshing branches")}),r.trim()?t("{shown} of {total} local branches",{shown:n.length,total:l.length}):t("{count} local branches",{count:l.length})]})]})]})}export{G as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as N,r as S,x,j as a,P as m,C as E,a8 as i,E as M,n as b}from"./index-Cm6snkmR.js";import{u as V}from"./hooks-Ct0srfV-.js";import{I as A,c as C,R as D}from"./index-CPGzLjEC.js";import{u as F}from"./index-BYPOXP6w.js";const B=[["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"}]],X=N("square-pen",B);var P="Toggle",T=S.forwardRef((e,t)=>{const{pressed:l,defaultPressed:r,onPressedChange:s,...u}=e,[n,o]=x({prop:l,onChange:s,defaultProp:r??!1,caller:P});return a.jsx(m.button,{type:"button","aria-pressed":n,"data-state":n?"on":"off","data-disabled":e.disabled?"":void 0,...u,ref:t,onClick:E(e.onClick,()=>{e.disabled||o(!n)})})});T.displayName=P;var g="ToggleGroup",[j]=M(g,[C]),_=C(),h=i.forwardRef((e,t)=>{const{type:l,...r}=e;if(l==="single"){const s=r;return a.jsx(z,{...s,ref:t})}if(l==="multiple"){const s=r;return a.jsx(L,{...s,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${g}\``)});h.displayName=g;var[I,y]=j(g),z=i.forwardRef((e,t)=>{const{value:l,defaultValue:r,onValueChange:s=()=>{},...u}=e,[n,o]=x({prop:l,defaultProp:r??"",onChange:s,caller:g});return a.jsx(I,{scope:e.__scopeToggleGroup,type:"single",value:i.useMemo(()=>n?[n]:[],[n]),onItemActivate:o,onItemDeactivate:i.useCallback(()=>o(""),[o]),children:a.jsx(w,{...u,ref:t})})}),L=i.forwardRef((e,t)=>{const{value:l,defaultValue:r,onValueChange:s=()=>{},...u}=e,[n,o]=x({prop:l,defaultProp:r??[],onChange:s,caller:g}),d=i.useCallback(c=>o((p=[])=>[...p,c]),[o]),v=i.useCallback(c=>o((p=[])=>p.filter(R=>R!==c)),[o]);return a.jsx(I,{scope:e.__scopeToggleGroup,type:"multiple",value:n,onItemActivate:d,onItemDeactivate:v,children:a.jsx(w,{...u,ref:t})})});h.displayName=g;var[$,q]=j(g),w=i.forwardRef((e,t)=>{const{__scopeToggleGroup:l,disabled:r=!1,rovingFocus:s=!0,orientation:u,dir:n,loop:o=!0,...d}=e,v=_(l),c=F(n),p={role:"group",dir:c,...d};return a.jsx($,{scope:l,rovingFocus:s,disabled:r,children:s?a.jsx(D,{asChild:!0,...v,orientation:u,dir:c,loop:o,children:a.jsx(m.div,{...p,ref:t})}):a.jsx(m.div,{...p,ref:t})})}),f="ToggleGroupItem",k=i.forwardRef((e,t)=>{const l=y(f,e.__scopeToggleGroup),r=q(f,e.__scopeToggleGroup),s=_(e.__scopeToggleGroup),u=l.value.includes(e.value),n=r.disabled||e.disabled,o={...e,pressed:u,disabled:n},d=i.useRef(null);return r.rovingFocus?a.jsx(A,{asChild:!0,...s,focusable:!n,active:u,ref:d,children:a.jsx(G,{...o,ref:t})}):a.jsx(G,{...o,ref:t})});k.displayName=f;var G=i.forwardRef((e,t)=>{const{__scopeToggleGroup:l,value:r,...s}=e,u=y(f,l),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o=u.type==="single"?n:void 0;return a.jsx(T,{...o,...s,ref:t,onPressedChange:d=>{d?u.onItemActivate(r):u.onItemDeactivate(r)}})}),H=h,O=k;function Y({options:e,value:t,defaultValue:l,onValueChange:r,size:s="md",block:u=!1,className:n,...o}){const[d,v]=V({value:t,defaultValue:l??e[0]?.value??"",onChange:r});return a.jsx(H,{type:"single",value:d,onValueChange:c=>{c&&v(c)},"aria-label":o["aria-label"],className:b("items-center gap-0.5 rounded-lg bg-foreground/[0.05] p-0.5",u?"flex w-full":"inline-flex w-fit",n),children:e.map(c=>a.jsxs(O,{value:c.value,disabled:c.disabled,className:b("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium text-foreground/70 transition-[color,background-color,box-shadow] duration-150","hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40","data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-raised data-[state=on]:ring-1 data-[state=on]:ring-border/80",s==="md"?"h-7 px-3 text-xs [&_svg]:size-3.5":"h-6 px-2.5 text-xs [&_svg]:size-3",u&&"flex-1"),children:[c.icon,c.label,c.count!==void 0&&a.jsx("span",{className:"tabular-nums text-foreground/65",children:c.count})]},c.value))})}const U="/assets/agent-tower-lockup-DPAcheCt.png";function Z({className:e="h-6 w-auto max-[359px]:h-[22px]"}){return a.jsx("img",{src:U,alt:"Agent Tower",className:`block shrink-0 select-none object-contain ${e}`})}export{Z as B,X as S,Y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as ze,u as ce,r,j as e,at as Ke,au as Qe,Q as Fe,av as Ue,n as C,o as Ce,q as ne,p as de,s as x,v as V,aI as ke,aJ as Be,aK as $e,aL as _e,an as T,ac as Ve,ad as ye,aM as Ge,aN as He,w as We,az as le}from"./index-Cm6snkmR.js";import{u as Je,A as Ye,a as Se,s as Ie,r as Xe,b as Ze}from"./AttachmentPreview-DRG5_cfN.js";import{a as et,d as De,O as tt}from"./mermaid-NOHMQCX5-BqeX1osS.js";import{g as st,a as nt}from"./ExecutionPermissionSelector-CQ_GNxR0.js";import{u as rt,a as at,L as ot,T as it}from"./useNormalizedLogs-D0N8MJdH.js";import{u as lt,a as ct,R as dt,P as ut,T as mt}from"./useTokenUsage-WB3ZQ25v.js";import{u as ft,C as xt}from"./CreateTaskInput-CxWPeToI.js";import{P as pt}from"./paperclip-COXNce_v.js";import{B as ht,S as gt}from"./BrandLogo-Ilm880Xs.js";import{u as vt}from"./use-providers-FMSfyTD1.js";import{S as Ae}from"./search-CkiBPir_.js";import{M as he}from"./message-square-E5K8E3A-.js";import{T as bt}from"./trash-2-CUM-XX8B.js";import"./tooltip-DbVtCXcO.js";import"./kbd-Bfq5K6Ux.js";import"./index-CAjqC8pT.js";import"./index-DNdMmXBr.js";import"./index-DppwrK2G.js";import"./use-translation-settings-BOlszecX.js";import"./copy-DyxlXxiU.js";import"./index-kr6U6_pi.js";import"./chevron-down-CPnvItQw.js";import"./check-DqPSoX0r.js";import"./track-C0vxnITw.js";import"./menu-C3uB3M7p.js";import"./menu-styles-DWynpVVz.js";import"./index-BYPOXP6w.js";import"./index-CPGzLjEC.js";import"./use-projects-BlTwWxkY.js";import"./MemberAvatar-B2pAdWUi.js";import"./people-BaCetIqh.js";import"./hooks-Ct0srfV-.js";const yt=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],jt=ze("layout-list",yt);function Nt({sessionId:t,sessionStatus:n,sessionStartedAt:a,sessionEndedAt:u,agentType:h,runtimeType:f,providerId:m,providers:j,initialTokenUsage:g,onProviderChange:k,onSend:I,onStop:D,onExit:A,isSending:p=!1,isStopping:o=!1,canStop:v,className:N}){const{t:b}=ce(),[L,G]=r.useState(""),[q,H]=r.useState(m??""),O=st(j,q||m),[F,S]=r.useState(!1),W=r.useRef(null),re=r.useRef(null),ue=r.useRef(null),z=r.useRef(!1),{scrollRef:ae,contentRef:me,isAtBottom:fe,scrollToBottom:K,stopScroll:J}=lt({initial:"instant",resize:"smooth"}),{isConnected:Y,isLoadingSnapshot:i,isOutputActive:X,lastExitAt:Z,logs:U,entries:B,attach:$}=rt({sessionId:t,sessionStatus:n,sessionStartedAt:a,sessionEndedAt:u,onExit:A}),{todos:E}=at(B),oe=ct(U,g),{files:xe,addFiles:P,removeFile:pe,clear:ee,getDoneAttachments:ie,hasFiles:R,isUploading:Q}=Je(),{isActive:_,isCancelling:M}=ft(t,n),te=v??_;r.useEffect(()=>{H(m??"")},[m]),r.useEffect(()=>{t&&Y&&$()},[t,Y,$]);const s=r.useCallback(c=>{H(c),k?.(c)},[k]),l=r.useCallback(()=>{W.current&&(W.current.style.height="60px")},[]),d=r.useCallback(c=>{G(c.target.value);const w=c.target;w.style.height="auto",w.style.height=`${Math.max(60,Math.min(w.scrollHeight,300))}px`},[]),y=r.useCallback(async()=>{if(!L.trim()&&!R||z.current||p||o||M||Q||O)return;z.current=!0;const c=ie().map(se=>se.id),w=L.trim()||(c.length?" ":"");G(""),ee(),l();try{await I({message:w,providerId:q||void 0,attachmentIds:c}),await $(),requestAnimationFrame(()=>K("smooth"))}catch{}finally{z.current=!1}},[L,R,p,o,M,Q,ie,ee,l,I,q,O,$,K]),Le=r.useCallback(async()=>{!te||o||M||await D()},[te,o,M,D]),Pe=r.useCallback(c=>{const w=c.target.files;w&&w.length>0&&P(Array.from(w)),c.target.value=""},[P]),Me=r.useCallback(c=>{const w=c.clipboardData.items,se=[];for(const ve of w)if(ve.kind==="file"){const be=ve.getAsFile();be&&se.push(be)}se.length>0&&(c.preventDefault(),P(se))},[P]),Re=r.useCallback(c=>{c.preventDefault(),S(!0)},[]),qe=r.useCallback(c=>{c.preventDefault(),S(!1)},[]),Oe=r.useCallback(c=>{c.preventDefault(),S(!1);const w=c.dataTransfer.files;w.length>0&&P(Array.from(w))},[P]);return e.jsxs("div",{className:C("relative flex min-h-0 flex-1 flex-col bg-background",N),children:[e.jsxs("div",{className:"relative min-h-0 flex-1",children:[e.jsx("div",{ref:ae,className:"h-full overflow-y-auto scrollbar-app-thin px-6 pb-4 pt-6",children:e.jsx("div",{ref:me,className:"mx-auto w-full min-w-0 max-w-4xl",children:i?e.jsxs("div",{className:"flex items-center justify-center gap-3 py-12 text-muted-foreground",children:[e.jsxs("svg",{className:"h-5 w-5 animate-spin motion-reduce:[animation-duration:2.4s]",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),e.jsx("span",{className:"text-sm",children:b("Loading logs...")})]}):U.length===0&&!t?e.jsx("div",{className:"py-8 text-center text-muted-foreground",children:b(_?"Waiting for agent output...":"No logs recorded for this session.")}):e.jsx(ot,{children:e.jsx(et,{logs:U,sessionId:t,downloadSessionId:t,isOutputActive:X,lastExitAt:Z,onUserToggleDetails:J,scrollElementRef:ae})})})}),!fe&&e.jsxs("button",{type:"button",onClick:()=>K(),className:"absolute bottom-3 left-1/2 z-10 flex -translate-x-1/2 items-center gap-1.5 rounded-full border border-border bg-background/90 px-3 py-1.5 text-xs text-muted-foreground shadow-raised backdrop-blur-sm transition-all hover:bg-background hover:text-foreground","aria-label":b("Scroll to bottom"),children:[e.jsx(Ke,{size:14}),e.jsx("span",{children:b("Back to bottom")})]})]}),E.length>0&&e.jsx("div",{className:"shrink-0 border-t border-border/60 bg-background px-6 pb-1 pt-2",children:e.jsx("div",{className:"mx-auto max-w-4xl",children:e.jsx(it,{todos:E})})}),e.jsx("div",{className:"z-10 w-full shrink-0 border-t border-transparent bg-background p-6 pb-6 pt-2",onDragOver:Re,onDragLeave:qe,onDrop:Oe,children:e.jsxs("div",{className:"mx-auto max-w-4xl",children:[e.jsx(dt,{sessionId:t}),e.jsxs("div",{ref:ue,className:C("relative rounded-xl border bg-background transition-colors duration-200 hover:border-ring/40 focus-within:border-ring/60",F?"border-foreground/40 bg-foreground/[0.02]":"border-border"),children:[e.jsx(Ye,{files:xe,onRemove:pe}),e.jsx("textarea",{ref:W,value:L,onChange:d,onPaste:Me,onKeyDown:c=>{c.key==="Enter"&&!c.shiftKey&&!c.repeat&&!c.nativeEvent.isComposing&&c.nativeEvent.keyCode!==229&&(c.preventDefault(),y())},rows:1,placeholder:b(F?"Drop files here...":t&&!_?"Continue conversation...":"Message Agent..."),className:"w-full resize-none border-none bg-transparent px-4 pb-2 pt-4 text-sm leading-relaxed text-foreground placeholder-muted-foreground/70 focus:outline-none",style:{minHeight:"60px",maxHeight:"300px"}}),e.jsx("input",{ref:re,type:"file",multiple:!0,className:"hidden",onChange:Pe}),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.jsx("button",{type:"button",onClick:()=>re.current?.click(),disabled:Q,className:"rounded-lg p-2 text-muted-foreground transition-colors hover:bg-muted hover:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",title:b("Upload file"),children:e.jsx(pt,{size:18})})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ut,{providers:j,currentProviderId:q,agentType:h,runtimeType:f,onSelect:s}),e.jsx(mt,{usage:oe}),te&&_&&!p&&!L.trim()&&!R?e.jsx("button",{type:"button",onClick:Le,disabled:o||M,className:"rounded-lg bg-destructive-ink p-2 text-white transition-all duration-200 hover:bg-destructive-ink/90 disabled:opacity-50",title:b("Stop"),"aria-label":b("Stop"),children:e.jsx(Qe,{size:14})}):e.jsx("button",{type:"button",onClick:y,disabled:!L.trim()&&!R||Q||p||o||M||!!O,className:C("rounded-lg p-2 transition-all duration-200",(L.trim()||R)&&!Q&&!p&&!o&&!M&&!O?"bg-primary text-primary-foreground hover:bg-primary/90":"cursor-not-allowed bg-transparent text-muted-foreground"),title:b(p?"发送中...":"Send"),"aria-label":b(p?"发送中...":"Send"),"aria-busy":p,children:p?e.jsx(Fe,{size:18,className:"animate-spin"}):e.jsx(Ue,{size:18})})]})]})]})]})})]})}function wt(t=50){return Ce({queryKey:x.conversations.list({limit:t}),queryFn:()=>V.get("/conversations",{params:{limit:String(t)}})})}function Ct(t){return Ce({queryKey:x.conversations.detail(t??""),queryFn:()=>V.get(`/conversations/${t}`),enabled:!!t})}function kt(){const t=ne();return de({mutationFn:n=>Se("conversation:create",n,async a=>{const u=await Ie(t,"new-conversation","/conversations",a,h=>Xe(t,h));return"operationId"in u?(ke(t,u.delivery),t.invalidateQueries({queryKey:De(u.sessionId)}),V.get(`/conversations/${u.destinationId}`)):u}),onSuccess:n=>{t.setQueryData(x.conversations.detail(n.id),n),t.invalidateQueries({queryKey:x.conversations.all}),t.invalidateQueries({queryKey:x.sessions.detail(n.sessionId)})}})}function St(){const t=ne();return de({mutationFn:({id:n,sessionId:a,...u})=>Se(`conversation:message:${n}`,u,async h=>{const f=await Ie(t,a??t.getQueryData(x.conversations.detail(n))?.sessionId??`conversation:${n}`,`/conversations/${n}/message`,h);return"operationId"in f?(ke(t,f.delivery),t.invalidateQueries({queryKey:De(f.sessionId)}),V.get(`/conversations/${f.destinationId}`)):f}),onSuccess:n=>{t.setQueryData(x.conversations.detail(n.id),n),t.invalidateQueries({queryKey:x.conversations.all}),t.invalidateQueries({queryKey:x.sessions.detail(n.sessionId)})}})}function It(){const t=ne();return de({mutationFn:n=>V.post(`/conversations/${n}/stop`),onSuccess:n=>{t.setQueryData(x.conversations.detail(n.id),n),t.invalidateQueries({queryKey:x.conversations.all}),t.invalidateQueries({queryKey:x.sessions.detail(n.sessionId)})},onSettled:(n,a,u)=>{const h=t.getQueryData(x.conversations.detail(u)),f=n?.sessionId??h?.sessionId;t.invalidateQueries({queryKey:x.conversations.detail(u)}),f&&(t.invalidateQueries({queryKey:x.sessions.detail(f)}),t.invalidateQueries({queryKey:x.sessions.runtime(f)}))}})}function Dt(){const t=ne();return de({mutationFn:n=>V.delete(`/conversations/${n}`),onSuccess:(n,a)=>{t.removeQueries({queryKey:x.conversations.detail(a)}),t.invalidateQueries({queryKey:x.conversations.all})}})}const At=3e4,Ee="agent-tower:conversation-read-times";function Et(){try{const t=window.localStorage.getItem(Ee);if(!t)return{};const n=JSON.parse(t);return!n||typeof n!="object"||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).map(([a,u])=>[a,typeof u=="number"?u:Number(u)]).filter(a=>Number.isFinite(a[1])))}catch{return{}}}function je(t){try{window.localStorage.setItem(Ee,JSON.stringify(t))}catch{}}function Ne(t){const n=t.lastActiveAt??t.updatedAt??t.createdAt;if(!n)return 0;const a=new Date(n).getTime();return Number.isFinite(a)?a:0}function Tt(t=At){const[,n]=r.useState(0);r.useEffect(()=>{const a=setInterval(()=>n(u=>u+1),t);return()=>clearInterval(a)},[t])}function ge(t){return t===T.RUNNING||t===T.PENDING}function Te(t){if(!t)return"";const n=new Date(t);if(Number.isNaN(n.getTime()))return"";const a=Math.max(0,Math.floor((Date.now()-n.getTime())/1e3));return a<60?le("{count}s ago",{count:a}):a<3600?le("{count}m ago",{count:Math.floor(a/60)}):a<86400?le("{count}h ago",{count:Math.floor(a/3600)}):le("{count}d ago",{count:Math.floor(a/86400)})}function Lt(t,n){switch(t){case T.RUNNING:return n("Running");case T.PENDING:return n("Starting");case T.COMPLETED:return n("Completed");case T.FAILED:return n("Failed");case T.CANCELLED:return n("Stopped");default:return t}}function we({className:t,pulseClassName:n}){return e.jsxs("span",{className:"relative inline-flex h-2 w-2",children:[e.jsx("span",{className:C("absolute inline-flex h-full w-full animate-ping motion-reduce:animate-none rounded-full",n)}),e.jsx("span",{className:C("relative inline-flex h-2 w-2 rounded-full",t)})]})}function Pt({status:t,unread:n}){return ge(t)?e.jsx(we,{className:"bg-success",pulseClassName:"bg-success/70"}):n?e.jsx(we,{className:"bg-warning",pulseClassName:"bg-warning/70"}):null}function Mt({conversation:t,selected:n,onSelect:a,onDelete:u,disabled:h,unread:f}){const{t:m}=ce(),j=Te(t.lastActiveAt??t.createdAt),g=ge(t.status)||f;return e.jsxs("div",{className:C("group ml-4 mr-2 flex items-center rounded-md transition-colors",n?"bg-accent":"hover:bg-accent/50"),children:[e.jsxs("button",{type:"button",onClick:a,title:t.title,className:"flex min-w-0 flex-1 animate-task-enter items-center gap-2.5 rounded-md px-2 py-2 text-left text-sm",children:[e.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:e.jsx(he,{size:14,className:"text-muted-foreground"})}),e.jsx("span",{className:C("min-w-0 flex-1 truncate",n?"font-medium text-foreground":"text-foreground/90"),children:t.title}),g?e.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:e.jsx(Pt,{status:t.status,unread:f})}):e.jsx("span",{className:"flex w-14 shrink-0 items-center justify-end text-[11px] tabular-nums text-muted-foreground",children:e.jsx("span",{className:"truncate group-hover:hidden",children:j})})]}),e.jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),u()},disabled:h,className:"mr-1 hidden shrink-0 rounded-md p-1.5 text-muted-foreground hover:bg-background hover:text-destructive disabled:opacity-50 group-hover:flex",title:m("Delete"),children:e.jsx(bt,{size:14})})]})}function Rt({isOpen:t,conversations:n,onClose:a,onSelectConversation:u}){const{t:h}=ce(),[f,m]=r.useState(""),[j,g]=r.useState(0),k=r.useRef(null);r.useEffect(()=>{t&&(m(""),g(0))},[t]);const I=r.useMemo(()=>{const o=f.trim().toLowerCase();return o?n.filter(v=>v.title.toLowerCase().includes(o)).slice(0,50):n.slice(0,12)},[n,f]);r.useEffect(()=>{g(0)},[f]),r.useEffect(()=>{k.current?.children[j]?.scrollIntoView({block:"nearest"})},[j]);const D=r.useCallback(o=>{u(o),a()},[a,u]),A=r.useCallback(o=>{if(o.key==="Escape"){o.preventDefault(),a();return}if(o.key==="ArrowDown"){o.preventDefault(),g(v=>Math.min(v+1,I.length-1));return}if(o.key==="ArrowUp"){o.preventDefault(),g(v=>Math.max(v-1,0));return}if(o.key==="Enter"&&!o.nativeEvent.isComposing){o.preventDefault();const v=I[j];v&&D(v)}},[j,D,a,I]);if(!t)return null;const p=f.trim().length>0;return e.jsxs("div",{className:"fixed inset-0 z-90",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-black/20",onClick:a}),e.jsxs("div",{className:"absolute left-1/2 top-[18vh] w-[min(560px,calc(100vw-2rem))] -translate-x-1/2 overflow-hidden rounded-xl border border-border bg-popover shadow-popover animate-in fade-in zoom-in-95 duration-100",children:[e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/60 px-4",children:[e.jsx(Ae,{size:15,className:"shrink-0 text-muted-foreground/70"}),e.jsx("input",{value:f,onChange:o=>m(o.target.value),onKeyDown:A,placeholder:h("Search conversations..."),"aria-label":h("Search conversations..."),autoFocus:!0,className:"flex-1 border-none bg-transparent py-3 text-sm text-foreground placeholder-muted-foreground/60 focus:outline-none"})]}),I.length>0?e.jsxs(e.Fragment,{children:[p?null:e.jsx("div",{className:"px-4 pb-1 pt-2.5 text-xs font-medium text-muted-foreground",children:h("Recent conversations")}),e.jsx("div",{ref:k,className:"max-h-[46vh] overflow-y-auto pb-1.5 pt-0.5 scrollbar-app-thin",children:I.map((o,v)=>e.jsxs("button",{type:"button",onClick:()=>D(o),onMouseEnter:()=>g(v),className:C("flex w-full items-center gap-2.5 px-4 py-2 text-left transition-colors",v===j&&"bg-accent"),children:[e.jsx(he,{size:14,className:"shrink-0 text-muted-foreground"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground/90",title:o.title,children:o.title}),e.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Te(o.lastActiveAt??o.createdAt)})]},o.id))})]}):e.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:h("No matching conversations")})]})]})}function xs(){const{t}=ce();Tt();const n=Be(),{usesIntegratedTitlebar:a,desktopPlatform:u,hasMacTrafficLights:h}=$e(),f=a&&u==="win32",{conversationId:m}=_e(),j=ne(),[g,k]=r.useState(""),[I,D]=r.useState("idle"),[A,p]=r.useState(!1),[o,v]=r.useState(0),N=r.useRef({conversationId:m,isCreatingNew:A,epoch:o});(N.current.conversationId!==m||N.current.isCreatingNew!==A||N.current.epoch!==o)&&(N.current={conversationId:m,isCreatingNew:A,epoch:o});const b=N.current,[L,G]=r.useState(!1),[q,H]=r.useState(Et),[O,F]=r.useState(()=>new Set),{data:S=[],isLoading:W}=wt(),{data:re,isLoading:ue}=Ct(m),{data:z=[],isLoading:ae}=vt(),me=Ze("new-conversation"),fe=kt(),K=St(),J=It(),Y=Dt(),i=re??S.find(s=>s.id===m)??null,X=r.useMemo(()=>z.map(s=>{const l=nt(s);return{id:s.provider.id,name:s.provider.name,agentType:s.provider.agentType,available:!l,permissionMode:s.provider.executionPermission,reason:l}}),[z]),Z=!!m,U=Z||A,B=r.useCallback(s=>{j.invalidateQueries({queryKey:x.conversations.all}),s&&j.invalidateQueries({queryKey:x.conversations.detail(s)})},[j]),$=r.useCallback(()=>{B(m)},[m,B]),E=r.useCallback(s=>{if(F(d=>{if(!d.has(s.id))return d;const y=new Set(d);return y.delete(s.id),y}),s.status!==T.COMPLETED)return;const l=Math.max(Date.now(),Ne(s));H(d=>{if(d[s.id]&&d[s.id]>=l)return d;const y={...d,[s.id]:l};return je(y),y})},[]),oe=r.useCallback(s=>{F(l=>{if(l.has(s))return l;const d=new Set(l);return d.add(s),d})},[]),xe=r.useCallback(s=>{F(l=>{if(!l.has(s))return l;const d=new Set(l);return d.delete(s),d}),H(l=>{if(!(s in l))return l;const d={...l};return delete d[s],je(d),d})},[]),P=r.useMemo(()=>{const s=new Map;for(const l of S)s.set(l.sessionId,l);return i&&s.set(i.sessionId,i),s},[i,S]),pe=r.useCallback(s=>s.status!==T.COMPLETED?!1:O.has(s.id)?!0:Ne(s)>(q[s.id]??0),[q,O]);r.useEffect(()=>{i||g||k(X.find(s=>s.available)?.id??"")},[i,g,X]),r.useEffect(()=>{i?.providerId&&k(i.providerId)},[i?.providerId]),r.useEffect(()=>{m&&p(!1)},[m]),r.useEffect(()=>{i&&E(i)},[i,E]),r.useEffect(()=>{const s=Ve.connect(),l=d=>{const y=P.get(d.sessionId);if(y){if(B(y.id),d.status!==T.COMPLETED){E(y);return}if(y.id===m){E(y);return}oe(y.id)}};return s.on(ye.SESSION_COMPLETED,l),()=>{s.off(ye.SESSION_COMPLETED,l)}},[m,P,B,E,oe]);const ee=()=>{N.current={conversationId:void 0,isCreatingNew:!0,epoch:N.current.epoch+1},v(N.current.epoch),D("idle"),p(!0),n("/conversations")},ie=()=>{p(!1),n("/conversations")},R=r.useCallback(s=>{E(s),p(!1),n(`/conversations/${s.id}`)},[E,n]),Q=async s=>{if(!s.providerId||!s.title.trim()||I!=="idle")return;D("starting-session");const l=N.current;try{const d=await fe.mutateAsync({prompt:s.title.trim(),providerId:s.providerId,attachmentIds:s.attachmentIds});N.current===l&&(k(s.providerId),p(!1),n(`/conversations/${d.id}`))}finally{N.current===l&&D("idle")}},_=async s=>{!i||!s.message.trim()&&!s.attachmentIds?.length||K.isPending||await K.mutateAsync({id:i.id,sessionId:i.sessionId,message:s.message,providerId:s.providerId||g||void 0,attachmentIds:s.attachmentIds})},M=async()=>{!i||J.isPending||await J.mutateAsync(i.id)},te=async s=>{window.confirm(t("Delete this conversation?"))&&(await Y.mutateAsync(s),xe(s),m===s&&(p(!1),n("/conversations")))};return e.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-sidebar text-sm text-foreground",children:[e.jsxs("header",{className:C("flex h-12 shrink-0 items-center justify-between bg-sidebar px-4",a&&"app-region-drag",f&&"pr-[150px]"),children:[e.jsxs("div",{className:C("flex min-w-0 items-center gap-2",h&&"pl-[72px]"),children:[e.jsx(ht,{}),e.jsx("span",{className:"mx-1.5 select-none text-muted-foreground",children:"/"}),e.jsx("span",{className:"truncate text-sm font-medium text-foreground/90",children:t("Conversation")})]}),e.jsx("button",{type:"button",onClick:()=>He.getState().openSettings(),className:C("rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",a&&"app-region-no-drag"),title:t("Settings"),children:e.jsx(Ge,{size:16})})]}),e.jsxs("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[e.jsxs("aside",{className:C("h-full w-full shrink-0 flex-col bg-sidebar md:flex md:w-[320px]",U?"hidden md:flex":"flex"),children:[e.jsxs("div",{className:"shrink-0 px-2 pb-1 pt-2",children:[e.jsxs("button",{type:"button",onClick:ee,className:C("flex w-full items-center gap-2.5 rounded-md px-2 py-2 text-sm transition-colors",A?"bg-accent text-foreground":"text-foreground/80 hover:bg-accent/50"),title:t("New Conversation"),children:[e.jsx(gt,{size:16,className:"text-muted-foreground"}),e.jsx("span",{children:t("New Conversation")})]}),e.jsxs("button",{type:"button",onClick:()=>n("/"),className:"flex w-full items-center gap-2.5 rounded-md px-2 py-2 text-sm text-foreground/80 transition-colors hover:bg-accent/50",title:t("Tasks"),children:[e.jsx(jt,{size:16,className:"text-muted-foreground"}),e.jsx("span",{children:t("Tasks")})]}),e.jsxs("button",{type:"button",onClick:()=>G(!0),className:"flex w-full items-center gap-2.5 rounded-md px-2 py-2 text-sm text-foreground/80 transition-colors hover:bg-accent/50",title:t("Search"),children:[e.jsx(Ae,{size:16,className:"text-muted-foreground"}),e.jsx("span",{children:t("Search")})]})]}),e.jsx("div",{className:"relative min-h-0 flex-1 overflow-y-auto scrollbar-app-thin pb-4 pt-3",children:W?e.jsx("div",{className:"px-4 py-4 text-sm text-muted-foreground",children:t("Loading...")}):S.length===0?e.jsxs("div",{className:"flex h-full select-none flex-col items-center justify-center px-6 text-center",children:[e.jsx(he,{size:36,"aria-hidden":"true",className:"mb-3 text-muted-foreground/50",strokeWidth:1.5}),e.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:t("No conversations")}),e.jsx("button",{type:"button",onClick:ee,className:"rounded-md bg-brand px-3.5 py-1.5 text-xs font-medium text-brand-foreground transition-colors hover:bg-brand/90",children:t("New Conversation")})]}):e.jsxs("div",{className:"mb-2",children:[e.jsxs("div",{className:"flex w-full items-center gap-1.5 px-4 py-1.5 text-xs font-medium text-muted-foreground",children:[e.jsx("span",{className:"flex-1 text-left",children:t("History")}),e.jsx("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:S.length})]}),e.jsx("div",{className:"mt-0.5 flex min-h-[40px] flex-col rounded-md",children:S.map(s=>e.jsx(Mt,{conversation:s,selected:s.id===m,disabled:Y.isPending,unread:s.id!==m&&pe(s),onSelect:()=>R(s),onDelete:()=>te(s.id)},s.id))})]})}),e.jsx("div",{className:"flex items-center justify-between border-t border-border/60 px-4 py-3 text-xs text-muted-foreground",children:e.jsxs("span",{children:[t("Conversations")," · ",S.length]})})]}),e.jsxs("main",{className:C("min-w-0 flex-1 flex-col bg-background md:mb-2 md:mr-2 md:overflow-hidden md:rounded-xl md:border md:border-border/50",U?"flex":"hidden md:flex"),children:[e.jsx("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-border/60 px-4 md:px-5",children:e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[Z||A?e.jsx("button",{type:"button",className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground md:hidden",onClick:ie,title:t("Back"),children:e.jsx(We,{size:17})}):null,e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-sm font-semibold",children:i?.title??t("New Conversation")}),i?e.jsxs("div",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[Lt(i.status,t),i.directoryName?` · ${i.directoryName}`:""]}):null]})]})}),!i&&Z?e.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center px-4 text-sm text-muted-foreground",children:t(ue?"Loading...":"Conversation not found")}):i?e.jsx(Nt,{sessionId:i.sessionId,sessionStatus:i.status,sessionStartedAt:i.createdAt,sessionEndedAt:ge(i.status)?null:i.lastActiveAt??i.updatedAt,agentType:i.agentType,runtimeType:i.runtimeType,providerId:g||i.providerId,providers:z,initialTokenUsage:i.tokenUsage,onProviderChange:k,onSend:_,onStop:M,onExit:$,isSending:K.isPending,isStopping:J.isPending}):e.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center overflow-y-auto px-4 pb-[10vh] md:px-8",children:e.jsxs("div",{className:"w-full max-w-2xl animate-[fadeInUp_0.5s_cubic-bezier(0.16,1,0.3,1)]",children:[me.map(s=>e.jsx(tt,{item:s,onConversationCreated:l=>{N.current===b&&n(`/conversations/${l}`)}},s.id)),e.jsx("h1",{className:"mb-8 max-w-full break-words text-center text-[26px] leading-tight tracking-tight text-foreground",children:t("需要我帮你做点什么?")}),e.jsx(xt,{variant:"conversation",projects:[],providers:X,isProvidersLoading:ae,defaultProviderId:g,createStep:I,placeholder:"Ask a question...",submitLabel:"Start",pendingLabel:"Starting...",submitTitle:"Start",onSubmit:async({title:s,providerId:l,attachmentIds:d})=>{await Q({title:s,providerId:l,attachmentIds:d})}},o)]})})]})]}),e.jsx(Rt,{isOpen:L,conversations:S,onClose:()=>G(!1),onSelectConversation:R})]})}export{xs as ConversationPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ze,s as gt,u as bt,A as vt,T as Fe}from"./AttachmentPreview-DRG5_cfN.js";import{c as ne,q as he,p as je,aI as Je,s as T,t as yt,az as Nt,v as ge,o as et,r as a,ac as wt,ad as de,an as We,u as Ce,bi as tt,j as e,n as g,bj as jt,aK as Ct,T as kt,U as St,Q as we,aO as Ue,X as Et,aC as Mt,a_ as ye,aq as E,bk as He,av as It,a0 as Qe,O as Tt,aA as Rt,bl as Ot,bm as At}from"./index-Cm6snkmR.js";import{d as Lt}from"./use-projects-BlTwWxkY.js";import{M as Be}from"./MemberAvatar-B2pAdWUi.js";import{t as Ve}from"./tooltip-DbVtCXcO.js";import{a as Pt}from"./BrandLogo-Ilm880Xs.js";import{u as _t}from"./use-providers-FMSfyTD1.js";import{C as se}from"./check-DqPSoX0r.js";import{P as Dt}from"./trash-2-CUM-XX8B.js";import{C as xe}from"./chevron-down-CPnvItQw.js";import{l as zt}from"./ExecutionPermissionSelector-CQ_GNxR0.js";import{M as $t}from"./index-CPGzLjEC.js";import{P as Gt}from"./paperclip-COXNce_v.js";import{F as qt}from"./hooks-Ct0srfV-.js";const Kt=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],Ft=ne("chevrons-down",Kt);const Wt=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],Ut=ne("chevrons-up",Wt);const Ht=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],Qt=ne("shield-off",Ht);const Bt=[["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:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Vt=ne("shield-question-mark",Bt);const Yt=[["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"}]],Xt=ne("shield",Yt);const Zt=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}]],Jt=ne("signal-high",Zt);const es=[["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"}]],ts=ne("zap",es);function ss(t){const s=he(),r=et({queryKey:T.sessions.runtime(t),queryFn:()=>ge.get(`/sessions/${t}/runtime`),enabled:!!t});return a.useEffect(()=>{if(!t)return;const i=wt.connect(),d=p=>{p.sessionId===t&&s.invalidateQueries({queryKey:T.sessions.runtime(t)})},l=p=>{p.sessionId===t&&s.setQueryData(T.sessions.runtime(t),p.state)},u=()=>{s.invalidateQueries({queryKey:T.sessions.runtime(t)})};return i.on(de.SESSION_PERMISSION_REQUESTED,d),i.on(de.SESSION_PERMISSION_INVALIDATED,d),i.on(de.SESSION_RUNTIME_STATE_CHANGED,l),i.on("connect",u),()=>{i.off(de.SESSION_PERMISSION_REQUESTED,d),i.off(de.SESSION_PERMISSION_INVALIDATED,d),i.off(de.SESSION_RUNTIME_STATE_CHANGED,l),i.off("connect",u)}},[t,s]),r}function ns(t){return t==="RUNNING"||t==="AWAITING_PERMISSION"||t==="CANCELLING"}function os(t){return t===We.RUNNING||t===We.PENDING}function Ws(t,s){const{data:r}=ss(t);return{runtimeState:r,isActive:os(s)||ns(r?.turnState),isCancelling:r?.turnState==="CANCELLING"}}function Us(){const t=he();return je({mutationFn:({sessionId:s,requestId:r,optionId:i})=>ge.post(`/sessions/${s}/permissions/${r}/resolve`,{optionId:i}),onSettled:(s,r,i)=>{t.invalidateQueries({queryKey:T.sessions.runtime(i.sessionId)})}})}function Hs(){const t=he();return je({mutationFn:s=>Ze(`start:${s}`,{},r=>ge.post(`/sessions/${s}/start`,r)),onSuccess:(s,r)=>{"operationId"in s&&Je(t,s.delivery),t.invalidateQueries({queryKey:T.sessions.detail(r)}),t.invalidateQueries({queryKey:T.tasks.all})}})}const rs=45e3;function Qs(){const t=he();return je({mutationFn:async s=>{try{return await ge.post(`/sessions/${s}/stop`,void 0,{signal:AbortSignal.timeout(rs)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error("Stop request timed out before the server answered. The session may still be stopping; refresh the status and retry."):r}},onError:s=>{yt.error(Nt("Failed to stop session. Refreshing status; check it and try again."),{description:s instanceof Error?s.message:void 0})},onSettled:(s,r,i)=>{t.setQueryData(T.sessions.runtime(i),d=>d?.turnState==="CANCELLING"?{...d,turnState:"IDLE"}:d),Promise.allSettled([t.invalidateQueries({queryKey:T.sessions.detail(i)}),t.invalidateQueries({queryKey:T.sessions.runtime(i)}),t.invalidateQueries({queryKey:T.workspaces.all}),t.invalidateQueries({queryKey:T.tasks.all})])}})}function Bs(){const t=he();return je({mutationFn:({id:s,...r})=>Ze(`message:${s}`,r,i=>gt(t,s,`/sessions/${s}/message`,i)),onSuccess:s=>{"operationId"in s&&Je(t,s.delivery),t.invalidateQueries({queryKey:T.workspaces.all}),t.invalidateQueries({queryKey:T.tasks.all})}})}function Ye({iconName:t,className:s}){switch(t){case"chevrons-up":return e.jsx(Ut,{className:s,"aria-hidden":"true"});case"signal-high":return e.jsx(Jt,{className:s,"aria-hidden":"true"});case"chevrons-down":return e.jsx(Ft,{className:s,"aria-hidden":"true"});default:return e.jsx($t,{className:s,"aria-hidden":"true"})}}function Vs({priority:t,className:s}){const r=tt(t);return e.jsx("span",{className:g("inline-flex shrink-0 items-center rounded px-1.5 py-0.5 text-[10px] font-semibold leading-none",r.className,s),title:`${r.code} · ${r.label}`,children:r.code})}function as({value:t,onChange:s,disabled:r=!1,compact:i=!1}){const{t:d}=Ce(),[l,u]=a.useState(!1),p=a.useRef(null),m=tt(t);return a.useEffect(()=>{if(!l)return;const f=j=>{p.current&&!p.current.contains(j.target)&&u(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[l]),e.jsxs("div",{className:"relative",ref:p,children:[e.jsxs("button",{type:"button",disabled:r||!s,onClick:()=>u(f=>!f),"aria-haspopup":"listbox","aria-expanded":l,"aria-label":d("Task priority"),className:g("inline-flex items-center gap-1.5 rounded-md text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:cursor-not-allowed disabled:opacity-50",i?"px-1.5 py-1":"px-2 py-1.5",m.className),children:[e.jsx(Ye,{iconName:m.iconName,className:"size-3.5"}),e.jsx("span",{children:d(m.label)}),s?e.jsx(xe,{className:g("size-3 transition-transform",l&&"rotate-180"),"aria-hidden":"true"}):null]}),l&&e.jsx("div",{className:"absolute right-0 top-full z-50 mt-1.5 w-36 rounded-lg border border-border bg-popover p-1 shadow-popover",role:"listbox","aria-label":d("Task priority"),children:jt.map(f=>{const j=f.value===m.value;return e.jsxs("button",{type:"button",role:"option","aria-selected":j,onClick:()=>{s?.(f.value),u(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-xs text-foreground/80 transition-colors hover:bg-accent",children:[e.jsx("span",{className:g("inline-flex size-5 items-center justify-center rounded",f.className),children:e.jsx(Ye,{iconName:f.iconName,className:"size-3.5"})}),e.jsxs("span",{className:"flex-1",children:[f.code," · ",d(f.label)]}),j?e.jsx(se,{className:"size-3.5 text-foreground","aria-hidden":"true"}):null]},f.value)})})]})}function Xe(t,s,r,i){if(r.filter(u=>u===i).length<=1)return t;const l=r.slice(0,s+1).filter(u=>u===i).length;return`${t} #${l}`}function is(t){return Object.values(t).filter(Boolean).length}function cs({mode:t,setMode:s,selectedTemplateId:r,setSelectedTemplateId:i,selectedMemberPresetIds:d,setSelectedMemberPresetIds:l,disabled:u=!1,compact:p=!1}){const{t:m}=Ce(),{preserveDesktopSearch:f}=Ct(),[j,y]=a.useState(!1),{data:N}=_t(),{data:c,isError:x,isFetching:_,isLoading:h,refetch:L}=kt(),{data:R,isError:C,isFetching:D,isLoading:Z,refetch:P}=St(),oe=a.useMemo(()=>new Map((N??[]).map(({provider:o,availability:b})=>[o.id,o.name+(b.type==="NOT_FOUND"?m(" (不可用)"):"")])),[N,m]),O=a.useMemo(()=>new Map((c??[]).map(o=>[o.id,o])),[c]),G=a.useMemo(()=>new Map((R??[]).map(o=>[o.id,o])),[R]),U=a.useMemo(()=>d.map(o=>O.get(o)).filter(o=>!!o),[O,d]);a.useEffect(()=>{c!==void 0&&l(o=>{const b=o.filter(M=>O.has(M));return b.length===o.length&&b.every((M,$)=>M===o[$])?o:b})},[c,O,l]),a.useEffect(()=>{R!==void 0&&i(o=>!o||G.has(o)?o:null)},[i,G,R]);const re=o=>{u||i(b=>b===o?null:o)},le=o=>{u||l(b=>[...b,o])},H=o=>{u||l(b=>b.filter((M,$)=>$!==o))},J=e.jsxs("section",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:m("团队模板")}),C?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive-ink",children:[e.jsx("span",{children:m("团队模板加载失败")}),e.jsx("button",{type:"button",onClick:()=>{P()},disabled:u||D,className:"ml-2 underline hover:no-underline",children:m("重试")})]}):Z?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(we,{size:12,className:"animate-spin motion-reduce:[animation-duration:2.4s]"}),m("加载中...")]}):(R??[]).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:[m("当前没有团队模板"),e.jsx(Ue,{to:f("/settings/team"),className:Ve("ml-1.5"),children:m("去创建")})]}):e.jsx("div",{className:g("space-y-1.5",p&&"sm:grid sm:grid-cols-2 sm:gap-1.5 sm:space-y-0"),children:(R??[]).map(o=>{const b=o.id===r,M=o.members?.length??0,$=o.members?.map(B=>B.memberPresetId)??[],Q=o.members?.slice(0,3).map((B,ie)=>Xe(B.memberPreset?.name??B.memberPresetId,ie,$,B.memberPresetId)).join(", ");return e.jsx("button",{type:"button",onClick:()=>re(o.id),disabled:u,className:g("w-full rounded-lg px-3 py-2 text-left border transition-all disabled:cursor-not-allowed disabled:opacity-60",b?"bg-background border-foreground/20 shadow-raised":"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:g("text-xs truncate",b?"font-medium text-foreground":"text-foreground"),children:o.name}),e.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[M,m("人")]})]}),Q&&e.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:Q})]}),b&&e.jsx(se,{size:13,className:"shrink-0 text-foreground"})]})},o.id)})})]}),q=U.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:U.map((o,b)=>{const M=Xe(o.name,b,d,o.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-xs text-foreground",children:[e.jsx(Be,{name:o.name,avatar:o.avatar,size:"xs",className:"size-3.5"}),e.jsx("span",{className:"max-w-[80px] truncate",children:M}),e.jsx("button",{type:"button",onClick:()=>H(b),disabled:u,className:"p-0.5 text-muted-foreground hover:text-destructive disabled:opacity-30 rounded transition-colors",children:e.jsx(Et,{size:9})})]},`${o.id}-${b}`)})}),ae=x?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive-ink",children:[e.jsx("span",{children:m("成员预设加载失败")}),e.jsx("button",{type:"button",onClick:()=>{L()},disabled:u||_,className:"ml-2 underline hover:no-underline",children:m("重试")})]}):h?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(we,{size:12,className:"animate-spin motion-reduce:[animation-duration:2.4s]"}),m("加载中...")]}):(c??[]).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:[m("当前没有成员预设"),e.jsx(Ue,{to:f("/settings/team"),className:Ve("ml-1.5"),children:m("去创建")})]}):e.jsx("div",{className:"space-y-1 max-h-[180px] overflow-y-auto pr-1",children:(c??[]).map(o=>{const b=d.filter(Q=>Q===o.id).length,M=oe.get(o.providerId)??o.providerId,$=is(o.capabilities);return e.jsxs("button",{type:"button",onClick:()=>le(o.id),disabled:u,className:g("flex items-center gap-2 w-full px-2 py-1.5 rounded-lg text-left border border-transparent transition-all",u&&"cursor-not-allowed opacity-60","bg-background hover:bg-accent hover:border-border/60"),children:[e.jsx(Be,{name:o.name,avatar:o.avatar,className:"h-6 w-6 text-[10px] shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-xs text-foreground truncate",children:o.name}),e.jsxs("div",{className:"text-xs text-muted-foreground truncate",children:[M," · ",$,"/10"]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[b>0&&e.jsxs("span",{className:"text-[11px] text-foreground font-semibold",children:["×",b]}),e.jsx(Dt,{size:12,className:"text-muted-foreground"})]})]},o.id)})}),K=U.length>0&&e.jsx("span",{className:"inline-flex items-center justify-center min-w-[16px] h-4 rounded-full bg-primary text-[11px] font-semibold text-primary-foreground px-1.5",children:U.length}),me=e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:m("执行模式")}),e.jsx(Pt,{size:"sm","aria-label":m("执行模式"),value:t,onValueChange:o=>s(o),options:[{value:"AUTO",label:m("自动模式"),icon:e.jsx(ts,{}),disabled:u},{value:"CONFIRM",label:m("确认模式"),icon:e.jsx(Xt,{}),disabled:u}]})]});return p?e.jsxs("div",{className:"space-y-3",children:[me,J,e.jsxs("div",{className:"border-t border-border/50 pt-2.5",children:[e.jsxs("button",{type:"button",onClick:()=>!u&&y(o=>!o),disabled:u,"aria-expanded":j,className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(xe,{size:12,className:g("transition-transform",j?"":"-rotate-90")}),m("追加独立成员"),K]}),j&&e.jsxs("div",{className:"mt-2",children:[q,ae]})]})]}):e.jsxs("div",{className:"space-y-3.5",children:[me,e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[J,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-xs font-medium text-muted-foreground",children:m("追加成员")}),K]}),q,ae]})]})]})}function ds({commands:t,selectedIndex:s,query:r,hasCatalog:i,title:d="Slash Commands",queryPrefix:l="/",emptyCatalogMessage:u="No slash commands catalog for this agent yet.",emptyQueryMessage:p,insertionHint:m="Enter / Tab to insert",compact:f=!1,onSelect:j}){const y=f?"px-1.5 pb-1.5":"px-2 pb-2",N=f?"px-2 py-1.5":"px-2.5 py-2",c=f?"max-h-36":"max-h-48";return e.jsxs("div",{className:f?"pt-1.5":"pt-2",children:[e.jsxs("div",{className:`mb-1 flex items-center justify-between ${f?"px-2 pt-0.5":"px-3 pt-1"}`,children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:d}),e.jsx("span",{className:"text-xs text-muted-foreground",children:m})]}),t.length===0?e.jsx("div",{className:`${f?"px-2 pb-2 pt-1.5 text-xs":"px-3 pb-3 pt-2 text-xs"} text-muted-foreground`,children:i?p??`No matches for ${l}${r}`:u}):e.jsx("div",{className:`${y} ${c} overflow-y-auto`,children:t.map((x,_)=>e.jsxs("button",{type:"button",onMouseDown:h=>h.preventDefault(),onClick:()=>j(x),className:`w-full rounded-lg border text-left transition-colors ${_===s?"border-border bg-muted/50":"border-transparent hover:border-border hover:bg-accent"} ${N}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"font-mono text-[13px] text-foreground",children:x.command}),x.kind&&x.kind!=="builtin"?e.jsx("span",{className:"rounded-full border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-[0.12em] text-muted-foreground",children:x.scope?`${x.scope} ${x.kind}`:x.kind}):null]}),e.jsx("div",{className:`${f?"mt-0.5 text-xs":"mt-1 text-xs"} text-muted-foreground`,children:x.description})]},x.command))})]})}const X=12,Ne=8;function ls({open:t,anchorRef:s,commands:r,selectedIndex:i,query:d,hasCatalog:l,title:u,queryPrefix:p,emptyCatalogMessage:m,emptyQueryMessage:f,insertionHint:j,compact:y=!1,onSelect:N}){const c=a.useRef(null),[x,_]=a.useState(null);return a.useLayoutEffect(()=>{if(!t){_(null);return}const h=s.current;if(!h)return;let L=0;const R=()=>{const Z=s.current;if(!Z)return;const P=Z.getBoundingClientRect(),oe=window.innerWidth,O=window.innerHeight,G=y?260:320,U=y?oe-X*2:560,re=Math.min(Math.max(P.width,G),Math.max(G,U)),le=Math.min(Math.max(X,P.left),Math.max(X,oe-X-re)),H=O-P.bottom-Ne-X,J=P.top-Ne-X,q=c.current?.offsetHeight??(y?220:280),ae=y?240:320,K=H<180&&J>H,o=Math.max(120,Math.min(ae,K?J:H)),b=K?Math.max(X,P.top-Ne-Math.min(q,o)):Math.min(O-X-Math.min(q,o),P.bottom+Ne);_({top:b,left:le,width:re,maxHeight:o})},C=()=>{cancelAnimationFrame(L),L=requestAnimationFrame(R)};C();const D=new ResizeObserver(C);return D.observe(h),c.current&&D.observe(c.current),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0),window.visualViewport?.addEventListener("resize",C),window.visualViewport?.addEventListener("scroll",C),()=>{cancelAnimationFrame(L),D.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0),window.visualViewport?.removeEventListener("resize",C),window.visualViewport?.removeEventListener("scroll",C)}},[s,r.length,y,t,d,i]),!t||!x||typeof document>"u"?null:Mt.createPortal(e.jsx("div",{className:"pointer-events-none fixed inset-0 z-[120]",children:e.jsx("div",{ref:c,className:"pointer-events-auto fixed overflow-hidden rounded-xl border border-border bg-background shadow-popover ",style:{top:x.top,left:x.left,width:x.width,maxHeight:x.maxHeight},children:e.jsx(ds,{commands:r,selectedIndex:i,query:d,hasCatalog:l,title:u,queryPrefix:p,emptyCatalogMessage:m,emptyQueryMessage:f,insertionHint:j,compact:y,onSelect:N})})}),document.body)}function ms({agentType:t,workingDir:s}){return et({queryKey:T.system.slashCommandCatalog(t,s),queryFn:async()=>(await ge.get("/system/slash-command-catalog",{params:{agentType:String(t),...s?{workingDir:s}:{}}})).commands,enabled:!!t,staleTime:3e4})}function us(t,s){const r=new Set,i=[];for(const d of[...t,...s]){const l=d.command.trim().toLowerCase();!l||r.has(l)||(r.add(l),i.push(d.kind?d:{...d,kind:"builtin"}))}return i}function ke(t){return t.trim().toLowerCase().replace(/^[/$]/,"")}function ps(t){return ke(t.command)}function fs(t,s){if(!s)return 1e3;const r=ps(t),i=t.aliases?.map(ke)??[],d=[r,...i];let l=0;for(const p of d)p===s?l=Math.max(l,500):p.startsWith(s)?l=Math.max(l,400-(p.length-s.length)):p.includes(s)&&(l=Math.max(l,250-p.indexOf(s)));return l>0?l:`${r} ${i.join(" ")} ${t.description}`.toLowerCase().includes(s)?100:0}function Ys(t){const s=/(^|[\s])\$([^\s]*)$/.exec(t);if(!s||s.index===void 0)return null;const r=s.index+s[1].length;return{query:ke(s[2]),replaceStart:r}}function xs(t,s){const r=ke(s);return r?t.map((i,d)=>({command:i,index:d,score:fs(i,r)})).filter(i=>i.score>0).sort((i,d)=>d.score-i.score||i.index-d.index||i.command.command.localeCompare(d.command.command)).map(i=>i.command):t.slice()}const hs=[{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"}],gs=[{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"}],bs=[{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"}],vs=[{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"}],ys={[ye.CODEX]:hs,[ye.CLAUDE_CODE]:gs,[ye.GEMINI_CLI]:bs,[ye.CURSOR_AGENT]:vs};function st(t){return t.trim().toLowerCase().replace(/^\//,"")}function Ns(t){return t?(ys[t]??[]).map(s=>({...s,kind:s.kind??"builtin"})):[]}function ws(t){const s=t.match(/^\s*\/([^\s]*)$/);return s?st(s[1]):null}function js(t,s){return xs(t,st(s))}function Cs(t){const s=t.key==="Enter"&&!t.shiftKey&&!t.repeat&&!t.nativeEvent.isComposing&&t.nativeEvent.keyCode!==229,r=t.key==="Tab"&&!t.shiftKey;return s||r}function ks({agentType:t,workingDir:s,input:r,setInput:i,textareaRef:d,minHeight:l,maxHeight:u}){const[p,m]=a.useState(0),{data:f=[]}=ms({agentType:t,workingDir:s}),j=a.useMemo(()=>us(Ns(t),f),[t,f]),y=a.useMemo(()=>ws(r),[r]),N=a.useMemo(()=>y===null?[]:js(j,y),[j,y]),c=a.useCallback(()=>{const h=d.current;h&&(h.style.height="auto",h.style.height=`${Math.max(l,Math.min(h.scrollHeight,u))}px`)},[u,l,d]);a.useEffect(()=>{m(0)},[t,y]),a.useEffect(()=>{p<N.length||m(0)},[N.length,p]);const x=a.useCallback(h=>{const R=`${r.match(/^(\s*)\/[^\s]*$/)?.[1]??""}${h.command} `;i(R),requestAnimationFrame(()=>{const C=d.current;C&&(c(),C.focus(),C.setSelectionRange(R.length,R.length))})},[r,c,i,d]),_=a.useCallback(h=>y===null||N.length===0?!1:h.key==="ArrowDown"?(h.preventDefault(),m(L=>(L+1)%N.length),!0):h.key==="ArrowUp"?(h.preventDefault(),m(L=>(L-1+N.length)%N.length),!0):Cs(h)?(h.preventDefault(),x(N[p]??N[0]),!0):!1,[x,N,y,p]);return{allCommands:j,query:y,filteredCommands:N,selectedIndex:p,setSelectedIndex:m,applyCommand:x,handleKeyDown:_}}const Ss={idle:"","creating-task":"Creating Task...","creating-teamrun":"Creating TeamRun...","creating-workspace":"Creating Workspace...","creating-session":"Creating Session...","starting-session":"Starting Agent..."},Es={ASK:Vt,AUTO_SANDBOX:At,FULL_ACCESS:Qt};function Ms({mode:t}){const{t:s}=Ce(),r=Es[t],i=s("Required permission: {mode}",{mode:s(zt[t])});return e.jsx("span",{role:"img","aria-label":i,title:i,className:"ml-2 mt-0.5 inline-flex shrink-0 text-muted-foreground",children:e.jsx(r,{size:14,"aria-hidden":"true"})})}function Xs({variant:t="task",projects:s,providers:r,isProvidersLoading:i,onSubmit:d,defaultProjectId:l="",defaultProviderId:u="",onProjectChange:p,createStep:m,placeholder:f,submitLabel:j,pendingLabel:y,submitTitle:N}){const{t:c}=Ce(),[x,_]=a.useState(""),[h,L]=a.useState(l),[R,C]=a.useState(u),D=R||u,[Z,P]=a.useState("SOLO"),[oe,O]=a.useState(E.WORKTREE),[G,U]=a.useState(He.NORMAL),[re,le]=a.useState({}),[H,J]=a.useState("AUTO"),[q,ae]=a.useState(null),[K,me]=a.useState([]),[o,b]=a.useState(!1),[M,$]=a.useState(!1),[Q,B]=a.useState(!1),[ie,ee]=a.useState(!1),Se=a.useRef(null),Ee=a.useRef(null),Me=a.useRef(null),Ae=a.useRef(null),Le=a.useRef(null),Pe=a.useRef(null),{files:be,addFiles:ce,removeFile:Ie,buildMarkdownLinks:_e,getDoneAttachments:De,isUploading:ve}=bt(),ue=Lt(),v=t==="conversation",w=t==="task"||t==="conversation",nt=j??c(v?"开始":"创建");a.useEffect(()=>{L(l),p?.(l)},[l,p]),a.useEffect(()=>{if(!M)return;const n=k=>{Se.current&&!Se.current.contains(k.target)&&$(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[M]),a.useEffect(()=>{if(!Q)return;const n=k=>{Ee.current&&!Ee.current.contains(k.target)&&B(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[Q]),a.useEffect(()=>{if(!ie)return;const n=k=>{Me.current&&!Me.current.contains(k.target)&&ee(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[ie]);const z=a.useMemo(()=>s.find(n=>n.id===h),[s,h]),F=a.useMemo(()=>r.find(n=>n.id===D),[r,D]),Te=h?re[h]:void 0,ot=(Te?.isGitRepo??z?.isGitRepo)!==!1,rt=(Te?.worktreeReady??z?.worktreeReady)!==!1,A=!v&&!(ot&&rt),I=A?"SOLO":Z,V=A?E.MAIN_DIRECTORY:oe,at=V===E.MAIN_DIRECTORY?c("本地模式"):c("工作树模式"),ze=c("工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。"),it=c("本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。"),ct=Te?.reason??z?.reason,$e=c(ct==="NO_HEAD"?"已检测到 Git,但需要先提交一次才能使用工作树模式。":"初始化 Git 后可使用工作树模式。"),Ge=v||I==="SOLO"?F?.agentType:null,Y=ks({agentType:Ge,workingDir:v?void 0:z?.repoPath,input:x,setInput:_,textareaRef:Le,minHeight:76,maxHeight:220}),S=m!=="idle",qe=!!q||K.length>0,pe=!S&&!ve&&x.trim().length>0&&(v?F?.available===!0:!!h&&(I==="SOLO"?F?.available===!0:qe));a.useEffect(()=>{A&&(P("SOLO"),O(E.MAIN_DIRECTORY),b(!1),ee(!1))},[A]),a.useEffect(()=>{A||v||O(E.WORKTREE)},[v,A,z?.id]);const dt=a.useCallback(async()=>{if(!z||ue.isPending)return;const n=await ue.mutateAsync({id:z.id});le(k=>({...k,[z.id]:n})),n.worktreeReady&&(P("SOLO"),O(E.WORKTREE),ee(!1))},[ue,z]),Re=a.useCallback(async()=>{if(!pe)return;const n=w?_e():"",k=w?De().map(te=>te.id):[];try{const te=d({title:x.trim(),description:"",projectId:v?"":h,providerId:D,mode:v?"SOLO":I,workspaceMode:!v&&I==="SOLO"?V:E.WORKTREE,teamRunMode:v?"AUTO":H,teamTemplateId:v||A?null:q,memberPresetIds:v||A?[]:K,attachmentLinks:n,attachmentIds:k,priority:G}),fe=()=>{if(_(W=>W===x?"":W),U(W=>W===G?He.NORMAL:W),w)for(const W of be)Ie(W.tempId)};v&&fe(),await te,v||fe()}catch{}},[pe,w,_e,De,d,x,v,h,D,I,V,H,A,q,K,be,Ie,G]),lt=a.useCallback(n=>{Y.handleKeyDown(n)||n.key==="Enter"&&!n.shiftKey&&!n.nativeEvent.isComposing&&n.nativeEvent.keyCode!==229&&(n.preventDefault(),Re())},[Re,Y]),mt=a.useCallback(n=>{const k=n.target.files;k&&k.length>0&&ce(Array.from(k)),n.target.value=""},[ce]),ut=a.useCallback(n=>{L(n),p?.(n),$(!1)},[p]),pt=a.useCallback(n=>{if(!w)return;const k=n.clipboardData.items,te=[];for(const fe of k)if(fe.kind==="file"){const W=fe.getAsFile();W&&te.push(W)}te.length>0&&(n.preventDefault(),ce(te))},[ce,w]),[Ke,Oe]=a.useState(!1),ft=a.useCallback(n=>{w&&(n.preventDefault(),Oe(!0))},[w]),xt=a.useCallback(n=>{w&&(n.preventDefault(),Oe(!1))},[w]),ht=a.useCallback(n=>{if(!w)return;n.preventDefault(),Oe(!1);const k=n.dataTransfer.files;k.length>0&&ce(Array.from(k))},[ce,w]);return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{ref:Ae,className:g("relative bg-background rounded-xl border transition-colors duration-200","shadow-raised","hover:border-ring/40 focus-within:border-ring/60",Ke?"border-foreground/40 bg-foreground/[0.02]":"border-border",S&&"opacity-80"),onDragOver:w?ft:void 0,onDragLeave:w?xt:void 0,onDrop:w?ht:void 0,children:[w&&be.length>0&&e.jsx("div",{className:"px-4 pt-3",children:e.jsx(vt,{files:be,onRemove:Ie})}),e.jsx("textarea",{ref:Le,value:x,onChange:n=>_(n.target.value),onKeyDown:lt,onPaste:w?pt:void 0,placeholder:c(f||"Describe your task..."),disabled:S,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"}}),w&&Ke&&e.jsx("div",{className:"px-4 pb-2",children:e.jsx("div",{className:"flex items-center justify-center py-3 border border-dashed border-foreground/30 rounded-lg text-xs font-medium text-foreground/80",children:c("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:w?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>Pe.current?.click(),disabled:S||ve,className:"p-2 text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:c("Attach files"),children:e.jsx(Gt,{size:18})}),e.jsx("input",{ref:Pe,type:"file",multiple:!0,onChange:mt,className:"hidden"})]}):null}),e.jsxs("div",{className:"flex items-center gap-2",children:[w&&ve&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(we,{size:14,className:"animate-spin motion-reduce:[animation-duration:2.4s]"}),c("Uploading...")]}),S&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(we,{size:14,className:"animate-spin motion-reduce:[animation-duration:2.4s]"}),c(y??Ss[m])]}),!v&&!S&&!ve&&I==="TEAM"&&!qe&&x.trim().length>0&&e.jsx("span",{className:"text-xs text-warning-ink",children:c("请选择团队模板或追加成员")}),pe&&e.jsxs("span",{className:"hidden sm:inline-flex items-center gap-1 text-xs text-muted-foreground 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-[11px] font-medium text-muted-foreground leading-none",children:"⏎"}),nt]}),e.jsx("button",{type:"button",onClick:Re,disabled:!pe,className:g("flex items-center justify-center size-8 rounded-lg transition-all duration-200",pe?"bg-primary text-primary-foreground hover:bg-primary/90 shadow-raised":"bg-muted text-muted-foreground cursor-not-allowed"),title:c(N||"Create & Start"),children:e.jsx(It,{size:16,strokeWidth:2.5})})]})]})]}),e.jsx(ls,{open:!!Ge&&Y.query!==null,anchorRef:Ae,commands:Y.filteredCommands,selectedIndex:Y.selectedIndex,query:Y.query??"",hasCatalog:Y.allCommands.length>0,compact:!0,onSelect:Y.applyCommand}),e.jsxs("div",{className:"relative flex items-center flex-wrap gap-1.5 mt-2.5 px-0.5",children:[!v&&e.jsxs("div",{className:"relative",ref:Se,children:[e.jsxs("button",{type:"button",onClick:()=>{S||$(n=>!n)},disabled:S,className:g("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",z?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(qt,{size:14,className:"shrink-0",style:{color:z?.color??"var(--muted-foreground)"}}),e.jsx("span",{className:"max-w-[120px] truncate",children:z?.name??c("Project")}),e.jsx(xe,{size:12,className:g("text-muted-foreground transition-transform",M&&"rotate-180")})]}),M&&e.jsx("div",{className:"absolute top-full left-0 mt-1.5 w-56 bg-popover border border-border rounded-lg shadow-popover py-1 max-h-[240px] overflow-y-auto z-50",children:s.map(n=>e.jsxs("button",{type:"button",onClick:()=>ut(n.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:n.color??"var(--muted-foreground)"}}),e.jsx("span",{className:g("truncate flex-1",n.id===h?"text-foreground font-medium":"text-muted-foreground"),children:n.name}),e.jsx(se,{size:14,className:g("ml-2 shrink-0 text-foreground",n.id===h?"opacity-100":"opacity-0")})]},n.id))})]}),(v||I==="SOLO")&&e.jsxs("div",{className:"sm:relative",ref:Ee,children:[e.jsxs("button",{type:"button",onClick:()=>{S||B(n=>!n)},disabled:S,className:g("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",F?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(Qe,{agentType:F?.agentType,className:"size-3.5"}),e.jsx("span",{className:"max-w-[120px] truncate",children:F?.name??c(i?"Loading...":"Agent")}),e.jsx(xe,{size:12,className:g("text-muted-foreground transition-transform",Q&&"rotate-180")})]}),Q&&e.jsx("div",{className:"absolute top-full left-0 z-50 mt-1.5 max-h-[min(60vh,320px)] w-72 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-lg border border-border bg-popover py-1 shadow-popover sm:w-80",children:r.map(n=>e.jsx("div",{tabIndex:n.available?void 0:0,role:n.available?void 0:"group","aria-label":n.available?void 0:`${n.name}: ${c(n.reason||"Agent executable is unavailable.")}`,className:"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:e.jsxs("button",{type:"button",disabled:!n.available,onClick:()=>{C(n.id),B(!1)},className:g("flex w-full items-start px-3 py-2 text-left text-xs transition-colors hover:bg-accent",!n.available&&"cursor-not-allowed"),children:[e.jsx(se,{size:14,className:g("mr-2 mt-0.5 shrink-0 text-foreground",n.id===D?"opacity-100":"opacity-0")}),e.jsx(Qe,{agentType:n.agentType,className:"mr-2 mt-0.5 size-3.5 shrink-0"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:g("block break-words",n.id===D?"font-medium text-foreground":"text-muted-foreground"),children:[n.name,n.available?"":c(" (unavailable)")]}),n.reason?e.jsx("span",{className:"mt-0.5 block break-words text-xs leading-snug text-destructive-ink",children:c(n.reason)}):null]}),n.permissionMode?e.jsx(Ms,{mode:n.permissionMode}):null]})},n.id))})]}),!v&&I==="SOLO"&&e.jsxs("div",{className:"relative",ref:Me,children:[e.jsxs("button",{type:"button",onClick:()=>{S||ee(n=>!n)},disabled:S,className:g("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(Tt,{size:14,className:"text-muted-foreground"}),e.jsx("span",{className:"max-w-[96px] truncate",children:at}),e.jsx(xe,{size:12,className:g("text-muted-foreground transition-transform",ie&&"rotate-180")})]}),ie&&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-popover py-1 z-50",children:[A?e.jsx(Fe,{side:"bottom",className:"block w-full",content:$e,children:e.jsxs("div",{tabIndex:0,"aria-label":$e,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:c("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-xs leading-snug text-muted-foreground",children:ze})]})]}),e.jsx("button",{type:"button",onClick:dt,disabled:ue.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:ue.isPending?c("检测中..."):c("重新检测 Git 状态")})]})}):e.jsxs("button",{type:"button",onClick:()=>{O(E.WORKTREE),ee(!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:g("mr-2 mt-0.5 shrink-0 text-foreground",V===E.WORKTREE?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:g("block truncate",V===E.WORKTREE?"text-foreground font-medium":"text-muted-foreground"),children:c("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-xs leading-snug text-muted-foreground",children:ze})]})]}),e.jsxs("button",{type:"button",onClick:()=>{O(E.MAIN_DIRECTORY),ee(!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:g("mr-2 mt-0.5 shrink-0 text-foreground",V===E.MAIN_DIRECTORY?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:g("block truncate",V===E.MAIN_DIRECTORY?"text-foreground font-medium":"text-muted-foreground"),children:c("本地模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-xs leading-snug text-muted-foreground",children:it})]})]})]})]}),!v&&e.jsx(as,{value:G,compact:!0,disabled:S,onChange:U}),!v&&e.jsx(Fe,{side:"bottom",className:"ml-auto",content:A?c("Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun."):V===E.MAIN_DIRECTORY?c("TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。"):c("启用 TeamRun 后可选择团队模板或成员。"),children:e.jsxs("button",{type:"button",role:"switch","aria-checked":I==="TEAM",onClick:()=>{S||A||(Z==="TEAM"?(P("SOLO"),b(!1)):(P("TEAM"),ee(!1),O(E.WORKTREE),b(!0)))},disabled:S||A,className:g("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",I==="TEAM"?"text-foreground/80":"text-muted-foreground"),"aria-label":c("启用团队模式"),children:[e.jsx(Rt,{size:14,className:I==="TEAM"?"text-foreground/80":"text-muted-foreground"}),e.jsx("span",{children:c("团队模式")}),(A||V===E.MAIN_DIRECTORY)&&I!=="TEAM"?e.jsx(Ot,{size:12,className:"text-muted-foreground/70","aria-hidden":"true"}):null,e.jsx("span",{className:g("relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors",I==="TEAM"?"bg-primary":"bg-border"),children:e.jsx("span",{className:g("inline-block size-3 rounded-full bg-background shadow-raised transition-transform",I==="TEAM"?"translate-x-3.5":"translate-x-0.5")})})]})})]}),F&&!F.available?e.jsx("p",{role:"alert",className:"mt-2 break-words px-2 text-xs leading-snug text-destructive-ink",children:F.reason?c(F.reason):c("Agent executable is unavailable.")}):null,!v&&I==="TEAM"&&o&&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(cs,{mode:H,setMode:J,selectedTemplateId:q,setSelectedTemplateId:ae,selectedMemberPresetIds:K,setSelectedMemberPresetIds:me,disabled:S,compact:!0})})]})}export{Xs as C,ls as S,cs as T,ts as Z,ks as a,Bs as b,Hs as c,Qs as d,as as e,ss as f,Us as g,Vs as h,Xt as i,Ys as j,xs as k,Ws as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,
|
|
1
|
+
import{r as a,ac as j,ad as E,ae as T,j as s,n as M,u as P,v as I,B as O}from"./index-Cm6snkmR.js";function U(t){const{sessionId:c,onOutput:k,onExit:x,onError:v}=t,[p,g]=a.useState(()=>j.isConnected()),[r,d]=a.useState(!1),m=a.useRef({onOutput:k,onExit:x,onError:v});m.current={onOutput:k,onExit:x,onError:v},a.useEffect(()=>{const n=j.getSocket();g(n.connected);const u=()=>g(!0),b=()=>{g(!1),d(!1)},w=l=>{l.sessionId===c&&m.current.onOutput?.(l.data)},C=l=>{l.sessionId===c&&(d(!1),m.current.onExit?.(l.exitCode))},S=l=>{l.sessionId===c&&m.current.onError?.(l.message)};return n.on("connect",u),n.on("disconnect",b),n.on(E.SESSION_STDOUT,w),n.on(E.SESSION_EXIT,C),n.on(E.SESSION_ERROR,S),g(n.connected),()=>{n.off("connect",u),n.off("disconnect",b),n.off(E.SESSION_STDOUT,w),n.off(E.SESSION_EXIT,C),n.off(E.SESSION_ERROR,S),d(!1)}},[c]);const i=a.useCallback(()=>new Promise(n=>{if(!j.getSocket().connected){n(!1);return}d(!0),n(!0)}),[]),y=a.useCallback(()=>{d(!1)},[]),N=a.useCallback(n=>{j.getSocket().emit(T.INPUT,{sessionId:c,data:n})},[c]),h=a.useCallback((n,u)=>{j.getSocket().emit(T.RESIZE,{sessionId:c,cols:n,rows:u})},[c]);return{isConnected:p,isAttached:r,attach:i,detach:y,sendInput:N,resize:h}}function $({className:t,...c}){return s.jsx("div",{"data-slot":"card",className:M("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...c})}function B(){const{t}=P(),[c,k]=a.useState([]),[x,v]=a.useState(""),[p,g]=a.useState(""),[r,d]=a.useState(null),[m,i]=a.useState([]),[y,N]=a.useState(!1),[h,n]=a.useState(""),u=a.useRef(null),b=a.useCallback(e=>{i(o=>{const f=o[o.length-1];return f&&f.role==="agent"?[...o.slice(0,-1),{...f,content:f.content+e}]:[...o,{role:"agent",content:e,timestamp:new Date}]})},[]),w=a.useCallback(e=>{i(o=>[...o,{role:"agent",content:`
|
|
2
2
|
[${t("Process exited with code {code}",{code:e})}]`,timestamp:new Date}]),d(null)},[t]),C=a.useCallback(e=>{i(o=>[...o,{role:"agent",content:`
|
|
3
|
-
[${t("Error: {message}",{message:e})}]`,timestamp:new Date}])},[t]),{isConnected:S,isAttached:l,attach:D}=U({sessionId:r||"",onOutput:
|
|
4
|
-
[${t("会话已停止")}]`,timestamp:new Date}]),d(null)}catch(e){console.error("Stop failed:",e)}};return s.jsxs("div",{className:"flex flex-col h-full max-w-4xl mx-auto p-4 gap-4",children:[s.jsx("h1",{className:"text-2xl font-bold",children:t("Agent 交互演示")}),!r&&s.jsxs($,{className:"p-4",children:[s.jsx("h2",{className:"text-lg font-semibold mb-3",children:t("选择 Agent")}),s.jsx("div",{className:"flex gap-2 flex-wrap mb-4",children:c.map(e=>s.jsxs(O,{variant:x===e.type?"default":"outline",disabled:!e.available,onClick:()=>
|
|
3
|
+
[${t("Error: {message}",{message:e})}]`,timestamp:new Date}])},[t]),{isConnected:S,isAttached:l,attach:D}=U({sessionId:r||"",onOutput:b,onExit:w,onError:C});a.useEffect(()=>{I.get("/demo/agents").then(e=>{k(e.agents);const o=e.agents.find(f=>f.available);o&&v(o.type)})},[]),a.useEffect(()=>{u.current?.scrollIntoView({behavior:"smooth"})},[m]),a.useEffect(()=>{r&&S&&!l&&D()},[r,S,l,D]);const R=async()=>{if(!(!x||!p.trim())){N(!0),i([{role:"user",content:p,timestamp:new Date}]);try{const e=await I.post("/demo/start",{agentType:x,prompt:p.trim()});d(e.sessionId),g("")}catch(e){i(o=>[...o,{role:"agent",content:t("启动失败: {message}",{message:e instanceof Error?e.message:t("未知错误")}),timestamp:new Date}])}finally{N(!1)}}},A=async()=>{if(!r||!h.trim())return;const e=h.trim();i(o=>[...o,{role:"user",content:e,timestamp:new Date}]),n("");try{await I.post(`/demo/${r}/message`,{message:e})}catch(o){i(f=>[...f,{role:"agent",content:t("发送失败: {message}",{message:o instanceof Error?o.message:t("未知错误")}),timestamp:new Date}])}},_=async()=>{if(r)try{await I.post(`/demo/${r}/stop`),i(e=>[...e,{role:"agent",content:`
|
|
4
|
+
[${t("会话已停止")}]`,timestamp:new Date}]),d(null)}catch(e){console.error("Stop failed:",e)}};return s.jsxs("div",{className:"flex flex-col h-full max-w-4xl mx-auto p-4 gap-4",children:[s.jsx("h1",{className:"text-2xl font-bold",children:t("Agent 交互演示")}),!r&&s.jsxs($,{className:"p-4",children:[s.jsx("h2",{className:"text-lg font-semibold mb-3",children:t("选择 Agent")}),s.jsx("div",{className:"flex gap-2 flex-wrap mb-4",children:c.map(e=>s.jsxs(O,{variant:x===e.type?"default":"outline",disabled:!e.available,onClick:()=>v(e.type),children:[e.name,e.available&&e.version&&` (${e.version})`,!e.available&&t(" (不可用)")]},e.type))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:p,onChange:e=>g(e.target.value),onKeyDown:e=>e.key==="Enter"&&!e.nativeEvent.isComposing&&e.nativeEvent.keyCode!==229&&R(),placeholder:t("输入你的问题或任务..."),className:"flex-1 px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"}),s.jsx(O,{onClick:R,disabled:y||!x||!p.trim(),children:t(y?"启动中...":"开始")})]})]}),s.jsxs($,{className:"flex-1 p-4 overflow-hidden flex flex-col",children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h2",{className:"text-lg font-semibold",children:t("对话")}),r&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-gray-500",children:t(S?l?"已连接":"连接中...":"未连接")}),s.jsx(O,{variant:"outline",size:"sm",onClick:_,children:t("停止")})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto space-y-3",children:[m.length===0?s.jsx("div",{className:"text-gray-400 text-center py-8",children:t("选择 Agent 并输入问题开始对话")}):m.map((e,o)=>s.jsxs("div",{className:`p-3 rounded-lg ${e.role==="user"?"bg-blue-100 ml-8":"bg-gray-100 mr-8"}`,children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1",children:e.role==="user"?t("你"):"Agent"}),s.jsx("pre",{className:"whitespace-pre-wrap font-mono text-sm",children:e.content})]},o)),s.jsx("div",{ref:u})]}),r&&s.jsxs("div",{className:"flex gap-2 mt-3 pt-3 border-t",children:[s.jsx("input",{type:"text",value:h,onChange:e=>n(e.target.value),onKeyDown:e=>e.key==="Enter"&&!e.repeat&&!e.nativeEvent.isComposing&&e.nativeEvent.keyCode!==229&&A(),placeholder:t("发送后续消息..."),className:"flex-1 px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"}),s.jsx(O,{onClick:A,disabled:!h.trim(),children:t("发送")})]})]})]})}export{B as DemoPage};
|