@mcp-b/react-components 0.46.7 → 0.48.0

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.
Files changed (130) hide show
  1. package/dist/{CodeBlock-CcteqDvA.js → CodeBlock-BSJl682D.js} +1 -1
  2. package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
  3. package/dist/{FileTree-jtP9471I.js → FileTree-DvE0hNZu.js} +1 -1
  4. package/dist/{SetupChecklist-BXwSSorj.js → SetupChecklist-DeTU9YpW.js} +1 -1
  5. package/dist/ThinkChat-CwMdEum8.d.ts +185 -0
  6. package/dist/{ThinkChat-qztQ6Clo.js → ThinkChat-DiI6hhDP.js} +14 -14
  7. package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +91 -0
  8. package/dist/{Workspace-DZusrEeP.d.ts → Workspace-LIoU30n7.d.ts} +13 -2
  9. package/dist/{WorkspaceFileView-D0HyoUV8.js → WorkspaceFileView-C_WnYm-a.js} +4 -4
  10. package/dist/{WorkspaceLink-DtH66bAY.js → WorkspaceLink-B1d2GIGl.js} +7 -2
  11. package/dist/WorkspaceLive-DfjH1Ypm.d.ts +61 -0
  12. package/dist/{WorkspaceMessageResponse-CJCmGvTx.js → WorkspaceMessageResponse-BqOezptB.js} +79 -40
  13. package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +48 -0
  14. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  15. package/dist/components/agents-sdk/AgentChat.js +2 -2
  16. package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
  17. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  18. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  19. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
  20. package/dist/components/agents-sdk/ManagerOffice.d.ts +41 -50
  21. package/dist/components/agents-sdk/ManagerOffice.js +359 -978
  22. package/dist/components/agents-sdk/McpConnectionRequest.js +1 -1
  23. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  24. package/dist/components/agents-sdk/McpServerPicker.js +1 -1
  25. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  26. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  27. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  28. package/dist/components/agents-sdk/ThinkChat.d.ts +1 -180
  29. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  30. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1 -1
  31. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  32. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  33. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -1
  34. package/dist/components/agents-sdk/ThinkFullApp.d.ts +12 -3
  35. package/dist/components/agents-sdk/ThinkFullApp.js +15 -3
  36. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
  37. package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
  38. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +1 -1
  39. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +20 -5
  40. package/dist/components/agents-sdk/ThinkSidepanel.js +48 -36
  41. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -90
  42. package/dist/components/agents-sdk/ThinkThreadPicker.js +1 -1
  43. package/dist/components/agents-sdk/Workspace.d.ts +2 -2
  44. package/dist/components/agents-sdk/Workspace.js +13 -10
  45. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  46. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  47. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +45 -0
  48. package/dist/components/agents-sdk/WorkspaceConcept.js +42 -0
  49. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +96 -0
  50. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +429 -0
  51. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +115 -0
  52. package/dist/components/agents-sdk/WorkspaceExecution.js +330 -0
  53. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  54. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -2
  55. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  56. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  57. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  58. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -0
  59. package/dist/components/agents-sdk/WorkspaceLive.js +113 -0
  60. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +2 -2
  61. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +2 -2
  62. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  63. package/dist/components/agents-sdk/WorkspaceProject.d.ts +131 -0
  64. package/dist/components/agents-sdk/WorkspaceProject.js +238 -0
  65. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +47 -0
  66. package/dist/components/agents-sdk/WorkspaceUserScript.js +146 -0
  67. package/dist/components/ai-sdk/Activity.js +1 -1
  68. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  69. package/dist/components/ai-sdk/Approval.js +1 -1
  70. package/dist/components/ai-sdk/Artifact.js +3 -3
  71. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  72. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  73. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  74. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  75. package/dist/components/ai-sdk/ComposerLink.d.ts +4 -1
  76. package/dist/components/ai-sdk/ComposerLink.js +4 -3
  77. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +29 -2
  78. package/dist/components/ai-sdk/ConnectedAppCards.js +78 -103
  79. package/dist/components/ai-sdk/Conversation.js +1 -1
  80. package/dist/components/ai-sdk/Correspondent.d.ts +2 -0
  81. package/dist/components/ai-sdk/Correspondent.js +145 -0
  82. package/dist/components/ai-sdk/Goal.js +1 -1
  83. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  84. package/dist/components/ai-sdk/Message.js +1 -1
  85. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  86. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  87. package/dist/components/ai-sdk/Plan.js +1 -1
  88. package/dist/components/ai-sdk/PromptInput.js +1 -1
  89. package/dist/components/ai-sdk/Queue.js +1 -1
  90. package/dist/components/ai-sdk/Reasoning.js +1 -1
  91. package/dist/components/ai-sdk/Sources.js +1 -1
  92. package/dist/components/ai-sdk/Task.js +1 -1
  93. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  94. package/dist/components/extension/CodexModelSelector.js +1 -1
  95. package/dist/components/extension/ConversationTabPicker.js +1 -1
  96. package/dist/components/foundations/Checkbox.js +1 -1
  97. package/dist/components/foundations/ContextMenu.js +1 -1
  98. package/dist/components/foundations/Menubar.js +1 -1
  99. package/dist/components/foundations/SearchField.js +1 -1
  100. package/dist/components/foundations/Select.js +1 -1
  101. package/dist/components/foundations/Stepper.js +1 -1
  102. package/dist/components/foundations/Toast.js +1 -1
  103. package/dist/components/foundations/icons.d.ts +2 -2
  104. package/dist/components/foundations/icons.js +2 -2
  105. package/dist/components/general-purpose/Commit.js +2 -2
  106. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  107. package/dist/components/general-purpose/FileTree.js +1 -1
  108. package/dist/components/general-purpose/PricingPlanCard.js +1 -1
  109. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  110. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  111. package/dist/components/general-purpose/Terminal.js +2 -2
  112. package/dist/components/general-purpose/TestResults.js +1 -1
  113. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  114. package/dist/components/general-purpose/WebPreview.js +1 -1
  115. package/dist/components/nanites/AgentConnection.js +2 -2
  116. package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
  117. package/dist/components/nanites/AgentToolDetail.js +2 -2
  118. package/dist/{copy-button-BABPlsc-.js → copy-button-Dk2vRe9j.js} +1 -1
  119. package/dist/{icons-ChPpNMmU.d.ts → icons-CCZGYUwU.d.ts} +6 -1
  120. package/dist/{icons-BC4HZqSK.js → icons-CeGfXO21.js} +3 -2
  121. package/dist/styles/base.css +2 -2
  122. package/dist/styles/connected-app-card.css +8 -0
  123. package/dist/styles/correspondent.css +73 -0
  124. package/dist/styles/description-list.css +3 -1
  125. package/dist/styles/index.css +2 -0
  126. package/dist/styles/manager-office.css +380 -1086
  127. package/dist/styles/workspace-concepts.css +28 -0
  128. package/dist/workspace-assets-GqsCYxqT.js +168 -0
  129. package/package.json +2 -2
  130. package/dist/WorkspaceMessageResponse-D66ty4FO.d.ts +0 -24
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, K as SpinnerIcon, d as CheckIcon } from "../../icons-BC4HZqSK.js";
2
+ import { K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
5
5
  import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
@@ -1,6 +1,6 @@
1
1
  import { CUSTOM_MCP_SERVER_CARD } from "../../utils/mcp-server-catalog.js";
2
2
  import { t as cx } from "../../class-names-BiMDVpUo.js";
3
- import { $ as WarningIcon, B as PlusIcon, K as SpinnerIcon, o as ArrowUpRightIcon, tt as XIcon, y as EllipsisIcon } from "../../icons-BC4HZqSK.js";
3
+ import { B as PlusIcon, K as SpinnerIcon, et as WarningIcon, nt as XIcon, o as ArrowUpRightIcon, y as EllipsisIcon } from "../../icons-CeGfXO21.js";
4
4
  import { Button } from "../foundations/Button.js";
5
5
  import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
6
6
  import { IconButton } from "../foundations/IconButton.js";
@@ -1,5 +1,5 @@
1
1
  import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, K as SpinnerIcon, N as MinusIcon, d as CheckIcon } from "../../icons-BC4HZqSK.js";
