@qwen-code/web-shell 0.28.4 → 0.28.6-nightly.20261126.6b0cd79b
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/NOTICES.txt +1 -1
- package/README.md +11 -1
- package/dist/{PierreFilePreview-Cn-K0sjp.js → PierreFilePreview-DEWuPKoz.js} +1 -1
- package/dist/{SpreadsheetPreview-9HeqwVPY.js → SpreadsheetPreview-Cyor3Mdu.js} +2 -2
- package/dist/{WorkspaceFileBrowser-DKicahqO.js → WorkspaceFileBrowser-CWjB1-hU.js} +2 -2
- package/dist/{WorkspacePdfRangePreview-2_xkjgkQ.js → WorkspacePdfRangePreview-BuJXSlFE.js} +2 -2
- package/dist/{agents-route-CgXJn9nH.js → agents-route-B_dty2Xs.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{i18n-ru-_WgXRbpi.js → i18n-ru-zX2HBIQv.js} +18 -10
- package/dist/{i18n-zh-cn-nzJpapgU.js → i18n-zh-cn-CqjpUMZJ.js} +18 -10
- package/dist/{i18n-zh-tw-DRUCD7h2.js → i18n-zh-tw-DyTerQIj.js} +29 -10
- package/dist/{index-Mt-5HQ-Q.js → index-YiM1lMIr.js} +69459 -66331
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/{terminal-runtime-BQaN1NCS.js → terminal-runtime-ubK12HhZ.js} +997 -997
- package/dist/transcript.js +10619 -10534
- package/dist/types/App.d.ts +8 -2
- package/dist/types/ManagedAgentWebShell.d.ts +2 -0
- package/dist/types/WebShellContexts.d.ts +8 -0
- package/dist/types/adapters/transcriptToMessages.d.ts +0 -20
- package/dist/types/chat-core/ChatSurface.d.ts +38 -2
- package/dist/types/chat-core/contract.d.ts +7 -0
- package/dist/types/components/BranchPickerPopover.d.ts +15 -1
- package/dist/types/components/ComposerTaskChips.d.ts +7 -4
- package/dist/types/components/GitBranchIndicator.d.ts +4 -2
- package/dist/types/components/GitModePopover.d.ts +10 -1
- package/dist/types/components/MessageItem.d.ts +1 -0
- package/dist/types/components/MessageList.d.ts +1 -0
- package/dist/types/components/SessionOverviewPanel.d.ts +3 -2
- package/dist/types/components/TranscriptViewport.d.ts +6 -0
- package/dist/types/components/WorkspaceSelector.d.ts +5 -1
- package/dist/types/components/artifacts/artifactUtils.d.ts +3 -1
- package/dist/types/components/channels/ChannelsManagerPage.d.ts +3 -1
- package/dist/types/components/dialogs/WorkspaceHooksDialog.d.ts +9 -0
- package/dist/types/components/extensions/ExtensionsManagerPage.d.ts +3 -1
- package/dist/types/components/managed/chat-capabilities.d.ts +3 -1
- package/dist/types/components/managed/chat-controller.d.ts +66 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +1 -1
- package/dist/types/components/managed/managed-agent-provider.d.ts +13 -1
- package/dist/types/components/managed/managed-question-response.d.ts +7 -0
- package/dist/types/components/managed/use-managed-actions.d.ts +7 -3
- package/dist/types/components/managed/use-managed-chat-controller.d.ts +40 -0
- package/dist/types/components/managed/use-managed-turn-cancel.d.ts +5 -2
- package/dist/types/components/messages/AskUserQuestion.d.ts +15 -2
- package/dist/types/components/messages/MemoryMessage.d.ts +2 -1
- package/dist/types/components/messages/SettingsMessage.d.ts +13 -5
- package/dist/types/components/messages/UserMessage.d.ts +1 -0
- package/dist/types/components/plugins/PluginManagerPage.d.ts +3 -1
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +2 -4
- package/dist/types/components/sidebar/WorkspaceDetailsTooltip.d.ts +12 -1
- package/dist/types/components/sidebar/WorkspaceMenu.d.ts +9 -2
- package/dist/types/components/sidebar/WorkspaceSection.d.ts +5 -1
- package/dist/types/components/sidebar/sidebar-hover-suppression.d.ts +1 -0
- package/dist/types/components/sidebar/workspaceOverviewModel.d.ts +4 -2
- package/dist/types/components/workspaces/WorkspaceDirectoriesSection.d.ts +3 -1
- package/dist/types/components/workspaces/use-workspace-trust-grant.d.ts +18 -0
- package/dist/types/daemon/chat-controller.d.ts +5 -0
- package/dist/types/daemon/remotePromptSidechannel.d.ts +13 -0
- package/dist/types/daemon/session/DaemonSessionProvider.d.ts +1 -0
- package/dist/types/daemon/session/actions.d.ts +5 -2
- package/dist/types/daemon/session/index.d.ts +1 -1
- package/dist/types/daemon/session/types.d.ts +20 -1
- package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +5 -1
- package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +1 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +5 -1
- package/dist/types/daemon/workspace/types.d.ts +23 -0
- package/dist/types/generated-ui/effects.d.ts +27 -0
- package/dist/types/hooks/composer-draft-session.d.ts +7 -3
- package/dist/types/hooks/useComposerCore.d.ts +14 -1
- package/dist/types/hooks/useInputHistory.d.ts +11 -1
- package/dist/types/hooks/useScopedSessions.d.ts +1 -0
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
- package/dist/types/settings.d.ts +3 -1
- package/dist/types/utils/promptAdmission.d.ts +2 -1
- package/dist/types/utils/rectangles.d.ts +8 -0
- package/dist/types/utils/sessionPreparation.d.ts +2 -1
- package/dist/{useDaemonMidTurnInjected-C7uv5N2a.js → useDaemonMidTurnInjected-K7Sl7y1O.js} +8282 -8004
- package/package.json +1 -1
- package/dist/types/components/managed/ManagedQuestionForm.d.ts +0 -13
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { ManagedAgentProvider, ManagedAgentSessionSummary } from './managed-agent-provider';
|
|
2
|
-
export
|
|
1
|
+
import type { ManagedAgentOperationObserver, ManagedAgentProvider, ManagedAgentSessionSummary } from './managed-agent-provider';
|
|
2
|
+
export interface ManagedTurnCancelObserver extends ManagedAgentOperationObserver {
|
|
3
|
+
readonly onError?: (error: unknown) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function useManagedTurnCancel(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined, summary: ManagedAgentSessionSummary | undefined, interactive: boolean, refreshSummary: () => Promise<ManagedAgentSessionSummary | undefined>, observer?: ManagedTurnCancelObserver): {
|
|
3
6
|
request: () => Promise<void>;
|
|
4
7
|
retry: () => Promise<void>;
|
|
5
8
|
status: "failed" | "stopping" | "unconfirmed" | undefined;
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import type { PermissionRequest } from '../../adapters/types';
|
|
2
|
+
import type { QuestionAnswer } from '../../chat-core/contract';
|
|
3
|
+
export type AskUserQuestionDraft = Record<string, {
|
|
4
|
+
optionIds: string[];
|
|
5
|
+
text: string;
|
|
6
|
+
}>;
|
|
2
7
|
interface AskUserQuestionProps {
|
|
3
8
|
request: PermissionRequest;
|
|
4
|
-
onConfirm: (id: string, selectedOption: string, answers?: Record<string, string
|
|
9
|
+
onConfirm: (id: string, selectedOption: string, answers?: Record<string, string>, structuredAnswers?: readonly QuestionAnswer[]) => Promise<boolean>;
|
|
5
10
|
onError: (error: unknown, fallback: string) => void;
|
|
6
11
|
variant?: 'inline' | 'floating';
|
|
12
|
+
/** Disables answering and submitting while keeping questions inspectable. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Blocks only submission (Submit button and submit shortcuts) while keeping inputs editable. */
|
|
15
|
+
submitDisabled?: boolean;
|
|
16
|
+
/** Optional initial draft hydrated when a request mounts or changes identity. */
|
|
17
|
+
initialDraft?: AskUserQuestionDraft;
|
|
18
|
+
/** Emitted after user-driven answer edits so a host can preserve drafts across switches. */
|
|
19
|
+
onDraftChange?: (draft: AskUserQuestionDraft) => void;
|
|
7
20
|
customInputLabel?: string;
|
|
8
21
|
/**
|
|
9
22
|
* Opens a side task that explains the pending question before the user
|
|
@@ -20,5 +33,5 @@ interface AskUserQuestionProps {
|
|
|
20
33
|
*/
|
|
21
34
|
keyboardActive?: boolean;
|
|
22
35
|
}
|
|
23
|
-
export declare function AskUserQuestion({ request, onConfirm, onError, variant, keyboardActive, customInputLabel, onAskDetails, }: AskUserQuestionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
+
export declare function AskUserQuestion({ request, onConfirm, onError, variant, disabled, submitDisabled, initialDraft, onDraftChange, keyboardActive, customInputLabel, onAskDetails, }: AskUserQuestionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
24
37
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type DaemonContextFileScope } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
2
2
|
interface MemoryMessageProps {
|
|
3
|
+
workspaceCwd?: string;
|
|
3
4
|
addSignal?: number;
|
|
4
5
|
addScope?: DaemonContextFileScope;
|
|
5
6
|
onMessage?: (message: string, type?: 'status' | 'error') => void;
|
|
6
7
|
}
|
|
7
|
-
export declare function MemoryMessage({ addSignal, addScope, onMessage, }: MemoryMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function MemoryMessage({ workspaceCwd, addSignal, addScope, onMessage, }: MemoryMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -30,6 +30,8 @@ interface SettingsMessageProps {
|
|
|
30
30
|
* the Workspace scope tab; omitted when the daemon cannot manage them.
|
|
31
31
|
*/
|
|
32
32
|
workspaceDirectoriesSection?: ReactNode;
|
|
33
|
+
/** Optional workspace switcher rendered beside the scope tabs. */
|
|
34
|
+
workspaceControl?: ReactNode;
|
|
33
35
|
embedded?: boolean;
|
|
34
36
|
/** Category to select on open (deep link, e.g. 'Daemon'). */
|
|
35
37
|
initialCategory?: string;
|
|
@@ -53,16 +55,22 @@ export interface SettingsMessageSettingsState {
|
|
|
53
55
|
type Scope = 'user' | 'workspace';
|
|
54
56
|
type Translator = (key: string, vars?: Record<string, string | number>) => string;
|
|
55
57
|
export declare function formatSettingLabel(setting: DaemonSettingDescriptor, t: Translator): string;
|
|
58
|
+
declare const LOCAL_SETTING_IDS: {
|
|
59
|
+
readonly chatWidth: "builtin:chat-width";
|
|
60
|
+
readonly arrowKeyHistory: "builtin:arrow-key-history";
|
|
61
|
+
readonly browserNotifications: "builtin:browser-notifications";
|
|
62
|
+
};
|
|
63
|
+
type LocalSettingItem = {
|
|
64
|
+
type: 'local';
|
|
65
|
+
localKey: keyof typeof LOCAL_SETTING_IDS;
|
|
66
|
+
};
|
|
56
67
|
export type FlatRow = {
|
|
57
68
|
type: 'header';
|
|
58
69
|
category: string;
|
|
59
70
|
} | {
|
|
60
71
|
type: 'setting';
|
|
61
72
|
setting: DaemonSettingDescriptor;
|
|
62
|
-
} |
|
|
63
|
-
type: 'local';
|
|
64
|
-
localKey: 'chatWidth' | 'browserNotifications';
|
|
65
|
-
};
|
|
73
|
+
} | LocalSettingItem;
|
|
66
74
|
export declare function nextSettingIdx(rows: FlatRow[], current: number, dir: 1 | -1): number;
|
|
67
|
-
export declare function SettingsMessage({ settingsState, presentation, onLanguageChange, onOutputLanguageChange, onSubDialog, onThemeChange, chatWidthMode, onChatWidthModeChange, modelManagementSectionProps, connections, archivedSessions, workspaceDirectoriesSection, embedded, initialCategory, workspaceSettingsWritable, }: SettingsMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export declare function SettingsMessage({ settingsState, presentation, onLanguageChange, onOutputLanguageChange, onSubDialog, onThemeChange, chatWidthMode, onChatWidthModeChange, modelManagementSectionProps, connections, archivedSessions, workspaceDirectoriesSection, workspaceControl, embedded, initialCategory, workspaceSettingsWritable, }: SettingsMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
68
76
|
export {};
|
|
@@ -22,6 +22,7 @@ interface UserMessageProps {
|
|
|
22
22
|
inputAnnotations?: readonly DaemonInputAnnotation[];
|
|
23
23
|
isLocateFlashing?: boolean;
|
|
24
24
|
sendFailed?: boolean;
|
|
25
|
+
sendFailedStatus?: 'failed' | 'uncertain';
|
|
25
26
|
onRetrySend?: () => void;
|
|
26
27
|
/** Render the message as an in-place editor instead of rendered content. */
|
|
27
28
|
editing?: boolean;
|
|
@@ -8,11 +8,13 @@ interface PluginManagerPageProps {
|
|
|
8
8
|
showBackButton?: boolean;
|
|
9
9
|
initialFocusRef?: Ref<HTMLButtonElement>;
|
|
10
10
|
initialTab?: PluginTab;
|
|
11
|
+
initialWorkspaceCwd?: string;
|
|
12
|
+
navigationRequest?: number;
|
|
11
13
|
skillsWorkspaceCwd?: string;
|
|
12
14
|
onSkillsWorkspaceChange?: (cwd: string) => void;
|
|
13
15
|
managedSkills?: boolean;
|
|
14
16
|
managedExtensions?: Omit<ManagedExtensionsManagerPageProps, 'onClose'>;
|
|
15
17
|
managedMcp?: ManagedMcpManagerPageProps;
|
|
16
18
|
}
|
|
17
|
-
export declare function PluginManagerPage({ onClose, onUseSkill, showBackButton, initialFocusRef, initialTab, skillsWorkspaceCwd, onSkillsWorkspaceChange, managedSkills, managedExtensions, managedMcp, }: PluginManagerPageProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function PluginManagerPage({ onClose, onUseSkill, showBackButton, initialFocusRef, initialTab, initialWorkspaceCwd, navigationRequest, skillsWorkspaceCwd, onSkillsWorkspaceChange, managedSkills, managedExtensions, managedMcp, }: PluginManagerPageProps): import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -182,10 +182,8 @@ interface WebShellSidebarProps {
|
|
|
182
182
|
*/
|
|
183
183
|
workspaceOverview?: false | WebShellSidebarWorkspaceOverviewOptions;
|
|
184
184
|
/**
|
|
185
|
-
* Open a management page (MCP, skills,
|
|
186
|
-
*
|
|
187
|
-
* connection's bound workspace, so another workspace's row cannot open its
|
|
188
|
-
* own view yet (#10399, layer B1).
|
|
185
|
+
* Open a management page (MCP, skills, extensions, channels, settings,
|
|
186
|
+
* context, hooks) scoped to the clicked workspace.
|
|
189
187
|
*/
|
|
190
188
|
onOpenWorkspaceManagement?: (target: WorkspaceManagementTarget, workspaceCwd: string) => void;
|
|
191
189
|
/** Start a new session that works in an isolated git worktree. */
|
|
@@ -37,6 +37,17 @@ interface WorkspaceDetailsTooltipProps {
|
|
|
37
37
|
onBranchChanged: () => void;
|
|
38
38
|
};
|
|
39
39
|
onOpenChange?: (open: boolean) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Optional handler invoked when the user clicks a manageable overview row
|
|
42
|
+
* (MCP, skills, extensions, channels, context, hooks). Rows without a
|
|
43
|
+
* handler or excluded by `manageableItems` stay read-only.
|
|
44
|
+
*/
|
|
45
|
+
onOpenOverviewItem?: (item: WorkspaceOverviewItem) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Subset of overview facets that render as clickable management rows when
|
|
48
|
+
* `onOpenOverviewItem` is provided. Defaults to all items when omitted.
|
|
49
|
+
*/
|
|
50
|
+
manageableItems?: ReadonlySet<WorkspaceOverviewItem>;
|
|
40
51
|
children: ReactElement;
|
|
41
52
|
}
|
|
42
53
|
/**
|
|
@@ -45,5 +56,5 @@ interface WorkspaceDetailsTooltipProps {
|
|
|
45
56
|
* takes no persistent space, so known facets show even when their count is
|
|
46
57
|
* zero; only unknown (unreported) facets stay hidden.
|
|
47
58
|
*/
|
|
48
|
-
export declare function WorkspaceDetailsTooltip({ label, cwd, branch, gitStatus, sessions, overview, items, onOpenPathLocally, onOpenTerminalLocally, gitActions, onOpenChange, children, }: WorkspaceDetailsTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export declare function WorkspaceDetailsTooltip({ label, cwd, branch, gitStatus, sessions, overview, items, onOpenPathLocally, onOpenTerminalLocally, gitActions, onOpenChange, onOpenOverviewItem, manageableItems, children, }: WorkspaceDetailsTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
49
60
|
export {};
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
import { type ComponentProps, type CSSProperties } from 'react';
|
|
7
7
|
import type { DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
|
|
8
8
|
import { DropdownMenuContent } from '../ui/dropdown-menu';
|
|
9
|
-
import { type
|
|
9
|
+
import { type WorkspaceMenuManagementTarget, type WorkspaceOverviewSnapshot } from './workspaceOverviewModel';
|
|
10
10
|
/**
|
|
11
11
|
* Every action is optional: the sidebar passes only what the workspace's
|
|
12
12
|
* trust, lock and registration state allows, and the menu lays out whatever
|
|
13
13
|
* it gets. An empty action set renders nothing.
|
|
14
14
|
*/
|
|
15
15
|
export interface WorkspaceMenuActions {
|
|
16
|
+
trust?: () => void;
|
|
17
|
+
trustPending?: boolean;
|
|
16
18
|
rename?: () => void;
|
|
17
19
|
copyPath?: () => void;
|
|
18
20
|
openFolder?: () => void;
|
|
@@ -22,7 +24,12 @@ export interface WorkspaceMenuActions {
|
|
|
22
24
|
createGroup?: () => void;
|
|
23
25
|
moveUp?: () => void;
|
|
24
26
|
moveDown?: () => void;
|
|
25
|
-
openManagement?: (target:
|
|
27
|
+
openManagement?: (target: WorkspaceMenuManagementTarget) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Subset of menu management targets offered for this workspace. When
|
|
30
|
+
* omitted, all five targets are offered whenever `openManagement` is set.
|
|
31
|
+
*/
|
|
32
|
+
managementTargets?: readonly WorkspaceMenuManagementTarget[];
|
|
26
33
|
reload?: () => void;
|
|
27
34
|
remove?: () => void;
|
|
28
35
|
}
|
|
@@ -142,6 +142,10 @@ interface WorkspaceSectionProps {
|
|
|
142
142
|
onOpenGitDiff?: (workspaceCwd: string) => void;
|
|
143
143
|
/** Commit entry for the same picker; the row still opens without it. */
|
|
144
144
|
onOpenCommit?: (workspaceCwd: string) => void;
|
|
145
|
+
/** Opens the management view for a clicked overview facet in this workspace. */
|
|
146
|
+
onOpenOverviewItem?: (item: WorkspaceOverviewItem, workspaceCwd: string) => void;
|
|
147
|
+
/** Facets that render as interactive rows in the hover details popover. */
|
|
148
|
+
manageableOverviewItems?: ReadonlySet<WorkspaceOverviewItem>;
|
|
145
149
|
}
|
|
146
|
-
export declare function WorkspaceSection({ workspace, executionLabel, storageKey, remote, renderHeader, hideHeader, client, reloadToken, untrustedLabel, readOnlyLabel, trustToOpenLabel, noSessionsLabel, loadErrorLabel, untitledSessionLabel, organizationEnabled, sessionCatalogRequestsEnabled, sessionGroupCatalog, sessionLiveStateEnabled, sortBy, sourceType, channelGroupingEnabled, ungroupedLabel, searchQuery, expanded: controlledExpanded, expansionRequest, temporarilyCollapsed, dragHandleProps, autoExpandKey, forceAutoExpand, onExpandedChange, renderSessions, renderSession, pendingSession, mapSession, showSessionDetails, headerActions, overviewEnabled, overviewMenuOpen, overviewItems, gitBranchWanted, sessionStats, onRenameGroup, onDeleteGroup, renameGroupLabel, deleteGroupLabel, groupActionsDisabled, excludePinned, limitSessions, editingSessionId, isPinnedSectionMember, onOpenPathLocally, onOpenTerminalLocally, onOpenGitDiff, onOpenCommit, }: WorkspaceSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
150
|
+
export declare function WorkspaceSection({ workspace, executionLabel, storageKey, remote, renderHeader, hideHeader, client, reloadToken, untrustedLabel, readOnlyLabel, trustToOpenLabel, noSessionsLabel, loadErrorLabel, untitledSessionLabel, organizationEnabled, sessionCatalogRequestsEnabled, sessionGroupCatalog, sessionLiveStateEnabled, sortBy, sourceType, channelGroupingEnabled, ungroupedLabel, searchQuery, expanded: controlledExpanded, expansionRequest, temporarilyCollapsed, dragHandleProps, autoExpandKey, forceAutoExpand, onExpandedChange, renderSessions, renderSession, pendingSession, mapSession, showSessionDetails, headerActions, overviewEnabled, overviewMenuOpen, overviewItems, gitBranchWanted, sessionStats, onRenameGroup, onDeleteGroup, renameGroupLabel, deleteGroupLabel, groupActionsDisabled, excludePinned, limitSessions, editingSessionId, isPinnedSectionMember, onOpenPathLocally, onOpenTerminalLocally, onOpenGitDiff, onOpenCommit, onOpenOverviewItem, manageableOverviewItems, }: WorkspaceSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
147
151
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SidebarHoverSuppressionContext: import("react").Context<boolean>;
|
|
@@ -14,8 +14,10 @@ export declare const WORKSPACE_OVERVIEW_ITEMS: readonly ["mcp", "skills", "exten
|
|
|
14
14
|
export type WorkspaceOverviewItem = (typeof WORKSPACE_OVERVIEW_ITEMS)[number];
|
|
15
15
|
/** Hooks are opt-in: most workspaces have none and the chip would only add noise. */
|
|
16
16
|
export declare const DEFAULT_WORKSPACE_OVERVIEW_ITEMS: readonly WorkspaceOverviewItem[];
|
|
17
|
-
/** Management pages
|
|
18
|
-
export type
|
|
17
|
+
/** Management pages exposed inside the workspace `⋮` menu. */
|
|
18
|
+
export type WorkspaceMenuManagementTarget = 'mcp' | 'skills' | 'extensions' | 'channels' | 'settings';
|
|
19
|
+
/** Management targets a workspace row or hover details popover can open. */
|
|
20
|
+
export type WorkspaceManagementTarget = WorkspaceMenuManagementTarget | 'context' | 'hooks';
|
|
19
21
|
export interface WorkspaceSessionStats {
|
|
20
22
|
/** Sessions in the list the stats were computed from. */
|
|
21
23
|
total: number;
|
|
@@ -8,4 +8,6 @@
|
|
|
8
8
|
* panel. Adds and removes go through the daemon's workspace-directory route,
|
|
9
9
|
* which applies them to live sessions and persists the workspace setting.
|
|
10
10
|
*/
|
|
11
|
-
export declare function WorkspaceDirectoriesSection(
|
|
11
|
+
export declare function WorkspaceDirectoriesSection({ workspaceCwd: requestedWorkspaceCwd, }?: {
|
|
12
|
+
workspaceCwd?: string;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonClient, DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
|
|
7
|
+
export interface UseWorkspaceTrustGrantOptions {
|
|
8
|
+
client: DaemonClient;
|
|
9
|
+
workspaces: readonly DaemonWorkspaceCapability[];
|
|
10
|
+
refreshCapabilities?: () => Promise<unknown>;
|
|
11
|
+
onError: (error: unknown, message: string) => void;
|
|
12
|
+
errorMessage: string;
|
|
13
|
+
}
|
|
14
|
+
export interface WorkspaceTrustGrantState {
|
|
15
|
+
trustPendingCwd: string | null;
|
|
16
|
+
grantTrust: (ws: DaemonWorkspaceCapability) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function useWorkspaceTrustGrant({ client, workspaces, refreshCapabilities, onError, errorMessage, }: UseWorkspaceTrustGrantOptions): WorkspaceTrustGrantState;
|
|
@@ -33,6 +33,10 @@ export interface DaemonChatControllerDeps {
|
|
|
33
33
|
readonly storageKey: string;
|
|
34
34
|
readonly messages: readonly Message[];
|
|
35
35
|
readonly transcriptState: 'loading' | 'ready' | 'error';
|
|
36
|
+
readonly hasOlderHistory?: boolean;
|
|
37
|
+
readonly loadingOlderHistory?: boolean;
|
|
38
|
+
readonly historyCapacityReached?: boolean;
|
|
39
|
+
readonly historyPaginationError?: boolean;
|
|
36
40
|
loadOlder?(options?: {
|
|
37
41
|
force?: boolean;
|
|
38
42
|
}): Promise<void>;
|
|
@@ -52,6 +56,7 @@ export interface DaemonChatControllerDeps {
|
|
|
52
56
|
subscribeDecisionSettlement(listener: (event: DaemonDecisionSettlement) => void): () => void;
|
|
53
57
|
subscribeApprovalCurrency(listener: (requestId: string, live: boolean) => void): () => void;
|
|
54
58
|
readonly liveApprovalRequestIds?: readonly string[];
|
|
59
|
+
readonly livePromptIds?: readonly string[];
|
|
55
60
|
readonly settledPhase?: 'idle' | 'failed';
|
|
56
61
|
readonly signal?: AbortSignal;
|
|
57
62
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export interface RemotePromptSidechannelEvent {
|
|
7
|
+
sessionId: string;
|
|
8
|
+
kind: 'prompt';
|
|
9
|
+
}
|
|
10
|
+
type RemotePromptListener = (event: RemotePromptSidechannelEvent) => void;
|
|
11
|
+
export declare function subscribeSidechannelRemotePrompt(listener: RemotePromptListener): () => void;
|
|
12
|
+
export declare function publishSidechannelRemotePrompt(event: RemotePromptSidechannelEvent): void;
|
|
13
|
+
export {};
|
|
@@ -26,6 +26,7 @@ export declare function useDaemonTranscriptStore(): DaemonTranscriptStore;
|
|
|
26
26
|
export declare function useDaemonTranscriptHistory(): DaemonTranscriptHistory;
|
|
27
27
|
export declare function useDaemonTurnNavigationStore(): DaemonTurnNavigationStore;
|
|
28
28
|
export declare function useDaemonHistoryNavigationStore(): DaemonHistoryNavigationStore;
|
|
29
|
+
export declare function useOptionalDaemonHistoryNavigationStore(): DaemonHistoryNavigationStore | undefined;
|
|
29
30
|
export declare function useDaemonTurnNavigationState(): DaemonTurnNavigationSnapshot;
|
|
30
31
|
export declare function useDaemonTranscriptState(): DaemonTranscriptState;
|
|
31
32
|
export declare function useDaemonTranscriptBlocks(): readonly DaemonTranscriptBlock[];
|
|
@@ -23,6 +23,8 @@ export declare function resolveSessionRestoreTimeouts(capabilities: DaemonCapabi
|
|
|
23
23
|
* the two reports a timeout on a spawn the daemon is still finishing.
|
|
24
24
|
*/
|
|
25
25
|
export declare function resolveCreateWatchdogTimeoutMs(capabilities: DaemonCapabilities | undefined): number;
|
|
26
|
+
export declare function takePendingRestoredSession(load: PendingSessionLoad | undefined): DaemonSessionClient | undefined;
|
|
27
|
+
export declare function detachPendingRestoredSession(load: PendingSessionLoad | undefined): void;
|
|
26
28
|
export interface CreateDaemonSessionActionsArgs {
|
|
27
29
|
store: DaemonTranscriptStore;
|
|
28
30
|
sessionRef: RefBox<DaemonSessionClient | undefined>;
|
|
@@ -61,7 +63,8 @@ export interface CreateDaemonSessionActionsArgs {
|
|
|
61
63
|
flushTranscript: () => void;
|
|
62
64
|
getCreateSessionRequest: () => CreateSessionRequest;
|
|
63
65
|
createDetachedSession: (workspaceCwd?: string, overrides?: Pick<CreateSessionRequest, 'approvalMode' | 'sourceType' | 'worktree' | 'branch' | 'startupConfig'>) => Promise<DaemonSessionClient>;
|
|
64
|
-
createDetachedStandaloneSession: (overrides?: Pick<CreateSessionRequest, 'approvalMode' | 'modelServiceId'>) => Promise<DaemonSessionClient>;
|
|
66
|
+
createDetachedStandaloneSession: (overrides?: Pick<CreateSessionRequest, 'approvalMode' | 'modelServiceId' | 'startupConfig'>) => Promise<DaemonSessionClient>;
|
|
67
|
+
restoreDetachedWorktreeSession: (sessionId: string, workspaceCwd: string) => Promise<DaemonSessionClient>;
|
|
65
68
|
getDefaultSessionContext: () => DaemonProductSessionContext | undefined;
|
|
66
69
|
getClient?: () => DaemonClient | undefined;
|
|
67
70
|
getConnection: () => DaemonConnectionState;
|
|
@@ -92,7 +95,7 @@ export interface CreateDaemonSessionActionsArgs {
|
|
|
92
95
|
export declare function getWorkspaceModelsAfterSessionClear(current: DaemonConnectionState): DaemonConnectionState['models'];
|
|
93
96
|
export declare function getConnectionAfterSessionClear(current: DaemonConnectionState, clearedSessionId: string | undefined, preserveWorkspaceMetadata?: boolean, dropSessionContext?: boolean): DaemonConnectionState;
|
|
94
97
|
export declare function advanceSessionRecoveryGeneration(generations: WeakMap<DaemonSessionClient, number>, session: DaemonSessionClient): number;
|
|
95
|
-
export declare function createDaemonSessionActions({ store, sessionRef, activePromptsRef, settledPromptsRef, pendingSessionLoadRef, pendingSessionLoadIdRef, sessionConfigGeneration, sessionRecoveryGeneration, heartbeatSupportedRef, manualSessionClearRef, skipNextCleanupDetachSessionRef, passiveAssistantDoneTimerRef, daemonActivePromptRef, settleRestoredActivePrompt, flushTranscript, getCreateSessionRequest, createDetachedSession, createDetachedStandaloneSession, getDefaultSessionContext, getClient, getConnection, getPromptStatus, getEventDetailMode, hasSessionActivePrompt, resetCurrentSessionActivePrompt, restartEventStream, addNotice, setConnection, setPromptStatus, setRestoreSessionId, setRestoreSessionContext, setRestoreMode, setRestoreSessionNonce, setAttachSessionNonce, setNewSessionNonce, clearLiveJournalRepair, onGeneratedUiInvalidated, onPromptAdmitted, onContinuationAdmitted, onPromptRemoved, }: CreateDaemonSessionActionsArgs): DaemonSessionActions;
|
|
98
|
+
export declare function createDaemonSessionActions({ store, sessionRef, activePromptsRef, settledPromptsRef, pendingSessionLoadRef, pendingSessionLoadIdRef, sessionConfigGeneration, sessionRecoveryGeneration, heartbeatSupportedRef, manualSessionClearRef, skipNextCleanupDetachSessionRef, passiveAssistantDoneTimerRef, daemonActivePromptRef, settleRestoredActivePrompt, flushTranscript, getCreateSessionRequest, createDetachedSession, createDetachedStandaloneSession, restoreDetachedWorktreeSession, getDefaultSessionContext, getClient, getConnection, getPromptStatus, getEventDetailMode, hasSessionActivePrompt, resetCurrentSessionActivePrompt, restartEventStream, addNotice, setConnection, setPromptStatus, setRestoreSessionId, setRestoreSessionContext, setRestoreMode, setRestoreSessionNonce, setAttachSessionNonce, setNewSessionNonce, clearLiveJournalRepair, onGeneratedUiInvalidated, onPromptAdmitted, onContinuationAdmitted, onPromptRemoved, }: CreateDaemonSessionActionsArgs): DaemonSessionActions;
|
|
96
99
|
/**
|
|
97
100
|
* Key under which a shell command tracks its prompt in the active-prompt map.
|
|
98
101
|
* Shell commands run as their own prompt alongside a conversation turn, so they
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export { DaemonSessionProvider, DEFAULT_MAX_BLOCKS, useDaemonActions, useOptionalDaemonActions, useDaemonSessionOwnerGuard, useDaemonWorkspaceEventSignals, useDaemonActiveTodoList, useDaemonConnection, useDaemonPendingPermissions, useDaemonPromptStatus, useDaemonSessionNotices, useDaemonStreamingState, useDaemonSession, useDaemonTranscriptBlocks, useDaemonTranscriptHistory, useDaemonTranscriptState, useDaemonTranscriptStore, useDaemonTurnNavigationState, useDaemonTurnNavigationStore, } from './DaemonSessionProvider.js';
|
|
6
|
+
export { DaemonSessionProvider, DEFAULT_MAX_BLOCKS, useDaemonActions, useOptionalDaemonActions, useDaemonSessionOwnerGuard, useDaemonWorkspaceEventSignals, useDaemonActiveTodoList, useDaemonConnection, useDaemonPendingPermissions, useDaemonPromptStatus, useDaemonSessionNotices, useDaemonStreamingState, useDaemonSession, useDaemonTranscriptBlocks, useDaemonTranscriptHistory, useDaemonTranscriptState, useDaemonTranscriptStore, useDaemonTurnNavigationState, useDaemonTurnNavigationStore, useOptionalDaemonHistoryNavigationStore, } from './DaemonSessionProvider.js';
|
|
7
7
|
export type { DaemonTranscriptHistory } from './DaemonSessionProvider.js';
|
|
8
8
|
export { createDaemonTurnNavigationStore } from './turn-navigation-store.js';
|
|
9
9
|
export type { CreateDaemonTurnNavigationStoreOptions, DaemonPromptAdmission, DaemonProvisionalTurn, DaemonSelectedTurnState, DaemonTurnIndexPage, DaemonTurnLocation, DaemonTurnNavigationClient, DaemonTurnNavigationError, DaemonTurnNavigationSession, DaemonTurnNavigationSnapshot, DaemonTurnNavigationStore, } from './turn-navigation-store.js';
|
|
@@ -312,6 +312,8 @@ export interface DaemonCommandInfo {
|
|
|
312
312
|
export interface SendPromptOptions {
|
|
313
313
|
/** Original text declared at the user submission boundary, before host preparation. */
|
|
314
314
|
submittedPrompt?: string;
|
|
315
|
+
/** Keep host-initiated commands out of the user's cross-device input history. */
|
|
316
|
+
suppressInputHistory?: boolean;
|
|
315
317
|
source?: 'mcp-app';
|
|
316
318
|
optimisticUserMessage?: boolean;
|
|
317
319
|
/**
|
|
@@ -331,6 +333,8 @@ export interface SendPromptOptions {
|
|
|
331
333
|
retry?: boolean;
|
|
332
334
|
/** Fired after local validation, immediately before dispatch to the daemon. */
|
|
333
335
|
onAdmissionStarted?: () => void;
|
|
336
|
+
/** Caller-generated key used to deduplicate retried prompt admissions. */
|
|
337
|
+
idempotencyKey?: string;
|
|
334
338
|
/** Revalidates the caller before every HTTP attempt, including client recovery. */
|
|
335
339
|
beforeDispatch?: (clientId: string | undefined) => void;
|
|
336
340
|
/**
|
|
@@ -434,7 +438,7 @@ export interface DaemonSessionActions {
|
|
|
434
438
|
* prompt status, or connection. The turn runs on the daemon after the
|
|
435
439
|
* client detaches; a later loadSession attaches fresh.
|
|
436
440
|
*/
|
|
437
|
-
sendDetachedPrompt(session: DaemonSessionClient, text: string, options?: Pick<SendPromptOptions, 'submittedPrompt' | 'images' | 'files' | 'inputAnnotations' | 'retry' | 'onAdmissionStarted' | 'onAdmitted'>): Promise<SubmitPromptResult>;
|
|
441
|
+
sendDetachedPrompt(session: DaemonSessionClient, text: string, options?: Pick<SendPromptOptions, 'submittedPrompt' | 'suppressInputHistory' | 'images' | 'files' | 'inputAnnotations' | 'retry' | 'idempotencyKey' | 'onAdmissionStarted' | 'onAdmitted'>): Promise<SubmitPromptResult>;
|
|
438
442
|
cancel(): Promise<void>;
|
|
439
443
|
setModel(modelId: string): Promise<SetModelResult>;
|
|
440
444
|
refreshModels(beforeRefresh?: (target: {
|
|
@@ -464,7 +468,20 @@ export interface DaemonSessionActions {
|
|
|
464
468
|
/** Artifact count from the clicked session's list summary, shown in
|
|
465
469
|
* the header entry before the load response lands. Omit when unknown. */
|
|
466
470
|
artifactCountHint?: number;
|
|
471
|
+
/**
|
|
472
|
+
* Hydrated client returned by restoreWorktreeSession. Ownership moves
|
|
473
|
+
* to this load; the provider consumes its replay instead of loading again.
|
|
474
|
+
*/
|
|
475
|
+
restoredSession?: DaemonSessionClient;
|
|
467
476
|
}): Promise<void>;
|
|
477
|
+
/**
|
|
478
|
+
* Restore a retained worktree into a hydrated client without binding it to
|
|
479
|
+
* this provider. Pass the result to loadSession, or detach it if navigation
|
|
480
|
+
* never takes ownership.
|
|
481
|
+
*/
|
|
482
|
+
restoreWorktreeSession(sessionId: string, options: {
|
|
483
|
+
workspaceCwd: string;
|
|
484
|
+
}): Promise<DaemonSessionClient>;
|
|
468
485
|
/** `memory` replay is reserved for the provider's live-journal repair. */
|
|
469
486
|
reloadSession(signal: AbortSignal, options?: {
|
|
470
487
|
replaySource?: 'configured' | 'memory';
|
|
@@ -745,6 +762,8 @@ export interface PendingSessionLoad {
|
|
|
745
762
|
reject: (error: unknown) => void;
|
|
746
763
|
signal?: AbortSignal;
|
|
747
764
|
replaySource?: 'configured' | 'memory';
|
|
765
|
+
/** Present until the provider takes ownership of this restored client. */
|
|
766
|
+
restoredSession?: DaemonSessionClient;
|
|
748
767
|
reconcilePromptActivity?: boolean;
|
|
749
768
|
}
|
|
750
769
|
export {};
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { DaemonResourceOptions } from '../types.js';
|
|
7
|
-
|
|
7
|
+
interface DaemonMemoryOptions extends DaemonResourceOptions {
|
|
8
|
+
workspaceCwd?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function useDaemonMemory(options?: DaemonMemoryOptions): {
|
|
8
11
|
status: import("@qwen-code/sdk/daemon").DaemonWorkspaceMemoryStatus | undefined;
|
|
9
12
|
files: import("@qwen-code/sdk/daemon").DaemonWorkspaceMemoryFile[];
|
|
10
13
|
readFile: (filePath: string, opts?: {
|
|
@@ -25,3 +28,4 @@ export declare function useDaemonMemory(options?: DaemonResourceOptions): {
|
|
|
25
28
|
error?: Error;
|
|
26
29
|
}>;
|
|
27
30
|
};
|
|
31
|
+
export {};
|
|
@@ -25,6 +25,7 @@ export declare function useDaemonSessions(options?: DaemonSessionsOptions): {
|
|
|
25
25
|
workspaceCwd?: string;
|
|
26
26
|
sessionContext?: import("../../index.js").DaemonProductSessionContext;
|
|
27
27
|
artifactCountHint?: number;
|
|
28
|
+
restoredSession?: import("@qwen-code/sdk/daemon").DaemonSessionClient;
|
|
28
29
|
}) => Promise<void>) | undefined;
|
|
29
30
|
resumeSession: ((sessionId: string, options?: {
|
|
30
31
|
workspaceCwd?: string;
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { DaemonResourceOptions } from '../types.js';
|
|
7
|
-
|
|
7
|
+
interface DaemonSettingsOptions extends DaemonResourceOptions {
|
|
8
|
+
workspaceCwd?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function useDaemonSettings(options?: DaemonSettingsOptions): {
|
|
8
11
|
status: import("@qwen-code/sdk/daemon").DaemonWorkspaceSettingsStatus | undefined;
|
|
9
12
|
settings: import("@qwen-code/sdk/daemon").DaemonSettingDescriptor[];
|
|
10
13
|
setValue: (scope: "workspace" | "user", key: string, value: unknown, options?: {
|
|
@@ -23,3 +26,4 @@ export declare function useDaemonSettings(options?: DaemonResourceOptions): {
|
|
|
23
26
|
error?: Error;
|
|
24
27
|
}>;
|
|
25
28
|
};
|
|
29
|
+
export {};
|
|
@@ -393,6 +393,17 @@ export interface DaemonAutofixPrWatchList {
|
|
|
393
393
|
error: string;
|
|
394
394
|
}>;
|
|
395
395
|
}
|
|
396
|
+
/** Input history kinds persisted per workspace on the daemon. */
|
|
397
|
+
export type DaemonInputHistoryKind = 'prompt' | 'shell';
|
|
398
|
+
/** Result of `GET /workspace/input-history` (or workspace-qualified). */
|
|
399
|
+
export type DaemonInputHistoryResult = {
|
|
400
|
+
notModified: true;
|
|
401
|
+
} | {
|
|
402
|
+
notModified: false;
|
|
403
|
+
kind: DaemonInputHistoryKind;
|
|
404
|
+
entries: string[];
|
|
405
|
+
revision: string;
|
|
406
|
+
};
|
|
396
407
|
/** One entry of a Channel's event journal (`GET .../channels/events`). */
|
|
397
408
|
export type DaemonChannelEventEntry = DaemonChannelEvent;
|
|
398
409
|
export type DaemonChannelEventList = DaemonChannelEventsSnapshot;
|
|
@@ -536,6 +547,18 @@ export interface DaemonWorkspaceActions extends Pick<DaemonClient, 'getSubscript
|
|
|
536
547
|
/** The `/autofix-pr` watches of a workspace's clone; `workspaceId` as for
|
|
537
548
|
* `listScheduledTasks`. Only to a daemon advertising `autofix_pr_watches`. */
|
|
538
549
|
listAutofixPrWatches(workspaceId?: string): Promise<DaemonAutofixPrWatchList>;
|
|
550
|
+
/** Workspace-scoped prompt/shell input history (`workspace_input_history`). */
|
|
551
|
+
loadInputHistory(opts: {
|
|
552
|
+
kind: DaemonInputHistoryKind;
|
|
553
|
+
limit?: number;
|
|
554
|
+
workspaceId?: string;
|
|
555
|
+
ifNoneMatch?: string;
|
|
556
|
+
}): Promise<DaemonInputHistoryResult>;
|
|
557
|
+
recordInputHistory(opts: {
|
|
558
|
+
kind: DaemonInputHistoryKind;
|
|
559
|
+
entry: string;
|
|
560
|
+
workspaceId?: string;
|
|
561
|
+
}): Promise<void>;
|
|
539
562
|
/** The provider workspace's Channel event journal, newest last. A scoped
|
|
540
563
|
* workspace reads its own through its client. */
|
|
541
564
|
listChannelEvents(query?: DaemonChannelEventsQuery): Promise<DaemonChannelEventList>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/** The bundled card asks for a copy; downloads use `ui/download-file`. */
|
|
7
|
+
export declare const COPY_CAPABILITY = "qwen-code/generated-ui-copy";
|
|
8
|
+
export declare const COPY_WRITE = "qwen-code/generated-ui-copy/write";
|
|
9
|
+
export type EffectStatus = 'copied' | 'copy-pending' | 'downloaded' | 'refused';
|
|
10
|
+
export interface DownloadFile {
|
|
11
|
+
filename: string;
|
|
12
|
+
mimeType: string;
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
/** The text of a valid copy request, checked here rather than trusted. */
|
|
16
|
+
export declare function copyRequestText(params: unknown): string | undefined;
|
|
17
|
+
/** A safe name with the extension of its type; never a path. */
|
|
18
|
+
export declare function sanitizeFilename(name: string, mimeType: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* The file of a valid `ui/download-file` request: exactly one embedded text
|
|
21
|
+
* resource of an allowed type and size. Links and binary content are refused.
|
|
22
|
+
*/
|
|
23
|
+
export declare function downloadRequestFile(params: unknown): DownloadFile | undefined;
|
|
24
|
+
/** Whether the browser accepted the write; it may refuse a stale gesture. */
|
|
25
|
+
export declare function writeClipboard(text: string): Promise<boolean>;
|
|
26
|
+
/** Starts the browser download; whether the file is saved is up to it. */
|
|
27
|
+
export declare function startDownload(file: DownloadFile, doc?: Document): void;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import type { DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
|
|
2
2
|
import type { WebShellComposerTag } from '../customization';
|
|
3
|
-
import type { InlineTagPlacement } from './useComposerCore';
|
|
3
|
+
import type { InlineTagPlacement, PendingComposerDraftReferences } from './useComposerCore';
|
|
4
4
|
import { type ComposerDraftAttachments, type ComposerDraftAttachmentStore } from './composer-draft-attachments';
|
|
5
5
|
export interface ComposerDraftContent {
|
|
6
6
|
text: string;
|
|
7
7
|
inlineTags: InlineTagPlacement[];
|
|
8
8
|
tags: WebShellComposerTag[];
|
|
9
9
|
inputAnnotations: DaemonInputAnnotation[];
|
|
10
|
+
pendingCustomReferences?: PendingComposerDraftReferences;
|
|
10
11
|
}
|
|
11
|
-
type
|
|
12
|
-
|
|
12
|
+
export type ComposerDraftChange = 'content' | 'attachments' | 'clear' | {
|
|
13
|
+
addedReferences: InlineTagPlacement[];
|
|
14
|
+
};
|
|
15
|
+
type Listener = (change: ComposerDraftChange) => void;
|
|
13
16
|
export declare function findComposerDraftSession(key: string | undefined): ComposerDraftSession | undefined;
|
|
14
17
|
export declare function getComposerDraftSession(key: string, content: ComposerDraftContent, store: ComposerDraftAttachmentStore | null): ComposerDraftSession;
|
|
15
18
|
export declare class ComposerDraftSession {
|
|
@@ -32,6 +35,7 @@ export declare class ComposerDraftSession {
|
|
|
32
35
|
private release;
|
|
33
36
|
private emit;
|
|
34
37
|
setContent(content: ComposerDraftContent, source?: Listener): void;
|
|
38
|
+
resolveCustomReferences(addedReferences: InlineTagPlacement[]): void;
|
|
35
39
|
private persist;
|
|
36
40
|
setAttachments(attachments: ComposerDraftAttachments, clear?: boolean): void;
|
|
37
41
|
restoreAttachments(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode, type ClipboardEventHandler, type DragEventHandler } from 'react';
|
|
2
2
|
import { EditorView } from '@codemirror/view';
|
|
3
|
-
import { Compartment } from '@codemirror/state';
|
|
3
|
+
import { Compartment, type ChangeDesc } from '@codemirror/state';
|
|
4
4
|
import type { CommandInfo } from '../adapters/types';
|
|
5
5
|
import type { PromptFile, PromptImage } from '../adapters/promptTypes';
|
|
6
6
|
import type { UseDaemonFollowupSuggestionReturn } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
@@ -150,6 +150,19 @@ export interface UseComposerCoreOptions {
|
|
|
150
150
|
editorTheme: Parameters<typeof EditorView.theme>[0];
|
|
151
151
|
}
|
|
152
152
|
export declare function getComposerDraftStorageKey(sessionId: string | undefined, workspaceCwd: string | undefined): string | undefined;
|
|
153
|
+
interface ComposerReferenceDraft {
|
|
154
|
+
text: string;
|
|
155
|
+
inlineTags: InlineTagPlacement[];
|
|
156
|
+
tags: WebShellComposerTag[];
|
|
157
|
+
}
|
|
158
|
+
type DraftReferenceRange = Pick<InlineTagPlacement, 'start' | 'end'>;
|
|
159
|
+
type StoredComposerReferenceDraft = ComposerReferenceDraft & {
|
|
160
|
+
customInlineRanges?: DraftReferenceRange[];
|
|
161
|
+
};
|
|
162
|
+
export interface PendingComposerDraftReferences {
|
|
163
|
+
draft: StoredComposerReferenceDraft;
|
|
164
|
+
changes?: ChangeDesc;
|
|
165
|
+
}
|
|
153
166
|
export declare function captureComposerDraftGuard(storageKey: string | undefined): () => boolean;
|
|
154
167
|
export declare function clearComposerDraftIfMatches(storageKey: string | undefined, text: string): void;
|
|
155
168
|
export interface SearchState {
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
export declare function getPromptHistoryStorageKey(workspaceCwd?: string): string;
|
|
2
|
+
export declare function getShellHistoryStorageKey(workspaceCwd?: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Merges local entries with authoritative daemon entries (both oldest-to-newest).
|
|
5
|
+
* Keeps unique local-only entries first so pre-existing browser history is not
|
|
6
|
+
* lost, then appends canonical server entries at the newest tail.
|
|
7
|
+
*/
|
|
8
|
+
export declare function mergeRemoteInputHistory(localEntries: readonly string[], remoteEntries: readonly string[], previousRemoteEntries?: readonly string[] | null): string[];
|
|
2
9
|
export declare function pushInputHistoryEntry(storageKey: string, text: string, fallbackStorageKey?: string): void;
|
|
3
|
-
export declare function useInputHistory(storageKey?: string, fallbackStorageKey?: string): {
|
|
10
|
+
export declare function useInputHistory(storageKey?: string, fallbackStorageKey?: string, remoteHistoryEnabled?: boolean): {
|
|
4
11
|
push: (text: string) => void;
|
|
12
|
+
applyRemoteEntries: (remoteEntries: readonly string[], expectedMutationVersion?: number, remoteRevision?: string) => boolean;
|
|
13
|
+
getMutationVersion: () => number;
|
|
5
14
|
navigateUp: (currentText: string) => string | null;
|
|
6
15
|
navigateDown: () => string | null;
|
|
16
|
+
endNavigation: () => string | null;
|
|
7
17
|
isNavigating: () => boolean;
|
|
8
18
|
reset: () => void;
|
|
9
19
|
searchReverse: (query: string) => string | null;
|
|
@@ -30,6 +30,7 @@ export declare function useScopedSessions(workspaceCwd: string | undefined, opti
|
|
|
30
30
|
workspaceCwd?: string;
|
|
31
31
|
sessionContext?: import("@qwen-code/web-shell/daemon-react-sdk").DaemonProductSessionContext;
|
|
32
32
|
artifactCountHint?: number;
|
|
33
|
+
restoredSession?: import("@qwen-code/sdk/daemon").DaemonSessionClient;
|
|
33
34
|
}) => Promise<void>) | undefined;
|
|
34
35
|
resumeSession: ((sessionId: string, options?: {
|
|
35
36
|
workspaceCwd?: string;
|
|
@@ -105,6 +105,7 @@ export declare function useWebShellSessions(options?: WebShellSessionsOptions):
|
|
|
105
105
|
workspaceCwd?: string;
|
|
106
106
|
sessionContext?: import("@qwen-code/web-shell/daemon-react-sdk").DaemonProductSessionContext;
|
|
107
107
|
artifactCountHint?: number;
|
|
108
|
+
restoredSession?: import("@qwen-code/sdk/daemon").DaemonSessionClient;
|
|
108
109
|
}) => Promise<void>) | undefined;
|
|
109
110
|
resumeSession: ((sessionId: string, options?: {
|
|
110
111
|
workspaceCwd?: string;
|