@agent-native/core 0.32.1 → 0.32.17
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 +3 -1
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +48 -10
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +12 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +104 -6
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/cli/app-skill.js +2 -2
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +6 -1
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/code-agent-output-smoother.d.ts +7 -0
- package/dist/cli/code-agent-output-smoother.d.ts.map +1 -0
- package/dist/cli/code-agent-output-smoother.js +111 -0
- package/dist/cli/code-agent-output-smoother.js.map +1 -0
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +5 -0
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/migrate.d.ts.map +1 -1
- package/dist/cli/migrate.js +17 -42
- package/dist/cli/migrate.js.map +1 -1
- package/dist/cli/skills.d.ts +23 -2
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +405 -41
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +7 -105
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +41 -7
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AgentTaskCard.d.ts.map +1 -1
- package/dist/client/AgentTaskCard.js +0 -28
- package/dist/client/AgentTaskCard.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +8 -23
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +359 -205
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +254 -14
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +14 -9
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-chat.d.ts +24 -0
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +73 -0
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/assistant-ui-recovery.d.ts +34 -0
- package/dist/client/assistant-ui-recovery.d.ts.map +1 -0
- package/dist/client/assistant-ui-recovery.js +122 -0
- package/dist/client/assistant-ui-recovery.js.map +1 -0
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +7 -1
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +7 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +22 -2
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/frame-protocol.d.ts +6 -2
- package/dist/client/frame-protocol.d.ts.map +1 -1
- package/dist/client/frame-protocol.js.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +2 -1
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts +13 -3
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +105 -36
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/route-warmup.d.ts +61 -0
- package/dist/client/route-warmup.d.ts.map +1 -0
- package/dist/client/route-warmup.js +456 -0
- package/dist/client/route-warmup.js.map +1 -0
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +2 -1
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +5 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +10 -4
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/use-action.d.ts +1 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +22 -4
- package/dist/client/use-action.js.map +1 -1
- package/dist/code-agents/background-run.d.ts +2 -0
- package/dist/code-agents/background-run.d.ts.map +1 -1
- package/dist/code-agents/background-run.js.map +1 -1
- package/dist/db/client.d.ts +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +25 -1
- package/dist/db/client.js.map +1 -1
- package/dist/deploy/build.d.ts +4 -0
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +171 -14
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/immutable-assets.d.ts +1 -0
- package/dist/deploy/immutable-assets.d.ts.map +1 -1
- package/dist/deploy/immutable-assets.js +1 -0
- package/dist/deploy/immutable-assets.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +118 -82
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/progress/routes.d.ts.map +1 -1
- package/dist/progress/routes.js +1 -0
- package/dist/progress/routes.js.map +1 -1
- package/dist/progress/store.d.ts +13 -0
- package/dist/progress/store.d.ts.map +1 -1
- package/dist/progress/store.js +18 -0
- package/dist/progress/store.js.map +1 -1
- package/dist/progress/types.d.ts +2 -0
- package/dist/progress/types.d.ts.map +1 -1
- package/dist/progress/types.js.map +1 -1
- package/dist/scripts/db/wipe-leaked-builder-keys.d.ts +2 -2
- package/dist/scripts/db/wipe-leaked-builder-keys.d.ts.map +1 -1
- package/dist/scripts/db/wipe-leaked-builder-keys.js +14 -3
- package/dist/scripts/db/wipe-leaked-builder-keys.js.map +1 -1
- package/dist/server/action-routes.d.ts +1 -0
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +36 -2
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +123 -25
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-discovery.d.ts.map +1 -1
- package/dist/server/agent-discovery.js +14 -1
- package/dist/server/agent-discovery.js.map +1 -1
- package/dist/server/agent-teams-run-queue.d.ts +80 -0
- package/dist/server/agent-teams-run-queue.d.ts.map +1 -0
- package/dist/server/agent-teams-run-queue.js +208 -0
- package/dist/server/agent-teams-run-queue.js.map +1 -0
- package/dist/server/agent-teams.d.ts +67 -0
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +607 -180
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/auth-marketing.d.ts.map +1 -1
- package/dist/server/auth-marketing.js +0 -64
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +67 -14
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-browser.d.ts +12 -2
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +24 -0
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +66 -5
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts +10 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +82 -3
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/csrf.js +3 -0
- package/dist/server/csrf.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/onboarding-html.d.ts +1 -0
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +14 -1
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/self-dispatch.d.ts +44 -0
- package/dist/server/self-dispatch.d.ts.map +1 -0
- package/dist/server/self-dispatch.js +113 -0
- package/dist/server/self-dispatch.js.map +1 -0
- package/dist/server/social-og-image.d.ts +14 -0
- package/dist/server/social-og-image.d.ts.map +1 -0
- package/dist/server/social-og-image.js +251 -0
- package/dist/server/social-og-image.js.map +1 -0
- package/dist/server/ssr-handler.d.ts +1 -1
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +27 -11
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/shared/cache-control.d.ts +7 -0
- package/dist/shared/cache-control.d.ts.map +1 -1
- package/dist/shared/cache-control.js +7 -0
- package/dist/shared/cache-control.js.map +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/route-warmup-config.d.ts +28 -0
- package/dist/shared/route-warmup-config.d.ts.map +1 -0
- package/dist/shared/route-warmup-config.js +58 -0
- package/dist/shared/route-warmup-config.js.map +1 -0
- package/dist/shared/social-meta.d.ts +5 -0
- package/dist/shared/social-meta.d.ts.map +1 -1
- package/dist/shared/social-meta.js +36 -2
- package/dist/shared/social-meta.js.map +1 -1
- package/dist/shared/streaming-text-smoothing.d.ts +12 -0
- package/dist/shared/streaming-text-smoothing.d.ts.map +1 -0
- package/dist/shared/streaming-text-smoothing.js +52 -0
- package/dist/shared/streaming-text-smoothing.js.map +1 -0
- package/dist/styles/agent-native.css +4 -4
- package/dist/templates/default/AGENTS.md +9 -4
- package/dist/templates/default/DEVELOPING.md +15 -1
- package/dist/templates/workspace-core/AGENTS.md +7 -3
- package/dist/templates/workspace-root/AGENTS.md +7 -3
- package/dist/vite/client.d.ts +13 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +36 -1
- package/dist/vite/client.js.map +1 -1
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js.map +1 -1
- package/docs/content/client.md +62 -1
- package/docs/content/code-agents-ui.md +6 -13
- package/docs/content/context-awareness.md +186 -21
- package/docs/content/deployment.md +8 -11
- package/docs/content/dispatch.md +1 -1
- package/docs/content/external-agents.md +32 -2
- package/docs/content/migration-workbench.md +4 -21
- package/docs/content/multi-app-workspace.md +1 -1
- package/docs/content/recurring-jobs.md +1 -1
- package/docs/content/security.md +0 -1
- package/docs/content/sharing.md +1 -3
- package/docs/content/skills-guide.md +12 -10
- package/docs/content/template-assets.md +21 -1
- package/docs/content/template-design.md +23 -5
- package/docs/content/template-dispatch.md +1 -1
- package/package.json +2 -1
- package/src/templates/default/AGENTS.md +9 -4
- package/src/templates/default/DEVELOPING.md +15 -1
- package/src/templates/workspace-core/AGENTS.md +7 -3
- package/src/templates/workspace-root/AGENTS.md +7 -3
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* must support these message types. Communication happens via postMessage
|
|
6
6
|
* between the app iframe and the parent frame.
|
|
7
7
|
*/
|
|
8
|
-
import type { AgentChatMessage } from "./agent-chat.js";
|
|
8
|
+
import type { AgentChatContextMessage, AgentChatMessage } from "./agent-chat.js";
|
|
9
9
|
export interface AppReadyMessage {
|
|
10
10
|
type: "agentNative.appReady";
|
|
11
11
|
}
|
|
@@ -13,6 +13,10 @@ export interface SubmitChatMessage {
|
|
|
13
13
|
type: "agentNative.submitChat";
|
|
14
14
|
data: AgentChatMessage;
|
|
15
15
|
}
|
|
16
|
+
export interface SetChatContextMessage {
|
|
17
|
+
type: "agentNative.setChatContext";
|
|
18
|
+
data: AgentChatContextMessage;
|
|
19
|
+
}
|
|
16
20
|
export interface GetUserInfoMessage {
|
|
17
21
|
type: "agentNative.getUserInfo";
|
|
18
22
|
}
|
|
@@ -63,7 +67,7 @@ export interface PresentationModeMessage {
|
|
|
63
67
|
active: boolean;
|
|
64
68
|
};
|
|
65
69
|
}
|
|
66
|
-
export type AppToFrameMessage = AppReadyMessage | SubmitChatMessage | GetUserInfoMessage | SetEnvVarsMessage | DevModeChangeMessage | ToggleSidebarMessage | EnterStyleEditingMessage | EnterTextEditingMessage | ExitSelectionModeMessage | PresentationModeMessage;
|
|
70
|
+
export type AppToFrameMessage = AppReadyMessage | SubmitChatMessage | SetChatContextMessage | GetUserInfoMessage | SetEnvVarsMessage | DevModeChangeMessage | ToggleSidebarMessage | EnterStyleEditingMessage | EnterTextEditingMessage | ExitSelectionModeMessage | PresentationModeMessage;
|
|
67
71
|
export interface FrameOriginMessage {
|
|
68
72
|
type: "agentNative.frameOrigin";
|
|
69
73
|
origin: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-protocol.d.ts","sourceRoot":"","sources":["../../src/client/frame-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"frame-protocol.d.ts","sourceRoot":"","sources":["../../src/client/frame-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAMzB,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,qBAA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,uBAAuB,CAAC;AAM5B,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,yBAAyB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,yBAAyB,CAAC;IAChC,MAAM,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,0BAA0B,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE;QACJ,mFAAmF;QACnF,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;QACrB,4DAA4D;QAC5D,OAAO,CAAC,EAAE,KAAK,GAAG,WAAW,GAAG,MAAM,CAAC;QACvC,2DAA2D;QAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,gDAAgD;QAChD,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;CACH;AAED,MAAM,MAAM,iBAAiB,GACzB,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,kBAAkB,GAClB,uBAAuB,CAAC;AAM5B,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-protocol.js","sourceRoot":"","sources":["../../src/client/frame-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/**\n * Frame Protocol — typed message definitions for frame communication.\n *\n * Any frame implementation (local dev frame, Builder.io cloud, Electron)\n * must support these message types. Communication happens via postMessage\n * between the app iframe and the parent frame.\n */\n\nimport type {
|
|
1
|
+
{"version":3,"file":"frame-protocol.js","sourceRoot":"","sources":["../../src/client/frame-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/**\n * Frame Protocol — typed message definitions for frame communication.\n *\n * Any frame implementation (local dev frame, Builder.io cloud, Electron)\n * must support these message types. Communication happens via postMessage\n * between the app iframe and the parent frame.\n */\n\nimport type {\n AgentChatContextMessage,\n AgentChatMessage,\n} from \"./agent-chat.js\";\n\n// ---------------------------------------------------------------------------\n// Messages FROM app TO frame\n// ---------------------------------------------------------------------------\n\nexport interface AppReadyMessage {\n type: \"agentNative.appReady\";\n}\n\nexport interface SubmitChatMessage {\n type: \"agentNative.submitChat\";\n data: AgentChatMessage;\n}\n\nexport interface SetChatContextMessage {\n type: \"agentNative.setChatContext\";\n data: AgentChatContextMessage;\n}\n\nexport interface GetUserInfoMessage {\n type: \"agentNative.getUserInfo\";\n}\n\nexport interface SetEnvVarsMessage {\n type: \"agentNative.setEnvVars\";\n data: { vars: Array<{ key: string; value: string }> };\n}\n\nexport interface DevModeChangeMessage {\n type: \"agentNative.devModeChange\";\n data: { isDevMode: boolean };\n}\n\nexport interface ToggleSidebarMessage {\n type: \"agentNative.toggleSidebar\";\n data?: { open?: boolean };\n}\n\nexport interface EnterStyleEditingMessage {\n type: \"agentNative.enterStyleEditing\";\n data: { selector: string };\n}\n\nexport interface EnterTextEditingMessage {\n type: \"agentNative.enterTextEditing\";\n data: { selector: string };\n}\n\nexport interface ExitSelectionModeMessage {\n type: \"agentNative.exitSelectionMode\";\n}\n\n/**\n * Sent both ways: the app announces it has entered/exited presentation mode\n * (so the frame can hide its chrome), and an outer frame can push the app\n * into presentation mode (so the app's sidebar hides).\n */\nexport interface PresentationModeMessage {\n type: \"agentNative.presentationMode\";\n data: { active: boolean };\n}\n\nexport type AppToFrameMessage =\n | AppReadyMessage\n | SubmitChatMessage\n | SetChatContextMessage\n | GetUserInfoMessage\n | SetEnvVarsMessage\n | DevModeChangeMessage\n | ToggleSidebarMessage\n | EnterStyleEditingMessage\n | EnterTextEditingMessage\n | ExitSelectionModeMessage\n | PresentationModeMessage;\n\n// ---------------------------------------------------------------------------\n// Messages FROM frame TO app\n// ---------------------------------------------------------------------------\n\nexport interface FrameOriginMessage {\n type: \"agentNative.frameOrigin\";\n origin: string;\n}\n\nexport interface ChatRunningMessage {\n type: \"agentNative.chatRunning\";\n detail: { isRunning: boolean; tabId?: string };\n}\n\nexport interface UserInfoMessage {\n type: \"agentNative.userInfo\";\n data: { name?: string; email?: string };\n}\n\nexport interface CodeCompleteMessage {\n type: \"agentNative.codeComplete\";\n tabId: string;\n success: boolean;\n}\n\nexport interface SidebarModeMessage {\n type: \"agentNative.sidebarMode\";\n data: {\n /** \"code\" hides the app's sidebar (frame controls it); \"app\" defers to the app. */\n mode: \"code\" | \"app\";\n /** When mode === \"app\", which panel the app should show. */\n appMode?: \"cli\" | \"resources\" | \"chat\";\n /** Frame-controlled sidebar width to sync into the app. */\n width?: number;\n /** Whether the app's sidebar should be open. */\n open?: boolean;\n };\n}\n\nexport type FrameToAppMessage =\n | FrameOriginMessage\n | ChatRunningMessage\n | UserInfoMessage\n | CodeCompleteMessage\n | SidebarModeMessage\n | PresentationModeMessage;\n\n// ---------------------------------------------------------------------------\n// All message types\n// ---------------------------------------------------------------------------\n\nexport type FrameMessage = AppToFrameMessage | FrameToAppMessage;\n"]}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { sendToAgentChat, generateTabId, type AgentChatMessage, } from "./agent-chat.js";
|
|
1
|
+
export { addContextToAgentChat, appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, sendToAgentChat, setContextToAgentChat, generateTabId, type AgentChatContextItem, type AgentChatContextMessage, type AgentChatMessage, } from "./agent-chat.js";
|
|
2
2
|
export { useAgentChatGenerating } from "./use-agent-chat.js";
|
|
3
3
|
export { useCodeMode, useDevMode } from "./use-dev-mode.js";
|
|
4
4
|
export { agentNativePath, appApiPath, appBasePath, appPath, } from "./api-path.js";
|
|
@@ -26,6 +26,7 @@ export { AgentNative, useAgentNativeScreenContext, type AgentNativeCommandCallba
|
|
|
26
26
|
export { AgentNativeEmbedded, useAgentNativeEmbeddedBrowserSession, type AgentNativeEmbeddedBrowserSessionOptions, type AgentNativeEmbeddedCommandCallback, type AgentNativeEmbeddedCommandCallbackInfo, type AgentNativeEmbeddedProps, type UseAgentNativeEmbeddedBrowserSessionOptions, } from "./AgentNativeEmbedded.js";
|
|
27
27
|
export { defineClientAction, type AgentNativeClientActionDefinition, type AgentNativeClientActionRunner, } from "./client-action.js";
|
|
28
28
|
export { AgentNativeFrame, type AgentNativeFrameProps, } from "./AgentNativeFrame.js";
|
|
29
|
+
export { AgentNativeRouteWarmup, type AgentNativeRouteWarmupProps, } from "./route-warmup.js";
|
|
29
30
|
export { AgentNativeExtensionFrame, AgentNativeExtensionSlot, type AgentNativeExtensionFrameProps, type AgentNativeExtensionPermissionList, type AgentNativeExtensionSlotProps, type AgentNativeExtensionStorageScopeList, } from "./extensions/AgentNativeExtensionFrame.js";
|
|
30
31
|
export { AGENT_NATIVE_EXTENSION_MESSAGE_TYPES, buildAgentNativeExtensionHtml, createHttpAgentNativeExtensionStorage, createLocalStorageAgentNativeExtensionStorage, getAgentNativeExtensionManifest, isAgentNativeExtensionAllowedInSlot, normalizeAgentNativeExtensionSandbox, type AgentNativeExtensionDefinition, type AgentNativeExtensionManifest, type AgentNativeExtensionMessageType, type AgentNativeExtensionStorage, type AgentNativeExtensionStorageContext, type AgentNativeExtensionStorageOptions, type AgentNativeExtensionStorageRow, type AgentNativeExtensionStorageScope, type BuildAgentNativeExtensionHtmlOptions, type CreateHttpAgentNativeExtensionStorageOptions, } from "./extensions/portable-extension.js";
|
|
31
32
|
export { AGENT_NATIVE_HOST_BRIDGE_VERSION, AGENT_NATIVE_HOST_MESSAGE_TYPES, announceAgentNativeFrameReady, createAgentNativeHostBridge, defaultAgentNativeHostCommands, onAgentNativeHostInit, readAgentNativeScreenContext, requestAgentNativeHostActions, requestAgentNativeHostContext, runAgentNativeHostAction, sendAgentNativeHostCommand, type AgentNativeActionAvailability, type AgentNativeActionManifestEntry, type AgentNativeClientAction, type AgentNativeClientActionApprovalConfig, type AgentNativeClientActionGetter, type AgentNativeClientActionRuntime, type AgentNativeClientActions, type AgentNativeHostAuth, type AgentNativeHostAuthPayload, type AgentNativeHostBridge, type AgentNativeHostBridgeEvent, type AgentNativeHostBridgeOptions, type AgentNativeHostCapabilities, type AgentNativeHostCommandHandler, type AgentNativeHostCommandHandlers, type AgentNativeHostCommandRequest, type AgentNativeHostContext, type AgentNativeHostContextGetter, type AgentNativeHostInit, type AgentNativeHostMessageType, type AgentNativeHostRequestOptions, type AgentNativeHostResourceContext, type AgentNativeHostRouteContext, type AgentNativeHostSelectionContext, type AgentNativeHostSession, type AgentNativeJsonSchema, type AgentNativeScreenSnapshot, type AgentNativeScreenSnapshotOptions, type BuiltInAgentNativeHostCommand, } from "./host-bridge.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,eAAe,EACf,aAAa,EACb,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1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AK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,oCAAoC,EACpC,eAAe,EACf,qBAAq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A0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { installRouteChunkRecovery } from "./route-chunk-recovery.js";
|
|
|
2
2
|
import { stripAuthRedirectParamFromUrl } from "./auth-redirect-url.js";
|
|
3
3
|
installRouteChunkRecovery();
|
|
4
4
|
stripAuthRedirectParamFromUrl();
|
|
5
|
-
export { sendToAgentChat, generateTabId, } from "./agent-chat.js";
|
|
5
|
+
export { addContextToAgentChat, appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, sendToAgentChat, setContextToAgentChat, generateTabId, } from "./agent-chat.js";
|
|
6
6
|
export { useAgentChatGenerating } from "./use-agent-chat.js";
|
|
7
7
|
export { useCodeMode, useDevMode } from "./use-dev-mode.js";
|
|
8
8
|
export { agentNativePath, appApiPath, appBasePath, appPath, } from "./api-path.js";
|
|
@@ -30,6 +30,7 @@ export { AgentNative, useAgentNativeScreenContext, } from "./AgentNative.js";
|
|
|
30
30
|
export { AgentNativeEmbedded, useAgentNativeEmbeddedBrowserSession, } from "./AgentNativeEmbedded.js";
|
|
31
31
|
export { defineClientAction, } from "./client-action.js";
|
|
32
32
|
export { AgentNativeFrame, } from "./AgentNativeFrame.js";
|
|
33
|
+
export { AgentNativeRouteWarmup, } from "./route-warmup.js";
|
|
33
34
|
export { AgentNativeExtensionFrame, AgentNativeExtensionSlot, } from "./extensions/AgentNativeExtensionFrame.js";
|
|
34
35
|
export { AGENT_NATIVE_EXTENSION_MESSAGE_TYPES, buildAgentNativeExtensionHtml, createHttpAgentNativeExtensionStorage, createLocalStorageAgentNativeExtensionStorage, getAgentNativeExtensionManifest, isAgentNativeExtensionAllowedInSlot, normalizeAgentNativeExtensionSandbox, } from "./extensions/portable-extension.js";
|
|
35
36
|
export { AGENT_NATIVE_HOST_BRIDGE_VERSION, AGENT_NATIVE_HOST_MESSAGE_TYPES, announceAgentNativeFrameReady, createAgentNativeHostBridge, defaultAgentNativeHostCommands, onAgentNativeHostInit, readAgentNativeScreenContext, requestAgentNativeHostActions, requestAgentNativeHostContext, runAgentNativeHostAction, sendAgentNativeHostCommand, } from "./host-bridge.js";
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,yBAAyB,EAAE,CAAC;AAC5B,6BAA6B,EAAE,CAAC;AAEhC,OAAO,EACL,eAAe,EACf,aAAa,GAEd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kCAAkC,EAClC,0BAA0B,GAM3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sCAAsC,GAGvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EAC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AO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,GAE5B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,yBAAyB;AACzB,OAAO,EACL,WAAW,GAEZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nimport { stripAuthRedirectParamFromUrl } from \"./auth-redirect-url.js\";\n\ninstallRouteChunkRecovery();\nstripAuthRedirectParamFromUrl();\n\nexport {\n sendToAgentChat,\n generateTabId,\n type AgentChatMessage,\n} from \"./agent-chat.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport { useCodeMode, useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n ensureEmbedAuthFetchInterceptor,\n getEmbedAuthToken,\n isEmbedAuthActive,\n isEmbedMcpChatBridgeActive,\n} from \"./embed-auth.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport { McpAppRenderer } from \"./mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"./mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport { useReconciledState } from \"./use-external-value.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getFramePostMessageTargetOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport { createAgentChatAdapter } from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n} from \"./composer/index.js\";\nexport type { TiptapComposerHandle } from \"./composer/TiptapComposer.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ChatThreadData,\n type UseChatThreadsOptions,\n} from \"./use-chat-threads.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n SIDEBAR_STATE_CHANGE_EVENT,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport { SettingsPanel, type SettingsPanelProps } from \"./settings/index.js\";\nexport { useBuilderStatus } from \"./settings/useBuilderStatus.js\";\nexport {\n openBuilderConnectPopup,\n useBuilderConnectFlow,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type OpenBuilderConnectPopupOptions,\n} from \"./settings/useBuilderStatus.js\";\n// Deprecated — use AgentSidebar + AgentToggleButton instead\nexport {\n ProductionAgentPanel,\n type ProductionAgentPanelProps,\n} from \"./ProductionAgentPanel.js\";\nexport {\n useProductionAgent,\n type ProductionAgentMessage,\n type UseProductionAgentOptions,\n type UseProductionAgentResult,\n} from \"./useProductionAgent.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport {\n StarfieldBackground,\n type StarfieldBackgroundProps,\n} from \"./StarfieldBackground.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n setSentryUser,\n captureError,\n captureClientException,\n type ClientCaptureContext,\n} from \"./analytics.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n useCommandMenuShortcut,\n openAgentSidebar,\n submitToAgent,\n type CommandMenuProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n} from \"./use-action.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,yBAAyB,EAAE,CAAC;AAC5B,6BAA6B,EAAE,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,oCAAoC,EACpC,eAAe,EACf,qBAAqB,EACrB,aAAa,GAId,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kCAAkC,EAClC,0BAA0B,GAM3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sCAAsC,GAGvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,8BAA8B,GAG/B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EACL,aAAa,GAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBA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M,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,yBAAyB;AACzB,OAAO,EACL,WAAW,GAEZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nimport { stripAuthRedirectParamFromUrl } from \"./auth-redirect-url.js\";\n\ninstallRouteChunkRecovery();\nstripAuthRedirectParamFromUrl();\n\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n formatAgentChatContextItemsForPrompt,\n sendToAgentChat,\n setContextToAgentChat,\n generateTabId,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatMessage,\n} from \"./agent-chat.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport { useCodeMode, useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n ensureEmbedAuthFetchInterceptor,\n getEmbedAuthToken,\n isEmbedAuthActive,\n isEmbedMcpChatBridgeActive,\n} from \"./embed-auth.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport { McpAppRenderer } from \"./mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"./mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport { useReconciledState } from \"./use-external-value.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getFramePostMessageTargetOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeRouteWarmup,\n type AgentNativeRouteWarmupProps,\n} from \"./route-warmup.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport { createAgentChatAdapter } from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n} from \"./composer/index.js\";\nexport type { TiptapComposerHandle } from \"./composer/TiptapComposer.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ChatThreadData,\n type UseChatThreadsOptions,\n} from \"./use-chat-threads.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n SIDEBAR_STATE_CHANGE_EVENT,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport { SettingsPanel, type SettingsPanelProps } from \"./settings/index.js\";\nexport { useBuilderStatus } from \"./settings/useBuilderStatus.js\";\nexport {\n openBuilderConnectPopup,\n useBuilderConnectFlow,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type OpenBuilderConnectPopupOptions,\n} from \"./settings/useBuilderStatus.js\";\n// Deprecated — use AgentSidebar + AgentToggleButton instead\nexport {\n ProductionAgentPanel,\n type ProductionAgentPanelProps,\n} from \"./ProductionAgentPanel.js\";\nexport {\n useProductionAgent,\n type ProductionAgentMessage,\n type UseProductionAgentOptions,\n type UseProductionAgentResult,\n} from \"./useProductionAgent.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport {\n StarfieldBackground,\n type StarfieldBackgroundProps,\n} from \"./StarfieldBackground.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n setSentryUser,\n captureError,\n captureClientException,\n type ClientCaptureContext,\n} from \"./analytics.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n useCommandMenuShortcut,\n openAgentSidebar,\n submitToAgent,\n type CommandMenuProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n} from \"./use-action.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgSwitcher.d.ts","sourceRoot":"","sources":["../../../src/client/org/OrgSwitcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OrgSwitcher.d.ts","sourceRoot":"","sources":["../../../src/client/org/OrgSwitcher.tsx"],"names":[],"mappings":"AAuDA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AA2MD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,cAAc,EACd,YAAY,EACZ,YAAiD,GAClD,EAAE,gBAAgB,2CAyblB"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { useNavigate } from "react-router";
|
|
4
4
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
-
import { IconApps, IconArrowUpRight, IconBrain, IconBrandJira, IconBrush, IconBuilding, IconCalendar, IconCalendarTime, IconChartBar, IconCheck, IconChevronRight, IconClipboardList, IconCode, IconFileText, IconLoader2, IconLogout, IconMail, IconMessageCircle, IconMicrophone, IconNote, IconPhone, IconPhoto, IconPlus, IconPresentation, IconScreenShare, IconSelector, IconSettings, IconStack2, IconUser, IconUserPlus, IconUsers, IconVideo, IconWorld, } from "@tabler/icons-react";
|
|
5
|
+
import { IconApps, IconArrowUpRight, IconBrain, IconBrandJira, IconBrush, IconBuilding, IconCalendar, IconCalendarTime, IconChartBar, IconCheck, IconChevronRight, IconClipboardList, IconCode, IconContract, IconFileText, IconLoader2, IconLogout, IconMail, IconMessageCircle, IconMicrophone, IconNote, IconPhone, IconPhoto, IconPlus, IconPresentation, IconScreenShare, IconSelector, IconSettings, IconStack2, IconUser, IconUserPlus, IconUsers, IconVideo, IconWorld, } from "@tabler/icons-react";
|
|
6
6
|
import { useOrg, useSwitchOrg, useCreateOrg, useInviteMember, useAcceptInvitation, useJoinByDomain, } from "./hooks.js";
|
|
7
7
|
import { agentNativePath } from "../api-path.js";
|
|
8
8
|
import { ORG_SWITCHER_MAX_APP_LINKS, useOrgSwitcherAppLinks, visibleOrgAppLinks, } from "./workspace-app-links.js";
|
|
@@ -35,6 +35,7 @@ const APP_ICON_MAP = {
|
|
|
35
35
|
ClipboardList: IconClipboardList,
|
|
36
36
|
Users: IconUsers,
|
|
37
37
|
Code: IconCode,
|
|
38
|
+
Contract: IconContract,
|
|
38
39
|
MessageCircle: IconMessageCircle,
|
|
39
40
|
ScreenShare: IconScreenShare,
|
|
40
41
|
Brush: IconBrush,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgSwitcher.js","sourceRoot":"","sources":["../../../src/client/org/OrgSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAA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C/C,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAC9B,QAAQ,EAAE,YAAY,CAAC,SAAS,EAChC,SAAS,EAAC,8GAA8G,uBAGjH,EACT,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,YAAY,CAAC,SAAS,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EACvD,SAAS,EAAC,yKAAyK,YAElL,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CACxB,KAAC,WAAW,IAAC,SAAS,EAAC,sBAAsB,GAAG,CACjD,CAAC,CAAC,CAAC,CACF,aAAa,CACd,GACM,IACL,IACD,CACR,IACwB,GACH,IACJ,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useNavigate } from \"react-router\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport {\n IconApps,\n IconArrowUpRight,\n IconBrain,\n IconBrandJira,\n IconBrush,\n IconBuilding,\n IconCalendar,\n IconCalendarTime,\n IconChartBar,\n IconCheck,\n IconChevronRight,\n IconClipboardList,\n IconCode,\n IconFileText,\n IconLoader2,\n IconLogout,\n IconMail,\n IconMessageCircle,\n IconMicrophone,\n IconNote,\n IconPhone,\n IconPhoto,\n IconPlus,\n IconPresentation,\n IconScreenShare,\n IconSelector,\n IconSettings,\n IconStack2,\n IconUser,\n IconUserPlus,\n IconUsers,\n IconVideo,\n IconWorld,\n} from \"@tabler/icons-react\";\nimport {\n useOrg,\n useSwitchOrg,\n useCreateOrg,\n useInviteMember,\n useAcceptInvitation,\n useJoinByDomain,\n} from \"./hooks.js\";\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n ORG_SWITCHER_MAX_APP_LINKS,\n useOrgSwitcherAppLinks,\n visibleOrgAppLinks,\n type OrgSwitcherAppLink,\n} from \"./workspace-app-links.js\";\n\nexport interface OrgSwitcherProps {\n className?: string;\n /** Hide entirely when the user only belongs to one org. Default: false. */\n hideWhenSingle?: boolean;\n /** Keep the switcher's button height reserved while org state is loading. */\n reserveSpace?: boolean;\n /**\n * Path to navigate to when the user clicks \"Organization settings\".\n * Defaults to `/team`, the standard organization-management route. Templates\n * with an established org surface can pass their own path; pass `null` to\n * only open the in-sidebar settings panel.\n */\n settingsPath?: string | null;\n}\n\nfunction personalLabelFromEmail(email: string | null | undefined): string {\n if (!email) return \"Personal\";\n const local = email.split(\"@\")[0] ?? email;\n const cleaned = local.replace(/[._-]+/g, \" \").trim();\n if (!cleaned) return \"Personal\";\n return cleaned\n .split(\" \")\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \");\n}\n\ntype Mode = \"list\" | \"create\" | \"invite\";\n\nconst POPOVER_CONTENT_CLASS =\n \"z-50 min-w-[14rem] rounded-md border border-border bg-popover py-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst ITEM_CLASS =\n \"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-foreground hover:bg-accent focus-visible:bg-accent focus:outline-none disabled:opacity-50 disabled:pointer-events-none\";\n\nconst SECTION_LABEL_CLASS =\n \"px-2.5 pt-1 pb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground\";\n\nconst APP_SUBMENU_CONTENT_CLASS =\n \"z-50 w-72 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst DEFAULT_ORGANIZATION_SETTINGS_PATH = \"/team\";\n\nconst APP_ICON_MAP: Record<string, typeof IconApps> = {\n Mail: IconMail,\n CalendarDays: IconCalendar,\n FileText: IconFileText,\n BarChart2: IconChartBar,\n GalleryHorizontal: IconPresentation,\n Video: IconVideo,\n BrandJira: IconBrandJira,\n ClipboardList: IconClipboardList,\n Users: IconUsers,\n Code: IconCode,\n MessageCircle: IconMessageCircle,\n ScreenShare: IconScreenShare,\n Brush: IconBrush,\n Brain: IconBrain,\n Phone: IconPhone,\n Note: IconNote,\n Microphone: IconMicrophone,\n CalendarTime: IconCalendarTime,\n Globe: IconWorld,\n Photo: IconPhoto,\n};\n\nfunction appMenuIcon(app: OrgSwitcherAppLink): typeof IconApps {\n if (app.icon) return APP_ICON_MAP[app.icon] ?? IconStack2;\n return app.isDispatch ? IconMessageCircle : IconStack2;\n}\n\nfunction organizationSettingsPath(path: string): string {\n return `${path.replace(/#.*$/, \"\")}#workspace-settings`;\n}\n\nfunction AppMenuLink({\n app,\n onNavigate,\n}: {\n app: OrgSwitcherAppLink;\n onNavigate: () => void;\n}) {\n const Icon = appMenuIcon(app);\n return (\n <a\n href={app.href}\n onClick={onNavigate}\n className={`flex items-center gap-2 rounded-sm px-2.5 py-2 text-xs outline-none hover:bg-accent focus:bg-accent ${\n app.isDispatch ? \"border border-primary/20 bg-primary/5\" : \"\"\n }`}\n >\n <span\n className={`flex h-7 w-7 shrink-0 items-center justify-center rounded-md ${\n app.isDispatch\n ? \"bg-primary text-primary-foreground\"\n : \"bg-muted text-muted-foreground\"\n }`}\n >\n <Icon className=\"h-3.5 w-3.5\" />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-medium text-foreground\">\n {app.name}\n </span>\n <span className=\"block truncate text-[11px] text-muted-foreground\">\n {app.isDispatch\n ? \"Main hub\"\n : app.status === \"pending\"\n ? \"Building\"\n : \"Open app\"}\n </span>\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n );\n}\n\nfunction AppsSubmenu({\n apps,\n isWorkspace,\n isLoading,\n dispatchHref,\n dispatchAllAppsHref,\n onNavigate,\n}: {\n apps: OrgSwitcherAppLink[];\n isWorkspace: boolean;\n isLoading: boolean;\n dispatchHref: string;\n dispatchAllAppsHref: string;\n onNavigate: () => void;\n}) {\n const { links, overflowCount } = visibleOrgAppLinks(apps);\n const visibleDispatchApp = links.find((app) => app.isDispatch);\n const dispatchApp =\n visibleDispatchApp ??\n ({\n id: \"dispatch\",\n name: \"Dispatch\",\n href: dispatchHref,\n isDispatch: true,\n status: \"ready\",\n } satisfies OrgSwitcherAppLink);\n const visibleNonDispatch = links\n .filter((app) => !app.isDispatch)\n .slice(0, visibleDispatchApp ? undefined : ORG_SWITCHER_MAX_APP_LINKS - 1);\n const shownCount = (dispatchApp ? 1 : 0) + visibleNonDispatch.length;\n const remainingCount = Math.max(overflowCount, apps.length - shownCount);\n\n return (\n <PopoverPrimitive.Root>\n <PopoverPrimitive.Trigger asChild>\n <button type=\"button\" className={`${ITEM_CLASS} cursor-pointer`}>\n <IconApps className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Apps</span>\n <span className=\"text-[11px] text-muted-foreground\">\n {isLoading ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n apps.length\n )}\n </span>\n <IconChevronRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"right\"\n align=\"start\"\n sideOffset={8}\n collisionPadding={12}\n className={APP_SUBMENU_CONTENT_CLASS}\n >\n <div className=\"px-2.5 py-1.5\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">\n {isWorkspace ? \"Workspace apps\" : \"Default apps\"}\n </div>\n <div className=\"mt-0.5 text-[11px] text-muted-foreground\">\n {isWorkspace\n ? \"Dispatch is the workspace hub.\"\n : \"Dispatch is the home base.\"}\n </div>\n </div>\n\n <AppMenuLink app={dispatchApp} onNavigate={onNavigate} />\n\n {visibleNonDispatch.length > 0 && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n {visibleNonDispatch.map((app) => (\n <AppMenuLink key={app.id} app={app} onNavigate={onNavigate} />\n ))}\n\n {remainingCount > 0 && (\n <>\n <div className=\"my-1 h-px bg-border\" />\n <a\n href={dispatchAllAppsHref}\n onClick={onNavigate}\n className=\"flex items-center gap-2 rounded-sm px-2.5 py-1.5 text-xs text-foreground outline-none hover:bg-accent focus:bg-accent\"\n >\n <IconMessageCircle className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1\">\n {`View ${remainingCount} more in Dispatch`}\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n </>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n\n/**\n * Compact org switcher button. Shows the active org (or \"Personal\" when the\n * user has none); opens a popover with the user's other orgs, pending\n * invitations, inline forms to create a new org / invite a teammate, and a\n * sign-out item. Renders nothing in dev / no-auth mode.\n */\nexport function OrgSwitcher({\n className,\n hideWhenSingle,\n reserveSpace,\n settingsPath = DEFAULT_ORGANIZATION_SETTINGS_PATH,\n}: OrgSwitcherProps) {\n const { data: org, isLoading } = useOrg();\n const switchOrg = useSwitchOrg();\n const createOrg = useCreateOrg();\n const inviteMember = useInviteMember();\n const acceptInvitation = useAcceptInvitation();\n const joinByDomain = useJoinByDomain();\n const navigate = useNavigate();\n const [open, setOpen] = useState(false);\n const [mode, setMode] = useState<Mode>(\"list\");\n const [newName, setNewName] = useState(\"\");\n const [inviteEmail, setInviteEmail] = useState(\"\");\n const [signingOut, setSigningOut] = useState(false);\n const [joiningOrgId, setJoiningOrgId] = useState<string | null>(null);\n const appLinks = useOrgSwitcherAppLinks(open);\n\n const handleOpenChange = (next: boolean) => {\n setOpen(next);\n if (!next) {\n setMode(\"list\");\n setNewName(\"\");\n setInviteEmail(\"\");\n }\n };\n\n const handleSignOut = async () => {\n if (signingOut) return;\n setSigningOut(true);\n try {\n await fetch(agentNativePath(\"/_agent-native/auth/logout\"), {\n method: \"POST\",\n credentials: \"include\",\n });\n } catch {\n /* fall through to reload — server may already have cleared the cookie */\n }\n window.location.reload();\n };\n\n if (!org) {\n return reserveSpace && isLoading ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const orgs = org.orgs ?? [];\n const pendingInvitations = org.pendingInvitations ?? [];\n const domainMatches = org.domainMatches ?? [];\n const orgCount = orgs.length;\n const hasAny =\n orgCount > 0 || pendingInvitations.length > 0 || domainMatches.length > 0;\n if (!hasAny && !org.email) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n if (\n hideWhenSingle &&\n orgCount < 2 &&\n pendingInvitations.length === 0 &&\n domainMatches.length === 0\n ) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const canInvite =\n !!org.orgId && (org.role === \"owner\" || org.role === \"admin\");\n\n const personalLabel = personalLabelFromEmail(org.email);\n const inOrg = !!org.orgId;\n const buttonLabel = org.orgName ?? \"Personal\";\n const ButtonIcon = inOrg ? IconBuilding : IconUser;\n const organizationSettingsHref = settingsPath\n ? organizationSettingsPath(settingsPath)\n : null;\n\n return (\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n <PopoverPrimitive.Trigger asChild>\n <button\n type=\"button\"\n className={`flex w-full items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent/50 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer ${className ?? \"\"}`}\n >\n <ButtonIcon className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-left\">{buttonLabel}</span>\n <IconSelector className=\"h-3 w-3 shrink-0 opacity-50\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"top\"\n align=\"start\"\n sideOffset={6}\n collisionPadding={12}\n className={POPOVER_CONTENT_CLASS}\n onOpenAutoFocus={(e) => {\n // Don't auto-focus the first item — feels heavy on a switcher.\n if (mode === \"list\") e.preventDefault();\n }}\n >\n {mode === \"list\" && (\n <>\n {!inOrg && (\n <div\n className=\"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-muted-foreground\"\n aria-disabled=\"true\"\n >\n <IconUser className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-left\">\n Personal ({personalLabel})\n </span>\n </div>\n )}\n {orgs.length > 0 && (\n <div className={SECTION_LABEL_CLASS}>Organizations</div>\n )}\n {orgs.map((o) => (\n <button\n key={o.orgId}\n type=\"button\"\n onClick={async () => {\n if (o.orgId === org.orgId) {\n setOpen(false);\n return;\n }\n try {\n await switchOrg.mutateAsync(o.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via switchOrg.error */\n }\n }}\n disabled={switchOrg.isPending}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-left\">{o.orgName}</span>\n {o.orgId === org.orgId && (\n <IconCheck className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n )}\n </button>\n ))}\n\n {pendingInvitations.length > 0 && (\n <>\n {orgs.length > 0 && <div className=\"my-1 h-px bg-border\" />}\n <div className={SECTION_LABEL_CLASS}>Invitations</div>\n {pendingInvitations.map((inv) => (\n <div\n key={inv.id}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {inv.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n try {\n await acceptInvitation.mutateAsync(inv.id);\n setOpen(false);\n } catch {\n /* error surfaced via acceptInvitation.error */\n }\n }}\n disabled={acceptInvitation.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {acceptInvitation.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n ))}\n </>\n )}\n\n {domainMatches.length > 0 && (\n <>\n {(orgs.length > 0 || pendingInvitations.length > 0) && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n <div className={SECTION_LABEL_CLASS}>Join your team</div>\n {domainMatches.map((match) => {\n const isJoining =\n joinByDomain.isPending && joiningOrgId === match.orgId;\n return (\n <div\n key={match.orgId}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {match.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n setJoiningOrgId(match.orgId);\n try {\n await joinByDomain.mutateAsync(match.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via joinByDomain.error */\n } finally {\n setJoiningOrgId(null);\n }\n }}\n disabled={joinByDomain.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {isJoining ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n );\n })}\n </>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <AppsSubmenu\n apps={appLinks.apps}\n isWorkspace={appLinks.isWorkspace}\n isLoading={appLinks.isLoading}\n dispatchHref={appLinks.dispatchHref}\n dispatchAllAppsHref={appLinks.dispatchAllAppsHref}\n onNavigate={() => setOpen(false)}\n />\n {inOrg && (\n <button\n type=\"button\"\n onClick={() => {\n setOpen(false);\n window.dispatchEvent(new CustomEvent(\"agent-panel:open\"));\n window.dispatchEvent(\n new CustomEvent(\"agent-panel:open-settings\", {\n detail: { section: \"workspace-settings\" },\n }),\n );\n if (organizationSettingsHref) {\n navigate(organizationSettingsHref);\n }\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconSettings className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">\n Organization settings\n </span>\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => {\n // Clear any leftover input from a prior session — otherwise\n // the create form re-opens prefilled with the just-created\n // org's name and looks like a create dialog for the new org.\n setNewName(\"\");\n setMode(\"create\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Create organization</span>\n </button>\n {canInvite && (\n <button\n type=\"button\"\n onClick={() => {\n setInviteEmail(\"\");\n setMode(\"invite\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconUserPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Invite member</span>\n </button>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <button\n type=\"button\"\n onClick={handleSignOut}\n disabled={signingOut}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n {signingOut ? (\n <IconLoader2 className=\"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground\" />\n ) : (\n <IconLogout className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n )}\n <span className=\"flex-1 text-left\">\n Sign out\n {org.email ? (\n <span className=\"ml-1 text-muted-foreground\">\n ({org.email})\n </span>\n ) : null}\n </span>\n </button>\n\n {(switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) && (\n <div className=\"px-2.5 pt-1 text-[11px] text-destructive\">\n {\n (\n (switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) as Error\n ).message\n }\n </div>\n )}\n </>\n )}\n\n {mode === \"create\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const name = newName.trim();\n if (!name) return;\n try {\n await createOrg.mutateAsync(name);\n handleOpenChange(false);\n } catch {\n /* error surfaced via createOrg.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n New organization\n </div>\n <input\n autoFocus\n value={newName}\n onChange={(e) => setNewName(e.target.value)}\n placeholder=\"Organization name\"\n disabled={createOrg.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {createOrg.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(createOrg.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={createOrg.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={createOrg.isPending || !newName.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {createOrg.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Create\"\n )}\n </button>\n </div>\n </form>\n )}\n\n {mode === \"invite\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const email = inviteEmail.trim();\n if (!email) return;\n try {\n await inviteMember.mutateAsync(email);\n setInviteEmail(\"\");\n setMode(\"list\");\n } catch {\n /* error surfaced via inviteMember.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n Invite to {org.orgName}\n </div>\n <input\n autoFocus\n type=\"email\"\n value={inviteEmail}\n onChange={(e) => setInviteEmail(e.target.value)}\n placeholder=\"teammate@company.com\"\n disabled={inviteMember.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {inviteMember.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(inviteMember.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={inviteMember.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={inviteMember.isPending || !inviteEmail.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {inviteMember.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Send invite\"\n )}\n </button>\n </div>\n </form>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"OrgSwitcher.js","sourceRoot":"","sources":["../../../src/client/org/OrgSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,iBA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Q,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAC9B,QAAQ,EAAE,YAAY,CAAC,SAAS,EAChC,SAAS,EAAC,8GAA8G,uBAGjH,EACT,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,YAAY,CAAC,SAAS,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EACvD,SAAS,EAAC,yKAAyK,YAElL,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CACxB,KAAC,WAAW,IAAC,SAAS,EAAC,sBAAsB,GAAG,CACjD,CAAC,CAAC,CAAC,CACF,aAAa,CACd,GACM,IACL,IACD,CACR,IACwB,GACH,IACJ,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useNavigate } from \"react-router\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport {\n IconApps,\n IconArrowUpRight,\n IconBrain,\n IconBrandJira,\n IconBrush,\n IconBuilding,\n IconCalendar,\n IconCalendarTime,\n IconChartBar,\n IconCheck,\n IconChevronRight,\n IconClipboardList,\n IconCode,\n IconContract,\n IconFileText,\n IconLoader2,\n IconLogout,\n IconMail,\n IconMessageCircle,\n IconMicrophone,\n IconNote,\n IconPhone,\n IconPhoto,\n IconPlus,\n IconPresentation,\n IconScreenShare,\n IconSelector,\n IconSettings,\n IconStack2,\n IconUser,\n IconUserPlus,\n IconUsers,\n IconVideo,\n IconWorld,\n} from \"@tabler/icons-react\";\nimport {\n useOrg,\n useSwitchOrg,\n useCreateOrg,\n useInviteMember,\n useAcceptInvitation,\n useJoinByDomain,\n} from \"./hooks.js\";\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n ORG_SWITCHER_MAX_APP_LINKS,\n useOrgSwitcherAppLinks,\n visibleOrgAppLinks,\n type OrgSwitcherAppLink,\n} from \"./workspace-app-links.js\";\n\nexport interface OrgSwitcherProps {\n className?: string;\n /** Hide entirely when the user only belongs to one org. Default: false. */\n hideWhenSingle?: boolean;\n /** Keep the switcher's button height reserved while org state is loading. */\n reserveSpace?: boolean;\n /**\n * Path to navigate to when the user clicks \"Organization settings\".\n * Defaults to `/team`, the standard organization-management route. Templates\n * with an established org surface can pass their own path; pass `null` to\n * only open the in-sidebar settings panel.\n */\n settingsPath?: string | null;\n}\n\nfunction personalLabelFromEmail(email: string | null | undefined): string {\n if (!email) return \"Personal\";\n const local = email.split(\"@\")[0] ?? email;\n const cleaned = local.replace(/[._-]+/g, \" \").trim();\n if (!cleaned) return \"Personal\";\n return cleaned\n .split(\" \")\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \");\n}\n\ntype Mode = \"list\" | \"create\" | \"invite\";\n\nconst POPOVER_CONTENT_CLASS =\n \"z-50 min-w-[14rem] rounded-md border border-border bg-popover py-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst ITEM_CLASS =\n \"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-foreground hover:bg-accent focus-visible:bg-accent focus:outline-none disabled:opacity-50 disabled:pointer-events-none\";\n\nconst SECTION_LABEL_CLASS =\n \"px-2.5 pt-1 pb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground\";\n\nconst APP_SUBMENU_CONTENT_CLASS =\n \"z-50 w-72 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst DEFAULT_ORGANIZATION_SETTINGS_PATH = \"/team\";\n\nconst APP_ICON_MAP: Record<string, typeof IconApps> = {\n Mail: IconMail,\n CalendarDays: IconCalendar,\n FileText: IconFileText,\n BarChart2: IconChartBar,\n GalleryHorizontal: IconPresentation,\n Video: IconVideo,\n BrandJira: IconBrandJira,\n ClipboardList: IconClipboardList,\n Users: IconUsers,\n Code: IconCode,\n Contract: IconContract,\n MessageCircle: IconMessageCircle,\n ScreenShare: IconScreenShare,\n Brush: IconBrush,\n Brain: IconBrain,\n Phone: IconPhone,\n Note: IconNote,\n Microphone: IconMicrophone,\n CalendarTime: IconCalendarTime,\n Globe: IconWorld,\n Photo: IconPhoto,\n};\n\nfunction appMenuIcon(app: OrgSwitcherAppLink): typeof IconApps {\n if (app.icon) return APP_ICON_MAP[app.icon] ?? IconStack2;\n return app.isDispatch ? IconMessageCircle : IconStack2;\n}\n\nfunction organizationSettingsPath(path: string): string {\n return `${path.replace(/#.*$/, \"\")}#workspace-settings`;\n}\n\nfunction AppMenuLink({\n app,\n onNavigate,\n}: {\n app: OrgSwitcherAppLink;\n onNavigate: () => void;\n}) {\n const Icon = appMenuIcon(app);\n return (\n <a\n href={app.href}\n onClick={onNavigate}\n className={`flex items-center gap-2 rounded-sm px-2.5 py-2 text-xs outline-none hover:bg-accent focus:bg-accent ${\n app.isDispatch ? \"border border-primary/20 bg-primary/5\" : \"\"\n }`}\n >\n <span\n className={`flex h-7 w-7 shrink-0 items-center justify-center rounded-md ${\n app.isDispatch\n ? \"bg-primary text-primary-foreground\"\n : \"bg-muted text-muted-foreground\"\n }`}\n >\n <Icon className=\"h-3.5 w-3.5\" />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-medium text-foreground\">\n {app.name}\n </span>\n <span className=\"block truncate text-[11px] text-muted-foreground\">\n {app.isDispatch\n ? \"Main hub\"\n : app.status === \"pending\"\n ? \"Building\"\n : \"Open app\"}\n </span>\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n );\n}\n\nfunction AppsSubmenu({\n apps,\n isWorkspace,\n isLoading,\n dispatchHref,\n dispatchAllAppsHref,\n onNavigate,\n}: {\n apps: OrgSwitcherAppLink[];\n isWorkspace: boolean;\n isLoading: boolean;\n dispatchHref: string;\n dispatchAllAppsHref: string;\n onNavigate: () => void;\n}) {\n const { links, overflowCount } = visibleOrgAppLinks(apps);\n const visibleDispatchApp = links.find((app) => app.isDispatch);\n const dispatchApp =\n visibleDispatchApp ??\n ({\n id: \"dispatch\",\n name: \"Dispatch\",\n href: dispatchHref,\n isDispatch: true,\n status: \"ready\",\n } satisfies OrgSwitcherAppLink);\n const visibleNonDispatch = links\n .filter((app) => !app.isDispatch)\n .slice(0, visibleDispatchApp ? undefined : ORG_SWITCHER_MAX_APP_LINKS - 1);\n const shownCount = (dispatchApp ? 1 : 0) + visibleNonDispatch.length;\n const remainingCount = Math.max(overflowCount, apps.length - shownCount);\n\n return (\n <PopoverPrimitive.Root>\n <PopoverPrimitive.Trigger asChild>\n <button type=\"button\" className={`${ITEM_CLASS} cursor-pointer`}>\n <IconApps className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Apps</span>\n <span className=\"text-[11px] text-muted-foreground\">\n {isLoading ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n apps.length\n )}\n </span>\n <IconChevronRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"right\"\n align=\"start\"\n sideOffset={8}\n collisionPadding={12}\n className={APP_SUBMENU_CONTENT_CLASS}\n >\n <div className=\"px-2.5 py-1.5\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">\n {isWorkspace ? \"Workspace apps\" : \"Default apps\"}\n </div>\n <div className=\"mt-0.5 text-[11px] text-muted-foreground\">\n {isWorkspace\n ? \"Dispatch is the workspace hub.\"\n : \"Dispatch is the home base.\"}\n </div>\n </div>\n\n <AppMenuLink app={dispatchApp} onNavigate={onNavigate} />\n\n {visibleNonDispatch.length > 0 && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n {visibleNonDispatch.map((app) => (\n <AppMenuLink key={app.id} app={app} onNavigate={onNavigate} />\n ))}\n\n {remainingCount > 0 && (\n <>\n <div className=\"my-1 h-px bg-border\" />\n <a\n href={dispatchAllAppsHref}\n onClick={onNavigate}\n className=\"flex items-center gap-2 rounded-sm px-2.5 py-1.5 text-xs text-foreground outline-none hover:bg-accent focus:bg-accent\"\n >\n <IconMessageCircle className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1\">\n {`View ${remainingCount} more in Dispatch`}\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n </>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n\n/**\n * Compact org switcher button. Shows the active org (or \"Personal\" when the\n * user has none); opens a popover with the user's other orgs, pending\n * invitations, inline forms to create a new org / invite a teammate, and a\n * sign-out item. Renders nothing in dev / no-auth mode.\n */\nexport function OrgSwitcher({\n className,\n hideWhenSingle,\n reserveSpace,\n settingsPath = DEFAULT_ORGANIZATION_SETTINGS_PATH,\n}: OrgSwitcherProps) {\n const { data: org, isLoading } = useOrg();\n const switchOrg = useSwitchOrg();\n const createOrg = useCreateOrg();\n const inviteMember = useInviteMember();\n const acceptInvitation = useAcceptInvitation();\n const joinByDomain = useJoinByDomain();\n const navigate = useNavigate();\n const [open, setOpen] = useState(false);\n const [mode, setMode] = useState<Mode>(\"list\");\n const [newName, setNewName] = useState(\"\");\n const [inviteEmail, setInviteEmail] = useState(\"\");\n const [signingOut, setSigningOut] = useState(false);\n const [joiningOrgId, setJoiningOrgId] = useState<string | null>(null);\n const appLinks = useOrgSwitcherAppLinks(open);\n\n const handleOpenChange = (next: boolean) => {\n setOpen(next);\n if (!next) {\n setMode(\"list\");\n setNewName(\"\");\n setInviteEmail(\"\");\n }\n };\n\n const handleSignOut = async () => {\n if (signingOut) return;\n setSigningOut(true);\n try {\n await fetch(agentNativePath(\"/_agent-native/auth/logout\"), {\n method: \"POST\",\n credentials: \"include\",\n });\n } catch {\n /* fall through to reload — server may already have cleared the cookie */\n }\n window.location.reload();\n };\n\n if (!org) {\n return reserveSpace && isLoading ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const orgs = org.orgs ?? [];\n const pendingInvitations = org.pendingInvitations ?? [];\n const domainMatches = org.domainMatches ?? [];\n const orgCount = orgs.length;\n const hasAny =\n orgCount > 0 || pendingInvitations.length > 0 || domainMatches.length > 0;\n if (!hasAny && !org.email) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n if (\n hideWhenSingle &&\n orgCount < 2 &&\n pendingInvitations.length === 0 &&\n domainMatches.length === 0\n ) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const canInvite =\n !!org.orgId && (org.role === \"owner\" || org.role === \"admin\");\n\n const personalLabel = personalLabelFromEmail(org.email);\n const inOrg = !!org.orgId;\n const buttonLabel = org.orgName ?? \"Personal\";\n const ButtonIcon = inOrg ? IconBuilding : IconUser;\n const organizationSettingsHref = settingsPath\n ? organizationSettingsPath(settingsPath)\n : null;\n\n return (\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n <PopoverPrimitive.Trigger asChild>\n <button\n type=\"button\"\n className={`flex w-full items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent/50 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer ${className ?? \"\"}`}\n >\n <ButtonIcon className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-left\">{buttonLabel}</span>\n <IconSelector className=\"h-3 w-3 shrink-0 opacity-50\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"top\"\n align=\"start\"\n sideOffset={6}\n collisionPadding={12}\n className={POPOVER_CONTENT_CLASS}\n onOpenAutoFocus={(e) => {\n // Don't auto-focus the first item — feels heavy on a switcher.\n if (mode === \"list\") e.preventDefault();\n }}\n >\n {mode === \"list\" && (\n <>\n {!inOrg && (\n <div\n className=\"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-muted-foreground\"\n aria-disabled=\"true\"\n >\n <IconUser className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-left\">\n Personal ({personalLabel})\n </span>\n </div>\n )}\n {orgs.length > 0 && (\n <div className={SECTION_LABEL_CLASS}>Organizations</div>\n )}\n {orgs.map((o) => (\n <button\n key={o.orgId}\n type=\"button\"\n onClick={async () => {\n if (o.orgId === org.orgId) {\n setOpen(false);\n return;\n }\n try {\n await switchOrg.mutateAsync(o.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via switchOrg.error */\n }\n }}\n disabled={switchOrg.isPending}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-left\">{o.orgName}</span>\n {o.orgId === org.orgId && (\n <IconCheck className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n )}\n </button>\n ))}\n\n {pendingInvitations.length > 0 && (\n <>\n {orgs.length > 0 && <div className=\"my-1 h-px bg-border\" />}\n <div className={SECTION_LABEL_CLASS}>Invitations</div>\n {pendingInvitations.map((inv) => (\n <div\n key={inv.id}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {inv.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n try {\n await acceptInvitation.mutateAsync(inv.id);\n setOpen(false);\n } catch {\n /* error surfaced via acceptInvitation.error */\n }\n }}\n disabled={acceptInvitation.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {acceptInvitation.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n ))}\n </>\n )}\n\n {domainMatches.length > 0 && (\n <>\n {(orgs.length > 0 || pendingInvitations.length > 0) && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n <div className={SECTION_LABEL_CLASS}>Join your team</div>\n {domainMatches.map((match) => {\n const isJoining =\n joinByDomain.isPending && joiningOrgId === match.orgId;\n return (\n <div\n key={match.orgId}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {match.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n setJoiningOrgId(match.orgId);\n try {\n await joinByDomain.mutateAsync(match.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via joinByDomain.error */\n } finally {\n setJoiningOrgId(null);\n }\n }}\n disabled={joinByDomain.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {isJoining ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n );\n })}\n </>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <AppsSubmenu\n apps={appLinks.apps}\n isWorkspace={appLinks.isWorkspace}\n isLoading={appLinks.isLoading}\n dispatchHref={appLinks.dispatchHref}\n dispatchAllAppsHref={appLinks.dispatchAllAppsHref}\n onNavigate={() => setOpen(false)}\n />\n {inOrg && (\n <button\n type=\"button\"\n onClick={() => {\n setOpen(false);\n window.dispatchEvent(new CustomEvent(\"agent-panel:open\"));\n window.dispatchEvent(\n new CustomEvent(\"agent-panel:open-settings\", {\n detail: { section: \"workspace-settings\" },\n }),\n );\n if (organizationSettingsHref) {\n navigate(organizationSettingsHref);\n }\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconSettings className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">\n Organization settings\n </span>\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => {\n // Clear any leftover input from a prior session — otherwise\n // the create form re-opens prefilled with the just-created\n // org's name and looks like a create dialog for the new org.\n setNewName(\"\");\n setMode(\"create\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Create organization</span>\n </button>\n {canInvite && (\n <button\n type=\"button\"\n onClick={() => {\n setInviteEmail(\"\");\n setMode(\"invite\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconUserPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Invite member</span>\n </button>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <button\n type=\"button\"\n onClick={handleSignOut}\n disabled={signingOut}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n {signingOut ? (\n <IconLoader2 className=\"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground\" />\n ) : (\n <IconLogout className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n )}\n <span className=\"flex-1 text-left\">\n Sign out\n {org.email ? (\n <span className=\"ml-1 text-muted-foreground\">\n ({org.email})\n </span>\n ) : null}\n </span>\n </button>\n\n {(switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) && (\n <div className=\"px-2.5 pt-1 text-[11px] text-destructive\">\n {\n (\n (switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) as Error\n ).message\n }\n </div>\n )}\n </>\n )}\n\n {mode === \"create\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const name = newName.trim();\n if (!name) return;\n try {\n await createOrg.mutateAsync(name);\n handleOpenChange(false);\n } catch {\n /* error surfaced via createOrg.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n New organization\n </div>\n <input\n autoFocus\n value={newName}\n onChange={(e) => setNewName(e.target.value)}\n placeholder=\"Organization name\"\n disabled={createOrg.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {createOrg.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(createOrg.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={createOrg.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={createOrg.isPending || !newName.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {createOrg.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Create\"\n )}\n </button>\n </div>\n </form>\n )}\n\n {mode === \"invite\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const email = inviteEmail.trim();\n if (!email) return;\n try {\n await inviteMember.mutateAsync(email);\n setInviteEmail(\"\");\n setMode(\"list\");\n } catch {\n /* error surfaced via inviteMember.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n Invite to {org.orgName}\n </div>\n <input\n autoFocus\n type=\"email\"\n value={inviteEmail}\n onChange={(e) => setInviteEmail(e.target.value)}\n placeholder=\"teammate@company.com\"\n disabled={inviteMember.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {inviteMember.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(inviteMember.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={inviteMember.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={inviteMember.isPending || !inviteEmail.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {inviteMember.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Send invite\"\n )}\n </button>\n </div>\n </form>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n"]}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { AgentRun } from "../../progress/types.js";
|
|
2
|
+
type AgentRunDto = AgentRun;
|
|
3
|
+
type RunsTrayTriggerVariant = "icon" | "pill";
|
|
1
4
|
interface RunsTrayProps {
|
|
2
5
|
/** Poll interval in ms. 0 disables. Default 3000. */
|
|
3
6
|
pollMs?: number;
|
|
@@ -5,14 +8,21 @@ interface RunsTrayProps {
|
|
|
5
8
|
limit?: number;
|
|
6
9
|
/** Hide the trigger entirely when no active runs. Default true. */
|
|
7
10
|
hideWhenIdle?: boolean;
|
|
11
|
+
/** Include recent terminal runs instead of active runs only. Defaults to !hideWhenIdle. */
|
|
12
|
+
showRecent?: boolean;
|
|
13
|
+
/** Compact icon for app headers, or a labeled pill for the agent panel. */
|
|
14
|
+
triggerVariant?: RunsTrayTriggerVariant;
|
|
15
|
+
/** Called when a run can open a related agent chat thread. */
|
|
16
|
+
onOpenThread?: (threadId: string, run: AgentRunDto) => void;
|
|
17
|
+
align?: "start" | "center" | "end";
|
|
8
18
|
className?: string;
|
|
9
19
|
}
|
|
10
20
|
/**
|
|
11
|
-
* Header-bar progress indicator. Shows a spinner icon
|
|
12
|
-
* when runs are active; opens a
|
|
21
|
+
* Header-bar progress indicator. Shows a spinner icon or labeled Runs pill
|
|
22
|
+
* with a count badge when runs are active; opens a popover with live progress.
|
|
13
23
|
* Same inline-header pattern as <NotificationsBell /> — drop it into the
|
|
14
24
|
* header, no floating overlay over the main content.
|
|
15
25
|
*/
|
|
16
|
-
export declare function RunsTray({ pollMs, limit, hideWhenIdle, className, }: RunsTrayProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function RunsTray({ pollMs, limit, hideWhenIdle, showRecent, triggerVariant, onOpenThread, align, className, }: RunsTrayProps): import("react/jsx-runtime").JSX.Element;
|
|
17
27
|
export {};
|
|
18
28
|
//# sourceMappingURL=RunsTray.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunsTray.d.ts","sourceRoot":"","sources":["../../../src/client/progress/RunsTray.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RunsTray.d.ts","sourceRoot":"","sources":["../../../src/client/progress/RunsTray.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,yBAAyB,CAAC;AAcxE,KAAK,WAAW,GAAG,QAAQ,CAAC;AAC5B,KAAK,sBAAsB,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C,UAAU,aAAa;IACrB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5D,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,MAAa,EACb,KAAS,EACT,YAAmB,EACnB,UAAU,EACV,cAAuB,EACvB,YAAY,EACZ,KAAa,EACb,SAAS,GACV,EAAE,aAAa,2CAqLf"}
|