@narumitw/pi-subagents 3.3.0 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,7 +67,7 @@ In TUI mode, each active-job row shows a preview of its existing `task` after th
67
67
  The preview removes terminal controls, collapses whitespace, and uses at most 40 terminal columns, including an ellipsis when shortened.
68
68
  It describes the assigned task, not live child activity; the full task sent to the child is unchanged.
69
69
  Task text is visible in this local widget, but `subagent_inspect` continues to omit it.
70
- Rows are clipped to the available terminal width, so trailing state, timing, or tools can be hidden on narrow terminals.
70
+ Rows are clipped to the available terminal width, so trailing state, thinking level, timing, or tools can be hidden on narrow terminals.
71
71
 
72
72
  Use messaging only when needed:
73
73
 
@@ -79,7 +79,9 @@ Completion messages and child requests and responses follow Pi's global tool-out
79
79
  Collapsed messages show a summary and the configured expansion key; expanded messages show the full content.
80
80
  This display state does not change the content sent to the model.
81
81
 
82
- In TUI mode, the above-editor widget shows each queued or running job's ID, state, elapsed time, timeout, and selected core and extension tool names.
82
+ In TUI mode, the above-editor widget shows each queued or running job's ID, state, thinking level, elapsed time, timeout, and selected core and extension tool names.
83
+ The `thinking: <level>` field shows the resolved configuration passed at spawn, including `off`, even when IDs, timing, and tools are hidden.
84
+ Later main-agent changes do not change this field; it does not track child-side normalization or later setting changes.
83
85
  It omits fixed communication tools, attachment paths, and resource totals, disappears when no jobs remain active, and clears when the session ends.
84
86
 
85
87
  ## 💬 Commands
@@ -4,14 +4,13 @@
4
4
  // src/settings-ui.ts
5
5
  import { stripVTControlCharacters } from "node:util";
6
6
  import { getSettingsListTheme } from "@earendil-works/pi-coding-agent";
