@shanepadgett/tau-agent 0.11.0 → 0.11.1
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.
|
@@ -271,7 +271,7 @@ export function createExploreReadTool(
|
|
|
271
271
|
) {
|
|
272
272
|
rowState.watch(context.toolCallId, context.invalidate);
|
|
273
273
|
const text = (context.lastComponent as Text | undefined) ?? new Text("", 0, 0);
|
|
274
|
-
if (context.executionStarted) {
|
|
274
|
+
if (context.executionStarted || !context.isPartial) {
|
|
275
275
|
text.setText("");
|
|
276
276
|
return text;
|
|
277
277
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: generalist
|
|
3
3
|
description: Handle focused analysis, review, implementation, or mixed tasks when no narrower agent fits; specify scope and depth
|
|
4
4
|
tools:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
model: openai-codex/gpt-5.
|
|
5
|
+
- read
|
|
6
|
+
- patch
|
|
7
|
+
- grep
|
|
8
|
+
- find
|
|
9
|
+
- ls
|
|
10
|
+
model: openai-codex/gpt-5.6-sol
|
|
11
11
|
thinking: high
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -178,6 +178,7 @@ export default function subagentExtension(pi: ExtensionAPI): void {
|
|
|
178
178
|
renderCall(args, theme, context) {
|
|
179
179
|
return renderSubagentCall(args, theme, {
|
|
180
180
|
executionStarted: context.executionStarted,
|
|
181
|
+
isPartial: context.isPartial,
|
|
181
182
|
lastComponent: context.lastComponent,
|
|
182
183
|
rowState,
|
|
183
184
|
rowId: context.toolCallId,
|
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import { Text,
|
|
2
|
+
import { Text, type Component } from "@earendil-works/pi-tui";
|
|
3
3
|
import { formatToolRowTitle, type ToolRowStateStore } from "../../shared/tool-row-state.js";
|
|
4
4
|
import type { SubagentDetails } from "./run.ts";
|
|
5
5
|
|
|
6
6
|
const cap = (text: string | undefined, length = 240) =>
|
|
7
7
|
!text ? "" : text.length <= length ? text : `${text.slice(0, length - 1)}…`;
|
|
8
|
-
|
|
9
|
-
private readonly text = new Text("", 0, 0);
|
|
10
|
-
private value = "";
|
|
11
|
-
private truncate = false;
|
|
12
|
-
setText(value: string, truncate = false): void {
|
|
13
|
-
this.value = value;
|
|
14
|
-
this.text.setText(value);
|
|
15
|
-
this.truncate = truncate;
|
|
16
|
-
}
|
|
17
|
-
render(width: number): string[] {
|
|
18
|
-
return this.truncate
|
|
19
|
-
? this.value.split("\n").map((line) => truncateToWidth(line, width))
|
|
20
|
-
: this.text.render(width);
|
|
21
|
-
}
|
|
22
|
-
invalidate(): void {
|
|
23
|
-
this.text.invalidate();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const component = (last: unknown) => (last as SubagentText | undefined) ?? new SubagentText();
|
|
8
|
+
const component = (last: unknown) => (last as Text | undefined) ?? new Text("", 0, 0);
|
|
27
9
|
const title = (theme: Theme, rowState: ToolRowStateStore, rowId: string, invalidate: () => void) => {
|
|
28
10
|
rowState.watch(rowId, invalidate);
|
|
29
11
|
return formatToolRowTitle(rowState, rowId, "subagent", theme);
|
|
@@ -34,6 +16,7 @@ export function renderSubagentCall(
|
|
|
34
16
|
theme: Theme,
|
|
35
17
|
context: {
|
|
36
18
|
executionStarted: boolean;
|
|
19
|
+
isPartial: boolean;
|
|
37
20
|
lastComponent?: unknown;
|
|
38
21
|
rowState: ToolRowStateStore;
|
|
39
22
|
rowId: string;
|
|
@@ -41,14 +24,14 @@ export function renderSubagentCall(
|
|
|
41
24
|
},
|
|
42
25
|
): Component {
|
|
43
26
|
const text = component(context.lastComponent);
|
|
44
|
-
if (context.executionStarted) {
|
|
27
|
+
if (context.executionStarted || !context.isPartial) {
|
|
45
28
|
text.setText("");
|
|
46
29
|
return text;
|
|
47
30
|
}
|
|
48
|
-
|
|
49
|
-
`${title(theme, context.rowState, context.rowId, context.invalidate)} ${theme.fg("accent", args.agent ?? "")}
|
|
50
|
-
|
|
51
|
-
);
|
|
31
|
+
const prefix =
|
|
32
|
+
`${title(theme, context.rowState, context.rowId, context.invalidate)} ${theme.fg("accent", args.agent ?? "")}`.trimEnd();
|
|
33
|
+
const task = args.task?.replace(/\s+/g, " ").trim();
|
|
34
|
+
text.setText(task ? `${prefix} ${theme.fg("muted", task)}` : prefix);
|
|
52
35
|
return text;
|
|
53
36
|
}
|
|
54
37
|
|
|
@@ -66,7 +49,7 @@ export function renderSubagentResult(
|
|
|
66
49
|
}
|
|
67
50
|
const header = `${title(theme, context.rowState, context.rowId, context.invalidate)} ${theme.fg("accent", details.agent)} ${theme.fg("muted", `$${details.usage.cost.toFixed(4)} · ${(details.durationMs / 1000).toFixed(1)}s · ${details.toolCalls} tools`)}`;
|
|
68
51
|
if (!expanded) {
|
|
69
|
-
text.setText(`${header}
|
|
52
|
+
text.setText(`${header} ${theme.fg("muted", details.task.replace(/\s+/g, " ").trim())}`);
|
|
70
53
|
return text;
|
|
71
54
|
}
|
|
72
55
|
const lines = [header, theme.fg("muted", `Task: ${cap(details.task, 1000)}`)];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shanepadgett/tau-agent",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Tau is a custom agentic harness built with pi extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@shanepadgett/tau-tui": "0.11.
|
|
31
|
+
"@shanepadgett/tau-tui": "0.11.1",
|
|
32
32
|
"@toon-format/toon": "2.3.0",
|
|
33
33
|
"smol-toml": "1.7.0"
|
|
34
34
|
},
|