@qwen-code/web-shell 0.26.2-preview.1 → 0.26.3-nightly.20261028.ca204559a7
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/README.md +39 -2
- package/dist/{PierreFilePreview-Cf76KkJc.js → PierreFilePreview-gL1oCaFW.js} +1 -1
- package/dist/{SpreadsheetPreview-BXxrs6FZ.js → SpreadsheetPreview-CUn1GBWK.js} +2 -2
- package/dist/{WorkspaceFileBrowser-Cfi_Fx8Q.js → WorkspaceFileBrowser-CRQ4kvpc.js} +2 -2
- package/dist/{agents-route-Dc73Pt04.js → agents-route-BnbsQlQd.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-DjRVj9L_.js → index--8imD68R.js} +61948 -60550
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/transcript.js +8297 -8129
- package/dist/types/App.d.ts +3 -1
- package/dist/types/adapters/messageTypes.d.ts +9 -0
- package/dist/types/components/autofixPr/AutofixPrWatchSummary.d.ts +30 -0
- package/dist/types/components/composer/AddMenu.d.ts +2 -1
- package/dist/types/components/dialogs/AutofixPrWatchesDialog.d.ts +27 -0
- package/dist/types/components/dialogs/ScheduledTasksDialog.d.ts +9 -3
- package/dist/types/components/messages/McpApp.d.ts +8 -1
- package/dist/types/components/messages/SettingsMessage.d.ts +2 -1
- package/dist/types/components/sidebar/SessionRenameEditor.d.ts +20 -0
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +7 -2
- package/dist/types/components/sidebar/WorkspaceSection.d.ts +10 -1
- package/dist/types/components/sidebar/sessionTree.d.ts +37 -0
- package/dist/types/components/sidebar/useSessionTree.d.ts +19 -0
- package/dist/types/customization.d.ts +1 -0
- package/dist/types/daemon/index.d.ts +1 -1
- package/dist/types/daemon/session/actions.d.ts +3 -1
- package/dist/types/daemon/session/types.d.ts +14 -1
- package/dist/types/daemon/workspace/index.d.ts +1 -1
- package/dist/types/daemon/workspace/types.d.ts +71 -0
- package/dist/types/daemon-react-sdk.d.ts +4 -0
- package/dist/types/generated-ui/GeneratedUiRuntimeProvider.d.ts +12 -0
- package/dist/types/generated-ui/instance-store.d.ts +92 -0
- package/dist/types/hooks/useAutofixPrWatches.d.ts +25 -0
- package/dist/types/mcpAppHostContext.d.ts +27 -1
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
- package/dist/types/session-catalog/session-catalog-store.d.ts +20 -0
- package/dist/types/settings.d.ts +1 -1
- package/dist/types/utils/autofixPrWatches.d.ts +45 -0
- package/dist/types/utils/navigationUrl.d.ts +1 -1
- package/dist/types/utils/sessionTitleFromPrompt.d.ts +11 -0
- package/dist/{useDaemonMidTurnInjected-DY7azBbC.js → useDaemonMidTurnInjected-Du9Zxaez.js} +5988 -5628
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { ContextType } from 'react';
|
|
2
|
+
import type { McpAppDisplay } from '../components/messages/McpApp';
|
|
3
|
+
import type { McpAppGeneratedUi, McpAppGeneratedUiInvalidation, McpAppGeneratedUiOwnerSource, McpAppMessages, McpAppToolsContext } from '../mcpAppHostContext';
|
|
4
|
+
export declare const MAX_PARKED_INSTANCES = 4;
|
|
5
|
+
export declare const PARKED_INSTANCE_TTL: number;
|
|
6
|
+
export declare const MAX_INSTANCE_RECORDS = 128;
|
|
7
|
+
type ToolHost = NonNullable<ContextType<typeof McpAppToolsContext>>;
|
|
8
|
+
export interface InstanceHost {
|
|
9
|
+
source: McpAppGeneratedUiOwnerSource;
|
|
10
|
+
receipt: McpAppGeneratedUi;
|
|
11
|
+
tools?: ToolHost;
|
|
12
|
+
messages?: McpAppMessages;
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
}
|
|
15
|
+
export interface InstanceSlot extends InstanceHost {
|
|
16
|
+
key: string;
|
|
17
|
+
resourceKey: string;
|
|
18
|
+
display: McpAppDisplay;
|
|
19
|
+
element: HTMLElement;
|
|
20
|
+
token: object;
|
|
21
|
+
visible: boolean;
|
|
22
|
+
reset(): void;
|
|
23
|
+
}
|
|
24
|
+
interface Lease {
|
|
25
|
+
generation: number;
|
|
26
|
+
controller: AbortController;
|
|
27
|
+
owner: ReturnType<McpAppGeneratedUiOwnerSource['captureOwner']>;
|
|
28
|
+
host: InstanceHost;
|
|
29
|
+
reset(): void;
|
|
30
|
+
}
|
|
31
|
+
export interface GeneratedUiInstance {
|
|
32
|
+
id: number;
|
|
33
|
+
key: string;
|
|
34
|
+
scopeId: string;
|
|
35
|
+
sessionId: string;
|
|
36
|
+
resourceKey: string;
|
|
37
|
+
display: McpAppDisplay;
|
|
38
|
+
baseUrl: string;
|
|
39
|
+
container: HTMLDivElement;
|
|
40
|
+
canCallTool: boolean;
|
|
41
|
+
canMessage: boolean;
|
|
42
|
+
token?: object;
|
|
43
|
+
lease?: Lease;
|
|
44
|
+
leaseGeneration?: number;
|
|
45
|
+
parkedAt?: number;
|
|
46
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
47
|
+
tools: ToolHost;
|
|
48
|
+
messages: McpAppMessages;
|
|
49
|
+
runtime: {
|
|
50
|
+
reopened: boolean;
|
|
51
|
+
getSignal(): AbortSignal;
|
|
52
|
+
isVisible(): boolean;
|
|
53
|
+
reset(): void;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
interface InstanceRecord {
|
|
57
|
+
scopeId: string;
|
|
58
|
+
sessionId: string;
|
|
59
|
+
entry?: GeneratedUiInstance;
|
|
60
|
+
reason?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function instanceKey(source: McpAppGeneratedUiOwnerSource, toolId: string, display: McpAppDisplay): string;
|
|
63
|
+
export declare function resourceKey(display: McpAppDisplay, eventEpoch?: string, capabilities?: {
|
|
64
|
+
tools: boolean;
|
|
65
|
+
messages: boolean;
|
|
66
|
+
}): string;
|
|
67
|
+
export declare class GeneratedUiInstanceStore {
|
|
68
|
+
private records;
|
|
69
|
+
private listeners;
|
|
70
|
+
private version;
|
|
71
|
+
private generation;
|
|
72
|
+
private snapshot;
|
|
73
|
+
private revoked;
|
|
74
|
+
private parkingHosts;
|
|
75
|
+
parking?: HTMLElement;
|
|
76
|
+
registerParking(element: HTMLElement): () => void;
|
|
77
|
+
subscribe: (listener: () => void) => () => void;
|
|
78
|
+
getVersion: () => number;
|
|
79
|
+
getEntries: () => GeneratedUiInstance[];
|
|
80
|
+
getRecord: (key: string) => InstanceRecord | undefined;
|
|
81
|
+
private changed;
|
|
82
|
+
private current;
|
|
83
|
+
private revoke;
|
|
84
|
+
private grant;
|
|
85
|
+
attach(slot: InstanceSlot, explicit?: boolean): GeneratedUiInstance | undefined;
|
|
86
|
+
update(slot: InstanceSlot): void;
|
|
87
|
+
release(key: string, token: object): void;
|
|
88
|
+
dispose(key: string, reason: string): void;
|
|
89
|
+
invalidate: (event: McpAppGeneratedUiInvalidation) => void;
|
|
90
|
+
clear(): void;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type DaemonAutofixPrWatchList } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
7
|
+
/** A watch moves when a gate fires or a round runs: minutes, not seconds. */
|
|
8
|
+
export declare const AUTOFIX_PR_WATCHES_RELOAD_MS = 15000;
|
|
9
|
+
/** The key a workspace's list is under: its id, or '' for the primary. */
|
|
10
|
+
export declare function autofixPrWatchesKey(workspaceId: string | undefined): string;
|
|
11
|
+
export interface AutofixPrWatchesState {
|
|
12
|
+
/** Each workspace's watches, by `autofixPrWatchesKey`; missing while it
|
|
13
|
+
* loads or when it failed. */
|
|
14
|
+
lists: ReadonlyMap<string, DaemonAutofixPrWatchList>;
|
|
15
|
+
/** The first workspace that failed, if any. */
|
|
16
|
+
error: string | null;
|
|
17
|
+
loaded: boolean;
|
|
18
|
+
reload: () => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `/autofix-pr` watches of the given workspaces (`undefined` is the
|
|
22
|
+
* primary), polled on a slow lane while `enabled`. One workspace failing
|
|
23
|
+
* keeps the others.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAutofixPrWatches(enabled: boolean, workspaceIds: ReadonlyArray<string | undefined>): AutofixPrWatchesState;
|
|
@@ -24,7 +24,33 @@ export interface McpAppGeneratedUi {
|
|
|
24
24
|
status: NonNullable<DaemonSession['generatedUi']>;
|
|
25
25
|
}
|
|
26
26
|
export declare const McpAppGeneratedUiContext: import("react").Context<McpAppGeneratedUi | undefined>;
|
|
27
|
-
export
|
|
27
|
+
export interface McpAppGeneratedUiOwnerSource {
|
|
28
|
+
scopeId: string;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
clientId: string;
|
|
31
|
+
workspaceCwd: string;
|
|
32
|
+
eventEpoch?: string;
|
|
33
|
+
captureOwner(): {
|
|
34
|
+
isCurrent(): boolean;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface McpAppGeneratedUiInvalidation {
|
|
38
|
+
scopeId: string;
|
|
39
|
+
sessionId?: string;
|
|
40
|
+
reason: 'policy' | 'epoch' | 'runtime-stopped' | 'cleared' | 'deleted' | 'rewound' | 'auth-failed' | 'scope-changed';
|
|
41
|
+
}
|
|
42
|
+
export interface McpAppGeneratedUiOwner {
|
|
43
|
+
scopeId: string;
|
|
44
|
+
workspaceCwd?: string;
|
|
45
|
+
source?: McpAppGeneratedUiOwnerSource;
|
|
46
|
+
subscribeInvalidation(listener: (event: McpAppGeneratedUiInvalidation) => void): () => void;
|
|
47
|
+
invalidate(event: McpAppGeneratedUiInvalidation): void;
|
|
48
|
+
captureSessionDeletion(workspaceCwd: string | undefined): (sessionIds: readonly string[]) => void;
|
|
49
|
+
}
|
|
50
|
+
export declare const McpAppGeneratedUiOwnerContext: import("react").Context<McpAppGeneratedUiOwner | undefined>;
|
|
51
|
+
export declare const McpAppVisibilityContext: import("react").Context<boolean>;
|
|
52
|
+
export declare function isBuiltInGeneratedUi(display?: {
|
|
28
53
|
resourceUri: string;
|
|
29
54
|
requiredFeature?: 'generated-ui';
|
|
30
55
|
}): boolean;
|
|
56
|
+
export declare function useMcpAppAdmission(display?: Parameters<typeof isBuiltInGeneratedUi>[0]): boolean;
|
|
@@ -76,6 +76,7 @@ export declare function useSessionCatalogController(client: DaemonClient): {
|
|
|
76
76
|
promptAdmitted(workspaceCwd: string, sessionId: string): void;
|
|
77
77
|
promptAdmissionUncertain(workspaceCwd: string): void;
|
|
78
78
|
renamed(workspaceCwd: string, sessionId: string, displayName: string): void;
|
|
79
|
+
setPendingSessionTitle(workspaceCwd: string, sessionId: string, displayName: string): void;
|
|
79
80
|
toggleSessionPinned(workspaceCwd: string, session: DaemonSessionSummary, toggle: {
|
|
80
81
|
pinned: boolean;
|
|
81
82
|
pinnedAt?: string;
|
|
@@ -34,6 +34,12 @@ export declare function getSessionCatalogQueryKey(query: SessionCatalogQuery): s
|
|
|
34
34
|
export declare class SessionCatalogStore {
|
|
35
35
|
private readonly client;
|
|
36
36
|
private readonly entries;
|
|
37
|
+
/**
|
|
38
|
+
* Prompt-derived titles for sessions whose rename has not landed yet.
|
|
39
|
+
* Applied to every published page so periodic and in-flight catalog reads
|
|
40
|
+
* cannot surface the session-id fallback first.
|
|
41
|
+
*/
|
|
42
|
+
private readonly pendingSessionTitles;
|
|
37
43
|
private readonly queue;
|
|
38
44
|
private readonly trailingRefreshTimers;
|
|
39
45
|
private readonly liveStateWorkspaceUsers;
|
|
@@ -83,6 +89,18 @@ export declare class SessionCatalogStore {
|
|
|
83
89
|
interactive?: boolean;
|
|
84
90
|
}): void;
|
|
85
91
|
patchSession(workspaceCwd: string, sessionId: string, patch: Partial<Omit<DaemonSessionSummary, 'sessionId' | 'workspaceCwd'>>): void;
|
|
92
|
+
/**
|
|
93
|
+
* Record a prompt-derived title for a session whose rename is still in
|
|
94
|
+
* flight. Every subsequent page (poll, in-flight load, live merge) gets the
|
|
95
|
+
* title until the daemon reports a real custom title, so no read can publish
|
|
96
|
+
* the session-id fallback first.
|
|
97
|
+
*/
|
|
98
|
+
setPendingSessionTitle(workspaceCwd: string, sessionId: string, displayName: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Drop a pending prompt title once a real rename lands (or the session is
|
|
101
|
+
* closed), so a later catalog page cannot revive the provisional label.
|
|
102
|
+
*/
|
|
103
|
+
clearPendingSessionTitle(workspaceCwd: string, sessionId: string): void;
|
|
86
104
|
/**
|
|
87
105
|
* Apply a pin toggle optimistically to every loaded page of the workspace,
|
|
88
106
|
* so the store owns the optimistic state's lifetime (the R5-1 fix
|
|
@@ -132,6 +150,8 @@ export declare class SessionCatalogStore {
|
|
|
132
150
|
private resolveWaiters;
|
|
133
151
|
private rejectWaiters;
|
|
134
152
|
private setSnapshot;
|
|
153
|
+
private applyPendingSessionTitles;
|
|
154
|
+
private applyPendingSessionTitlesToPage;
|
|
135
155
|
private resetPollSchedule;
|
|
136
156
|
private schedulePollFromNow;
|
|
137
157
|
private scheduleEntryTimer;
|
package/dist/types/settings.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare const SETTING_KEYS: {
|
|
|
66
66
|
readonly 'setting:voice-model': "voiceModel";
|
|
67
67
|
readonly 'setting:image-model': "imageModel";
|
|
68
68
|
};
|
|
69
|
-
declare const BUILTIN_IDS: readonly ["builtin:chat-width", "builtin:browser-notifications", "builtin:live-setup", "builtin:local-control", "builtin:connections", "builtin:workspace-directories", "builtin:model-management"];
|
|
69
|
+
declare const BUILTIN_IDS: readonly ["builtin:chat-width", "builtin:browser-notifications", "builtin:live-setup", "builtin:local-control", "builtin:connections", "builtin:archived-sessions", "builtin:workspace-directories", "builtin:model-management"];
|
|
70
70
|
export type WebShellSettingItemId = keyof typeof SETTING_KEYS | (typeof BUILTIN_IDS)[number];
|
|
71
71
|
export declare const WEB_SHELL_SETTING_ITEM_IDS: readonly WebShellSettingItemId[];
|
|
72
72
|
export interface WebShellSettingsOptions {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonAutofixPrWatch } from '../daemon/workspace/types';
|
|
7
|
+
/** What the prompt of a watch's scheduled task names (`qwen autofix-pr
|
|
8
|
+
* schedule` writes `Run /autofix-pr tick <owner>/<repo>#<n> [--task <id>]…`). */
|
|
9
|
+
export interface AutofixPrTick {
|
|
10
|
+
/** `<owner>/<repo>`. */
|
|
11
|
+
repo: string;
|
|
12
|
+
pr: number;
|
|
13
|
+
task?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function parseAutofixPrTick(prompt: string): AutofixPrTick | null;
|
|
16
|
+
/**
|
|
17
|
+
* The watch a scheduled task drives, among the watches of its workspace's
|
|
18
|
+
* clone. `stale` as the task's gate judges it: the watch ended, records no
|
|
19
|
+
* task where the task has an id, or records another task — one a later
|
|
20
|
+
* `schedule` replaced. Such a task stops at its next fire.
|
|
21
|
+
*/
|
|
22
|
+
export declare function watchOfTask(prompt: string, watches: readonly DaemonAutofixPrWatch[] | undefined): {
|
|
23
|
+
watch: DaemonAutofixPrWatch;
|
|
24
|
+
stale: boolean;
|
|
25
|
+
} | null;
|
|
26
|
+
/** Where a watch is, the first that holds in this order. */
|
|
27
|
+
export type AutofixPrWatchPhase =
|
|
28
|
+
/** The gate saw the PR merged or closed: only a cleanup is left. */
|
|
29
|
+
'merged' | 'closed'
|
|
30
|
+
/** A `cleanup` that kept the worktree ended it. */
|
|
31
|
+
| 'ended'
|
|
32
|
+
/** No task drives it: a `--once` check's state, or a watch whose
|
|
33
|
+
* scheduling did not finish. */
|
|
34
|
+
| 'unscheduled'
|
|
35
|
+
/** A fix agent works in the background, or its round has yet to claim it. */
|
|
36
|
+
| 'fixing'
|
|
37
|
+
/** A background fix its session left behind: the next round redoes it. */
|
|
38
|
+
| 'abandonedFix'
|
|
39
|
+
/** Its gate checked the PR within two intervals. */
|
|
40
|
+
| 'watching'
|
|
41
|
+
/** No check that recent: its session is gone or not running its task. */
|
|
42
|
+
| 'idle';
|
|
43
|
+
export declare function watchPhase(watch: DaemonAutofixPrWatch): AutofixPrWatchPhase;
|
|
44
|
+
/** What stops a watch in the session that owns it, as a user types it. */
|
|
45
|
+
export declare function stopCommand(watch: DaemonAutofixPrWatch): string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2026 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export declare const WEB_SHELL_PAGES: readonly ["plugins", "channels", "live", "scheduled-tasks", "goals", "settings"];
|
|
6
|
+
export declare const WEB_SHELL_PAGES: readonly ["plugins", "channels", "live", "scheduled-tasks", "pr-watches", "goals", "settings"];
|
|
7
7
|
export type WebShellPage = (typeof WEB_SHELL_PAGES)[number];
|
|
8
8
|
export interface SessionUrlTarget {
|
|
9
9
|
sessionId?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive a session title from the first prompt when the prompt itself is
|
|
3
|
+
* already a usable short title. Returns undefined for anything the fast-model
|
|
4
|
+
* title should handle instead: multi-line prompts, long prompts, and a bare
|
|
5
|
+
* slash command with no arguments.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately lighter than core's `sanitizeTitle`: this runs in the browser
|
|
8
|
+
* bundle, which must not pull in the model client. Keep the trailing
|
|
9
|
+
* punctuation class in sync with that helper.
|
|
10
|
+
*/
|
|
11
|
+
export declare function titleFromPrompt(text: string): string | undefined;
|