@hachej/boring-workspace 0.1.62 → 0.1.64
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-DjhAzlg3.js} +1 -1
- package/dist/MarkdownEditor-CeN7n6mw.js +610 -0
- package/dist/{WorkspaceLoadingState-Dfnk7JjR.js → WorkspaceLoadingState-D4SB2awA.js} +39 -38
- package/dist/WorkspaceProvider-CEZUOy1M.js +8725 -0
- package/dist/app-front.d.ts +38 -7
- package/dist/app-front.js +1202 -1161
- 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 +25 -0
- package/dist/workspace.d.ts +109 -23
- package/dist/workspace.js +74 -73
- package/docs/README.md +29 -0
- package/package.json +4 -4
- package/dist/MarkdownEditor-BykEKKxv.js +0 -598
- package/dist/WorkspaceProvider-kf-pjz6V.js +0 -8530
package/dist/app-front.d.ts
CHANGED
|
@@ -167,6 +167,8 @@ declare interface ChatLayoutProps {
|
|
|
167
167
|
center?: string;
|
|
168
168
|
centerParams?: Record<string, unknown>;
|
|
169
169
|
chatPanes?: ChatPaneDescriptor[];
|
|
170
|
+
/** Optional host actions rendered in the active chat pane header. */
|
|
171
|
+
chatTopActions?: ReactNode;
|
|
170
172
|
activeChatPaneId?: string | null;
|
|
171
173
|
onActiveChatPaneChange?: (id: string) => void;
|
|
172
174
|
onCloseChatPane?: (id: string) => void;
|
|
@@ -230,6 +232,8 @@ export declare interface CreateLocalStorageSessionsOptions {
|
|
|
230
232
|
initial?: () => WorkspaceLocalSessionsState;
|
|
231
233
|
}
|
|
232
234
|
|
|
235
|
+
declare type FilesystemId = "user" | "company_context" | (string & {});
|
|
236
|
+
|
|
233
237
|
declare type FrontPluginHotReloadMode = "vite" | false;
|
|
234
238
|
|
|
235
239
|
export declare const FULL_PAGE_PANEL_INVALID_PARAMS_JSON = "FULL_PAGE_PANEL_INVALID_PARAMS_JSON";
|
|
@@ -244,6 +248,10 @@ export declare const FULL_PAGE_PANEL_RENDER_FAILED = "FULL_PAGE_PANEL_RENDER_FAI
|
|
|
244
248
|
|
|
245
249
|
export declare const FULL_PAGE_PANEL_UNKNOWN_COMPONENT = "FULL_PAGE_PANEL_UNKNOWN_COMPONENT";
|
|
246
250
|
|
|
251
|
+
declare type OpenArtifactHandler = (path: string, options?: {
|
|
252
|
+
filesystem?: FilesystemId;
|
|
253
|
+
}) => void;
|
|
254
|
+
|
|
247
255
|
declare interface OpenPanelConfig {
|
|
248
256
|
/** Panel instance id. If a panel with this id is already open, it's re-activated instead of duplicated. */
|
|
249
257
|
id: string;
|
|
@@ -347,6 +355,7 @@ declare interface SessionItem {
|
|
|
347
355
|
declare interface SurfaceOpenRequest {
|
|
348
356
|
kind: string;
|
|
349
357
|
target: string;
|
|
358
|
+
filesystem?: FilesystemId;
|
|
350
359
|
meta?: Record<string, unknown>;
|
|
351
360
|
}
|
|
352
361
|
|
|
@@ -365,10 +374,8 @@ declare interface SurfaceResolverExample {
|
|
|
365
374
|
}
|
|
366
375
|
|
|
367
376
|
declare interface SurfaceShellApi {
|
|
368
|
-
/** Open a file in the workbench. Idempotent — re-activates an existing pane for the same path. */
|
|
369
|
-
openFile: (path: string,
|
|
370
|
-
mode?: "view" | "edit" | "diff";
|
|
371
|
-
}) => void;
|
|
377
|
+
/** Open a file in the workbench. Idempotent — re-activates an existing pane for the same filesystem/path. */
|
|
378
|
+
openFile: (path: string, options?: SurfaceShellOpenFileOptions) => void;
|
|
372
379
|
/** Open a plugin-defined surface target through the registered surface resolvers. */
|
|
373
380
|
openSurface: (request: SurfaceOpenRequest) => void;
|
|
374
381
|
/**
|
|
@@ -386,6 +393,11 @@ declare interface SurfaceShellApi {
|
|
|
386
393
|
getSnapshot: () => SurfaceShellSnapshot;
|
|
387
394
|
}
|
|
388
395
|
|
|
396
|
+
declare interface SurfaceShellOpenFileOptions {
|
|
397
|
+
filesystem?: FilesystemId;
|
|
398
|
+
mode?: "view" | "edit" | "diff";
|
|
399
|
+
}
|
|
400
|
+
|
|
389
401
|
declare interface SurfaceShellProps {
|
|
390
402
|
rootDir?: string;
|
|
391
403
|
sidebarDefaultWidth?: number;
|
|
@@ -460,6 +472,22 @@ declare type WorkspaceAgentAppLeftHeaderMode = "full" | "workspace" | "hidden";
|
|
|
460
472
|
|
|
461
473
|
declare type WorkspaceAgentAppLeftLayoutMode = "single-project" | "multi-project";
|
|
462
474
|
|
|
475
|
+
declare interface WorkspaceAgentAppLeftOverlayAction {
|
|
476
|
+
id: string;
|
|
477
|
+
label: string;
|
|
478
|
+
icon: ReactNode;
|
|
479
|
+
trailing?: ReactNode;
|
|
480
|
+
emphasis?: boolean;
|
|
481
|
+
render: (props: WorkspaceAgentAppLeftOverlayRenderProps) => ReactNode;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
declare interface WorkspaceAgentAppLeftOverlayRenderProps {
|
|
485
|
+
onClose: () => void;
|
|
486
|
+
headerInsetStart: boolean;
|
|
487
|
+
headerInsetEnd: boolean;
|
|
488
|
+
workspaceId: string;
|
|
489
|
+
}
|
|
490
|
+
|
|
463
491
|
declare interface WorkspaceAgentAppLeftProject {
|
|
464
492
|
id: string;
|
|
465
493
|
name: string;
|
|
@@ -477,9 +505,9 @@ declare interface WorkspaceAgentAppLeftProjectSession {
|
|
|
477
505
|
updatedAt?: string | number;
|
|
478
506
|
}
|
|
479
507
|
|
|
480
|
-
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, debug, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, workspaceLabel, workspaceSectionTitle, appLeftLayoutMode, appLeftHeaderMode, appLeftProjects, appLeftActiveProjectId, onSwitchAppLeftProject, onOpenAppLeftProjectSession, onShowMoreAppLeftProjectSessions, onCreateAppLeftProject, onOpenAppLeftProjectSettings, onOpenAppLeftProjectInNewTab, defaultSessionTitle, workspaceLayout, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, defaultWorkbenchLeftOpen, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, showSkills, showPlugins, appLeftActions, chatParams, externalPlugins, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
508
|
+
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, debug, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, workspaceLabel, workspaceSectionTitle, appLeftLayoutMode, appLeftHeaderMode, appLeftProjects, appLeftActiveProjectId, onSwitchAppLeftProject, onOpenAppLeftProjectSession, onShowMoreAppLeftProjectSessions, onCreateAppLeftProject, onOpenAppLeftProjectSettings, onOpenAppLeftProjectInNewTab, defaultSessionTitle, workspaceLayout, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, defaultWorkbenchLeftOpen, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, showSkills, showPlugins, appLeftActions, appLeftOverlayActions, chatParams, externalPlugins, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
481
509
|
|
|
482
|
-
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel" | "commandPaletteSessionSearch">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "chatPanes" | "activeChatPaneId" | "onActiveChatPaneChange" | "onCloseChatPane" | "onCreateChatPaneAfter" | "onDropChatSession" | "flashChatPaneId" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
510
|
+
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel" | "commandPaletteSessionSearch">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "chatPanes" | "chatTopActions" | "activeChatPaneId" | "onActiveChatPaneChange" | "onCloseChatPane" | "onCreateChatPaneAfter" | "onDropChatSession" | "flashChatPaneId" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
483
511
|
workspaceId: string;
|
|
484
512
|
chatPanel?: ComponentType<WorkspaceChatPanelProps>;
|
|
485
513
|
useSessions?: UseWorkspaceAgentSessions<TSession>;
|
|
@@ -535,6 +563,8 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
535
563
|
showPlugins?: boolean;
|
|
536
564
|
/** Extra actions inserted into the app-left primary action list before built-in management actions. */
|
|
537
565
|
appLeftActions?: readonly WorkspaceAgentAppLeftAction[];
|
|
566
|
+
/** Extra chat-hosted management overlays opened from the app-left primary action list. */
|
|
567
|
+
appLeftOverlayActions?: readonly WorkspaceAgentAppLeftOverlayAction[];
|
|
538
568
|
sessions?: Array<{
|
|
539
569
|
id: string;
|
|
540
570
|
title?: string | null;
|
|
@@ -651,8 +681,9 @@ export declare interface WorkspaceBootGateProps {
|
|
|
651
681
|
|
|
652
682
|
declare type WorkspaceChatPanelComponent = ComponentType<any>;
|
|
653
683
|
|
|
654
|
-
declare interface WorkspaceChatPanelProps extends PiChatPanelProps<WorkspaceAttentionBlocker> {
|
|
684
|
+
declare interface WorkspaceChatPanelProps extends Omit<PiChatPanelProps<WorkspaceAttentionBlocker>, "onOpenArtifact"> {
|
|
655
685
|
sessionId: string;
|
|
686
|
+
onOpenArtifact?: OpenArtifactHandler;
|
|
656
687
|
/** Endpoint base for agent → visible-workbench UI commands. */
|
|
657
688
|
bridgeEndpoint?: string | null;
|
|
658
689
|
/** Imperative handle getter for the visible workbench surface. */
|