dsh-git-worktree 0.7.2 → 0.7.4

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/lib/client.js CHANGED
@@ -33,8 +33,10 @@ let react_jsx_runtime = require("react/jsx-runtime");
33
33
  react_jsx_runtime = __toESM(react_jsx_runtime);
34
34
  let __deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
35
35
  __deepseek_ai_dsh_client_ui_primitives = __toESM(__deepseek_ai_dsh_client_ui_primitives);
36
- let __deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
37
- __deepseek_ai_dsh_client_runtime_client = __toESM(__deepseek_ai_dsh_client_runtime_client);
36
+ let __deepseek_ai_cordis = require("@deepseek-ai/cordis");
37
+ __deepseek_ai_cordis = __toESM(__deepseek_ai_cordis);
38
+ let __deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
39
+ __deepseek_ai_dsh_client_store = __toESM(__deepseek_ai_dsh_client_store);
38
40
 
39
41
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
40
42
  var _a$1;
@@ -9669,10 +9671,66 @@ const TARGET_CONSOLE_STYLES = String.raw`
9669
9671
  }
9670
9672
  `;
9671
9673
 
9674
+ //#endregion
9675
+ //#region src/client/index.tsx
9676
+ const WORKTREE_CONSOLE_ADAPTER_SERVICE = "worktreeConsole";
9677
+ /** Required client services. */
9678
+ const inject$1 = [
9679
+ "slots",
9680
+ "workspaces",
9681
+ "sessions",
9682
+ "conversation",
9683
+ "connection",
9684
+ "locale"
9685
+ ];
9686
+ function servicesOf(ctx) {
9687
+ return {
9688
+ workspaces: ctx.get("workspaces"),
9689
+ sessions: ctx.get("sessions"),
9690
+ conversation: ctx.get("conversation")
9691
+ };
9692
+ }
9693
+ /** Register replay-stable keyed rows and one scoped stylesheet. */
9694
+ function apply$1(ctx, adapterOverride) {
9695
+ const services = servicesOf(ctx);
9696
+ const adapter = adapterOverride ?? ctx.get(WORKTREE_CONSOLE_ADAPTER_SERVICE);
9697
+ ctx.effect(() => {
9698
+ const style = document.createElement("style");
9699
+ style.dataset.dshGitWorktree = "true";
9700
+ style.textContent = `${WORKTREE_STYLES}\n${TARGET_CONSOLE_STYLES}`;
9701
+ document.head.append(style);
9702
+ return () => {
9703
+ style.remove();
9704
+ };
9705
+ }, "dsh-git-worktree: styles");
9706
+ const CreateRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeCreateRow, {
9707
+ ...props,
9708
+ services
9709
+ });
9710
+ const ReviewRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeReviewRow, {
9711
+ ...props,
9712
+ services,
9713
+ adapter
9714
+ });
9715
+ ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
9716
+ name: "tool.call.toolview",
9717
+ key: "worktree_create"
9718
+ }, CreateRow));
9719
+ ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
9720
+ name: "tool.call.toolview",
9721
+ key: "worktree_ready_for_review"
9722
+ }, ReviewRow));
9723
+ if (adapter !== void 0) {
9724
+ registerTargetConsole({ slots: ctx.slots }, adapter, services);
9725
+ registerPreSessionWorktree({ slots: ctx.slots }, adapter, services);
9726
+ }
9727
+ }
9728
+
9672
9729
  //#endregion
9673
9730
  //#region \0virtual:dsh-official-workspace-client
