forgebadger 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -23
- package/dist/commands/doctor.d.ts +2 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/start.d.ts +3 -2
- package/dist/commands/start.js +5 -4
- package/dist/commands/start.js.map +1 -1
- package/dist/gateway/src/config/env.d.ts +5 -0
- package/dist/gateway/src/config/env.js +6 -0
- package/dist/gateway/src/config/env.js.map +1 -1
- package/dist/gateway/src/routes/copilot.js +0 -6
- package/dist/gateway/src/routes/copilot.js.map +1 -1
- package/dist/gateway/src/routes/sessions.js +5 -2
- package/dist/gateway/src/routes/sessions.js.map +1 -1
- package/dist/gateway/src/runtime/start-gateway.js +4 -1
- package/dist/gateway/src/runtime/start-gateway.js.map +1 -1
- package/dist/gateway/src/server.d.ts +2 -0
- package/dist/gateway/src/server.js +8 -0
- package/dist/gateway/src/server.js.map +1 -1
- package/dist/gateway/src/services/adapter-autonomy.d.ts +5 -2
- package/dist/gateway/src/services/adapter-autonomy.js +19 -1
- package/dist/gateway/src/services/adapter-autonomy.js.map +1 -1
- package/dist/gateway/src/services/agent/dispatch-supervisor.d.ts +23 -0
- package/dist/gateway/src/services/agent/dispatch-supervisor.js +56 -0
- package/dist/gateway/src/services/agent/dispatch-supervisor.js.map +1 -0
- package/dist/gateway/src/services/agent/skills/copilot-skills.js +17 -16
- package/dist/gateway/src/services/agent/skills/copilot-skills.js.map +1 -1
- package/dist/gateway/src/services/agent/tool-availability.js +0 -2
- package/dist/gateway/src/services/agent/tool-availability.js.map +1 -1
- package/dist/gateway/src/services/agent/tools/platform-coverage.js +5 -2
- package/dist/gateway/src/services/agent/tools/platform-coverage.js.map +1 -1
- package/dist/gateway/src/services/agent/tools/platform-management.js +2 -1
- package/dist/gateway/src/services/agent/tools/platform-management.js.map +1 -1
- package/dist/gateway/src/services/agent/tools/project-manager.js +10 -0
- package/dist/gateway/src/services/agent/tools/project-manager.js.map +1 -1
- package/dist/gateway/src/services/mcp/mcp-server.js +5 -2
- package/dist/gateway/src/services/mcp/mcp-server.js.map +1 -1
- package/dist/gateway/src/services/platform-commands/catalog.d.ts +10 -0
- package/dist/gateway/src/services/platform-commands/catalog.js +82 -12
- package/dist/gateway/src/services/platform-commands/catalog.js.map +1 -1
- package/dist/gateway/src/services/platform-commands/session-commands.d.ts +18 -1
- package/dist/gateway/src/services/platform-commands/session-commands.js +4 -0
- package/dist/gateway/src/services/platform-commands/session-commands.js.map +1 -1
- package/dist/gateway/src/services/platform-commands/tool-commands.js +1 -1
- package/dist/gateway/src/services/platform-commands/tool-commands.js.map +1 -1
- package/dist/gateway/src/services/project-manager/management.d.ts +1 -1
- package/dist/gateway/src/services/project-manager/management.js +2 -1
- package/dist/gateway/src/services/project-manager/management.js.map +1 -1
- package/dist/gateway/src/services/project-manager/task-packets.d.ts +4 -0
- package/dist/gateway/src/services/project-manager/task-packets.js +14 -0
- package/dist/gateway/src/services/project-manager/task-packets.js.map +1 -1
- package/dist/runtime/dependency-check.d.ts +3 -1
- package/dist/runtime/dependency-check.js +31 -5
- package/dist/runtime/dependency-check.js.map +1 -1
- package/dist/web/standalone/packages/web/.next/BUILD_ID +1 -1
- package/dist/web/standalone/packages/web/.next/build-manifest.json +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/cli-config/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/cli-config/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/automations/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/automations/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/channels/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/channels/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/extensions/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/extensions/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/settings/access/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/settings/access/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/settings/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/settings/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/tasks/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/copilot/tasks/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/history/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/history/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/members/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/members/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/models/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/models/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/notifications/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/notifications/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/[id]/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/import/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/import/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/new/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/new/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/sessions/[id]/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/sessions/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/sessions/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/settings/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/skills/install/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/skills/install/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/skills/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/teams/[teamId]/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/teams/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/teams/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/templates/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/templates/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/usage/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/usage/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/workspaces/[projectId]/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/workspaces/[projectId]/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/workspaces/page/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/(dashboard)/workspaces/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.rsc +11 -11
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.segments/!KGRhc2hib2FyZCk/cli-config/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.segments/!KGRhc2hib2FyZCk/cli-config.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.segments/_full.segment.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/cli-config.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/!KGRhc2hib2FyZCk/copilot/automations/__PAGE__.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/!KGRhc2hib2FyZCk/copilot/automations.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/!KGRhc2hib2FyZCk/copilot.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/_full.segment.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/copilot/automations.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/!KGRhc2hib2FyZCk/copilot/channels/__PAGE__.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/!KGRhc2hib2FyZCk/copilot/channels.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/!KGRhc2hib2FyZCk/copilot.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/_full.segment.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/copilot/channels.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/!KGRhc2hib2FyZCk/copilot/extensions/__PAGE__.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/!KGRhc2hib2FyZCk/copilot/extensions.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/!KGRhc2hib2FyZCk/copilot.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/_full.segment.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/copilot/extensions.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/!KGRhc2hib2FyZCk/copilot/settings/access/__PAGE__.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/!KGRhc2hib2FyZCk/copilot/settings/access.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/!KGRhc2hib2FyZCk/copilot/settings.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/!KGRhc2hib2FyZCk/copilot.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings/access.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/!KGRhc2hib2FyZCk/copilot/settings/__PAGE__.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/!KGRhc2hib2FyZCk/copilot/settings.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/!KGRhc2hib2FyZCk/copilot.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/_full.segment.rsc +15 -15
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/copilot/settings.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/copilot.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/copilot.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/copilot.segments/!KGRhc2hib2FyZCk/copilot/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/copilot.segments/!KGRhc2hib2FyZCk/copilot.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/copilot.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/copilot.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/copilot.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/copilot.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/copilot.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.segments/_full.segment.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.segments/forgot-password/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/forgot-password.segments/forgot-password.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/history.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/history.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/history.segments/!KGRhc2hib2FyZCk/history/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/history.segments/!KGRhc2hib2FyZCk/history.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/history.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/history.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/history.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/history.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/history.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/index.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/index.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/index.segments/!KGRhc2hib2FyZCk/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/index.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/index.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/join/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/join.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/join.rsc +12 -12
- package/dist/web/standalone/packages/web/.next/server/app/join.segments/_full.segment.rsc +12 -12
- package/dist/web/standalone/packages/web/.next/server/app/join.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/join.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/join.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/join.segments/join/__PAGE__.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/join.segments/join.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/login.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/login.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/login.segments/_full.segment.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/login.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/members.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/members.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/members.segments/!KGRhc2hib2FyZCk/members/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/members.segments/!KGRhc2hib2FyZCk/members.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/members.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/members.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/members.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/members.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/members.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/models.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/models.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/models.segments/!KGRhc2hib2FyZCk/models/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/models.segments/!KGRhc2hib2FyZCk/models.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/models.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/models.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/models.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/models.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/models.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/notifications.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/notifications.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/notifications.segments/!KGRhc2hib2FyZCk/notifications/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/notifications.segments/!KGRhc2hib2FyZCk/notifications.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/notifications.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/notifications.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/notifications.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/notifications.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/notifications.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/!KGRhc2hib2FyZCk/projects/import/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/!KGRhc2hib2FyZCk/projects/import.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/!KGRhc2hib2FyZCk/projects.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/projects/import.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/!KGRhc2hib2FyZCk/projects/new/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/!KGRhc2hib2FyZCk/projects/new.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/!KGRhc2hib2FyZCk/projects.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/projects/new.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/projects.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/projects.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/projects.segments/!KGRhc2hib2FyZCk/projects/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/projects.segments/!KGRhc2hib2FyZCk/projects.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/projects.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/projects.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/projects.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/projects.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/register/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/register.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/register.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/register.segments/_full.segment.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/register.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/register.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/register.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/register.segments/register/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/register.segments/register.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/sessions.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/sessions.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/sessions.segments/!KGRhc2hib2FyZCk/sessions/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/sessions.segments/!KGRhc2hib2FyZCk/sessions.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/sessions.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/sessions.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/sessions.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/sessions.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/settings.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/settings.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/settings.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/settings.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/!KGRhc2hib2FyZCk/skills/install/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/!KGRhc2hib2FyZCk/skills/install.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/!KGRhc2hib2FyZCk/skills.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/skills/install.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/skills.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/skills.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/skills.segments/!KGRhc2hib2FyZCk/skills/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/skills.segments/!KGRhc2hib2FyZCk/skills.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/skills.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/skills.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/skills.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/teams.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/teams.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/teams.segments/!KGRhc2hib2FyZCk/teams/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/teams.segments/!KGRhc2hib2FyZCk/teams.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/teams.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/teams.segments/_full.segment.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/teams.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/teams.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/teams.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/templates.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/templates.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/templates.segments/!KGRhc2hib2FyZCk/templates/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/templates.segments/!KGRhc2hib2FyZCk/templates.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/templates.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/templates.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/templates.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/templates.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/templates.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/usage.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/usage.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/usage.segments/!KGRhc2hib2FyZCk/usage/__PAGE__.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/usage.segments/!KGRhc2hib2FyZCk/usage.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/usage.segments/_full.segment.rsc +16 -16
- package/dist/web/standalone/packages/web/.next/server/app/usage.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/usage.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/usage.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.segments/!KGRhc2hib2FyZCk/workspaces/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.segments/!KGRhc2hib2FyZCk/workspaces.segment.rsc +3 -3
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -5
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.segments/_full.segment.rsc +13 -13
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.segments/_head.segment.rsc +4 -4
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.segments/_index.segment.rsc +6 -6
- package/dist/web/standalone/packages/web/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/[root-of-the-server]__05uxdhs._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/[root-of-the-server]__0e0am7z._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/_0f6qxtj._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/_0h3beoe._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/_0x1-w0e._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/packages_web_src_0euki8~._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/packages_web_src_app_(dashboard)_page_tsx_04lc303._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/packages_web_src_components_copilot_0mvr-eu._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/chunks/ssr/packages_web_src_components_copilot_CopilotChannelsPage_tsx_10jdmdv._.js +1 -1
- package/dist/web/standalone/packages/web/.next/server/middleware-build-manifest.js +3 -3
- package/dist/web/standalone/packages/web/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/packages/web/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/01qswe5yw6zti.js +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/{0om1z.zeag-a7.js → 05mebsn5x~f7z.js} +1 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/05pjsamrc9hw8.css +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/08i6pyfaut9bg.js +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/0a812oghcxixr.js +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/{0c11igjuiagib.js → 0bihh5ze2~z1f.js} +1 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0cnz9fv.au4.r.js +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/0h73tv8xwqxqw.js +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/{17hy0ddp_si9n.js → 0mx93hpu5af8p.js} +1 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0vxu682behxa7.js +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/0wel25michro~.js +1 -0
- package/dist/web/standalone/packages/web/.next/static/chunks/13ehygx5durlz.js +1 -0
- package/docs/README.zh-CN.md +15 -15
- package/docs/README.zh-TW.md +15 -15
- package/package.json +2 -2
- package/dist/web/standalone/packages/web/.next/static/chunks/0-xefkkbz5sms.js +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0-~0vw7n16dl5.js +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0.dinxntqfai9.js +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/09wc9dfimci6a.js +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0d7lv09enxqxk.js +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0ek9hith8j-xs.js +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0g477-voyum5d.css +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0ub4kcycb_b...js +0 -1
- package/dist/web/standalone/packages/web/.next/static/chunks/0v8tskw4xza79.js +0 -1
- /package/dist/web/standalone/packages/web/.next/static/{UoUlLp6otXSsVrQmrFF4Z → lcO9z98BJ26kFzrqXH-ot}/_buildManifest.js +0 -0
- /package/dist/web/standalone/packages/web/.next/static/{UoUlLp6otXSsVrQmrFF4Z → lcO9z98BJ26kFzrqXH-ot}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/standalone/packages/web/.next/static/{UoUlLp6otXSsVrQmrFF4Z → lcO9z98BJ26kFzrqXH-ot}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38355,e=>{"use strict";var t=e.i(47721);e.s(["createGrant",0,function(e){return(0,t.fetchJson)("/api/v1/copilot/grants",{method:"POST",body:JSON.stringify(e)})},"deleteGrant",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/grants/${encodeURIComponent(e)}`,{method:"DELETE"})},"getPlatformAction",0,function(e){return(0,t.fetchJson)(`/api/v1/platform-actions/${encodeURIComponent(e)}`)},"getProjectOverview",0,function(e){return(0,t.fetchJson)(`/api/v1/project-manager/overview${e?`?grantId=${encodeURIComponent(e)}`:""}`)},"getSessionWriter",0,function(e){return(0,t.fetchJson)(`/api/v1/sessions/${encodeURIComponent(e)}/writer`)},"listGrants",0,function(){return(0,t.fetchJson)("/api/v1/copilot/grants")},"revokeGrant",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/grants/${encodeURIComponent(e)}/revoke`,{method:"POST"})},"takeoverSession",0,function(e){return(0,t.fetchJson)(`/api/v1/sessions/${encodeURIComponent(e)}/takeover`,{method:"POST",body:"{}"})},"updateProjectManagement",0,function(e,o){return(0,t.fetchJson)(`/api/v1/projects/${encodeURIComponent(e)}/project-manager/management`,{method:"PATCH",body:JSON.stringify(o)})}])},62918,e=>{"use strict";var t=e.i(66499),o=e.i(94237),i=e.i(82909),n=e.i(65458);let a=(0,o.cva)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:o="default",asChild:r=!1,...s}){let l=r?i.Slot.Root:"span";return(0,t.jsx)(l,{"data-slot":"badge","data-variant":o,className:(0,n.cn)(a({variant:o}),e),...s})}])},34487,e=>{"use strict";let t=(0,e.i(65174).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],34487)},26624,e=>{"use strict";var t=e.i(66499),o=e.i(79923),i=e.i(91967),n=e.i(67928),a=e.i(43250),r=e.i(17256),s=e.i(84017),l=e.i(61614),c=e.i(80939),d="Switch",[p,u]=(0,a.createContextScope)(d),[m,h]=p(d),g=o.forwardRef((e,a)=>{let{__scopeSwitch:s,name:l,checked:p,defaultChecked:u,required:h,disabled:g,value:v="on",onCheckedChange:f,form:b,...k}=e,[C,S]=o.useState(null),w=(0,n.useComposedRefs)(a,e=>S(e)),j=o.useRef(!1),N=!C||b||!!C.closest("form"),[T,P]=(0,r.useControllableState)({prop:p,defaultProp:u??!1,onChange:f,caller:d});return(0,t.jsxs)(m,{scope:s,checked:T,disabled:g,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":T,"aria-required":h,"data-state":x(T),"data-disabled":g?"":void 0,disabled:g,value:v,...k,ref:w,onClick:(0,i.composeEventHandlers)(e.onClick,e=>{P(e=>!e),N&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())})}),N&&(0,t.jsx)(y,{control:C,bubbles:!j.current,name:l,value:v,checked:T,required:h,disabled:g,form:b,style:{transform:"translateX(-100%)"}})]})});g.displayName=d;var v="SwitchThumb",f=o.forwardRef((e,o)=>{let{__scopeSwitch:i,...n}=e,a=h(v,i);return(0,t.jsx)(c.Primitive.span,{"data-state":x(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:o})});f.displayName=v;var y=o.forwardRef(({__scopeSwitch:e,control:i,checked:a,bubbles:r=!0,...c},d)=>{let p=o.useRef(null),u=(0,n.useComposedRefs)(p,d),m=(0,s.usePrevious)(a),h=(0,l.useSize)(i);return o.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(m!==a&&t){let o=new Event("click",{bubbles:r});t.call(e,a),e.dispatchEvent(o)}},[m,a,r]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...c,tabIndex:-1,ref:u,style:{...c.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function x(e){return e?"checked":"unchecked"}y.displayName="SwitchBubbleInput",e.s(["Root",0,g,"Switch",0,g,"SwitchThumb",0,f,"Thumb",0,f,"createSwitchScope",0,u],50512);var b=e.i(50512),b=b,k=e.i(65458);e.s(["Switch",0,function({className:e,size:o="default",...i}){return(0,t.jsx)(b.Root,{"data-slot":"switch","data-size":o,className:(0,k.cn)("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...i,children:(0,t.jsx)(b.Thumb,{"data-slot":"switch-thumb",className:(0,k.cn)("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}],26624)},84017,e=>{"use strict";var t=e.i(79923);e.s(["usePrevious",0,function(e){let o=t.useRef({value:e,previous:e});return t.useMemo(()=>(o.current.value!==e&&(o.current.previous=o.current.value,o.current.value=e),o.current.previous),[e])}])},51173,e=>{"use strict";let t=(0,e.i(65174).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},52860,e=>{"use strict";var t=e.i(51173);e.s(["ChevronRight",()=>t.default])},92608,e=>{"use strict";var t=e.i(47721);e.s(["acceptAutomationSuggestion",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/suggestions/${encodeURIComponent(e)}/accept`,{method:"POST"})},"cancelRun",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/runs/${encodeURIComponent(e)}/cancel`,{method:"POST"})},"createAutomation",0,function(e){return(0,t.fetchJson)("/api/v1/copilot/automations",{method:"POST",body:JSON.stringify(e)})},"createConversation",0,function(e,o){return(0,t.fetchJson)("/api/v1/copilot/conversations",{method:"POST",body:JSON.stringify({...e?{title:e}:{},...o?{grantId:o}:{}})})},"decidePendingAction",0,function(e,o,i){return(0,t.fetchJson)(`/api/v1/copilot/runs/${encodeURIComponent(e)}/pending-actions/${encodeURIComponent(o)}/decide`,{method:"POST",body:JSON.stringify({approved:i})})},"deleteAutomation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}`,{method:"DELETE"})},"deleteConversation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}`,{method:"DELETE"})},"deleteMemoryEntry",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/memory/entries/${encodeURIComponent(e)}`,{method:"DELETE"})},"dismissAutomationSuggestion",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/suggestions/${encodeURIComponent(e)}/dismiss`,{method:"POST"})},"editMessage",0,function(e,o,i){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/edit-message`,{method:"POST",body:JSON.stringify({messageId:o,content:i})})},"enableAutomation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}/enable`,{method:"POST"})},"getCopilotCapabilities",0,function(){return(0,t.fetchJson)("/api/v1/copilot/capabilities")},"getRun",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/runs/${encodeURIComponent(e)}`)},"listAutomationSuggestions",0,function(){return(0,t.fetchJson)("/api/v1/copilot/automations/suggestions")},"listAutomations",0,function(){return(0,t.fetchJson)("/api/v1/copilot/automations")},"listConversationRuns",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/runs`)},"listConversations",0,function(){return(0,t.fetchJson)("/api/v1/copilot/conversations")},"listMemoryEntries",0,function(e={}){let o=new URLSearchParams;return e.scope&&o.set("scope",e.scope),e.projectId&&o.set("projectId",e.projectId),e.limit&&o.set("limit",String(e.limit)),(0,t.fetchJson)(`/api/v1/copilot/memory/entries?${o.toString()}`)},"listMessages",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/messages`)},"pauseAutomation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}/pause`,{method:"POST"})},"renameConversation",0,function(e,o){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify({title:o})})},"runAutomationNow",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}/run`,{method:"POST"})},"sendMessage",0,function(e,o,i,n){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/messages`,{method:"POST",body:JSON.stringify({content:o,...i?{modelId:i}:{},...n})})},"setCopilotToolEnabled",0,function(e,o){return(0,t.fetchJson)(`/api/v1/copilot/capabilities/${encodeURIComponent(e)}/enabled`,{method:"PUT",body:JSON.stringify({enabled:o})})}])},34558,e=>{"use strict";let t=(0,e.i(65174).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],34558)},71326,e=>{"use strict";let t=(0,e.i(65174).default)("ShieldCheck",[["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 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,t],71326)},83540,96588,84959,4484,e=>{"use strict";var t=e.i(65174);let o=(0,t.default)("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["CalendarClock",0,o],83540);let i=(0,t.default)("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",0,i],96588);let n=(0,t.default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);e.s(["Radio",0,n],84959);let a=(0,t.default)("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);e.s(["SlidersHorizontal",0,a],4484)},42831,e=>{"use strict";var t=e.i(35887);let o={capabilities:{"project.create":"创建项目","project.metadata.update":"更新项目资料","pm.work_item.create":"创建工作项","pm.work_item.metadata":"更新工作项资料","pm.management.update":"更新负责人及下一步","pm.task.prepare":"准备任务","session.start":"启动会话","session.stop":"停止会话","memory.write":"写入记忆"},navAriaLabel:"Copilot 设置导航",navGeneral:"常规",navAccess:"授权",navExtensions:"扩展",navChannels:"远程渠道",navAutomations:"自动化",backToChat:"返回对话",accessCardTitle:"授权",accessCardDescription:"决定 Copilot 可以在哪些项目里执行哪些操作,以及次数与有效期。",channelsCardTitle:"远程渠道",channelsCardDescription:"配置飞书远程操作:应用接入、身份确认与授权绑定。",manageModels:"管理模型",accessTitle:"授权与项目权限",accessDescription:"授权决定 Copilot 可以在哪些项目内执行哪些操作。所有写操作都受授权约束,可随时撤销。",howTitle:"授权如何工作",howStep1:"选择项目与允许的操作",howStep2:"设置有效期、次数与并发上限",howStep3:"绑定到新会话,Copilot 在范围内工作",howNote:"撤销授权立即停止后续操作,已发生的操作保留记录。授权绑定会话后不可切换。",grantsTitle:"项目授权",grantsDescription:"每个授权限定一组项目和允许的操作,用于绑定新会话。",newGrant:"新建授权",loading:"正在加载授权…",loadError:"授权加载失败",retry:"重试",empty:"尚未创建授权。新建一个授权,让 Copilot 在指定项目内为你工作。",boundPrefix:"当前会话绑定:",statusActive:"有效",statusExpired:"已过期",statusRevoked:"已撤销",usageActions:"操作次数",concurrency:"最大并发",expiry:"到期",permanent:"长期有效,直至撤销",unlimited:"不限",startConversation:"以此授权新建会话",revoke:"撤销授权",deleteGrant:"删除授权",showRevoked:"查看已撤销授权",hideRevoked:"收起已撤销授权",revokedHelp:"删除后不再出现在列表中,历史会话和操作记录仍保留。",projectsEmpty:"无现有项目",createTitle:"新建授权",createDescription:"选择项目即可创建:默认允许所选项目的全部可授权操作,长期有效,直至撤销。",stepProjects:"项目范围",stepPermissions:"权限范围",stepLimits:"有效期与限额",nameLabel:"授权名称(可选)",namePlaceholder:"按所选项目自动命名",allOperations:"允许所有当前可授权操作",allOperationsHelp:"目录权限仅限所选项目目录内。未来新增操作和新建项目不会自动加入授权。",customOperationsHelp:"自定义模式按填写的根目录授权。未来新增操作和新建项目不会自动加入授权。",allowedRootsLabel:"允许创建项目的根目录(每行一个绝对路径)",permanentLabel:"长期有效,直到撤销",unlimitedLabel:"不限制累计操作次数",hoursLabel:"有效小时",limitLabel:"操作次数上限",concurrencyLabel:"最大并发",advanced:"高级设置(可选)",create:"创建授权",creating:"正在创建…",created:"授权已创建,可在授权列表中使用。",cancel:"取消",errorGeneric:"操作失败,请重试",errNoProject:"请至少选择一个项目。",errNoOperation:"请至少选择一项允许操作,或开启所有操作。",errNoRoots:"请填写允许创建项目的目录,或切换为默认的所有操作。",errConcurrency:"最大并发须为 1–20。",errHours:"有效小时须为 1–8760。",errLimit:"操作次数上限须为 1–10000。",errCreate:"创建失败,请重试。"},i={capabilities:{"project.create":"Create projects","project.metadata.update":"Update project metadata","pm.work_item.create":"Create work items","pm.work_item.metadata":"Update work item metadata","pm.management.update":"Update owner and next step","pm.task.prepare":"Prepare tasks","session.start":"Start sessions","session.stop":"Stop sessions","memory.write":"Write memory"},navAriaLabel:"Copilot settings navigation",navGeneral:"General",navAccess:"Access",navExtensions:"Extensions",navChannels:"Channels",navAutomations:"Automations",backToChat:"Back to chat",accessCardTitle:"Access",accessCardDescription:"Decide which projects Copilot may act on, which operations are allowed, and the usage limits.",channelsCardTitle:"Channels",channelsCardDescription:"Set up Feishu remote operation: app connection, identity confirmation, and grant binding.",manageModels:"Manage models",accessTitle:"Access and project permissions",accessDescription:"Grants decide which projects Copilot may act on and which operations are allowed. Every write operation is constrained by a grant and can be revoked at any time.",howTitle:"How grants work",howStep1:"Pick projects and allowed operations",howStep2:"Set expiry, action, and concurrency limits",howStep3:"Bind to a new conversation and let Copilot work in scope",howNote:"Revoking a grant stops further actions immediately; completed actions stay on record. A grant-bound conversation cannot switch grants.",grantsTitle:"Project grants",grantsDescription:"Each grant scopes a set of projects and allowed operations, and binds to a new conversation.",newGrant:"New grant",loading:"Loading grants…",loadError:"Failed to load grants",retry:"Retry",empty:"No grants yet. Create one to let Copilot work inside the projects you choose.",boundPrefix:"Current conversation bound to: ",statusActive:"Active",statusExpired:"Expired",statusRevoked:"Revoked",usageActions:"Actions",concurrency:"Max concurrency",expiry:"Expires",permanent:"Valid until revoked",unlimited:"Unlimited",startConversation:"Start a conversation with this grant",revoke:"Revoke grant",deleteGrant:"Delete grant",showRevoked:"Show revoked grants",hideRevoked:"Hide revoked grants",revokedHelp:"Deleted grants disappear from this list; historical conversations and action records are kept.",projectsEmpty:"No existing projects",createTitle:"New grant",createDescription:"Pick projects to create a grant: all currently grantable operations on the selected projects are allowed by default, valid until revoked.",stepProjects:"Project scope",stepPermissions:"Permissions",stepLimits:"Expiry and limits",nameLabel:"Grant name (optional)",namePlaceholder:"Named after the selected projects",allOperations:"Allow all currently grantable operations",allOperationsHelp:"Directory access stays within the selected projects. New operations and new projects are not added automatically.",customOperationsHelp:"Custom mode grants the root directories you enter. New operations and new projects are not added automatically.",allowedRootsLabel:"Root directories allowed for project creation (one absolute path per line)",permanentLabel:"Valid until revoked",unlimitedLabel:"Unlimited total actions",hoursLabel:"Valid hours",limitLabel:"Action limit",concurrencyLabel:"Max concurrency",advanced:"Advanced (optional)",create:"Create grant",creating:"Creating…",created:"Grant created. It is now available in the grant list.",cancel:"Cancel",errorGeneric:"Action failed. Please retry.",errNoProject:"Select at least one project.",errNoOperation:"Select at least one allowed operation, or enable all operations.",errNoRoots:"Enter the directories allowed for project creation, or switch back to all operations.",errConcurrency:"Max concurrency must be 1–20.",errHours:"Valid hours must be 1–8760.",errLimit:"Action limit must be 1–10000.",errCreate:"Creation failed. Please retry."},n={...o,capabilities:{"project.create":"建立專案","project.metadata.update":"更新專案資料","pm.work_item.create":"建立工作項目","pm.work_item.metadata":"更新工作項目資料","pm.management.update":"更新負責人及下一步","pm.task.prepare":"準備任務","session.start":"啟動工作階段","session.stop":"停止工作階段","memory.write":"寫入記憶"},navAriaLabel:"Copilot 設定導覽",navGeneral:"一般",navAccess:"授權",navExtensions:"擴充",navChannels:"遠端渠道",navAutomations:"自動化",backToChat:"返回對話",accessCardTitle:"授權",accessCardDescription:"決定 Copilot 可以在哪些專案裡執行哪些操作,以及次數與有效期。",channelsCardTitle:"遠端渠道",channelsCardDescription:"設定飛書遠端操作:應用接入、身份確認與授權綁定。",manageModels:"管理模型",accessTitle:"授權與專案權限",accessDescription:"授權決定 Copilot 可以在哪些專案內執行哪些操作。所有寫入操作都受授權約束,可隨時撤銷。",howTitle:"授權如何運作",howStep1:"選擇專案與允許的操作",howStep2:"設定有效期、次數與並發上限",howStep3:"綁定到新對話,Copilot 在範圍內工作",howNote:"撤銷授權立即停止後續操作,已發生的操作保留記錄。授權綁定對話後不可切換。",grantsTitle:"專案授權",grantsDescription:"每個授權限定一組專案和允許的操作,用於綁定新對話。",newGrant:"新增授權",loading:"正在載入授權…",loadError:"授權載入失敗",retry:"重試",empty:"尚未建立授權。新增一個授權,讓 Copilot 在指定專案內為你工作。",boundPrefix:"目前對話綁定:",statusActive:"有效",statusExpired:"已過期",statusRevoked:"已撤銷",usageActions:"操作次數",concurrency:"最大並發",expiry:"到期",permanent:"長期有效,直至撤銷",unlimited:"不限",startConversation:"以此授權新增對話",revoke:"撤銷授權",deleteGrant:"刪除授權",showRevoked:"查看已撤銷授權",hideRevoked:"收起已撤銷授權",revokedHelp:"刪除後不再出現在列表中,歷史對話和操作記錄仍保留。",projectsEmpty:"無現有專案",createTitle:"新增授權",createDescription:"選擇專案即可建立:預設允許所選專案的全部可授權操作,長期有效,直至撤銷。",stepProjects:"專案範圍",stepPermissions:"權限範圍",stepLimits:"有效期與限額",nameLabel:"授權名稱(可選)",namePlaceholder:"按所選專案自動命名",allOperations:"允許所有目前可授權操作",allOperationsHelp:"目錄權限僅限所選專案目錄內。未來新增操作和新建專案不會自動加入授權。",customOperationsHelp:"自訂模式按填寫的根目錄授權。未來新增操作和新建專案不會自動加入授權。",allowedRootsLabel:"允許建立專案的根目錄(每行一個絕對路徑)",permanentLabel:"長期有效,直到撤銷",unlimitedLabel:"不限制累計操作次數",hoursLabel:"有效小時",limitLabel:"操作次數上限",concurrencyLabel:"最大並發",advanced:"進階設定(可選)",create:"建立授權",creating:"正在建立…",created:"授權已建立,可在授權列表中使用。",cancel:"取消",errorGeneric:"操作失敗,請重試",errNoProject:"請至少選擇一個專案。",errNoOperation:"請至少選擇一項允許操作,或開啟所有操作。",errNoRoots:"請填寫允許建立專案的目錄,或切換為預設的所有操作。",errConcurrency:"最大並發須為 1–20。",errHours:"有效小時須為 1–8760。",errLimit:"操作次數上限須為 1–10000。",errCreate:"建立失敗,請重試。"};e.s(["useSettingsCopy",0,function(){let{language:e}=(0,t.useLanguage)();return"en"===e?i:"zh-TW"===e?n:o}])},63134,e=>{"use strict";var t=e.i(66499),o=e.i(41271),i=e.i(86059),n=e.i(34558),a=e.i(83540),r=e.i(96588),s=e.i(84959),l=e.i(71326),c=e.i(4484),d=e.i(60218),p=e.i(42831);e.s(["CopilotSettingsShell",0,function({active:e,title:u,description:m,children:h}){let g,v=(0,p.useSettingsCopy)(),f=(0,i.useRouter)(),y=(g=(0,p.useSettingsCopy)(),[{key:"general",href:"/copilot/settings",icon:c.SlidersHorizontal,label:g.navGeneral},{key:"access",href:"/copilot/settings/access",icon:l.ShieldCheck,label:g.navAccess},{key:"extensions",href:"/copilot/extensions",icon:r.Puzzle,label:g.navExtensions},{key:"channels",href:"/copilot/channels",icon:s.Radio,label:g.navChannels},{key:"automations",href:"/copilot/automations",icon:a.CalendarClock,label:g.navAutomations}]);return(0,t.jsxs)("div",{className:"mx-auto flex h-full w-full max-w-6xl flex-col gap-5 overflow-y-auto p-4 md:p-6",children:[(0,t.jsxs)("header",{className:"forgebadger-animate-in flex items-start gap-2 pl-12 md:pl-0",children:[(0,t.jsx)(d.Button,{variant:"ghost",size:"icon","aria-label":v.backToChat,title:v.backToChat,onClick:()=>f.push("/copilot"),children:(0,t.jsx)(n.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-lg font-semibold",children:u}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:m})]})]}),(0,t.jsxs)("div",{className:"flex min-h-0 flex-col gap-5 md:flex-row md:gap-8",children:[(0,t.jsx)("nav",{"aria-label":v.navAriaLabel,className:"forgebadger-animate-in flex shrink-0 gap-1 overflow-x-auto pb-1 md:w-44 md:flex-col md:overflow-visible md:pb-0",style:{animationDelay:"60ms"},children:y.map(i=>{let n=i.icon,a=i.key===e;return(0,t.jsxs)(o.default,{href:i.href,"aria-current":a?"page":void 0,className:`flex items-center gap-2 rounded-md px-3 py-2 text-sm whitespace-nowrap transition-colors ${a?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"}`,children:[(0,t.jsx)(n,{className:`size-4 shrink-0 ${a?"text-brand":""}`}),i.label]},i.key)})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:h})]})]})}])},58171,e=>{"use strict";let t=(0,e.i(65174).default)("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);e.s(["Cpu",0,t],58171)},41081,99831,e=>{"use strict";var t=e.i(66499),o=e.i(79923),i=e.i(85426),n=e.i(78717),a=e.i(6270),r=e.i(44269),s=e.i(9939),l=e.i(62918),c=e.i(81622),d=e.i(26624),p=e.i(35887),u=e.i(47721),m=e.i(92608);let h="/api/v1/copilot",g=e=>`${h}/skills/${encodeURIComponent(e)}`,v=e=>`${h}/connections/${encodeURIComponent(e)}`,f=["copilot","skills"];e.s(["copilotConnectionsKey",0,["copilot","connections"],"copilotSkillsKey",0,f,"createCopilotConnection",0,e=>(0,u.fetchJson)(`${h}/connections`,{method:"POST",body:JSON.stringify(e)}),"deleteCopilotConnection",0,(e,t)=>(0,u.fetchJson)(`${v(e)}?revision=${t}`,{method:"DELETE"}),"discoverCopilotConnection",0,(e,t)=>(0,u.fetchJson)(`${v(e)}/discover`,{method:"POST",body:JSON.stringify({revision:t})}),"getCopilotSkill",0,e=>(0,u.fetchJson)(g(e)),"getSkillRevision",0,(e,t)=>(0,u.fetchJson)(`${g(e)}/revisions/${encodeURIComponent(t)}`),"importCopilotSkill",0,e=>(0,u.fetchJson)(`${h}/skills/imports`,{method:"POST",body:JSON.stringify(e)}),"listCopilotConnections",0,()=>(0,u.fetchJson)(`${h}/connections`),"listCopilotSkills",0,()=>(0,u.fetchJson)(`${h}/skills`),"listSkillRevisions",0,e=>(0,u.fetchJson)(`${g(e)}/revisions`),"rollbackCopilotSkill",0,(e,t,o)=>(0,u.fetchJson)(`${g(e)}/rollback`,{method:"POST",body:JSON.stringify({revisionId:t,expectedRevisionId:o})}),"setCopilotSkillEnabled",0,(e,t,o)=>(0,u.fetchJson)(`${g(e)}/enabled`,{method:"PUT",body:JSON.stringify({enabled:t,expectedRevisionId:o})}),"updateCopilotConnection",0,(e,t)=>(0,u.fetchJson)(v(e),{method:"PUT",body:JSON.stringify(t)}),"updateCopilotSkill",0,(e,t)=>(0,u.fetchJson)(g(e),{method:"PUT",body:JSON.stringify(t)})],99831);let y=["model-providers"],x=["copilot","capabilities"];function b({title:e,tools:o,pending:i,onToggle:n}){return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold tracking-wide text-muted-foreground/70 uppercase",children:e}),o.map(e=>(0,t.jsx)(k,{tool:e,pending:i,onToggle:t=>n(e.name,t)},e.name))]})}function k({tool:e,pending:o,onToggle:i}){let{t:n}=(0,p.useLanguage)(),a=`copilot.toolDesc.${e.name}`,r=n(a),c=r===a?e.description:r;return(0,t.jsxs)("div",{className:`flex items-start justify-between gap-3 rounded-md border border-border/70 bg-card px-3 py-2 transition-opacity ${e.enabled&&e.available?"":"opacity-60"}`,"data-testid":`tool-row-${e.name}`,children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-1.5 text-xs font-medium",children:[(0,t.jsx)(s.Wrench,{className:"size-3 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,t.jsx)("span",{className:"font-mono",children:e.name}),"operate"===e.risk?(0,t.jsx)(l.Badge,{variant:"outline",className:"border-amber-500/50 px-1 py-0 text-[10px] text-amber-500",children:"operate"}):null,e.requiresApproval&&e.available?(0,t.jsx)(l.Badge,{variant:"outline",className:"px-1 py-0 text-[10px] text-muted-foreground",children:n("copilot.toolAuthorization")}):null]}),(0,t.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:c}),e.available?null:(0,t.jsxs)("p",{className:"text-xs text-amber-500",children:[n("copilot.toolUnavailable"),": ",e.unavailableReason??n("copilot.toolUnavailable")]})]}),(0,t.jsx)(d.Switch,{"aria-label":e.name,size:"sm",className:"mt-0.5 shrink-0",disabled:o||!e.available,checked:e.enabled,onCheckedChange:i})]})}e.s(["CapabilitiesSection",0,function({active:e}){let{t:s}=(0,p.useLanguage)(),l=(0,a.useQueryClient)(),[d,u]=(0,o.useState)(null),[h,g]=(0,o.useState)(""),v=(0,n.useQuery)({queryKey:x,queryFn:m.getCopilotCapabilities,enabled:e,retry:!1}),y=(0,i.useMutation)({mutationFn:({name:e,enabled:t})=>(0,m.setCopilotToolEnabled)(e,t),onSuccess:()=>{u(null),l.invalidateQueries({queryKey:x}),l.invalidateQueries({queryKey:f})},onError:()=>u(s("copilot.capabilitiesToggleError"))}),k=v.data?.tools??[],C=h.trim().toLowerCase(),S=C?k.filter(e=>`${e.name} ${e.description}`.toLowerCase().includes(C)):k,w=S.filter(e=>"operate"===e.risk),j=S.filter(e=>"operate"!==e.risk);return(0,t.jsxs)("section",{className:"space-y-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:s("copilot.capabilities")}),v.isPending||v.isError||!(k.length>0)?null:(0,t.jsxs)("div",{className:"relative w-48 max-w-full",children:[(0,t.jsx)(r.Search,{className:"absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),(0,t.jsx)(c.Input,{value:h,onChange:e=>g(e.target.value),placeholder:s("copilot.toolsSearch"),className:"h-8 pl-8 text-xs"})]})]}),v.isPending?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s("common.loading")}):v.isError?(0,t.jsx)("p",{className:"text-xs text-destructive",children:s("copilot.capabilitiesLoadError")}):0===k.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s("copilot.capabilitiesEmpty")}):0===S.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s("copilot.toolsSearchEmpty")}):(0,t.jsxs)("div",{className:"space-y-3",children:[w.length>0?(0,t.jsx)(b,{title:s("copilot.toolGroupOperate"),tools:w,pending:y.isPending,onToggle:(e,t)=>y.mutate({name:e,enabled:t})}):null,j.length>0?(0,t.jsx)(b,{title:s("copilot.toolGroupRead"),tools:j,pending:y.isPending,onToggle:(e,t)=>y.mutate({name:e,enabled:t})}):null]}),d&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:d})]})},"CopilotStatusBar",0,function(){let{t:e}=(0,p.useLanguage)(),o=(0,n.useQuery)({queryKey:y,queryFn:u.listModelProviders}),i=(o.data?.models??[]).filter(e=>"disabled"!==e.status),a=i.find(e=>e.isDefault)??i[0],r=a?`${a.providerName} / ${a.name}`:e("copilot.followSystemDefault");return(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b px-4 py-1.5 text-xs text-muted-foreground","data-testid":"copilot-status-bar",children:[(0,t.jsx)("span",{className:"shrink-0",children:e("copilot.currentModel")}),(0,t.jsx)("span",{className:"truncate",children:r}),(0,t.jsxs)(l.Badge,{variant:"secondary",className:"ml-auto gap-1.5 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500"}),e("copilot.nativeRuntime")]})]})},"modelProvidersQueryKey",0,y],41081)},15044,e=>{"use strict";var t=e.i(35887);let o={clearCredential:"移除已保存凭证",title:"Copilot 扩展",description:"安装 Skills,连接工具服务,扩展 Copilot 的工作能力。",back:"返回设置",skills:"Skills",connections:"Connections",loading:"加载中...",retry:"重试",cancel:"取消",save:"保存",close:"关闭",error:"操作失败。请重试;如配置或版本已变化,请刷新后重新核对。",loadError:"加载失败,请重试。",skillsHelp:"Skills 提供操作指引和参考文件。这里的启用状态独立于 CLI Skills。",emptySkills:"尚未安装 Skill。",importSkill:"导入 Skill",builtin:"内置",imported:"已导入",playbook:"内置 Playbook",enabled:"已启用",disabled:"已停用",unavailable:"当前不可用",incompatible:"不兼容",review:"需要核对版本",dependencies:"依赖工具",detail:"详情与版本",source:"来源",files:"文件",version:"版本",history:"版本记录",saveSkill:"保存完整文件包",rollback:"回滚到此版本",rollbackConfirm:"确认回滚",rollbackHelp:"回滚将创建新的完整文件包版本,并保留现有历史。",noHistory:"暂无版本记录。",builtinReview:"保存表示已核对当前内置版本。编辑后的内容仅用于所有者对话,项目授权对话继续使用可信内置内容。",paste:"粘贴 SKILL.md",upload:"选择文件包",url:"公开 raw URL",importMethod:"导入方式",chooseFiles:"选择文件",chooseFolder:"选择文件夹",importHelp:"文件包需包含根目录 SKILL.md。支持最多 65 个 UTF-8 文本文件、每文件 128 KiB、总计 1 MiB。脚本及执行型扩展会标为不兼容。",fileError:"文件包无效:请检查根目录 SKILL.md、UTF-8 编码、路径及大小限制。",urlHelp:"公开 HTTPS raw URL 导入单个 SKILL.md;配套文件请通过文件包一并导入。",install:"导入并保留为停用",edit:"编辑",importContent:"SKILL.md 正文",selectedFiles:"已选择文件",connectionsHelp:"Connection 提供 Copilot 可调用的工具。工具启用状态在各 Connection 中管理。",builtinHelp:"ForgeBadger 平台内置工具,沿用现有项目授权和逐项审批。",manageTools:"管理工具",addConnection:"添加 MCP Connection",emptyConnections:"尚未添加外部 Connection。",name:"名称",endpoint:"HTTPS 端点",bearer:"Bearer Token(可选,仅写入)",credentialSet:"凭证已配置",credentialKeep:"留空保留已有凭证",connectHelp:"支持公开 HTTPS 的 MCP Streamable HTTP 服务。创建后先发现工具,再明确选择允许 Copilot 使用的工具。",remoteApproval:"外部工具调用需逐项审批;项目授权和定时任务不会自动获得调用权限。",discover:"发现工具",notDiscovered:"尚未发现工具",noTools:"服务未返回工具。",selectTools:"选择工具",saveTools:"保存工具选择",delete:"删除",deleteConfirm:"确认删除此 Connection?",editConnection:"编辑连接",create:"创建连接",tools:"工具",configurationHelp:"更换端点或凭证会清空已发现工具,需要重新发现并选择。",schema:"输入参数",revision:"修订",refreshing:"处理中..."},i={clearCredential:"Remove saved credential",title:"Copilot extensions",description:"Install Skills and connect tool services to extend Copilot.",back:"Back to settings",skills:"Skills",connections:"Connections",loading:"Loading...",retry:"Retry",cancel:"Cancel",save:"Save",close:"Close",error:"Action failed. Retry, or refresh and review if the configuration or revision changed.",loadError:"Failed to load. Please retry.",skillsHelp:"Skills provide instructions and reference files. Their switches are independent from CLI Skills.",emptySkills:"No Skills installed.",importSkill:"Import Skill",builtin:"Built-in",imported:"Imported",playbook:"Built-in Playbook",enabled:"Enabled",disabled:"Disabled",unavailable:"Unavailable",incompatible:"Incompatible",review:"Version review required",dependencies:"Required tools",detail:"Details and versions",source:"Source",files:"Files",version:"Version",history:"Version history",saveSkill:"Save complete package",rollback:"Roll back to this version",rollbackConfirm:"Confirm rollback",rollbackHelp:"Rollback creates a new complete package revision and preserves existing history.",noHistory:"No revisions yet.",builtinReview:"Saving confirms review against the current bundled version. Edited content is for owner conversations; grant-bound conversations use trusted bundled content.",paste:"Paste SKILL.md",upload:"Select file bundle",url:"Public raw URL",importMethod:"Import method",chooseFiles:"Choose files",chooseFolder:"Choose folder",importHelp:"Include SKILL.md at the package root. Up to 65 UTF-8 text files, 128 KiB per file, 1 MiB total. Scripts and executable extensions are marked incompatible.",fileError:"Invalid package: check root SKILL.md, UTF-8 encoding, paths, and size limits.",urlHelp:"A public HTTPS raw URL imports one SKILL.md. Include supporting files through a file bundle.",install:"Import as disabled",edit:"Edit",importContent:"SKILL.md content",selectedFiles:"Selected files",connectionsHelp:"Connections provide callable tools. Manage tool switches within each Connection.",builtinHelp:"Built-in ForgeBadger platform tools retain project grants and exact approvals.",manageTools:"Manage tools",addConnection:"Add MCP Connection",emptyConnections:"No external Connections added.",name:"Name",endpoint:"HTTPS endpoint",bearer:"Bearer Token (optional, write-only)",credentialSet:"Credential configured",credentialKeep:"Leave blank to keep the saved credential",connectHelp:"Supports public HTTPS MCP Streamable HTTP services. Discover tools after creation, then explicitly select tools for Copilot.",remoteApproval:"External tool calls require exact approval. Project grants and scheduled tasks do not grant access.",discover:"Discover tools",notDiscovered:"Tools not discovered",noTools:"The service returned no tools.",selectTools:"Select tools",saveTools:"Save tool selection",delete:"Delete",deleteConfirm:"Delete this Connection?",editConnection:"Edit connection",create:"Create connection",tools:"Tools",configurationHelp:"Changing the endpoint or credential clears discovered tools. Discover and select them again.",schema:"Input schema",revision:"Revision",refreshing:"Working..."},n={...o,clearCredential:"移除已儲存憑證",title:"Copilot 擴充",description:"安裝 Skills,連接工具服務,擴充 Copilot 的工作能力。",back:"返回設定",loading:"載入中...",retry:"重試",save:"儲存",close:"關閉",error:"操作失敗。請重試;如設定或版本已變更,請重新整理後核對。",loadError:"載入失敗,請重試。",skillsHelp:"Skills 提供操作指引和參考檔案。這裡的啟用狀態獨立於 CLI Skills。",emptySkills:"尚未安裝 Skill。",importSkill:"匯入 Skill",builtin:"內建",imported:"已匯入",playbook:"內建 Playbook",enabled:"已啟用",review:"需要核對版本",dependencies:"依賴工具",detail:"詳情與版本",files:"檔案",history:"版本紀錄",saveSkill:"儲存完整檔案包",rollback:"還原到此版本",rollbackConfirm:"確認還原",rollbackHelp:"還原將建立新的完整檔案包版本,並保留現有歷史。",noHistory:"暫無版本紀錄。",builtinReview:"儲存表示已核對目前內建版本。編輯後的內容僅用於擁有者對話,專案授權對話繼續使用可信內建內容。",paste:"貼上 SKILL.md",upload:"選擇檔案包",importMethod:"匯入方式",chooseFiles:"選擇檔案",chooseFolder:"選擇資料夾",importHelp:"檔案包需包含根目錄 SKILL.md。支援最多 65 個 UTF-8 文字檔案、每檔案 128 KiB、總計 1 MiB。指令碼及執行型擴充會標為不相容。",fileError:"檔案包無效:請檢查根目錄 SKILL.md、UTF-8 編碼、路徑及大小限制。",urlHelp:"公開 HTTPS raw URL 匯入單個 SKILL.md;配套檔案請透過檔案包一併匯入。",install:"匯入並保留為停用",edit:"編輯",selectedFiles:"已選擇檔案",incompatible:"不相容",connectionsHelp:"Connection 提供 Copilot 可呼叫的工具。工具啟用狀態在各 Connection 中管理。",builtinHelp:"ForgeBadger 平台內建工具,沿用現有專案授權和逐項審核。",addConnection:"新增 MCP Connection",emptyConnections:"尚未新增外部 Connection。",name:"名稱",endpoint:"HTTPS 端點",bearer:"Bearer Token(可選,僅寫入)",credentialSet:"憑證已設定",credentialKeep:"留空保留已有憑證",connectHelp:"支援公開 HTTPS 的 MCP Streamable HTTP 服務。建立後先探索工具,再明確選擇允許 Copilot 使用的工具。",remoteApproval:"外部工具呼叫需逐項審核;專案授權和排程任務不會自動獲得呼叫權限。",discover:"探索工具",notDiscovered:"尚未探索工具",noTools:"服務未傳回工具。",selectTools:"選擇工具",saveTools:"儲存工具選擇",delete:"刪除",deleteConfirm:"確認刪除此 Connection?",editConnection:"編輯連線",create:"建立連線",configurationHelp:"更換端點或憑證會清空已探索工具,需要重新探索並選擇。",schema:"輸入參數",revision:"修訂",refreshing:"處理中..."};e.s(["useExtensionsCopy",0,function(){let{language:e}=(0,t.useLanguage)();return"en"===e?i:"zh-TW"===e?n:o}])},19821,e=>{"use strict";var t=e.i(66499),o=e.i(41271),i=e.i(78717),n=e.i(83540),a=e.i(52860),r=e.i(58171),s=e.i(96588),l=e.i(84959),c=e.i(71326),d=e.i(62918),p=e.i(60218),u=e.i(85426),m=e.i(6270),h=e.i(34487),g=e.i(35887),v=e.i(92608);let f=["copilot","memory"],y={global:"global",project:"project",session:"session"},x={fact:"fact",preference:"preference",decision:"decision",project_note:"project_note"};function b(){let{t:e}=(0,g.useLanguage)(),o=(0,m.useQueryClient)(),n=(0,i.useQuery)({queryKey:f,queryFn:()=>(0,v.listMemoryEntries)({scope:"global"})}),a=(0,u.useMutation)({mutationFn:e=>(0,v.deleteMemoryEntry)(e),onSuccess:()=>{o.invalidateQueries({queryKey:f})}}),r=n.data?.entries??[];return(0,t.jsxs)("section",{className:"space-y-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("copilot.memoryTitle")}),(0,t.jsx)(d.Badge,{variant:"secondary",className:"shrink-0",children:String(r.length)})]}),(0,t.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:e("copilot.memoryDescription")}),n.isPending?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("common.loading")}):0===r.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("copilot.memoryEmpty")}):(0,t.jsx)("div",{className:"max-h-64 space-y-1.5 overflow-y-auto pr-1",children:r.map(o=>(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 rounded-md border border-border/70 bg-card px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[(0,t.jsx)(d.Badge,{variant:"outline",className:"px-1 py-0 text-[10px] text-muted-foreground",children:y[o.scope]??o.scope}),(0,t.jsx)(d.Badge,{variant:"outline",className:"px-1 py-0 text-[10px] text-muted-foreground",children:x[o.kind]??o.kind})]}),(0,t.jsx)("p",{className:"break-words text-xs leading-relaxed text-muted-foreground",children:o.text})]}),(0,t.jsx)(p.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0 text-destructive","aria-label":e("common.delete"),title:e("common.delete"),disabled:a.isPending,onClick:()=>a.mutate(o.id),children:(0,t.jsx)(h.Trash2,{className:"size-3.5"})})]},o.id))})]})}var k=e.i(41081),C=e.i(63134),S=e.i(15044),w=e.i(42831),j=e.i(47721),N=e.i(99831),T=e.i(38355);e.s(["CopilotSettingsPage",0,function(){let{t:e}=(0,g.useLanguage)(),u=(0,w.useSettingsCopy)(),m=(0,S.useExtensionsCopy)(),h=(0,i.useQuery)({queryKey:k.modelProvidersQueryKey,queryFn:j.listModelProviders,retry:!1}),v=(0,i.useQuery)({queryKey:["copilot-grants"],queryFn:T.listGrants,retry:!1}),f=(0,i.useQuery)({queryKey:N.copilotSkillsKey,queryFn:N.listCopilotSkills,retry:!1}),y=(0,i.useQuery)({queryKey:N.copilotConnectionsKey,queryFn:N.listCopilotConnections,retry:!1}),x=(h.data?.models??[]).filter(e=>"disabled"!==e.status),P=x.find(e=>e.isDefault)??x[0],R=h.isPending?m.loading:h.isError?m.loadError:P?`${P.providerName} / ${P.name}`:e("copilot.followSystemDefault"),L=v.data?.grants.filter(e=>"active"===e.status).length,E=f.data?.skills.length,I=y.data?.connections.filter(e=>"mcp"===e.kind).length,H=[{href:"/copilot/settings/access",icon:c.ShieldCheck,title:u.accessCardTitle,description:u.accessCardDescription,summary:void 0!==L?`${L} \xb7 ${u.statusActive}`:void 0,delay:180},{href:"/copilot/extensions",icon:s.Puzzle,title:m.title,description:m.description,summary:void 0!==E&&void 0!==I?`${E} ${m.skills} \xb7 ${I} ${m.connections}`:void 0,delay:240},{href:"/copilot/channels",icon:l.Radio,title:u.channelsCardTitle,description:u.channelsCardDescription,delay:300},{href:"/copilot/automations",icon:n.CalendarClock,title:e("copilot.automationsTitle"),description:e("copilot.automationsDescription"),delay:360}];return(0,t.jsx)(C.CopilotSettingsShell,{active:"general",title:e("copilot.settings"),description:e("copilot.settingsDescription"),children:(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("section",{className:"forgebadger-animate-in space-y-3 rounded-lg border border-border bg-card p-4",style:{animationDelay:"120ms"},children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(r.Cpu,{className:"size-4 text-brand"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:e("copilot.runtimeTitle")}),(0,t.jsxs)(d.Badge,{variant:"secondary",className:"ml-auto gap-1.5",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500"}),e("copilot.nativeRuntime")]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("copilot.runtimeDescription")}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2.5",children:[(0,t.jsxs)("p",{className:"min-w-0 truncate text-xs",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e("copilot.currentModel"),": "]}),R]}),(0,t.jsx)(p.Button,{asChild:!0,variant:"outline",size:"sm",className:"shrink-0",children:(0,t.jsx)(o.default,{href:"/models",children:u.manageModels})})]})]}),(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:H.map(e=>{let i=e.icon;return(0,t.jsxs)(o.default,{href:e.href,className:"forgebadger-animate-in group flex items-start gap-3 rounded-lg border border-border bg-card p-4 transition-colors hover:border-brand/40 hover:bg-muted/40",style:{animationDelay:`${e.delay}ms`},children:[(0,t.jsx)(i,{className:"mt-0.5 size-5 shrink-0 text-brand"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[e.title,e.summary&&(0,t.jsx)(d.Badge,{variant:"secondary",className:"font-normal",children:e.summary})]}),(0,t.jsx)("span",{className:"block text-xs leading-relaxed text-muted-foreground",children:e.description})]}),(0,t.jsx)(a.ChevronRight,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-foreground"})]},e.href)})}),(0,t.jsx)("div",{className:"forgebadger-animate-in",style:{animationDelay:"420ms"},children:(0,t.jsx)(b,{})})]})})}],19821)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12603,e=>{"use strict";var a=e.i(66499),s=e.i(65458);e.s(["Card",0,function({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card",className:(0,s.cn)("flex flex-col gap-6 rounded-lg border bg-card py-6 text-card-foreground shadow-sm",e),...t})},"CardContent",0,function({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("px-6",e),...t})},"CardDescription",0,function({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...t})},"CardHeader",0,function({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})},"CardTitle",0,function({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("leading-none font-semibold",e),...t})}])},7329,e=>{"use strict";let a=(0,e.i(65174).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,a],7329)},51173,e=>{"use strict";let a=(0,e.i(65174).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,a])},52860,e=>{"use strict";var a=e.i(51173);e.s(["ChevronRight",()=>a.default])},39840,e=>{"use strict";var a=e.i(29256);e.s(["CheckCircle2",()=>a.default])},51671,e=>{"use strict";let a=(0,e.i(65174).default)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["default",0,a])},87307,2527,e=>{"use strict";var a=e.i(66499);let s={claude:{id:"claude",label:"Claude Code",shortLabel:"Claude",color:"#d97757"},codex:{id:"codex",label:"Codex",shortLabel:"Codex",color:"#e4e4e7"},kimi:{id:"kimi",label:"Kimi Code",shortLabel:"Kimi",color:"#1783ff"},opencode:{id:"opencode",label:"OpenCode",shortLabel:"OpenCode",color:"#b7b1b1"},pi:{id:"pi",label:"PI",shortLabel:"PI",color:"#4d9abf"}},t={id:"unknown",label:"CLI",shortLabel:"CLI",color:"#71717a"};function r(e){return e?s[e.trim().toLowerCase()]??t:t}e.s(["getCliBrand",0,r,"runtimeAdapterLabel",0,function(e,a){return e.available?e.launchEnabled?e.label:`${e.label} (${a("projects.runtimeLaunchDisabled")})`:`${e.label} (${a("projects.runtimeUnavailable")})`}],2527);var i=e.i(65458);let d={claude:(0,a.jsx)("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z",fill:"#D97757",fillRule:"nonzero"}),codex:(0,a.jsx)("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z",fillRule:"evenodd"}),kimi:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z",fill:"#1783FF"}),(0,a.jsx)("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z",fill:"#FFFFFF"})]}),opencode:(0,a.jsx)("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z",fillRule:"evenodd"}),pi:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M4.959 4.959H15.521V12H12V8.48H4.959z",fill:"#F09082"}),(0,a.jsx)("path",{d:"M4.959 8.48H8.48V12H12V15.521H8.48V19.042H4.959z",fill:"#4D9ABF"}),(0,a.jsx)("path",{d:"M15.521 12H19.042V19.042H15.521z",fill:"#F1BE58"})]})},l=new Set(["codex","opencode"]);e.s(["CliBrandIcon",0,function({aiTool:e,className:s}){let t=r(e),n="unknown"===t.id?null:d[t.id];return n?(0,a.jsx)("svg",{"aria-hidden":"true",className:(0,i.cn)("size-3.5 shrink-0",l.has(t.id)?"text-current":void 0,s),fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n}):null}],87307)},93657,e=>{"use strict";var a=e.i(66499),s=e.i(87307),t=e.i(2527),r=e.i(65458);e.s(["CliBrandChip",0,function({aiTool:e,className:i}){let d=(0,t.getCliBrand)(e);return(0,a.jsxs)("span",{className:(0,r.cn)("inline-flex shrink-0 items-center gap-1.5 rounded-full border border-border/60 bg-muted/30 px-2 py-0.5 text-[11px] font-medium text-muted-foreground",i),title:d.label,children:["unknown"===d.id?(0,a.jsx)("span",{className:"size-1.5 rounded-full",style:{backgroundColor:d.color}}):(0,a.jsx)(s.CliBrandIcon,{aiTool:e,className:"size-3"}),d.label]})}])},63641,e=>{"use strict";var a=e.i(66499),s=e.i(78717),t=e.i(87307),r=e.i(46131),i=e.i(35887),d=e.i(47721);let l=["adapter-discovery"];function n(e,a){return(0,d.isAdapterLaunchable)(e)&&(!a||a.includes(e.id))}e.s(["ADAPTER_DISCOVERY_QUERY_KEY",0,l,"AdapterSelect",0,function({value:e,onValueChange:o,supported:c,showMissing:u=!0,disabled:h=!1,size:m="default",id:p,ariaLabel:x,className:b,placeholder:g}){let{t:f}=(0,i.useLanguage)(),{data:j,isLoading:v}=(0,s.useQuery)({queryKey:l,queryFn:d.discoverAdapters,staleTime:3e4}),y=(j?.adapters??[]).filter(e=>u||e.available);return(0,a.jsxs)(r.Select,{value:e||void 0,onValueChange:e=>o(e),disabled:h||v,children:[(0,a.jsx)(r.SelectTrigger,{id:p,"aria-label":x,size:m,className:b,children:(0,a.jsx)(r.SelectValue,{placeholder:v?f("common.loading"):g})}),(0,a.jsx)(r.SelectContent,{children:y.map(e=>{let s=e.available?c&&!c.includes(e.id)?f("models.adapterNotSupported"):e.launchEnabled?null:f("projects.runtimeLaunchDisabled"):f("check_failed"===e.status?"projects.runtimeCheckFailed":"projects.runtimeUnavailable");return(0,a.jsxs)(r.SelectItem,{value:e.id,disabled:!n(e,c),children:[(0,a.jsx)(t.CliBrandIcon,{aiTool:e.id}),(0,a.jsxs)("span",{className:"min-w-0 flex-1 truncate",children:[e.label,s?` (${s})`:""]})]},e.id)})})]})},"chooseDefaultAdapter",0,function(e,a,s){let t=e.find(e=>e.id===s);return t&&n(t,a)?t.id:e.find(e=>n(e,a))?.id},"isAdapterSelectable",0,n])},48111,e=>{"use strict";e.s(["normalizeSessionStatus",0,function(e){return"running"===e?"running":"error"===e?"error":"stopped"}])},58394,e=>{"use strict";let a=(0,e.i(65174).default)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,a],58394)},26201,e=>{"use strict";let a=(0,e.i(65174).default)("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,a],26201)},8795,23254,e=>{"use strict";var a=e.i(66499),s=e.i(35887);e.s(["RuntimeSetupCommands",0,function({guidance:e}){let{t}=(0,s.useLanguage)(),r=e.links??[];return 0===e.commands.length&&0===r.length?null:(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:[e.commands.map(e=>(0,a.jsxs)("div",{className:"min-w-0 rounded-md border border-border bg-background/70 p-2",children:[(0,a.jsx)("div",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:t(e.labelKey)}),(0,a.jsx)("code",{className:"mt-1 block overflow-x-auto whitespace-nowrap font-mono text-xs text-foreground",children:e.command})]},`${e.labelKey}:${e.command}`)),r.map(e=>(0,a.jsx)("a",{className:"min-w-0 rounded-md border border-border bg-background/70 p-2 text-xs font-medium text-foreground underline-offset-4 hover:underline",href:e.href,target:"_blank",rel:"noreferrer noopener",children:t(e.labelKey)},`${e.labelKey}:${e.href}`))]})}],8795),e.s(["getTerminalRuntimeRemediation",0,function(e){return{detailKey:"ready"===e?"dashboard.terminalRuntime.ready":"dashboard.terminalRuntime.unavailable",actionKey:"dashboard.runtimeRemediation.openSettings",href:"/settings",severity:"ready"===e?"healthy":"unavailable"===e?"error":"warning"}},"getTerminalRuntimeSetupGuidance",0,function(e,a){let s="ready"===e&&!0===a;return{titleKey:s?"runtimeSetup.readyTitle":"runtimeSetup.unavailableTitle",descriptionKey:s?"runtimeSetup.readyDescription":"runtimeSetup.unavailableDescription",commands:[],blocked:!s,severity:s?"healthy":"unavailable"===e?"error":"warning"}}],23254)},66296,e=>{"use strict";var a=e.i(66499),s=e.i(41271),t=e.i(78717),r=e.i(26201),i=e.i(39840),d=e.i(52860),l=e.i(51671),l=l,n=e.i(58394),o=e.i(7329),c=e.i(1061),u=e.i(9939),h=e.i(60218),m=e.i(12603),p=e.i(93657),x=e.i(8795),b=e.i(63641),g=e.i(47721),f=e.i(23254),j=e.i(48111),v=e.i(35887),y=e.i(65458);function N({status:e}){let s=(0,j.normalizeSessionStatus)(e);return(0,a.jsx)("span",{className:(0,y.cn)("size-2 shrink-0 rounded-full","running"===s?"animate-pulse bg-emerald-400":"error"===s?"bg-red-400":"bg-muted-foreground/40")})}function C({status:e}){let{t:s}=(0,v.useLanguage)(),t=(0,j.normalizeSessionStatus)(e);return(0,a.jsx)("span",{className:(0,y.cn)("shrink-0 text-xs","running"===t?"text-emerald-400":"error"===t?"text-red-400":"text-muted-foreground"),children:s("running"===t?"sessions.running":"error"===t?"sessions.error":"sessions.stopped")})}e.s(["default",0,function(){var e,k,S,w,R;let K,z,L,A,H,D,T,F,E,{t:M}=(0,v.useLanguage)(),B=(0,t.useQuery)({queryKey:["dashboard-summary"],queryFn:g.getDashboardSummary}),P=(0,t.useQuery)({queryKey:["sessions"],queryFn:g.listSessions}),V=(0,t.useQuery)({queryKey:["projects"],queryFn:g.listProjects}),q=(0,t.useQuery)({queryKey:["dependencies"],queryFn:g.getDependencies}),I=(0,t.useQuery)({queryKey:b.ADAPTER_DISCOVERY_QUERY_KEY,queryFn:g.discoverAdapters}),U=P.data?.sessions??[],$=V.data?.projects??[],O=$[0],_=B.data?.stats,Q=B.data?.health,Y=q.data?.terminalRuntime,G=(0,f.getTerminalRuntimeRemediation)(Y?.mode),W=(0,f.getTerminalRuntimeSetupGuidance)(Y?.mode,Y?.supported),J=q.isSuccess&&Y?.supported===!0,X=q.isLoading?M("dashboard.statusLoading"):q.isError||!Y?M("dashboard.dependenciesHealthUnavailable"):M(G.detailKey),Z=!q.isLoading&&W.blocked,ee=I.data?.adapters??[],ea=ee.filter(g.isAdapterLaunchable).length,es=I.isSuccess&&ea>0,et=I.isLoading?M("dashboard.statusLoading"):I.isError?M("dashboard.activationAdapterUnavailable"):ea>0?M("dashboard.adaptersHealthReady").replace("{count}",String(ea)):M("dashboard.activationAdapterMissing"),er=_?.runningSessions??U.filter(e=>"running"===(0,j.normalizeSessionStatus)(e.status)).length,ei=[{label:M("nav.projects"),value:_?.projects??0,icon:n.FolderOpen,href:"/projects"},{label:M("nav.sessions"),value:_?.sessions??0,sub:M("dashboard.runningNow").replace("{count}",String(er)),icon:c.TerminalSquare,href:"/sessions"},{label:M("nav.skills"),value:_?.skills??0,icon:u.Wrench,href:"/skills"}],ed=U.slice(0,6),el=_?.projects??$.length,en=_?.sessions??U.length,eo=(e={terminalRuntime:Y,dependenciesLoading:q.isLoading,dependenciesError:q.isError,adapters:ee,adaptersLoading:I.isLoading,adaptersError:I.isError,modelsHealthy:Q?.models.healthy,modelsLoading:B.isLoading,modelsError:B.isError,projectCount:el,sessionCount:en,acceptedDeliveries:_?.acceptedDeliveries??0,firstProjectId:O?.id},z=!1===(K=(0,f.getTerminalRuntimeSetupGuidance)(e.terminalRuntime?.mode,e.terminalRuntime?.supported)).blocked,L=!e.adaptersLoading&&!e.adaptersError&&(e.adapters??[]).some(g.isAdapterLaunchable),A=e.projectCount>0,H=e.sessionCount>0,D=e.firstProjectId?`/projects/${e.firstProjectId}?tab=project-manager`:"/projects",E=!(F=(T=[{id:"runtime",labelKey:"dashboard.activationRuntime",detailKey:(k=e,S=K.descriptionKey,k.dependenciesLoading?"dashboard.activationRuntimeLoading":k.dependenciesError||!k.terminalRuntime?"dashboard.activationRuntimeUnavailable":S),done:z,action:{href:"/settings",labelKey:"dashboard.activationOpenSettings"}},{id:"adapter",labelKey:"dashboard.activationAdapter",detailKey:(w=e,R=L,w.adaptersLoading?"dashboard.activationAdapterLoading":w.adaptersError?"dashboard.activationAdapterUnavailable":R?"dashboard.activationAdapterReady":"dashboard.activationAdapterMissing"),done:L,action:{href:"/settings",labelKey:"dashboard.activationOpenSettings"}},{id:"model",labelKey:"dashboard.activationModel",detailKey:"dashboard.activationModelReady",done:!1,optional:!0,action:{href:"/models",labelKey:"dashboard.activationOpenModels"}},{id:"project",labelKey:"dashboard.activationProject",detailKey:A?"dashboard.firstRunProjectReady":"dashboard.firstRunProjectMissing",done:A,action:{href:"/projects/new",labelKey:"projects.create"}},{id:"session",labelKey:"dashboard.activationSession",detailKey:H?"dashboard.firstRunSessionReady":"dashboard.firstRunSessionMissing",done:H,optional:!0,action:{href:D,labelKey:"dashboard.activationStartDelivery"}},{id:"delivery",labelKey:"dashboard.activationDelivery",detailKey:(e.acceptedDeliveries??0)>0?"dashboard.activationDeliveryReady":"dashboard.activationDeliveryMissing",done:(e.acceptedDeliveries??0)>0,action:{href:"/projects",labelKey:"dashboard.activationStartDelivery"}}]).find(e=>!e.optional&&!e.done)),{steps:T,complete:E,currentStepId:F?.id??null,primaryAction:E?{href:"/projects",labelKey:"dashboard.activationContinueDelivery"}:F.action,secondaryActions:F?.id==="project"?[{href:"/projects/import",labelKey:"projects.import"}]:[]}),ec=!eo.complete,eu=eo.steps.filter(e=>!e.optional),eh=eu.filter(e=>e.done).length,em=[{key:"runtime",label:M("dashboard.dependenciesHealth"),detail:X,healthy:J,href:G.href},{key:"adapters",label:M("dashboard.adaptersHealth"),detail:et,healthy:es,href:"/settings"},{key:"models",label:M("dashboard.modelHealth"),detail:Q?.models.message??M("dashboard.modelHealthDescription"),healthy:Q?.models.healthy??!1,href:"/models"},{key:"config",label:M("dashboard.configHealth"),detail:Q?.projectConfig.message??M("dashboard.configHealthDescription"),healthy:Q?.projectConfig.healthy??!1,href:"/templates"},{key:"sessions",label:M("dashboard.sessionHealth"),detail:Q?.sessions.message??M("dashboard.sessionHealthDescription"),healthy:Q?.sessions.healthy??!1,href:"/sessions"},{key:"skills",label:M("dashboard.skillHealth"),detail:Q?.skills.message??M("dashboard.skillHealthDescription"),healthy:Q?.skills.healthy??!1,href:"/skills"}];return(0,a.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6 p-6",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:M("dashboard.title")}),(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:M("dashboard.subtitle")})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(h.Button,{asChild:!0,size:"sm",className:"bg-brand text-brand-foreground hover:bg-brand/90",children:(0,a.jsxs)(s.default,{href:"/sessions",children:[(0,a.jsx)(o.Plus,{className:"size-4"}),M("projects.newSession")]})}),(0,a.jsx)(h.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,a.jsx)(s.default,{href:"/projects/new",children:M("projects.create")})})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:ei.map((e,t)=>(0,a.jsx)(s.default,{href:e.href,className:"group forgebadger-animate-in",style:{animationDelay:`${50*t}ms`},children:(0,a.jsx)(m.Card,{className:"h-full transition-all duration-200 group-hover:-translate-y-0.5 group-hover:border-brand/40 group-hover:shadow-lg group-hover:shadow-brand/5",children:(0,a.jsxs)(m.CardContent,{className:"flex items-center gap-3 p-4",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-brand/10 text-brand",children:(0,a.jsx)(e.icon,{className:"size-4"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-2xl font-semibold leading-none",children:e.value}),(0,a.jsxs)("div",{className:"mt-1.5 truncate text-xs text-muted-foreground",children:[e.label,e.sub?(0,a.jsxs)("span",{className:"text-muted-foreground/70",children:[" · ",e.sub]}):null]})]}),(0,a.jsx)(r.ArrowUpRight,{className:"size-4 shrink-0 text-muted-foreground/30 transition-colors group-hover:text-brand"})]})})},e.label))}),ec&&(0,a.jsxs)(m.Card,{className:"forgebadger-animate-in border-brand/30 bg-brand/5",children:[(0,a.jsx)(m.CardHeader,{className:"pb-3",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(m.CardTitle,{className:"text-base",children:M("dashboard.firstRunTitle")}),(0,a.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:M("dashboard.firstRunDescription")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,a.jsx)("div",{className:"h-1.5 w-24 overflow-hidden rounded-full bg-muted",children:(0,a.jsx)("div",{className:"h-full rounded-full bg-brand transition-all duration-500",style:{width:`${Math.round(eh/eu.length*100)}%`}})}),(0,a.jsxs)("span",{className:"tabular-nums",children:[eh,"/",eu.length]})]})]})}),(0,a.jsxs)(m.CardContent,{className:"space-y-4",children:[(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:eo.steps.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-2.5 rounded-md border border-border/70 bg-background/60 p-3",children:[e.done?(0,a.jsx)(i.CheckCircle2,{className:"mt-0.5 size-4 shrink-0 text-emerald-400"}):(0,a.jsx)(l.default,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground/40"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"text-sm font-medium",children:[M(e.labelKey),e.optional&&(0,a.jsx)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:M("dashboard.activationOptional")})]}),(0,a.jsx)("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:M(e.detailKey)}),"runtime"===e.id&&Z&&(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(x.RuntimeSetupCommands,{guidance:W})})]})]},e.id))}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(h.Button,{asChild:!0,size:"sm",className:"bg-brand text-brand-foreground hover:bg-brand/90",children:(0,a.jsx)(s.default,{href:eo.primaryAction.href,children:M(eo.primaryAction.labelKey)})}),eo.secondaryActions.map(e=>(0,a.jsx)(h.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,a.jsx)(s.default,{href:e.href,children:M(e.labelKey)})},e.href))]})]})]}),(0,a.jsxs)("div",{className:"grid gap-6 xl:grid-cols-5",children:[(0,a.jsxs)("section",{className:"space-y-3 xl:col-span-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:M("dashboard.recentSessions")}),(0,a.jsx)(h.Button,{asChild:!0,variant:"ghost",size:"sm",className:"text-muted-foreground",children:(0,a.jsx)(s.default,{href:"/sessions",children:M("dashboard.viewAll")})})]}),0===ed.length?(0,a.jsx)(m.Card,{children:(0,a.jsxs)(m.CardContent,{className:"flex flex-col items-center gap-3 py-10 text-center",children:[(0,a.jsx)("div",{className:"flex size-10 items-center justify-center rounded-md bg-brand/10 text-brand",children:(0,a.jsx)(c.TerminalSquare,{className:"size-5"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:M("dashboard.noSessions")}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:M("dashboard.emptySessionsDescription")})]}),(0,a.jsx)(h.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,a.jsxs)(s.default,{href:"/sessions",children:[(0,a.jsx)(o.Plus,{className:"size-4"}),M("projects.newSession")]})})]})}):(0,a.jsx)("div",{className:"divide-y divide-border/70 overflow-hidden rounded-lg border border-border bg-card",children:ed.map((e,t)=>(0,a.jsxs)(s.default,{href:`/sessions/${e.id}`,className:"group flex items-center gap-3 px-4 py-3 transition-colors forgebadger-animate-in hover:bg-muted/40",style:{animationDelay:`${40*t}ms`},children:[(0,a.jsx)(N,{status:e.status}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate text-sm font-medium",children:e.name||e.runtimeSessionName||e.id}),(0,a.jsx)("div",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:e.projectName??"—"})]}),(0,a.jsx)(p.CliBrandChip,{aiTool:e.aiTool}),(0,a.jsx)(C,{status:e.status}),(0,a.jsx)(r.ArrowUpRight,{className:"size-4 shrink-0 text-muted-foreground/30 transition-colors group-hover:text-brand"})]},e.id))})]}),(0,a.jsxs)("section",{className:"space-y-3 xl:col-span-2",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:M("dashboard.systemStatus")}),(0,a.jsx)(m.Card,{children:(0,a.jsx)(m.CardContent,{className:"space-y-0.5 p-2",children:em.map(e=>(0,a.jsxs)(s.default,{href:e.href,className:"flex items-center gap-3 rounded-md px-2.5 py-2 transition-colors hover:bg-muted/40",children:[(0,a.jsx)("span",{className:(0,y.cn)("size-1.5 shrink-0 rounded-full",e.healthy?"bg-emerald-400":"bg-amber-400")}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm",children:e.label}),(0,a.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:e.detail})]}),(0,a.jsx)(d.ChevronRight,{className:"size-3.5 shrink-0 text-muted-foreground/30"})]},e.key))})})]})]})]})}],66296)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62918,e=>{"use strict";var t=e.i(66499),a=e.i(94237),s=e.i(82909),r=e.i(65458);let n=(0,a.cva)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",asChild:i=!1,...o}){let l=i?s.Slot.Root:"span";return(0,t.jsx)(l,{"data-slot":"badge","data-variant":a,className:(0,r.cn)(n({variant:a}),e),...o})}])},12603,e=>{"use strict";var t=e.i(66499),a=e.i(65458);e.s(["Card",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-lg border bg-card py-6 text-card-foreground shadow-sm",e),...s})},"CardContent",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",e),...s})},"CardDescription",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...s})},"CardHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...s})},"CardTitle",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",e),...s})}])},7329,e=>{"use strict";let t=(0,e.i(65174).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],7329)},38355,e=>{"use strict";var t=e.i(47721);e.s(["createGrant",0,function(e){return(0,t.fetchJson)("/api/v1/copilot/grants",{method:"POST",body:JSON.stringify(e)})},"deleteGrant",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/grants/${encodeURIComponent(e)}`,{method:"DELETE"})},"getPlatformAction",0,function(e){return(0,t.fetchJson)(`/api/v1/platform-actions/${encodeURIComponent(e)}`)},"getProjectOverview",0,function(e){return(0,t.fetchJson)(`/api/v1/project-manager/overview${e?`?grantId=${encodeURIComponent(e)}`:""}`)},"getSessionWriter",0,function(e){return(0,t.fetchJson)(`/api/v1/sessions/${encodeURIComponent(e)}/writer`)},"listGrants",0,function(){return(0,t.fetchJson)("/api/v1/copilot/grants")},"revokeGrant",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/grants/${encodeURIComponent(e)}/revoke`,{method:"POST"})},"takeoverSession",0,function(e){return(0,t.fetchJson)(`/api/v1/sessions/${encodeURIComponent(e)}/takeover`,{method:"POST",body:"{}"})},"updateProjectManagement",0,function(e,a){return(0,t.fetchJson)(`/api/v1/projects/${encodeURIComponent(e)}/project-manager/management`,{method:"PATCH",body:JSON.stringify(a)})}])},34558,e=>{"use strict";let t=(0,e.i(65174).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],34558)},71326,e=>{"use strict";let t=(0,e.i(65174).default)("ShieldCheck",[["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 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,t],71326)},42831,e=>{"use strict";var t=e.i(35887);let a={capabilities:{"project.create":"创建项目","project.metadata.update":"更新项目资料","pm.work_item.create":"创建工作项","pm.work_item.metadata":"更新工作项资料","pm.management.update":"更新负责人及下一步","pm.task.prepare":"准备任务","session.start":"启动会话","session.stop":"停止会话","memory.write":"写入记忆"},navAriaLabel:"Copilot 设置导航",navGeneral:"常规",navAccess:"授权",navExtensions:"扩展",navChannels:"远程渠道",navAutomations:"自动化",backToChat:"返回对话",accessCardTitle:"授权",accessCardDescription:"决定 Copilot 可以在哪些项目里执行哪些操作,以及次数与有效期。",channelsCardTitle:"远程渠道",channelsCardDescription:"配置飞书远程操作:应用接入、身份确认与授权绑定。",manageModels:"管理模型",accessTitle:"授权与项目权限",accessDescription:"授权决定 Copilot 可以在哪些项目内执行哪些操作。所有写操作都受授权约束,可随时撤销。",howTitle:"授权如何工作",howStep1:"选择项目与允许的操作",howStep2:"设置有效期、次数与并发上限",howStep3:"绑定到新会话,Copilot 在范围内工作",howNote:"撤销授权立即停止后续操作,已发生的操作保留记录。授权绑定会话后不可切换。",grantsTitle:"项目授权",grantsDescription:"每个授权限定一组项目和允许的操作,用于绑定新会话。",newGrant:"新建授权",loading:"正在加载授权…",loadError:"授权加载失败",retry:"重试",empty:"尚未创建授权。新建一个授权,让 Copilot 在指定项目内为你工作。",boundPrefix:"当前会话绑定:",statusActive:"有效",statusExpired:"已过期",statusRevoked:"已撤销",usageActions:"操作次数",concurrency:"最大并发",expiry:"到期",permanent:"长期有效,直至撤销",unlimited:"不限",startConversation:"以此授权新建会话",revoke:"撤销授权",deleteGrant:"删除授权",showRevoked:"查看已撤销授权",hideRevoked:"收起已撤销授权",revokedHelp:"删除后不再出现在列表中,历史会话和操作记录仍保留。",projectsEmpty:"无现有项目",createTitle:"新建授权",createDescription:"选择项目即可创建:默认允许所选项目的全部可授权操作,长期有效,直至撤销。",stepProjects:"项目范围",stepPermissions:"权限范围",stepLimits:"有效期与限额",nameLabel:"授权名称(可选)",namePlaceholder:"按所选项目自动命名",allOperations:"允许所有当前可授权操作",allOperationsHelp:"目录权限仅限所选项目目录内。未来新增操作和新建项目不会自动加入授权。",customOperationsHelp:"自定义模式按填写的根目录授权。未来新增操作和新建项目不会自动加入授权。",allowedRootsLabel:"允许创建项目的根目录(每行一个绝对路径)",permanentLabel:"长期有效,直到撤销",unlimitedLabel:"不限制累计操作次数",hoursLabel:"有效小时",limitLabel:"操作次数上限",concurrencyLabel:"最大并发",advanced:"高级设置(可选)",create:"创建授权",creating:"正在创建…",created:"授权已创建,可在授权列表中使用。",cancel:"取消",errorGeneric:"操作失败,请重试",errNoProject:"请至少选择一个项目。",errNoOperation:"请至少选择一项允许操作,或开启所有操作。",errNoRoots:"请填写允许创建项目的目录,或切换为默认的所有操作。",errConcurrency:"最大并发须为 1–20。",errHours:"有效小时须为 1–8760。",errLimit:"操作次数上限须为 1–10000。",errCreate:"创建失败,请重试。"},s={capabilities:{"project.create":"Create projects","project.metadata.update":"Update project metadata","pm.work_item.create":"Create work items","pm.work_item.metadata":"Update work item metadata","pm.management.update":"Update owner and next step","pm.task.prepare":"Prepare tasks","session.start":"Start sessions","session.stop":"Stop sessions","memory.write":"Write memory"},navAriaLabel:"Copilot settings navigation",navGeneral:"General",navAccess:"Access",navExtensions:"Extensions",navChannels:"Channels",navAutomations:"Automations",backToChat:"Back to chat",accessCardTitle:"Access",accessCardDescription:"Decide which projects Copilot may act on, which operations are allowed, and the usage limits.",channelsCardTitle:"Channels",channelsCardDescription:"Set up Feishu remote operation: app connection, identity confirmation, and grant binding.",manageModels:"Manage models",accessTitle:"Access and project permissions",accessDescription:"Grants decide which projects Copilot may act on and which operations are allowed. Every write operation is constrained by a grant and can be revoked at any time.",howTitle:"How grants work",howStep1:"Pick projects and allowed operations",howStep2:"Set expiry, action, and concurrency limits",howStep3:"Bind to a new conversation and let Copilot work in scope",howNote:"Revoking a grant stops further actions immediately; completed actions stay on record. A grant-bound conversation cannot switch grants.",grantsTitle:"Project grants",grantsDescription:"Each grant scopes a set of projects and allowed operations, and binds to a new conversation.",newGrant:"New grant",loading:"Loading grants…",loadError:"Failed to load grants",retry:"Retry",empty:"No grants yet. Create one to let Copilot work inside the projects you choose.",boundPrefix:"Current conversation bound to: ",statusActive:"Active",statusExpired:"Expired",statusRevoked:"Revoked",usageActions:"Actions",concurrency:"Max concurrency",expiry:"Expires",permanent:"Valid until revoked",unlimited:"Unlimited",startConversation:"Start a conversation with this grant",revoke:"Revoke grant",deleteGrant:"Delete grant",showRevoked:"Show revoked grants",hideRevoked:"Hide revoked grants",revokedHelp:"Deleted grants disappear from this list; historical conversations and action records are kept.",projectsEmpty:"No existing projects",createTitle:"New grant",createDescription:"Pick projects to create a grant: all currently grantable operations on the selected projects are allowed by default, valid until revoked.",stepProjects:"Project scope",stepPermissions:"Permissions",stepLimits:"Expiry and limits",nameLabel:"Grant name (optional)",namePlaceholder:"Named after the selected projects",allOperations:"Allow all currently grantable operations",allOperationsHelp:"Directory access stays within the selected projects. New operations and new projects are not added automatically.",customOperationsHelp:"Custom mode grants the root directories you enter. New operations and new projects are not added automatically.",allowedRootsLabel:"Root directories allowed for project creation (one absolute path per line)",permanentLabel:"Valid until revoked",unlimitedLabel:"Unlimited total actions",hoursLabel:"Valid hours",limitLabel:"Action limit",concurrencyLabel:"Max concurrency",advanced:"Advanced (optional)",create:"Create grant",creating:"Creating…",created:"Grant created. It is now available in the grant list.",cancel:"Cancel",errorGeneric:"Action failed. Please retry.",errNoProject:"Select at least one project.",errNoOperation:"Select at least one allowed operation, or enable all operations.",errNoRoots:"Enter the directories allowed for project creation, or switch back to all operations.",errConcurrency:"Max concurrency must be 1–20.",errHours:"Valid hours must be 1–8760.",errLimit:"Action limit must be 1–10000.",errCreate:"Creation failed. Please retry."},r={...a,capabilities:{"project.create":"建立專案","project.metadata.update":"更新專案資料","pm.work_item.create":"建立工作項目","pm.work_item.metadata":"更新工作項目資料","pm.management.update":"更新負責人及下一步","pm.task.prepare":"準備任務","session.start":"啟動工作階段","session.stop":"停止工作階段","memory.write":"寫入記憶"},navAriaLabel:"Copilot 設定導覽",navGeneral:"一般",navAccess:"授權",navExtensions:"擴充",navChannels:"遠端渠道",navAutomations:"自動化",backToChat:"返回對話",accessCardTitle:"授權",accessCardDescription:"決定 Copilot 可以在哪些專案裡執行哪些操作,以及次數與有效期。",channelsCardTitle:"遠端渠道",channelsCardDescription:"設定飛書遠端操作:應用接入、身份確認與授權綁定。",manageModels:"管理模型",accessTitle:"授權與專案權限",accessDescription:"授權決定 Copilot 可以在哪些專案內執行哪些操作。所有寫入操作都受授權約束,可隨時撤銷。",howTitle:"授權如何運作",howStep1:"選擇專案與允許的操作",howStep2:"設定有效期、次數與並發上限",howStep3:"綁定到新對話,Copilot 在範圍內工作",howNote:"撤銷授權立即停止後續操作,已發生的操作保留記錄。授權綁定對話後不可切換。",grantsTitle:"專案授權",grantsDescription:"每個授權限定一組專案和允許的操作,用於綁定新對話。",newGrant:"新增授權",loading:"正在載入授權…",loadError:"授權載入失敗",retry:"重試",empty:"尚未建立授權。新增一個授權,讓 Copilot 在指定專案內為你工作。",boundPrefix:"目前對話綁定:",statusActive:"有效",statusExpired:"已過期",statusRevoked:"已撤銷",usageActions:"操作次數",concurrency:"最大並發",expiry:"到期",permanent:"長期有效,直至撤銷",unlimited:"不限",startConversation:"以此授權新增對話",revoke:"撤銷授權",deleteGrant:"刪除授權",showRevoked:"查看已撤銷授權",hideRevoked:"收起已撤銷授權",revokedHelp:"刪除後不再出現在列表中,歷史對話和操作記錄仍保留。",projectsEmpty:"無現有專案",createTitle:"新增授權",createDescription:"選擇專案即可建立:預設允許所選專案的全部可授權操作,長期有效,直至撤銷。",stepProjects:"專案範圍",stepPermissions:"權限範圍",stepLimits:"有效期與限額",nameLabel:"授權名稱(可選)",namePlaceholder:"按所選專案自動命名",allOperations:"允許所有目前可授權操作",allOperationsHelp:"目錄權限僅限所選專案目錄內。未來新增操作和新建專案不會自動加入授權。",customOperationsHelp:"自訂模式按填寫的根目錄授權。未來新增操作和新建專案不會自動加入授權。",allowedRootsLabel:"允許建立專案的根目錄(每行一個絕對路徑)",permanentLabel:"長期有效,直到撤銷",unlimitedLabel:"不限制累計操作次數",hoursLabel:"有效小時",limitLabel:"操作次數上限",concurrencyLabel:"最大並發",advanced:"進階設定(可選)",create:"建立授權",creating:"正在建立…",created:"授權已建立,可在授權列表中使用。",cancel:"取消",errorGeneric:"操作失敗,請重試",errNoProject:"請至少選擇一個專案。",errNoOperation:"請至少選擇一項允許操作,或開啟所有操作。",errNoRoots:"請填寫允許建立專案的目錄,或切換為預設的所有操作。",errConcurrency:"最大並發須為 1–20。",errHours:"有效小時須為 1–8760。",errLimit:"操作次數上限須為 1–10000。",errCreate:"建立失敗,請重試。"};e.s(["useSettingsCopy",0,function(){let{language:e}=(0,t.useLanguage)();return"en"===e?s:"zh-TW"===e?r:a}])},83540,96588,84959,4484,e=>{"use strict";var t=e.i(65174);let a=(0,t.default)("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["CalendarClock",0,a],83540);let s=(0,t.default)("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",0,s],96588);let r=(0,t.default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);e.s(["Radio",0,r],84959);let n=(0,t.default)("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);e.s(["SlidersHorizontal",0,n],4484)},63134,e=>{"use strict";var t=e.i(66499),a=e.i(41271),s=e.i(86059),r=e.i(34558),n=e.i(83540),i=e.i(96588),o=e.i(84959),l=e.i(71326),c=e.i(4484),d=e.i(60218),u=e.i(42831);e.s(["CopilotSettingsShell",0,function({active:e,title:p,description:m,children:x}){let h,g=(0,u.useSettingsCopy)(),v=(0,s.useRouter)(),b=(h=(0,u.useSettingsCopy)(),[{key:"general",href:"/copilot/settings",icon:c.SlidersHorizontal,label:h.navGeneral},{key:"access",href:"/copilot/settings/access",icon:l.ShieldCheck,label:h.navAccess},{key:"extensions",href:"/copilot/extensions",icon:i.Puzzle,label:h.navExtensions},{key:"channels",href:"/copilot/channels",icon:o.Radio,label:h.navChannels},{key:"automations",href:"/copilot/automations",icon:n.CalendarClock,label:h.navAutomations}]);return(0,t.jsxs)("div",{className:"mx-auto flex h-full w-full max-w-6xl flex-col gap-5 overflow-y-auto p-4 md:p-6",children:[(0,t.jsxs)("header",{className:"forgebadger-animate-in flex items-start gap-2 pl-12 md:pl-0",children:[(0,t.jsx)(d.Button,{variant:"ghost",size:"icon","aria-label":g.backToChat,title:g.backToChat,onClick:()=>v.push("/copilot"),children:(0,t.jsx)(r.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-lg font-semibold",children:p}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:m})]})]}),(0,t.jsxs)("div",{className:"flex min-h-0 flex-col gap-5 md:flex-row md:gap-8",children:[(0,t.jsx)("nav",{"aria-label":g.navAriaLabel,className:"forgebadger-animate-in flex shrink-0 gap-1 overflow-x-auto pb-1 md:w-44 md:flex-col md:overflow-visible md:pb-0",style:{animationDelay:"60ms"},children:b.map(s=>{let r=s.icon,n=s.key===e;return(0,t.jsxs)(a.default,{href:s.href,"aria-current":n?"page":void 0,className:`flex items-center gap-2 rounded-md px-3 py-2 text-sm whitespace-nowrap transition-colors ${n?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:`size-4 shrink-0 ${n?"text-brand":""}`}),s.label]},s.key)})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:x})]})]})}])},92351,e=>{"use strict";let t=(0,e.i(65174).default)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);e.s(["KeyRound",0,t],92351)},69435,e=>{"use strict";var t=e.i(66499),a=e.i(79923),s=e.i(78717),r=e.i(6270),n=e.i(92351),i=e.i(7329),o=e.i(71326),l=e.i(62918),c=e.i(60218),d=e.i(9988),u=e.i(81622),p=e.i(38355),m=e.i(42831);function x({grant:e,projects:a,busy:s,startLabel:r,onStart:n,onRevoke:i,onDelete:o}){let d=(0,m.useSettingsCopy)(),u=null!==e.expiresAt&&e.expiresAt<=Date.now(),p="active"===e.status&&!u&&(null===e.maxActions||e.usedActions<e.maxActions),h="revoked"===e.status?"revoked":u?"expired":"active",g="revoked"===h?d.statusRevoked:"expired"===h?d.statusExpired:d.statusActive,v=null===e.maxActions?null:Math.min(1,e.usedActions/e.maxActions),b=e.scope.projectIds.map(e=>a.find(t=>t.id===e)?.name??e).join("、")||d.projectsEmpty,j=e.scope.capabilities.map(e=>d.capabilities[e]??e).join("、");return(0,t.jsxs)("div",{className:"forgebadger-animate-in space-y-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("p",{className:"font-medium break-all",children:e.name}),(0,t.jsxs)("p",{className:"text-xs break-all text-muted-foreground",children:[b," · ",j]})]}),(0,t.jsx)(l.Badge,{variant:"outline",className:`shrink-0 ${"active"===h?"border-emerald-500/50 text-emerald-500":"expired"===h?"border-amber-500/50 text-amber-500":"text-muted-foreground"}`,children:g})]}),null!==v&&(0,t.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",role:"presentation",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-brand transition-[width]",style:{width:`${100*v}%`}})}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[d.usageActions," ",e.usedActions,"/",e.maxActions??d.unlimited," ·"," ",d.concurrency," ",e.maxConcurrency," · ",d.expiry," ",null===e.expiresAt?d.permanent:new Date(e.expiresAt).toLocaleString()]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(c.Button,{size:"sm",disabled:s||!p,onClick:n,children:r}),(0,t.jsx)(c.Button,{size:"sm",variant:"outline",disabled:s||"active"!==e.status,onClick:i,children:d.revoke}),"revoked"===e.status&&(0,t.jsx)(c.Button,{size:"sm",variant:"ghost",className:"text-destructive",disabled:s,onClick:o,children:d.deleteGrant})]})]})}function h({projects:e,capabilities:s,busy:r,onCreate:n}){let i=(0,m.useSettingsCopy)(),[o,l]=(0,a.useState)([]),[d,p]=(0,a.useState)(""),[x,g]=(0,a.useState)(!0),[v,b]=(0,a.useState)([]),[j,f]=(0,a.useState)(!0),[y,C]=(0,a.useState)(!0),[k,N]=(0,a.useState)(24),[w,S]=(0,a.useState)(20),[A,I]=(0,a.useState)(1),[L,P]=(0,a.useState)(""),[R,D]=(0,a.useState)(!1),[T,z]=(0,a.useState)(null),E=(0,a.useRef)(!1),H=(e,t,a)=>a(t.includes(e)?t.filter(t=>t!==e):[...t,e]);async function G(t){if(t.preventDefault(),E.current||r)return;z(null);let a=L.split("\n").map(e=>e.trim()).filter(Boolean),s=e=>z({error:!0,text:e});if(!o.length)return s(i.errNoProject);if(!x&&!v.length)return s(i.errNoOperation);if(!x&&v.includes("project.create")&&!a.length)return s(i.errNoRoots);if(!Number.isInteger(A)||A<1||A>20)return s(i.errConcurrency);if(!j&&(!Number.isInteger(k)||k<1||k>8760))return s(i.errHours);if(!y&&(!Number.isInteger(w)||w<1||w>1e4))return s(i.errLimit);E.current=!0,D(!0);try{await n({name:d.trim()||`${e.filter(e=>o.includes(e.id)).map(e=>e.name).join("、")}授权`.slice(0,200),projectIds:o,...x?{allOperations:!0}:{capabilities:v,allowedRoots:a},expiresAt:j?null:Date.now()+36e5*k,maxActions:y?null:w,maxConcurrency:A}),z({error:!1,text:i.created})}catch(e){s(e instanceof Error?e.message:i.errCreate)}finally{E.current=!1,D(!1)}}return(0,t.jsxs)("form",{noValidate:!0,className:"space-y-5",onSubmit:G,children:[(0,t.jsxs)("fieldset",{disabled:R||r,className:"space-y-2",children:[(0,t.jsxs)("legend",{className:"text-sm font-medium",children:[(0,t.jsx)("span",{className:"mr-2 inline-flex size-5 items-center justify-center rounded-full bg-brand/15 text-[11px] font-semibold text-brand",children:"1"}),i.stepProjects]}),(0,t.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.map(e=>(0,t.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-md border border-border/70 px-3 py-2 text-sm transition-colors hover:border-border hover:bg-muted/50",children:[(0,t.jsx)("input",{type:"checkbox",checked:o.includes(e.id),onChange:()=>H(e.id,o,l)}),e.name]},e.id))}),(0,t.jsxs)("label",{className:"block space-y-1 pt-1 text-sm",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:i.nameLabel}),(0,t.jsx)(u.Input,{maxLength:200,value:d,placeholder:i.namePlaceholder,onChange:e=>p(e.target.value)})]})]}),(0,t.jsxs)("fieldset",{disabled:R||r,className:"space-y-2",children:[(0,t.jsxs)("legend",{className:"text-sm font-medium",children:[(0,t.jsx)("span",{className:"mr-2 inline-flex size-5 items-center justify-center rounded-full bg-brand/15 text-[11px] font-semibold text-brand",children:"2"}),i.stepPermissions]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",checked:x,onChange:e=>g(e.target.checked)}),i.allOperations]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x?i.allOperationsHelp:i.customOperationsHelp}),!x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:[...new Set(s.map(e=>e.capability))].map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",checked:v.includes(e),onChange:()=>H(e,v,b)}),(0,t.jsx)("span",{children:i.capabilities[e]??e})]},e))}),v.includes("project.create")&&(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:i.allowedRootsLabel}),(0,t.jsx)("textarea",{className:"w-full rounded-md border border-border bg-background p-2",value:L,onChange:e=>P(e.target.value)})]})]})]}),(0,t.jsxs)("fieldset",{disabled:R||r,className:"space-y-3",children:[(0,t.jsxs)("legend",{className:"text-sm font-medium",children:[(0,t.jsx)("span",{className:"mr-2 inline-flex size-5 items-center justify-center rounded-full bg-brand/15 text-[11px] font-semibold text-brand",children:"3"}),i.stepLimits]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",checked:j,onChange:e=>f(e.target.checked)}),i.permanentLabel]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",checked:y,onChange:e=>C(e.target.checked)}),i.unlimitedLabel]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[(0,t.jsxs)("label",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:i.hoursLabel}),(0,t.jsx)(u.Input,{type:"number",min:1,max:8760,disabled:j,value:k,onChange:e=>N(Number(e.target.value))})]}),(0,t.jsxs)("label",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:i.limitLabel}),(0,t.jsx)(u.Input,{type:"number",min:1,max:1e4,disabled:y,value:w,onChange:e=>S(Number(e.target.value))})]}),(0,t.jsxs)("label",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:i.concurrencyLabel}),(0,t.jsx)(u.Input,{type:"number",min:1,max:20,value:A,onChange:e=>I(Number(e.target.value))})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(c.Button,{type:"submit",size:"sm",disabled:r||R,children:R?i.creating:i.create}),T&&(0,t.jsx)("p",{role:T.error?"alert":"status",className:`text-xs ${T.error?"text-destructive":"text-muted-foreground"}`,children:T.text})]})]})}e.s(["CopilotGrantsPanel",0,function({onStartConversation:e,boundGrantId:l,startConversationLabel:u,onGrantCreated:g}){let v=(0,m.useSettingsCopy)(),b=(0,r.useQueryClient)(),j=(0,s.useQuery)({queryKey:["copilot-grants"],queryFn:p.listGrants,refetchInterval:15e3}),f=(0,s.useQuery)({queryKey:["project-management-overview"],queryFn:()=>(0,p.getProjectOverview)(),refetchInterval:3e4}),[y,C]=(0,a.useState)(""),[k,N]=(0,a.useState)(!1),[w,S]=(0,a.useState)(!1),[A,I]=(0,a.useState)(!1),L=j.data?.grants.filter(e=>"revoked"===e.status).length??0;async function P(e){N(!0),C("");try{await e(),await b.invalidateQueries({queryKey:["copilot-grants"]})}catch(e){C(e instanceof Error?e.message:v.errorGeneric)}finally{N(!1)}}let R=j.data?.grants.filter(e=>w||"revoked"!==e.status);return(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,t.jsx)(o.ShieldCheck,{className:"size-4 text-brand"}),v.grantsTitle]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:v.grantsDescription})]}),(0,t.jsxs)(c.Button,{size:"sm",onClick:()=>I(!0),children:[(0,t.jsx)(i.Plus,{className:"size-4"}),v.newGrant]})]}),l&&(0,t.jsxs)("p",{className:"break-all rounded-md border border-brand/30 bg-brand/5 px-3 py-2 text-xs",children:[v.boundPrefix,j.data?.grants.find(e=>e.id===l)?.name??l]}),j.isPending&&(0,t.jsx)("p",{role:"status",className:"text-sm",children:v.loading}),j.isError&&(0,t.jsxs)("p",{role:"alert",className:"text-sm",children:[v.loadError," ",(0,t.jsx)(c.Button,{variant:"outline",size:"sm",onClick:()=>void j.refetch(),children:v.retry})]}),y&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:y}),j.data&&R&&(0,t.jsxs)("div",{className:"space-y-3",children:[!j.data.grants.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-dashed border-border/70 px-4 py-8 text-center",children:[(0,t.jsx)(n.KeyRound,{className:"size-5 text-muted-foreground"}),(0,t.jsx)("p",{className:"max-w-md text-xs text-muted-foreground",children:v.empty})]}),R.map(a=>(0,t.jsx)(x,{grant:a,projects:f.data?.projects??[],busy:k,startLabel:u??v.startConversation,onStart:()=>void P(()=>e(a.id)),onRevoke:()=>void P(()=>(0,p.revokeGrant)(a.id)),onDelete:()=>void P(()=>(0,p.deleteGrant)(a.id))},a.id)),L>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(c.Button,{variant:"outline",size:"sm",onClick:()=>S(e=>!e),children:[w?v.hideRevoked:v.showRevoked,"(",L,")"]}),w&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:v.revokedHelp})]})]}),(0,t.jsx)(d.Dialog,{open:A,onOpenChange:I,children:(0,t.jsxs)(d.DialogContent,{className:"max-h-[85vh] overflow-y-auto sm:max-w-xl",children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsx)(d.DialogTitle,{children:v.createTitle}),(0,t.jsx)(d.DialogDescription,{children:v.createDescription})]}),A&&f.data&&j.data&&(0,t.jsx)(h,{projects:f.data.projects,capabilities:j.data.capabilities,busy:k,onCreate:async e=>{let t=await (0,p.createGrant)(e);await b.invalidateQueries({queryKey:["copilot-grants"]}),g?.(t.grant.id)}}),A&&(!f.data||!j.data)&&(0,t.jsx)("p",{role:"status",className:"text-sm",children:v.loading})]})})]})}])},24125,e=>{"use strict";var t=e.i(66499),a=e.i(41271),s=e.i(79923),r=e.i(78717),n=e.i(6270),i=e.i(60218),o=e.i(81622),l=e.i(12603),c=e.i(47721),d=e.i(38355);let u="/api/v1/copilot/channels",p=(e,t={})=>(0,c.fetchJson)(u+e,{method:"POST",body:JSON.stringify(t)});async function m(){let[e,t,a,s]=await Promise.all([(0,c.fetchJson)(u+"/pairings"),(0,c.fetchJson)(u+"/identities"),(0,c.fetchJson)(u+"/routes"),(0,c.fetchJson)(u+"/deliveries")]);return{...e,...t,...a,...s}}var x=e.i(85426),h=e.i(69435);function g(e){return(0,t.jsxs)("div",{className:"space-y-6 p-4 text-sm",children:[(0,t.jsx)(h.CopilotGrantsPanel,{...e}),(0,t.jsx)(v,{})]})}function v(){let e=(0,r.useQuery)({queryKey:["project-management-overview"],queryFn:()=>(0,d.getProjectOverview)(),refetchInterval:3e4});return(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsx)("h2",{className:"font-semibold",children:"多项目进度"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"此处是账号下的项目管理视图,不会扩大会话授权范围。CLI 模式用于任务规划;当前 CLI 自动执行权限未验证,仍需人工操作。"}),e.isPending&&(0,t.jsx)("p",{role:"status",children:"正在加载项目…"}),e.isError&&(0,t.jsxs)("p",{role:"alert",children:["项目加载失败"," ",(0,t.jsx)(i.Button,{size:"sm",variant:"outline",onClick:()=>void e.refetch(),children:"重试"})]}),e.data?.projects.length===0&&(0,t.jsx)("p",{className:"text-muted-foreground",children:"暂无项目,请先在项目页创建或导入。"}),e.data?.projects.map(e=>(0,t.jsx)(b,{project:e},`${e.id}-${e.management.revision}`))]})}function b({project:e}){let a=(0,n.useQueryClient)(),[r,l]=(0,s.useState)(e.management),c=(0,x.useMutation)({mutationFn:()=>(0,d.updateProjectManagement)(e.id,{mode:r.mode,ownerLabel:r.ownerLabel,nextAction:r.nextAction,freshnessHours:r.freshnessHours,expectedRevision:e.management.revision}),onSuccess:()=>a.invalidateQueries({queryKey:["project-management-overview"]})});return(0,t.jsxs)("div",{className:"rounded-md border border-border/70 p-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,t.jsx)("a",{className:"font-medium hover:underline",href:`/projects/${e.id}`,children:e.name}),(0,t.jsxs)("span",{className:"text-xs",children:["manual"===e.management.mode?"人工项目":"CLI 规划"," · 人工执行"]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.goal?.summary||"尚未设置目标"}),(0,t.jsxs)("p",{className:"text-xs",children:["完成 ",e.counts.done,"/",e.counts.total," · 进行中"," ",e.counts.in_progress," · 阻塞 ",e.counts.blocked," · 证据",{unknown:"时间未知",stale:"已过期",fresh:"新鲜"}[e.evidenceFreshness.status]]}),(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{className:"cursor-pointer text-xs",children:["负责人及下一步:",e.management.ownerLabel||"未指定"," ·"," ",e.management.nextAction||"待安排"]}),(0,t.jsxs)("form",{className:"mt-2 space-y-2",onSubmit:e=>{e.preventDefault(),c.mutate()},children:[(0,t.jsxs)("label",{className:"block",children:["管理模式",(0,t.jsxs)("select",{className:"ml-2 rounded border border-border bg-background p-1",value:r.mode,onChange:e=>l({...r,mode:e.target.value}),children:[(0,t.jsx)("option",{value:"manual",children:"人工"}),(0,t.jsx)("option",{value:"cli",children:"CLI 规划(仍需人工执行)"})]})]}),(0,t.jsxs)("label",{className:"block",children:["负责人",(0,t.jsx)(o.Input,{value:r.ownerLabel,onChange:e=>l({...r,ownerLabel:e.target.value})})]}),(0,t.jsxs)("label",{className:"block",children:["下一步",(0,t.jsx)(o.Input,{value:r.nextAction,onChange:e=>l({...r,nextAction:e.target.value})})]}),(0,t.jsxs)("label",{className:"block",children:["证据有效小时",(0,t.jsx)(o.Input,{type:"number",min:"1",max:"8760",value:r.freshnessHours,onChange:e=>l({...r,freshnessHours:Number(e.target.value)})})]}),c.isError&&(0,t.jsxs)("p",{role:"alert",className:"text-destructive",children:["保存失败:",c.error.message,(0,t.jsx)(i.Button,{type:"button",variant:"outline",size:"sm",onClick:()=>void a.invalidateQueries({queryKey:["project-management-overview"]}),children:"重新加载"})]}),(0,t.jsx)(i.Button,{size:"sm",disabled:c.isPending,children:"保存管理信息"})]})]})]})}var j=e.i(63134),f=e.i(42831);let y=["copilot-channels"],C={pending:"待处理",claimed:"等待确认",confirmed:"已确认",cancelled:"已取消",active:"有效",revoked:"已撤销",sending:"发送中",delivered:"飞书已接收",failed:"发送失败",unknown:"结果不确定",connected:"已连接",connecting:"连接中",reconnecting:"重新连接中",unhealthy:"连接异常",stopped:"已停止",disabled:"未启用"},k=e=>C[e]??e;e.s(["CopilotChannelsPage",0,function(){let e=(0,f.useSettingsCopy)(),u=(0,n.useQueryClient)(),x=(0,r.useQuery)({queryKey:y,queryFn:async()=>{let[e,t,a]=await Promise.all([(0,c.getFeishuChannelAccount)(),(0,c.getFeishuConnectionHealth)(),m()]);return{account:e,health:t,...a}},refetchInterval:3e3}),h=(0,r.useQuery)({queryKey:["copilot-grants"],queryFn:d.listGrants,refetchInterval:15e3}),v=(0,r.useQuery)({queryKey:["project-management-overview"],queryFn:()=>(0,d.getProjectOverview)()}),[b,C]=(0,s.useState)(""),[N,w]=(0,s.useState)(""),[S,A]=(0,s.useState)(!1),[I,L]=(0,s.useState)(""),[P,R]=(0,s.useState)(""),[D,T]=(0,s.useState)(null),[z,E]=(0,s.useState)(""),[H,G]=(0,s.useState)(""),[O,B]=(0,s.useState)(""),[M,$]=(0,s.useState)(Date.now());(0,s.useEffect)(()=>{let e=setInterval(()=>$(Date.now()),1e3);return()=>clearInterval(e)},[]);let U=x.data,q=U?.pairings.find(e=>e.accountId===U.account?.id&&e.accountRevision===U.account?.configRevision&&["pending","claimed"].includes(e.status)&&e.expiresAt>M),J=q?`${q.id}:${q.revision}:${q.externalUserId}:${q.chatId}`:"";(0,s.useEffect)(()=>E(""),[J]),(0,s.useEffect)(()=>{D&&(D.expiresAt<=M||U&&!U.pairings.some(e=>e.id===D.id&&"pending"===e.status&&e.accountRevision===U.account?.configRevision))&&T(null)},[U,M,D]);let K=U?.identities.filter(e=>"active"===e.status&&e.accountId===U.account?.id&&e.accountRevision===U.account?.configRevision)??[],F=h.data?.grants.filter(e=>"active"===e.status&&(null===e.expiresAt||e.expiresAt>M)&&(null===e.maxActions||e.usedActions<e.maxActions))??[],Q=F.find(e=>e.id===O),V=K.find(e=>e.id===H)??(1===K.length?K[0]:void 0);function _(e){if("active"!==e.status)return k(e.status);let t=U?.identities.find(t=>t.id===e.identityId);if(!t||"active"!==t.status)return"身份已失效";if(t.accountId!==U?.account?.id||t.accountRevision!==U?.account?.configRevision)return"配置已更新,需要重新绑定";if(!U.account.enabled)return"渠道已停用";if(h.isPending||h.isError)return"授权状态待核查";let a=h.data?.grants.find(t=>t.id===e.grantId);return!a||"active"!==a.status||a.revision!==e.grantRevision||null!==a.expiresAt&&a.expiresAt<=M||null!==a.maxActions&&a.usedActions>=a.maxActions?"授权已失效":"权限有效"}async function W(){await Promise.all([u.invalidateQueries({queryKey:y}),u.invalidateQueries({queryKey:["copilot-grants"]})])}async function X(e){A(!0),L(""),R("");try{await e(),await W()}catch{L("操作未完成。请刷新状态后重试;身份、授权或连接状态可能已变化。"),T(null),E("")}finally{A(!1),w("")}}return(0,t.jsx)(j.CopilotSettingsShell,{active:"channels",title:e.channelsCardTitle,description:e.channelsCardDescription,children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[x.isPending&&(0,t.jsx)("p",{role:"status",children:"正在加载渠道…"}),(x.isError||h.isError)&&(0,t.jsxs)("div",{role:"alert",children:["加载失败。",(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>{x.refetch(),h.refetch()},children:"重新加载"})]}),I&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:I}),P&&(0,t.jsx)("p",{role:"status",className:"text-sm",children:P}),U&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{role:"status",className:"rounded-md border border-border p-3 text-sm",children:h.isPending||h.isError?"远程操作状态待核查。":U.routes.some(e=>"权限有效"===_(e))?"飞书远程操作已授权;实际收发还需连接正常。":"飞书远程操作尚未启用:请在第 3 步选择有效项目授权,并点击“启用飞书远程操作”。仅创建项目授权不会启用飞书。"}),(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsx)(l.CardTitle,{children:"1. 飞书应用"})}),(0,t.jsxs)(l.CardContent,{className:"space-y-3",children:[(0,t.jsxs)("p",{role:"status",children:["连接:",k(U.health.state)," · ",U.account?.secretConfigured?"凭证已保存":"尚未配置凭证"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"保存应用会更新配置版本,已有身份和渠道授权将失效,需要重新配对和绑定。"}),(0,t.jsxs)("form",{className:"grid gap-3 sm:grid-cols-2",onSubmit:e=>{e.preventDefault(),w(""),T(null),X(()=>(0,c.saveFeishuChannelAccount)({appId:b||U.account?.appId||"",enabled:!0,...N?{appSecret:N}:{}}))},children:[(0,t.jsxs)("label",{className:"space-y-1 text-sm",children:["App ID",(0,t.jsx)(o.Input,{"aria-label":"App ID",autoComplete:"off",value:b,placeholder:U.account?.appId??"cli_…",onChange:e=>C(e.target.value)})]}),(0,t.jsxs)("label",{className:"space-y-1 text-sm",children:["App Secret",(0,t.jsx)(o.Input,{"aria-label":"App Secret",type:"password",autoComplete:"new-password",value:N,placeholder:U.account?.secretConfigured?"留空保留已保存密钥":"输入应用密钥",onChange:e=>w(e.target.value)})]}),(0,t.jsx)(i.Button,{type:"submit",disabled:S||!(b||U.account?.appId)||!U.account?.secretConfigured&&!N,children:"保存并启用"}),(0,t.jsx)(i.Button,{type:"button",variant:"destructive",disabled:S||!U.account,onClick:()=>{T(null),X(c.emergencyStopFeishu)},children:"紧急停止飞书"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"紧急停止阻止后续入站和操作;已经发生的操作无法撤回。飞书开放平台需要开启机器人和消息接收事件。"})]})]}),(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsx)(l.CardTitle,{children:"2. 确认私聊身份"})}),(0,t.jsxs)(l.CardContent,{className:"space-y-3",children:[(0,t.jsx)(i.Button,{disabled:S||!U.account?.enabled,onClick:()=>void X(async()=>{T(null);let e=await p("/pairings",{channel:"feishu",accountId:U.account.id});await W(),T({id:e.pairing.id,value:e.token,expiresAt:e.pairing.expiresAt})}),children:"生成新的配对码"}),D&&D.expiresAt>M&&(0,t.jsxs)("div",{className:"space-y-2 rounded-md border border-border p-3",children:[(0,t.jsxs)("p",{className:"text-sm",children:["向本应用机器人私聊发送以下命令,请勿转发。到期:",new Date(D.expiresAt).toLocaleTimeString()]}),(0,t.jsxs)("code",{className:"block break-all select-all",children:["/pair ",D.value]})]}),!q&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"没有待确认配对。新配对码会使旧码失效。"}),q?.status==="pending"&&(0,t.jsx)("p",{role:"status",children:"等待飞书私聊认领… 配对码仅在生成时显示,刷新页面后可重新生成。"}),q?.status==="claimed"&&(0,t.jsxs)("div",{className:"space-y-3 rounded-md border border-border p-3",children:[(0,t.jsx)("p",{className:"text-sm",children:"请核对认领者,勾选后确认;系统不会自动绑定身份。"}),(0,t.jsxs)("dl",{className:"break-all text-sm",children:[(0,t.jsx)("dt",{children:"飞书用户 ID"}),(0,t.jsx)("dd",{children:q.externalUserId}),(0,t.jsx)("dt",{className:"mt-2",children:"私聊 ID"}),(0,t.jsx)("dd",{children:q.chatId})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",checked:z===J,onChange:e=>E(e.target.checked?J:"")}),"我确认这是自己的飞书私聊"]}),(0,t.jsx)(i.Button,{disabled:S||z!==J,onClick:()=>void X(async()=>{E(""),T(null),await p(`/pairings/${encodeURIComponent(q.id)}/confirm`,{revision:q.revision,externalUserId:q.externalUserId,chatId:q.chatId})}),children:"确认身份"})]}),q&&(0,t.jsx)(i.Button,{variant:"outline",disabled:S,onClick:()=>{T(null),E(""),X(()=>{let e;return e=q.id,p(`/pairings/${encodeURIComponent(e)}/cancel`)})},children:"取消本次配对"}),U.identities.map(e=>(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-md border border-border/70 p-3 text-sm",children:[(0,t.jsxs)("span",{className:"break-all",children:[e.externalUserId," · ",k(e.status),e.accountRevision!==U.account?.configRevision?" · 配置已更新,请重新配对":""]}),(0,t.jsx)(i.Button,{variant:"outline",size:"sm",disabled:S||"active"!==e.status,onClick:()=>void X(()=>{let t;return t=e.id,p(`/identities/${encodeURIComponent(t)}/revoke`)}),children:"撤销身份"})]},e.id))]})]}),(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsx)(l.CardTitle,{children:"3. 绑定项目与操作授权"})}),(0,t.jsxs)(l.CardContent,{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"绑定会创建独立会话。权限范围不可在该会话中切换;更换授权需要撤销旧绑定。"}),(0,t.jsxs)("details",{open:!0,className:"rounded-md border border-border p-3",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm",children:"创建或管理项目授权"}),(0,t.jsx)(g,{onGrantCreated:B,startConversationLabel:"选择此授权",onStartConversation:async e=>B(e)})]}),h.isPending&&(0,t.jsx)("p",{role:"status",children:"正在加载授权…"}),!h.isPending&&!F.length&&(0,t.jsx)("p",{className:"text-sm",children:"尚无可用授权,请先创建。"}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("label",{className:"space-y-1 text-sm",children:["私聊身份",(0,t.jsxs)("select",{"aria-label":"私聊身份",className:"w-full rounded-md border border-border bg-background p-2",value:V?.id??"",onChange:e=>G(e.target.value),children:[(0,t.jsx)("option",{value:"",children:"选择已确认身份"}),K.map(e=>(0,t.jsx)("option",{value:e.id,children:e.externalUserId},e.id))]})]}),(0,t.jsxs)("label",{className:"space-y-1 text-sm",children:["授权",(0,t.jsxs)("select",{"aria-label":"授权",className:"w-full rounded-md border border-border bg-background p-2",value:Q?.id??"",onChange:e=>B(e.target.value),children:[(0,t.jsx)("option",{value:"",children:"选择有效授权"}),F.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]}),Q&&(0,t.jsxs)("div",{className:"space-y-1 rounded-md border border-border/70 p-3 text-sm",children:[(0,t.jsxs)("p",{children:["项目:",Q.scope.projectIds.map(e=>v.data?.projects.find(t=>t.id===e)?.name??e).join("、")||"无现有项目"]}),(0,t.jsxs)("p",{className:"break-all",children:["允许操作:",Q.scope.capabilities.join("、")||"无写操作"]}),(0,t.jsxs)("p",{className:"break-all",children:["允许目录:",Q.scope.allowedRoots.join("、")||"无额外目录"]}),(0,t.jsxs)("p",{children:["已用次数:",Q.usedActions,"/",Q.maxActions??"不限"," · 最大并发:",Q.maxConcurrency]}),(0,t.jsxs)("p",{children:["到期:",null===Q.expiresAt?"长期有效,直至撤销":new Date(Q.expiresAt).toLocaleString()]})]}),(0,t.jsx)(i.Button,{disabled:S||!Q||!V||U.routes.some(e=>e.identityId===V.id&&"active"===e.status),onClick:()=>void X(async()=>{await p("/routes",{identityId:V.id,grantId:Q.id}),R("渠道绑定已创建;请以上方实时状态为准,状态正常后发送一条新消息。")}),children:"启用飞书远程操作"}),U.routes.map(e=>(0,t.jsxs)("div",{className:"space-y-2 rounded-md border border-border/70 p-3 text-sm",children:[(0,t.jsxs)("p",{children:[h.data?.grants.find(t=>t.id===e.grantId)?.name??e.grantId," · ",_(e)]}),(0,t.jsxs)("p",{className:"break-all text-xs text-muted-foreground",children:["独立会话:",e.conversationId]}),(0,t.jsx)(a.default,{className:"inline-block underline underline-offset-4",href:`/copilot?c=${encodeURIComponent(e.conversationId)}`,children:"打开会话与审批"}),(0,t.jsx)(i.Button,{variant:"outline",size:"sm",disabled:S||"active"!==e.status,onClick:()=>void X(()=>{let t;return t=e.id,p(`/routes/${encodeURIComponent(t)}/revoke`)}),children:"撤销渠道授权"})]},e.id))]})]}),(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsx)(l.CardTitle,{children:"最近结果回传"})}),(0,t.jsxs)(l.CardContent,{className:"space-y-3 text-sm",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"“飞书已接收”不代表已读。“结果不确定”可能已经送达,请先核对飞书;系统不会自动重发。"}),!U.deliveries.length&&(0,t.jsx)("p",{children:"暂无回传记录。"}),U.deliveries.map(e=>(0,t.jsxs)("div",{className:"flex flex-wrap justify-between gap-2 rounded-md border border-border/70 p-3",children:[(0,t.jsxs)("span",{children:["terminal"===e.phase?"任务结果":"审批提示"," · ",k(e.status)]}),(0,t.jsx)("time",{children:new Date(e.createdAt).toLocaleString()})]},e.id))]})]})]})]})})}],24125)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88010,e=>{"use strict";var t=e.i(66499),i=e.i(65458);e.s(["Textarea",0,function({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,i.cn)("min-h-24 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...s})}])},26624,e=>{"use strict";var t=e.i(66499),i=e.i(79923),s=e.i(91967),a=e.i(67928),n=e.i(43250),o=e.i(17256),r=e.i(84017),l=e.i(61614),c=e.i(80939),d="Switch",[u,p]=(0,n.createContextScope)(d),[m,h]=u(d),x=i.forwardRef((e,n)=>{let{__scopeSwitch:r,name:l,checked:u,defaultChecked:p,required:h,disabled:x,value:f="on",onCheckedChange:v,form:y,...k}=e,[j,C]=i.useState(null),w=(0,a.useComposedRefs)(n,e=>C(e)),S=i.useRef(!1),N=!j||y||!!j.closest("form"),[T,R]=(0,o.useControllableState)({prop:u,defaultProp:p??!1,onChange:v,caller:d});return(0,t.jsxs)(m,{scope:r,checked:T,disabled:x,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":T,"aria-required":h,"data-state":b(T),"data-disabled":x?"":void 0,disabled:x,value:f,...k,ref:w,onClick:(0,s.composeEventHandlers)(e.onClick,e=>{R(e=>!e),N&&(S.current=e.isPropagationStopped(),S.current||e.stopPropagation())})}),N&&(0,t.jsx)(g,{control:j,bubbles:!S.current,name:l,value:f,checked:T,required:h,disabled:x,form:y,style:{transform:"translateX(-100%)"}})]})});x.displayName=d;var f="SwitchThumb",v=i.forwardRef((e,i)=>{let{__scopeSwitch:s,...a}=e,n=h(f,s);return(0,t.jsx)(c.Primitive.span,{"data-state":b(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:i})});v.displayName=f;var g=i.forwardRef(({__scopeSwitch:e,control:s,checked:n,bubbles:o=!0,...c},d)=>{let u=i.useRef(null),p=(0,a.useComposedRefs)(u,d),m=(0,r.usePrevious)(n),h=(0,l.useSize)(s);return i.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(m!==n&&t){let i=new Event("click",{bubbles:o});t.call(e,n),e.dispatchEvent(i)}},[m,n,o]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...c,tabIndex:-1,ref:p,style:{...c.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function b(e){return e?"checked":"unchecked"}g.displayName="SwitchBubbleInput",e.s(["Root",0,x,"Switch",0,x,"SwitchThumb",0,v,"Thumb",0,v,"createSwitchScope",0,p],50512);var y=e.i(50512),y=y,k=e.i(65458);e.s(["Switch",0,function({className:e,size:i="default",...s}){return(0,t.jsx)(y.Root,{"data-slot":"switch","data-size":i,className:(0,k.cn)("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...s,children:(0,t.jsx)(y.Thumb,{"data-slot":"switch-thumb",className:(0,k.cn)("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}],26624)},62918,e=>{"use strict";var t=e.i(66499),i=e.i(94237),s=e.i(82909),a=e.i(65458);let n=(0,i.cva)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:i="default",asChild:o=!1,...r}){let l=o?s.Slot.Root:"span";return(0,t.jsx)(l,{"data-slot":"badge","data-variant":i,className:(0,a.cn)(n({variant:i}),e),...r})}])},7329,e=>{"use strict";let t=(0,e.i(65174).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],7329)},84017,e=>{"use strict";var t=e.i(79923);e.s(["usePrevious",0,function(e){let i=t.useRef({value:e,previous:e});return t.useMemo(()=>(i.current.value!==e&&(i.current.previous=i.current.value,i.current.value=e),i.current.previous),[e])}])},41986,25486,e=>{"use strict";var t=e.i(79923),i=e.i(43250),s=e.i(67928),a=e.i(52053),n=e.i(66499),o=new WeakMap;function r(e,t){var i,s;let a,n,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=(i=e,s=t,a=i.length,(o=(n=l(s))>=0?n:a+n)<0||o>=a?-1:o);return -1===r?void 0:e[r]}function l(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,i){let s,a=this.has(t),n=this.#e.length,o=l(e),r=o>=0?o:n+o,c=r<0||r>=n?-1:r;if(c===this.size||a&&c===this.size-1||-1===c)return this.set(t,i),this;let d=this.size+ +!a;o<0&&r++;let u=[...this.#e],p=!1;for(let e=r;e<d;e++)if(r===e){let n=u[e];u[e]===t&&(n=u[e+1]),a&&this.delete(t),s=this.get(n),this.set(t,i)}else{p||u[e-1]!==t||(p=!0);let i=u[p?e:e-1],a=s;s=this.get(i),this.delete(i),this.set(i,a)}return this}with(t,i,s){let a=new e(this);return a.insert(t,i,s),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,i){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s,t,i)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,i){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s+1,t,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=r(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=r(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return r(this.#e,e)}from(e,t){let i=this.indexOf(e);if(-1===i)return;let s=i+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){let i=this.indexOf(e);if(-1===i)return;let s=i+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let i=0;for(let s of this){if(Reflect.apply(e,t,[s,i,this]))return s;i++}}findIndex(e,t){let i=0;for(let s of this){if(Reflect.apply(e,t,[s,i,this]))return i;i++}return -1}filter(t,i){let s=[],a=0;for(let e of this)Reflect.apply(t,i,[e,a,this])&&s.push(e),a++;return new e(s)}map(t,i){let s=[],a=0;for(let e of this)s.push([e[0],Reflect.apply(t,i,[e,a,this])]),a++;return new e(s)}reduce(...e){let[t,i]=e,s=0,a=i??this.at(0);for(let i of this)a=0===s&&1===e.length?i:Reflect.apply(t,this,[a,i,s,this]),s++;return a}reduceRight(...e){let[t,i]=e,s=i??this.at(-1);for(let i=this.size-1;i>=0;i--){let a=this.at(i);s=i===this.size-1&&1===e.length?a:Reflect.apply(t,this,[s,a,i,this])}return s}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let i=this.keyAt(e),s=this.get(i);t.set(i,s)}return t}toSpliced(...t){let i=[...this.entries()];return i.splice(...t),new e(i)}slice(t,i){let s=new e,a=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==i&&i>0&&(a=i-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),i=this.get(t);s.set(t,i)}return s}every(e,t){let i=0;for(let s of this){if(!Reflect.apply(e,t,[s,i,this]))return!1;i++}return!0}some(e,t){let i=0;for(let s of this){if(Reflect.apply(e,t,[s,i,this]))return!0;i++}return!1}}),e.s(["createCollection",0,function(e){let o=e+"CollectionProvider",[r,l]=(0,i.createContextScope)(o),[c,d]=r(o,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:i,children:s}=e,a=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,n.jsx)(c,{scope:i,itemMap:o,collectionRef:a,children:s})};u.displayName=o;let p=e+"CollectionSlot",m=(0,a.createSlot)(p),h=t.default.forwardRef((e,t)=>{let{scope:i,children:a}=e,o=d(p,i),r=(0,s.useComposedRefs)(t,o.collectionRef);return(0,n.jsx)(m,{ref:r,children:a})});h.displayName=p;let x=e+"CollectionItemSlot",f="data-radix-collection-item",v=(0,a.createSlot)(x),g=t.default.forwardRef((e,i)=>{let{scope:a,children:o,...r}=e,l=t.default.useRef(null),c=(0,s.useComposedRefs)(i,l),u=d(x,a);return t.default.useEffect(()=>(u.itemMap.set(l,{ref:l,...r}),()=>void u.itemMap.delete(l))),(0,n.jsx)(v,{...{[f]:""},ref:c,children:o})});return g.displayName=x,[{Provider:u,Slot:h,ItemSlot:g},function(i){let s=d(e+"CollectionConsumer",i);return t.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(s.itemMap.values()).sort((e,i)=>t.indexOf(e.ref.current)-t.indexOf(i.ref.current))},[s.collectionRef,s.itemMap])},l]}],41986);var c=t.createContext(void 0);e.s(["useDirection",0,function(e){let i=t.useContext(c);return e||i||"ltr"}],25486)},77275,e=>{"use strict";var t=e.i(79923),i=e.i(91967),s=e.i(41986),a=e.i(67928),n=e.i(43250),o=e.i(33616),r=e.i(80939),l=e.i(36131),c=e.i(17256),d=e.i(25486),u=e.i(66499),p="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[x,f,v]=(0,s.createCollection)(h),[g,b]=(0,n.createContextScope)(h,[v]),[y,k]=g(h),j=t.forwardRef((e,t)=>(0,u.jsx)(x.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(x.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(C,{...e,ref:t})})}));j.displayName=h;var C=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:n,orientation:o,loop:x=!1,dir:v,currentTabStopId:g,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:k,onEntryFocus:j,preventScrollOnEntryFocus:C=!1,...w}=e,S=t.useRef(null),N=(0,a.useComposedRefs)(s,S),R=(0,d.useDirection)(v),[P,E]=(0,c.useControllableState)({prop:g,defaultProp:b??null,onChange:k,caller:h}),[L,D]=t.useState(!1),I=(0,l.useCallbackRef)(j),A=f(n),H=t.useRef(!1),[z,K]=t.useState(0);return t.useEffect(()=>{let e=S.current;if(e)return e.addEventListener(p,I),()=>e.removeEventListener(p,I)},[I]),(0,u.jsx)(y,{scope:n,orientation:o,dir:R,loop:x,currentTabStopId:P,onItemFocus:t.useCallback(e=>E(e),[E]),onItemShiftTab:t.useCallback(()=>D(!0),[]),onFocusableItemAdd:t.useCallback(()=>K(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>K(e=>e-1),[]),children:(0,u.jsx)(r.Primitive.div,{tabIndex:L||0===z?-1:0,"data-orientation":o,...w,ref:N,style:{outline:"none",...e.style},onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,()=>{H.current=!0}),onFocus:(0,i.composeEventHandlers)(e.onFocus,e=>{let t=!H.current;if(e.target===e.currentTarget&&t&&!L){let t=new CustomEvent(p,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=A().filter(e=>e.focusable);T([e.find(e=>e.active),e.find(e=>e.id===P),...e].filter(Boolean).map(e=>e.ref.current),C)}}H.current=!1}),onBlur:(0,i.composeEventHandlers)(e.onBlur,()=>D(!1))})})}),w="RovingFocusGroupItem",S=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:a,focusable:n=!0,active:l=!1,tabStopId:c,children:d,...p}=e,m=(0,o.useId)(),h=c||m,v=k(w,a),g=v.currentTabStopId===h,b=f(a),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:C}=v;return t.useEffect(()=>{if(n)return y(),()=>j()},[n,y,j]),(0,u.jsx)(x.ItemSlot,{scope:a,id:h,focusable:n,active:l,children:(0,u.jsx)(r.Primitive.span,{tabIndex:g?0:-1,"data-orientation":v.orientation,...p,ref:s,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{n?v.onItemFocus(h):e.preventDefault()}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,i){var s;let a=(s=e.key,"rtl"!==i?s:"ArrowLeft"===s?"ArrowRight":"ArrowRight"===s?"ArrowLeft":s);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return N[a]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var i,s;"prev"===t&&a.reverse();let n=a.indexOf(e.currentTarget);a=v.loop?(i=a,s=n+1,i.map((e,t)=>i[(s+t)%i.length])):a.slice(n+1)}setTimeout(()=>T(a))}}),children:"function"==typeof d?d({isCurrentTabStop:g,hasTabStop:null!=C}):d})})});S.displayName=w;var N={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e,t=!1){let i=document.activeElement;for(let s of e)if(s===i||(s.focus({preventScroll:t}),document.activeElement!==i))return}e.s(["Item",0,S,"Root",0,j,"createRovingFocusGroupScope",0,b])},12057,e=>{"use strict";var t=e.i(66499),i=e.i(94237),s=e.i(79923),a=e.i(91967),n=e.i(43250),o=e.i(77275),r=e.i(90088),l=e.i(80939),c=e.i(25486),d=e.i(17256),u=e.i(33616),p="Tabs",[m,h]=(0,n.createContextScope)(p,[o.createRovingFocusGroupScope]),x=(0,o.createRovingFocusGroupScope)(),[f,v]=m(p),g=s.forwardRef((e,i)=>{let{__scopeTabs:s,value:a,onValueChange:n,defaultValue:o,orientation:r="horizontal",dir:m,activationMode:h="automatic",...x}=e,v=(0,c.useDirection)(m),[g,b]=(0,d.useControllableState)({prop:a,onChange:n,defaultProp:o??"",caller:p});return(0,t.jsx)(f,{scope:s,baseId:(0,u.useId)(),value:g,onValueChange:b,orientation:r,dir:v,activationMode:h,children:(0,t.jsx)(l.Primitive.div,{dir:v,"data-orientation":r,...x,ref:i})})});g.displayName=p;var b="TabsList",y=s.forwardRef((e,i)=>{let{__scopeTabs:s,loop:a=!0,...n}=e,r=v(b,s),c=x(s);return(0,t.jsx)(o.Root,{asChild:!0,...c,orientation:r.orientation,dir:r.dir,loop:a,children:(0,t.jsx)(l.Primitive.div,{role:"tablist","aria-orientation":r.orientation,...n,ref:i})})});y.displayName=b;var k="TabsTrigger",j=s.forwardRef((e,i)=>{let{__scopeTabs:s,value:n,disabled:r=!1,...c}=e,d=v(k,s),u=x(s),p=S(d.baseId,n),m=N(d.baseId,n),h=n===d.value;return(0,t.jsx)(o.Item,{asChild:!0,...u,focusable:!r,active:h,children:(0,t.jsx)(l.Primitive.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:p,...c,ref:i,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{r||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(n)}),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(n)}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;h||r||!e||d.onValueChange(n)})})})});j.displayName=k;var C="TabsContent",w=s.forwardRef((e,i)=>{let{__scopeTabs:a,value:n,forceMount:o,children:c,...d}=e,u=v(C,a),p=S(u.baseId,n),m=N(u.baseId,n),h=n===u.value,x=s.useRef(h);return s.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(r.Presence,{present:o||h,children:({present:s})=>(0,t.jsx)(l.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":p,hidden:!s,id:m,tabIndex:0,...d,ref:i,style:{...e.style,animationDuration:x.current?"0s":void 0},children:s&&c})})});function S(e,t){return`${e}-trigger-${t}`}function N(e,t){return`${e}-content-${t}`}w.displayName=C,e.s(["Content",0,w,"List",0,y,"Root",0,g,"Tabs",0,g,"TabsContent",0,w,"TabsList",0,y,"TabsTrigger",0,j,"Trigger",0,j,"createTabsScope",0,h],73558);var T=e.i(73558),T=T,R=e.i(65458);let P=(0,i.cva)("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:i="horizontal",...s}){return(0,t.jsx)(T.Root,{"data-slot":"tabs","data-orientation":i,orientation:i,className:(0,R.cn)("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...s})},"TabsContent",0,function({className:e,...i}){return(0,t.jsx)(T.Content,{"data-slot":"tabs-content",className:(0,R.cn)("flex-1 outline-none",e),...i})},"TabsList",0,function({className:e,variant:i="default",...s}){return(0,t.jsx)(T.List,{"data-slot":"tabs-list","data-variant":i,className:(0,R.cn)(P({variant:i}),e),...s})},"TabsTrigger",0,function({className:e,...i}){return(0,t.jsx)(T.Trigger,{"data-slot":"tabs-trigger",className:(0,R.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-[background-color,border-color,color,box-shadow,opacity] group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...i})}],12057)},92608,e=>{"use strict";var t=e.i(47721);e.s(["acceptAutomationSuggestion",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/suggestions/${encodeURIComponent(e)}/accept`,{method:"POST"})},"cancelRun",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/runs/${encodeURIComponent(e)}/cancel`,{method:"POST"})},"createAutomation",0,function(e){return(0,t.fetchJson)("/api/v1/copilot/automations",{method:"POST",body:JSON.stringify(e)})},"createConversation",0,function(e,i){return(0,t.fetchJson)("/api/v1/copilot/conversations",{method:"POST",body:JSON.stringify({...e?{title:e}:{},...i?{grantId:i}:{}})})},"decidePendingAction",0,function(e,i,s){return(0,t.fetchJson)(`/api/v1/copilot/runs/${encodeURIComponent(e)}/pending-actions/${encodeURIComponent(i)}/decide`,{method:"POST",body:JSON.stringify({approved:s})})},"deleteAutomation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}`,{method:"DELETE"})},"deleteConversation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}`,{method:"DELETE"})},"deleteMemoryEntry",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/memory/entries/${encodeURIComponent(e)}`,{method:"DELETE"})},"dismissAutomationSuggestion",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/suggestions/${encodeURIComponent(e)}/dismiss`,{method:"POST"})},"editMessage",0,function(e,i,s){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/edit-message`,{method:"POST",body:JSON.stringify({messageId:i,content:s})})},"enableAutomation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}/enable`,{method:"POST"})},"getCopilotCapabilities",0,function(){return(0,t.fetchJson)("/api/v1/copilot/capabilities")},"getRun",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/runs/${encodeURIComponent(e)}`)},"listAutomationSuggestions",0,function(){return(0,t.fetchJson)("/api/v1/copilot/automations/suggestions")},"listAutomations",0,function(){return(0,t.fetchJson)("/api/v1/copilot/automations")},"listConversationRuns",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/runs`)},"listConversations",0,function(){return(0,t.fetchJson)("/api/v1/copilot/conversations")},"listMemoryEntries",0,function(e={}){let i=new URLSearchParams;return e.scope&&i.set("scope",e.scope),e.projectId&&i.set("projectId",e.projectId),e.limit&&i.set("limit",String(e.limit)),(0,t.fetchJson)(`/api/v1/copilot/memory/entries?${i.toString()}`)},"listMessages",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/messages`)},"pauseAutomation",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}/pause`,{method:"POST"})},"renameConversation",0,function(e,i){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify({title:i})})},"runAutomationNow",0,function(e){return(0,t.fetchJson)(`/api/v1/copilot/automations/${encodeURIComponent(e)}/run`,{method:"POST"})},"sendMessage",0,function(e,i,s,a){return(0,t.fetchJson)(`/api/v1/copilot/conversations/${encodeURIComponent(e)}/messages`,{method:"POST",body:JSON.stringify({content:i,...s?{modelId:s}:{},...a})})},"setCopilotToolEnabled",0,function(e,i){return(0,t.fetchJson)(`/api/v1/copilot/capabilities/${encodeURIComponent(e)}/enabled`,{method:"PUT",body:JSON.stringify({enabled:i})})}])},34558,e=>{"use strict";let t=(0,e.i(65174).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],34558)},71326,e=>{"use strict";let t=(0,e.i(65174).default)("ShieldCheck",[["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 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,t],71326)},83540,96588,84959,4484,e=>{"use strict";var t=e.i(65174);let i=(0,t.default)("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["CalendarClock",0,i],83540);let s=(0,t.default)("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",0,s],96588);let a=(0,t.default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);e.s(["Radio",0,a],84959);let n=(0,t.default)("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);e.s(["SlidersHorizontal",0,n],4484)},42831,e=>{"use strict";var t=e.i(35887);let i={capabilities:{"project.create":"创建项目","project.metadata.update":"更新项目资料","pm.work_item.create":"创建工作项","pm.work_item.metadata":"更新工作项资料","pm.management.update":"更新负责人及下一步","pm.task.prepare":"准备任务","session.start":"启动会话","session.stop":"停止会话","memory.write":"写入记忆"},navAriaLabel:"Copilot 设置导航",navGeneral:"常规",navAccess:"授权",navExtensions:"扩展",navChannels:"远程渠道",navAutomations:"自动化",backToChat:"返回对话",accessCardTitle:"授权",accessCardDescription:"决定 Copilot 可以在哪些项目里执行哪些操作,以及次数与有效期。",channelsCardTitle:"远程渠道",channelsCardDescription:"配置飞书远程操作:应用接入、身份确认与授权绑定。",manageModels:"管理模型",accessTitle:"授权与项目权限",accessDescription:"授权决定 Copilot 可以在哪些项目内执行哪些操作。所有写操作都受授权约束,可随时撤销。",howTitle:"授权如何工作",howStep1:"选择项目与允许的操作",howStep2:"设置有效期、次数与并发上限",howStep3:"绑定到新会话,Copilot 在范围内工作",howNote:"撤销授权立即停止后续操作,已发生的操作保留记录。授权绑定会话后不可切换。",grantsTitle:"项目授权",grantsDescription:"每个授权限定一组项目和允许的操作,用于绑定新会话。",newGrant:"新建授权",loading:"正在加载授权…",loadError:"授权加载失败",retry:"重试",empty:"尚未创建授权。新建一个授权,让 Copilot 在指定项目内为你工作。",boundPrefix:"当前会话绑定:",statusActive:"有效",statusExpired:"已过期",statusRevoked:"已撤销",usageActions:"操作次数",concurrency:"最大并发",expiry:"到期",permanent:"长期有效,直至撤销",unlimited:"不限",startConversation:"以此授权新建会话",revoke:"撤销授权",deleteGrant:"删除授权",showRevoked:"查看已撤销授权",hideRevoked:"收起已撤销授权",revokedHelp:"删除后不再出现在列表中,历史会话和操作记录仍保留。",projectsEmpty:"无现有项目",createTitle:"新建授权",createDescription:"选择项目即可创建:默认允许所选项目的全部可授权操作,长期有效,直至撤销。",stepProjects:"项目范围",stepPermissions:"权限范围",stepLimits:"有效期与限额",nameLabel:"授权名称(可选)",namePlaceholder:"按所选项目自动命名",allOperations:"允许所有当前可授权操作",allOperationsHelp:"目录权限仅限所选项目目录内。未来新增操作和新建项目不会自动加入授权。",customOperationsHelp:"自定义模式按填写的根目录授权。未来新增操作和新建项目不会自动加入授权。",allowedRootsLabel:"允许创建项目的根目录(每行一个绝对路径)",permanentLabel:"长期有效,直到撤销",unlimitedLabel:"不限制累计操作次数",hoursLabel:"有效小时",limitLabel:"操作次数上限",concurrencyLabel:"最大并发",advanced:"高级设置(可选)",create:"创建授权",creating:"正在创建…",created:"授权已创建,可在授权列表中使用。",cancel:"取消",errorGeneric:"操作失败,请重试",errNoProject:"请至少选择一个项目。",errNoOperation:"请至少选择一项允许操作,或开启所有操作。",errNoRoots:"请填写允许创建项目的目录,或切换为默认的所有操作。",errConcurrency:"最大并发须为 1–20。",errHours:"有效小时须为 1–8760。",errLimit:"操作次数上限须为 1–10000。",errCreate:"创建失败,请重试。"},s={capabilities:{"project.create":"Create projects","project.metadata.update":"Update project metadata","pm.work_item.create":"Create work items","pm.work_item.metadata":"Update work item metadata","pm.management.update":"Update owner and next step","pm.task.prepare":"Prepare tasks","session.start":"Start sessions","session.stop":"Stop sessions","memory.write":"Write memory"},navAriaLabel:"Copilot settings navigation",navGeneral:"General",navAccess:"Access",navExtensions:"Extensions",navChannels:"Channels",navAutomations:"Automations",backToChat:"Back to chat",accessCardTitle:"Access",accessCardDescription:"Decide which projects Copilot may act on, which operations are allowed, and the usage limits.",channelsCardTitle:"Channels",channelsCardDescription:"Set up Feishu remote operation: app connection, identity confirmation, and grant binding.",manageModels:"Manage models",accessTitle:"Access and project permissions",accessDescription:"Grants decide which projects Copilot may act on and which operations are allowed. Every write operation is constrained by a grant and can be revoked at any time.",howTitle:"How grants work",howStep1:"Pick projects and allowed operations",howStep2:"Set expiry, action, and concurrency limits",howStep3:"Bind to a new conversation and let Copilot work in scope",howNote:"Revoking a grant stops further actions immediately; completed actions stay on record. A grant-bound conversation cannot switch grants.",grantsTitle:"Project grants",grantsDescription:"Each grant scopes a set of projects and allowed operations, and binds to a new conversation.",newGrant:"New grant",loading:"Loading grants…",loadError:"Failed to load grants",retry:"Retry",empty:"No grants yet. Create one to let Copilot work inside the projects you choose.",boundPrefix:"Current conversation bound to: ",statusActive:"Active",statusExpired:"Expired",statusRevoked:"Revoked",usageActions:"Actions",concurrency:"Max concurrency",expiry:"Expires",permanent:"Valid until revoked",unlimited:"Unlimited",startConversation:"Start a conversation with this grant",revoke:"Revoke grant",deleteGrant:"Delete grant",showRevoked:"Show revoked grants",hideRevoked:"Hide revoked grants",revokedHelp:"Deleted grants disappear from this list; historical conversations and action records are kept.",projectsEmpty:"No existing projects",createTitle:"New grant",createDescription:"Pick projects to create a grant: all currently grantable operations on the selected projects are allowed by default, valid until revoked.",stepProjects:"Project scope",stepPermissions:"Permissions",stepLimits:"Expiry and limits",nameLabel:"Grant name (optional)",namePlaceholder:"Named after the selected projects",allOperations:"Allow all currently grantable operations",allOperationsHelp:"Directory access stays within the selected projects. New operations and new projects are not added automatically.",customOperationsHelp:"Custom mode grants the root directories you enter. New operations and new projects are not added automatically.",allowedRootsLabel:"Root directories allowed for project creation (one absolute path per line)",permanentLabel:"Valid until revoked",unlimitedLabel:"Unlimited total actions",hoursLabel:"Valid hours",limitLabel:"Action limit",concurrencyLabel:"Max concurrency",advanced:"Advanced (optional)",create:"Create grant",creating:"Creating…",created:"Grant created. It is now available in the grant list.",cancel:"Cancel",errorGeneric:"Action failed. Please retry.",errNoProject:"Select at least one project.",errNoOperation:"Select at least one allowed operation, or enable all operations.",errNoRoots:"Enter the directories allowed for project creation, or switch back to all operations.",errConcurrency:"Max concurrency must be 1–20.",errHours:"Valid hours must be 1–8760.",errLimit:"Action limit must be 1–10000.",errCreate:"Creation failed. Please retry."},a={...i,capabilities:{"project.create":"建立專案","project.metadata.update":"更新專案資料","pm.work_item.create":"建立工作項目","pm.work_item.metadata":"更新工作項目資料","pm.management.update":"更新負責人及下一步","pm.task.prepare":"準備任務","session.start":"啟動工作階段","session.stop":"停止工作階段","memory.write":"寫入記憶"},navAriaLabel:"Copilot 設定導覽",navGeneral:"一般",navAccess:"授權",navExtensions:"擴充",navChannels:"遠端渠道",navAutomations:"自動化",backToChat:"返回對話",accessCardTitle:"授權",accessCardDescription:"決定 Copilot 可以在哪些專案裡執行哪些操作,以及次數與有效期。",channelsCardTitle:"遠端渠道",channelsCardDescription:"設定飛書遠端操作:應用接入、身份確認與授權綁定。",manageModels:"管理模型",accessTitle:"授權與專案權限",accessDescription:"授權決定 Copilot 可以在哪些專案內執行哪些操作。所有寫入操作都受授權約束,可隨時撤銷。",howTitle:"授權如何運作",howStep1:"選擇專案與允許的操作",howStep2:"設定有效期、次數與並發上限",howStep3:"綁定到新對話,Copilot 在範圍內工作",howNote:"撤銷授權立即停止後續操作,已發生的操作保留記錄。授權綁定對話後不可切換。",grantsTitle:"專案授權",grantsDescription:"每個授權限定一組專案和允許的操作,用於綁定新對話。",newGrant:"新增授權",loading:"正在載入授權…",loadError:"授權載入失敗",retry:"重試",empty:"尚未建立授權。新增一個授權,讓 Copilot 在指定專案內為你工作。",boundPrefix:"目前對話綁定:",statusActive:"有效",statusExpired:"已過期",statusRevoked:"已撤銷",usageActions:"操作次數",concurrency:"最大並發",expiry:"到期",permanent:"長期有效,直至撤銷",unlimited:"不限",startConversation:"以此授權新增對話",revoke:"撤銷授權",deleteGrant:"刪除授權",showRevoked:"查看已撤銷授權",hideRevoked:"收起已撤銷授權",revokedHelp:"刪除後不再出現在列表中,歷史對話和操作記錄仍保留。",projectsEmpty:"無現有專案",createTitle:"新增授權",createDescription:"選擇專案即可建立:預設允許所選專案的全部可授權操作,長期有效,直至撤銷。",stepProjects:"專案範圍",stepPermissions:"權限範圍",stepLimits:"有效期與限額",nameLabel:"授權名稱(可選)",namePlaceholder:"按所選專案自動命名",allOperations:"允許所有目前可授權操作",allOperationsHelp:"目錄權限僅限所選專案目錄內。未來新增操作和新建專案不會自動加入授權。",customOperationsHelp:"自訂模式按填寫的根目錄授權。未來新增操作和新建專案不會自動加入授權。",allowedRootsLabel:"允許建立專案的根目錄(每行一個絕對路徑)",permanentLabel:"長期有效,直到撤銷",unlimitedLabel:"不限制累計操作次數",hoursLabel:"有效小時",limitLabel:"操作次數上限",concurrencyLabel:"最大並發",advanced:"進階設定(可選)",create:"建立授權",creating:"正在建立…",created:"授權已建立,可在授權列表中使用。",cancel:"取消",errorGeneric:"操作失敗,請重試",errNoProject:"請至少選擇一個專案。",errNoOperation:"請至少選擇一項允許操作,或開啟所有操作。",errNoRoots:"請填寫允許建立專案的目錄,或切換為預設的所有操作。",errConcurrency:"最大並發須為 1–20。",errHours:"有效小時須為 1–8760。",errLimit:"操作次數上限須為 1–10000。",errCreate:"建立失敗,請重試。"};e.s(["useSettingsCopy",0,function(){let{language:e}=(0,t.useLanguage)();return"en"===e?s:"zh-TW"===e?a:i}])},63134,e=>{"use strict";var t=e.i(66499),i=e.i(41271),s=e.i(86059),a=e.i(34558),n=e.i(83540),o=e.i(96588),r=e.i(84959),l=e.i(71326),c=e.i(4484),d=e.i(60218),u=e.i(42831);e.s(["CopilotSettingsShell",0,function({active:e,title:p,description:m,children:h}){let x,f=(0,u.useSettingsCopy)(),v=(0,s.useRouter)(),g=(x=(0,u.useSettingsCopy)(),[{key:"general",href:"/copilot/settings",icon:c.SlidersHorizontal,label:x.navGeneral},{key:"access",href:"/copilot/settings/access",icon:l.ShieldCheck,label:x.navAccess},{key:"extensions",href:"/copilot/extensions",icon:o.Puzzle,label:x.navExtensions},{key:"channels",href:"/copilot/channels",icon:r.Radio,label:x.navChannels},{key:"automations",href:"/copilot/automations",icon:n.CalendarClock,label:x.navAutomations}]);return(0,t.jsxs)("div",{className:"mx-auto flex h-full w-full max-w-6xl flex-col gap-5 overflow-y-auto p-4 md:p-6",children:[(0,t.jsxs)("header",{className:"forgebadger-animate-in flex items-start gap-2 pl-12 md:pl-0",children:[(0,t.jsx)(d.Button,{variant:"ghost",size:"icon","aria-label":f.backToChat,title:f.backToChat,onClick:()=>v.push("/copilot"),children:(0,t.jsx)(a.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-lg font-semibold",children:p}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:m})]})]}),(0,t.jsxs)("div",{className:"flex min-h-0 flex-col gap-5 md:flex-row md:gap-8",children:[(0,t.jsx)("nav",{"aria-label":f.navAriaLabel,className:"forgebadger-animate-in flex shrink-0 gap-1 overflow-x-auto pb-1 md:w-44 md:flex-col md:overflow-visible md:pb-0",style:{animationDelay:"60ms"},children:g.map(s=>{let a=s.icon,n=s.key===e;return(0,t.jsxs)(i.default,{href:s.href,"aria-current":n?"page":void 0,className:`flex items-center gap-2 rounded-md px-3 py-2 text-sm whitespace-nowrap transition-colors ${n?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"}`,children:[(0,t.jsx)(a,{className:`size-4 shrink-0 ${n?"text-brand":""}`}),s.label]},s.key)})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:h})]})]})}])},89176,e=>{"use strict";let t=(0,e.i(65174).default)("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);e.s(["Plug",0,t],89176)},41081,99831,e=>{"use strict";var t=e.i(66499),i=e.i(79923),s=e.i(85426),a=e.i(78717),n=e.i(6270),o=e.i(44269),r=e.i(9939),l=e.i(62918),c=e.i(81622),d=e.i(26624),u=e.i(35887),p=e.i(47721),m=e.i(92608);let h="/api/v1/copilot",x=e=>`${h}/skills/${encodeURIComponent(e)}`,f=e=>`${h}/connections/${encodeURIComponent(e)}`,v=["copilot","skills"];e.s(["copilotConnectionsKey",0,["copilot","connections"],"copilotSkillsKey",0,v,"createCopilotConnection",0,e=>(0,p.fetchJson)(`${h}/connections`,{method:"POST",body:JSON.stringify(e)}),"deleteCopilotConnection",0,(e,t)=>(0,p.fetchJson)(`${f(e)}?revision=${t}`,{method:"DELETE"}),"discoverCopilotConnection",0,(e,t)=>(0,p.fetchJson)(`${f(e)}/discover`,{method:"POST",body:JSON.stringify({revision:t})}),"getCopilotSkill",0,e=>(0,p.fetchJson)(x(e)),"getSkillRevision",0,(e,t)=>(0,p.fetchJson)(`${x(e)}/revisions/${encodeURIComponent(t)}`),"importCopilotSkill",0,e=>(0,p.fetchJson)(`${h}/skills/imports`,{method:"POST",body:JSON.stringify(e)}),"listCopilotConnections",0,()=>(0,p.fetchJson)(`${h}/connections`),"listCopilotSkills",0,()=>(0,p.fetchJson)(`${h}/skills`),"listSkillRevisions",0,e=>(0,p.fetchJson)(`${x(e)}/revisions`),"rollbackCopilotSkill",0,(e,t,i)=>(0,p.fetchJson)(`${x(e)}/rollback`,{method:"POST",body:JSON.stringify({revisionId:t,expectedRevisionId:i})}),"setCopilotSkillEnabled",0,(e,t,i)=>(0,p.fetchJson)(`${x(e)}/enabled`,{method:"PUT",body:JSON.stringify({enabled:t,expectedRevisionId:i})}),"updateCopilotConnection",0,(e,t)=>(0,p.fetchJson)(f(e),{method:"PUT",body:JSON.stringify(t)}),"updateCopilotSkill",0,(e,t)=>(0,p.fetchJson)(x(e),{method:"PUT",body:JSON.stringify(t)})],99831);let g=["model-providers"],b=["copilot","capabilities"];function y({title:e,tools:i,pending:s,onToggle:a}){return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold tracking-wide text-muted-foreground/70 uppercase",children:e}),i.map(e=>(0,t.jsx)(k,{tool:e,pending:s,onToggle:t=>a(e.name,t)},e.name))]})}function k({tool:e,pending:i,onToggle:s}){let{t:a}=(0,u.useLanguage)(),n=`copilot.toolDesc.${e.name}`,o=a(n),c=o===n?e.description:o;return(0,t.jsxs)("div",{className:`flex items-start justify-between gap-3 rounded-md border border-border/70 bg-card px-3 py-2 transition-opacity ${e.enabled&&e.available?"":"opacity-60"}`,"data-testid":`tool-row-${e.name}`,children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-1.5 text-xs font-medium",children:[(0,t.jsx)(r.Wrench,{className:"size-3 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,t.jsx)("span",{className:"font-mono",children:e.name}),"operate"===e.risk?(0,t.jsx)(l.Badge,{variant:"outline",className:"border-amber-500/50 px-1 py-0 text-[10px] text-amber-500",children:"operate"}):null,e.requiresApproval&&e.available?(0,t.jsx)(l.Badge,{variant:"outline",className:"px-1 py-0 text-[10px] text-muted-foreground",children:a("copilot.toolAuthorization")}):null]}),(0,t.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:c}),e.available?null:(0,t.jsxs)("p",{className:"text-xs text-amber-500",children:[a("copilot.toolUnavailable"),": ",e.unavailableReason??a("copilot.toolUnavailable")]})]}),(0,t.jsx)(d.Switch,{"aria-label":e.name,size:"sm",className:"mt-0.5 shrink-0",disabled:i||!e.available,checked:e.enabled,onCheckedChange:s})]})}e.s(["CapabilitiesSection",0,function({active:e}){let{t:r}=(0,u.useLanguage)(),l=(0,n.useQueryClient)(),[d,p]=(0,i.useState)(null),[h,x]=(0,i.useState)(""),f=(0,a.useQuery)({queryKey:b,queryFn:m.getCopilotCapabilities,enabled:e,retry:!1}),g=(0,s.useMutation)({mutationFn:({name:e,enabled:t})=>(0,m.setCopilotToolEnabled)(e,t),onSuccess:()=>{p(null),l.invalidateQueries({queryKey:b}),l.invalidateQueries({queryKey:v})},onError:()=>p(r("copilot.capabilitiesToggleError"))}),k=f.data?.tools??[],j=h.trim().toLowerCase(),C=j?k.filter(e=>`${e.name} ${e.description}`.toLowerCase().includes(j)):k,w=C.filter(e=>"operate"===e.risk),S=C.filter(e=>"operate"!==e.risk);return(0,t.jsxs)("section",{className:"space-y-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:r("copilot.capabilities")}),f.isPending||f.isError||!(k.length>0)?null:(0,t.jsxs)("div",{className:"relative w-48 max-w-full",children:[(0,t.jsx)(o.Search,{className:"absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),(0,t.jsx)(c.Input,{value:h,onChange:e=>x(e.target.value),placeholder:r("copilot.toolsSearch"),className:"h-8 pl-8 text-xs"})]})]}),f.isPending?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:r("common.loading")}):f.isError?(0,t.jsx)("p",{className:"text-xs text-destructive",children:r("copilot.capabilitiesLoadError")}):0===k.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:r("copilot.capabilitiesEmpty")}):0===C.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:r("copilot.toolsSearchEmpty")}):(0,t.jsxs)("div",{className:"space-y-3",children:[w.length>0?(0,t.jsx)(y,{title:r("copilot.toolGroupOperate"),tools:w,pending:g.isPending,onToggle:(e,t)=>g.mutate({name:e,enabled:t})}):null,S.length>0?(0,t.jsx)(y,{title:r("copilot.toolGroupRead"),tools:S,pending:g.isPending,onToggle:(e,t)=>g.mutate({name:e,enabled:t})}):null]}),d&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:d})]})},"CopilotStatusBar",0,function(){let{t:e}=(0,u.useLanguage)(),i=(0,a.useQuery)({queryKey:g,queryFn:p.listModelProviders}),s=(i.data?.models??[]).filter(e=>"disabled"!==e.status),n=s.find(e=>e.isDefault)??s[0],o=n?`${n.providerName} / ${n.name}`:e("copilot.followSystemDefault");return(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b px-4 py-1.5 text-xs text-muted-foreground","data-testid":"copilot-status-bar",children:[(0,t.jsx)("span",{className:"shrink-0",children:e("copilot.currentModel")}),(0,t.jsx)("span",{className:"truncate",children:o}),(0,t.jsxs)(l.Badge,{variant:"secondary",className:"ml-auto gap-1.5 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500"}),e("copilot.nativeRuntime")]})]})},"modelProvidersQueryKey",0,g],41081)},15044,e=>{"use strict";var t=e.i(35887);let i={clearCredential:"移除已保存凭证",title:"Copilot 扩展",description:"安装 Skills,连接工具服务,扩展 Copilot 的工作能力。",back:"返回设置",skills:"Skills",connections:"Connections",loading:"加载中...",retry:"重试",cancel:"取消",save:"保存",close:"关闭",error:"操作失败。请重试;如配置或版本已变化,请刷新后重新核对。",loadError:"加载失败,请重试。",skillsHelp:"Skills 提供操作指引和参考文件。这里的启用状态独立于 CLI Skills。",emptySkills:"尚未安装 Skill。",importSkill:"导入 Skill",builtin:"内置",imported:"已导入",playbook:"内置 Playbook",enabled:"已启用",disabled:"已停用",unavailable:"当前不可用",incompatible:"不兼容",review:"需要核对版本",dependencies:"依赖工具",detail:"详情与版本",source:"来源",files:"文件",version:"版本",history:"版本记录",saveSkill:"保存完整文件包",rollback:"回滚到此版本",rollbackConfirm:"确认回滚",rollbackHelp:"回滚将创建新的完整文件包版本,并保留现有历史。",noHistory:"暂无版本记录。",builtinReview:"保存表示已核对当前内置版本。编辑后的内容仅用于所有者对话,项目授权对话继续使用可信内置内容。",paste:"粘贴 SKILL.md",upload:"选择文件包",url:"公开 raw URL",importMethod:"导入方式",chooseFiles:"选择文件",chooseFolder:"选择文件夹",importHelp:"文件包需包含根目录 SKILL.md。支持最多 65 个 UTF-8 文本文件、每文件 128 KiB、总计 1 MiB。脚本及执行型扩展会标为不兼容。",fileError:"文件包无效:请检查根目录 SKILL.md、UTF-8 编码、路径及大小限制。",urlHelp:"公开 HTTPS raw URL 导入单个 SKILL.md;配套文件请通过文件包一并导入。",install:"导入并保留为停用",edit:"编辑",importContent:"SKILL.md 正文",selectedFiles:"已选择文件",connectionsHelp:"Connection 提供 Copilot 可调用的工具。工具启用状态在各 Connection 中管理。",builtinHelp:"ForgeBadger 平台内置工具,沿用现有项目授权和逐项审批。",manageTools:"管理工具",addConnection:"添加 MCP Connection",emptyConnections:"尚未添加外部 Connection。",name:"名称",endpoint:"HTTPS 端点",bearer:"Bearer Token(可选,仅写入)",credentialSet:"凭证已配置",credentialKeep:"留空保留已有凭证",connectHelp:"支持公开 HTTPS 的 MCP Streamable HTTP 服务。创建后先发现工具,再明确选择允许 Copilot 使用的工具。",remoteApproval:"外部工具调用需逐项审批;项目授权和定时任务不会自动获得调用权限。",discover:"发现工具",notDiscovered:"尚未发现工具",noTools:"服务未返回工具。",selectTools:"选择工具",saveTools:"保存工具选择",delete:"删除",deleteConfirm:"确认删除此 Connection?",editConnection:"编辑连接",create:"创建连接",tools:"工具",configurationHelp:"更换端点或凭证会清空已发现工具,需要重新发现并选择。",schema:"输入参数",revision:"修订",refreshing:"处理中..."},s={clearCredential:"Remove saved credential",title:"Copilot extensions",description:"Install Skills and connect tool services to extend Copilot.",back:"Back to settings",skills:"Skills",connections:"Connections",loading:"Loading...",retry:"Retry",cancel:"Cancel",save:"Save",close:"Close",error:"Action failed. Retry, or refresh and review if the configuration or revision changed.",loadError:"Failed to load. Please retry.",skillsHelp:"Skills provide instructions and reference files. Their switches are independent from CLI Skills.",emptySkills:"No Skills installed.",importSkill:"Import Skill",builtin:"Built-in",imported:"Imported",playbook:"Built-in Playbook",enabled:"Enabled",disabled:"Disabled",unavailable:"Unavailable",incompatible:"Incompatible",review:"Version review required",dependencies:"Required tools",detail:"Details and versions",source:"Source",files:"Files",version:"Version",history:"Version history",saveSkill:"Save complete package",rollback:"Roll back to this version",rollbackConfirm:"Confirm rollback",rollbackHelp:"Rollback creates a new complete package revision and preserves existing history.",noHistory:"No revisions yet.",builtinReview:"Saving confirms review against the current bundled version. Edited content is for owner conversations; grant-bound conversations use trusted bundled content.",paste:"Paste SKILL.md",upload:"Select file bundle",url:"Public raw URL",importMethod:"Import method",chooseFiles:"Choose files",chooseFolder:"Choose folder",importHelp:"Include SKILL.md at the package root. Up to 65 UTF-8 text files, 128 KiB per file, 1 MiB total. Scripts and executable extensions are marked incompatible.",fileError:"Invalid package: check root SKILL.md, UTF-8 encoding, paths, and size limits.",urlHelp:"A public HTTPS raw URL imports one SKILL.md. Include supporting files through a file bundle.",install:"Import as disabled",edit:"Edit",importContent:"SKILL.md content",selectedFiles:"Selected files",connectionsHelp:"Connections provide callable tools. Manage tool switches within each Connection.",builtinHelp:"Built-in ForgeBadger platform tools retain project grants and exact approvals.",manageTools:"Manage tools",addConnection:"Add MCP Connection",emptyConnections:"No external Connections added.",name:"Name",endpoint:"HTTPS endpoint",bearer:"Bearer Token (optional, write-only)",credentialSet:"Credential configured",credentialKeep:"Leave blank to keep the saved credential",connectHelp:"Supports public HTTPS MCP Streamable HTTP services. Discover tools after creation, then explicitly select tools for Copilot.",remoteApproval:"External tool calls require exact approval. Project grants and scheduled tasks do not grant access.",discover:"Discover tools",notDiscovered:"Tools not discovered",noTools:"The service returned no tools.",selectTools:"Select tools",saveTools:"Save tool selection",delete:"Delete",deleteConfirm:"Delete this Connection?",editConnection:"Edit connection",create:"Create connection",tools:"Tools",configurationHelp:"Changing the endpoint or credential clears discovered tools. Discover and select them again.",schema:"Input schema",revision:"Revision",refreshing:"Working..."},a={...i,clearCredential:"移除已儲存憑證",title:"Copilot 擴充",description:"安裝 Skills,連接工具服務,擴充 Copilot 的工作能力。",back:"返回設定",loading:"載入中...",retry:"重試",save:"儲存",close:"關閉",error:"操作失敗。請重試;如設定或版本已變更,請重新整理後核對。",loadError:"載入失敗,請重試。",skillsHelp:"Skills 提供操作指引和參考檔案。這裡的啟用狀態獨立於 CLI Skills。",emptySkills:"尚未安裝 Skill。",importSkill:"匯入 Skill",builtin:"內建",imported:"已匯入",playbook:"內建 Playbook",enabled:"已啟用",review:"需要核對版本",dependencies:"依賴工具",detail:"詳情與版本",files:"檔案",history:"版本紀錄",saveSkill:"儲存完整檔案包",rollback:"還原到此版本",rollbackConfirm:"確認還原",rollbackHelp:"還原將建立新的完整檔案包版本,並保留現有歷史。",noHistory:"暫無版本紀錄。",builtinReview:"儲存表示已核對目前內建版本。編輯後的內容僅用於擁有者對話,專案授權對話繼續使用可信內建內容。",paste:"貼上 SKILL.md",upload:"選擇檔案包",importMethod:"匯入方式",chooseFiles:"選擇檔案",chooseFolder:"選擇資料夾",importHelp:"檔案包需包含根目錄 SKILL.md。支援最多 65 個 UTF-8 文字檔案、每檔案 128 KiB、總計 1 MiB。指令碼及執行型擴充會標為不相容。",fileError:"檔案包無效:請檢查根目錄 SKILL.md、UTF-8 編碼、路徑及大小限制。",urlHelp:"公開 HTTPS raw URL 匯入單個 SKILL.md;配套檔案請透過檔案包一併匯入。",install:"匯入並保留為停用",edit:"編輯",selectedFiles:"已選擇檔案",incompatible:"不相容",connectionsHelp:"Connection 提供 Copilot 可呼叫的工具。工具啟用狀態在各 Connection 中管理。",builtinHelp:"ForgeBadger 平台內建工具,沿用現有專案授權和逐項審核。",addConnection:"新增 MCP Connection",emptyConnections:"尚未新增外部 Connection。",name:"名稱",endpoint:"HTTPS 端點",bearer:"Bearer Token(可選,僅寫入)",credentialSet:"憑證已設定",credentialKeep:"留空保留已有憑證",connectHelp:"支援公開 HTTPS 的 MCP Streamable HTTP 服務。建立後先探索工具,再明確選擇允許 Copilot 使用的工具。",remoteApproval:"外部工具呼叫需逐項審核;專案授權和排程任務不會自動獲得呼叫權限。",discover:"探索工具",notDiscovered:"尚未探索工具",noTools:"服務未傳回工具。",selectTools:"選擇工具",saveTools:"儲存工具選擇",delete:"刪除",deleteConfirm:"確認刪除此 Connection?",editConnection:"編輯連線",create:"建立連線",configurationHelp:"更換端點或憑證會清空已探索工具,需要重新探索並選擇。",schema:"輸入參數",revision:"修訂",refreshing:"處理中..."};e.s(["useExtensionsCopy",0,function(){let{language:e}=(0,t.useLanguage)();return"en"===e?s:"zh-TW"===e?a:i}])},32148,e=>{"use strict";var t=e.i(66499),i=e.i(78717);let s=(0,e.i(65174).default)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);var a=e.i(89176),n=e.i(62918),o=e.i(12057),r=e.i(79923),l=e.i(6270),c=e.i(7329),d=e.i(9939),u=e.i(60218),p=e.i(9988),m=e.i(81622),h=e.i(26624),x=e.i(41081),f=e.i(15044),v=e.i(99831);function g(){let e=(0,f.useExtensionsCopy)(),[s,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(!1),m=(0,i.useQuery)({queryKey:v.copilotConnectionsKey,queryFn:v.listCopilotConnections,retry:!1}),h=m.data?.connections.filter(e=>"mcp"===e.kind)??[];return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.connectionsHelp}),(0,t.jsxs)(u.Button,{size:"sm",onClick:()=>a(!0),children:[(0,t.jsx)(c.Plus,{className:"size-4"}),e.addConnection]})]}),(0,t.jsxs)("section",{className:"forgebadger-animate-in space-y-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Wrench,{className:"size-4 text-brand"}),(0,t.jsx)("h2",{className:"font-medium",children:"ForgeBadger"}),(0,t.jsx)(n.Badge,{variant:"secondary",children:e.builtin})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.builtinHelp}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",onClick:()=>l(!0),children:e.manageTools})]}),m.isPending?(0,t.jsx)("p",{children:e.loading}):m.isError?(0,t.jsxs)("div",{role:"alert",className:"space-y-2 text-sm text-destructive",children:[(0,t.jsx)("p",{children:e.loadError}),(0,t.jsx)(u.Button,{variant:"outline",size:"sm",onClick:()=>void m.refetch(),children:e.retry})]}):0===h.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.emptyConnections}):h.map(e=>(0,t.jsx)(k,{connection:e},`${e.id}:${e.revision}`)),(0,t.jsx)(p.Dialog,{open:o,onOpenChange:l,children:(0,t.jsxs)(p.DialogContent,{className:"max-h-[85vh] overflow-y-auto sm:max-w-3xl",children:[(0,t.jsxs)(p.DialogHeader,{children:[(0,t.jsxs)(p.DialogTitle,{children:["ForgeBadger · ",e.tools]}),(0,t.jsx)(p.DialogDescription,{children:e.builtinHelp})]}),(0,t.jsx)(x.CapabilitiesSection,{active:o})]})}),(0,t.jsx)(p.Dialog,{open:s,onOpenChange:a,children:(0,t.jsxs)(p.DialogContent,{children:[(0,t.jsxs)(p.DialogHeader,{children:[(0,t.jsx)(p.DialogTitle,{children:e.addConnection}),(0,t.jsx)(p.DialogDescription,{children:e.connectHelp})]}),s&&(0,t.jsx)(y,{onDone:()=>a(!1)})]})})]})}function b(){let e=(0,l.useQueryClient)();return async()=>{await Promise.all([e.invalidateQueries({queryKey:v.copilotConnectionsKey}),e.invalidateQueries({queryKey:v.copilotSkillsKey})])}}function y({connection:e,onDone:i}){let s=(0,f.useExtensionsCopy)(),a=b(),[n,o]=(0,r.useState)(e?.name??""),[l,c]=(0,r.useState)(e?.endpoint??""),[d]=(0,r.useState)(e?.revision),[p,h]=(0,r.useState)(""),[x,g]=(0,r.useState)(!1),[k,j]=(0,r.useState)(!1),[C,w]=(0,r.useState)(!1);async function S(){if(!k){h(""),j(!0),w(!1);try{let t={name:n.trim(),endpoint:l.trim()};e&&void 0!==d?await (0,v.updateCopilotConnection)(e.id,{revision:d,...t,...x?{bearerToken:null}:p?{bearerToken:p}:{}}):await (0,v.createCopilotConnection)({...t,...p?{bearerToken:p}:{}}),await a(),i()}catch{w(!0)}finally{j(!1)}}}return(0,t.jsxs)("form",{className:"space-y-4",onSubmit:e=>{e.preventDefault(),S()},children:[(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:s.name}),(0,t.jsx)(m.Input,{required:!0,maxLength:80,value:n,onChange:e=>o(e.target.value),disabled:k})]}),(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:s.endpoint}),(0,t.jsx)(m.Input,{required:!0,type:"url",maxLength:2048,pattern:"https://.*",value:l,onChange:e=>c(e.target.value),disabled:k,placeholder:"https://mcp.example.com/mcp"})]}),(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:s.bearer}),(0,t.jsx)(m.Input,{type:"password",maxLength:4096,autoComplete:"new-password",value:p,onChange:e=>h(e.target.value),disabled:k||x,placeholder:e?.hasCredential?s.credentialKeep:""})]}),e?.hasCredential&&(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("input",{type:"checkbox",checked:x,disabled:k,onChange:e=>{g(e.target.checked),h("")}}),s.clearCredential]}),e&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s.configurationHelp}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s.remoteApproval}),C&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:s.error}),(0,t.jsx)(u.Button,{type:"submit",disabled:k,children:k?s.refreshing:e?s.save:s.create})]})}function k({connection:e}){let i=(0,f.useExtensionsCopy)(),s=b(),[o,l]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),[m,x]=(0,r.useState)(!1),[g,j]=(0,r.useState)(e.tools.filter(e=>e.enabled).map(e=>e.name)),[C,w]=(0,r.useState)(!1),[S,N]=(0,r.useState)(!1);async function T(e){if(!C){w(!0),N(!1);try{await e(),await s()}catch{N(!0)}finally{w(!1)}}}return(0,t.jsxs)("section",{className:"forgebadger-animate-in space-y-3 rounded-lg border border-border bg-card p-4 transition-colors",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(a.Plug,{className:"size-4 shrink-0 text-brand"}),(0,t.jsx)("h2",{className:"break-all font-medium",children:e.name}),(0,t.jsx)(n.Badge,{variant:"outline",children:"MCP"}),(0,t.jsx)(n.Badge,{variant:"secondary",children:e.enabled?i.enabled:i.disabled})]}),(0,t.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:e.endpoint})]}),(0,t.jsx)(h.Switch,{"aria-label":e.name,disabled:C,checked:e.enabled,onCheckedChange:t=>void T(()=>(0,v.updateCopilotConnection)(e.id,{revision:e.revision,enabled:t}))})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:"not_discovered"===e.status?i.notDiscovered:`${e.tools.filter(e=>e.enabled&&e.compatible).length}/${e.tools.length} ${i.tools}`}),e.hasCredential&&(0,t.jsxs)("span",{children:["· ",i.credentialSet]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i.remoteApproval}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(u.Button,{size:"sm",variant:"outline",disabled:C,onClick:()=>void T(()=>(0,v.discoverCopilotConnection)(e.id,e.revision)),children:C?i.refreshing:i.discover}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",disabled:C||"ready"!==e.status,onClick:()=>d(e=>!e),children:i.selectTools}),(0,t.jsx)(u.Button,{size:"sm",variant:"ghost",disabled:C,onClick:()=>l(!0),children:i.edit}),(0,t.jsx)(u.Button,{size:"sm",variant:"ghost",disabled:C,onClick:()=>x(!0),children:i.delete})]}),c&&(0,t.jsxs)("div",{className:"space-y-3 border-t border-border/70 pt-3",children:[0===e.tools.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i.noTools}),e.tools.map(e=>(0,t.jsxs)("div",{className:"space-y-1 rounded-md border border-border/70 p-3",children:[(0,t.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",checked:g.includes(e.name),disabled:C||!e.compatible,onChange:t=>j(i=>t.target.checked?[...i,e.name]:i.filter(t=>t!==e.name))}),(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"break-all font-mono",children:e.name}),(0,t.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:e.description})]})]}),(0,t.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:e.modelName}),!e.compatible&&(0,t.jsxs)("p",{className:"text-xs text-amber-500",children:[i.incompatible,": ",e.unavailableReason]}),(0,t.jsxs)("details",{className:"text-xs text-muted-foreground",children:[(0,t.jsx)("summary",{children:i.schema}),(0,t.jsx)("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-all",children:JSON.stringify(e.inputSchema,null,2)})]})]},e.name)),(0,t.jsx)(u.Button,{size:"sm",disabled:C,onClick:()=>void T(()=>(0,v.updateCopilotConnection)(e.id,{revision:e.revision,enabledTools:g})),children:i.saveTools})]}),S&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:i.error}),(0,t.jsx)(p.Dialog,{open:o,onOpenChange:l,children:(0,t.jsxs)(p.DialogContent,{children:[(0,t.jsxs)(p.DialogHeader,{children:[(0,t.jsx)(p.DialogTitle,{children:i.editConnection}),(0,t.jsx)(p.DialogDescription,{children:i.configurationHelp})]}),o&&(0,t.jsx)(y,{connection:e,onDone:()=>l(!1)})]})}),(0,t.jsx)(p.Dialog,{open:m,onOpenChange:x,children:(0,t.jsxs)(p.DialogContent,{children:[(0,t.jsxs)(p.DialogHeader,{children:[(0,t.jsx)(p.DialogTitle,{children:i.deleteConfirm}),(0,t.jsx)(p.DialogDescription,{children:e.name})]}),(0,t.jsx)(u.Button,{variant:"destructive",disabled:C,onClick:()=>void T(()=>(0,v.deleteCopilotConnection)(e.id,e.revision)),children:i.delete}),S&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:i.error})]})})]})}var j=e.i(88010);function C(e){if(!e.length||e.length>65||!e.some(e=>"SKILL.md"===e.path))throw Error("invalid_skill_package");let t=new Set,i=0;for(let s of e){if(!s.path||s.path.startsWith("/")||/[\\\u0000-\u001f:]/.test(s.path)||s.path.split("/").some(e=>!e||"."===e||".."===e)||t.has(s.path))throw Error("invalid_skill_path");t.add(s.path);let e=new TextEncoder().encode(s.content).byteLength;if(i+=e,e>131072||s.content.includes("\0")||i>1048576)throw Error("skill_package_too_large_or_binary")}}async function w(e){let t=Array.from(e);if(t.length>65||t.some(e=>e.size>131072)||t.reduce((e,t)=>e+t.size,0)>1048576)throw Error("skill_package_too_large");let i=t.map(e=>e.webkitRelativePath||e.name),s=i[0]?.split("/")[0],a=s&&i.every(e=>e.startsWith(`${s}/`))&&i.includes(`${s}/SKILL.md`),n=[];for(let[e,o]of t.entries())n.push({path:a?i[e].slice(s.length+1):i[e],content:new TextDecoder("utf-8",{fatal:!0}).decode(await o.arrayBuffer())});return C(n),n}function S({disabled:e,onFiles:i}){let s=(0,f.useExtensionsCopy)(),[a,n]=(0,r.useState)(!1),[o,l]=(0,r.useState)(!1);async function c(e){if(e.files){l(!0),n(!1);try{i(await w(e.files))}catch{n(!0)}finally{l(!1),e.value=""}}}return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("label",{className:"space-y-1 text-xs",children:[(0,t.jsx)("span",{children:s.chooseFiles}),(0,t.jsx)(m.Input,{type:"file",multiple:!0,disabled:e||o,onChange:e=>void c(e.currentTarget)})]}),(0,t.jsxs)("label",{className:"space-y-1 text-xs",children:[(0,t.jsx)("span",{children:s.chooseFolder}),(0,t.jsx)(m.Input,{type:"file",multiple:!0,webkitdirectory:"",disabled:e||o,onChange:e=>void c(e.currentTarget)})]})]}),o&&(0,t.jsx)("p",{className:"text-xs",children:s.loading}),a&&(0,t.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:s.fileError})]})}function N({onDone:e}){let i=(0,f.useExtensionsCopy)(),s=(0,l.useQueryClient)(),[a,n]=(0,r.useState)("paste"),[o,c]=(0,r.useState)(""),[d,p]=(0,r.useState)(""),[h,x]=(0,r.useState)([]),[g,b]=(0,r.useState)(!1),[y,k]=(0,r.useState)(null);async function w(){if(g)return;k(null);let t="paste"===a?[{path:"SKILL.md",content:o}]:h;if("url"!==a)try{C(t)}catch{k(i.fileError);return}b(!0);try{await (0,v.importCopilotSkill)("url"===a?{source:{kind:"url",url:d.trim()}}:{source:{kind:"paste"===a?"paste":"upload"},files:t}),await s.invalidateQueries({queryKey:v.copilotSkillsKey}),e()}catch{k(i.error)}finally{b(!1)}}return(0,t.jsxs)("form",{className:"space-y-4",onSubmit:e=>{e.preventDefault(),w()},children:[(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:i.importMethod}),(0,t.jsxs)("select",{"aria-label":i.importMethod,className:"h-9 w-full rounded-md border border-input bg-background px-2",value:a,disabled:g,onChange:e=>{n(e.target.value),k(null)},children:[(0,t.jsx)("option",{value:"paste",children:i.paste}),(0,t.jsx)("option",{value:"upload",children:i.upload}),(0,t.jsx)("option",{value:"url",children:i.url})]})]}),"paste"===a?(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:i.importContent}),(0,t.jsx)(j.Textarea,{required:!0,className:"min-h-64 font-mono text-xs",value:o,disabled:g,onChange:e=>c(e.target.value),placeholder:"---\nname: project-review\ndescription: Review project status\n---\n# Project review\n"})]}):"url"===a?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:i.url}),(0,t.jsx)(m.Input,{required:!0,type:"url",pattern:"https://.*",value:d,disabled:g,onChange:e=>p(e.target.value),placeholder:"https://example.com/SKILL.md"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i.urlHelp})]}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S,{disabled:g,onFiles:x}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[i.selectedFiles,": ",h.length]}),(0,t.jsx)("ul",{className:"max-h-32 overflow-auto text-xs",children:h.map(e=>(0,t.jsx)("li",{className:"break-all font-mono",children:e.path},e.path))})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i.importHelp}),y&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:y}),(0,t.jsx)(u.Button,{type:"submit",disabled:g||"upload"===a&&!h.length,children:g?i.refreshing:i.install})]})}function T(){let e=(0,f.useExtensionsCopy)(),[s,a]=(0,r.useState)(!1),[n,o]=(0,r.useState)(null),l=(0,i.useQuery)({queryKey:v.copilotSkillsKey,queryFn:v.listCopilotSkills,retry:!1});return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.skillsHelp}),(0,t.jsxs)(u.Button,{size:"sm",onClick:()=>a(!0),children:[(0,t.jsx)(c.Plus,{className:"size-4"}),e.importSkill]})]}),l.isPending?(0,t.jsx)("p",{children:e.loading}):l.isError?(0,t.jsxs)("div",{role:"alert",className:"space-y-2 text-sm text-destructive",children:[(0,t.jsx)("p",{children:e.loadError}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",onClick:()=>void l.refetch(),children:e.retry})]}):l.data?.skills.length?l.data.skills.map(e=>(0,t.jsx)(P,{skill:e,onOpen:()=>o(e)},e.id)):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.emptySkills}),(0,t.jsx)(p.Dialog,{open:s,onOpenChange:a,children:(0,t.jsxs)(p.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-2xl",children:[(0,t.jsxs)(p.DialogHeader,{children:[(0,t.jsx)(p.DialogTitle,{children:e.importSkill}),(0,t.jsx)(p.DialogDescription,{children:e.skillsHelp})]}),s&&(0,t.jsx)(N,{onDone:()=>a(!1)})]})}),(0,t.jsx)(p.Dialog,{open:!!n,onOpenChange:e=>{e||o(null)},children:(0,t.jsxs)(p.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-3xl",children:[(0,t.jsxs)(p.DialogHeader,{children:[(0,t.jsx)(p.DialogTitle,{children:n?.name}),(0,t.jsx)(p.DialogDescription,{children:e.detail})]}),n&&(0,t.jsx)(E,{id:n.id})]})})]})}function R({skill:e}){let i=(0,f.useExtensionsCopy)();return(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,t.jsx)(n.Badge,{variant:"outline",children:"builtin-playbook"===e.kind?i.playbook:i.imported}),(0,t.jsx)(n.Badge,{variant:"secondary",children:e.isEnabled?i.enabled:i.disabled}),(0,t.jsxs)(n.Badge,{variant:"outline",children:["v",e.version]})]}),!e.compatible&&(0,t.jsxs)("p",{className:"text-amber-500",children:[i.incompatible,": ",e.incompatibilityReasons.join("; ")]}),e.reviewRequired&&(0,t.jsxs)("p",{className:"text-amber-500",children:[i.review,": v",e.version," → v",e.currentVersion]}),e.isEnabled&&!e.available&&!e.reviewRequired&&e.compatible&&(0,t.jsxs)("p",{className:"text-amber-500",children:[i.unavailable,": ",e.unavailableReason]}),e.requiredTools.length>0&&(0,t.jsxs)("p",{className:"break-all text-muted-foreground",children:[i.dependencies,": ",e.requiredTools.join(", ")]})]})}function P({skill:e,onOpen:i}){let a=(0,f.useExtensionsCopy)(),n=(0,l.useQueryClient)(),[o,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(!1);async function m(t){if(!o){c(!0),p(!1);try{await (0,v.setCopilotSkillEnabled)(e.id,t,e.revisionId),await n.invalidateQueries({queryKey:v.copilotSkillsKey})}catch{p(!0)}finally{c(!1)}}}return(0,t.jsxs)("section",{className:"forgebadger-animate-in space-y-3 rounded-lg border border-border bg-card p-4 transition-colors",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsxs)("h2",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(s,{className:"size-4 shrink-0 text-brand"}),(0,t.jsx)("span",{className:"break-all",children:e.name})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description})]}),(0,t.jsx)(h.Switch,{"aria-label":e.name,checked:e.isEnabled,disabled:o||!e.editable||!e.isEnabled&&(!e.compatible||e.reviewRequired),onCheckedChange:e=>void m(e)})]}),(0,t.jsx)(R,{skill:e}),(0,t.jsxs)("p",{className:"break-all text-xs text-muted-foreground",children:[a.source,": ",e.source.url??e.source.label??e.source.kind]}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",onClick:i,children:a.detail}),d&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:a.error})]})}function E({id:e}){let s=(0,f.useExtensionsCopy)(),a=(0,i.useQuery)({queryKey:[...v.copilotSkillsKey,e],queryFn:()=>(0,v.getCopilotSkill)(e),retry:!1});return a.isPending?(0,t.jsx)("p",{children:s.loading}):a.isError||!a.data?(0,t.jsxs)("div",{role:"alert",className:"space-y-2 text-sm text-destructive",children:[(0,t.jsx)("p",{children:s.loadError}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",onClick:()=>void a.refetch(),children:s.retry})]}):(0,t.jsx)(L,{skill:a.data.skill},a.data.skill.revisionId)}function L({skill:e}){let i=(0,f.useExtensionsCopy)(),s=(0,l.useQueryClient)(),[a,n]=(0,r.useState)(e.files),[o,c]=(0,r.useState)("SKILL.md"),[d,p]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null),[x,g]=(0,r.useState)(!1);async function b(){if(!d){h(null);try{C(a)}catch{h(i.fileError);return}p(!0);try{await (0,v.updateCopilotSkill)(e.id,{expectedRevisionId:e.revisionId,files:a,...e.reviewRequired?{reviewedVersion:e.currentVersion}:{}}),await s.invalidateQueries({queryKey:v.copilotSkillsKey})}catch{h(i.error)}finally{p(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(R,{skill:e}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{children:[i.files,": ",a.length]}),(0,t.jsxs)("span",{children:[i.revision,": ",e.revisionId]})]}),(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:i.files}),(0,t.jsx)("select",{"aria-label":i.files,className:"h-9 w-full rounded-md border border-input bg-background px-2",value:o,onChange:e=>c(e.target.value),children:a.map(e=>(0,t.jsx)("option",{value:e.path,children:e.path},e.path))})]}),(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{className:"break-all font-mono",children:o}),(0,t.jsx)(j.Textarea,{className:"min-h-64 font-mono text-xs",value:a.find(e=>e.path===o)?.content??"",disabled:d||!e.editable,onChange:e=>n(t=>t.map(t=>t.path===o?{...t,content:e.target.value}:t))})]}),e.editable&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S,{disabled:d,onFiles:e=>{n(e),c("SKILL.md")}}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i.importHelp}),"builtin-playbook"===e.kind&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i.builtinReview}),(0,t.jsx)(u.Button,{size:"sm",disabled:d,onClick:()=>void b(),children:d?i.refreshing:i.saveSkill})]}),m&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:m}),(0,t.jsxs)("div",{className:"border-t border-border/70 pt-3",children:[(0,t.jsx)(u.Button,{size:"sm",variant:"outline",onClick:()=>g(e=>!e),children:i.history}),x&&(0,t.jsx)(D,{skill:e})]})]})}function D({skill:e}){let s=(0,f.useExtensionsCopy)(),[a,n]=(0,r.useState)(null),o=(0,i.useQuery)({queryKey:[...v.copilotSkillsKey,e.id,"revisions"],queryFn:()=>(0,v.listSkillRevisions)(e.id),retry:!1});return(0,t.jsx)("div",{className:"mt-3 space-y-3",children:o.isPending?(0,t.jsx)("p",{children:s.loading}):o.isError?(0,t.jsxs)("div",{role:"alert",children:[(0,t.jsx)("p",{className:"text-sm text-destructive",children:s.loadError}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",onClick:()=>void o.refetch(),children:s.retry})]}):o.data?.revisions.length?o.data.revisions.map(i=>(0,t.jsxs)("div",{className:"space-y-2 rounded-md border border-border/70 p-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("p",{className:"text-xs",children:["v",i.version," · ",i.action," · ",i.fileCount," ",s.files]}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",disabled:!e.editable||i.id===e.revisionId,onClick:()=>n(a===i.id?null:i.id),children:s.rollback})]}),(0,t.jsxs)("p",{className:"break-all text-xs text-muted-foreground",children:[i.createdAt," · ",i.source.url??i.source.label??i.source.kind]}),a===i.id&&(0,t.jsx)(I,{skill:e,revisionId:i.id})]},i.id)):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:s.noHistory})})}function I({skill:e,revisionId:s}){let a=(0,f.useExtensionsCopy)(),n=(0,l.useQueryClient)(),[o,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(!1),m=(0,i.useQuery)({queryKey:[...v.copilotSkillsKey,e.id,"revisions",s],queryFn:()=>(0,v.getSkillRevision)(e.id,s),retry:!1});async function h(){if(!o){c(!0),p(!1);try{await (0,v.rollbackCopilotSkill)(e.id,s,e.revisionId),await n.invalidateQueries({queryKey:v.copilotSkillsKey})}catch{p(!0)}finally{c(!1)}}}return(0,t.jsxs)("div",{className:"space-y-2 border-t border-border/70 pt-2",children:[m.isPending?(0,t.jsx)("p",{children:a.loading}):m.isError?(0,t.jsxs)("div",{role:"alert",className:"space-y-2 text-xs text-destructive",children:[(0,t.jsx)("p",{children:a.loadError}),(0,t.jsx)(u.Button,{size:"sm",variant:"outline",onClick:()=>void m.refetch(),children:a.retry})]}):m.data&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:a.rollbackHelp}),m.data.revision.files.map(e=>(0,t.jsxs)("details",{className:"text-xs",children:[(0,t.jsx)("summary",{className:"break-all font-mono",children:e.path}),(0,t.jsx)("pre",{className:"max-h-48 overflow-auto whitespace-pre-wrap break-all rounded-md bg-muted/30 p-2",children:e.content})]},e.path)),(0,t.jsx)(u.Button,{size:"sm",disabled:o,onClick:()=>void h(),children:a.rollbackConfirm})]}),d&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:a.error})]})}var A=e.i(63134);e.s(["CopilotExtensionsPage",0,function(){let e=(0,f.useExtensionsCopy)(),r=(0,i.useQuery)({queryKey:v.copilotSkillsKey,queryFn:v.listCopilotSkills,retry:!1}),l=(0,i.useQuery)({queryKey:v.copilotConnectionsKey,queryFn:v.listCopilotConnections,retry:!1}),c=r.data?.skills.length,d=l.data?.connections.filter(e=>"mcp"===e.kind).length;return(0,t.jsx)(A.CopilotSettingsShell,{active:"extensions",title:e.title,description:e.description,children:(0,t.jsxs)(o.Tabs,{defaultValue:"skills",className:"forgebadger-animate-in",style:{animationDelay:"120ms"},children:[(0,t.jsxs)(o.TabsList,{"aria-label":e.title,children:[(0,t.jsxs)(o.TabsTrigger,{value:"skills",className:"gap-1.5",children:[(0,t.jsx)(s,{className:"size-3.5"}),e.skills,c?(0,t.jsx)(n.Badge,{variant:"secondary",className:"px-1.5 py-0 text-[10px]",children:c}):null]}),(0,t.jsxs)(o.TabsTrigger,{value:"connections",className:"gap-1.5",children:[(0,t.jsx)(a.Plug,{className:"size-3.5"}),e.connections,d?(0,t.jsx)(n.Badge,{variant:"secondary",className:"px-1.5 py-0 text-[10px]",children:d}):null]})]}),(0,t.jsx)(o.TabsContent,{value:"skills",className:"mt-4",children:(0,t.jsx)(T,{})}),(0,t.jsx)(o.TabsContent,{value:"connections",className:"mt-4",children:(0,t.jsx)(g,{})})]})})}],32148)}]);
|