@hachej/boring-workspace 0.1.62 → 0.1.63
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/{FileTree-zGmxifl_.js → FileTree-CUvn5K86.js} +1 -1
- package/dist/{MarkdownEditor-BykEKKxv.js → MarkdownEditor-5f4lhBqc.js} +11 -11
- package/dist/{WorkspaceLoadingState-Dfnk7JjR.js → WorkspaceLoadingState-y087Q6ek.js} +40 -40
- package/dist/{WorkspaceProvider-kf-pjz6V.js → WorkspaceProvider-U4izhS84.js} +3568 -3438
- package/dist/app-front.d.ts +10 -4
- package/dist/app-front.js +149 -148
- package/dist/app-server.d.ts +4 -3
- package/dist/app-server.js +42 -22
- package/dist/events.d.ts +9 -0
- package/dist/filesystem-vhLA0ERd.d.ts +17 -0
- package/dist/plugin.d.ts +4 -3
- package/dist/{runtimeEnv-B8XJz-k4.d.ts → runtimeEnv-HolIkcoB.d.ts} +1 -1
- package/dist/server.d.ts +5 -4
- package/dist/server.js +42 -22
- package/dist/shared.d.ts +3 -2
- package/dist/shared.js +35 -1
- package/dist/{surface-CDklwi48.d.ts → surface-aLQ_Hryw.d.ts} +2 -0
- package/dist/testing.d.ts +4 -0
- package/dist/testing.js +1 -1
- package/dist/{ui-bridge-BbuUZ5iC.d.ts → ui-bridge-D2eO3epD.d.ts} +4 -0
- package/dist/workspace.css +2 -0
- package/dist/workspace.d.ts +77 -17
- package/dist/workspace.js +74 -73
- package/docs/README.md +29 -0
- package/package.json +4 -4
package/dist/workspace.d.ts
CHANGED
|
@@ -226,6 +226,7 @@ export declare interface BridgeEventMap {
|
|
|
226
226
|
"file:opened": {
|
|
227
227
|
path: string;
|
|
228
228
|
mode: "view" | "edit" | "diff";
|
|
229
|
+
filesystem?: FilesystemId;
|
|
229
230
|
};
|
|
230
231
|
"file:saved": {
|
|
231
232
|
path: string;
|
|
@@ -435,6 +436,7 @@ export declare function CodeEditorPane({ params, api, className }: CodeEditorPan
|
|
|
435
436
|
|
|
436
437
|
export declare type CodeEditorPaneProps = PaneProps<{
|
|
437
438
|
path?: string;
|
|
439
|
+
filesystem?: FilesystemId;
|
|
438
440
|
mode?: "view" | "edit" | "diff";
|
|
439
441
|
}>;
|
|
440
442
|
|
|
@@ -732,7 +734,7 @@ declare class FetchClient {
|
|
|
732
734
|
constructor(opts: FetchClientOptions);
|
|
733
735
|
private request;
|
|
734
736
|
getTree(path: string, signal?: AbortSignal): Promise<FileEntry[]>;
|
|
735
|
-
getFile(path: string, signal?: AbortSignal): Promise<FileContent>;
|
|
737
|
+
getFile(path: string, signal?: AbortSignal, filesystem?: string): Promise<FileContent>;
|
|
736
738
|
/**
|
|
737
739
|
* Write file content. When `expectedMtimeMs` is supplied, the server
|
|
738
740
|
* runs an optimistic-concurrency check and returns 409 if the file
|
|
@@ -748,15 +750,22 @@ declare class FetchClient {
|
|
|
748
750
|
writeFile(path: string, content: string, opts?: {
|
|
749
751
|
expectedMtimeMs?: number;
|
|
750
752
|
returnMtimeMs?: boolean;
|
|
753
|
+
filesystem?: string;
|
|
751
754
|
}): Promise<{
|
|
752
755
|
mtimeMs?: number;
|
|
753
756
|
}>;
|
|
754
|
-
deleteFile(path: string
|
|
755
|
-
|
|
757
|
+
deleteFile(path: string, options?: {
|
|
758
|
+
filesystem?: string;
|
|
759
|
+
}): Promise<void>;
|
|
760
|
+
stat(path: string, signal?: AbortSignal, filesystem?: string): Promise<FileStat>;
|
|
756
761
|
getGitUrlMetadata(path: string, signal?: AbortSignal): Promise<GitUrlMetadata>;
|
|
757
762
|
search(query: string, limit?: number, signal?: AbortSignal): Promise<string[]>;
|
|
758
|
-
createDir(path: string
|
|
759
|
-
|
|
763
|
+
createDir(path: string, options?: {
|
|
764
|
+
filesystem?: string;
|
|
765
|
+
}): Promise<void>;
|
|
766
|
+
moveFile(from: string, to: string, options?: {
|
|
767
|
+
filesystem?: string;
|
|
768
|
+
}): Promise<void>;
|
|
760
769
|
}
|
|
761
770
|
|
|
762
771
|
declare interface FetchClientOptions {
|
|
@@ -873,6 +882,7 @@ export declare type FilesystemEventMeta = ({
|
|
|
873
882
|
toolCallId?: string;
|
|
874
883
|
}) & {
|
|
875
884
|
ts: number;
|
|
885
|
+
filesystem?: FilesystemId;
|
|
876
886
|
};
|
|
877
887
|
|
|
878
888
|
export declare const filesystemEvents: {
|
|
@@ -882,6 +892,8 @@ export declare const filesystemEvents: {
|
|
|
882
892
|
readonly deleted: "filesystem:file.deleted";
|
|
883
893
|
};
|
|
884
894
|
|
|
895
|
+
declare type FilesystemId = "user" | "company_context" | (string & {});
|
|
896
|
+
|
|
885
897
|
export declare const filesystemPlugin: BoringFrontFactoryWithId;
|
|
886
898
|
|
|
887
899
|
export declare function FileTree({ files, selectedPath, searchQuery, height, editing, revealPath, pendingPaths, onSelect, onExpand, onCollapse, onContextMenu, onSubmitEdit, onCancelEdit, onRevealHandled, onDragDrop, className, }: FileTreeProps): JSX.Element;
|
|
@@ -1077,6 +1089,7 @@ export declare function MarkdownEditorPane({ params, api, className }: MarkdownE
|
|
|
1077
1089
|
|
|
1078
1090
|
export declare type MarkdownEditorPaneProps = PaneProps<{
|
|
1079
1091
|
path?: string;
|
|
1092
|
+
filesystem?: FilesystemId;
|
|
1080
1093
|
mode?: "view" | "edit" | "diff";
|
|
1081
1094
|
}>;
|
|
1082
1095
|
|
|
@@ -1132,11 +1145,14 @@ export declare type OpenArtifactHandler = (path: string) => void;
|
|
|
1132
1145
|
export declare const openFileSchema: z.ZodObject<{
|
|
1133
1146
|
path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1134
1147
|
mode: z.ZodOptional<z.ZodEnum<["view", "edit", "diff"]>>;
|
|
1148
|
+
filesystem: z.ZodOptional<z.ZodString>;
|
|
1135
1149
|
}, "strip", z.ZodTypeAny, {
|
|
1136
1150
|
path: string;
|
|
1151
|
+
filesystem?: string | undefined;
|
|
1137
1152
|
mode?: "view" | "edit" | "diff" | undefined;
|
|
1138
1153
|
}, {
|
|
1139
1154
|
path: string;
|
|
1155
|
+
filesystem?: string | undefined;
|
|
1140
1156
|
mode?: "view" | "edit" | "diff" | undefined;
|
|
1141
1157
|
}>;
|
|
1142
1158
|
|
|
@@ -1518,6 +1534,7 @@ declare type StoreApi_2 = {
|
|
|
1518
1534
|
export declare interface SurfaceOpenRequest {
|
|
1519
1535
|
kind: string;
|
|
1520
1536
|
target: string;
|
|
1537
|
+
filesystem?: FilesystemId;
|
|
1521
1538
|
meta?: Record<string, unknown>;
|
|
1522
1539
|
}
|
|
1523
1540
|
|
|
@@ -1584,10 +1601,8 @@ export declare interface SurfaceResolverRegistryLike {
|
|
|
1584
1601
|
export declare function SurfaceShell({ rootDir, sidebarDefaultWidth, sidebarMinWidth, sidebarMaxWidth, storageKey, onReady, onChange, onClose, showCloseAction, extraPanels, defaultLeftTab, onReloadAgentPlugins, initialPanels, className, }: SurfaceShellProps): JSX.Element;
|
|
1585
1602
|
|
|
1586
1603
|
export declare interface SurfaceShellApi {
|
|
1587
|
-
/** Open a file in the workbench. Idempotent — re-activates an existing pane for the same path. */
|
|
1588
|
-
openFile: (path: string,
|
|
1589
|
-
mode?: "view" | "edit" | "diff";
|
|
1590
|
-
}) => void;
|
|
1604
|
+
/** Open a file in the workbench. Idempotent — re-activates an existing pane for the same filesystem/path. */
|
|
1605
|
+
openFile: (path: string, options?: SurfaceShellOpenFileOptions) => void;
|
|
1591
1606
|
/** Open a plugin-defined surface target through the registered surface resolvers. */
|
|
1592
1607
|
openSurface: (request: SurfaceOpenRequest) => void;
|
|
1593
1608
|
/**
|
|
@@ -1605,6 +1620,11 @@ export declare interface SurfaceShellApi {
|
|
|
1605
1620
|
getSnapshot: () => SurfaceShellSnapshot;
|
|
1606
1621
|
}
|
|
1607
1622
|
|
|
1623
|
+
declare interface SurfaceShellOpenFileOptions {
|
|
1624
|
+
filesystem?: FilesystemId;
|
|
1625
|
+
mode?: "view" | "edit" | "diff";
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1608
1628
|
export declare interface SurfaceShellProps {
|
|
1609
1629
|
rootDir?: string;
|
|
1610
1630
|
sidebarDefaultWidth?: number;
|
|
@@ -1857,6 +1877,8 @@ export declare function useFilePane(options: UseFilePaneOptions): UseFilePaneRet
|
|
|
1857
1877
|
export declare interface UseFilePaneOptions {
|
|
1858
1878
|
/** The file path to load/edit. If empty/undefined, pane shows "no file selected". */
|
|
1859
1879
|
path: string;
|
|
1880
|
+
/** Filesystem identity for cache/dirty/stale separation. Defaults to user. */
|
|
1881
|
+
filesystem?: FilesystemId;
|
|
1860
1882
|
/** Unique panel ID for lifecycle tracking. Omit to use a stable per-pane fallback ID. */
|
|
1861
1883
|
panelId?: string;
|
|
1862
1884
|
/** Initial content (optional, for draft/unsaved files). */
|
|
@@ -1948,6 +1970,24 @@ export declare function useWorkspaceContext(): WorkspaceContextValue;
|
|
|
1948
1970
|
|
|
1949
1971
|
export declare function useWorkspaceContextOptional(): WorkspaceContextValue | null;
|
|
1950
1972
|
|
|
1973
|
+
export declare function useWorkspaceLeftPaneActions(options?: UseWorkspaceLeftPaneActionsOptions): WorkspaceLeftPaneAction[];
|
|
1974
|
+
|
|
1975
|
+
export declare interface UseWorkspaceLeftPaneActionsOptions {
|
|
1976
|
+
defaultTab?: WorkbenchLeftTabId;
|
|
1977
|
+
activeTab?: WorkbenchLeftTabId;
|
|
1978
|
+
activePanelId?: string | null;
|
|
1979
|
+
onActiveTabChange?: (tab: WorkbenchLeftTabId) => void;
|
|
1980
|
+
revealFileTreeRequest?: {
|
|
1981
|
+
path: string;
|
|
1982
|
+
seq: number;
|
|
1983
|
+
} | null;
|
|
1984
|
+
onOpenPanel?: (config: WorkspaceLeftPaneOpenPanelConfig) => void;
|
|
1985
|
+
onReloadAgentPlugins?: () => void | Promise<unknown>;
|
|
1986
|
+
onExpand?: (tab?: WorkbenchLeftTabId) => void;
|
|
1987
|
+
onCloseSourcePane?: () => void;
|
|
1988
|
+
railOnly?: boolean;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1951
1991
|
export declare function useWorkspacePluginClient(): WorkspacePluginClient;
|
|
1952
1992
|
|
|
1953
1993
|
export declare function useWorkspaceRequestId(): string | null;
|
|
@@ -1956,13 +1996,6 @@ export declare function useWorkspaceSourceRegistry(): WorkspaceSourceRegistry;
|
|
|
1956
1996
|
|
|
1957
1997
|
export declare function WorkbenchLeftPane({ rootDir, bridge, defaultTab, activeTab: controlledActiveTab, activePanelId, onActiveTabChange, revealFileTreeRequest, onOpenPanel, onReloadAgentPlugins, onCollapse, onExpand, onCloseSourcePane, railOnly, className, }: WorkbenchLeftPaneProps): JSX.Element;
|
|
1958
1998
|
|
|
1959
|
-
declare interface WorkbenchLeftPaneOpenPanelConfig {
|
|
1960
|
-
id: string;
|
|
1961
|
-
component: string;
|
|
1962
|
-
title?: string;
|
|
1963
|
-
params?: Record<string, unknown>;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
1999
|
export declare interface WorkbenchLeftPaneProps {
|
|
1967
2000
|
rootDir?: string;
|
|
1968
2001
|
bridge?: FileTreeBridge;
|
|
@@ -1979,7 +2012,7 @@ export declare interface WorkbenchLeftPaneProps {
|
|
|
1979
2012
|
path: string;
|
|
1980
2013
|
seq: number;
|
|
1981
2014
|
} | null;
|
|
1982
|
-
onOpenPanel?: (config:
|
|
2015
|
+
onOpenPanel?: (config: WorkspaceLeftPaneOpenPanelConfig) => void;
|
|
1983
2016
|
onReloadAgentPlugins?: () => void | Promise<unknown>;
|
|
1984
2017
|
onCollapse?: () => void;
|
|
1985
2018
|
onExpand?: (tab?: WorkbenchLeftTabId) => void;
|
|
@@ -2084,6 +2117,7 @@ export declare interface WorkspaceBridge {
|
|
|
2084
2117
|
getVisibleFiles(): string[];
|
|
2085
2118
|
openFile(path: string, opts?: {
|
|
2086
2119
|
mode?: "view" | "edit" | "diff";
|
|
2120
|
+
filesystem?: FilesystemId;
|
|
2087
2121
|
}): Promise<CommandResult>;
|
|
2088
2122
|
openPanel(config: DynamicPaneConfig): Promise<CommandResult>;
|
|
2089
2123
|
closePanel(id: string): Promise<CommandResult>;
|
|
@@ -2190,6 +2224,23 @@ declare interface WorkspaceHostEventMap {
|
|
|
2190
2224
|
};
|
|
2191
2225
|
}
|
|
2192
2226
|
|
|
2227
|
+
export declare interface WorkspaceLeftPaneAction {
|
|
2228
|
+
id: WorkbenchLeftTabId;
|
|
2229
|
+
title: string;
|
|
2230
|
+
icon: ReactNode;
|
|
2231
|
+
kind: "source" | "workspace-page";
|
|
2232
|
+
active: boolean;
|
|
2233
|
+
select: () => void;
|
|
2234
|
+
reloadAgentPlugins?: () => void | Promise<unknown>;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
export declare interface WorkspaceLeftPaneOpenPanelConfig {
|
|
2238
|
+
id: string;
|
|
2239
|
+
component: string;
|
|
2240
|
+
title?: string;
|
|
2241
|
+
params?: Record<string, unknown>;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2193
2244
|
export declare function WorkspaceLink({ to, children, className, title, href, onClick }: WorkspaceLinkProps): ReactElement;
|
|
2194
2245
|
|
|
2195
2246
|
export declare function workspaceLinkCommand(to: WorkspaceLinkTarget): UiCommand;
|
|
@@ -2209,10 +2260,12 @@ export declare type WorkspaceLinkTarget = {
|
|
|
2209
2260
|
kind: "openFile";
|
|
2210
2261
|
path: string;
|
|
2211
2262
|
mode?: "view" | "edit" | "diff";
|
|
2263
|
+
filesystem?: FilesystemId;
|
|
2212
2264
|
} | {
|
|
2213
2265
|
kind: "openSurface";
|
|
2214
2266
|
surfaceKind: string;
|
|
2215
2267
|
target: string;
|
|
2268
|
+
filesystem?: FilesystemId;
|
|
2216
2269
|
meta?: Record<string, unknown>;
|
|
2217
2270
|
} | {
|
|
2218
2271
|
kind: "openPanel";
|
|
@@ -2240,9 +2293,12 @@ declare type WorkspacePanelMatch = {
|
|
|
2240
2293
|
} | {
|
|
2241
2294
|
param: string;
|
|
2242
2295
|
value: unknown;
|
|
2296
|
+
} | {
|
|
2297
|
+
params: Record<string, unknown>;
|
|
2243
2298
|
} | {
|
|
2244
2299
|
paramPrefix: string;
|
|
2245
2300
|
value: string;
|
|
2301
|
+
params?: Record<string, unknown>;
|
|
2246
2302
|
};
|
|
2247
2303
|
|
|
2248
2304
|
export declare interface WorkspacePluginClient {
|
|
@@ -2285,17 +2341,21 @@ declare interface WorkspacePluginClientProviderProps {
|
|
|
2285
2341
|
*/
|
|
2286
2342
|
export declare interface WorkspacePluginEventMap {
|
|
2287
2343
|
"filesystem:file.changed": EventMeta & {
|
|
2344
|
+
filesystem?: FilesystemId;
|
|
2288
2345
|
path: string;
|
|
2289
2346
|
};
|
|
2290
2347
|
"filesystem:file.created": EventMeta & {
|
|
2348
|
+
filesystem?: FilesystemId;
|
|
2291
2349
|
path: string;
|
|
2292
2350
|
kind: "file" | "dir";
|
|
2293
2351
|
};
|
|
2294
2352
|
"filesystem:file.moved": EventMeta & {
|
|
2353
|
+
filesystem?: FilesystemId;
|
|
2295
2354
|
from: string;
|
|
2296
2355
|
to: string;
|
|
2297
2356
|
};
|
|
2298
2357
|
"filesystem:file.deleted": EventMeta & {
|
|
2358
|
+
filesystem?: FilesystemId;
|
|
2299
2359
|
path: string;
|
|
2300
2360
|
};
|
|
2301
2361
|
}
|
package/dist/workspace.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
var X = Object.defineProperty;
|
|
2
2
|
var Q = (e, t, a) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
3
|
var T = (e, t, a) => Q(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
-
import { u as D, p as Y, a as Z, b as ee, D as te } from "./WorkspaceProvider-
|
|
5
|
-
import { A as qe, C as Je, c as Ve, d as Ge, e as Xe, f as Qe, F as Ye, g as Ze, M as et, h as tt, P as at, i as rt, j as nt, k as st, l as ot, R as it, S as lt, m as ct, n as dt, T as ut, U as pt, W as mt, o as ft, q as ht, r as gt, s as
|
|
4
|
+
import { u as D, p as Y, a as Z, b as ee, D as te } from "./WorkspaceProvider-U4izhS84.js";
|
|
5
|
+
import { A as qe, C as Je, c as Ve, d as Ge, e as Xe, f as Qe, F as Ye, g as Ze, M as et, h as tt, P as at, i as rt, j as nt, k as st, l as ot, R as it, S as lt, m as ct, n as dt, T as ut, U as pt, W as mt, o as ft, q as ht, r as gt, s as yt, t as bt, v as kt, w as St, x as vt, y as Pt, z as xt, B as wt, E as Ct, G as Et, H as Nt, I as Rt, J as Tt, K as Ot, L as It, N as Wt, O as Ft, Q as Lt, V as Mt, X as Bt, Y as Kt, Z as _t, _ as Dt, $ as At, a0 as $t, a1 as jt, a2 as zt, a3 as Ht, a4 as Ut, a5 as qt, a6 as Jt, a7 as Vt, a8 as Gt, a9 as Xt, aa as Qt, ab as Yt, ac as Zt, ad as ea, ae as ta, af as aa, ag as ra, ah as na, ai as sa, aj as oa, ak as ia, al as la, am as ca, an as da, ao as ua, ap as pa, aq as ma, ar as fa, as as ha, at as ga, au as ya, av as ba, aw as ka, ax as Sa, ay as va, az as Pa, aA as xa, aB as wa, aC as Ca, aD as Ea, aE as Na, aF as Ra, aG as Ta, aH as Oa, aI as Ia, aJ as Wa, aK as Fa, aL as La, aM as Ma } from "./WorkspaceProvider-U4izhS84.js";
|
|
6
6
|
import { c as C } from "./utils-B6yFEsav.js";
|
|
7
|
-
import { C as
|
|
7
|
+
import { C as Ka, T as _a, W as Da, b as Aa } from "./WorkspaceLoadingState-y087Q6ek.js";
|
|
8
8
|
import { jsx as r, jsxs as g, Fragment as ae } from "react/jsx-runtime";
|
|
9
9
|
import { Button as x, Sheet as re, SheetContent as ne, SheetHeader as se, SheetTitle as oe, SheetDescription as ie, EmptyState as le, Kbd as O, ErrorState as ce, IconButton as I } from "@hachej/boring-ui-kit";
|
|
10
|
-
import { Toaster as
|
|
11
|
-
import { useSyncExternalStore as A, useState as E, useEffect as v, useRef as w, useCallback as
|
|
12
|
-
import { FileTree as
|
|
13
|
-
import { MarkdownEditor as
|
|
14
|
-
import { MenuIcon as pe, PanelLeftIcon as
|
|
15
|
-
function
|
|
10
|
+
import { Toaster as ja, dismissToast as za, toast as Ha } from "@hachej/boring-ui-kit";
|
|
11
|
+
import { useSyncExternalStore as A, useState as E, useEffect as v, useRef as w, useCallback as y, useMemo as P, Suspense as de, Component as ue } from "react";
|
|
12
|
+
import { FileTree as qa } from "./FileTree-CUvn5K86.js";
|
|
13
|
+
import { MarkdownEditor as Va } from "./MarkdownEditor-5f4lhBqc.js";
|
|
14
|
+
import { MenuIcon as pe, PanelLeftIcon as M, PinIcon as me, CheckIcon as fe, CopyIcon as he } from "lucide-react";
|
|
15
|
+
function Me() {
|
|
16
16
|
const e = D();
|
|
17
17
|
return A(e.subscribe, e.getSnapshot);
|
|
18
18
|
}
|
|
19
19
|
function $(e) {
|
|
20
20
|
switch (e.kind) {
|
|
21
21
|
case "openFile":
|
|
22
|
-
return { kind: "openFile", params: { path: e.path, ...e.mode ? { mode: e.mode } : {} } };
|
|
22
|
+
return { kind: "openFile", params: { path: e.path, ...e.mode ? { mode: e.mode } : {}, ...e.filesystem ? { filesystem: e.filesystem } : {} } };
|
|
23
23
|
case "openSurface":
|
|
24
|
-
return { kind: "openSurface", params: { kind: e.surfaceKind, target: e.target, ...e.meta ? { meta: e.meta } : {} } };
|
|
24
|
+
return { kind: "openSurface", params: { kind: e.surfaceKind, target: e.target, ...e.filesystem ? { filesystem: e.filesystem } : {}, ...e.meta ? { meta: e.meta } : {} } };
|
|
25
25
|
case "openPanel":
|
|
26
26
|
return {
|
|
27
27
|
kind: "openPanel",
|
|
@@ -39,10 +39,10 @@ function $(e) {
|
|
|
39
39
|
function ge(e) {
|
|
40
40
|
return `boring-workspace-command:${encodeURIComponent(JSON.stringify($(e)))}`;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ye(e) {
|
|
43
43
|
return e.button === 0 && !e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Be({ to: e, children: t, className: a, title: n, href: o, onClick: i }) {
|
|
46
46
|
return /* @__PURE__ */ r(
|
|
47
47
|
"a",
|
|
48
48
|
{
|
|
@@ -50,13 +50,13 @@ function Me({ to: e, children: t, className: a, title: n, href: o, onClick: i })
|
|
|
50
50
|
className: a,
|
|
51
51
|
title: n,
|
|
52
52
|
onClick: (u) => {
|
|
53
|
-
i == null || i(u), !(u.defaultPrevented || !
|
|
53
|
+
i == null || i(u), !(u.defaultPrevented || !ye(u)) && (u.preventDefault(), Y($(e)));
|
|
54
54
|
},
|
|
55
55
|
children: t
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function be(e, t) {
|
|
60
60
|
return e ? `${e.replace(/\/$/, "")}${t}` : t;
|
|
61
61
|
}
|
|
62
62
|
function ke() {
|
|
@@ -74,7 +74,7 @@ async function Ke(e) {
|
|
|
74
74
|
e.recordSet && t.set("recordSet", e.recordSet), e.offset !== void 0 && t.set("offset", String(e.offset)), e.limit !== void 0 && t.set("limit", String(e.limit)), e.q && t.set("q", e.q);
|
|
75
75
|
const a = { ...e.headers ?? {} }, n = e.workspaceId ?? ke();
|
|
76
76
|
n && !Object.keys(a).some((i) => i.toLowerCase() === "x-boring-workspace-id") && (a["x-boring-workspace-id"] = n);
|
|
77
|
-
const o = await fetch(
|
|
77
|
+
const o = await fetch(be(e.apiBaseUrl, `/api/v1/files/records?${t}`), {
|
|
78
78
|
method: "GET",
|
|
79
79
|
headers: a,
|
|
80
80
|
signal: e.signal
|
|
@@ -83,14 +83,14 @@ async function Ke(e) {
|
|
|
83
83
|
throw new Error(`readFileRecords failed: HTTP ${o.status}`);
|
|
84
84
|
return await o.json();
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function B(e) {
|
|
87
87
|
return typeof window > "u" ? !1 : window.innerWidth < e;
|
|
88
88
|
}
|
|
89
89
|
function K(e = 1024) {
|
|
90
|
-
const [t, a] = E(() =>
|
|
90
|
+
const [t, a] = E(() => B(e));
|
|
91
91
|
return v(() => {
|
|
92
92
|
const n = () => {
|
|
93
|
-
a(
|
|
93
|
+
a(B(e));
|
|
94
94
|
};
|
|
95
95
|
return n(), window.addEventListener("resize", n), () => {
|
|
96
96
|
window.removeEventListener("resize", n);
|
|
@@ -112,7 +112,7 @@ function Se({
|
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
l && o.current && (o.current = !1, a(!1));
|
|
115
|
-
}, [e, a]),
|
|
115
|
+
}, [e, a]), y(() => {
|
|
116
116
|
o.current = !1;
|
|
117
117
|
}, []);
|
|
118
118
|
}
|
|
@@ -127,9 +127,9 @@ function _e(e) {
|
|
|
127
127
|
try {
|
|
128
128
|
const p = e.toJSON(), f = [];
|
|
129
129
|
if (p && typeof p == "object" && "panels" in p) {
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
for (const [, m] of Object.entries(
|
|
130
|
+
const b = p;
|
|
131
|
+
if (b.panels)
|
|
132
|
+
for (const [, m] of Object.entries(b.panels))
|
|
133
133
|
m.id && f.push({
|
|
134
134
|
id: m.id,
|
|
135
135
|
component: m.contentComponent ?? m.id,
|
|
@@ -137,9 +137,9 @@ function _e(e) {
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
const s = n.current;
|
|
140
|
-
(s.length !== f.length || s.some((
|
|
140
|
+
(s.length !== f.length || s.some((b, m) => {
|
|
141
141
|
var k;
|
|
142
|
-
return
|
|
142
|
+
return b.id !== ((k = f[m]) == null ? void 0 : k.id);
|
|
143
143
|
})) && a(f);
|
|
144
144
|
} catch {
|
|
145
145
|
}
|
|
@@ -148,7 +148,7 @@ function _e(e) {
|
|
|
148
148
|
const c = setInterval(l, 500);
|
|
149
149
|
return () => clearInterval(c);
|
|
150
150
|
}, [e]);
|
|
151
|
-
const o =
|
|
151
|
+
const o = y(
|
|
152
152
|
(l) => {
|
|
153
153
|
e == null || e.addPanel("artifacts", {
|
|
154
154
|
id: l.id,
|
|
@@ -157,28 +157,28 @@ function _e(e) {
|
|
|
157
157
|
});
|
|
158
158
|
},
|
|
159
159
|
[e]
|
|
160
|
-
), i =
|
|
160
|
+
), i = y(
|
|
161
161
|
(l) => {
|
|
162
162
|
e == null || e.removePanel(l);
|
|
163
163
|
},
|
|
164
164
|
[e]
|
|
165
|
-
), u =
|
|
165
|
+
), u = y(
|
|
166
166
|
(l) => {
|
|
167
167
|
e == null || e.activatePanel(l);
|
|
168
168
|
},
|
|
169
169
|
[e]
|
|
170
|
-
), d =
|
|
170
|
+
), d = y(
|
|
171
171
|
(l) => n.current.some((c) => c.id === l),
|
|
172
172
|
[]
|
|
173
173
|
);
|
|
174
174
|
return { panels: t, open: o, close: i, activate: u, isOpen: d };
|
|
175
175
|
}
|
|
176
176
|
function De(e, t = {}) {
|
|
177
|
-
const a = t.toolPanelMap ?? {}, n =
|
|
177
|
+
const a = t.toolPanelMap ?? {}, n = y(
|
|
178
178
|
(i) => a[i],
|
|
179
179
|
[a]
|
|
180
180
|
);
|
|
181
|
-
return { openForTool:
|
|
181
|
+
return { openForTool: y(
|
|
182
182
|
(i, u) => {
|
|
183
183
|
const d = a[i];
|
|
184
184
|
if (!d) return;
|
|
@@ -211,7 +211,7 @@ function we({
|
|
|
211
211
|
v(() => {
|
|
212
212
|
(!p || !i && !d) && h(!1);
|
|
213
213
|
}, [p, i, d]);
|
|
214
|
-
const
|
|
214
|
+
const b = p && (i || d && n.collapsed), m = p && !i && (!d || !n.collapsed), k = P(
|
|
215
215
|
() => m ? e : xe(e),
|
|
216
216
|
[m, e]
|
|
217
217
|
), j = P(() => {
|
|
@@ -229,13 +229,13 @@ function we({
|
|
|
229
229
|
a.subscribe,
|
|
230
230
|
a.getSnapshot,
|
|
231
231
|
a.getSnapshot
|
|
232
|
-
), H = P(() => a.getComponents(), [a, z]), W = c ? H[c] : null, U = c ? ((F = a.get(c)) == null ? void 0 : F.title) ?? "Sidebar" : "Sidebar", q =
|
|
232
|
+
), H = P(() => a.getComponents(), [a, z]), W = c ? H[c] : null, U = c ? ((F = a.get(c)) == null ? void 0 : F.title) ?? "Sidebar" : "Sidebar", q = y(() => {
|
|
233
233
|
h(!0);
|
|
234
|
-
}, []), J =
|
|
234
|
+
}, []), J = y(() => {
|
|
235
235
|
f(), o({ collapsed: !1 }), h(!1);
|
|
236
|
-
}, [f, o]), V =
|
|
236
|
+
}, [f, o]), V = y(() => {
|
|
237
237
|
f(), o({ collapsed: !0 }), h(!1);
|
|
238
|
-
}, [f, o]), G =
|
|
238
|
+
}, [f, o]), G = y(
|
|
239
239
|
(S) => {
|
|
240
240
|
S.target.closest("[role='treeitem']") && h(!1);
|
|
241
241
|
},
|
|
@@ -249,7 +249,7 @@ function we({
|
|
|
249
249
|
"aria-hidden": "true"
|
|
250
250
|
}
|
|
251
251
|
),
|
|
252
|
-
|
|
252
|
+
b && /* @__PURE__ */ r(
|
|
253
253
|
"div",
|
|
254
254
|
{
|
|
255
255
|
className: C(
|
|
@@ -264,7 +264,7 @@ function we({
|
|
|
264
264
|
size: "icon-sm",
|
|
265
265
|
onClick: q,
|
|
266
266
|
"aria-label": i ? "Open sidebar menu" : "Open collapsed sidebar",
|
|
267
|
-
children: i ? /* @__PURE__ */ r(pe, { className: "h-4 w-4" }) : /* @__PURE__ */ r(
|
|
267
|
+
children: i ? /* @__PURE__ */ r(pe, { className: "h-4 w-4" }) : /* @__PURE__ */ r(M, { className: "h-4 w-4" })
|
|
268
268
|
}
|
|
269
269
|
)
|
|
270
270
|
}
|
|
@@ -277,7 +277,7 @@ function we({
|
|
|
277
277
|
size: "icon-sm",
|
|
278
278
|
onClick: V,
|
|
279
279
|
"aria-label": "Collapse sidebar",
|
|
280
|
-
children: /* @__PURE__ */ r(
|
|
280
|
+
children: /* @__PURE__ */ r(M, { className: "h-4 w-4" })
|
|
281
281
|
}
|
|
282
282
|
) }),
|
|
283
283
|
/* @__PURE__ */ r(
|
|
@@ -291,7 +291,7 @@ function we({
|
|
|
291
291
|
},
|
|
292
292
|
j
|
|
293
293
|
),
|
|
294
|
-
|
|
294
|
+
b && /* @__PURE__ */ r(re, { open: s, onOpenChange: h, children: /* @__PURE__ */ g(
|
|
295
295
|
ne,
|
|
296
296
|
{
|
|
297
297
|
side: "left",
|
|
@@ -443,23 +443,23 @@ function ze({
|
|
|
443
443
|
}
|
|
444
444
|
d((s) => s && c.includes(s) ? s : t && c.includes(t) ? t : c[0] ?? null);
|
|
445
445
|
}, [c, t]);
|
|
446
|
-
const p =
|
|
446
|
+
const p = y((s) => {
|
|
447
447
|
var h;
|
|
448
448
|
d(s), (h = l.current[s]) == null || h.focus();
|
|
449
|
-
}, []), f =
|
|
449
|
+
}, []), f = y(
|
|
450
450
|
(s, h) => {
|
|
451
451
|
if (s.target !== s.currentTarget) return;
|
|
452
452
|
if (s.key === "Enter" || s.key === " ") {
|
|
453
453
|
s.preventDefault(), a == null || a(h);
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
const
|
|
457
|
-
if (
|
|
458
|
-
let m =
|
|
456
|
+
const b = c.indexOf(h);
|
|
457
|
+
if (b < 0) return;
|
|
458
|
+
let m = b;
|
|
459
459
|
if (s.key === "ArrowDown")
|
|
460
|
-
m = Math.min(
|
|
460
|
+
m = Math.min(b + 1, c.length - 1);
|
|
461
461
|
else if (s.key === "ArrowUp")
|
|
462
|
-
m = Math.max(
|
|
462
|
+
m = Math.max(b - 1, 0);
|
|
463
463
|
else if (s.key === "Home")
|
|
464
464
|
m = 0;
|
|
465
465
|
else if (s.key === "End")
|
|
@@ -547,7 +547,7 @@ function Ne({
|
|
|
547
547
|
onKeyDown: u,
|
|
548
548
|
rowRef: d
|
|
549
549
|
}) {
|
|
550
|
-
const [l, c] = E(!1), p =
|
|
550
|
+
const [l, c] = E(!1), p = y((f) => {
|
|
551
551
|
f.stopPropagation(), Ee(e.id).then((s) => {
|
|
552
552
|
s && (c(!0), window.setTimeout(() => c(!1), 1200));
|
|
553
553
|
});
|
|
@@ -627,19 +627,19 @@ function Ne({
|
|
|
627
627
|
export {
|
|
628
628
|
qe as ArtifactSurfacePane,
|
|
629
629
|
Je as CatalogRegistry,
|
|
630
|
-
|
|
630
|
+
Ka as ChatLayout,
|
|
631
631
|
Ve as CodeEditor,
|
|
632
632
|
Ge as CodeEditorPane,
|
|
633
633
|
Xe as CommandPalette,
|
|
634
634
|
Qe as CommandRegistry,
|
|
635
635
|
te as DockviewShell,
|
|
636
636
|
$e as EmptyPane,
|
|
637
|
-
|
|
637
|
+
qa as FileTree,
|
|
638
638
|
Ye as FileTreePane,
|
|
639
639
|
Ze as FileTreeView,
|
|
640
640
|
Ae as IdeLayout,
|
|
641
641
|
et as MAX_PANELS,
|
|
642
|
-
|
|
642
|
+
Va as MarkdownEditor,
|
|
643
643
|
tt as MarkdownEditorPane,
|
|
644
644
|
at as PanelChrome,
|
|
645
645
|
je as PanelErrorBoundary,
|
|
@@ -654,25 +654,25 @@ export {
|
|
|
654
654
|
ct as SurfaceResolverRegistry,
|
|
655
655
|
dt as SurfaceShell,
|
|
656
656
|
ut as ThemeProvider,
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
ja as Toaster,
|
|
658
|
+
_a as TopBar,
|
|
659
659
|
pt as UI_COMMAND_EVENT,
|
|
660
660
|
mt as WORKSPACE_ATTENTION_ACTION_EVENT,
|
|
661
661
|
ft as WORKSPACE_COMPOSER_STOP_EVENT,
|
|
662
662
|
ht as WORKSPACE_COMPOSER_STOP_REASONS,
|
|
663
663
|
gt as WORKSPACE_OPEN_PATH_SURFACE_KIND,
|
|
664
|
-
|
|
665
|
-
|
|
664
|
+
yt as WORKSPACE_SURFACE_OPEN_SKIPPED_EVENT,
|
|
665
|
+
bt as WorkbenchLeftPane,
|
|
666
666
|
kt as WorkspaceFilesProvider,
|
|
667
|
-
|
|
668
|
-
|
|
667
|
+
Be as WorkspaceLink,
|
|
668
|
+
Da as WorkspaceLoadingState,
|
|
669
669
|
St as WorkspacePluginClientProvider,
|
|
670
670
|
vt as WorkspaceProvider,
|
|
671
671
|
Pt as WorkspaceSourceRegistry,
|
|
672
672
|
xt as agentMeta,
|
|
673
673
|
wt as bindStore,
|
|
674
674
|
Ct as bootstrap,
|
|
675
|
-
|
|
675
|
+
Aa as buildChatLayout,
|
|
676
676
|
Et as buildFullPagePanelHref,
|
|
677
677
|
Ce as buildIdeLayout,
|
|
678
678
|
Nt as closePanelSchema,
|
|
@@ -683,10 +683,10 @@ export {
|
|
|
683
683
|
It as createWorkspacePluginClient,
|
|
684
684
|
Wt as createWorkspaceStore,
|
|
685
685
|
Ft as definePanel,
|
|
686
|
-
|
|
686
|
+
za as dismissToast,
|
|
687
687
|
Lt as emitAgentData,
|
|
688
|
-
|
|
689
|
-
|
|
688
|
+
Mt as emitFilesystemAgentFileChange,
|
|
689
|
+
Bt as emitWorkspaceAttentionAction,
|
|
690
690
|
Kt as emitWorkspaceComposerStop,
|
|
691
691
|
_t as events,
|
|
692
692
|
Dt as expandToFileSchema,
|
|
@@ -703,10 +703,10 @@ export {
|
|
|
703
703
|
Xt as openPanelSchema,
|
|
704
704
|
Y as postUiCommand,
|
|
705
705
|
Ke as readFileRecords,
|
|
706
|
-
|
|
706
|
+
Ha as toast,
|
|
707
707
|
Qt as useActiveFile,
|
|
708
708
|
Yt as useActivePanel,
|
|
709
|
-
|
|
709
|
+
Me as useActivePanels,
|
|
710
710
|
Zt as useApiBaseUrl,
|
|
711
711
|
_e as useArtifactPanels,
|
|
712
712
|
De as useArtifactRouting,
|
|
@@ -727,9 +727,9 @@ export {
|
|
|
727
727
|
fa as useKeyboardShortcuts,
|
|
728
728
|
ha as useOpenPanels,
|
|
729
729
|
ga as usePanelRenderMode,
|
|
730
|
-
|
|
730
|
+
ya as usePluginErrors,
|
|
731
731
|
D as useRegistry,
|
|
732
|
-
|
|
732
|
+
ba as useResetLayout,
|
|
733
733
|
Se as useResponsiveSidebarCollapse,
|
|
734
734
|
ee as useSetSidebar,
|
|
735
735
|
Z as useSidebarState,
|
|
@@ -742,14 +742,15 @@ export {
|
|
|
742
742
|
wa as useWorkspaceChatPanel,
|
|
743
743
|
Ca as useWorkspaceContext,
|
|
744
744
|
Ea as useWorkspaceContextOptional,
|
|
745
|
-
Na as
|
|
746
|
-
Ra as
|
|
747
|
-
Ta as
|
|
748
|
-
Oa as
|
|
749
|
-
Ia as
|
|
750
|
-
Wa as
|
|
751
|
-
Fa as
|
|
752
|
-
La as
|
|
745
|
+
Na as useWorkspaceLeftPaneActions,
|
|
746
|
+
Ra as useWorkspacePluginClient,
|
|
747
|
+
Ta as useWorkspaceRequestId,
|
|
748
|
+
Oa as useWorkspaceSourceRegistry,
|
|
749
|
+
Ia as userMeta,
|
|
750
|
+
Wa as workspaceAttentionSessionBadgeForBlocker,
|
|
751
|
+
Fa as workspaceComposerStopAppliesToSession,
|
|
752
|
+
La as workspaceComposerStopTargetSessionId,
|
|
753
|
+
Ma as workspaceEvents,
|
|
753
754
|
$ as workspaceLinkCommand,
|
|
754
755
|
ge as workspaceLinkHref
|
|
755
756
|
};
|