pi-better-subagents 0.1.22 → 0.1.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-subagents",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "Pi extension for detached, sandboxed subagent runs that keep the foreground session free.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -108,7 +108,7 @@ export const CLOSE_ARM_MS = 3000;
108
108
  export const DEFAULT_LOG_TAIL_ROWS = 10;
109
109
  export const LOG_TAIL_ROW_CHOICES = [10, 25] as const;
110
110
  const MAIN_LIST_FALLBACK_WIDTH = 100;
111
- const DETAIL_OVERLAY_FOOTER_ROWS = 3;
111
+ const DETAIL_OVERLAY_BOTTOM_MARGIN_ROWS = 0;
112
112
  const EVIDENCE_SECTION_ID = "__evidence__";
113
113
  const RUNNING_DOT_GLYPH = "●";
114
114
 
@@ -152,7 +152,12 @@ export function unregisterBackgroundWorkProvider(id: string): void {
152
152
  }
153
153
 
154
154
  export function isNavigatorUiAvailable(ctx: ExtensionContext | undefined): boolean {
155
- return Boolean(ctx && ctx.mode === "tui" && ctx.hasUI === true && ctx.ui);
155
+ if (!ctx) return false;
156
+ try {
157
+ return Boolean(ctx.mode === "tui" && ctx.hasUI === true && ctx.ui);
158
+ } catch {
159
+ return false;
160
+ }
156
161
  }
157
162
 
158
163
  export function navigatorFooterHint(count: number): string | null {
@@ -191,8 +196,10 @@ export function disposeBackgroundWorkNavigator(ctx?: ExtensionContext): void {
191
196
  try { s.dispose?.(); } catch { /* ignore */ }
192
197
  s.dispose = undefined;
193
198
  stopMainListWidget();
194
- const ui = (ctx ?? s.uiCtx)?.ui;
195
- if (ui && isNavigatorUiAvailable(ctx ?? s.uiCtx)) {
199
+ const activeCtx = ctx ?? s.uiCtx;
200
+ s.uiCtx = undefined;
201
+ if (activeCtx && isNavigatorUiAvailable(activeCtx)) {
202
+ const ui = activeCtx.ui;
196
203
  try { applyNavigatorFooter(ui as any, 0); } catch { /* ignore */ }
197
204
  try { applyCloseConfirmFooter(ui as any, null); } catch { /* ignore */ }
198
205
  try { (ui as any).setWidget?.(MAIN_LIST_WIDGET_KEY, undefined); } catch { /* ignore */ }
@@ -204,10 +211,10 @@ export function disposeBackgroundWorkNavigator(ctx?: ExtensionContext): void {
204
211
  s.mainListDeadlineScheduler = undefined;
205
212
  s.mainListWidgetInstalled = false;
206
213
  s.mainListRequestRender = undefined;
214
+ s.editorComponent = undefined;
207
215
  s.detailOverlayRows = undefined;
208
216
  s.mainListSelectedId = undefined;
209
217
  s.mainListFocused = false;
210
- if (ctx && s.uiCtx === ctx) s.uiCtx = undefined;
211
218
  }
212
219
 
213
220
  export function refreshBackgroundWorkNavigator(ctx?: ExtensionContext): void {
@@ -1019,7 +1026,7 @@ function buildTranscriptDetailLines(
1019
1026
  }
1020
1027
 
1021
1028
  function detailOverlayOptions() {
1022
- const marginBottom = DETAIL_OVERLAY_FOOTER_ROWS;
1029
+ const marginBottom = DETAIL_OVERLAY_BOTTOM_MARGIN_ROWS;
1023
1030
  return {
1024
1031
  anchor: "top-left" as const,
1025
1032
  width: "100%" as const,