@aiwayds/dsh-opentui 0.18.4 → 0.18.6

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/CHANGELOG.md CHANGED
@@ -5,6 +5,41 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.18.6] - 2026-11-17
9
+
10
+ ### Changed
11
+ - The hints bar keeps `ctrl+g subagents panel` on narrow terminals: the segment
12
+ now outranks history and newline, so 80-column layouts show it next to
13
+ `ctrl+c ×2 quit`. `alt+enter newline` yields first.
14
+ - The publish-landed check waits up to 20 minutes (10s/20s/60s backoff) instead
15
+ of 6, and its failure message explains how to confirm the registry directly and
16
+ re-run only the failed steps. Provenance publishes are queued asynchronously by
17
+ npm and 0.18.5 failed this check while the package was in fact landing.
18
+
19
+ ## [0.18.5] - 2026-11-16
20
+
21
+ ### Added
22
+ - `/stop` command: stops the active turn and every running subagent, matching
23
+ the double-Esc confirmation. It is a no-op on an idle session — `interrupt()`
24
+ clears the session binding, so it is only issued while a turn is running.
25
+ - `ctrl+g` opens the subagent activity panel (`/subagents`); `session.first`
26
+ moves to `ctrl+home` (`home`/`alt+home` still work).
27
+
28
+ ### Fixed
29
+ - The todo panel's right border was drawn two columns short: already-sized
30
+ content rows were re-clipped by `clipToWidth`, whose whitespace pattern
31
+ lacked the `g` flag and collapsed only the first run of spaces. Rows now go
32
+ through `takeWidth`, which never rewrites interior whitespace.
33
+ - The footer `msgs` segment stayed hidden for the entire first turn of a fresh
34
+ session: remote info was only refreshed on mount and after the turn ended, so
35
+ the count was still unknown while the turn ran. The first streaming delta (and
36
+ the first tool run) now triggers a throttled re-read.
37
+ - The `/subagents` transcript layer ignored `x` (stop one child) and `Enter`
38
+ (steer): the panel handle was a plain variable read by a reactive `enabled`
39
+ gate, so the layer's keymap never subscribed.
40
+ - The hints bar truncated mid-segment on narrow terminals, hiding
41
+ `esc stop` and `ctrl+c ×2 quit`. Segments are now dropped whole by priority.
42
+
8
43
  ## [0.18.4] - 2026-11-16
9
44
 
10
45
  ### Added
