@hachej/boring-workspace 0.1.34 → 0.1.35
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-DWbh0xNI.js → FileTree-CkCxHBDu.js} +1 -1
- package/dist/MarkdownEditor-CtPphEVP.js +549 -0
- package/dist/{WorkspaceLoadingState-RVGURLJy.js → WorkspaceLoadingState-Bl-92Dly.js} +287 -252
- package/dist/WorkspaceProvider-BhRPFy5R.js +7508 -0
- package/dist/app-front.d.ts +50 -3
- package/dist/app-front.js +893 -756
- package/dist/app-server.js +6 -0
- package/dist/boring-workspace.css +1 -1
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.js +8 -1
- package/dist/server.js +6 -0
- package/dist/testing.js +1 -1
- package/dist/workspace.css +328 -30
- package/dist/workspace.d.ts +68 -2
- package/dist/workspace.js +31 -30
- package/package.json +5 -5
- package/dist/MarkdownEditor-BhLjIyPQ.js +0 -540
- package/dist/WorkspaceProvider-hCE2wXKZ.js +0 -6567
package/dist/app-front.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ declare interface BoringFrontAPI {
|
|
|
13
13
|
registerPanelCommand(registration: BoringFrontPanelCommandRegistration): void;
|
|
14
14
|
registerLeftTab<T = LeftTabParams>(registration: BoringFrontLeftTabRegistration<T>): void;
|
|
15
15
|
registerSurfaceResolver(registration: BoringFrontSurfaceResolverRegistration): void;
|
|
16
|
+
registerToolRenderer(registration: BoringFrontToolRendererRegistration): void;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
declare interface BoringFrontBindingRegistration {
|
|
@@ -86,6 +87,13 @@ declare interface BoringFrontSurfaceResolverRegistration {
|
|
|
86
87
|
resolve: (request: SurfaceOpenRequest) => SurfacePanelResolution | null | undefined;
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
declare type BoringFrontToolRenderer = (part: unknown) => ReactNode;
|
|
91
|
+
|
|
92
|
+
declare interface BoringFrontToolRendererRegistration {
|
|
93
|
+
id: string;
|
|
94
|
+
render: BoringFrontToolRenderer;
|
|
95
|
+
}
|
|
96
|
+
|
|
89
97
|
declare type CatalogAdapter = {
|
|
90
98
|
search(args: CatalogSearchArgs): Promise<CatalogSearchResult>;
|
|
91
99
|
fetchFacets?(args: CatalogFacetsArgs): Promise<CatalogFacets>;
|
|
@@ -150,6 +158,20 @@ declare interface ChatLayoutProps {
|
|
|
150
158
|
navParams?: Record<string, unknown>;
|
|
151
159
|
center?: string;
|
|
152
160
|
centerParams?: Record<string, unknown>;
|
|
161
|
+
chatPanes?: ChatPaneDescriptor[];
|
|
162
|
+
activeChatPaneId?: string | null;
|
|
163
|
+
onActiveChatPaneChange?: (id: string) => void;
|
|
164
|
+
onCloseChatPane?: (id: string) => void;
|
|
165
|
+
onCreateChatPaneAfter?: (id: string) => void;
|
|
166
|
+
onDropChatSession?: (sessionId: string) => void;
|
|
167
|
+
flashChatPaneId?: string | null;
|
|
168
|
+
/**
|
|
169
|
+
* Chat stage layout engine. `dock` enables the dockview-backed stage
|
|
170
|
+
* (drag headers to split in any direction); defaults to the flex row.
|
|
171
|
+
* The `boring-workspace:chat-pane-engine` localStorage key overrides
|
|
172
|
+
* when no explicit value is passed.
|
|
173
|
+
*/
|
|
174
|
+
chatPaneEngine?: ChatPaneEngine | null;
|
|
153
175
|
surface?: string | null;
|
|
154
176
|
surfaceParams?: Record<string, unknown>;
|
|
155
177
|
surfaceOverlay?: ReactNode;
|
|
@@ -163,6 +185,25 @@ declare interface ChatLayoutProps {
|
|
|
163
185
|
className?: string;
|
|
164
186
|
}
|
|
165
187
|
|
|
188
|
+
declare interface ChatPaneDescriptor {
|
|
189
|
+
id: string;
|
|
190
|
+
title?: string | null;
|
|
191
|
+
panel?: string;
|
|
192
|
+
params?: Record<string, unknown>;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Layout engine for the chat pane stage.
|
|
197
|
+
*
|
|
198
|
+
* - `flex` (default): panes lay out as a single row of vertical splits.
|
|
199
|
+
* - `dock`: dockview-backed stage — drag pane headers to split in any
|
|
200
|
+
* direction and resize; geometry persists per workspace.
|
|
201
|
+
*
|
|
202
|
+
* Resolution order: explicit prop, then the
|
|
203
|
+
* `boring-workspace:chat-pane-engine` localStorage override, then `flex`.
|
|
204
|
+
*/
|
|
205
|
+
declare type ChatPaneEngine = "flex" | "dock";
|
|
206
|
+
|
|
166
207
|
declare interface CommandConfig {
|
|
167
208
|
id: string;
|
|
168
209
|
title: string;
|
|
@@ -388,13 +429,15 @@ export declare function useLocalStorageSessions(store: WorkspaceLocalSessionsSto
|
|
|
388
429
|
export declare type UseWorkspaceAgentSessions<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> = (options: {
|
|
389
430
|
requestHeaders: Record<string, string>;
|
|
390
431
|
storageKey: string;
|
|
432
|
+
workspaceId?: string;
|
|
433
|
+
apiBaseUrl?: string;
|
|
391
434
|
enabled?: boolean;
|
|
392
435
|
refreshKey?: unknown;
|
|
393
436
|
}) => WorkspaceAgentSessionsApi<TSession>;
|
|
394
437
|
|
|
395
|
-
export declare function WorkspaceAgentFront<TSession extends WorkspaceAgentSession = WorkspaceAgentSession>({ workspaceId, chatPanel: chatPanelProp, useSessions: useSessionsProp, requestHeaders, sessionStorageKey, providerStorageKey, surfaceStorageKey, beforeShell, afterShell, panels, commands, catalogs, plugins, excludeDefaults, capabilities, apiBaseUrl, authHeaders, apiTimeout, defaultTheme, onThemeChange, persistenceEnabled, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, defaultSessionTitle, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, chatParams, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
438
|
+
export declare function WorkspaceAgentFront<TSession extends WorkspaceAgentSession = WorkspaceAgentSession>({ workspaceId, chatPanel: chatPanelProp, useSessions: useSessionsProp, requestHeaders, sessionStorageKey, providerStorageKey, surfaceStorageKey, beforeShell, afterShell, panels, commands, catalogs, plugins, excludeDefaults, capabilities, apiBaseUrl, authHeaders, apiTimeout, defaultTheme, onThemeChange, persistenceEnabled, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, workspaceLabel, defaultSessionTitle, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, chatParams, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, chatPaneEngine, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
396
439
|
|
|
397
|
-
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
440
|
+
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "chatPanes" | "activeChatPaneId" | "onActiveChatPaneChange" | "onCloseChatPane" | "onCreateChatPaneAfter" | "onDropChatSession" | "flashChatPaneId" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
398
441
|
workspaceId: string;
|
|
399
442
|
chatPanel?: ComponentType<WorkspaceChatPanelProps>;
|
|
400
443
|
useSessions?: UseWorkspaceAgentSessions<TSession>;
|
|
@@ -405,6 +448,7 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
405
448
|
beforeShell?: ReactNode;
|
|
406
449
|
afterShell?: ReactNode;
|
|
407
450
|
appTitle?: string;
|
|
451
|
+
workspaceLabel?: string;
|
|
408
452
|
defaultSessionTitle?: string;
|
|
409
453
|
navEnabled?: boolean;
|
|
410
454
|
defaultNavOpen?: boolean;
|
|
@@ -428,7 +472,7 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
428
472
|
}>;
|
|
429
473
|
activeSessionId?: string | null;
|
|
430
474
|
onSwitchSession?: (id: string) => void;
|
|
431
|
-
onCreateSession?: () =>
|
|
475
|
+
onCreateSession?: () => unknown | Promise<unknown>;
|
|
432
476
|
onDeleteSession?: (id: string) => void;
|
|
433
477
|
onActiveSessionIdChange?: (sessionId: string | null) => void;
|
|
434
478
|
chatParams?: Record<string, unknown>;
|
|
@@ -461,6 +505,7 @@ export declare interface WorkspaceAgentSessionsApi<TSession extends WorkspaceAge
|
|
|
461
505
|
error?: Error | null;
|
|
462
506
|
activeSessionId?: string | null;
|
|
463
507
|
activeSession?: TSession | null;
|
|
508
|
+
workspaceId?: string | null;
|
|
464
509
|
switch: (id: string) => void;
|
|
465
510
|
create: (input?: {
|
|
466
511
|
title?: string;
|
|
@@ -579,8 +624,10 @@ declare interface WorkspaceProviderProps {
|
|
|
579
624
|
defaultTheme?: "light" | "dark" | undefined;
|
|
580
625
|
onThemeChange?: (theme: "light" | "dark") => void;
|
|
581
626
|
workspaceId?: string;
|
|
627
|
+
workspaceLabel?: string;
|
|
582
628
|
storageKey?: string;
|
|
583
629
|
persistenceEnabled?: boolean;
|
|
630
|
+
manageDocumentTitle?: boolean;
|
|
584
631
|
bridgeEndpoint?: string | null;
|
|
585
632
|
onAuthError?: (statusCode: number) => void;
|
|
586
633
|
onOpenFile?: (path: string) => void;
|