2
+ import { K as SpinnerIcon, N as MinusIcon, d as CheckIcon, et as WarningIcon } from "../../icons-CeGfXO21.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
4
  import { Menu } from "../foundations/Menu.js";
5
5
  import { Dialog } from "../foundations/Dialog.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { U as SearchIcon, f as ChevronDownIcon } from "../../icons-BC4HZqSK.js";
2
+ import { U as SearchIcon, f as ChevronDownIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { Autocomplete } from "../foundations/Autocomplete.js";
5
5
  import { Dialog } from "../foundations/Dialog.js";
@@ -1,6 +1,6 @@
1
1
  import { composerLinkHref } from "../../utils/composer-link.js";
2
2
  import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
3
- import { A as McpIcon, c as BoxIcon } from "../../icons-BC4HZqSK.js";
3
+ import { A as McpIcon, c as BoxIcon } from "../../icons-CeGfXO21.js";
4
4
  import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/agents-sdk/PromptInputCommands.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, J as StopIcon, K as SpinnerIcon, d as CheckIcon } from "../../icons-BC4HZqSK.js";
2
+ import { J as StopIcon, K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-CeGfXO21.js";
3
3
  import { r as firstLine, s as textLines } from "../../format-COCyV98Z.js";
4
4
  import { NaniteMark } from "../nanites/NaniteScene.js";
5
5
  import "react";
@@ -1,181 +1,2 @@
1
- import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-Mv9U.js";
2
- import { K as PromptInputMessage } from "../../PromptInput-DtJHyp0S.js";
3
- import { r as AgentChatProps } from "../../AgentChat-BLmQghkt.js";
4
- import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
5
- import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
6
- import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-B3lGVS-6.js";
7
- import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
8
- import { t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
9
- import { n as WorkspaceHtmlArtifactRenderer } from "../../WorkspaceMessageResponse-D66ty4FO.js";
10
- import * as React from "react";
11
- import { UIMessage } from "ai";
12
- import { UseAgentOptions } from "agents/react";
13
- import { DataTag, UndefinedInitialDataOptions } from "@tanstack/react-query";
14
- import { PendingApproval, Think } from "@cloudflare/think";
15
- import { AgentStub } from "agents/client";
16
-
17
- //#region src/components/agents-sdk/ThinkChat.d.ts
18
- type ThinkPendingExecutionApprovalsQueryKey = readonly ["think", sourceKey: string, "pending-approvals"];
19
- type ThinkPendingExecutionApprovalsQueryOptions = UndefinedInitialDataOptions<readonly PendingApproval[], Error, readonly PendingApproval[], ThinkPendingExecutionApprovalsQueryKey> & {
20
- queryKey: DataTag<ThinkPendingExecutionApprovalsQueryKey, readonly PendingApproval[], Error>;
21
- };
22
- interface ThinkChatProviderProps<State = unknown, MessageT extends UIMessage = UIMessage> {
23
- /** The `useAgentChat` value from `@cloudflare/think/react` that descendants read. */
24
- chat: ThinkChatValue<State, MessageT>;
25
- /** Optional whole `useAgentToolEvents` result when the app owns the parent connection. */
26
- agentTools?: AgentToolEventsValue<MessageT["parts"][number]>;
27
- children: React.ReactNode;
28
- }
29
- interface ThinkChatRootProps<State = unknown> {
30
- /** Agent to connect to: a kebab-case class name, or full `useAgent` options. */
31
- agent: string | UseAgentOptions<State>;
32
- /** Disable durable pending-approval discovery. Also disable it on `ThinkChat.Messages`. */
33
- approvalsEnabled?: boolean;
34
- /** Instance name (e.g. a session or room id). Wins over `agent.name`. */
35
- name?: string;
36
- /**
37
- * Stable, non-secret identity for the remote Think agent. Include endpoint,
38
- * account or tenant scope, and agent path so sources cannot share cached data.
39
- */
40
- sourceKey: string;
41
- children: React.ReactNode;
42
- }
43
- /**
44
- * The first-turn surface with no conversation behind it. Supply this instead of
45
- * a chat provider when the composer's submission is what creates the
46
- * conversation: connecting early is what leaves empty threads behind.
47
- */
48
- interface ThinkChatDraft<MessageT extends UIMessage = UIMessage> {
49
- /** Client-only transcript rows, such as a locally rendered guide. */
50
- messages?: readonly MessageT[];
51
- /** Receives the first message, normalized the same way a live thread's is. */
52
- onSubmit: (message: {
53
- text: string;
54
- files: PromptInputMessage["files"];
55
- }) => void | Promise<void>;
56
- /** Set while the app is creating the conversation, so the composer reads busy. */
57
- status?: AgentChatProps<MessageT>["status"];
58
- }
59
- type ThinkChatManagedAgentChatProp = "messages" | "onApprovalResponse" | "onRegenerate" | "onStop" | "onSubmit" | "status";
60
- /**
61
- * The AgentChat composition surface, minus the live values ThinkChat supplies
62
- * from `useAgentChat`. Think-specific activity and draft/session inputs extend
63
- * that owner instead of mirroring every AgentChat prop here.
64
- */
65
- type ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> = Omit<AgentChatProps<MessageT>, ThinkChatManagedAgentChatProp> & ThinkChatActivityRendererOptions<MessageT> & {
66
- /**
67
- * Renders without a chat provider, for the first turn of a conversation
68
- * that does not exist yet.
69
- */
70
- draft?: ThinkChatDraft<MessageT>; /** Whole `useSessionCompaction` result for built-in progress and error notices. */
71
- sessionCompaction?: UseSessionCompactionResult; /** Promotes assistant-authored workspace HTML links through a host runtime hydrator. */
72
- renderWorkspaceHtmlArtifact?: WorkspaceHtmlArtifactRenderer;
73
- };
74
- /** Shared pending-approval options for components and TanStack Router loaders. */
75
- declare function thinkPendingExecutionApprovalsQueryOptions(stub: AgentStub<Think>, sourceKey: string): ThinkPendingExecutionApprovalsQueryOptions;
76
- declare function useThinkPendingExecutionApprovals(stub: AgentStub<Think>, sourceKey: string, refreshSignal?: unknown, enabled?: boolean): {
77
- pendingApprovals: readonly PendingApproval[];
78
- refreshPendingApprovals: () => Promise<void>;
79
- };
80
- /**
81
- * Chat UI for Cloudflare Think agents. Provide a `useAgentChat` value (or let
82
- * `ThinkChat.Root` create one) and `ThinkChat.Messages` renders the message
83
- * stream with agent work folded into collapsed Activity blocks.
84
- */
85
- declare function ThinkChatProvider<State = unknown, MessageT extends UIMessage = UIMessage>({
86
- agentTools,
87
- chat,
88
- children
89
- }: ThinkChatProviderProps<State, MessageT>): React.JSX.Element;
90
- /**
91
- * Batteries-included root: connects to the named Think agent (upstream's
92
- * `useAgent` + `useAgentChat`) and provides the live chat to everything
93
- * inside. Render it beneath the app's `QueryClientProvider`. If the app
94
- * already owns the chat hook, use `ThinkChat.Provider`.
95
- *
96
- * @example
97
- * ```tsx
98
- * <QueryClientProvider client={queryClient}>
99
- * <ThinkChat.Root
100
- * agent="my-agent"
101
- * name="session-1"
102
- * sourceKey="api.example.com:account:acme:agent:session-1"
103
- * >
104
- * <ThinkChat.Messages />
105
- * </ThinkChat.Root>
106
- * </QueryClientProvider>
107
- * ```
108
- */
109
- declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIMessage>({
110
- agent: agentOption,
111
- approvalsEnabled,
112
- name,
113
- sourceKey,
114
- children
115
- }: ThinkChatRootProps<State>): React.JSX.Element;
116
- /**
117
- * The full conversation surface — message list plus composer — with the
118
- * activity renderer as the default `renderPart`: runs of reasoning/tool parts
119
- * fold into one collapsed Activity block with derived labels and per-tool
120
- * panels. Session-generated context/load/search tools are recognized from
121
- * their upstream runtime schemas and keep their recorded inputs and outputs
122
- * inspectable. Extend for app-specific tools with `toolRenderers` (label/panel
123
- * inside the log) or `excludeTools` + your own `renderPart` (standalone
124
- * card) — see README "App-specific tools" and the Custom Tool Panel story.
125
- */
126
- declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage = UIMessage>({
127
- draft,
128
- loading,
129
- renderPart,
130
- excludeTools,
131
- renderAgentToolRunLink,
132
- renderWorkspaceHtmlArtifact,
133
- toolRenderers,
134
- thinkStub,
135
- onExecutionSettled,
136
- pendingApprovals,
137
- notice,
138
- sessionCompaction,
139
- ...props
140
- }: ThinkChatMessagesProps<MessageT>): React.JSX.Element;
141
- /**
142
- * The ambient chat value from `ThinkChat.Root`/`Provider` — for custom tool
143
- * panels, cards, or composer actions that need `messages`, `status`, or
144
- * `sendMessage`. Throws outside a provider.
145
- */
146
- declare function useThinkChat<State = unknown, MessageT extends UIMessage = UIMessage>(): Omit<import("@ai-sdk/react").UseChatHelpers<MessageT>, "addToolOutput"> & {
147
- clearHistory: () => void;
148
- addToolOutput: (opts: {
149
- toolCallId: string;
150
- toolName?: string;
151
- output?: unknown;
152
- state?: "output-available" | "output-error";
153
- errorText?: string;
154
- }) => void;
155
- isServerStreaming: boolean;
156
- isStreaming: boolean;
157
- isRecovering: boolean;
158
- isToolContinuation: boolean;
159
- connectionError: (Error & {
160
- code: number;
161
- reason: string;
162
- wasClean: boolean;
163
- }) | null;
164
- };
165
- /**
166
- * Namespace entry point. `Root` + `Messages` is the standard surface;
167
- * `Provider` + `useThinkChat` when the app owns the chat hook; `Activity`,
168
- * `renderActivityPart`, and `createActivityRenderer` for custom layouts and
169
- * app-specific tools.
170
- */
171
- declare const ThinkChat: {
172
- Provider: typeof ThinkChatProvider;
173
- Root: typeof ThinkChatRoot;
174
- Messages: typeof ThinkChatMessages;
175
- Activity: typeof ThinkChatActivity;
176
- RecoveryNotice: typeof ThinkRecoveryNotice;
177
- renderActivityPart: (context: AgentMessageRenderPartContext<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>) => React.ReactNode | undefined;
178
- createActivityRenderer: typeof createThinkChatActivityRenderer;
179
- };
180
- //#endregion
1
+ import { a as ThinkChatProvider, c as ThinkChatRootProps, d as thinkPendingExecutionApprovalsQueryOptions, f as useThinkChat, i as ThinkChatMessagesProps, l as ThinkPendingExecutionApprovalsQueryKey, n as ThinkChatDraft, o as ThinkChatProviderProps, p as useThinkPendingExecutionApprovals, r as ThinkChatMessages, s as ThinkChatRoot, t as ThinkChat, u as ThinkPendingExecutionApprovalsQueryOptions } from "../../ThinkChat-CwMdEum8.js";
181
2
  export { ThinkChat, ThinkChatDraft, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, ThinkPendingExecutionApprovalsQueryKey, ThinkPendingExecutionApprovalsQueryOptions, thinkPendingExecutionApprovalsQueryOptions, useThinkChat, useThinkPendingExecutionApprovals };
@@ -1,2 +1,2 @@
1
- import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-qztQ6Clo.js";
1
+ import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DiI6hhDP.js";
2
2
  export { ThinkChat, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, thinkPendingExecutionApprovalsQueryOptions, useThinkChat, useThinkPendingExecutionApprovals };
@@ -1,7 +1,7 @@
1
1
  import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
2
2
  import { Tabs } from "../foundations/Tabs.js";
3
3
  import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
4
- import { t as CodeBlock } from "../../CodeBlock-CcteqDvA.js";
4
+ import { t as CodeBlock } from "../../CodeBlock-BSJl682D.js";
5
5
  import { BrowserLiveView } from "./BrowserLiveView.js";
6
6
  import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
7
7
  import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { S as FileIcon, T as InfoIcon } from "../../icons-BC4HZqSK.js";
2
+ import { S as FileIcon, T as InfoIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Activity, ActivityContent, ActivityItemGroup, ActivityOutput, ActivityTrigger } from "../ai-sdk/Activity.js";
4
4
  import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
5
5
  import { DescriptionList } from "../foundations/DescriptionList.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, tt as XIcon } from "../../icons-BC4HZqSK.js";
2
+ import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, nt as XIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Tooltip } from "../foundations/Tooltip.js";
4
4
  import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunKindLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunTitle } from "./ThinkExecutionRun.js";