@@ -21875,6 +21875,7 @@ var init_keybind = __esm(() => {
21875
21875
  "session.toggle.exploration_grouping": keybind("none", "Toggle related tool call grouping"),
21876
21876
  "session.verbosity.cycle": keybind("none", "Cycle transcript verbosity"),
21877
21877
  "session.child.first": keybind("down", "Toggle subagent picker"),
21878
+ "session.subagents": keybind("ctrl+g", "Open the subagents activity panel"),
21878
21879
  "session.child.next": keybind("right", "Go to next child session"),
21879
21880
  "session.child.previous": keybind("left", "Go to previous child session"),
21880
21881
  "session.parent": keybind("up", "Go to parent session"),
@@ -21921,7 +21922,7 @@ var init_keybind = __esm(() => {
21921
21922
  "session.line.down": keybind("ctrl+alt+e", "Scroll messages down by one line"),
21922
21923
  "session.half.page.up": keybind("ctrl+alt+u", "Scroll messages up by half page"),
21923
21924
  "session.half.page.down": keybind("ctrl+alt+d", "Scroll messages down by half page"),
21924
- "session.first": keybind("ctrl+g,home,alt+home", "Navigate to first message"),
21925
+ "session.first": keybind("ctrl+home,home,alt+home", "Navigate to first message"),
21925
21926
  "session.last": keybind("ctrl+alt+g,end", "Navigate to last message"),
21926
21927
  "session.message.next": keybind("none", "Navigate to next message"),
21927
21928
  "session.message.previous": keybind("none", "Navigate to previous message"),
@@ -43133,6 +43134,25 @@ function truncate(str, len) {
43133
43134
  return str;
43134
43135
  return str.slice(0, len - 1) + "\u2026";
43135
43136
  }
43137
+ function graphemes(str) {
43138
+ return Array.from(graphemeSegmenter.segment(str), (item) => item.segment);
43139
+ }
43140
+ function takeWidth(str, width) {
43141
+ if (width <= 0)
43142
+ return "";
43143
+ if (stringWidth(str) <= width)
43144
+ return str;
43145
+ const result = [];
43146
+ let used = 0;
43147
+ for (const segment of graphemes(str)) {
43148
+ const next = stringWidth(segment);
43149
+ if (used + next > width)
43150
+ break;
43151
+ result.push(segment);
43152
+ used += next;
43153
+ }
43154
+ return result.join("");
43155
+ }
43136
43156
  function truncateLeft2(str, len) {
43137
43157
  if (str.length <= len)
43138
43158
  return str;
@@ -45146,12 +45166,12 @@ import {
45146
45166
  function toColor(value) {
45147
45167
  return typeof value === "function" ? value : parseColor2(value);
45148
45168
  }
45149
- var graphemes, SpinnerRenderable;
45169
+ var graphemes2, SpinnerRenderable;
45150
45170
  var init_spinner_renderable = __esm(() => {
45151
45171
  init_index_bun();
45152
45172
  init_string_width();
45153
45173
  init_spinner_frames();
45154
- graphemes = new Intl.Segmenter(undefined, { granularity: "grapheme" });
45174
+ graphemes2 = new Intl.Segmenter(undefined, { granularity: "grapheme" });
45155
45175
  SpinnerRenderable = class SpinnerRenderable extends Renderable5 {
45156
45176
  frameTexts = [];
45157
45177
  glyphs = [];
@@ -45174,7 +45194,7 @@ var init_spinner_renderable = __esm(() => {
45174
45194
  if (value.length === this.frameTexts.length && value.every((frame, index) => frame === this.frameTexts[index]))
45175
45195
  return;
45176
45196
  this.frameTexts = value;
45177
- this.glyphs = value.map((frame) => Array.from(graphemes.segment(frame), (part) => ({ char: part.segment, width: stringWidth(part.segment) })));
45197
+ this.glyphs = value.map((frame) => Array.from(graphemes2.segment(frame), (part) => ({ char: part.segment, width: stringWidth(part.segment) })));
45178
45198
  this.index = 0;
45179
45199
  const width = Math.max(0, ...this.glyphs.map((glyphs) => glyphs.reduce((sum, glyph) => sum + glyph.width, 0)));
45180
45200
  if (width !== this.frameWidth) {
@@ -46858,6 +46878,33 @@ var init_seam_rows = __esm(() => {
46858
46878
  init_motion();
46859
46879
  });
46860
46880
 
46881
+ // ../tui-base/src/routes/session/footer-refresh.ts
46882
+ function shouldRefreshFooter(remoteInfo, sessionId, inFlight) {
46883
+ return !inFlight && remoteInfo === undefined && sessionId !== undefined;
46884
+ }
46885
+ function initialFooterProbeState() {
46886
+ return { inFlight: false, attempts: 0, lastAttemptAt: 0 };
46887
+ }
46888
+ function shouldStartFooterProbe(remoteInfo, sessionId, state, now, budget = {}) {
46889
+ if (!shouldRefreshFooter(remoteInfo, sessionId, state.inFlight))
46890
+ return false;
46891
+ if (state.attempts >= (budget.maxAttempts ?? FOOTER_PROBE_MAX_ATTEMPTS))
46892
+ return false;
46893
+ if (state.lastAttemptAt !== 0 && now - state.lastAttemptAt < (budget.minIntervalMs ?? FOOTER_PROBE_MIN_INTERVAL_MS)) {
46894
+ return false;
46895
+ }
46896
+ return true;
46897
+ }
46898
+ function markFooterProbeStarted(state, now) {
46899
+ return { ...state, inFlight: true, attempts: state.attempts + 1, lastAttemptAt: now };
46900
+ }
46901
+ function settleFooterProbe(state, infoObtained) {
46902
+ if (infoObtained)
46903
+ return initialFooterProbeState();
46904
+ return { ...state, inFlight: false };
46905
+ }
46906
+ var FOOTER_PROBE_MAX_ATTEMPTS = 3, FOOTER_PROBE_MIN_INTERVAL_MS = 400;
46907
+
46861
46908
  // ../tui-base/src/routes/session/ask-options.ts
46862
46909
  function splitRecommended(raw) {
46863
46910
  const trimmed = raw.trim();
@@ -48290,7 +48337,7 @@ function WidgetsDock(props) {
48290
48337
  children: (line) => (() => {
48291
48338
  var _el$4 = createElement("text");
48292
48339
  setProp(_el$4, "wrapMode", "none");
48293
- insert(_el$4, () => clipToWidth(line.text, tableWidth()));
48340
+ insert(_el$4, () => takeWidth(line.text, tableWidth()));
48294
48341
  effect((_$p) => setProp(_el$4, "fg", fgFor(line.tone), _$p));
48295
48342
  return _el$4;
48296
48343
  })()
@@ -48457,6 +48504,7 @@ var init_widgets_dock = __esm(() => {
48457
48504
  init_terminal_size();
48458
48505
  init_tool_summarize();
48459
48506
  init_todo();
48507
+ init_locale();
48460
48508
  init_string_width();
48461
48509
  init_theme3();
48462
48510
  init_i18n();
@@ -49210,25 +49258,63 @@ function hintLabel(id, busy) {
49210
49258
  function hintInState(id, busy) {
49211
49259
  return hintLabel(id, busy) !== "";
49212
49260
  }
49213
- function hintsText(busy, shown = true, subagentsLive = false, hints = footerHints()) {
49261
+ function hintParts(busy, shown, subagentsLive, hints) {
49214
49262
  if (!shown)
49215
- return "";
49263
+ return [];
49216
49264
  const parts = [];
49217
49265
  for (const id of FOOTER_HINT_IDS) {
49218
49266
  if (id === "subagents") {
49219
- if (subagentsLive && hints.subagents)
49220
- parts.push(hintLabel("subagents", busy));
49267
+ if (subagentsLive && hints.subagents) {
49268
+ const label = hintLabel("subagents", busy);
49269
+ if (label)
49270
+ parts.push({
49271
+ id,
49272
+ label
49273
+ });
49274
+ }
49221
49275
  continue;
49222
49276
  }
49223
49277
  if (!hints[id])
49224
49278
  continue;
49225
49279
  const label = hintLabel(id, busy);
49226
49280
  if (label)
49227
- parts.push(label);
49281
+ parts.push({
49282
+ id,
49283
+ label
49284
+ });
49228
49285
  }
49286
+ return parts;
49287
+ }
49288
+ function joinHintParts(parts) {
49229
49289
  if (parts.length === 0)
49230
49290
  return "";
49231
- return `\u2328 ${parts.join(" \xB7 ")}`;
49291
+ return `\u2328 ${parts.map((p) => p.label).join(" \xB7 ")}`;
49292
+ }
49293
+ function hintsTextAtWidth(busy, shown, subagentsLive, columns, hints = footerHints()) {
49294
+ const parts = hintParts(busy, shown, subagentsLive, hints);
49295
+ const full = joinHintParts(parts);
49296
+ if (!full)
49297
+ return "";
49298
+ const usable = Math.max(8, columns - 2);
49299
+ if (stringWidth(full) <= usable)
49300
+ return full;
49301
+ const ranked = parts.map((part, index) => ({
49302
+ part,
49303
+ index
49304
+ })).sort((a, b) => HINT_SEGMENT_PRIORITY[a.part.id] - HINT_SEGMENT_PRIORITY[b.part.id] || a.index - b.index);
49305
+ const kept = [];
49306
+ let width = 0;
49307
+ for (const candidate of ranked) {
49308
+ const added = stringWidth(candidate.part.label) + (kept.length > 0 ? stringWidth(" \xB7 ") : stringWidth("\u2328 "));
49309
+ if (width + added > usable)
49310
+ break;
49311
+ width += added;
49312
+ kept.push(candidate);
49313
+ }
49314
+ if (kept.length === 0)
49315
+ return clipToWidth(full, usable);
49316
+ kept.sort((a, b) => a.index - b.index);
49317
+ return joinHintParts(kept.map((k) => k.part));
49232
49318
  }
49233
49319
  function transcriptHintsText(shown = true) {
49234
49320
  if (!shown)
@@ -49239,7 +49325,10 @@ function transcriptHintsText(shown = true) {
49239
49325
  function HintsLine(props) {
49240
49326
  const dimensions = useTerminalSize();
49241
49327
  const theme = useThemeOptional();
49242
- const row = () => clipToWidth(props.pane?.() === "transcript" ? transcriptHintsText(hintsShown()) : hintsText(props.busy, hintsShown(), subagentMarkerViews().some((v) => v.status === "running")), Math.max(8, dimensions().width - 2));
49328
+ const row = () => {
49329
+ const columns = dimensions().width;
49330
+ return props.pane?.() === "transcript" ? clipToWidth(transcriptHintsText(hintsShown()), Math.max(8, columns - 2)) : hintsTextAtWidth(props.busy, hintsShown(), subagentMarkerViews().some((v) => v.status === "running"), columns);
49331
+ };
49243
49332
  return createComponent2(Show, {
49244
49333
  get when() {
49245
49334
  return memo2(() => !!hintsShown())() && row().length > 0;
@@ -49258,7 +49347,7 @@ function HintsLine(props) {
49258
49347
  }
49259
49348
  });
49260
49349
  }
49261
- var hintsShown, setHintsShown, DEFAULT_FOOTER_HINTS, FOOTER_HINT_IDS, HINT_LOCALES, HINT_LABEL_KEYS, footerHints, setFooterHints, hintsLocale, setHintsLocale, TRANSCRIPT_HINT_KEY = "footer.hint.transcript";
49350
+ var hintsShown, setHintsShown, DEFAULT_FOOTER_HINTS, FOOTER_HINT_IDS, HINT_SEGMENT_PRIORITY, HINT_LOCALES, HINT_LABEL_KEYS, footerHints, setFooterHints, hintsLocale, setHintsLocale, TRANSCRIPT_HINT_KEY = "footer.hint.transcript";
49262
49351
  var init_hints_line = __esm(() => {
49263
49352
  init_index_bun();
49264
49353
  init_index_bun();
@@ -49271,6 +49360,7 @@ var init_hints_line = __esm(() => {
49271
49360
  init_i18n();
49272
49361
  init_terminal_size();
49273
49362
  init_tool_summarize();
49363
+ init_string_width();
49274
49364
  init_theme3();
49275
49365
  init_subagent_markers();
49276
49366
  [hintsShown, setHintsShown] = createSignal(true);
@@ -49279,12 +49369,24 @@ var init_hints_line = __esm(() => {
49279
49369
  newline: true,
49280
49370
  history: true,
49281
49371
  stop: true,
49372
+ subagentPanel: true,
49282
49373
  quit: true,
49283
49374
  scroll: true,
49284
49375
  search: true,
49285
49376
  subagents: true
49286
49377
  });
49287
- FOOTER_HINT_IDS = ["send", "newline", "history", "stop", "subagents", "search", "scroll", "quit"];
49378
+ FOOTER_HINT_IDS = ["send", "newline", "history", "stop", "subagentPanel", "subagents", "search", "scroll", "quit"];
49379
+ HINT_SEGMENT_PRIORITY = Object.freeze({
49380
+ send: 10,
49381
+ stop: 10,
49382
+ quit: 10,
49383
+ subagentPanel: 15,
49384
+ history: 20,
49385
+ newline: 30,
49386
+ subagents: 40,
49387
+ search: 60,
49388
+ scroll: 70
49389
+ });
49288
49390
  HINT_LOCALES = ["en", "zh-CN", "ja", "ko"];
49289
49391
  HINT_LABEL_KEYS = {
49290
49392
  send: {
@@ -49303,6 +49405,10 @@ var init_hints_line = __esm(() => {
49303
49405
  idle: null,
49304
49406
  busy: "footer.hint.stop.busy"
49305
49407
  },
49408
+ subagentPanel: {
49409
+ idle: "footer.hint.subagentPanel",
49410
+ busy: "footer.hint.subagentPanel"
49411
+ },
49306
49412
  quit: {
49307
49413
  idle: "footer.hint.quit",
49308
49414
  busy: "footer.hint.quit"
@@ -49928,6 +50034,24 @@ var init_turn_cancel = __esm(() => {
49928
50034
  init_i18n();
49929
50035
  });
49930
50036
 
50037
+ // ../tui-base/src/routes/session/stop-all.ts
50038
+ async function stopEverything(seam) {
50039
+ const turn = seam.status?.().turn;
50040
+ const parent = turn !== undefined && turn !== "idle";
50041
+ if (parent)
50042
+ seam.interrupt();
50043
+ let children = 0;
50044
+ for (const view of seam.subagentViews?.() ?? []) {
50045
+ if (view.status !== "running" || !seam.interruptChild)
50046
+ continue;
50047
+ try {
50048
+ await seam.interruptChild(view.id);
50049
+ children++;
50050
+ } catch {}
50051
+ }
50052
+ return { parent, children };
50053
+ }
50054
+
49931
50055
  // ../tui-base/src/routes/session/turn-overlay-controller.ts
49932
50056
  class TurnOverlayController {
49933
50057
  #approvals = [];
@@ -52808,6 +52932,22 @@ function coreCommands() {
52808
52932
  ctx.say(t("command.preset.set", { name: target.name }));
52809
52933
  await ctx.reload();
52810
52934
  }
52935
+ },
52936
+ {
52937
+ name: "/stop",
52938
+ description: t("command.stop.description"),
52939
+ async run(ctx) {
52940
+ const { parent, children } = await stopEverything(ctx.seam);
52941
+ if (!parent && children === 0) {
52942
+ ctx.say(t("command.stop.nothingRunning"));
52943
+ return;
52944
+ }
52945
+ const parts = [
52946
+ ...parent ? [t("turn.stop.confirmMain")] : [],
52947
+ ...children === 1 ? [t("turn.stop.confirmChildrenOne")] : children > 0 ? [t("turn.stop.confirmChildrenMany", { count: String(children) })] : []
52948
+ ];
52949
+ ctx.say(t("command.stop.done", { parts: parts.join(", ") }));
52950
+ }
52811
52951
  }
52812
52952
  ];
52813
52953
  }
@@ -55622,7 +55762,7 @@ var init_string_width2 = __esm(() => {
55622
55762
  });
55623
55763
 
55624
55764
  // ../panel-kit/src/text.ts
55625
- function graphemes2(value) {
55765
+ function graphemes3(value) {
55626
55766
  return Array.from(segmenter2.segment(value), (part) => part.segment);
55627
55767
  }
55628
55768
  function takeCells(value, width) {
@@ -55632,7 +55772,7 @@ function takeCells(value, width) {
55632
55772
  return value;
55633
55773
  const parts = [];
55634
55774
  let used = 0;
55635
- for (const part of graphemes2(value)) {
55775
+ for (const part of graphemes3(value)) {
55636
55776
  const cells = stringWidth2(part);
55637
55777
  if (used + cells > width)
55638
55778
  break;
@@ -56009,7 +56149,7 @@ var init_panel = __esm(() => {
56009
56149
  function useControlTheme() {
56010
56150
  return usePanelTheme();
56011
56151
  }
56012
- function graphemes3(text) {
56152
+ function graphemes4(text) {
56013
56153
  return Array.from(graphemeSegmenter2.segment(text), (part) => part.segment);
56014
56154
  }
56015
56155
  function truncateCells(text, width, keep = "tail") {
@@ -56020,7 +56160,7 @@ function truncateCells(text, width, keep = "tail") {
56020
56160
  if (width === 1)
56021
56161
  return "\u2026";
56022
56162
  const budget = width - 1;
56023
- const parts = graphemes3(text);
56163
+ const parts = graphemes4(text);
56024
56164
  const picked = [];
56025
56165
  let used = 0;
56026
56166
  if (keep === "tail") {
@@ -60540,7 +60680,7 @@ function SubagentsViewer(props) {
60540
60680
  const [scrollOffset, setScrollOffset] = createSignal(0);
60541
60681
  const [status, setStatus] = createSignal(undefined);
60542
60682
  let handle;
60543
- let transcriptHandle;
60683
+ const [transcriptHandle, setTranscriptHandle] = createSignal(undefined);
60544
60684
  let sequence = 0;
60545
60685
  let lastXPress = 0;
60546
60686
  let tickTimer;
@@ -60633,15 +60773,15 @@ function SubagentsViewer(props) {
60633
60773
  setScrollOffset(Number.MAX_SAFE_INTEGER);
60634
60774
  lastXPress = 0;
60635
60775
  setStatus(undefined);
60636
- transcriptHandle = panels.open(() => renderTranscript(), {
60776
+ setTranscriptHandle(panels.open(() => renderTranscript(), {
60637
60777
  id: `subagents-transcript-${++sequence}`,
60638
60778
  title: t("panel.subagents.title.transcript"),
60639
60779
  size: "xlarge",
60640
60780
  onClose: () => {
60641
- transcriptHandle = undefined;
60781
+ setTranscriptHandle(undefined);
60642
60782
  stopTicking();
60643
60783
  }
60644
- });
60784
+ }));
60645
60785
  startTicking();
60646
60786
  }
60647
60787
  function openSteer() {
@@ -60732,14 +60872,14 @@ function SubagentsViewer(props) {
60732
60872
  size: "xlarge",
60733
60873
  onClose: () => {
60734
60874
  handle = undefined;
60735
- if (transcriptHandle === undefined)
60875
+ if (transcriptHandle() === undefined)
60736
60876
  finish();
60737
60877
  }
60738
60878
  });
60739
60879
  });
60740
60880
  Keymap2.createLayer(() => ({
60741
60881
  mode: "global",
60742
- enabled: open() && transcriptHandle === undefined && handle?.ownsInput() === true && dialog.stack.length === 0,
60882
+ enabled: open() && transcriptHandle() === undefined && handle?.ownsInput() === true && dialog.stack.length === 0,
60743
60883
  priority: 2,
60744
60884
  commands: [{
60745
60885
  bind: "up,k",
@@ -60778,7 +60918,7 @@ function SubagentsViewer(props) {
60778
60918
  }));
60779
60919
  Keymap2.createLayer(() => ({
60780
60920
  mode: "global",
60781
- enabled: open() && transcriptHandle?.ownsInput() === true && dialog.stack.length === 0,
60921
+ enabled: open() && transcriptHandle()?.ownsInput() === true && dialog.stack.length === 0,
60782
60922
  priority: 2,
60783
60923
  commands: [{
60784
60924
  bind: "up,k",
@@ -61022,7 +61162,7 @@ var init_subagents_viewer = __esm(() => {
61022
61162
  import { TextAttributes as TextAttributes12 } from "@opentui/core";
61023
61163
  function resolveVersion() {
61024
61164
  try {
61025
- return "0.18.4";
61165
+ return "0.18.6";
61026
61166
  } catch {
61027
61167
  return "dev";
61028
61168
  }
@@ -63534,10 +63674,25 @@ function V2SessionPage(props) {
63534
63674
  }
63535
63675
  function V2SessionPageBody(props) {
63536
63676
  const seam = props.seam;
63677
+ const rawTurn = seam.turn.bind(seam);
63678
+ seam.turn = (userText, cb) => rawTurn(userText, {
63679
+ ...cb,
63680
+ onThinkingDelta: (text) => {
63681
+ refreshFooterIfUnknown();
63682
+ cb.onThinkingDelta?.(text);
63683
+ },
63684
+ onContentDelta: (text) => {
63685
+ refreshFooterIfUnknown();
63686
+ cb.onContentDelta?.(text);
63687
+ }
63688
+ });
63537
63689
  const projection = createSeamRows(seam, () => seam.currentSessionId() ?? "", {
63538
63690
  onApprove: (name, args) => overlays.requestApproval(name, args),
63539
63691
  onError: (message) => showNotice(`error: ${message}`, undefined, "error"),
63540
- onToolRun: () => setTools((n) => n + 1)
63692
+ onToolRun: () => {
63693
+ setTools((n) => n + 1);
63694
+ refreshFooterIfUnknown();
63695
+ }
63541
63696
  });
63542
63697
  const dialog = useDialog();
63543
63698
  const pageOwns = useIsPageOwner();
@@ -63643,12 +63798,7 @@ function V2SessionPageBody(props) {
63643
63798
  label: { confirm: t("turn.stop.confirmLabel"), cancel: t("turn.stop.cancelLabel") },
63644
63799
  onConfirm: () => {
63645
63800
  turnAborted = true;
63646
- seam.interrupt();
63647
- for (const view of seam.subagentViews?.() ?? []) {
63648
- if (view.status !== "running")
63649
- continue;
63650
- seam.interruptChild?.(view.id).catch(() => {});
63651
- }
63801
+ stopEverything(seam);
63652
63802
  }
63653
63803
  }, undefined, false, undefined, this), undefined, { tone: "warning" });
63654
63804
  };
@@ -63663,7 +63813,24 @@ function V2SessionPageBody(props) {
63663
63813
  };
63664
63814
  const ctxWindow = () => seam.contextWindow?.() ?? null;
63665
63815
  let footerRefreshSeq = 0;
63666
- const refreshFooterData = () => {
63816
+ let footerProbe = initialFooterProbeState();
63817
+ const resetFooterProbe = () => {
63818
+ footerProbe = initialFooterProbeState();
63819
+ };
63820
+ function refreshFooterIfUnknown() {
63821
+ const now = Date.now();
63822
+ if (!shouldStartFooterProbe(remoteInfo(), seam.currentSessionId(), footerProbe, now))
63823
+ return;
63824
+ footerProbe = markFooterProbeStarted(footerProbe, now);
63825
+ refreshFooterData((infoObtained) => {
63826
+ footerProbe = settleFooterProbe(footerProbe, infoObtained);
63827
+ });
63828
+ }
63829
+ createEffect(() => {
63830
+ if (remoteInfo() !== undefined)
63831
+ resetFooterProbe();
63832
+ });
63833
+ const refreshFooterData = (onSettled) => {
63667
63834
  const seq = ++footerRefreshSeq;
63668
63835
  let currentEffortWord;
63669
63836
  let labelEffortWord;
@@ -63702,6 +63869,7 @@ function V2SessionPageBody(props) {
63702
63869
  return;
63703
63870
  });
63704
63871
  Promise.resolve(seam.sessionInfo?.()).then((info) => {
63872
+ onSettled?.(!!info);
63705
63873
  if (seq !== footerRefreshSeq)
63706
63874
  return;
63707
63875
  if (!info) {
@@ -63713,6 +63881,7 @@ function V2SessionPageBody(props) {
63713
63881
  labelEffortWord = effortFromModelLabel(info.model);
63714
63882
  settleEffort();
63715
63883
  }).catch(() => {
63884
+ onSettled?.(false);
63716
63885
  if (seq !== footerRefreshSeq)
63717
63886
  return;
63718
63887
  settleEffort();
@@ -63720,6 +63889,7 @@ function V2SessionPageBody(props) {
63720
63889
  };
63721
63890
  createEffect(() => {
63722
63891
  if (!turnBusy()) {
63892
+ resetFooterProbe();
63723
63893
  refreshFooterData();
63724
63894
  refreshPresetLabel();
63725
63895
  }
@@ -63853,6 +64023,7 @@ function V2SessionPageBody(props) {
63853
64023
  resetSkinLineFades();
63854
64024
  const settled = projection.load(sessionId);
63855
64025
  seam.currentModelSelection().then(setModel);
64026
+ resetFooterProbe();
63856
64027
  refreshFooterData();
63857
64028
  refreshPresetLabel();
63858
64029
  setSkillRows(props.skills ?? []);
@@ -63875,6 +64046,7 @@ function V2SessionPageBody(props) {
63875
64046
  composerRef?.resetDeliveries();
63876
64047
  setComposerPending([]);
63877
64048
  setTools(0);
64049
+ resetFooterProbe();
63878
64050
  refreshFooterData();
63879
64051
  resetSkinLineFades();
63880
64052
  setSkillRows(props.skills ?? []);
@@ -63900,6 +64072,17 @@ function V2SessionPageBody(props) {
63900
64072
  themes: themeFace,
63901
64073
  flushQueue: () => composerRef?.flushQueue() ?? { kind: "empty", started: 0, remaining: 0 }
63902
64074
  }));
64075
+ Keymap2.createLayer(() => ({
64076
+ enabled: () => pageOwns(),
64077
+ commands: [
64078
+ {
64079
+ id: "session.subagents",
64080
+ title: "Subagents activity panel",
64081
+ group: "Session",
64082
+ run: () => slash.interceptSubmit("/subagents")
64083
+ }
64084
+ ]
64085
+ }));
63903
64086
  const overlayHost = createComponent2(TurnOverlayHost, {
63904
64087
  controller: overlays,
63905
64088
  reclaimFocus: () => {
@@ -64528,5 +64711,5 @@ export {
64528
64711
  themeNameFromConfig
64529
64712
  };
64530
64713
 
64531
- //# debugId=2E46D145BFA38F7364756E2164756E21
64714
+ //# debugId=9F082C1DF46CF56964756E2164756E21
64532
64715
  //# sourceMappingURL=index.js.map