9674
9731
  const modules = {
9675
- "@deepseek-ai/dsh-client-runtime/client": __deepseek_ai_dsh_client_runtime_client,
9732
+ "@deepseek-ai/cordis": __deepseek_ai_cordis,
9733
+ "@deepseek-ai/dsh-client-store": __deepseek_ai_dsh_client_store,
9676
9734
  "react/jsx-runtime": react_jsx_runtime,
9677
9735
  "react": react,
9678
9736
  "@deepseek-ai/dsh-client-ui-primitives": __deepseek_ai_dsh_client_ui_primitives
@@ -9681,10 +9739,158 @@ const official = ((require$1) => {
9681
9739
  var module$1 = { exports: {} };
9682
9740
  var exports$1 = module$1.exports;
9683
9741
  Object.defineProperty(exports$1, Symbol.toStringTag, { value: "Module" });
9684
- let _deepseek_ai_dsh_client_runtime_client = require$1("@deepseek-ai/dsh-client-runtime/client");
9742
+ let _deepseek_ai_cordis = require$1("@deepseek-ai/cordis");
9743
+ let _deepseek_ai_dsh_client_store = require$1("@deepseek-ai/dsh-client-store");
9685
9744
  let react_jsx_runtime$1 = require$1("react/jsx-runtime");
9686
9745
  let react$1 = require$1("react");
9687
9746
  let _deepseek_ai_dsh_client_ui_primitives = require$1("@deepseek-ai/dsh-client-ui-primitives");
9747
+ /** Workspace archive and directory UI capability. */
9748
+ /** Structured directory failure exposed to directory UI consumers. */
9749
+ var DirectoryBrowseError = class extends Error {
9750
+ rpcError;
9751
+ name = "DirectoryBrowseError";
9752
+ /** @param rpcError - Host directory business failure. */
9753
+ constructor(rpcError) {
9754
+ super(`directory browse failed: ${rpcError.code}: ${rpcError.message}`);
9755
+ this.rpcError = rpcError;
9756
+ }
9757
+ };
9758
+ /** Implements Workspace archive and directory UI operations. */
9759
+ var UiWorkspaceService = class extends _deepseek_ai_cordis.Service {
9760
+ directoryPicker;
9761
+ workspaces;
9762
+ sessions;
9763
+ connecting = /* @__PURE__ */ new Map();
9764
+ /**
9765
+ * @param ctx - Client root Context.
9766
+ * @param directoryPicker - the directory-picking Remote namespace.
9767
+ * @param workspaces - pure Workspace Controller.
9768
+ * @param sessions - pure Session Controller.
9769
+ */
9770
+ constructor(ctx, directoryPicker, workspaces, sessions) {
9771
+ super(ctx, "uiWorkspace");
9772
+ this.directoryPicker = directoryPicker;
9773
+ this.workspaces = workspaces;
9774
+ this.sessions = sessions;
9775
+ ctx.effect(() => this.watchNavigation(), "ui-workspace: Workspace navigation policy");
9776
+ }
9777
+ async connectWorkspace(workspaceId) {
9778
+ const workspace = this.workspaces.list.getSnapshot().items.find((item) => item.workspaceId === workspaceId);
9779
+ if (workspace === void 0) throw new Error(`uiWorkspace.connectWorkspace: unknown workspace ${workspaceId}`);
9780
+ const inflight = this.connecting.get(workspaceId);
9781
+ if (inflight !== void 0) return inflight;
9782
+ const archived = this.workspaces.list.getSnapshot().archivedSessionIds;
9783
+ const sessions = this.sessions.list.getSnapshot();
9784
+ for (const id of sessions.ids) {
9785
+ const summary = sessions.byId[id];
9786
+ if (summary !== void 0 && summary.blank && summary.cwd === workspace.path && workspace.sessionIds.includes(summary.id) && !archived.includes(summary.id)) return summary.id;
9787
+ }
9788
+ const attempt$1 = this.sessions.create({ workspaceId }).finally(() => {
9789
+ this.connecting.delete(workspaceId);
9790
+ });
9791
+ this.connecting.set(workspaceId, attempt$1);
9792
+ return attempt$1;
9793
+ }
9794
+ startSession(workspaceId) {
9795
+ const workspace = this.workspaces.list.getSnapshot();
9796
+ const sessions = this.sessions.list.getSnapshot();
9797
+ const current = sessions.current;
9798
+ const currentWorkspaceId = current === void 0 ? void 0 : workspace.items.find((item) => item.sessionIds.includes(current))?.workspaceId;
9799
+ const recent = workspace.phase === "ready" && sessions.phase === "ready" ? recentWorkspace(workspace.items, sessions.byId) : void 0;
9800
+ const target = workspaceId ?? currentWorkspaceId ?? recent;
9801
+ if (target === void 0) {
9802
+ this.sessions.clear();
9803
+ return;
9804
+ }
9805
+ this.connectWorkspace(target).then((sessionId) => {
9806
+ this.sessions.open(sessionId);
9807
+ }, (reason) => {
9808
+ console.warn("new session failed:", reason);
9809
+ });
9810
+ }
9811
+ async archiveSession(sessionId) {
9812
+ await this.workspaces.archiveSession(sessionId);
9813
+ }
9814
+ async pickDirectory() {
9815
+ const result = await this.directoryPicker.pick();
9816
+ if (!result.ok) throw new Error(`directory picker failed: ${result.error.message}`);
9817
+ return result.value;
9818
+ }
9819
+ async listDirectory(path, signal) {
9820
+ const result = await this.directoryPicker.list(path, signal);
9821
+ if (!result.ok) throw new DirectoryBrowseError(result.error);
9822
+ return result.value;
9823
+ }
9824
+ async createDirectory(path, name) {
9825
+ const result = await this.directoryPicker.createDirectory(path, name);
9826
+ if (!result.ok) throw new DirectoryBrowseError(result.error);
9827
+ return result.value;
9828
+ }
9829
+ watchNavigation() {
9830
+ let initial = "waiting";
9831
+ let disposed = false;
9832
+ const reconcile = () => {
9833
+ if (disposed) return;
9834
+ if (this.clearArchivedCurrent()) return;
9835
+ if (initial !== "waiting") return;
9836
+ const workspace = this.workspaces.list.getSnapshot();
9837
+ const sessions = this.sessions.list.getSnapshot();
9838
+ if (workspace.phase !== "ready" || sessions.phase !== "ready") return;
9839
+ if (sessions.current !== void 0) {
9840
+ initial = "done";
9841
+ return;
9842
+ }
9843
+ const target = recentWorkspace(workspace.items, sessions.byId);
9844
+ if (target === void 0) {
9845
+ initial = "done";
9846
+ return;
9847
+ }
9848
+ initial = "connecting";
9849
+ this.connectWorkspace(target).then((sessionId) => {
9850
+ if (disposed) return;
9851
+ if (this.sessions.list.getSnapshot().current === void 0) this.sessions.open(sessionId);
9852
+ initial = "done";
9853
+ }, (reason) => {
9854
+ if (disposed) return;
9855
+ initial = "waiting";
9856
+ console.warn("initial workspace selection failed:", reason);
9857
+ });
9858
+ };
9859
+ const disposeWorkspaces = this.workspaces.list.subscribe(reconcile);
9860
+ const disposeSessions = this.sessions.list.subscribe(reconcile);
9861
+ reconcile();
9862
+ return () => {
9863
+ disposed = true;
9864
+ disposeSessions();
9865
+ disposeWorkspaces();
9866
+ };
9867
+ }
9868
+ /** @returns true when an archived current selection was cleared. */
9869
+ clearArchivedCurrent() {
9870
+ const current = this.sessions.list.getSnapshot().current;
9871
+ if (current === void 0 || !this.workspaces.list.getSnapshot().archivedSessionIds.includes(current)) return false;
9872
+ this.sessions.clear();
9873
+ return true;
9874
+ }
9875
+ };
9876
+ /** Stable tie-breaking follows Host Workspace order. */
9877
+ function recentWorkspace(workspaces, sessions) {
9878
+ let selected;
9879
+ let selectedTime = Number.NEGATIVE_INFINITY;
9880
+ for (const workspace of workspaces) {
9881
+ let latest = Number.NEGATIVE_INFINITY;
9882
+ for (const sessionId of workspace.sessionIds) {
9883
+ const session = sessions[sessionId];
9884
+ if (session !== void 0) latest = Math.max(latest, session.updatedAt);
9885
+ }
9886
+ if (latest === Number.NEGATIVE_INFINITY) latest = Date.parse(workspace.createdAt);
9887
+ if (selected === void 0 || latest > selectedTime) {
9888
+ selected = workspace.workspaceId;
9889
+ selectedTime = latest;
9890
+ }
9891
+ }
9892
+ return selected;
9893
+ }
9688
9894
  /**
9689
9895
  * The workspace browser's viewing store: the session-list grouping mode,
9690
9896
  * persisted across reloads. Module level exports the factory only (a
@@ -9699,7 +9905,7 @@ const official = ((require$1) => {
9699
9905
  * @returns the store handle (spec + type + identity + factory in one).
9700
9906
  */
9701
9907
  function createWorkspaceViewStore() {
9702
- return (0, _deepseek_ai_dsh_client_runtime_client.defineStore)({
9908
+ return (0, _deepseek_ai_dsh_client_store.defineStore)({
9703
9909
  init: () => ({
9704
9910
  groupBy: "workspace",
9705
9911
  orderBy: "updated",
@@ -9747,18 +9953,78 @@ const official = ((require$1) => {
9747
9953
  for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
9748
9954
  return n;
9749
9955
  }
9750
- /** Display label for the ungrouped bucket row. */
9751
- const UNGROUPED_LABEL = "Ungrouped";
9956
+ /**
9957
+ * Browser-safe Workspace path and display helpers.
9958
+ * @module @deepseek-ai/dsh-util-workspace-path
9959
+ */
9960
+ /** Whether a path uses a Windows drive or UNC prefix. */
9961
+ function isWindowsStylePath(value) {
9962
+ return /^[A-Za-z]:[/\\]/.test(value) || value.startsWith("\\\\");
9963
+ }
9964
+ /**
9965
+ * Abbreviate a POSIX home directory for display.
9966
+ * @param path - Absolute or already-short display path.
9967
+ * @param home - Host account home; absent skips abbreviation.
9968
+ * @returns `~` or `~/…` for the POSIX home and its descendants, otherwise `path`.
9969
+ */
9970
+ function abbreviateHomePath(path, home) {
9971
+ if (home === void 0 || home === "") return path;
9972
+ if (isWindowsStylePath(path) || isWindowsStylePath(home)) return path;
9973
+ const root = home.replace(/\/+$/, "");
9974
+ if (root === "" || root === "/") return path;
9975
+ if (path.replace(/\/+$/, "") === root) return "~";
9976
+ if (path.startsWith(`${root}/`)) return `~${path.slice(root.length)}`;
9977
+ return path;
9978
+ }
9979
+ /**
9980
+ * Read the final non-empty segment of a Workspace path for display.
9981
+ * Workspace-label surfaces use this helper instead of deriving another basename.
9982
+ * @param path - Workspace directory path using POSIX or Windows separators.
9983
+ * @returns the final segment, or an empty string for a separator-only path.
9984
+ */
9985
+ function workspaceTitleOf(path) {
9986
+ const trimmed = path.replace(/[/\\]+$/, "");
9987
+ const separator = Math.max(trimmed.lastIndexOf("/"), trimmed.lastIndexOf("\\"));
9988
+ return trimmed.slice(separator + 1);
9989
+ }
9990
+ /** UI Workspace-owned projection of descendant counts from Session summaries. */
9991
+ /**
9992
+ * Index uninterrupted subagent descendants under each ancestor.
9993
+ * @param summaries - Session summaries keyed by id.
9994
+ * @returns descendant totals keyed by possible parent id.
9995
+ */
9996
+ function indexSubagentDescendants(summaries) {
9997
+ const indexed = /* @__PURE__ */ new Map();
9998
+ for (const descendant of Object.values(summaries)) {
9999
+ if (descendant.origin !== "subagent") continue;
10000
+ const seen = /* @__PURE__ */ new Set();
10001
+ let current = descendant;
10002
+ while (current?.origin === "subagent" && current.parentId !== void 0 && !seen.has(current.id)) {
10003
+ seen.add(current.id);
10004
+ const aggregate = indexed.get(current.parentId);
10005
+ if (aggregate === void 0) indexed.set(current.parentId, {
10006
+ count: 1,
10007
+ runningCount: descendant.running ? 1 : 0
10008
+ });
10009
+ else {
10010
+ aggregate.count += 1;
10011
+ if (descendant.running) aggregate.runningCount += 1;
10012
+ }
10013
+ current = summaries[current.parentId];
10014
+ }
10015
+ }
10016
+ return indexed;
10017
+ }
9752
10018
  /**
9753
10019
  * Directory display label: basename of the path (both separators accepted).
9754
10020
  * Ungrouped-bucket fallback for surfaces without a workspace title.
9755
10021
  * @param cwd - directory path, or undefined for the ungrouped bucket.
9756
- * @returns basename, the raw cwd when it has no basename, or the ungrouped label.
10022
+ * @returns basename, the raw cwd when it has no basename, or an empty ungrouped marker.
9757
10023
  */
9758
10024
  function workspaceLabel(cwd) {
9759
- if (cwd === void 0 || cwd === "") return UNGROUPED_LABEL;
9760
- const base = cwd.replace(/[/\\]+$/, "").split(/[/\\]/).pop();
9761
- return base !== void 0 && base !== "" ? base : cwd;
10025
+ if (cwd === void 0 || cwd === "") return "";
10026
+ const base = workspaceTitleOf(cwd);
10027
+ return base !== "" ? base : cwd;
9762
10028
  }
9763
10029
  /** Recency comparator: newest first, id as the deterministic tiebreak (ids are unique per group). */
9764
10030
  function byRecency(a, b) {
@@ -9780,7 +10046,11 @@ const official = ((require$1) => {
9780
10046
  * and the renderer localizes its display label.
9781
10047
  */
9782
10048
  function sessionTitle(session) {
9783
- return session.blank ? "New Session" : session.displayTitle;
10049
+ return session.blank ? "" : session.displayTitle;
10050
+ }
10051
+ /** The list projection alone owns the best-effort active-Schedule indicator. */
10052
+ function hasActiveSchedule(session) {
10053
+ return (session.projectionValues?.schedule?.length ?? 0) > 0;
9784
10054
  }
9785
10055
  /** Build one group without projecting session lineage into presentation. */
9786
10056
  function buildGroup(key, workspaceId, cwd, createdAt, label, members, order) {
@@ -9835,10 +10105,20 @@ const official = ((require$1) => {
9835
10105
  groups.push(group);
9836
10106
  }
9837
10107
  const stray = list.ids.map((id) => list.byId[id]).filter((s) => s !== void 0 && !accounted.has(s.id) && sessionVisible(s, list.current, archived));
9838
- if (stray.length > 0) groups.push(buildGroup("", void 0, void 0, void 0, UNGROUPED_LABEL, ungroupedOrder === void 0 ? stray : orderedUngrouped(stray, ungroupedOrder), ungroupedOrder === void 0 ? "recency" : "account"));
10108
+ if (stray.length > 0) groups.push(buildGroup("", void 0, void 0, void 0, "", ungroupedOrder === void 0 ? stray : orderedUngrouped(stray, ungroupedOrder), ungroupedOrder === void 0 ? "recency" : "account"));
9839
10109
  return groups;
9840
10110
  }
9841
- function sessionNode(s, descendants) {
10111
+ /** Keep navigation presentation independent from domain-owned interaction objects. */
10112
+ function visiblePendingKind(kind) {
10113
+ switch (kind) {
10114
+ case "approval":
10115
+ case "plan-review":
10116
+ case "question": return kind;
10117
+ default: return;
10118
+ }
10119
+ }
10120
+ function sessionNode(s, descendants, pendingInteractions) {
10121
+ const pendingInteraction = visiblePendingKind(pendingInteractions.get(s.id)?.kind);
9842
10122
  return {
9843
10123
  id: s.id,
9844
10124
  title: sessionTitle(s),
@@ -9846,9 +10126,10 @@ const official = ((require$1) => {
9846
10126
  running: s.running,
9847
10127
  runningSubagentCount: descendants.get(s.id)?.runningCount ?? 0,
9848
10128
  completed: s.completed === true,
10129
+ hasActiveSchedule: hasActiveSchedule(s),
9849
10130
  updatedAt: s.updatedAt,
9850
10131
  ...s.__dshGitWorktree === void 0 ? {} : { __dshGitWorktree: s.__dshGitWorktree },
9851
- ...s.pendingInteraction === void 0 ? {} : { pendingInteraction: s.pendingInteraction }
10132
+ ...pendingInteraction === void 0 ? {} : { pendingInteraction }
9852
10133
  };
9853
10134
  }
9854
10135
  /**
@@ -9862,13 +10143,14 @@ const official = ((require$1) => {
9862
10143
  * @param list - sessions list snapshot (`current` feeds containsCurrent).
9863
10144
  * @param workspaces - real workspaces in stable Host order.
9864
10145
  * @param archivedSessionIds - registry-global archive set.
10146
+ * @param pendingInteractions - pending UI interactions by Session.
9865
10147
  * @param view - local expansion arrays.
9866
10148
  * @returns group sections in render order.
9867
10149
  */
9868
- function deriveGroups(list, workspaces, archivedSessionIds, view) {
10150
+ function deriveGroups(list, workspaces, archivedSessionIds, pendingInteractions, view) {
9869
10151
  const archived = new Set(archivedSessionIds);
9870
10152
  const expandedGroups = new Set(view.expandedGroups);
9871
- const descendants = (0, _deepseek_ai_dsh_client_runtime_client.indexSubagentDescendants)(list.byId);
10153
+ const descendants = indexSubagentDescendants(list.byId);
9872
10154
  const currentGroup = list.current === void 0 ? void 0 : workspaces.find((w) => w.sessionIds.includes(list.current))?.workspaceId ?? "";
9873
10155
  const groups = [];
9874
10156
  for (const g of groupByWorkspace(list, workspaces, archived, view.ungroupedOrder)) {
@@ -9883,7 +10165,7 @@ const official = ((require$1) => {
9883
10165
  sessionCount: g.sessions.length,
9884
10166
  expanded,
9885
10167
  containsCurrent: g.key === currentGroup,
9886
- sessions: expanded ? g.sessions.map((session) => sessionNode(session, descendants)) : []
10168
+ sessions: expanded ? g.sessions.map((session) => sessionNode(session, descendants, pendingInteractions)) : []
9887
10169
  });
9888
10170
  }
9889
10171
  return groups;
@@ -9895,11 +10177,12 @@ const official = ((require$1) => {
9895
10177
  * (see {@link deriveSearchResults}).
9896
10178
  * @param list - sessions list snapshot.
9897
10179
  * @param archivedSessionIds - registry-global archive set.
10180
+ * @param pendingInteractions - pending UI interactions by Session.
9898
10181
  * @returns flat rows in render order.
9899
10182
  */
9900
- function deriveFlat(list, archivedSessionIds) {
10183
+ function deriveFlat(list, archivedSessionIds, pendingInteractions) {
9901
10184
  const archived = new Set(archivedSessionIds);
9902
- const descendants = (0, _deepseek_ai_dsh_client_runtime_client.indexSubagentDescendants)(list.byId);
10185
+ const descendants = indexSubagentDescendants(list.byId);
9903
10186
  const rows = [];
9904
10187
  for (const id of list.ids) {
9905
10188
  const s = list.byId[id];
@@ -9907,7 +10190,7 @@ const official = ((require$1) => {
9907
10190
  rows.push(s);
9908
10191
  }
9909
10192
  rows.sort(byRecency);
9910
- return rows.map((session) => sessionNode(session, descendants));
10193
+ return rows.map((session) => sessionNode(session, descendants, pendingInteractions));
9911
10194
  }
9912
10195
  /**
9913
10196
  * Merge immediate title/Workspace substring matches with ranked Host content
@@ -9917,18 +10200,19 @@ const official = ((require$1) => {
9917
10200
  * @param workspaces - Workspace membership and display labels.
9918
10201
  * @param query - caller text; surrounding whitespace is ignored.
9919
10202
  * @param archivedSessionIds - registry-global archive set (members never match).
10203
+ * @param pendingInteractions - pending UI interactions by Session.
9920
10204
  * @param content - ranked Host content-search page.
9921
10205
  * @param limit - protocol-owned maximum merged row count.
9922
10206
  * @returns bounded deduplicated flat rows and a refine-query hint bit.
9923
10207
  */
9924
- function deriveSearchResults(list, workspaces, query, archivedSessionIds, content, limit) {
10208
+ function deriveSearchResults(list, workspaces, query, archivedSessionIds, pendingInteractions, content, limit) {
9925
10209
  const q = query.trim().toLowerCase();
9926
10210
  if (q === "") return {
9927
10211
  items: [],
9928
10212
  hasMore: false
9929
10213
  };
9930
10214
  const archived = new Set(archivedSessionIds);
9931
- const descendants = (0, _deepseek_ai_dsh_client_runtime_client.indexSubagentDescendants)(list.byId);
10215
+ const descendants = indexSubagentDescendants(list.byId);
9932
10216
  const workspaceBySession = /* @__PURE__ */ new Map();
9933
10217
  for (const workspace of workspaces) for (const sessionId of workspace.sessionIds) if (!workspaceBySession.has(sessionId)) workspaceBySession.set(sessionId, workspace.title);
9934
10218
  const labelOf = (summary) => workspaceBySession.get(summary.id) ?? workspaceLabel(summary.cwd);
@@ -9956,6 +10240,7 @@ const official = ((require$1) => {
9956
10240
  return {
9957
10241
  items: ordered.slice(0, limit).map((summary) => {
9958
10242
  const match = contentBySession.get(summary.id);
10243
+ const pendingInteraction = visiblePendingKind(pendingInteractions.get(summary.id)?.kind);
9959
10244
  return {
9960
10245
  id: summary.id,
9961
10246
  title: sessionTitle(summary),
@@ -9963,52 +10248,16 @@ const official = ((require$1) => {
9963
10248
  running: summary.running,
9964
10249
  runningSubagentCount: descendants.get(summary.id)?.runningCount ?? 0,
9965
10250
  ...summary.__dshGitWorktree === void 0 ? {} : { __dshGitWorktree: summary.__dshGitWorktree },
9966
- ...summary.pendingInteraction === void 0 ? {} : { pendingInteraction: summary.pendingInteraction },
10251
+ ...pendingInteraction === void 0 ? {} : { pendingInteraction },
9967
10252
  completed: summary.completed === true,
10253
+ hasActiveSchedule: hasActiveSchedule(summary),
9968
10254
  ...match === void 0 ? {} : { snippet: match.snippet }
9969
10255
  };
9970
10256
  }),
9971
10257
  hasMore: content.hasMore || ordered.length > limit
9972
10258
  };
9973
10259
  }
9974
- /**
9975
- * Compact relative time for session rows, as a structured bucket the
9976
- * renderer localizes ("now"/"5min"/"3h"/"2d"/"4mo"/"1y" in en).
9977
- * @param updatedAt - epoch ms of the session's last activity.
9978
- * @param now - current epoch ms (injected for pure rendering).
9979
- * @returns the row's trailing time bucket and magnitude.
9980
- */
9981
- function relativeTime(updatedAt, now) {
9982
- const MIN = 6e4;
9983
- const HOUR = 36e5;
9984
- const DAY = 864e5;
9985
- const diff = Math.max(0, now - updatedAt);
9986
- if (diff < MIN) return {
9987
- unit: "now",
9988
- n: 0
9989
- };
9990
- if (diff < HOUR) return {
9991
- unit: "minutes",
9992
- n: Math.floor(diff / MIN)
9993
- };
9994
- if (diff < DAY) return {
9995
- unit: "hours",
9996
- n: Math.floor(diff / HOUR)
9997
- };
9998
- if (diff < 30 * DAY) return {
9999
- unit: "days",
10000
- n: Math.floor(diff / DAY)
10001
- };
10002
- if (diff < 365 * DAY) return {
10003
- unit: "months",
10004
- n: Math.floor(diff / (30 * DAY))
10005
- };
10006
- return {
10007
- unit: "years",
10008
- n: Math.floor(diff / (365 * DAY))
10009
- };
10010
- }
10011
- const css$2 = ".YDXeBa_projectRow,.YDXeBa_sessionRow{cursor:pointer;user-select:none;color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;gap:6px;padding:0 8px;display:flex}.YDXeBa_projectRow:hover,.YDXeBa_sessionRow:hover,.YDXeBa_sessionRow.YDXeBa_selected{background:var(--dsw-alias-interactive-bg-hover)}.YDXeBa_searchResultRow{box-sizing:border-box;cursor:pointer;text-align:left;width:100%;min-height:48px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:8px;flex-direction:column;align-items:stretch;padding:4px 8px;display:flex}.YDXeBa_searchResultRow:hover,.YDXeBa_searchResultRow.YDXeBa_selected{background:var(--dsw-alias-interactive-bg-hover)}.YDXeBa_searchResultHeading{align-items:center;min-width:0;display:flex}.YDXeBa_searchResultTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;margin-left:4px;font-size:14px;line-height:20px;overflow:hidden}.YDXeBa_searchResultMeta{align-items:center;gap:6px;min-width:0;margin-left:20px;display:flex}.YDXeBa_searchResultWorkspace,.YDXeBa_searchResultSnippet{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.YDXeBa_searchResultWorkspace{max-width:40%;color:var(--dsw-alias-label-tertiary);flex:none}.YDXeBa_searchResultSnippet{min-width:0;color:var(--dsw-alias-label-secondary);flex:1}.YDXeBa_projectRow{box-sizing:border-box;align-items:center;height:34px}.YDXeBa_projectRow .YDXeBa_rowActions{height:20px}.YDXeBa_sessionRow{height:32px;animation:YDXeBa_row-in .15s var(--ds-ease-in-out);gap:0}.YDXeBa_sessionRow .YDXeBa_title{margin:0 6px 0 4px}.YDXeBa_flatSessionRowWithoutStatus .YDXeBa_title{margin-left:0}@keyframes YDXeBa_row-in{0%{opacity:0}}.YDXeBa_slot{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.YDXeBa_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.YDXeBa_folderActive{color:var(--dsw-alias-state-business-primary)}.YDXeBa_projectRow .YDXeBa_chevron{display:none}.YDXeBa_projectRow:hover .YDXeBa_chevron{display:inline-flex}.YDXeBa_projectRow:hover .YDXeBa_folder{display:none}.YDXeBa_arrow{transition:transform .15s var(--ds-ease-in-out)}.YDXeBa_arrowOpen{transform:rotate(90deg)}.YDXeBa_projectText{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.YDXeBa_title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.YDXeBa_renameInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-button-elevated-fill);min-width:0;color:inherit;border-radius:4px;outline:none;padding:0 2px;font-size:14px;line-height:20px}.YDXeBa_sessionRow .YDXeBa_title{flex:1}.YDXeBa_meta{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow:hidden}.YDXeBa_time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:20px}.YDXeBa_dot{flex:none}.YDXeBa_rowActions{flex:none;align-items:center;gap:12px;display:none}.YDXeBa_projectRow:hover .YDXeBa_rowActions,.YDXeBa_sessionRow:hover .YDXeBa_rowActions,.YDXeBa_projectRow.YDXeBa_menuOpen .YDXeBa_rowActions,.YDXeBa_sessionRow.YDXeBa_menuOpen .YDXeBa_rowActions{display:inline-flex}.YDXeBa_sessionRow:hover .YDXeBa_time,.YDXeBa_sessionRow.YDXeBa_menuOpen .YDXeBa_time{display:none}.YDXeBa_projectRow.YDXeBa_menuOpen,.YDXeBa_sessionRow.YDXeBa_menuOpen{background:var(--dsw-alias-interactive-bg-hover)}.YDXeBa_sessionRow.YDXeBa_dropBefore,.YDXeBa_sessionRow.YDXeBa_dropAfter{position:relative}.YDXeBa_sessionRow.YDXeBa_dropBefore:before,.YDXeBa_sessionRow.YDXeBa_dropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.YDXeBa_sessionRow.YDXeBa_dropBefore:before{top:-7px}.YDXeBa_sessionRow.YDXeBa_dropAfter:after{bottom:-7px}.YDXeBa_hoverContent{flex-direction:column;gap:8px;display:flex}.YDXeBa_hoverTitle{color:#fff;overflow-wrap:break-word;font-size:14px;line-height:20px}.YDXeBa_hoverPath{color:#cfd3d6;word-break:break-all;font-size:12px;line-height:16px}.YDXeBa_hoverTime{color:#cfd3d6;font-size:12px;line-height:16px}.YDXeBa_hoverStatus{color:#adb2b8;align-items:center;gap:8px;font-size:12px;line-height:20px;display:flex}.YDXeBa_iconButton{cursor:pointer;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.YDXeBa_iconButton:hover{color:var(--dsw-alias-label-primary)}.YDXeBa_chevron{color:var(--dsw-alias-label-caption)}@media (prefers-reduced-motion:reduce){.YDXeBa_sessionRow,.YDXeBa_arrow{transition:none;animation:none}}";
10260
+ const css$2 = ".YDXeBa_projectRow,.YDXeBa_sessionRow{cursor:pointer;user-select:none;color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;gap:6px;padding:0 8px;display:flex}.YDXeBa_projectRow:hover,.YDXeBa_sessionRow:hover,.YDXeBa_sessionRow.YDXeBa_selected{background:var(--dsw-alias-interactive-bg-hover)}.YDXeBa_searchResultRow{box-sizing:border-box;cursor:pointer;text-align:left;width:100%;min-height:48px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:8px;flex-direction:column;align-items:stretch;padding:4px 8px;display:flex}.YDXeBa_searchResultRow:hover,.YDXeBa_searchResultRow.YDXeBa_selected{background:var(--dsw-alias-interactive-bg-hover)}.YDXeBa_searchResultHeading{align-items:center;min-width:0;display:flex}.YDXeBa_searchResultTitle{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;margin-left:4px;font-size:14px;line-height:20px;overflow:hidden}.YDXeBa_searchResultMeta{align-items:center;gap:6px;min-width:0;margin-left:20px;display:flex}.YDXeBa_searchResultWorkspace,.YDXeBa_searchResultSnippet{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.YDXeBa_searchResultWorkspace{max-width:40%;color:var(--dsw-alias-label-tertiary);flex:none}.YDXeBa_searchResultSnippet{min-width:0;color:var(--dsw-alias-label-secondary);flex:1}.YDXeBa_projectRow{box-sizing:border-box;align-items:center;height:34px}.YDXeBa_projectRow .YDXeBa_rowActions{height:20px}.YDXeBa_sessionRow{height:32px;animation:YDXeBa_row-in .15s var(--ds-ease-in-out);gap:0}.YDXeBa_sessionRow .YDXeBa_title{margin:0 6px 0 4px}.YDXeBa_flatSessionRowWithoutStatus .YDXeBa_title{margin-left:0}@keyframes YDXeBa_row-in{0%{opacity:0}}.YDXeBa_slot{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.YDXeBa_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.YDXeBa_folderActive{color:var(--dsw-alias-state-business-primary)}.YDXeBa_projectRow .YDXeBa_chevron{display:none}.YDXeBa_projectRow:hover .YDXeBa_chevron{display:inline-flex}.YDXeBa_projectRow:hover .YDXeBa_folder{display:none}.YDXeBa_arrow{transition:transform .15s var(--ds-ease-in-out)}.YDXeBa_arrowOpen{transform:rotate(90deg)}.YDXeBa_projectText{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.YDXeBa_title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.YDXeBa_renameInput{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-button-elevated-fill);min-width:0;color:inherit;border-radius:4px;outline:none;padding:0 2px;font-size:14px;line-height:20px}.YDXeBa_sessionRow .YDXeBa_title{flex:1}.YDXeBa_meta{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow:hidden}.YDXeBa_time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:20px}.YDXeBa_scheduleIndicator{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:6px;display:inline-flex}.YDXeBa_searchScheduleIndicator{margin-left:4px;margin-right:0}.YDXeBa_dot{flex:none}.YDXeBa_rowActions{flex:none;align-items:center;gap:12px;display:none}.YDXeBa_projectRow:hover .YDXeBa_rowActions,.YDXeBa_sessionRow:hover .YDXeBa_rowActions,.YDXeBa_projectRow.YDXeBa_menuOpen .YDXeBa_rowActions,.YDXeBa_sessionRow.YDXeBa_menuOpen .YDXeBa_rowActions{display:inline-flex}.YDXeBa_sessionRow:hover .YDXeBa_time,.YDXeBa_sessionRow.YDXeBa_menuOpen .YDXeBa_time{display:none}.YDXeBa_projectRow.YDXeBa_menuOpen,.YDXeBa_sessionRow.YDXeBa_menuOpen{background:var(--dsw-alias-interactive-bg-hover)}.YDXeBa_sessionRow.YDXeBa_dropBefore,.YDXeBa_sessionRow.YDXeBa_dropAfter{position:relative}.YDXeBa_sessionRow.YDXeBa_dropBefore:before,.YDXeBa_sessionRow.YDXeBa_dropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.YDXeBa_sessionRow.YDXeBa_dropBefore:before{top:-7px}.YDXeBa_sessionRow.YDXeBa_dropAfter:after{bottom:-7px}.YDXeBa_hoverContent{flex-direction:column;gap:8px;display:flex}.YDXeBa_hoverTitle{color:#fff;overflow-wrap:break-word;font-size:14px;line-height:20px}.YDXeBa_hoverPath{color:#cfd3d6;word-break:break-all;font-size:12px;line-height:16px}.YDXeBa_hoverTime{color:#cfd3d6;font-size:12px;line-height:16px}.YDXeBa_hoverStatus{color:#adb2b8;align-items:center;gap:8px;font-size:12px;line-height:20px;display:flex}.YDXeBa_iconButton{cursor:pointer;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.YDXeBa_iconButton:hover{color:var(--dsw-alias-label-primary)}.YDXeBa_chevron{color:var(--dsw-alias-label-caption)}@media (prefers-reduced-motion:reduce){.YDXeBa_sessionRow,.YDXeBa_arrow{transition:none;animation:none}}";
10012
10261
  const tagId$2 = "@deepseek-ai/dsh-client-ui-workspace/Rows.module.css";
10013
10262
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
10014
10263
  const tag = document.createElement("style");
@@ -10040,12 +10289,14 @@ const official = ((require$1) => {
10040
10289
  "renameInput": "YDXeBa_renameInput",
10041
10290
  "row-in": "YDXeBa_row-in",
10042
10291
  "rowActions": "YDXeBa_rowActions",
10292
+ "scheduleIndicator": "YDXeBa_scheduleIndicator",
10043
10293
  "searchResultHeading": "YDXeBa_searchResultHeading",
10044
10294
  "searchResultMeta": "YDXeBa_searchResultMeta",
10045
10295
  "searchResultRow": "YDXeBa_searchResultRow",
10046
10296
  "searchResultSnippet": "YDXeBa_searchResultSnippet",
10047
10297
  "searchResultTitle": "YDXeBa_searchResultTitle",
10048
10298
  "searchResultWorkspace": "YDXeBa_searchResultWorkspace",
10299
+ "searchScheduleIndicator": "YDXeBa_searchScheduleIndicator",
10049
10300
  "selected": "YDXeBa_selected",
10050
10301
  "sessionRow": "YDXeBa_sessionRow",
10051
10302
  "slot": "YDXeBa_slot",
@@ -10066,12 +10317,12 @@ const official = ((require$1) => {
10066
10317
  }
10067
10318
  /** Localized compact relative time ("刚刚"/"5分钟" in zh, "now"/"5min" in en). */
10068
10319
  function timeLabel(updatedAt, now, t) {
10069
- const { unit, n } = relativeTime(updatedAt, now);
10320
+ const { unit, n } = (0, _deepseek_ai_dsh_client_ui_primitives.relativeTime)(updatedAt, now);
10070
10321
  return unit === "now" ? t("time.now") : t(`time.${unit}`, { n });
10071
10322
  }
10072
10323
  /** Hover-card variant: distances wrap in the ago template; the now bucket stays bare (no "now ago"). */
10073
10324
  function hoverTimeLabel(updatedAt, now, t) {
10074
- const { unit, n } = relativeTime(updatedAt, now);
10325
+ const { unit, n } = (0, _deepseek_ai_dsh_client_ui_primitives.relativeTime)(updatedAt, now);
10075
10326
  return unit === "now" ? t("time.now") : t("time.ago", { t: t(`time.${unit}`, { n }) });
10076
10327
  }
10077
10328
  /**
@@ -10180,7 +10431,7 @@ const official = ((require$1) => {
10180
10431
  items: workspaceMenuItems,
10181
10432
  onSelect: (id) => {
10182
10433
  setMenuOpen(false);
10183
- /* v8 ignore next -- workspaceMenuItems carries exactly these two rows today. */
10434
+ /* v8 ignore next -- Menu can emit only the rename and delete rows supplied above. */
10184
10435
  if (id !== "rename" && id !== "delete") return;
10185
10436
  if (id === "rename") actions.rename();
10186
10437
  else actions.delete();
@@ -10215,7 +10466,7 @@ const official = ((require$1) => {
10215
10466
  anchor: ownRow,
10216
10467
  content: (0, react_jsx_runtime$1.jsx)(WorkspaceHoverContent, {
10217
10468
  label: row.label,
10218
- cwd: row.cwd === void 0 ? void 0 : (0, _deepseek_ai_dsh_client_runtime_client.abbreviateHomePath)(row.cwd, home),
10469
+ cwd: row.cwd === void 0 ? void 0 : abbreviateHomePath(row.cwd, home),
10219
10470
  createdAt: row.createdAt,
10220
10471
  t
10221
10472
  }),
@@ -10286,6 +10537,17 @@ const official = ((require$1) => {
10286
10537
  children: status.label
10287
10538
  }, status.label))] });
10288
10539
  }
10540
+ /** Non-interactive active-Schedule marker; the enclosing row remains the only action. */
10541
+ function ActiveScheduleIndicator({ t, search = false }) {
10542
+ const label = t("schedule.active");
10543
+ return (0, react_jsx_runtime$1.jsx)("span", {
10544
+ className: clsx(Rows_module_css_default.scheduleIndicator, search && Rows_module_css_default.searchScheduleIndicator),
10545
+ role: "img",
10546
+ "aria-label": label,
10547
+ title: label,
10548
+ children: (0, react_jsx_runtime$1.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAlarmClockOutline16, {})
10549
+ });
10550
+ }
10289
10551
  function managedWorktreeDecoration(node, t) {
10290
10552
  const value = node.__dshGitWorktree;
10291
10553
  if (value?.kind !== "managed-worktree" || typeof value.state !== "string") return void 0;
@@ -10373,13 +10635,17 @@ const official = ((require$1) => {
10373
10635
  (0, react_jsx_runtime$1.jsx)("span", {
10374
10636
  className: Rows_module_css_default.searchResultTitle,
10375
10637
  children: result.title
10638
+ }),
10639
+ result.hasActiveSchedule && (0, react_jsx_runtime$1.jsx)(ActiveScheduleIndicator, {
10640
+ t,
10641
+ search: true
10376
10642
  })
10377
10643
  ]
10378
10644
  }), (0, react_jsx_runtime$1.jsxs)("span", {
10379
10645
  className: Rows_module_css_default.searchResultMeta,
10380
10646
  children: [(0, react_jsx_runtime$1.jsx)("span", {
10381
10647
  className: Rows_module_css_default.searchResultWorkspace,
10382
- children: result.workspace
10648
+ children: result.workspace || t("group.ungrouped")
10383
10649
  }), result.snippet !== void 0 && (0, react_jsx_runtime$1.jsx)("span", {
10384
10650
  className: Rows_module_css_default.searchResultSnippet,
10385
10651
  children: result.snippet
@@ -10468,6 +10734,7 @@ const official = ((require$1) => {
10468
10734
  className: Rows_module_css_default.title,
10469
10735
  children: title
10470
10736
  }),
10737
+ row.hasActiveSchedule && (0, react_jsx_runtime$1.jsx)(ActiveScheduleIndicator, { t }),
10471
10738
  !row.blank && (0, react_jsx_runtime$1.jsx)("span", {
10472
10739
  className: Rows_module_css_default.time,
10473
10740
  children: timeLabel(row.updatedAt, now, t)
@@ -10679,7 +10946,7 @@ const official = ((require$1) => {
10679
10946
  onClose
10680
10947
  });
10681
10948
  }
10682
- const css = ".qDHVXG_root{--dsh-session-list-edge-inset:var(--dsh-sidebar-inline-padding);--dsh-session-list-scrollbar-width:8px;--dsh-session-list-scrollbar-offset:2px;box-sizing:border-box;min-height:0;padding-right:var(--dsh-session-list-edge-inset);flex-direction:column;flex:1;display:flex}.qDHVXG_root.qDHVXG_rail{padding-right:0}.qDHVXG_iconButton{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.qDHVXG_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_sectionHeader{box-sizing:border-box;height:36px;color:var(--dsw-alias-label-tertiary);border-radius:12px;flex:none;justify-content:flex-end;align-items:center;gap:4px;margin-bottom:4px;padding-left:4px;display:flex;overflow:hidden}.qDHVXG_root:not(.qDHVXG_rail) .qDHVXG_sectionHeader{margin-top:2px;margin-right:-4px}.qDHVXG_sectionLabel{white-space:nowrap;opacity:1;visibility:visible;min-width:0;max-width:45%;transition:max-width .18s var(--ds-ease-in-out), margin-right .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;line-height:20px;overflow:hidden}.qDHVXG_sectionLabelHidden{opacity:0;visibility:hidden;max-width:0;margin-right:-4px;transition-delay:0s,0s,0s,0s,.18s;transform:translate(-4px)}.qDHVXG_searchSlot{box-sizing:border-box;min-width:0;max-width:28px;transition:max-width .18s var(--ds-ease-in-out), padding-left .18s var(--ds-ease-in-out);flex:1;align-items:center;margin-left:auto;padding-left:0;display:flex}.qDHVXG_searchSlotExpanded{max-width:100%;padding-left:0}.qDHVXG_headerActions{opacity:1;visibility:visible;max-width:60px;transition:max-width .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;align-items:center;gap:4px;display:flex;overflow:hidden}.qDHVXG_headerActionsHidden{opacity:0;visibility:hidden;pointer-events:none;max-width:0;transition-delay:0s,0s,0s,.18s;transform:translate(4px)}.qDHVXG_search{box-sizing:border-box;cursor:text;width:100%;height:28px;color:var(--dsw-alias-label-secondary);transition:width .18s var(--ds-ease-in-out), padding .18s var(--ds-ease-in-out), border-color .18s var(--ds-ease-in-out), background-color .18s var(--ds-ease-in-out);background:0 0;border:none;border-radius:50%;flex:none;align-items:center;gap:0;margin:0;padding:0;display:flex;overflow:hidden}.qDHVXG_searchExpanded{border:1px solid var(--dsw-alias-border-l2);width:calc(100% + 4px);height:30px;color:var(--dsw-alias-label-caption);background:0 0;border-radius:10px;margin-inline:-2px;padding:0 4px 0 0}.qDHVXG_searchButton{cursor:pointer;width:28px;height:28px;color:inherit;background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.qDHVXG_searchExpanded .qDHVXG_searchButton{width:28px;height:30px}.qDHVXG_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_searchExpanded .qDHVXG_searchButton:hover{background:0 0}.qDHVXG_searchInput{opacity:0;pointer-events:none;width:0;min-width:0;color:var(--dsw-alias-label-primary);transition:opacity .12s var(--ds-ease-in-out);background:0 0;border:none;outline:none;flex:1;font-size:13px;line-height:18px}.qDHVXG_searchExpanded .qDHVXG_searchInput{opacity:1;pointer-events:auto;margin-left:-2px}.qDHVXG_searchInput::placeholder{color:var(--dsw-alias-label-tertiary)}.qDHVXG_clearButton{cursor:pointer;width:24px;height:24px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.qDHVXG_clearButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_rail .qDHVXG_sectionHeader{justify-content:flex-start;gap:0;margin-bottom:12px;padding-left:0}.qDHVXG_rail .qDHVXG_headerActions{max-width:none}.qDHVXG_rail .qDHVXG_iconButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.qDHVXG_rail .qDHVXG_search{background:0 0;border-color:#0000;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.qDHVXG_rail .qDHVXG_searchButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.qDHVXG_rail .qDHVXG_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_listArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-session-list-edge-inset));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:visible}.qDHVXG_rail .qDHVXG_listArea{margin-left:0;margin-right:0;padding-left:0}.qDHVXG_treeBody{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.qDHVXG_fade{left:0;right:var(--dsh-session-list-edge-inset);background:linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));pointer-events:none;height:24px;position:absolute;bottom:0}.qDHVXG_wide{animation:qDHVXG_wide-in .2s var(--ds-ease-in-out)}@keyframes qDHVXG_wide-in{0%{opacity:0}}.qDHVXG_list{min-height:0;margin-left:-4px;margin-right:var(--dsh-session-list-scrollbar-offset);padding-left:4px;padding-right:calc(var(--dsh-session-list-edge-inset) - var(--dsh-session-list-scrollbar-width) - var(--dsh-session-list-scrollbar-offset));scrollbar-gutter:stable;flex:1;padding-bottom:16px;overflow-y:auto}.qDHVXG_flatList>*+*,.qDHVXG_searchTree>[role=treeitem]+[role=treeitem],.qDHVXG_groupSection>*+*{margin-top:2px}.qDHVXG_searchStatus,.qDHVXG_searchWarning{color:var(--dsw-alias-label-tertiary);padding:10px 12px;font-size:12px;line-height:18px}.qDHVXG_searchWarning{color:var(--dsw-alias-label-secondary)}.qDHVXG_groupSection{position:relative}.qDHVXG_groupSection+.qDHVXG_groupSection{margin-top:4px}.qDHVXG_listTopDropIndicator,.qDHVXG_workspaceDropBefore:before,.qDHVXG_workspaceDropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:0}.qDHVXG_listTopDropIndicator{top:-8px;left:0;right:var(--dsh-session-list-edge-inset)}.qDHVXG_listTopDropActive>.qDHVXG_workspaceDropBefore:first-child:before{display:none}.qDHVXG_workspaceDropBefore:before{top:-8px}.qDHVXG_workspaceDropAfter:after{bottom:-8px}.qDHVXG_sessionOverflowButton{cursor:pointer;text-align:left;width:100%;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:8px;padding:0 12px 0 28px;font-size:12px}.qDHVXG_groupSection>.qDHVXG_sessionOverflowButton{margin-top:0}.qDHVXG_sessionOverflowButton:hover{color:var(--dsw-alias-label-secondary);background:0 0}.qDHVXG_empty{color:var(--dsw-alias-label-tertiary);padding:16px 12px;font-size:13px}.qDHVXG_renameInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:100%;height:44px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:22px;outline:none;padding:7px 14px;font-size:14px;font-weight:400;line-height:22px}.qDHVXG_renameInput:disabled{color:var(--dsw-alias-label-dimmed)}.qDHVXG_renameError{color:var(--dsw-alias-state-error-primary);margin-top:8px;font-size:12px;line-height:18px}.qDHVXG_deleteAction:not(:disabled){color:var(--dsw-alias-state-error-primary)}.qDHVXG_deleteStatus{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}@media (prefers-reduced-motion:reduce){.qDHVXG_wide{animation:none}.qDHVXG_search,.qDHVXG_sectionLabel,.qDHVXG_searchSlot,.qDHVXG_searchInput,.qDHVXG_headerActions{transition:none}}";
10949
+ const css = ".bhn1Oq_root{--dsh-session-list-edge-inset:var(--dsh-sidebar-inline-padding);--dsh-session-list-scrollbar-width:8px;--dsh-session-list-scrollbar-offset:2px;box-sizing:border-box;min-height:0;padding-right:var(--dsh-session-list-edge-inset);flex-direction:column;flex:1;display:flex}.bhn1Oq_root.bhn1Oq_rail{padding-right:0}.bhn1Oq_iconButton{corner-shape:round;cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.bhn1Oq_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.bhn1Oq_sectionHeader{box-sizing:border-box;height:36px;color:var(--dsw-alias-label-tertiary);border-radius:12px;flex:none;justify-content:flex-end;align-items:center;gap:4px;margin-bottom:4px;padding-left:4px;display:flex;overflow:hidden}.bhn1Oq_root:not(.bhn1Oq_rail) .bhn1Oq_sectionHeader{margin-top:2px;margin-right:-4px}.bhn1Oq_sectionLabel{white-space:nowrap;opacity:1;visibility:visible;min-width:0;max-width:45%;transition:max-width .18s var(--ds-ease-in-out), margin-right .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;line-height:20px;overflow:hidden}.bhn1Oq_sectionLabelHidden{opacity:0;visibility:hidden;max-width:0;margin-right:-4px;transition-delay:0s,0s,0s,0s,.18s;transform:translate(-4px)}.bhn1Oq_searchSlot{box-sizing:border-box;min-width:0;max-width:28px;transition:max-width .18s var(--ds-ease-in-out), padding-left .18s var(--ds-ease-in-out);flex:1;align-items:center;margin-left:auto;padding-left:0;display:flex}.bhn1Oq_searchSlotExpanded{max-width:100%;padding-left:0}.bhn1Oq_headerActions{opacity:1;visibility:visible;max-width:60px;transition:max-width .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;align-items:center;gap:4px;display:flex;overflow:hidden}.bhn1Oq_headerActionsHidden{opacity:0;visibility:hidden;pointer-events:none;max-width:0;transition-delay:0s,0s,0s,.18s;transform:translate(4px)}.bhn1Oq_search{box-sizing:border-box;corner-shape:round;cursor:text;width:100%;height:28px;color:var(--dsw-alias-label-secondary);transition:width .18s var(--ds-ease-in-out), padding .18s var(--ds-ease-in-out), border-color .18s var(--ds-ease-in-out), background-color .18s var(--ds-ease-in-out);background:0 0;border:none;border-radius:50%;flex:none;align-items:center;gap:0;margin:0;padding:0;display:flex;overflow:hidden}.bhn1Oq_searchExpanded{border:.5px solid var(--dsw-alias-border-l4);width:calc(100% + 4px);height:30px;color:var(--dsw-alias-label-caption);background:0 0;border-radius:10px;margin-inline:-2px;padding:0 4px 0 0}.bhn1Oq_searchButton{corner-shape:round;cursor:pointer;width:28px;height:28px;color:inherit;background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.bhn1Oq_searchExpanded .bhn1Oq_searchButton{width:28px;height:30px}.bhn1Oq_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.bhn1Oq_searchExpanded .bhn1Oq_searchButton:hover{background:0 0}.bhn1Oq_searchInput{opacity:0;pointer-events:none;width:0;min-width:0;color:var(--dsw-alias-label-primary);transition:opacity .12s var(--ds-ease-in-out);background:0 0;border:none;outline:none;flex:1;font-size:13px;line-height:18px}.bhn1Oq_searchExpanded .bhn1Oq_searchInput{opacity:1;pointer-events:auto;margin-left:-2px}.bhn1Oq_searchInput::placeholder{color:var(--dsw-alias-label-tertiary)}.bhn1Oq_clearButton{corner-shape:round;cursor:pointer;width:24px;height:24px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.bhn1Oq_clearButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.bhn1Oq_rail .bhn1Oq_sectionHeader{justify-content:flex-start;gap:0;margin-bottom:12px;padding-left:0}.bhn1Oq_rail .bhn1Oq_headerActions{max-width:none}.bhn1Oq_rail .bhn1Oq_iconButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.bhn1Oq_rail .bhn1Oq_search{background:0 0;border-color:#0000;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.bhn1Oq_rail .bhn1Oq_searchButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.bhn1Oq_rail .bhn1Oq_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.bhn1Oq_listArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-session-list-edge-inset));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:visible}.bhn1Oq_rail .bhn1Oq_listArea{margin-left:0;margin-right:0;padding-left:0}.bhn1Oq_treeBody{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.bhn1Oq_fade{left:0;right:var(--dsh-session-list-edge-inset);background:linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));pointer-events:none;height:24px;position:absolute;bottom:0}.bhn1Oq_wide{animation:bhn1Oq_wide-in .2s var(--ds-ease-in-out)}@keyframes bhn1Oq_wide-in{0%{opacity:0}}.bhn1Oq_list{min-height:0;margin-left:-4px;margin-right:var(--dsh-session-list-scrollbar-offset);padding-left:4px;padding-right:calc(var(--dsh-session-list-edge-inset) - var(--dsh-session-list-scrollbar-width) - var(--dsh-session-list-scrollbar-offset));scrollbar-gutter:stable;flex:1;padding-bottom:16px;overflow-y:auto}.bhn1Oq_flatList>*+*,.bhn1Oq_searchTree>[role=treeitem]+[role=treeitem],.bhn1Oq_groupSection>*+*{margin-top:2px}.bhn1Oq_searchStatus,.bhn1Oq_searchWarning{color:var(--dsw-alias-label-tertiary);padding:10px 12px;font-size:12px;line-height:18px}.bhn1Oq_searchWarning{color:var(--dsw-alias-label-secondary)}.bhn1Oq_groupSection{position:relative}.bhn1Oq_groupSection+.bhn1Oq_groupSection{margin-top:4px}.bhn1Oq_listTopDropIndicator,.bhn1Oq_workspaceDropBefore:before,.bhn1Oq_workspaceDropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:0}.bhn1Oq_listTopDropIndicator{top:-8px;left:0;right:var(--dsh-session-list-edge-inset)}.bhn1Oq_listTopDropActive>.bhn1Oq_workspaceDropBefore:first-child:before{display:none}.bhn1Oq_workspaceDropBefore:before{top:-8px}.bhn1Oq_workspaceDropAfter:after{bottom:-8px}.bhn1Oq_sessionOverflowButton{cursor:pointer;text-align:left;width:100%;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:8px;padding:0 12px 0 28px;font-size:12px}.bhn1Oq_groupSection>.bhn1Oq_sessionOverflowButton{margin-top:0}.bhn1Oq_sessionOverflowButton:hover{color:var(--dsw-alias-label-secondary);background:0 0}.bhn1Oq_empty{color:var(--dsw-alias-label-tertiary);padding:16px 12px;font-size:13px}.bhn1Oq_renameInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);width:100%;height:44px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:22px;outline:none;padding:7px 14px;font-size:14px;font-weight:400;line-height:22px}.bhn1Oq_renameInput:disabled{color:var(--dsw-alias-label-dimmed)}.bhn1Oq_renameError{color:var(--dsw-alias-state-error-primary);margin-top:8px;font-size:12px;line-height:18px}.bhn1Oq_deleteAction:not(:disabled){color:var(--dsw-alias-state-error-primary)}.bhn1Oq_deleteStatus{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}@media (prefers-reduced-motion:reduce){.bhn1Oq_wide{animation:none}.bhn1Oq_search,.bhn1Oq_sectionLabel,.bhn1Oq_searchSlot,.bhn1Oq_searchInput,.bhn1Oq_headerActions{transition:none}}";
10683
10950
  const tagId = "@deepseek-ai/dsh-client-ui-workspace/WorkspaceBrowser.module.css";
10684
10951
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
10685
10952
  const tag = document.createElement("style");
@@ -10689,42 +10956,42 @@ const official = ((require$1) => {
10689
10956
  document.head.appendChild(tag);
10690
10957
  }
10691
10958
  var WorkspaceBrowser_module_css_default = {
10692
- "clearButton": "qDHVXG_clearButton",
10693
- "deleteAction": "qDHVXG_deleteAction",
10694
- "deleteStatus": "qDHVXG_deleteStatus",
10695
- "empty": "qDHVXG_empty",
10696
- "fade": "qDHVXG_fade",
10697
- "flatList": "qDHVXG_flatList",
10698
- "groupSection": "qDHVXG_groupSection",
10699
- "headerActions": "qDHVXG_headerActions",
10700
- "headerActionsHidden": "qDHVXG_headerActionsHidden",
10701
- "iconButton": "qDHVXG_iconButton",
10702
- "list": "qDHVXG_list",
10703
- "listArea": "qDHVXG_listArea",
10704
- "listTopDropActive": "qDHVXG_listTopDropActive",
10705
- "listTopDropIndicator": "qDHVXG_listTopDropIndicator",
10706
- "rail": "qDHVXG_rail",
10707
- "renameError": "qDHVXG_renameError",
10708
- "renameInput": "qDHVXG_renameInput",
10709
- "root": "qDHVXG_root",
10710
- "search": "qDHVXG_search",
10711
- "searchButton": "qDHVXG_searchButton",
10712
- "searchExpanded": "qDHVXG_searchExpanded",
10713
- "searchInput": "qDHVXG_searchInput",
10714
- "searchSlot": "qDHVXG_searchSlot",
10715
- "searchSlotExpanded": "qDHVXG_searchSlotExpanded",
10716
- "searchStatus": "qDHVXG_searchStatus",
10717
- "searchTree": "qDHVXG_searchTree",
10718
- "searchWarning": "qDHVXG_searchWarning",
10719
- "sectionHeader": "qDHVXG_sectionHeader",
10720
- "sectionLabel": "qDHVXG_sectionLabel",
10721
- "sectionLabelHidden": "qDHVXG_sectionLabelHidden",
10722
- "sessionOverflowButton": "qDHVXG_sessionOverflowButton",
10723
- "treeBody": "qDHVXG_treeBody",
10724
- "wide": "qDHVXG_wide",
10725
- "wide-in": "qDHVXG_wide-in",
10726
- "workspaceDropAfter": "qDHVXG_workspaceDropAfter",
10727
- "workspaceDropBefore": "qDHVXG_workspaceDropBefore"
10959
+ "clearButton": "bhn1Oq_clearButton",
10960
+ "deleteAction": "bhn1Oq_deleteAction",
10961
+ "deleteStatus": "bhn1Oq_deleteStatus",
10962
+ "empty": "bhn1Oq_empty",
10963
+ "fade": "bhn1Oq_fade",
10964
+ "flatList": "bhn1Oq_flatList",
10965
+ "groupSection": "bhn1Oq_groupSection",
10966
+ "headerActions": "bhn1Oq_headerActions",
10967
+ "headerActionsHidden": "bhn1Oq_headerActionsHidden",
10968
+ "iconButton": "bhn1Oq_iconButton",
10969
+ "list": "bhn1Oq_list",
10970
+ "listArea": "bhn1Oq_listArea",
10971
+ "listTopDropActive": "bhn1Oq_listTopDropActive",
10972
+ "listTopDropIndicator": "bhn1Oq_listTopDropIndicator",
10973
+ "rail": "bhn1Oq_rail",
10974
+ "renameError": "bhn1Oq_renameError",
10975
+ "renameInput": "bhn1Oq_renameInput",
10976
+ "root": "bhn1Oq_root",
10977
+ "search": "bhn1Oq_search",
10978
+ "searchButton": "bhn1Oq_searchButton",
10979
+ "searchExpanded": "bhn1Oq_searchExpanded",
10980
+ "searchInput": "bhn1Oq_searchInput",
10981
+ "searchSlot": "bhn1Oq_searchSlot",
10982
+ "searchSlotExpanded": "bhn1Oq_searchSlotExpanded",
10983
+ "searchStatus": "bhn1Oq_searchStatus",
10984
+ "searchTree": "bhn1Oq_searchTree",
10985
+ "searchWarning": "bhn1Oq_searchWarning",
10986
+ "sectionHeader": "bhn1Oq_sectionHeader",
10987
+ "sectionLabel": "bhn1Oq_sectionLabel",
10988
+ "sectionLabelHidden": "bhn1Oq_sectionLabelHidden",
10989
+ "sessionOverflowButton": "bhn1Oq_sessionOverflowButton",
10990
+ "treeBody": "bhn1Oq_treeBody",
10991
+ "wide": "bhn1Oq_wide",
10992
+ "wide-in": "bhn1Oq_wide-in",
10993
+ "workspaceDropAfter": "bhn1Oq_workspaceDropAfter",
10994
+ "workspaceDropBefore": "bhn1Oq_workspaceDropBefore"
10728
10995
  };
10729
10996
  /**
10730
10997
  * The workspace/session browsing region filling the sidebar shell's
@@ -10748,6 +11015,20 @@ const official = ((require$1) => {
10748
11015
  const SEARCH_QUERY_MAX_CODE_UNITS = 500;
10749
11016
  /** Session rows visible per Workspace before the local overflow control. */
10750
11017
  const COLLAPSED_SESSION_LIMIT = 5;
11018
+ /** Fold one Workspace without charging its provisional New Session against the ordinary-row limit. */
11019
+ function collapsedSessionRows(sessions) {
11020
+ let ordinaryCount = 0;
11021
+ const rows = sessions.filter((session) => {
11022
+ if (session.blank) return true;
11023
+ if (ordinaryCount >= COLLAPSED_SESSION_LIMIT) return false;
11024
+ ordinaryCount += 1;
11025
+ return true;
11026
+ });
11027
+ return {
11028
+ rows,
11029
+ hiddenCount: sessions.length - rows.length
11030
+ };
11031
+ }
10751
11032
  /** Keep controlled input and RPC payload inside the session.search wire contract. */
10752
11033
  function sanitizeSearchQuery(value) {
10753
11034
  const withoutNul = value.replaceAll("\0", "");
@@ -10908,8 +11189,9 @@ const official = ((require$1) => {
10908
11189
  return e.clientY < rect.top + rect.height / 2 ? "before" : "after";
10909
11190
  }
10910
11191
  /** The scrolling session tree; unmounting drops the sessions subscription and expand-all state. */
10911
- function SessionTree({ useSessions, startSession, open, forkSession, workspaces, archivedSessionIds, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, insertWorkspaceBefore, insertSessionBefore, orderBy, groupExpansion, setGroupExpanded, sessionOrderByAccount, sessionUpdatedAtByAccount, syncSessionOrderAccount, setSessionOrder, home, t }) {
11192
+ function SessionTree({ useSessions, useSessionPendingInteraction, startSession, open, forkSession, workspaces, archivedSessionIds, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, insertWorkspaceBefore, insertSessionBefore, orderBy, groupExpansion, setGroupExpanded, sessionOrderByAccount, sessionUpdatedAtByAccount, syncSessionOrderAccount, setSessionOrder, home, t }) {
10912
11193
  const list = useSessions((s) => s);
11194
+ const pendingInteractions = useSessionPendingInteraction((s) => s);
10913
11195
  const current = list.current;
10914
11196
  const [expandedSessionGroups, setExpandedSessionGroups] = (0, react$1.useState)([]);
10915
11197
  const [drag, setDrag] = (0, react$1.useState)(null);
@@ -10976,13 +11258,14 @@ const official = ((require$1) => {
10976
11258
  });
10977
11259
  }, [sessionOrderByAccount, workspaces]);
10978
11260
  const orderedUngroupedSessionIds = (0, react$1.useMemo)(() => reconciledSessionOrder(ungroupedSessionIds, sessionOrderByAccount[""]), [sessionOrderByAccount, ungroupedSessionIds]);
10979
- const groups = (0, react$1.useMemo)(() => deriveGroups(list, orderedWorkspaces, archivedSessionIds, {
11261
+ const groups = (0, react$1.useMemo)(() => deriveGroups(list, orderedWorkspaces, archivedSessionIds, pendingInteractions, {
10980
11262
  expandedGroups,
10981
11263
  ...sessionOrderByAccount[""] === void 0 ? {} : { ungroupedOrder: sessionOrderByAccount[""] }
10982
11264
  }), [
10983
11265
  list,
10984
11266
  orderedWorkspaces,
10985
11267
  archivedSessionIds,
11268
+ pendingInteractions,
10986
11269
  expandedGroups,
10987
11270
  sessionOrderByAccount
10988
11271
  ]);
@@ -10993,18 +11276,40 @@ const official = ((require$1) => {
10993
11276
  setDrag(null);
10994
11277
  const group = groups.find((candidate) => candidate.key === activeDrag.accountKey);
10995
11278
  if (group === void 0) return;
10996
- const targetIndex = group.sessions.findIndex((session) => session.id === over.id);
11279
+ const sessionsExpanded = expandedSessionGroups.includes(group.key);
11280
+ const renderedSessions = sessionsExpanded ? group.sessions : collapsedSessionRows(group.sessions).rows;
11281
+ const targetIndex = renderedSessions.findIndex((session) => session.id === over.id);
10997
11282
  if (targetIndex === -1) return;
10998
- const anchor = over.half === "before" ? over.id : group.sessions[targetIndex + 1]?.id;
10999
- if (anchor === activeDrag.sessionId) return;
11000
- const sourceIndex = group.sessions.findIndex((session) => session.id === activeDrag.sessionId);
11001
- const anchorIndex = anchor === void 0 ? group.sessions.length : group.sessions.findIndex((session) => session.id === anchor);
11002
- if (sourceIndex !== -1 && (anchorIndex === sourceIndex || anchorIndex === sourceIndex + 1)) return;
11283
+ const sourceIndex = renderedSessions.findIndex((session) => session.id === activeDrag.sessionId);
11284
+ if (over.id === activeDrag.sessionId) return;
11285
+ const withoutSource = renderedSessions.filter((session) => session.id !== activeDrag.sessionId);
11286
+ const targetWithoutSourceIndex = withoutSource.findIndex((session) => session.id === over.id);
11287
+ if (targetWithoutSourceIndex === -1) return;
11288
+ const visibleInsertAt = over.half === "before" ? targetWithoutSourceIndex : targetWithoutSourceIndex + 1;
11289
+ if (sourceIndex !== -1 && visibleInsertAt === sourceIndex) return;
11003
11290
  const accountSessionIds = activeDrag.accountKey === "" ? orderedUngroupedSessionIds : orderedWorkspaces.find((workspace) => workspace.workspaceId === activeDrag.accountKey)?.sessionIds;
11004
11291
  if (accountSessionIds === void 0) return;
11005
11292
  const nextOrder = accountSessionIds.filter((id) => id !== activeDrag.sessionId);
11293
+ let anchor;
11294
+ if (sessionsExpanded) anchor = over.half === "before" ? over.id : renderedSessions[targetIndex + 1]?.id;
11295
+ else {
11296
+ const previousVisible = withoutSource[visibleInsertAt - 1]?.id;
11297
+ if (previousVisible === void 0) anchor = nextOrder[0];
11298
+ else {
11299
+ const previousIndex = nextOrder.indexOf(previousVisible);
11300
+ if (previousIndex === -1) return;
11301
+ anchor = nextOrder[previousIndex + 1];
11302
+ }
11303
+ }
11006
11304
  const insertAt = anchor === void 0 ? nextOrder.length : nextOrder.indexOf(anchor);
11007
11305
  nextOrder.splice(insertAt === -1 ? nextOrder.length : insertAt, 0, activeDrag.sessionId);
11306
+ if (!sessionsExpanded && sourceIndex !== -1) {
11307
+ const nodes = new Map(group.sessions.map((node) => [node.id, node]));
11308
+ if (!collapsedSessionRows(nextOrder.flatMap((id) => {
11309
+ const node = nodes.get(id);
11310
+ return node === void 0 ? [] : [node];
11311
+ })).rows.some((node) => node.id === activeDrag.sessionId)) return;
11312
+ }
11008
11313
  setSessionOrder(activeDrag.accountKey, nextOrder.map((id) => id));
11009
11314
  if (orderBy === "updated" || activeDrag.accountKey === "") return;
11010
11315
  insertSessionBefore(activeDrag.accountKey, activeDrag.sessionId, anchor).catch((reason) => {
@@ -11043,6 +11348,8 @@ const official = ((require$1) => {
11043
11348
  children: t("empty.none")
11044
11349
  }), groups.map((group) => {
11045
11350
  const workspaceId = group.workspaceId;
11351
+ const collapsed = collapsedSessionRows(group.sessions);
11352
+ const sessionsExpanded = expandedSessionGroups.includes(group.key);
11046
11353
  const workspaceMarker = workspaceId !== void 0 && workspaceDrag?.over?.id === workspaceId ? workspaceDrag.over.half : null;
11047
11354
  const workspaceDragProps = workspaceId === void 0 ? void 0 : {
11048
11355
  start: () => {
@@ -11112,7 +11419,7 @@ const official = ((require$1) => {
11112
11419
  }
11113
11420
  }
11114
11421
  }),
11115
- (expandedSessionGroups.includes(group.key) ? group.sessions : group.sessions.slice(0, COLLAPSED_SESSION_LIMIT)).map((node) => {
11422
+ (sessionsExpanded ? group.sessions : collapsed.rows).map((node) => {
11116
11423
  const sameGroupDrag = drag !== null && drag.accountKey === group.key;
11117
11424
  return (0, react_jsx_runtime$1.jsx)(SessionNodeItem, {
11118
11425
  node,
@@ -11160,14 +11467,14 @@ const official = ((require$1) => {
11160
11467
  t
11161
11468
  }, node.id);
11162
11469
  }),
11163
- group.sessions.length > COLLAPSED_SESSION_LIMIT && (0, react_jsx_runtime$1.jsx)("button", {
11470
+ collapsed.hiddenCount > 0 && (0, react_jsx_runtime$1.jsx)("button", {
11164
11471
  type: "button",
11165
11472
  className: WorkspaceBrowser_module_css_default.sessionOverflowButton,
11166
- "aria-expanded": expandedSessionGroups.includes(group.key),
11473
+ "aria-expanded": sessionsExpanded,
11167
11474
  onClick: () => {
11168
11475
  setExpandedSessionGroups((keys) => toggled(keys, group.key));
11169
11476
  },
11170
- children: expandedSessionGroups.includes(group.key) ? t("sessions.collapse") : t("sessions.expand", { n: group.sessions.length - COLLAPSED_SESSION_LIMIT })
11477
+ children: sessionsExpanded ? t("sessions.collapse") : t("sessions.expand", { n: collapsed.hiddenCount })
11171
11478
  })
11172
11479
  ]
11173
11480
  }, group.key);
@@ -11178,9 +11485,14 @@ const official = ((require$1) => {
11178
11485
  });
11179
11486
  }
11180
11487
  /** The flat "In one list" body: every session is one draggable top-level row. */
11181
- function FlatList({ useSessions, open, forkSession, onSessionRename, onSessionArchive, archivedSessionIds, orderBy, sessionOrderByAccount, sessionUpdatedAtByAccount, syncSessionOrderAccount, setSessionOrder, t }) {
11488
+ function FlatList({ useSessions, useSessionPendingInteraction, open, forkSession, onSessionRename, onSessionArchive, archivedSessionIds, orderBy, sessionOrderByAccount, sessionUpdatedAtByAccount, syncSessionOrderAccount, setSessionOrder, t }) {
11182
11489
  const list = useSessions((s) => s);
11183
- const baseRows = (0, react$1.useMemo)(() => deriveFlat(list, archivedSessionIds), [list, archivedSessionIds]);
11490
+ const pendingInteractions = useSessionPendingInteraction((s) => s);
11491
+ const baseRows = (0, react$1.useMemo)(() => deriveFlat(list, archivedSessionIds, pendingInteractions), [
11492
+ list,
11493
+ archivedSessionIds,
11494
+ pendingInteractions
11495
+ ]);
11184
11496
  const sessionIds = (0, react$1.useMemo)(() => baseRows.map((row) => row.id), [baseRows]);
11185
11497
  const previousOrderBy = (0, react$1.useRef)(orderBy);
11186
11498
  (0, react$1.useEffect)(() => {
@@ -11296,19 +11608,21 @@ const official = ((require$1) => {
11296
11608
  });
11297
11609
  }
11298
11610
  /** Flat search body: local metadata matches plus the current Host result page. */
11299
- function SearchResults({ useSessions, open, workspaces, archivedSessionIds, query, remote, resultLimit, t }) {
11611
+ function SearchResults({ useSessions, useSessionPendingInteraction, open, workspaces, archivedSessionIds, query, remote, resultLimit, t }) {
11300
11612
  const list = useSessions((s) => s);
11613
+ const pendingInteractions = useSessionPendingInteraction((s) => s);
11301
11614
  const currentRemote = remote.query === query ? remote : {
11302
11615
  query,
11303
11616
  status: "loading",
11304
11617
  items: [],
11305
11618
  hasMore: false
11306
11619
  };
11307
- const results = (0, react$1.useMemo)(() => deriveSearchResults(list, workspaces, query, archivedSessionIds, currentRemote, resultLimit), [
11620
+ const results = (0, react$1.useMemo)(() => deriveSearchResults(list, workspaces, query, archivedSessionIds, pendingInteractions, currentRemote, resultLimit), [
11308
11621
  list,
11309
11622
  workspaces,
11310
11623
  query,
11311
11624
  archivedSessionIds,
11625
+ pendingInteractions,
11312
11626
  currentRemote,
11313
11627
  resultLimit
11314
11628
  ]);
@@ -11357,8 +11671,8 @@ const official = ((require$1) => {
11357
11671
  * @param props - composed slot props (shell owner share + store + injected actions).
11358
11672
  * @returns the region element tree.
11359
11673
  */
11360
- function WorkspaceBrowser({ wide, expandSidebar, useSessions, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, searchSessions, searchResultLimit, useDirectoryFlow, useHostDescription, renderSlot, t }) {
11361
- const home = useHostDescription((description) => description?.home);
11674
+ function WorkspaceBrowser({ wide, expandSidebar, useSessions, useSessionPendingInteraction, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, searchSessions, searchResultLimit, useDirectoryFlow, useHostInfo, renderSlot, t }) {
11675
+ const home = useHostInfo((info) => info.home);
11362
11676
  const workspaces = useWorkspaces((state) => state.items);
11363
11677
  const workspacePhase = useWorkspaces((state) => state.phase);
11364
11678
  const archivedSessionIds = useWorkspaces((state) => state.archivedSessionIds);
@@ -11379,7 +11693,8 @@ const official = ((require$1) => {
11379
11693
  promotedBlank.current = void 0;
11380
11694
  return;
11381
11695
  }
11382
- if (promotedBlank.current?.sessionId === currentBlankSessionId && promotedBlank.current.accountKey === currentBlankAccount) return;
11696
+ const promoted = promotedBlank.current;
11697
+ if (promoted !== void 0 && promoted.sessionId === currentBlankSessionId && promoted.accountKey === currentBlankAccount) return;
11383
11698
  promotedBlank.current = {
11384
11699
  sessionId: currentBlankSessionId,
11385
11700
  accountKey: currentBlankAccount
@@ -11725,6 +12040,7 @@ const official = ((require$1) => {
11725
12040
  className: WorkspaceBrowser_module_css_default.listArea,
11726
12041
  children: wide && (normalizedQuery !== "" ? (0, react_jsx_runtime$1.jsx)(SearchResults, {
11727
12042
  useSessions,
12043
+ useSessionPendingInteraction,
11728
12044
  open,
11729
12045
  workspaces,
11730
12046
  archivedSessionIds,
@@ -11734,6 +12050,7 @@ const official = ((require$1) => {
11734
12050
  t
11735
12051
  }) : groupBy === "flat" ? (0, react_jsx_runtime$1.jsx)(FlatList, {
11736
12052
  useSessions,
12053
+ useSessionPendingInteraction,
11737
12054
  open,
11738
12055
  forkSession,
11739
12056
  onSessionRename,
@@ -11747,6 +12064,7 @@ const official = ((require$1) => {
11747
12064
  t
11748
12065
  }) : (0, react_jsx_runtime$1.jsx)(SessionTree, {
11749
12066
  useSessions,
12067
+ useSessionPendingInteraction,
11750
12068
  onSessionRename,
11751
12069
  onSessionArchive,
11752
12070
  forkSession,
@@ -11982,6 +12300,7 @@ const official = ((require$1) => {
11982
12300
  "status.planReview": "计划待审",
11983
12301
  "status.waitingAnswer": "等待回答",
11984
12302
  "status.completed": "已完成",
12303
+ "schedule.active": "有活动定时任务",
11985
12304
  "hover.created": "创建于 {time}",
11986
12305
  "hover.copied": "已复制",
11987
12306
  "date.ymd": "{y}年{m}月{d}日",
@@ -12055,6 +12374,7 @@ const official = ((require$1) => {
12055
12374
  "status.planReview": "Plan awaiting review",
12056
12375
  "status.waitingAnswer": "Waiting for answer",
12057
12376
  "status.completed": "Completed",
12377
+ "schedule.active": "Has active scheduled task",
12058
12378
  "hover.created": "Created {time}",
12059
12379
  "hover.copied": "Copied",
12060
12380
  "date.ymd": "{y}-{m}-{d}",
@@ -12081,7 +12401,8 @@ const official = ((require$1) => {
12081
12401
  "sessions",
12082
12402
  "workspaces",
12083
12403
  "locale",
12084
- "connection"
12404
+ "remote",
12405
+ "remote.directoryPicker"
12085
12406
  ];
12086
12407
  /**
12087
12408
  * Register the browser and picker once their slot declarations are on the
@@ -12090,13 +12411,16 @@ const official = ((require$1) => {
12090
12411
  * @param ctx - client root context.
12091
12412
  */
12092
12413
  function apply$3(ctx) {
12093
- const hostDescription = ctx.get("connection").hostDescription;
12414
+ const sessions = ctx.get("sessions");
12415
+ const workspaces = ctx.get("workspaces");
12416
+ const uiWorkspace = new UiWorkspaceService(ctx, ctx.remote.directoryPicker, workspaces, sessions);
12417
+ ctx.slots.provideRoot({ hooks: { workspaces: workspaces.list } });
12094
12418
  ctx.effect(() => ctx.locale.register(NS, {
12095
12419
  zh,
12096
12420
  en
12097
12421
  }), "ui-workspace: dictionaries");
12098
12422
  const searchSessions = async (query, signal) => {
12099
- const result = await ctx.sessions.search(query, signal);
12423
+ const result = await sessions.search(query, signal);
12100
12424
  if (!result.ok) throw new Error(result.error.message);
12101
12425
  return result.value;
12102
12426
  };
@@ -12105,53 +12429,57 @@ const official = ((require$1) => {
12105
12429
  subscribe: (listener) => ctx.slots.subscribe(hole, listener)
12106
12430
  });
12107
12431
  const browserFlowSource = flowSource("sidebar.workspaces.directoryFlow");
12432
+ const hostInfo = {
12433
+ getSnapshot: () => ctx.remote.$host,
12434
+ subscribe: (listener) => ctx.on("connection/reset", listener)
12435
+ };
12108
12436
  const pickerFlowSource = flowSource("conversation.hero.workspace.directoryFlow");
12109
12437
  const browserInjected = () => ({
12110
12438
  startSession: (workspaceId) => {
12111
- ctx.workspaces.startSession(workspaceId);
12439
+ uiWorkspace.startSession(workspaceId);
12112
12440
  },
12113
12441
  open: (sessionId) => {
12114
- ctx.sessions.open(sessionId);
12442
+ sessions.open(sessionId);
12115
12443
  },
12116
12444
  searchSessions,
12117
- searchResultLimit: ctx.sessions.searchResultLimit,
12445
+ searchResultLimit: sessions.searchResultLimit,
12118
12446
  renameSession: async (sessionId, title) => {
12119
- const session = ctx.sessions.binding(sessionId)?.session;
12447
+ const session = sessions.binding(sessionId)?.session;
12120
12448
  if (session === void 0) throw new Error(`unknown session "${sessionId}"`);
12121
12449
  const result = await session.rename(title);
12122
12450
  if (!result.ok) throw new Error(result.error.message);
12123
12451
  },
12124
12452
  forkSession: (sessionId) => {
12125
- ctx.sessions.fork({
12453
+ sessions.fork({
12126
12454
  sessionId,
12127
12455
  increaseTitle: true
12128
12456
  }).then((childId) => {
12129
- ctx.sessions.open(childId);
12457
+ sessions.open(childId);
12130
12458
  }).catch(() => {});
12131
12459
  },
12132
12460
  renameWorkspace: async (workspaceId, title) => {
12133
- await ctx.workspaces.rename(workspaceId, title);
12461
+ await workspaces.rename(workspaceId, title);
12134
12462
  },
12135
12463
  deleteWorkspace: async (workspaceId) => {
12136
- await ctx.workspaces.delete(workspaceId);
12464
+ await workspaces.delete(workspaceId);
12137
12465
  },
12138
12466
  insertWorkspaceBefore: async (workspaceId, beforeWorkspaceId) => {
12139
- await ctx.workspaces.insertBefore(workspaceId, beforeWorkspaceId);
12467
+ await workspaces.insertBefore(workspaceId, beforeWorkspaceId);
12140
12468
  },
12141
12469
  archiveSession: async (sessionId) => {
12142
- await ctx.workspaces.archiveSession(sessionId);
12470
+ await uiWorkspace.archiveSession(sessionId);
12143
12471
  },
12144
12472
  insertSessionBefore: async (workspaceId, sessionId, beforeSessionId) => {
12145
- await ctx.workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId);
12473
+ await workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId);
12146
12474
  },
12147
- createWorkspace: (input) => ctx.workspaces.create(input),
12475
+ createWorkspace: (input) => workspaces.create(input),
12148
12476
  hooks: {
12149
12477
  directoryFlow: browserFlowSource,
12150
- hostDescription
12478
+ hostInfo
12151
12479
  }
12152
12480
  });
12153
12481
  const pickerInjected = () => ({
12154
- createWorkspace: (input) => ctx.workspaces.create(input),
12482
+ createWorkspace: (input) => workspaces.create(input),
12155
12483
  hooks: { directoryFlow: pickerFlowSource }
12156
12484
  });
12157
12485
  ctx.slots.inject("sidebar.workspaces", () => ctx.slots.register({
@@ -12394,62 +12722,6 @@ function registerManagedWorkspaceSidebar(ctx, adapter) {
12394
12722
  apply$2(officialContextProxy(ctx, adapter));
12395
12723
  }
12396
12724
 
12397
- //#endregion
12398
- //#region src/client/index.tsx
12399
- const WORKTREE_CONSOLE_ADAPTER_SERVICE = "worktreeConsole";
12400
- /** Required client services. */
12401
- const inject$1 = [
12402
- "slots",
12403
- "workspaces",
12404
- "sessions",
12405
- "conversation",
12406
- "connection",
12407
- "locale"
12408
- ];
12409
- function servicesOf(ctx) {
12410
- return {
12411
- workspaces: ctx.get("workspaces"),
12412
- sessions: ctx.get("sessions"),
12413
- conversation: ctx.get("conversation")
12414
- };
12415
- }
12416
- /** Register replay-stable keyed rows and one scoped stylesheet. */
12417
- function apply$1(ctx, adapterOverride) {
12418
- const services = servicesOf(ctx);
12419
- const adapter = adapterOverride ?? ctx.get(WORKTREE_CONSOLE_ADAPTER_SERVICE);
12420
- ctx.effect(() => {
12421
- const style = document.createElement("style");
12422
- style.dataset.dshGitWorktree = "true";
12423
- style.textContent = `${WORKTREE_STYLES}\n${TARGET_CONSOLE_STYLES}`;
12424
- document.head.append(style);
12425
- return () => {
12426
- style.remove();
12427
- };
12428
- }, "dsh-git-worktree: styles");
12429
- const CreateRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeCreateRow, {
12430
- ...props,
12431
- services
12432
- });
12433
- const ReviewRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeReviewRow, {
12434
- ...props,
12435
- services,
12436
- adapter
12437
- });
12438
- ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
12439
- name: "tool.call.toolview",
12440
- key: "worktree_create"
12441
- }, CreateRow));
12442
- ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
12443
- name: "tool.call.toolview",
12444
- key: "worktree_ready_for_review"
12445
- }, ReviewRow));
12446
- if (adapter !== void 0) {
12447
- registerTargetConsole({ slots: ctx.slots }, adapter, services);
12448
- registerPreSessionWorktree({ slots: ctx.slots }, adapter, services);
12449
- registerManagedWorkspaceSidebar(ctx, adapter);
12450
- }
12451
- }
12452
-
12453
12725
  //#endregion
12454
12726
  //#region src/client/console-remote/adapter.ts
12455
12727
  function transport(message) {
@@ -12525,7 +12797,12 @@ function createWorktreeConsoleRemoteAdapter(remote) {
12525
12797
 
12526
12798
  //#endregion
12527
12799
  //#region src/client/console-remote/index.ts
12528
- const inject = [...inject$1, "remote"];
12800
+ /**
12801
+ * Activate on the same prerequisites as the official Workspace Client. The
12802
+ * conversation-dependent Worktree surfaces run in a child fiber below so the
12803
+ * Workspace service can break the uiConversation -> uiWorkspace boot edge.
12804
+ */
12805
+ const inject = [...inject$2];
12529
12806
  /** Mount the package-owned strict Remote contribution in this Client fiber. */
12530
12807
  async function apply(ctx) {
12531
12808
  const disposeRemote = await ctx.remote.$mount(remote_default);
@@ -12534,7 +12811,10 @@ async function apply(ctx) {
12534
12811
  if (remote === void 0) throw new Error("Worktree Console Remote namespace 挂载失败");
12535
12812
  const adapter = createWorktreeConsoleRemoteAdapter(remote);
12536
12813
  ctx.provide("worktreeConsole", adapter);
12537
- apply$1(ctx, adapter);
12814
+ registerManagedWorkspaceSidebar(ctx, adapter);
12815
+ ctx.inject(inject$1, (child) => {
12816
+ apply$1(child, adapter);
12817
+ });
12538
12818
  }
12539
12819
 
12540
12820
  //#endregion