5
5
  import "react";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, H as RefreshIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-BC4HZqSK.js";
2
+ import { H as RefreshIcon, et as WarningIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-CeGfXO21.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { Menu } from "../foundations/Menu.js";
@@ -2,10 +2,11 @@ import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js
2
2
  import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
3
3
  import { n as ResponsiveSidebarShell, t as AppBarSlots } from "../../ResponsiveSidebarShell-BTVPxLJK.js";
4
4
  import { n as McpPluginCatalogProps } from "../../McpPluginCatalog-3qWu8oK1.js";
5
- import { ThinkChatMessagesProps } from "./ThinkChat.js";
6
- import { ThinkThreadStatusSummary } from "./ThinkThreadPicker.js";
5
+ import { i as ThinkChatMessagesProps } from "../../ThinkChat-CwMdEum8.js";
6
+ import { o as ThinkThreadStatusSummary } from "../../ThinkThreadPicker-yFz4vvIf.js";
7
7
  import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-Dq-GC0_T.js";
8
- import { v as WorkspaceSource } from "../../Workspace-DZusrEeP.js";
8
+ import { y as WorkspaceSource } from "../../Workspace-LIoU30n7.js";
9
+ import { r as WorkspaceChangeSource } from "../../WorkspaceLive-DfjH1Ypm.js";
9
10
  import { t as ThinkAgent } from "../../think-agent-Cip5KAPj.js";
10
11
  import * as React from "react";
11
12
  import { UIMessage } from "ai";
@@ -47,6 +48,14 @@ interface ThinkFullAppWorkspaceConfig {
47
48
  navigation: WorkspaceNavigationAdapter;
48
49
  resolveFileAsset?: WorkspaceFileAssetResolver;
49
50
  maxInlineAssetBytes?: number;
51
+ /** Optional native change stream; the design system owns Query invalidation. */
52
+ changes?: WorkspaceChangeSource;
53
+ /**
54
+ * Disposable freshness tick for hosts without native observation, such as a
55
+ * serialization of settled-turn state. Each change invalidates the concept
56
+ * queries under `sourceKey`; it never enters query identity.
57
+ */
58
+ revision?: string;
50
59
  /** Leading workspace control, such as a host-owned Back to chat button. */
51
60
  leading?: React.ReactNode;
52
61
  actions?: React.ReactNode;
@@ -1,17 +1,18 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { S as FileIcon, c as BoxIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-BC4HZqSK.js";
2
+ import { S as FileIcon, c as BoxIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-CeGfXO21.js";
3
3
  import { IconButton } from "../foundations/IconButton.js";
4
4
  import { Menu } from "../foundations/Menu.js";
5
5
  import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
6
6
  import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
7
7
  import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
8
- import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DtH66bAY.js";
9
- import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-qztQ6Clo.js";
8
+ import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-B1d2GIGl.js";
9
+ import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DiI6hhDP.js";
10
10
  import { McpPluginCatalog } from "./McpPluginCatalog.js";
11
11
  import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
12
12
  import { ThinkThreadStatusIndicators } from "./ThinkThreadPicker.js";
13
13
  import { useWorkspace } from "./Workspace.js";
14
14
  import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
15
+ import { useWorkspaceLiveQueries } from "./WorkspaceLive.js";
15
16
  import * as React from "react";
16
17
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
18
  //#region src/components/agents-sdk/ThinkFullApp.tsx
@@ -109,6 +110,17 @@ function ThinkFullAppThreadChat({ agent, agentTools, chat, messages, renderAgent
109
110
  * open Files beside the conversation; compact (extension) widths stay on chat
110
111
  * until a view is selected. */
111
112
  function ThinkFullApp({ bar, className, conversation, defaultView: defaultViewProp, messages, onViewChange, plugins, ref, renderAgentToolRunLink, sourceKey, sidebarTogglePlacement = "sidebar", style, threadSidebar, threadStatusSummary, view, workbenchPanels, workspace, ...props }) {
113
+ const selectedWorkspacePath = workspace?.navigation.current.destination.kind === "file" ? workspace.navigation.current.destination.path : null;
114
+ useWorkspaceLiveQueries({
115
+ changes: workspace?.changes,
116
+ maxInlineAssetBytes: workspace?.maxInlineAssetBytes,
117
+ resolveFileAsset: workspace?.resolveFileAsset,
118
+ selectedPath: selectedWorkspacePath,
119
+ source: workspace?.source,
120
+ sourceKey: workspace?.sourceKey,
121
+ root: workspace?.root ?? "/",
122
+ revision: workspace?.revision
123
+ });
112
124
  const appRef = React.useRef(null);
113
125
  const workbenchPanelRef = React.useRef(null);
114
126
  const pendingPanelFocusRef = React.useRef(null);
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { B as PlusIcon } from "../../icons-BC4HZqSK.js";
2
+ import { B as PlusIcon } from "../../icons-CeGfXO21.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
4
  import { Tooltip } from "../foundations/Tooltip.js";
5
5
  import { t as capitalize } from "../../format-COCyV98Z.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, K as SpinnerIcon, d as CheckIcon, f as ChevronDownIcon, r as ArrowLeftIcon } from "../../icons-BC4HZqSK.js";
2
+ import { K as SpinnerIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, r as ArrowLeftIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { Field } from "../foundations/Field.js";
5
5
  import { Form } from "../foundations/Form.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, z as PlayIcon } from "../../icons-BC4HZqSK.js";
2
+ import { K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, z as PlayIcon } from "../../icons-CeGfXO21.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
4
  import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
5
5
  import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
@@ -1,14 +1,20 @@
1
1
  import { ThinkRoutine } from "./ThinkRoutine.js";
2
- import { ThinkChatDraft } from "./ThinkChat.js";
3
- import { ThinkThreadItem } from "./ThinkThreadPicker.js";
4
- import { ThinkFullAppAgent, ThinkFullAppConversation, ThinkFullAppProps } from "./ThinkFullApp.js";
2
+ import { n as ThinkChatDraft } from "../../ThinkChat-CwMdEum8.js";
3
+ import { t as ThinkThreadItem } from "../../ThinkThreadPicker-yFz4vvIf.js";
4
+ import { ThinkFullAppAgent, ThinkFullAppConversation, ThinkFullAppPanel, ThinkFullAppProps, ThinkFullAppView } from "./ThinkFullApp.js";
5
5
  import { SetupChecklistGroupProps } from "../general-purpose/SetupChecklist.js";
6
6
  import * as React from "react";
7
7
  import { UIMessage } from "ai";
8
8
  import { AgentToolRunState } from "agents/agent-tools";
9
9
 
10
10
  //#region src/components/agents-sdk/ThinkSidepanel.d.ts
11
- type ThinkSidepanelView = "chat" | "files" | "plugins" | "schedules" | "live";
11
+ /**
12
+ * Chat, the two exclusive full-screen surfaces, or an opaque workbench panel
13
+ * id. Built-in workbench destinations are `files` and `plugins`; hosts append
14
+ * more through `workbenchPanels`. An unknown id degrades to conversation-only
15
+ * the same way ThinkFullApp does — the requested view is not rewritten.
16
+ */
17
+ type ThinkSidepanelView = ThinkFullAppView | "schedules" | "live";
12
18
  type ThinkSidepanelDestination = {
13
19
  kind: "thread";
14
20
  threadId: string;
@@ -124,6 +130,13 @@ interface ThinkSidepanelProps<AgentT extends ThinkFullAppAgent<State>, State = u
124
130
  workspace?: ThinkFullAppProps<AgentT, State, MessageT>["workspace"];
125
131
  plugins?: ThinkFullAppProps<AgentT, State, MessageT>["plugins"];
126
132
  messages?: ThinkFullAppProps<AgentT, State, MessageT>["messages"];
133
+ /**
134
+ * Extra workbench panels appended after Files and Plugins. The side panel
135
+ * derives bar and overflow destinations from that same list and forwards it
136
+ * to ThinkFullApp. Not a registry: the host passes ordered descriptors whose
137
+ * `render` already closes over design-system panels.
138
+ */
139
+ workbenchPanels?: readonly ThinkFullAppPanel[];
127
140
  /** App-authored TanStack Link for a thread, view, routine, or agent-run destination. */
128
141
  renderLink: (destination: ThinkSidepanelDestination) => React.ReactElement;
129
142
  onDeleteThread?: (thread: ThinkThreadItem) => void | Promise<void>;
@@ -150,7 +163,8 @@ interface ThinkSidepanelProps<AgentT extends ThinkFullAppAgent<State>, State = u
150
163
  /**
151
164
  * The employee side panel: icon-and-tooltip chrome, start screen, schedules,
152
165
  * conversation plus workbench. Hosts hydrate conversation, workspace,
153
- * plugins, and callables. Storybook is the place to iterate the chrome.
166
+ * plugins, workbenchPanels, and callables. Storybook is the place to iterate
167
+ * the chrome.
154
168
  */
155
169
  declare function ThinkSidepanel<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage, TRoutine extends ThinkRoutine = ThinkRoutine, SetupId extends string = string>({
156
170
  agentRun,
@@ -178,6 +192,7 @@ declare function ThinkSidepanel<AgentT extends ThinkFullAppAgent<State>, State =
178
192
  thread,
179
193
  threads,
180
194
  view,
195
+ workbenchPanels,
181
196
  workspace,
182
197
  ...props
183
198
  }: ThinkSidepanelProps<AgentT, State, MessageT, TRoutine, SetupId>): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, A as McpIcon, C as FolderIcon, G as SlackIcon, I as PaperclipIcon, K as SpinnerIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, V as QueueIcon, Z as TerminalIcon, b as EyeIcon, c as BoxIcon, g as DiscordIcon, o as ArrowUpRightIcon, q as SquareIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-BC4HZqSK.js";
2
+ import { A as McpIcon, C as FolderIcon, G as SlackIcon, I as PaperclipIcon, K as SpinnerIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, V as QueueIcon, Z as TerminalIcon, b as EyeIcon, c as BoxIcon, et as WarningIcon, g as DiscordIcon, o as ArrowUpRightIcon, q as SquareIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { Tooltip } from "../foundations/Tooltip.js";
5
5
  import { Menu } from "../foundations/Menu.js";
@@ -15,7 +15,7 @@ import { useTheme } from "../foundations/ThemeProvider.js";
15
15
  import "../foundations/icons.js";
16
16
  import { ActionGuide } from "../general-purpose/ActionGuide.js";
17
17
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
18
- import { t as SetupChecklistAction } from "../../SetupChecklist-BXwSSorj.js";
18
+ import { t as SetupChecklistAction } from "../../SetupChecklist-DeTU9YpW.js";
19
19
  import { NaniteMark } from "../nanites/NaniteScene.js";
20
20
  import { SubagentRunLabel } from "./SubagentRunIndicator.js";
21
21
  import { getThinkExecutionRunId } from "./ThinkExecutionRun.js";
@@ -84,28 +84,40 @@ function useCompactApp() {
84
84
  }, []);
85
85
  return [ref, compact];
86
86
  }
87
- function WorkspaceLinks({ renderLink, view }) {
88
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AppTopBar.Link, {
89
- label: "Files",
90
- "aria-current": view === "files" ? "page" : void 0,
91
- "data-pressed": view === "files" ? "" : void 0,
92
- render: renderLink({
93
- kind: "view",
94
- view: "files"
95
- }),
96
- children: /* @__PURE__ */ jsx(FileIcon, {})
97
- }), /* @__PURE__ */ jsx(AppTopBar.Link, {
98
- label: "Plugins",
99
- "aria-current": view === "plugins" ? "page" : void 0,
100
- "data-pressed": view === "plugins" ? "" : void 0,
87
+ function workbenchNavItems(workbenchPanels) {
88
+ return [
89
+ {
90
+ id: "files",
91
+ label: "Files",
92
+ icon: /* @__PURE__ */ jsx(FileIcon, {})
93
+ },
94
+ {
95
+ id: "plugins",
96
+ label: "Plugins",
97
+ icon: /* @__PURE__ */ jsx(BoxIcon, {})
98
+ },
99
+ ...workbenchPanels ?? []
100
+ ];
101
+ }
102
+ function isWorkbenchView(view) {
103
+ return view !== "chat" && view !== "schedules" && view !== "live";
104
+ }
105
+ function thinkFullAppView(view) {
106
+ return view === "schedules" || view === "live" ? "chat" : view;
107
+ }
108
+ function WorkbenchLinks({ panels, renderLink, view }) {
109
+ return /* @__PURE__ */ jsx(Fragment, { children: panels.map((panel) => /* @__PURE__ */ jsx(AppTopBar.Link, {
110
+ label: panel.label,
111
+ "aria-current": view === panel.id ? "page" : void 0,
112
+ "data-pressed": view === panel.id ? "" : void 0,
101
113
  render: renderLink({
102
114
  kind: "view",
103
- view: "plugins"
115
+ view: panel.id
104
116
  }),
105
- children: /* @__PURE__ */ jsx(BoxIcon, {})
106
- })] });
117
+ children: panel.icon
118
+ }, panel.id)) });
107
119
  }
108
- function OverflowMenu({ companion, follow, identityEmail, onIdentity, onModel, onSignOut, passkeyVault, renderLink, workbenchInMenu }) {
120
+ function OverflowMenu({ companion, follow, identityEmail, onIdentity, onModel, onSignOut, passkeyVault, renderLink, workbenchInMenu, workbenchNav }) {
109
121
  return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(AppTopBar.Button, {
110
122
  label: "More actions",
111
123
  tooltip: identityEmail ? `Signed in as ${identityEmail}` : void 0,
@@ -119,19 +131,13 @@ function OverflowMenu({ companion, follow, identityEmail, onIdentity, onModel, o
119
131
  align: "end",
120
132
  sideOffset: 4,
121
133
  children: /* @__PURE__ */ jsxs(Menu.Popup, { children: [
122
- workbenchInMenu ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Menu.Item, {
123
- render: renderLink({
124
- kind: "view",
125
- view: "files"
126
- }),
127
- children: [/* @__PURE__ */ jsx(FileIcon, {}), "Files"]
128
- }), /* @__PURE__ */ jsxs(Menu.Item, {
134
+ workbenchInMenu ? workbenchNav.map((panel) => /* @__PURE__ */ jsxs(Menu.Item, {
129
135
  render: renderLink({
130
136
  kind: "view",
131
- view: "plugins"
137
+ view: panel.id
132
138
  }),
133
- children: [/* @__PURE__ */ jsx(BoxIcon, {}), "Plugins"]
134
- })] }) : null,
139
+ children: [panel.icon, panel.label]
140
+ }, panel.id)) : null,
135
141
  /* @__PURE__ */ jsxs(Menu.Item, {
136
142
  render: renderLink({
137
143
  kind: "view",
@@ -567,12 +573,14 @@ function ThinkSidepanelRunTitle({ agentRun }) {
567
573
  /**
568
574
  * The employee side panel: icon-and-tooltip chrome, start screen, schedules,
569
575
  * conversation plus workbench. Hosts hydrate conversation, workspace,
570
- * plugins, and callables. Storybook is the place to iterate the chrome.
576
+ * plugins, workbenchPanels, and callables. Storybook is the place to iterate
577
+ * the chrome.
571
578
  */
572
- function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion, connectingLabel, conversation, follow, identity, live, messages, modelSetup, onDeleteThread, onModel, onSignOut, passkeyVault, plugins, renderLink, schedules, sourceKey, start, status = "ready", thread, threads = EMPTY_THREADS, view, workspace, ...props }) {
579
+ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion, connectingLabel, conversation, follow, identity, live, messages, modelSetup, onDeleteThread, onModel, onSignOut, passkeyVault, plugins, renderLink, schedules, sourceKey, start, status = "ready", thread, threads = EMPTY_THREADS, view, workbenchPanels, workspace, ...props }) {
573
580
  const [identityOpen, setIdentityOpen] = React.useState(false);
574
581
  const [guideOpen, setGuideOpen] = React.useState(false);
575
582
  const [rootRef, compact] = useCompactApp();
583
+ const workbenchNav = workbenchNavItems(workbenchPanels);
576
584
  if (status !== "ready") return /* @__PURE__ */ jsx("div", {
577
585
  ref: rootRef,
578
586
  className: cx("think-sidepanel", className),
@@ -595,9 +603,11 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
595
603
  onSignOut,
596
604
  passkeyVault,
597
605
  renderLink,
598
- workbenchInMenu: compact
606
+ workbenchInMenu: compact,
607
+ workbenchNav
599
608
  });
600
- const workspaceLinks = compact || agentRun ? void 0 : /* @__PURE__ */ jsx(WorkspaceLinks, {
609
+ const workspaceLinks = compact || agentRun ? void 0 : /* @__PURE__ */ jsx(WorkbenchLinks, {
610
+ panels: workbenchNav,
601
611
  renderLink,
602
612
  view
603
613
  });
@@ -611,7 +621,8 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
611
621
  render: renderLink({ kind: "new-thread" }),
612
622
  children: /* @__PURE__ */ jsx(PencilIcon, {})
613
623
  }) : void 0;
614
- const workbenchLeading = view === "files" || view === "plugins" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BackToChat, { renderLink }), appBarLeading] }) : newThread || view === "chat" && appBarLeading ? /* @__PURE__ */ jsxs(Fragment, { children: [newThread, view === "chat" ? appBarLeading : null] }) : void 0;
624
+ const chatLeading = newThread || view === "chat" && appBarLeading ? /* @__PURE__ */ jsxs(Fragment, { children: [newThread, view === "chat" ? appBarLeading : null] }) : void 0;
625
+ const workbenchLeading = isWorkbenchView(view) ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BackToChat, { renderLink }), appBarLeading] }) : chatLeading;
615
626
  const chatMessages = employeeMessages({
616
627
  agentRun,
617
628
  brandName: brand.name,
@@ -679,7 +690,7 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
679
690
  })
680
691
  }), identityDialog]
681
692
  });
682
- const workbenchView = view === "plugins" ? "plugins" : view === "files" ? "files" : "chat";
693
+ const workbenchView = thinkFullAppView(view);
683
694
  const cancelRun = agentRun?.state === "ready" && agentRun.run.status === "running" ? agentRun.onCancel : void 0;
684
695
  const backToThread = agentRun ? /* @__PURE__ */ jsx(AppTopBar.Link, {
685
696
  label: "Back to parent conversation",
@@ -744,6 +755,7 @@ function ThinkSidepanel({ agentRun, appBarLeading, brand, className, companion,
744
755
  sourceKey,
745
756
  workspace: agentRun ? void 0 : workspace,
746
757
  plugins: agentRun ? void 0 : plugins,
758
+ workbenchPanels: agentRun ? void 0 : workbenchPanels,
747
759
  view: workbenchView,
748
760
  threadSidebar: agentRun ? void 0 : ({ closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ThinkThreadPicker, {
749
761
  threads,