@qwen-code/web-shell 0.25.1-preview.1 → 0.25.1-preview.2

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.
Files changed (28) hide show
  1. package/dist/{agents-route-DAa1HKQE.js → agents-route-B3FonPY-.js} +2 -2
  2. package/dist/daemon-react-sdk.js +1 -1
  3. package/dist/{index-zUj3SlrB.js → index-BPRuZpl-.js} +45926 -45076
  4. package/dist/index.js +3 -3
  5. package/dist/sw.js +1 -1
  6. package/dist/{toolNames-B_KiYcXs.js → toolNames-CusX912Z.js} +1375 -1334
  7. package/dist/transcript.js +3775 -3757
  8. package/dist/types/components/ChatEditor.d.ts +4 -7
  9. package/dist/types/components/WorkspaceSelector.d.ts +9 -1
  10. package/dist/types/components/artifacts/artifactUtils.d.ts +9 -0
  11. package/dist/types/components/managed/generated/managed-agent-api.d.ts +74 -17
  12. package/dist/types/components/managed/use-managed-actions.d.ts +6 -5
  13. package/dist/types/components/sidebar/WebShellSidebar.d.ts +7 -1
  14. package/dist/types/components/sidebar/WorkspaceSection.d.ts +9 -1
  15. package/dist/types/components/workspaces/HostLabel.d.ts +8 -0
  16. package/dist/types/components/workspaces/WorkspaceHostProjects.d.ts +11 -4
  17. package/dist/types/components/workspaces/WorkspaceLocation.d.ts +4 -1
  18. package/dist/types/config/daemon-target.d.ts +76 -0
  19. package/dist/types/config/daemon.d.ts +16 -0
  20. package/dist/types/config/host-fanout.d.ts +53 -0
  21. package/dist/types/config/remote-connections.d.ts +3 -0
  22. package/dist/types/config/workspace-hosts.d.ts +7 -0
  23. package/dist/types/trajectory/types.d.ts +1 -0
  24. package/dist/types/trajectory/useTrajectoryWindow.d.ts +21 -36
  25. package/dist/types/trajectory/window-messages.d.ts +9 -0
  26. package/dist/types/trajectory/window-messages.transcript-stub.d.ts +7 -0
  27. package/dist/types/utils/workspace.d.ts +10 -0
  28. package/package.json +1 -1