7
+ import { Key, matchesKey, SettingsList, Text } from "@earendil-works/pi-tui";
7
8
  import {
8
- Key,
9
- matchesKey,
10
- SettingsList,
11
- Text,
12
- truncateToWidth
13
- } from "@earendil-works/pi-tui";
14
- import { HorizontalRule, renderBoundedFrame, runCustomInteraction, sanitizeTerminalText } from "@narumitw/pi-tui-kit";
9
+ HorizontalRule,
10
+ renderBoundedFrameLayout,
11
+ runCustomInteraction,
12
+ sanitizeTerminalText
13
+ } from "@narumitw/pi-tui-kit";
15
14
  var SETTINGS = [
16
15
  { key: "showWidget", label: "Show widget", description: "Show subagent jobs above the editor." },
17
16
  { key: "showJobId", label: "Show job ID", description: "Show job IDs in the widget." },
@@ -117,30 +116,20 @@ async function showSubagentSettings(ctx, options) {
117
116
  contentHeight = content.length;
118
117
  const focusedRow = content.findIndex((line) => stripVTControlCharacters(line).startsWith("\u2192"));
119
118
  mouseRows.clear();
120
- const tokens = /* @__PURE__ */ new Map();
121
- const layout = content.map((line, index) => {
122
- if (!stripVTControlCharacters(line).trim()) return line;
123
- const token = `content:${index}`;
124
- tokens.set(token, index);
125
- return token;
126
- });
127
119
  const terminalRows = Number.isFinite(tui.terminal.rows) ? Math.floor(tui.terminal.rows) : 24;
128
- const frame = renderBoundedFrame({
129
- width: Math.max(renderedWidth, `content:${content.length}`.length),
120
+ const frame = renderBoundedFrameLayout({
121
+ width: renderedWidth,
130
122
  maxRows: Math.max(1, terminalRows - 3),
131
123
  rule: rule.render(renderedWidth)[0] ?? "",
132
124
  title: new Text(theme.fg("accent", theme.bold("Subagents Settings")), 0, 0).render(renderedWidth),
133
125
  context: [theme.fg("muted", "Saved changes apply immediately.")],
134
- content: layout,
126
+ content,
135
127
  hints: new Text(theme.fg("muted", "Ctrl+C close"), 0, 0).render(renderedWidth),
136
128
  priorityRows: focusedRow < 0 ? [] : [focusedRow],
137
129
  focusedRow
138
130
  });
139
- return frame.map((line, row) => {
140
- const nativeRow = tokens.get(line);
141
- if (nativeRow !== void 0) mouseRows.set(row, nativeRow);
142
- return truncateToWidth(nativeRow === void 0 ? line : content[nativeRow] ?? "", renderedWidth, "");
143
- });
131
+ for (const { frameIndex, contentIndex } of frame.contentRows) mouseRows.set(frameIndex, contentIndex);
132
+ return frame.lines;
144
133
  },
145
134
  invalidate() {
146
135
  mouseRows.clear();
@@ -193,4 +182,4 @@ async function showSubagentSettings(ctx, options) {
193
182
  export {
194
183
  showSubagentSettings
195
184
  };
196
- //# sourceMappingURL=settings-ui-PSEYB6JX.ts.map
185
+ //# sourceMappingURL=settings-ui-24GHO6E2.ts.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/settings-ui.ts"],
4
+ "sourcesContent": ["import { stripVTControlCharacters } from \"node:util\";\nimport { type ExtensionCommandContext, getSettingsListTheme } from \"@earendil-works/pi-coding-agent\";\nimport { Key, matchesKey, type SettingItem, SettingsList, Text, type TuiMouseEvent } from \"@earendil-works/pi-tui\";\nimport {\n HorizontalRule,\n renderBoundedFrameLayout,\n runCustomInteraction,\n sanitizeTerminalText,\n} from \"@narumitw/pi-tui-kit\";\nimport type { SubagentSettings } from \"./settings.js\";\n\ninterface SubagentSettingsUIOptions {\n signal: AbortSignal;\n isCurrent(): boolean;\n get(): SubagentSettings;\n save(key: keyof SubagentSettings, value: boolean, signal: AbortSignal): Promise<SubagentSettings>;\n apply(settings: SubagentSettings): void;\n}\n\ntype CloseReason = \"back\" | \"close\" | \"stale\";\n\nconst SETTINGS: { key: keyof SubagentSettings; label: string; description: string }[] = [\n { key: \"showWidget\", label: \"Show widget\", description: \"Show subagent jobs above the editor.\" },\n { key: \"showJobId\", label: \"Show job ID\", description: \"Show job IDs in the widget.\" },\n { key: \"showTools\", label: \"Show tools\", description: \"Show active tools in the widget.\" },\n { key: \"showTiming\", label: \"Show timing\", description: \"Show job timing in the widget.\" },\n];\n\nexport async function showSubagentSettings(\n ctx: ExtensionCommandContext,\n options: SubagentSettingsUIOptions,\n): Promise<CloseReason> {\n const result = await runCustomInteraction<CloseReason>(ctx, {\n signal: options.signal,\n isCurrent: options.isCurrent,\n // The command owner reports interaction failures and non-TUI settings paths.\n onError: () => {},\n create({ tui, theme, signal, complete }) {\n let queue = Promise.resolve();\n const current = () => !signal.aborted && options.isCurrent();\n const revisions = new Map<string, number>();\n const pending = new Map<string, number>();\n const mouseRows = new Map<number, number>();\n let renderedWidth = 0;\n let contentHeight = 0;\n let mousePressed = false;\n const reportFailure = (message: string) => {\n if (!current()) return;\n try {\n ctx.ui.notify(sanitizeTerminalText(`Could not save pi-subagents.json: ${message}`), \"error\");\n } catch {\n // The host can dispose its notifier after the ownership check.\n }\n };\n const rule = new HorizontalRule({ ruleStyle: (text) => theme.fg(\"border\", text) });\n // Keep native SettingsList semantics, but use this screen's callback theme.\n const listTheme = {\n ...getSettingsListTheme(),\n label: (text: string, selected: boolean) => (selected ? theme.fg(\"accent\", text) : text),\n value: (text: string, selected: boolean) => theme.fg(selected ? \"accent\" : \"muted\", text),\n description: (text: string) => theme.fg(\"dim\", text),\n cursor: theme.fg(\"accent\", \"\u2192 \"),\n hint: (text: string) => theme.fg(\"dim\", text),\n };\n const initial = options.get();\n const items: SettingItem[] = SETTINGS.map(({ key, label, description }) => ({\n id: key,\n label,\n description,\n currentValue: String(initial[key]),\n values: [\"true\", \"false\"],\n }));\n const list = new SettingsList(\n items,\n items.length,\n listTheme,\n (id, value) => {\n if (!current()) return;\n const key = id as keyof SubagentSettings;\n const revision = (revisions.get(id) ?? 0) + 1;\n revisions.set(id, revision);\n pending.set(id, revision);\n queue = queue\n .then(async () => {\n if (!current()) {\n complete(\"stale\");\n return;\n }\n const before = { ...options.get() };\n let effective = before;\n try {\n const settings = await options.save(key, value === \"true\", signal);\n // A successful rename is durable, even when closing aborted the save signal.\n if (!options.isCurrent()) {\n complete(\"stale\");\n return;\n }\n options.apply(settings);\n effective = options.get();\n } catch (error) {\n if (!options.isCurrent()) {\n complete(\"stale\");\n return;\n }\n let message = error instanceof Error ? error.message : String(error);\n try {\n options.apply(before);\n } catch (rollbackError) {\n message += `; could not restore effective settings: ${rollbackError instanceof Error ? rollbackError.message : String(rollbackError)}`;\n }\n reportFailure(message);\n }\n if (!current()) return;\n if (pending.get(id) === revision) pending.delete(id);\n // Saving rereads the full document, including unrelated manual edits. Keep newer\n // optimistic choices, but refresh every row with no outstanding user change.\n for (const { key: settingKey } of SETTINGS) {\n if (!pending.has(settingKey)) list.updateValue(settingKey, String(effective[settingKey]));\n }\n tui.requestRender();\n })\n .catch((error: unknown) => {\n // A failed action must not prevent later requests from entering the queue.\n reportFailure(error instanceof Error ? error.message : String(error));\n });\n },\n () => complete(\"back\"),\n );\n return {\n render(width: number) {\n if (!current()) complete(\"stale\");\n renderedWidth = Number.isFinite(width) ? Math.max(0, Math.floor(width)) : 0;\n listTheme.cursor = theme.fg(\"accent\", \"\u2192 \");\n // The native footer hardcodes keys. Advertise only the hard-cancel key owned here;\n // configured native navigation, change, and Back actions remain unchanged.\n const content = list.render(Math.max(4, renderedWidth)).slice(0, -2);\n contentHeight = content.length;\n const focusedRow = content.findIndex((line) => stripVTControlCharacters(line).startsWith(\"\u2192\"));\n mouseRows.clear();\n\n const terminalRows = Number.isFinite(tui.terminal.rows) ? Math.floor(tui.terminal.rows) : 24;\n const frame = renderBoundedFrameLayout({\n width: renderedWidth,\n maxRows: Math.max(1, terminalRows - 3),\n rule: rule.render(renderedWidth)[0] ?? \"\",\n title: new Text(theme.fg(\"accent\", theme.bold(\"Subagents Settings\")), 0, 0).render(renderedWidth),\n context: [theme.fg(\"muted\", \"Saved changes apply immediately.\")],\n content,\n hints: new Text(theme.fg(\"muted\", \"Ctrl+C close\"), 0, 0).render(renderedWidth),\n priorityRows: focusedRow < 0 ? [] : [focusedRow],\n focusedRow,\n });\n for (const { frameIndex, contentIndex } of frame.contentRows) mouseRows.set(frameIndex, contentIndex);\n return frame.lines;\n },\n invalidate() {\n mouseRows.clear();\n mousePressed = false;\n list.invalidate();\n },\n handleInput(data: string) {\n if (!current()) return complete(\"stale\");\n mouseRows.clear();\n mousePressed = false;\n if (matchesKey(data, Key.ctrl(\"c\"))) complete(\"close\");\n else {\n // SettingsList uses Pi's effective native keybindings for standard actions.\n list.handleInput(data);\n }\n tui.requestRender();\n },\n handleMouse(event: TuiMouseEvent) {\n if (!current()) {\n complete(\"stale\");\n return;\n }\n const nativeRow = mouseRows.get(event.y);\n if (nativeRow === undefined || event.x < 0 || event.x >= renderedWidth) {\n if (event.button === \"left\" && (event.type === \"press\" || event.type === \"click\")) mousePressed = false;\n return;\n }\n const nativeEvent = { ...event, y: nativeRow, width: renderedWidth, height: contentHeight };\n if (event.type === \"click\" && event.button === \"left\" && !mousePressed) {\n list.handleMouse({ ...nativeEvent, type: \"press\" });\n }\n const result = list.handleMouse(nativeEvent);\n if (event.type === \"press\" && event.button === \"left\") mousePressed = result?.handled === true;\n if (event.type === \"click\" || event.type === \"wheel\") mousePressed = false;\n if (result?.handled && result.render !== false) tui.requestRender();\n return result;\n },\n waitForPending() {\n return queue;\n },\n dispose() {\n mouseRows.clear();\n mousePressed = false;\n },\n };\n },\n });\n if (result.kind === \"error\") throw result.error;\n return result.kind === \"completed\" ? result.value : result.kind === \"unsupported\" ? \"back\" : \"stale\";\n}\n"],
5
+ "mappings": ";;;;AAAA,SAAS,gCAAgC;AACzC,SAAuC,4BAA4B;AACnE,SAAS,KAAK,YAA8B,cAAc,YAAgC;AAC1F;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,IAAM,WAAkF;AAAA,EACtF,EAAE,KAAK,cAAc,OAAO,eAAe,aAAa,uCAAuC;AAAA,EAC/F,EAAE,KAAK,aAAa,OAAO,eAAe,aAAa,8BAA8B;AAAA,EACrF,EAAE,KAAK,aAAa,OAAO,cAAc,aAAa,mCAAmC;AAAA,EACzF,EAAE,KAAK,cAAc,OAAO,eAAe,aAAa,iCAAiC;AAC3F;AAEA,eAAsB,qBACpB,KACA,SACsB;AACtB,QAAM,SAAS,MAAM,qBAAkC,KAAK;AAAA,IAC1D,QAAQ,QAAQ;AAAA,IAChB,WAAW,QAAQ;AAAA;AAAA,IAEnB,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,OAAO,EAAE,KAAK,OAAO,QAAQ,SAAS,GAAG;AACvC,UAAI,QAAQ,QAA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AAC/F;",
6
+ "names": ["result"]
7
+ }
package/dist/index.ts CHANGED
@@ -1889,6 +1889,7 @@ var SubagentRuntime = class {
1889
1889
  jobId: job.jobId,
1890
1890
  task: job.taskText,
1891
1891
  state: job.state,
1892
+ thinkingLevel: job.thinkingLevel,
1892
1893
  elapsedMs: Math.max(0, now - (job.startedAt ?? job.createdAt)),
1893
1894
  ...job.timeout !== void 0 ? { timeout: job.timeout } : {},
1894
1895
  tools: [...job.tools]
@@ -1930,6 +1931,7 @@ var SubagentRuntime = class {
1930
1931
  controller,
1931
1932
  tools: effectiveTools,
1932
1933
  taskText: input.task,
1934
+ thinkingLevel: input.thinkingLevel,
1933
1935
  terminal,
1934
1936
  resolveTerminal,
1935
1937
  controlReady,
@@ -2738,6 +2740,7 @@ function renderJob(job, theme, settings) {
2738
2740
  const tools = job.tools.length > 0 ? job.tools.map(sanitizeSubagentDisplayText).join(", ") : "none";
2739
2741
  const timeout = job.timeout === void 0 ? "no timeout" : formatSeconds(job.timeout);
2740
2742
  const details = [
2743
+ `thinking: ${sanitizeSubagentDisplayText(job.thinkingLevel)}`,
2741
2744
  ...settings.showTiming ? [`${formatSeconds(Math.floor(job.elapsedMs / 1e3))} / ${timeout}`] : [],
2742
2745
  ...settings.showTools ? [`tools: ${tools}`] : []
2743
2746
  ];
@@ -2746,7 +2749,7 @@ function renderJob(job, theme, settings) {
2746
2749
  }
2747
2750
  function widgetValue(jobs) {
2748
2751
  return jobs.map(
2749
- (job) => `${job.jobId}\0${job.task}\0${job.state}\0${Math.floor(job.elapsedMs / 1e3)}\0${job.timeout ?? ""}\0${job.tools.join(",")}`
2752
+ (job) => `${job.jobId}\0${job.task}\0${job.state}\0${job.thinkingLevel}\0${Math.floor(job.elapsedMs / 1e3)}\0${job.timeout ?? ""}\0${job.tools.join(",")}`
2750
2753
  ).join("\n");
2751
2754
  }
2752
2755
  function cloneDisplayJob(job) {
@@ -2785,7 +2788,7 @@ function subagents(pi, dependencies = {}) {
2785
2788
  ctx.ui.notify(sanitizeSubagentDisplayText(`Edit user settings: ${store.userPath}. Then run /reload.`), "info");
2786
2789
  return "back";
2787
2790
  }
2788
- const { showSubagentSettings } = await import("./chunks/settings-ui-PSEYB6JX.ts");
2791
+ const { showSubagentSettings } = await import("./chunks/settings-ui-24GHO6E2.ts");
2789
2792
  if (signal.aborted || !isCurrent()) return "stale";
2790
2793
  return showSubagentSettings(ctx, {
2791
2794
  signal,