@shanepadgett/tau-agent 0.34.0 → 0.35.0
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/extensions/bash-approval/README.md +20 -0
- package/extensions/bash-approval/index.ts +235 -0
- package/extensions/bash-approval/settings.ts +24 -0
- package/extensions/checkpoint/checkpoint-budget.ts +1 -14
- package/extensions/checkpoint/checkpoint.ts +2 -0
- package/extensions/checkpoint/index.ts +1 -1
- package/extensions/checkpoint/messages.ts +1 -0
- package/extensions/commit/commit-plan.ts +2 -2
- package/extensions/reference/index.ts +2 -0
- package/extensions/reference/panel.ts +66 -15
- package/extensions/review/README.md +14 -6
- package/extensions/review/index.ts +67 -120
- package/extensions/review/model.ts +13 -33
- package/extensions/review/session.ts +9 -23
- package/extensions/soul/README.md +2 -2
- package/extensions/soul/index.ts +4 -4
- package/extensions/soul/prompt.ts +6 -10
- package/extensions/soul/settings.ts +6 -3
- package/extensions/subagent/agents/web-research.md +2 -2
- package/extensions/subagent/run.ts +6 -2
- package/extensions/tau-help/help.md +6 -2
- package/package.json +2 -2
- package/schemas/tau.schema.json +18 -2
- package/shared/isolated-session.ts +1 -1
- package/shared/model-effort.ts +14 -3
- package/extensions/review/panel.ts +0 -99
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { bindingHint, bindingsHint, rawHint, ScrollableMarkdown, ToolPanel } from "@shanepadgett/tau-tui";
|
|
2
|
-
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
3
|
-
import { type Component, type KeybindingsManager, truncateToWidth, type TUI } from "@earendil-works/pi-tui";
|
|
4
|
-
import { formatReviewMarkdown, reviewModeLabel, type ReviewMode, type ReviewRecord } from "./model.ts";
|
|
5
|
-
|
|
6
|
-
export class ReviewProgressPanel implements Component {
|
|
7
|
-
private readonly tui: TUI;
|
|
8
|
-
private readonly panel: ToolPanel;
|
|
9
|
-
private readonly lines: string[] = [];
|
|
10
|
-
|
|
11
|
-
constructor(tui: TUI, theme: Theme, mode: ReviewMode, keys: KeybindingsManager, cancel: () => void) {
|
|
12
|
-
this.tui = tui;
|
|
13
|
-
this.panel = new ToolPanel(theme, {
|
|
14
|
-
title: `${reviewModeLabel(mode)} review`,
|
|
15
|
-
secondary: "Fresh isolated review · hidden from parent context",
|
|
16
|
-
body: {
|
|
17
|
-
render: (width) =>
|
|
18
|
-
(this.lines.length ? this.lines.slice(-5) : ["Starting review"]).map((line) =>
|
|
19
|
-
truncateToWidth(theme.fg("muted", line), width, "…"),
|
|
20
|
-
),
|
|
21
|
-
invalidate() {},
|
|
22
|
-
},
|
|
23
|
-
footer: { kind: "hints", hints: [bindingHint("tui.select.cancel", "cancel")] },
|
|
24
|
-
border: "box",
|
|
25
|
-
});
|
|
26
|
-
this.handleInput = (data) => {
|
|
27
|
-
if (!keys.matches(data, "tui.select.cancel")) return;
|
|
28
|
-
cancel();
|
|
29
|
-
this.update("Cancelling review");
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
handleInput: (data: string) => void;
|
|
34
|
-
|
|
35
|
-
update(status: string): void {
|
|
36
|
-
if (this.lines.at(-1) !== status) {
|
|
37
|
-
this.lines.push(status);
|
|
38
|
-
if (this.lines.length > 5) this.lines.shift();
|
|
39
|
-
}
|
|
40
|
-
this.tui.requestRender();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
render(width: number): string[] {
|
|
44
|
-
return this.panel.render(width);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
invalidate(): void {
|
|
48
|
-
this.panel.invalidate();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type ReviewResultAction = "send" | "export" | "close";
|
|
53
|
-
|
|
54
|
-
export class ReviewResultPanel implements Component {
|
|
55
|
-
private readonly panel: ToolPanel;
|
|
56
|
-
private readonly body: ScrollableMarkdown;
|
|
57
|
-
|
|
58
|
-
constructor(
|
|
59
|
-
tui: TUI,
|
|
60
|
-
theme: Theme,
|
|
61
|
-
keys: KeybindingsManager,
|
|
62
|
-
review: ReviewRecord,
|
|
63
|
-
done: (action: ReviewResultAction) => void,
|
|
64
|
-
) {
|
|
65
|
-
this.body = new ScrollableMarkdown(tui, formatReviewMarkdown(review), 9);
|
|
66
|
-
this.panel = new ToolPanel(theme, {
|
|
67
|
-
title: `${reviewModeLabel(review.mode)} review · ${review.verdict}`,
|
|
68
|
-
secondary: `${review.findings.length} finding${review.findings.length === 1 ? "" : "s"} · not in parent context`,
|
|
69
|
-
body: this.body,
|
|
70
|
-
footer: {
|
|
71
|
-
kind: "hints",
|
|
72
|
-
hints: [
|
|
73
|
-
bindingsHint(["tui.select.up", "tui.select.down"], "scroll"),
|
|
74
|
-
rawHint("a", "send to agent"),
|
|
75
|
-
rawHint("e", "export"),
|
|
76
|
-
bindingHint("tui.select.cancel", "close"),
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
border: "box",
|
|
80
|
-
});
|
|
81
|
-
this.handleInput = (data) => {
|
|
82
|
-
if (keys.matches(data, "tui.select.up")) this.body.scroll(-1);
|
|
83
|
-
else if (keys.matches(data, "tui.select.down")) this.body.scroll(1);
|
|
84
|
-
else if (data === "a") done("send");
|
|
85
|
-
else if (data === "e") done("export");
|
|
86
|
-
else if (keys.matches(data, "tui.select.cancel")) done("close");
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
handleInput: (data: string) => void;
|
|
91
|
-
|
|
92
|
-
render(width: number): string[] {
|
|
93
|
-
return this.panel.render(width);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
invalidate(): void {
|
|
97
|
-
this.panel.invalidate();
|
|
98
|
-
}
|
|
99
|
-
}
|