@@ -1,11 +1,18 @@
1
1
  import type { DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
2
2
  export declare const WorkspaceHostsEnabled: import("react").Context<boolean>;
3
+ export declare const WORKSPACE_HOSTS_CHANGE_EVENT = "qwen-workspace-hosts";
3
4
  export interface WorkspaceHost {
4
5
  origin: string;
5
6
  workspaces: Pick<DaemonWorkspaceCapability, 'id' | 'cwd' | 'displayName'>[];
6
7
  }
7
8
  export declare function readWorkspaceHosts(): WorkspaceHost[];
8
9
  export declare function rememberWorkspaceHost(origin: string, workspaces: WorkspaceHost['workspaces']): void;
10
+ /**
11
+ * Drop a host from the saved workspace catalog, e.g. when its connection is
12
+ * removed from Settings: the fan-out group must disappear in the same tab,
13
+ * not just on the next load.
14
+ */
15
+ export declare function forgetWorkspaceHost(origin: string): void;
9
16
  /** Saved hosts, kept in sync with catalog updates from this and other tabs. */
10
17
  export declare function useWorkspaceHosts(): WorkspaceHost[];
11
18
  export declare function openHostedWorkspace(origin: string, workspaceId?: string): void;
@@ -82,6 +82,7 @@ export interface TrajectoryRequestRow extends TrajectoryRowBase {
82
82
  /** Folded from the round's assistant block; absent when none carried it. */
83
83
  usage?: DaemonTurnUsage;
84
84
  recordId?: string;
85
+ executionId?: string;
85
86
  responseId?: string;
86
87
  promptId?: string;
87
88
  /** Set when a subagent issued the request. */
@@ -59,55 +59,40 @@ export type TrajectoryWindowFailure = {
59
59
  } | {
60
60
  kind: 'unreadable';
61
61
  message: string;
62
+ } | {
63
+ kind: 'expired' | 'protocol' | 'budget';
62
64
  };
65
+ export declare const TRAJECTORY_BOOKMARK_LIMIT = 64;
66
+ export declare const TRAJECTORY_CURSOR_BUDGET: number;
63
67
  export interface TrajectoryWindow {
64
68
  trajectory: Trajectory | undefined;
65
69
  status: 'idle' | 'loading' | 'ready' | 'error';
66
- /**
67
- * The newest page could not be read. The window already on screen, if any,
68
- * is kept.
69
- */
70
70
  error?: TrajectoryWindowFailure;
71
- /**
72
- * Pages read so far by the load under way, or held by the window once it
73
- * is ready. What the placeholder counts while the walk back is running.
74
- */
75
71
  loadedPages: number;
76
- /**
77
- * The session has history older than the window: the walk stopped at the
78
- * page cap, at a page the daemon gave no cursor for, or at an older page it
79
- * could not read.
80
- */
72
+ windowPages: number;
81
73
  truncated: boolean;
82
- /**
83
- * An older page could not be read, so the window stops just after it. The
84
- * newer pages are drawn; `refresh` is the retry.
85
- */
86
74
  olderFailure?: TrajectoryWindowFailure;
87
- /** Read the window again from the newest page. Also every retry. */
75
+ navigationError?: TrajectoryWindowFailure;
76
+ mode: 'latest' | 'history';
77
+ navigationVersion: number;
78
+ canRefresh: boolean;
79
+ canOlder: boolean;
80
+ canNewer: boolean;
81
+ historyReleased: boolean;
82
+ bookmarks: number;
88
83
  refresh: () => void;
84
+ older: () => void;
85
+ newer: () => void;
86
+ retry: () => void;
89
87
  }
90
88
  /**
91
- * Hold a window of one session's transcript and fold it into a trajectory.
92
- *
93
- * The pages are this view's own: paged replay is the only path that emits
94
- * timing frames, and the chat store is fed by the live stream and by bulk
95
- * replay, neither of which carries them. Reading here also keeps the window
96
- * contiguous by construction, which is what lets the projection pair a frame
97
- * with what it measured.
98
- *
99
- * A load walks back from the newest page by cursor, up to the page cap, and
100
- * the window lands once, whole, when the walk ends. Nothing is ever put in
101
- * front of rows already drawn: a list that grew upwards under the reader would
102
- * have to move its scroll offset, its keys, its selection and its focus in
103
- * step, and no part of that is observable outside a real browser.
104
- *
105
- * `refresh` rebuilds the window from the newest page rather than splicing into
106
- * it: page boundaries are chosen per request, so a fresh page and the held
107
- * ones overlap by an unknown amount and cannot be joined without dropping or
108
- * repeating records.
89
+ * Windows are contiguous cursor walks, committed whole. Only bookmarks survive
90
+ * a switch: replaying a saved cursor stays in its snapshot, whereas a read
91
+ * without one explicitly returns to the latest snapshot.
109
92
  */
110
93
  export declare function useTrajectoryWindow(loadPage: TrajectoryPageLoader | undefined, options?: {
111
94
  pageSize?: number;
112
95
  maxPages?: number;
96
+ bookmarkLimit?: number;
97
+ cursorBudget?: number;
113
98
  }): TrajectoryWindow;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ type WindowMessage = string | ((vars?: Record<string, string | number>) => string);
7
+ export declare const TRAJECTORY_WINDOW_MESSAGES_EN: Record<string, WindowMessage>;
8
+ export declare const TRAJECTORY_WINDOW_MESSAGES_ZH: Record<string, WindowMessage>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare const TRAJECTORY_WINDOW_MESSAGES_EN: {};
7
+ export declare const TRAJECTORY_WINDOW_MESSAGES_ZH: {};
@@ -14,6 +14,16 @@ export declare function workspaceBasename(cwd: string): string;
14
14
  export declare function sshWorkspaceLabel(ssh: NonNullable<DaemonWorkspaceCapability['ssh']>): string;
15
15
  export declare function workspaceLabel(workspace: Pick<DaemonWorkspaceCapability, 'cwd' | 'displayName' | 'ssh'>): string;
16
16
  export declare function workspaceLabelForCwd(cwd: string, workspaces: readonly Pick<DaemonWorkspaceCapability, 'cwd' | 'displayName' | 'ssh'>[] | undefined): string;
17
+ /**
18
+ * Suffix the parent directory onto labels that collide inside one list.
19
+ * Two daemons — or one daemon with two checkouts — frequently register the
20
+ * same basename (`qwen-code` everywhere); the menu must tell them apart by
21
+ * the workspace's own location, not only by tooltip or host badge.
22
+ */
23
+ export declare function disambiguateWorkspaceLabels<T extends {
24
+ label: string;
25
+ cwd: string;
26
+ }>(entries: readonly T[]): T[];
17
27
  /**
18
28
  * True when the daemon advertises more than one registered workspace — i.e. the
19
29
  * multi-workspace session surfaces (per-workspace labels/tags) should show.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/web-shell",
3
- "version": "0.25.1-preview.1",
3
+ "version": "0.25.1-preview.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/QwenLM/qwen-code.git",