@workerdeck/react 3.0.1 → 3.1.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/build/index.d.mts +28 -3
- package/build/index.mjs +314 -171
- package/build/index.mjs.map +1 -1
- package/package.json +6 -6
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DependencyList, Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { SessionHandle, WorkerDeckClient } from "@workerdeck/client";
|
|
3
|
+
import { AttachedFrame, ByModel, ChecklistItem, ContextUsage, EngineCapabilities, FilePatch, HostDirEntry, HostFileMatch, MessageAttachment, MessageOrigin, ModelOption, PermissionMode, PermissionRequest, PricingTable, ProfileEngine, ProfileSpend, ProfileUsage, RateLimitInfo, SessionEvent, SessionInfo, SessionRow, SessionStatus, ShellInfo, SkillInfo, SlashCommandInfo, ToolExecutionBackend, UsageWindowRow } from "@workerdeck/protocol";
|
|
3
4
|
import { RunScriptResult, SandboxEngine, SandboxVfs } from "@workerdeck/sandbox";
|
|
4
5
|
//#region src/lib/transcript.d.ts
|
|
5
6
|
type ToolResultImageRef = {
|
|
@@ -126,7 +127,7 @@ declare function shellRowText(shell: ShellInfo, text: string): {
|
|
|
126
127
|
truncated: boolean;
|
|
127
128
|
};
|
|
128
129
|
declare function seedFromSessionInfo(state: TranscriptState, info: SessionInfo): TranscriptState;
|
|
129
|
-
declare function rateLimitWindows(state: TranscriptState): UsageWindowRow[];
|
|
130
|
+
declare function rateLimitWindows(state: Pick<TranscriptState, 'rateLimits' | 'rateLimitsUpdatedAt'>): UsageWindowRow[];
|
|
130
131
|
declare function hydrateToolResult(state: TranscriptState, toolUseId: string, text: string): TranscriptState;
|
|
131
132
|
declare function hydrateShellRow(state: TranscriptState, shellId: string, shell: ShellInfo | undefined): TranscriptState;
|
|
132
133
|
declare function hydrateShellOutput(state: TranscriptState, shellId: string, text: string): TranscriptState;
|
|
@@ -288,6 +289,16 @@ declare function usePeerSessions(client: WorkerDeckClient, sessionId: string | u
|
|
|
288
289
|
type ClientForHost = (hostId: string) => WorkerDeckClient | undefined;
|
|
289
290
|
declare function useProjectIcons(rows: readonly SessionRow[], clientFor: ClientForHost): Record<string, string>;
|
|
290
291
|
//#endregion
|
|
292
|
+
//#region src/hooks/use-bookmarks.d.ts
|
|
293
|
+
type UseBookmarksResult = {
|
|
294
|
+
bookmarks: readonly string[];
|
|
295
|
+
toggle: (itemId: string) => void;
|
|
296
|
+
};
|
|
297
|
+
declare function useBookmarks(sessionKey: string | undefined): UseBookmarksResult;
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/lib/bookmark-store.d.ts
|
|
300
|
+
declare const BOOKMARKS_STORAGE_KEY = "workerdeck.bookmarks.v1";
|
|
301
|
+
//#endregion
|
|
291
302
|
//#region src/hooks/use-draft.d.ts
|
|
292
303
|
type UseDraftResult = {
|
|
293
304
|
initialText: string;
|
|
@@ -316,6 +327,20 @@ type UseSessionInfoResult = {
|
|
|
316
327
|
};
|
|
317
328
|
declare function useSessionInfo(client: WorkerDeckClient, sessionId: string | undefined): UseSessionInfoResult;
|
|
318
329
|
//#endregion
|
|
330
|
+
//#region src/lib/async-guards.d.ts
|
|
331
|
+
type UseAsyncOptions = {
|
|
332
|
+
enabled?: boolean;
|
|
333
|
+
pollMs?: number;
|
|
334
|
+
};
|
|
335
|
+
type UseAsyncResult<T> = {
|
|
336
|
+
data: T | undefined;
|
|
337
|
+
error: unknown;
|
|
338
|
+
loading: boolean;
|
|
339
|
+
reload: () => Promise<void>;
|
|
340
|
+
setData: Dispatch<SetStateAction<T | undefined>>;
|
|
341
|
+
};
|
|
342
|
+
declare function useAsync<T>(load: () => Promise<T>, deps: DependencyList, { enabled, pollMs }?: UseAsyncOptions): UseAsyncResult<T>;
|
|
343
|
+
//#endregion
|
|
319
344
|
//#region src/lib/open-files.d.ts
|
|
320
345
|
type OpenFile = {
|
|
321
346
|
path: string;
|
|
@@ -501,5 +526,5 @@ type UseShellTerminalResult = {
|
|
|
501
526
|
};
|
|
502
527
|
declare function useShellTerminal(handle: SessionHandle | undefined, shellId: string | undefined, options: UseShellTerminalOptions): UseShellTerminalResult;
|
|
503
528
|
//#endregion
|
|
504
|
-
export { type AttachmentKind, type ClientForHost, type ClientToolHandler, type ClientToolResult, type ConnectionState, type HostDirState, type HostTreeRow, type OpenFile, type OpenFilesAction, type OpenFilesState, type PeerSessionOption, type ProducedFileRef, type PromptToken, type PromptTokenOptions, REPLAY_HOLD_MAX_MS, type RecapInput, type RecapSummary, type ShellAttachment, type ShellItem, type ShellTerminalSize, type ShellTerminalStatus, type StagedAttachment, type ToolCallHostOptions, type ToolHostExecution, type ToolHostRunner, type ToolResultImageRef, type TranscriptItem, type TranscriptState, type UseAttachmentsOptions, type UseAttachmentsResult, type UseClaudeSessionOptions, type UseClaudeSessionResult, type UseDraftResult, type UseHostFileRootsResult, type UseHostFileSearchResult, type UseHostFileTreeResult, type UseOpenFilesResult, type UsePeerSessionsResult, type UseProfileUsageOptions, type UseProfileUsageResult, type UseSessionInfoResult, type UseShellTerminalOptions, type UseShellTerminalResult, type UseToolCallHostOptions, ancestorsWithin, applyEvent, attachmentKind, clearDrafts, clearProfileUsageCache, clearTranscriptCache, createToolCallHost, currentText, flattenHostTree, hydrateShellOutput, hydrateShellRow, hydrateToolResult, initialOpenFilesState, initialReplayTarget, initialTranscriptState, isDirty, openFilesReducer, rateLimitWindows, recapLine, scanPromptTokens, seedFromSessionInfo, shellRowText, staleAttach, summarizeSince, useAttachments, useClaudeSession, useDraft, useHostFileRoots, useHostFileSearch, useHostFileTree, useOpenFiles, usePeerSessions, useProfileUsage, useProjectIcons, useSessionInfo, useShellTerminal, useToolCallHost };
|
|
529
|
+
export { type AttachmentKind, BOOKMARKS_STORAGE_KEY, type ClientForHost, type ClientToolHandler, type ClientToolResult, type ConnectionState, type HostDirState, type HostTreeRow, type OpenFile, type OpenFilesAction, type OpenFilesState, type PeerSessionOption, type ProducedFileRef, type PromptToken, type PromptTokenOptions, REPLAY_HOLD_MAX_MS, type RecapInput, type RecapSummary, type ShellAttachment, type ShellItem, type ShellTerminalSize, type ShellTerminalStatus, type StagedAttachment, type ToolCallHostOptions, type ToolHostExecution, type ToolHostRunner, type ToolResultImageRef, type TranscriptItem, type TranscriptState, type UseAsyncOptions, type UseAsyncResult, type UseAttachmentsOptions, type UseAttachmentsResult, type UseBookmarksResult, type UseClaudeSessionOptions, type UseClaudeSessionResult, type UseDraftResult, type UseHostFileRootsResult, type UseHostFileSearchResult, type UseHostFileTreeResult, type UseOpenFilesResult, type UsePeerSessionsResult, type UseProfileUsageOptions, type UseProfileUsageResult, type UseSessionInfoResult, type UseShellTerminalOptions, type UseShellTerminalResult, type UseToolCallHostOptions, ancestorsWithin, applyEvent, attachmentKind, clearDrafts, clearProfileUsageCache, clearTranscriptCache, createToolCallHost, currentText, flattenHostTree, hydrateShellOutput, hydrateShellRow, hydrateToolResult, initialOpenFilesState, initialReplayTarget, initialTranscriptState, isDirty, openFilesReducer, rateLimitWindows, recapLine, scanPromptTokens, seedFromSessionInfo, shellRowText, staleAttach, summarizeSince, useAsync, useAttachments, useBookmarks, useClaudeSession, useDraft, useHostFileRoots, useHostFileSearch, useHostFileTree, useOpenFiles, usePeerSessions, useProfileUsage, useProjectIcons, useSessionInfo, useShellTerminal, useToolCallHost };
|
|
505
530
|
//# sourceMappingURL=index.d.mts.map
|