@marimo-team/islands 0.22.1-dev28 → 0.22.1-dev30
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/{ConnectedDataExplorerComponent-B5oZf6LB.js → ConnectedDataExplorerComponent-DTOsfq2x.js} +4 -4
- package/dist/assets/__vite-browser-external-WSlCcXn_.js +1 -0
- package/dist/assets/{worker-D10K3OOz.js → worker-DUYMdbtA.js} +2 -2
- package/dist/{chat-ui-Wi1Lm6y4.js → chat-ui-eH46RYWT.js} +5 -5
- package/dist/{glide-data-editor-D8O9AS1C.js → glide-data-editor-VgPtWvhu.js} +2 -2
- package/dist/{input-BeQSGpld.js → input-CFY9gApZ.js} +1 -1
- package/dist/main.js +15 -15
- package/dist/{mermaid-808LPVim.js → mermaid-B2HDLx2g.js} +2 -2
- package/dist/{process-output-BvZAAk1w.js → process-output-BbUNe4iH.js} +6 -7
- package/dist/{spec-sgFxCEh3.js → spec-CiHus5Bb.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{toDate-O4H9dZVC.js → toDate-BzYZtEK7.js} +1 -1
- package/dist/{useAsyncData-CdwQvOxU.js → useAsyncData-rN1nzPaS.js} +1 -1
- package/dist/{useDeepCompareMemoize-B8DwRVrX.js → useDeepCompareMemoize-iM1YNTEF.js} +2 -2
- package/dist/{useLifecycle-BlKjtYt4.js → useLifecycle-DgDTfOLZ.js} +1 -1
- package/dist/{useTheme-Bu-jenEZ.js → useTheme-MWfxn4oz.js} +1 -2
- package/dist/{vega-component-C-fsM9rL.js → vega-component-CkpTXaRx.js} +4 -4
- package/package.json +1 -1
- package/src/components/ai/ai-provider-icon.tsx +2 -0
- package/src/components/app-config/user-config-form.tsx +0 -27
- package/src/components/chat/acp/agent-docs.tsx +3 -3
- package/src/components/chat/acp/agent-panel.tsx +69 -22
- package/src/components/chat/acp/agent-selector.tsx +2 -11
- package/src/components/chat/acp/state.ts +14 -2
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +0 -10
- package/src/core/config/__tests__/config-schema.test.ts +2 -6
- package/src/core/config/config-schema.ts +0 -1
- package/src/core/config/feature-flag.tsx +0 -2
- package/dist/assets/__vite-browser-external-Us1ds95c.js +0 -1
|
@@ -6,7 +6,7 @@ import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
|
6
6
|
import { l as createLucideIcon } from "./dist-D_UjpfOY.js";
|
|
7
7
|
import { g as Logger } from "./button-DNlNlZY_.js";
|
|
8
8
|
import { r as KnownQueryParams } from "./constants-CvyfaCvs.js";
|
|
9
|
-
import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-
|
|
9
|
+
import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-MWfxn4oz.js";
|
|
10
10
|
var CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
11
11
|
["circle", {
|
|
12
12
|
cx: "12",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { w as useEvent_default } from "./useTheme-
|
|
4
|
+
import { w as useEvent_default } from "./useTheme-MWfxn4oz.js";
|
|
5
5
|
import { t as invariant } from "./invariant-e8eBgdux.js";
|
|
6
6
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
|
|
7
7
|
error(e, s) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { t as toDate } from "./toDate-
|
|
4
|
+
import { t as toDate } from "./toDate-BzYZtEK7.js";
|
|
5
5
|
import { r as cva, y as cn } from "./button-DNlNlZY_.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
7
|
-
import { C as dequal } from "./useTheme-
|
|
7
|
+
import { C as dequal } from "./useTheme-MWfxn4oz.js";
|
|
8
8
|
import { i as tableFromIPC } from "./loader-Bd1kgLn7.js";
|
|
9
9
|
function isDate(t) {
|
|
10
10
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
@@ -4,7 +4,7 @@ import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
|
4
4
|
import { l as createLucideIcon } from "./dist-D_UjpfOY.js";
|
|
5
5
|
import { g as Logger, r as cva, y as cn } from "./button-DNlNlZY_.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
7
|
-
import { _ as useSetAtom, y as atom } from "./useTheme-
|
|
7
|
+
import { _ as useSetAtom, y as atom } from "./useTheme-MWfxn4oz.js";
|
|
8
8
|
var Calendar = createLucideIcon("calendar", [
|
|
9
9
|
["path", {
|
|
10
10
|
d: "M8 2v4",
|
|
@@ -629,8 +629,7 @@ const UserConfigSchema = looseObject({
|
|
|
629
629
|
}).prefault({}),
|
|
630
630
|
experimental: looseObject({
|
|
631
631
|
markdown: boolean().optional(),
|
|
632
|
-
rtc: boolean().optional()
|
|
633
|
-
storage_inspector: boolean().prefault(true)
|
|
632
|
+
rtc: boolean().optional()
|
|
634
633
|
}).prefault(() => ({})),
|
|
635
634
|
server: looseObject({ disable_file_downloads: boolean().optional() }).prefault(() => ({})),
|
|
636
635
|
diagnostics: looseObject({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { c as asRemoteURL, g as CircleQuestionMark } from "./toDate-
|
|
4
|
+
import { c as asRemoteURL, g as CircleQuestionMark } from "./toDate-BzYZtEK7.js";
|
|
5
5
|
import { c as Objects, g as Logger, h as Events, y as cn } from "./button-DNlNlZY_.js";
|
|
6
6
|
import "./react-dom-BSUuJjCR.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
@@ -9,12 +9,12 @@ import "./zod-C6UGQ3fz.js";
|
|
|
9
9
|
import { n as ErrorBanner } from "./error-banner-Cjf0RU9I.js";
|
|
10
10
|
import { t as Tooltip } from "./tooltip-BXEpXV3R.js";
|
|
11
11
|
import { i as debounce_default } from "./constants-CvyfaCvs.js";
|
|
12
|
-
import { n as useTheme, w as useEvent_default } from "./useTheme-
|
|
12
|
+
import { n as useTheme, w as useEvent_default } from "./useTheme-MWfxn4oz.js";
|
|
13
13
|
import { s as uniq } from "./arrays-beUWo8RF.js";
|
|
14
|
-
import { a as AlertTitle, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
14
|
+
import { a as AlertTitle, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-iM1YNTEF.js";
|
|
15
15
|
import { n as formats } from "./vega-loader.browser-DqEcFOPD.js";
|
|
16
16
|
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-Bd1kgLn7.js";
|
|
17
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
17
|
+
import { t as useAsyncData } from "./useAsyncData-rN1nzPaS.js";
|
|
18
18
|
import { t as j } from "./react-vega-CzRAIHrv.js";
|
|
19
19
|
import "./defaultLocale-qS7DaAmi.js";
|
|
20
20
|
import "./defaultLocale-Bxoo2-30.js";
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import AnthropicIcon from "@marimo-team/llm-info/icons/anthropic.svg?inline";
|
|
4
4
|
import BedrockIcon from "@marimo-team/llm-info/icons/aws.svg?inline";
|
|
5
5
|
import AzureIcon from "@marimo-team/llm-info/icons/azure.svg?inline";
|
|
6
|
+
import CursorIcon from "@marimo-team/llm-info/icons/cursor.svg?inline";
|
|
6
7
|
import DeepseekIcon from "@marimo-team/llm-info/icons/deepseek.svg?inline";
|
|
7
8
|
import GitHubIcon from "@marimo-team/llm-info/icons/github.svg?inline";
|
|
8
9
|
import GeminiIcon from "@marimo-team/llm-info/icons/googlegemini.svg?inline";
|
|
@@ -34,6 +35,7 @@ const icons: Record<ProviderId | ExternalAgentId, string> = {
|
|
|
34
35
|
wandb: WandbIcon,
|
|
35
36
|
marimo: marimoIcon,
|
|
36
37
|
opencode: OpencodeIcon,
|
|
38
|
+
cursor: CursorIcon,
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
export interface AiProviderIconProps extends React.HTMLAttributes<HTMLImageElement> {
|
|
@@ -1276,33 +1276,6 @@ export const UserConfigForm: React.FC = () => {
|
|
|
1276
1276
|
</div>
|
|
1277
1277
|
)}
|
|
1278
1278
|
/>
|
|
1279
|
-
<FormField
|
|
1280
|
-
control={form.control}
|
|
1281
|
-
name="experimental.storage_inspector"
|
|
1282
|
-
render={({ field }) => (
|
|
1283
|
-
<div className="flex flex-col gap-y-1">
|
|
1284
|
-
<FormItem className={formItemClasses}>
|
|
1285
|
-
<FormLabel className="font-normal">
|
|
1286
|
-
Storage Inspector
|
|
1287
|
-
</FormLabel>
|
|
1288
|
-
<FormControl>
|
|
1289
|
-
<Checkbox
|
|
1290
|
-
data-testid="storage-inspector-checkbox"
|
|
1291
|
-
checked={field.value === true}
|
|
1292
|
-
onCheckedChange={field.onChange}
|
|
1293
|
-
/>
|
|
1294
|
-
</FormControl>
|
|
1295
|
-
</FormItem>
|
|
1296
|
-
<IsOverridden
|
|
1297
|
-
userConfig={config}
|
|
1298
|
-
name="experimental.storage_inspector"
|
|
1299
|
-
/>
|
|
1300
|
-
<FormDescription>
|
|
1301
|
-
Enable experimental storage inspector.
|
|
1302
|
-
</FormDescription>
|
|
1303
|
-
</div>
|
|
1304
|
-
)}
|
|
1305
|
-
/>
|
|
1306
1279
|
</SettingGroup>
|
|
1307
1280
|
);
|
|
1308
1281
|
}
|
|
@@ -50,11 +50,11 @@ const AgentDocItem = memo<AgentDocItemProps>(
|
|
|
50
50
|
</div>
|
|
51
51
|
<div className="bg-muted/50 rounded-md p-2 border">
|
|
52
52
|
<div className="flex items-start gap-2 text-xs">
|
|
53
|
-
<TerminalIcon className="h-4 w-4 mt-0.5 text-muted-foreground
|
|
54
|
-
<code className="text-xs font-mono break-
|
|
53
|
+
<TerminalIcon className="h-4 w-4 mt-0.5 text-muted-foreground shrink-0" />
|
|
54
|
+
<code className="text-xs font-mono wrap-break-word flex-1 whitespace-pre-wrap">
|
|
55
55
|
{command}
|
|
56
56
|
</code>
|
|
57
|
-
<div className="flex items-center gap-1
|
|
57
|
+
<div className="flex items-center gap-1 shrink-0">
|
|
58
58
|
{showCopy && (
|
|
59
59
|
<Button size="xs" variant="outline" className="border">
|
|
60
60
|
<CopyClipboardIcon value={command} className="h-3 w-3" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { useAtom
|
|
3
|
+
import { useAtom } from "jotai";
|
|
4
4
|
import {
|
|
5
5
|
BotMessageSquareIcon,
|
|
6
6
|
RefreshCwIcon,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "lucide-react";
|
|
9
9
|
import React, { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import useEvent from "react-use-event-hook";
|
|
11
|
-
import { useAcpClient } from "use-acp";
|
|
11
|
+
import { JsonRpcError, useAcpClient } from "use-acp";
|
|
12
12
|
import {
|
|
13
13
|
ConnectionStatus,
|
|
14
14
|
PermissionRequest,
|
|
@@ -207,7 +207,6 @@ interface EmptyStateProps {
|
|
|
207
207
|
|
|
208
208
|
const EmptyState = memo<EmptyStateProps>(
|
|
209
209
|
({ currentAgentId, connectionState, onConnect, onDisconnect }) => {
|
|
210
|
-
const filename = useAtomValue(filenameAtom);
|
|
211
210
|
return (
|
|
212
211
|
<div className="flex flex-col h-full">
|
|
213
212
|
<AgentPanelHeader
|
|
@@ -223,7 +222,7 @@ const EmptyState = memo<EmptyStateProps>(
|
|
|
223
222
|
<PanelEmptyState
|
|
224
223
|
title="No Agent Sessions"
|
|
225
224
|
description="Create a new session to start a conversation"
|
|
226
|
-
action={<AgentSelector className="border-y
|
|
225
|
+
action={<AgentSelector className="border-y rounded" />}
|
|
227
226
|
icon={<BotMessageSquareIcon />}
|
|
228
227
|
/>
|
|
229
228
|
{connectionState.status === "disconnected" && (
|
|
@@ -232,10 +231,13 @@ const EmptyState = memo<EmptyStateProps>(
|
|
|
232
231
|
title="Connect to an agent"
|
|
233
232
|
description={
|
|
234
233
|
<>
|
|
235
|
-
|
|
234
|
+
<span>
|
|
235
|
+
Start agents by running these commands in your terminal.
|
|
236
|
+
</span>
|
|
236
237
|
<br />
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
<span>
|
|
239
|
+
Authenticate with the agent before starting a session.
|
|
240
|
+
</span>
|
|
239
241
|
</>
|
|
240
242
|
}
|
|
241
243
|
/>
|
|
@@ -615,6 +617,15 @@ const ChatContent = memo<ChatContentProps>(
|
|
|
615
617
|
ChatContent.displayName = "ChatContent";
|
|
616
618
|
|
|
617
619
|
const NO_WS_SET = "_skip_auto_connect_";
|
|
620
|
+
const AUTH_REQUIRED_CODE = -32_000;
|
|
621
|
+
|
|
622
|
+
function getDataMessage(data: unknown): string | undefined {
|
|
623
|
+
if (data != null && typeof data === "object" && "message" in data) {
|
|
624
|
+
const msg = (data as Record<string, unknown>).message;
|
|
625
|
+
return typeof msg === "string" ? msg : undefined;
|
|
626
|
+
}
|
|
627
|
+
return undefined;
|
|
628
|
+
}
|
|
618
629
|
|
|
619
630
|
function getCwd(): string {
|
|
620
631
|
const cwd = store.get(cwdAtom);
|
|
@@ -705,14 +716,31 @@ const AgentPanel: React.FC = () => {
|
|
|
705
716
|
} = acpClient;
|
|
706
717
|
|
|
707
718
|
useEffect(() => {
|
|
708
|
-
agent
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
719
|
+
if (!agent) {
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
const initAndAuth = async () => {
|
|
724
|
+
const response = await agent.initialize({
|
|
725
|
+
protocolVersion: 1,
|
|
726
|
+
clientCapabilities: {
|
|
727
|
+
fs: {
|
|
728
|
+
readTextFile: true,
|
|
729
|
+
writeTextFile: true,
|
|
730
|
+
},
|
|
714
731
|
},
|
|
715
|
-
}
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
// We try to authenticate with the agent if it supports it.
|
|
735
|
+
// The user must then restart the session
|
|
736
|
+
const authMethods = response?.authMethods;
|
|
737
|
+
if (authMethods && authMethods.length > 0) {
|
|
738
|
+
await agent.authenticate({ methodId: authMethods[0].id });
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
initAndAuth().catch((error) => {
|
|
743
|
+
logger.error("Failed to initialize/authenticate agent", { error });
|
|
716
744
|
});
|
|
717
745
|
}, [agent]);
|
|
718
746
|
|
|
@@ -1041,18 +1069,37 @@ const AgentPanel: React.FC = () => {
|
|
|
1041
1069
|
|
|
1042
1070
|
const renderBody = () => {
|
|
1043
1071
|
if (error) {
|
|
1072
|
+
const isAuthError =
|
|
1073
|
+
error instanceof JsonRpcError && error.code === AUTH_REQUIRED_CODE;
|
|
1074
|
+
const dataMessage =
|
|
1075
|
+
error instanceof JsonRpcError ? getDataMessage(error.data) : undefined;
|
|
1076
|
+
const displayError = dataMessage ? new Error(dataMessage) : error;
|
|
1077
|
+
|
|
1044
1078
|
return (
|
|
1045
1079
|
<ErrorBanner
|
|
1046
1080
|
className="w-3/4 mx-auto mt-10"
|
|
1047
|
-
error={
|
|
1081
|
+
error={displayError}
|
|
1048
1082
|
action={
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1083
|
+
isAuthError ? (
|
|
1084
|
+
<Button
|
|
1085
|
+
variant="linkDestructive"
|
|
1086
|
+
size="sm"
|
|
1087
|
+
onClick={() => {
|
|
1088
|
+
setError(null);
|
|
1089
|
+
handleNewSession();
|
|
1090
|
+
}}
|
|
1091
|
+
>
|
|
1092
|
+
Restart session
|
|
1093
|
+
</Button>
|
|
1094
|
+
) : (
|
|
1095
|
+
<Button
|
|
1096
|
+
variant="linkDestructive"
|
|
1097
|
+
size="sm"
|
|
1098
|
+
onClick={() => setError(null)}
|
|
1099
|
+
>
|
|
1100
|
+
Dismiss
|
|
1101
|
+
</Button>
|
|
1102
|
+
)
|
|
1056
1103
|
}
|
|
1057
1104
|
/>
|
|
1058
1105
|
);
|
|
@@ -16,9 +16,7 @@ import {
|
|
|
16
16
|
DropdownMenuSubTrigger,
|
|
17
17
|
DropdownMenuTrigger,
|
|
18
18
|
} from "@/components/ui/dropdown-menu";
|
|
19
|
-
import { useFilename } from "@/core/saving/filename";
|
|
20
19
|
import { cn } from "@/utils/cn";
|
|
21
|
-
import { Paths } from "@/utils/paths";
|
|
22
20
|
import { AgentDocs } from "./agent-docs";
|
|
23
21
|
import {
|
|
24
22
|
type AgentSession,
|
|
@@ -55,17 +53,17 @@ const AVAILABLE_AGENTS = [
|
|
|
55
53
|
displayName: "OpenCode",
|
|
56
54
|
iconId: "opencode",
|
|
57
55
|
},
|
|
56
|
+
{ id: "cursor", displayName: "Cursor", iconId: "cursor" },
|
|
58
57
|
] as const;
|
|
59
58
|
|
|
60
59
|
interface AgentMenuItemProps {
|
|
61
60
|
agent: (typeof AVAILABLE_AGENTS)[number];
|
|
62
61
|
onSelect: (agentId: ExternalAgentId) => void;
|
|
63
62
|
existingSessions: AgentSession[];
|
|
64
|
-
filename: string | null;
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
const AgentMenuItem = memo<AgentMenuItemProps>(
|
|
68
|
-
({ agent, onSelect, existingSessions
|
|
66
|
+
({ agent, onSelect, existingSessions }) => {
|
|
69
67
|
const sessionSupport = getAgentSessionSupport(agent.id);
|
|
70
68
|
const hasExistingSession = existingSessions.some(
|
|
71
69
|
(s) => s.agentId === agent.id,
|
|
@@ -108,11 +106,6 @@ const AgentMenuItem = memo<AgentMenuItemProps>(
|
|
|
108
106
|
<div className="text-xs font-medium text-muted-foreground mb-3">
|
|
109
107
|
To start a {agent.displayName} agent, run the following command
|
|
110
108
|
in your terminal.
|
|
111
|
-
<br />
|
|
112
|
-
Note: This must be in the directory{" "}
|
|
113
|
-
<code className="bg-muted font-mono">
|
|
114
|
-
{Paths.dirname(filename ?? "")}
|
|
115
|
-
</code>
|
|
116
109
|
</div>
|
|
117
110
|
<AgentDocs agents={[agent.id]} showCopy={true} />
|
|
118
111
|
</div>
|
|
@@ -126,7 +119,6 @@ AgentMenuItem.displayName = "AgentMenuItem";
|
|
|
126
119
|
|
|
127
120
|
export const AgentSelector: React.FC<AgentSelectorProps> = memo(
|
|
128
121
|
({ onSessionCreated, className }) => {
|
|
129
|
-
const filename = useFilename();
|
|
130
122
|
const [sessionState, setSessionState] = useAtom(agentSessionStateAtom);
|
|
131
123
|
const setActiveTab = useSetAtom(selectedTabAtom);
|
|
132
124
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -165,7 +157,6 @@ export const AgentSelector: React.FC<AgentSelectorProps> = memo(
|
|
|
165
157
|
agent={agent}
|
|
166
158
|
onSelect={handleCreateSession}
|
|
167
159
|
existingSessions={sessionState.sessions}
|
|
168
|
-
filename={filename}
|
|
169
160
|
/>
|
|
170
161
|
))}
|
|
171
162
|
</DropdownMenuContent>
|
|
@@ -11,7 +11,12 @@ import type { ExternalAgentSessionId, SessionSupportType } from "./types";
|
|
|
11
11
|
|
|
12
12
|
// Types
|
|
13
13
|
export type TabId = TypedString<"TabId">;
|
|
14
|
-
export type ExternalAgentId =
|
|
14
|
+
export type ExternalAgentId =
|
|
15
|
+
| "claude"
|
|
16
|
+
| "gemini"
|
|
17
|
+
| "codex"
|
|
18
|
+
| "opencode"
|
|
19
|
+
| "cursor";
|
|
15
20
|
|
|
16
21
|
// No agents support loading sessions, so we limit to 1, otherwise
|
|
17
22
|
// this is confusing to the user when switching between sessions
|
|
@@ -225,7 +230,7 @@ export function getSessionsByAgent(
|
|
|
225
230
|
}
|
|
226
231
|
|
|
227
232
|
export function getAllAgentIds(): ExternalAgentId[] {
|
|
228
|
-
return ["claude", "gemini", "codex", "opencode"];
|
|
233
|
+
return ["claude", "gemini", "codex", "opencode", "cursor"];
|
|
229
234
|
}
|
|
230
235
|
|
|
231
236
|
export function getAgentDisplayName(agentId: ExternalAgentId): string {
|
|
@@ -245,6 +250,8 @@ interface AgentConfig {
|
|
|
245
250
|
port: number;
|
|
246
251
|
command: string;
|
|
247
252
|
sessionSupport: SessionSupportType;
|
|
253
|
+
/** One-time setup command the user must run before starting the agent. */
|
|
254
|
+
loginHint?: string;
|
|
248
255
|
}
|
|
249
256
|
|
|
250
257
|
const AGENT_CONFIG: Record<ExternalAgentId, AgentConfig> = {
|
|
@@ -268,6 +275,11 @@ const AGENT_CONFIG: Record<ExternalAgentId, AgentConfig> = {
|
|
|
268
275
|
command: "npx opencode-ai acp",
|
|
269
276
|
sessionSupport: "single",
|
|
270
277
|
},
|
|
278
|
+
cursor: {
|
|
279
|
+
port: 3025,
|
|
280
|
+
command: "agent acp",
|
|
281
|
+
sessionSupport: "single",
|
|
282
|
+
},
|
|
271
283
|
};
|
|
272
284
|
|
|
273
285
|
export function getAgentSessionSupport(
|
|
@@ -7,7 +7,6 @@ import React, { useCallback, useMemo } from "react";
|
|
|
7
7
|
import useResizeObserver from "use-resize-observer";
|
|
8
8
|
import { StorageInspector } from "@/components/storage/storage-inspector";
|
|
9
9
|
import { Accordion } from "@/components/ui/accordion";
|
|
10
|
-
import { getFeatureFlag } from "@/core/config/feature-flag";
|
|
11
10
|
import { storageNamespacesAtom } from "@/core/storage/state";
|
|
12
11
|
import { cn } from "@/utils/cn";
|
|
13
12
|
import { jotaiJsonStorage } from "@/utils/storage/jotai";
|
|
@@ -103,15 +102,6 @@ const FileExplorerPanel: React.FC = () => {
|
|
|
103
102
|
bothOpen ? availableContent - storageMaxHeight : availableContent,
|
|
104
103
|
);
|
|
105
104
|
|
|
106
|
-
const storageInspectorEnabled = getFeatureFlag("storage_inspector");
|
|
107
|
-
if (!storageInspectorEnabled) {
|
|
108
|
-
return (
|
|
109
|
-
<div ref={panelRef} className="h-full overflow-auto">
|
|
110
|
-
<FileExplorerComponent height={panelHeight} />
|
|
111
|
-
</div>
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
105
|
return (
|
|
116
106
|
<div ref={panelRef} className="h-full overflow-auto">
|
|
117
107
|
<Accordion
|
|
@@ -70,9 +70,7 @@ test("default UserConfig - empty", () => {
|
|
|
70
70
|
"reference_highlighting": true,
|
|
71
71
|
"theme": "light",
|
|
72
72
|
},
|
|
73
|
-
"experimental": {
|
|
74
|
-
"storage_inspector": true,
|
|
75
|
-
},
|
|
73
|
+
"experimental": {},
|
|
76
74
|
"formatting": {
|
|
77
75
|
"line_length": 79,
|
|
78
76
|
},
|
|
@@ -142,9 +140,7 @@ test("default UserConfig - one level", () => {
|
|
|
142
140
|
"reference_highlighting": true,
|
|
143
141
|
"theme": "light",
|
|
144
142
|
},
|
|
145
|
-
"experimental": {
|
|
146
|
-
"storage_inspector": true,
|
|
147
|
-
},
|
|
143
|
+
"experimental": {},
|
|
148
144
|
"formatting": {
|
|
149
145
|
"line_length": 79,
|
|
150
146
|
},
|
|
@@ -186,7 +186,6 @@ export const UserConfigSchema = z
|
|
|
186
186
|
.looseObject({
|
|
187
187
|
markdown: z.boolean().optional(),
|
|
188
188
|
rtc: z.boolean().optional(),
|
|
189
|
-
storage_inspector: z.boolean().prefault(true),
|
|
190
189
|
// Add new experimental features here
|
|
191
190
|
})
|
|
192
191
|
// Pass through so that we don't remove any extra keys that the user has added.
|
|
@@ -11,7 +11,6 @@ export interface ExperimentalFeatures {
|
|
|
11
11
|
rtc_v2: boolean;
|
|
12
12
|
cache_panel: boolean;
|
|
13
13
|
external_agents: boolean;
|
|
14
|
-
storage_inspector: boolean;
|
|
15
14
|
// Add new feature flags here
|
|
16
15
|
}
|
|
17
16
|
|
|
@@ -21,7 +20,6 @@ const defaultValues: ExperimentalFeatures = {
|
|
|
21
20
|
rtc_v2: false,
|
|
22
21
|
cache_panel: false,
|
|
23
22
|
external_agents: import.meta.env.DEV,
|
|
24
|
-
storage_inspector: true,
|
|
25
23
|
};
|
|
26
24
|
|
|
27
25
|
export function getFeatureFlag<T extends keyof ExperimentalFeatures>(
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./worker-D10K3OOz.js";var t=e(((e,t)=>{t.exports={}}));export default t();
|