@mcp-b/react-components 0.47.0 → 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.
- package/dist/{CodeBlock-DMHZiw86.js → CodeBlock-BSJl682D.js} +1 -1
- package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
- package/dist/{FileTree-BHebfvkK.js → FileTree-DvE0hNZu.js} +1 -1
- package/dist/{SetupChecklist-CwRjIDH4.js → SetupChecklist-DeTU9YpW.js} +1 -1
- package/dist/{ThinkChat-DLDta57t.js → ThinkChat-DiI6hhDP.js} +3 -3
- package/dist/{Workspace-C_zHq9KZ.d.ts → Workspace-LIoU30n7.d.ts} +13 -2
- package/dist/{WorkspaceFileView-ChIJz-fl.js → WorkspaceFileView-C_WnYm-a.js} +3 -3
- package/dist/{WorkspaceLive-DLGhtIly.d.ts → WorkspaceLive-DfjH1Ypm.d.ts} +12 -0
- package/dist/{WorkspaceMessageResponse-Dg_aNpoj.js → WorkspaceMessageResponse-BqOezptB.js} +4 -1
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +10 -10
- package/dist/components/agents-sdk/AgentEvent.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/ManagerOffice.d.ts +41 -50
- package/dist/components/agents-sdk/ManagerOffice.js +360 -979
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +3 -3
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +3 -3
- package/dist/components/agents-sdk/ThinkFullApp.js +9 -4
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +4 -4
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkSidepanel.js +10 -10
- package/dist/components/agents-sdk/ThinkThreadPicker.js +4 -4
- package/dist/components/agents-sdk/Workspace.d.ts +2 -2
- package/dist/components/agents-sdk/Workspace.js +13 -10
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceConcept.js +3 -3
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +5 -9
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +44 -44
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +30 -21
- package/dist/components/agents-sdk/WorkspaceExecution.js +104 -167
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.js +33 -5
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +43 -5
- package/dist/components/agents-sdk/WorkspaceProject.js +62 -25
- package/dist/components/agents-sdk/WorkspaceUserScript.js +4 -4
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.js +3 -3
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +7 -0
- package/dist/components/ai-sdk/ConnectedAppCards.js +48 -80
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Correspondent.d.ts +2 -0
- package/dist/components/ai-sdk/Correspondent.js +145 -0
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/InlineCitation.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +5 -5
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +5 -5
- package/dist/{copy-button-CSDuDfdP.js → copy-button-Dk2vRe9j.js} +1 -1
- package/dist/styles/base.css +2 -2
- package/dist/styles/correspondent.css +73 -0
- package/dist/styles/index.css +1 -0
- package/dist/styles/manager-office.css +380 -1086
- package/dist/{workspace-assets-CxpEHsac.js → workspace-assets-GqsCYxqT.js} +16 -2
- package/package.json +2 -2
- package/dist/{icons-cuEtsgj9.js → icons-CeGfXO21.js} +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
|
-
import { b as WorkspaceState } from "../../Workspace-
|
|
2
|
+
import { b as WorkspaceState } from "../../Workspace-LIoU30n7.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/agents-sdk/WorkspaceExplorer.d.ts
|
|
@@ -2,7 +2,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
3
3
|
import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-B1d2GIGl.js";
|
|
4
4
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
5
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
5
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-C_WnYm-a.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-C_WnYm-a.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useWorkspaceLiveQueries, i as invalidateWorkspaceDirectories, n as WorkspaceChange, r as WorkspaceChangeSource, t as UseWorkspaceLiveQueriesOptions } from "../../WorkspaceLive-
|
|
1
|
+
import { a as useWorkspaceLiveQueries, i as invalidateWorkspaceDirectories, n as WorkspaceChange, r as WorkspaceChangeSource, t as UseWorkspaceLiveQueriesOptions } from "../../WorkspaceLive-DfjH1Ypm.js";
|
|
2
2
|
export { UseWorkspaceLiveQueriesOptions, WorkspaceChange, WorkspaceChangeSource, invalidateWorkspaceDirectories, useWorkspaceLiveQueries };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { workspaceDirectoryQueryKey, workspaceDirectoryQueryPrefix } from "./Workspace.js";
|
|
2
|
-
import { invalidateWorkspaceConceptQueries } from "./WorkspaceConcept.js";
|
|
1
|
+
import { refreshWorkspaceFileQueries, workspaceDirectoryQueryKey, workspaceDirectoryQueryPrefix, workspaceFileQueryKey, workspaceInfoQueryKey } from "./Workspace.js";
|
|
2
|
+
import { invalidateWorkspaceConceptQueries, workspacePathsOverlap } from "./WorkspaceConcept.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useQueryClient } from "@tanstack/react-query";
|
|
5
5
|
//#region src/components/agents-sdk/WorkspaceLive.ts
|
|
@@ -11,6 +11,22 @@ function workspaceDirname(path) {
|
|
|
11
11
|
function invalidateWorkspaceDirectories(queryClient, sourceKey, directories, root) {
|
|
12
12
|
for (const directory of directories) queryClient.invalidateQueries({ queryKey: workspaceDirectoryQueryKey(sourceKey, root, directory) });
|
|
13
13
|
}
|
|
14
|
+
async function invalidateWorkspaceResources(queryClient, sourceKey, root, source, selectedPath, resolveFileAsset, maxInlineAssetBytes, paths) {
|
|
15
|
+
queryClient.invalidateQueries({
|
|
16
|
+
queryKey: workspaceInfoQueryKey(sourceKey, root),
|
|
17
|
+
exact: true
|
|
18
|
+
});
|
|
19
|
+
if (!source || !selectedPath || paths && !paths.some((path) => workspacePathsOverlap(selectedPath, path))) return;
|
|
20
|
+
await queryClient.cancelQueries({ queryKey: workspaceFileQueryKey(sourceKey, root, selectedPath) });
|
|
21
|
+
await refreshWorkspaceFileQueries(queryClient, {
|
|
22
|
+
source,
|
|
23
|
+
sourceKey,
|
|
24
|
+
root,
|
|
25
|
+
selectedPath,
|
|
26
|
+
resolveFileAsset,
|
|
27
|
+
maxInlineAssetBytes
|
|
28
|
+
}).catch(() => {});
|
|
29
|
+
}
|
|
14
30
|
/**
|
|
15
31
|
* Synchronize external workspace freshness with the design system's Query
|
|
16
32
|
* resources. This is the one external-system effect: native observer events
|
|
@@ -18,15 +34,25 @@ function invalidateWorkspaceDirectories(queryClient, sourceKey, directories, roo
|
|
|
18
34
|
* stable query keys. Hosts only supply events; neither layer adds another
|
|
19
35
|
* watcher.
|
|
20
36
|
*/
|
|
21
|
-
function useWorkspaceLiveQueries({ changes, sourceKey, root, revision }) {
|
|
37
|
+
function useWorkspaceLiveQueries({ changes, maxInlineAssetBytes, resolveFileAsset, selectedPath, source, sourceKey, root, revision }) {
|
|
22
38
|
const queryClient = useQueryClient();
|
|
39
|
+
const refreshResources = React.useEffectEvent((paths) => {
|
|
40
|
+
if (!sourceKey) return;
|
|
41
|
+
invalidateWorkspaceResources(queryClient, sourceKey, root, source, selectedPath, resolveFileAsset, maxInlineAssetBytes, paths);
|
|
42
|
+
});
|
|
23
43
|
const previousRevisionRef = React.useRef(void 0);
|
|
24
44
|
React.useEffect(() => {
|
|
25
45
|
if (!sourceKey || revision === void 0) return;
|
|
26
46
|
const previous = previousRevisionRef.current;
|
|
27
|
-
previousRevisionRef.current =
|
|
28
|
-
|
|
47
|
+
previousRevisionRef.current = {
|
|
48
|
+
sourceKey,
|
|
49
|
+
root,
|
|
50
|
+
revision
|
|
51
|
+
};
|
|
52
|
+
if (previous?.sourceKey === sourceKey && previous.root === root && previous.revision === revision) return;
|
|
53
|
+
queryClient.invalidateQueries({ queryKey: workspaceDirectoryQueryPrefix(sourceKey, root) });
|
|
29
54
|
invalidateWorkspaceConceptQueries(queryClient, sourceKey, root);
|
|
55
|
+
refreshResources();
|
|
30
56
|
}, [
|
|
31
57
|
queryClient,
|
|
32
58
|
revision,
|
|
@@ -50,6 +76,7 @@ function useWorkspaceLiveQueries({ changes, sourceKey, root, revision }) {
|
|
|
50
76
|
pendingPaths.clear();
|
|
51
77
|
queryClient.invalidateQueries({ queryKey: workspaceDirectoryQueryPrefix(sourceKey, root) });
|
|
52
78
|
invalidateWorkspaceConceptQueries(queryClient, sourceKey, root);
|
|
79
|
+
refreshResources();
|
|
53
80
|
return;
|
|
54
81
|
}
|
|
55
82
|
invalidateWorkspaceDirectories(queryClient, sourceKey, pendingDirectories, root);
|
|
@@ -57,6 +84,7 @@ function useWorkspaceLiveQueries({ changes, sourceKey, root, revision }) {
|
|
|
57
84
|
pendingDirectories.clear();
|
|
58
85
|
pendingPaths.clear();
|
|
59
86
|
invalidateWorkspaceConceptQueries(queryClient, sourceKey, root, paths);
|
|
87
|
+
refreshResources(paths);
|
|
60
88
|
};
|
|
61
89
|
const unsubscribe = changes.subscribe((change) => {
|
|
62
90
|
if (change.type === "unknown") refreshAll = true;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as WorkspaceMessageResponse, t as WorkspaceFileRendererProvider } from "../../WorkspaceMessageResponse-
|
|
1
|
+
import { n as WorkspaceMessageResponse, t as WorkspaceFileRendererProvider } from "../../WorkspaceMessageResponse-BqOezptB.js";
|
|
2
2
|
export { WorkspaceFileRendererProvider, WorkspaceMessageResponse };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as PaperclipIcon } from "../../icons-
|
|
1
|
+
import { I as PaperclipIcon } from "../../icons-CeGfXO21.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
|
+
import { Card, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
3
4
|
import { Popover } from "../foundations/Popover.js";
|
|
4
5
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
5
6
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
6
|
-
import { Card, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/agents-sdk/WorkspaceMountManager.tsx
|
|
@@ -8,7 +8,22 @@ type WorkspaceProjectThreadOrigin = "user" | "routine" | "messenger";
|
|
|
8
8
|
interface WorkspaceProjectFile {
|
|
9
9
|
path: string;
|
|
10
10
|
label: string;
|
|
11
|
-
|
|
11
|
+
}
|
|
12
|
+
type WorkspaceProjectSectionItem = {
|
|
13
|
+
kind: "file";
|
|
14
|
+
path: string;
|
|
15
|
+
label: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "link";
|
|
18
|
+
href: string;
|
|
19
|
+
label: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "text";
|
|
22
|
+
label: string;
|
|
23
|
+
};
|
|
24
|
+
interface WorkspaceProjectSection {
|
|
25
|
+
label: string;
|
|
26
|
+
items: readonly WorkspaceProjectSectionItem[];
|
|
12
27
|
}
|
|
13
28
|
interface WorkspaceProjectThread {
|
|
14
29
|
id: string;
|
|
@@ -16,7 +31,6 @@ interface WorkspaceProjectThread {
|
|
|
16
31
|
origin: WorkspaceProjectThreadOrigin;
|
|
17
32
|
/** Channel or origin mark. Messenger threads pass a brand favicon. */
|
|
18
33
|
icon?: React.ReactNode;
|
|
19
|
-
onOpen?: () => void;
|
|
20
34
|
}
|
|
21
35
|
interface WorkspaceProject {
|
|
22
36
|
/** Workspace path of PROJECT.md — directories are not addressable. */
|
|
@@ -26,7 +40,29 @@ interface WorkspaceProject {
|
|
|
26
40
|
/** Brand mark. Defaults to `FolderIcon`. */
|
|
27
41
|
icon?: React.ReactNode;
|
|
28
42
|
files?: readonly WorkspaceProjectFile[];
|
|
43
|
+
/** Explicit groups authored under `## Working set` in PROJECT.md. */
|
|
44
|
+
sections?: readonly WorkspaceProjectSection[];
|
|
29
45
|
threads?: readonly WorkspaceProjectThread[];
|
|
46
|
+
}
|
|
47
|
+
type WorkspaceProjectOpenable = {
|
|
48
|
+
onOpen?: () => void;
|
|
49
|
+
};
|
|
50
|
+
type WorkspaceProjectFileView = WorkspaceProjectFile & WorkspaceProjectOpenable;
|
|
51
|
+
type WorkspaceProjectSectionItemView = (Extract<WorkspaceProjectSectionItem, {
|
|
52
|
+
kind: "file";
|
|
53
|
+
}> & WorkspaceProjectOpenable) | Exclude<WorkspaceProjectSectionItem, {
|
|
54
|
+
kind: "file";
|
|
55
|
+
}>;
|
|
56
|
+
interface WorkspaceProjectSectionView {
|
|
57
|
+
label: string;
|
|
58
|
+
items: readonly WorkspaceProjectSectionItemView[];
|
|
59
|
+
}
|
|
60
|
+
type WorkspaceProjectThreadView = WorkspaceProjectThread & WorkspaceProjectOpenable;
|
|
61
|
+
/** Data-only project projection hydrated with card actions outside Query. */
|
|
62
|
+
interface WorkspaceProjectView extends Omit<WorkspaceProject, "files" | "sections" | "threads"> {
|
|
63
|
+
files?: readonly WorkspaceProjectFileView[];
|
|
64
|
+
sections?: readonly WorkspaceProjectSectionView[];
|
|
65
|
+
threads?: readonly WorkspaceProjectThreadView[];
|
|
30
66
|
onOpen?: () => void;
|
|
31
67
|
onDelete?: () => void | Promise<void>;
|
|
32
68
|
}
|
|
@@ -38,7 +74,7 @@ interface WorkspaceProjectSource {
|
|
|
38
74
|
onDelete?: (path: string) => void | Promise<void>;
|
|
39
75
|
}
|
|
40
76
|
interface WorkspaceProjectCardProps extends Omit<CardProps, "children" | "hover" | "size" | "title"> {
|
|
41
|
-
project:
|
|
77
|
+
project: WorkspaceProjectView;
|
|
42
78
|
}
|
|
43
79
|
interface WorkspaceProjectFileCardProps extends Omit<WorkspaceProjectCardProps, "project"> {
|
|
44
80
|
path: string;
|
|
@@ -46,7 +82,8 @@ interface WorkspaceProjectFileCardProps extends Omit<WorkspaceProjectCardProps,
|
|
|
46
82
|
fallback?: React.ReactNode;
|
|
47
83
|
}
|
|
48
84
|
interface WorkspaceProjectsPanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
|
|
49
|
-
projects: readonly
|
|
85
|
+
projects: readonly WorkspaceProjectView[];
|
|
86
|
+
loading?: boolean;
|
|
50
87
|
/** Query failure to show instead of the empty state. Loaded projects win. */
|
|
51
88
|
error?: string;
|
|
52
89
|
onRetry?: () => void;
|
|
@@ -80,6 +117,7 @@ declare function useWorkspaceProjects(source: WorkspaceProjectSource): readonly
|
|
|
80
117
|
declare function WorkspaceProjectsPanel({
|
|
81
118
|
className,
|
|
82
119
|
error,
|
|
120
|
+
loading,
|
|
83
121
|
projects,
|
|
84
122
|
onRetry,
|
|
85
123
|
ref,
|
|
@@ -90,4 +128,4 @@ declare function WorkspaceProjectsPanel({
|
|
|
90
128
|
/** Canonical workbench descriptor; hosts supply only the source adapter. */
|
|
91
129
|
declare function workspaceProjectsPanel(source: WorkspaceProjectSource): ThinkFullAppPanel;
|
|
92
130
|
//#endregion
|
|
93
|
-
export { WorkspaceProject, WorkspaceProjectCard, WorkspaceProjectCardProps, WorkspaceProjectFile, WorkspaceProjectFileCard, WorkspaceProjectFileCardProps, WorkspaceProjectSource, WorkspaceProjectThread, WorkspaceProjectThreadOrigin, WorkspaceProjectsPanel, WorkspaceProjectsPanelProps, useWorkspaceProjects, workspaceProjectsPanel };
|
|
131
|
+
export { WorkspaceProject, WorkspaceProjectCard, WorkspaceProjectCardProps, WorkspaceProjectFile, WorkspaceProjectFileCard, WorkspaceProjectFileCardProps, WorkspaceProjectFileView, WorkspaceProjectSection, WorkspaceProjectSectionItem, WorkspaceProjectSectionItemView, WorkspaceProjectSectionView, WorkspaceProjectSource, WorkspaceProjectThread, WorkspaceProjectThreadOrigin, WorkspaceProjectThreadView, WorkspaceProjectView, WorkspaceProjectsPanel, WorkspaceProjectsPanelProps, useWorkspaceProjects, workspaceProjectsPanel };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { $ as UserIcon, C as FolderIcon, S as FileIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-
|
|
2
|
+
import { $ as UserIcon, C as FolderIcon, D as LinkIcon, K as SpinnerIcon, S as FileIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
6
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
6
|
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
9
|
-
import {
|
|
7
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
9
|
+
import { LinkButton } from "../foundations/LinkButton.js";
|
|
10
|
+
import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-GqsCYxqT.js";
|
|
10
11
|
import * as React from "react";
|
|
11
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
13
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -51,30 +52,55 @@ function LinkList({ items }) {
|
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
54
|
function ProjectDetails({ project }) {
|
|
54
|
-
const
|
|
55
|
+
const referencedFiles = new Set((project.sections ?? []).flatMap(({ items }) => items.flatMap((item) => item.kind === "file" ? [item.path] : [])));
|
|
56
|
+
const files = (project.files ?? []).filter((file) => !file.path.endsWith("/PROJECT.md") && !referencedFiles.has(file.path));
|
|
57
|
+
const sections = (project.sections ?? []).filter(({ items }) => items.length > 0);
|
|
55
58
|
const threads = project.threads ?? [];
|
|
56
|
-
if (files.length === 0 && threads.length === 0) return null;
|
|
59
|
+
if (files.length === 0 && sections.length === 0 && threads.length === 0) return null;
|
|
57
60
|
return /* @__PURE__ */ jsxs(DescriptionList.Root, {
|
|
58
61
|
align: "start",
|
|
59
62
|
variant: "divided",
|
|
60
|
-
children: [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
63
|
+
children: [
|
|
64
|
+
sections.map((section) => /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: section.label }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "sigvelo-cluster",
|
|
66
|
+
children: section.items.map((item) => item.kind === "file" ? /* @__PURE__ */ jsx(WorkspaceComposerLink, {
|
|
67
|
+
value: item.path,
|
|
68
|
+
label: item.label,
|
|
69
|
+
hint: item.path,
|
|
70
|
+
onOpen: item.onOpen
|
|
71
|
+
}, `${item.kind}:${item.path}`) : item.kind === "link" ? /* @__PURE__ */ jsxs(LinkButton, {
|
|
72
|
+
href: item.href,
|
|
73
|
+
target: "_blank",
|
|
74
|
+
rel: "noreferrer",
|
|
75
|
+
variant: "link",
|
|
76
|
+
color: "neutral",
|
|
77
|
+
size: "xs",
|
|
78
|
+
children: [/* @__PURE__ */ jsx(FaviconMark, {
|
|
79
|
+
href: item.href,
|
|
80
|
+
fallback: /* @__PURE__ */ jsx(LinkIcon, {})
|
|
81
|
+
}), item.label]
|
|
82
|
+
}, `${item.kind}:${item.href}`) : /* @__PURE__ */ jsx("span", { children: item.label }, `${item.kind}:${item.label}`))
|
|
83
|
+
}) })] }, section.label)),
|
|
84
|
+
files.length > 0 ? /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: "Contents" }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx("div", {
|
|
85
|
+
className: "sigvelo-cluster",
|
|
86
|
+
children: files.map((file) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
|
|
87
|
+
value: file.path,
|
|
88
|
+
label: file.label,
|
|
89
|
+
hint: file.path,
|
|
90
|
+
onOpen: file.onOpen
|
|
91
|
+
}, file.path))
|
|
92
|
+
}) })] }) : null,
|
|
93
|
+
ORIGIN_ORDER.map((origin) => {
|
|
94
|
+
const grouped = threads.filter((thread) => thread.origin === origin);
|
|
95
|
+
if (grouped.length === 0) return null;
|
|
96
|
+
return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: ORIGIN_LABEL[origin] }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx(LinkList, { items: grouped.map((thread) => ({
|
|
97
|
+
key: thread.id,
|
|
98
|
+
label: thread.title,
|
|
99
|
+
icon: thread.icon ?? ORIGIN_ICON[origin],
|
|
100
|
+
onOpen: thread.onOpen
|
|
101
|
+
})) }) })] }, origin);
|
|
102
|
+
})
|
|
103
|
+
]
|
|
78
104
|
});
|
|
79
105
|
}
|
|
80
106
|
function WorkspaceProjectCard({ className, project, ref, ...props }) {
|
|
@@ -137,7 +163,7 @@ function useWorkspaceProjects(source) {
|
|
|
137
163
|
* query failure with nothing loaded renders as a quiet inline error, never as
|
|
138
164
|
* an empty library.
|
|
139
165
|
*/
|
|
140
|
-
function WorkspaceProjectsPanel({ className, error, projects, onRetry, ref, ...props }) {
|
|
166
|
+
function WorkspaceProjectsPanel({ className, error, loading = false, projects, onRetry, ref, ...props }) {
|
|
141
167
|
return /* @__PURE__ */ jsx("section", {
|
|
142
168
|
ref,
|
|
143
169
|
"data-slot": "workspace-projects-panel",
|
|
@@ -158,6 +184,9 @@ function WorkspaceProjectsPanel({ className, error, projects, onRetry, ref, ...p
|
|
|
158
184
|
onClick: onRetry,
|
|
159
185
|
children: "Retry"
|
|
160
186
|
}) : null
|
|
187
|
+
}) : loading ? /* @__PURE__ */ jsx(EmptyState, {
|
|
188
|
+
icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
|
|
189
|
+
title: "Loading projects"
|
|
161
190
|
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
162
191
|
icon: /* @__PURE__ */ jsx(FolderIcon, {}),
|
|
163
192
|
title: "No projects"
|
|
@@ -171,6 +200,13 @@ function projectWithSource(project, source) {
|
|
|
171
200
|
...file,
|
|
172
201
|
onOpen: source.onOpenFile ? () => source.onOpenFile?.(file.path) : void 0
|
|
173
202
|
})),
|
|
203
|
+
sections: project.sections?.map((section) => ({
|
|
204
|
+
...section,
|
|
205
|
+
items: section.items.map((item) => item.kind === "file" ? {
|
|
206
|
+
...item,
|
|
207
|
+
onOpen: source.onOpenFile ? () => source.onOpenFile?.(item.path) : void 0
|
|
208
|
+
} : item)
|
|
209
|
+
})),
|
|
174
210
|
threads: project.threads?.map((thread) => ({
|
|
175
211
|
...thread,
|
|
176
212
|
onOpen: source.onOpenThread ? () => source.onOpenThread?.(thread.id) : void 0
|
|
@@ -184,6 +220,7 @@ function WorkspaceProjectSourcePanel({ source }) {
|
|
|
184
220
|
return /* @__PURE__ */ jsx(WorkspaceProjectsPanel, {
|
|
185
221
|
projects: (query.data ?? []).map((project) => projectWithSource(project, source)),
|
|
186
222
|
error: query.isError ? formatErrorMessage(query.error) : void 0,
|
|
223
|
+
loading: query.isPending,
|
|
187
224
|
onRetry: query.isError ? () => void query.refetch() : void 0,
|
|
188
225
|
"aria-busy": query.isFetching || void 0
|
|
189
226
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { P as MonitorIcon, S as FileIcon, m as CodeIcon } from "../../icons-
|
|
2
|
+
import { P as MonitorIcon, S as FileIcon, m as CodeIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
5
5
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
6
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
7
|
import { Switch } from "../foundations/Switch.js";
|
|
7
|
-
import {
|
|
8
|
-
import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-CxpEHsac.js";
|
|
8
|
+
import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-GqsCYxqT.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/agents-sdk/WorkspaceUserScript.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { p as ChevronRightIcon } from "../../icons-cuEtsgj9.js";
|
|
3
2
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
4
3
|
import { useExpansionState } from "./ExpansionState.js";
|
|
4
|
+
import { p as ChevronRightIcon } from "../../icons-CeGfXO21.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ai-sdk/Activity.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { nt as XIcon } from "../../icons-
|
|
2
|
+
import { nt as XIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { PromptInputTray } from "./PromptInput.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { R as PencilIcon } from "../../icons-
|
|
2
|
+
import { R as PencilIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
5
4
|
import { Kbd } from "../foundations/Kbd.js";
|
|
5
|
+
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/ai-sdk/Approval.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, et as WarningIcon, nt as XIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, et as WarningIcon, nt as XIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
|
-
import "react";
|
|
6
|
+
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/ai-sdk/Artifact.tsx
|
|
9
9
|
/**
|
|
@@ -136,7 +136,7 @@ function ArtifactPreview({ className, label, sourceLink, state, ref, ...props })
|
|
|
136
136
|
/* @__PURE__ */ jsx(ArtifactHeader, {
|
|
137
137
|
className: "artifact-preview__header",
|
|
138
138
|
children: /* @__PURE__ */ jsx(NavigationLink, {
|
|
139
|
-
render: sourceLink,
|
|
139
|
+
render: React.cloneElement(sourceLink, {}, "View source"),
|
|
140
140
|
className: buttonVariants({
|
|
141
141
|
variant: "ghost",
|
|
142
142
|
color: "neutral",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-cuEtsgj9.js";
|
|
3
2
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
+
import { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-CeGfXO21.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ai-sdk/ChainOfThought.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { s as BookmarkIcon } from "../../icons-
|
|
2
|
+
import { s as BookmarkIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Marker, MarkerIcon } from "../foundations/Marker.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-
|
|
1
|
+
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-BSJl682D.js";
|
|
2
2
|
export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { brandHexFromIconSrc, parseComposerHref, sampleImageAccent } from "../../utils/composer-link.js";
|
|
2
2
|
import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
3
3
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
4
|
-
import { c as BoxIcon } from "../../icons-
|
|
4
|
+
import { c as BoxIcon } from "../../icons-CeGfXO21.js";
|
|
5
5
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
6
6
|
import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as Correspondent } from "../../Correspondent-7K6uNLUm.js";
|
|
1
2
|
import { CardProps } from "../foundations/Card.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
|
|
@@ -34,6 +35,8 @@ interface EmailMessageDraft {
|
|
|
34
35
|
body?: string;
|
|
35
36
|
}
|
|
36
37
|
interface EmailMessageCardProps extends ConnectedAppCardProps, EmailMessageDraft {
|
|
38
|
+
/** Person-shaped To. The address string remains the route. */
|
|
39
|
+
correspondent?: Correspondent;
|
|
37
40
|
onChange?: (next: EmailMessageDraft) => void;
|
|
38
41
|
onDiscard?: () => void | Promise<void>;
|
|
39
42
|
onReject?: (reason: string) => void | Promise<void>;
|
|
@@ -45,6 +48,7 @@ interface EmailMessageCardProps extends ConnectedAppCardProps, EmailMessageDraft
|
|
|
45
48
|
*/
|
|
46
49
|
declare function EmailMessageCard({
|
|
47
50
|
body,
|
|
51
|
+
correspondent,
|
|
48
52
|
from,
|
|
49
53
|
icon,
|
|
50
54
|
onChange,
|
|
@@ -66,6 +70,8 @@ interface SlackMessageDraft {
|
|
|
66
70
|
message: string;
|
|
67
71
|
}
|
|
68
72
|
interface SlackMessageCardProps extends ConnectedAppCardProps, SlackMessageDraft {
|
|
73
|
+
/** Person-shaped To. Rooms stay the destination string. */
|
|
74
|
+
correspondent?: Correspondent;
|
|
69
75
|
onChange?: (next: SlackMessageDraft) => void;
|
|
70
76
|
onDiscard?: () => void | Promise<void>;
|
|
71
77
|
onReject?: (reason: string) => void | Promise<void>;
|
|
@@ -73,6 +79,7 @@ interface SlackMessageCardProps extends ConnectedAppCardProps, SlackMessageDraft
|
|
|
73
79
|
}
|
|
74
80
|
/** Slack draft or posted message with workspace, destination, and thread fields. */
|
|
75
81
|
declare function SlackMessageCard({
|
|
82
|
+
correspondent,
|
|
76
83
|
icon,
|
|
77
84
|
message,
|
|
78
85
|
onChange,
|