@dungle-scrubs/tallow 0.8.27 → 0.9.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/README.md +42 -1
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +2 -9
- package/dist/install.js.map +1 -1
- package/dist/interactive-mode-patch.d.ts.map +1 -1
- package/dist/interactive-mode-patch.js +20 -9
- package/dist/interactive-mode-patch.js.map +1 -1
- package/dist/model-metadata-overrides.d.ts +2 -5
- package/dist/model-metadata-overrides.d.ts.map +1 -1
- package/dist/model-metadata-overrides.js +23 -12
- package/dist/model-metadata-overrides.js.map +1 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +20 -9
- package/dist/sdk.js.map +1 -1
- package/dist/workspace-transition-interactive.d.ts.map +1 -1
- package/dist/workspace-transition-interactive.js +53 -3
- package/dist/workspace-transition-interactive.js.map +1 -1
- package/dist/workspace-transition.d.ts +2 -1
- package/dist/workspace-transition.d.ts.map +1 -1
- package/dist/workspace-transition.js +16 -4
- package/dist/workspace-transition.js.map +1 -1
- package/extensions/__integration__/cd-tool-guidelines.test.ts +46 -0
- package/extensions/__integration__/welcome-screen.test.ts +240 -0
- package/extensions/_icons/__tests__/icons.test.ts +0 -1
- package/extensions/_icons/index.ts +0 -2
- package/extensions/_shared/pid-registry.ts +5 -5
- package/extensions/background-task-tool/index.ts +1 -1
- package/extensions/cd-tool/index.ts +4 -1
- package/extensions/context-fork/__tests__/context-fork.test.ts +9 -0
- package/extensions/edit-tool-enhanced/index.ts +3 -1
- package/extensions/health/__tests__/diagnostics.test.ts +25 -0
- package/extensions/health/index.ts +62 -1
- package/extensions/loop/__tests__/loop.test.ts +365 -1
- package/extensions/loop/index.ts +213 -3
- package/extensions/prompt-suggestions/__tests__/autocomplete.test.ts +111 -3
- package/extensions/prompt-suggestions/autocomplete.ts +23 -5
- package/extensions/prompt-suggestions/index.ts +62 -3
- package/extensions/read-tool-enhanced/index.ts +5 -1
- package/extensions/render-stabilizer/__tests__/render-stabilizer.test.ts +42 -0
- package/extensions/render-stabilizer/extension.json +5 -0
- package/extensions/render-stabilizer/index.ts +66 -0
- package/extensions/session-memory/index.ts +1 -1
- package/extensions/session-namer/index.ts +1 -1
- package/extensions/subagent-tool/__tests__/auto-cheap-model.test.ts +66 -6
- package/extensions/subagent-tool/__tests__/model-router-explicit-resolution.test.ts +79 -5
- package/extensions/subagent-tool/__tests__/presentation-rendering.test.ts +4 -4
- package/extensions/subagent-tool/index.ts +4 -2
- package/extensions/subagent-tool/process.ts +26 -8
- package/extensions/teams-tool/sessions/spawn.ts +2 -2
- package/extensions/welcome-screen/__tests__/welcome-screen.test.ts +35 -0
- package/extensions/welcome-screen/extension.json +20 -0
- package/extensions/welcome-screen/index.ts +189 -0
- package/node_modules/@mariozechner/pi-tui/dist/index.d.ts +2 -2
- package/node_modules/@mariozechner/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/index.js +2 -2
- package/node_modules/@mariozechner/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts +309 -25
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.js +392 -72
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts +30 -0
- package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keys.js +50 -6
- package/node_modules/@mariozechner/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts +27 -0
- package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal.js +59 -4
- package/node_modules/@mariozechner/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts +56 -0
- package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/tui.js +188 -5
- package/node_modules/@mariozechner/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/package.json +1 -1
- package/node_modules/@mariozechner/pi-tui/src/__tests__/mouse-events.test.ts +134 -0
- package/node_modules/@mariozechner/pi-tui/src/__tests__/tmux-compat.test.ts +204 -0
- package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-diff-regression.test.ts +49 -0
- package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-render-scheduling.test.ts +2 -0
- package/node_modules/@mariozechner/pi-tui/src/index.ts +11 -0
- package/node_modules/@mariozechner/pi-tui/src/keybindings.ts +478 -140
- package/node_modules/@mariozechner/pi-tui/src/keys.ts +84 -6
- package/node_modules/@mariozechner/pi-tui/src/terminal.ts +69 -4
- package/node_modules/@mariozechner/pi-tui/src/tui.ts +205 -5
- package/package.json +9 -9
- package/runtime/config.ts +7 -0
- package/runtime/model-metadata-overrides.ts +7 -0
- package/schemas/settings.schema.json +0 -5
- package/skills/tallow-expert/SKILL.md +6 -4
- package/extensions/plan-mode-tool/__tests__/e2e.mjs +0 -350
- package/extensions/plan-mode-tool/__tests__/index.test.ts +0 -213
- package/extensions/plan-mode-tool/__tests__/utils.test.ts +0 -381
- package/extensions/plan-mode-tool/extension.json +0 -22
- package/extensions/plan-mode-tool/index.ts +0 -583
- package/extensions/plan-mode-tool/utils.ts +0 -257
|
@@ -1414,14 +1414,16 @@ function renderSubagentCall(args: Record<string, unknown>, theme: Theme) {
|
|
|
1414
1414
|
|
|
1415
1415
|
const agentName = (args.agent as string) || "...";
|
|
1416
1416
|
const task = typeof args.task === "string" ? args.task : "...";
|
|
1417
|
-
|
|
1417
|
+
// Single mode: skip the redundant "subagent single" header — the result
|
|
1418
|
+
// renderer already shows "subagent running <duration> <agent>" with a spinner.
|
|
1419
|
+
// Just show the task preview so the user sees what was requested.
|
|
1418
1420
|
const metaLine = formatMetaLine(theme, [scopeEntry, model ? `model:${model}` : undefined]);
|
|
1419
1421
|
if (metaLine) appendSection(lines, [metaLine]);
|
|
1420
1422
|
appendSection(
|
|
1421
1423
|
lines,
|
|
1422
1424
|
[formatPresentationText(theme, "process_output", toCompactPreview(task, 200))],
|
|
1423
1425
|
{
|
|
1424
|
-
blankBefore:
|
|
1426
|
+
blankBefore: false,
|
|
1425
1427
|
}
|
|
1426
1428
|
);
|
|
1427
1429
|
return new Text(lines.join("\n"), 0, 0);
|
|
@@ -1049,8 +1049,13 @@ export async function spawnBackgroundSubagent(
|
|
|
1049
1049
|
buffer = lines.pop() || "";
|
|
1050
1050
|
for (const line of lines) {
|
|
1051
1051
|
if (!line.trim()) continue;
|
|
1052
|
+
// Strip leading terminal escape sequences — see foreground processLine.
|
|
1053
|
+
let cleaned = line;
|
|
1054
|
+
const jsonStart = cleaned.indexOf("{");
|
|
1055
|
+
if (jsonStart > 0) cleaned = cleaned.slice(jsonStart);
|
|
1056
|
+
else if (jsonStart < 0) continue;
|
|
1052
1057
|
try {
|
|
1053
|
-
const event = JSON.parse(
|
|
1058
|
+
const event = JSON.parse(cleaned);
|
|
1054
1059
|
|
|
1055
1060
|
// Emit subagent_tool_call when tool starts
|
|
1056
1061
|
if (event.type === "tool_call_start") {
|
|
@@ -1120,13 +1125,18 @@ export async function spawnBackgroundSubagent(
|
|
|
1120
1125
|
|
|
1121
1126
|
proc.on("close", (code) => {
|
|
1122
1127
|
if (buffer.trim()) {
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1128
|
+
let cleaned = buffer;
|
|
1129
|
+
const jsonStart = cleaned.indexOf("{");
|
|
1130
|
+
if (jsonStart > 0) cleaned = cleaned.slice(jsonStart);
|
|
1131
|
+
if (jsonStart >= 0) {
|
|
1132
|
+
try {
|
|
1133
|
+
const event = JSON.parse(cleaned);
|
|
1134
|
+
if (event.type === "message_end" && event.message) {
|
|
1135
|
+
result.messages.push(event.message);
|
|
1136
|
+
}
|
|
1137
|
+
} catch {
|
|
1138
|
+
/* ignore */
|
|
1127
1139
|
}
|
|
1128
|
-
} catch {
|
|
1129
|
-
/* ignore */
|
|
1130
1140
|
}
|
|
1131
1141
|
}
|
|
1132
1142
|
const finalOutput = getFinalOutput(result.messages);
|
|
@@ -1508,10 +1518,18 @@ export async function runSingleAgent(
|
|
|
1508
1518
|
|
|
1509
1519
|
const processLine = (line: string) => {
|
|
1510
1520
|
if (!line.trim()) return;
|
|
1521
|
+
// Strip leading terminal escape sequences (e.g. OSC 1337 SetUserVar)
|
|
1522
|
+
// that may leak into stdout when extensions write directly to
|
|
1523
|
+
// process.stdout in JSON-mode child processes. Without this,
|
|
1524
|
+
// JSON.parse silently fails and heartbeat events are lost.
|
|
1525
|
+
let cleaned = line;
|
|
1526
|
+
const jsonStart = cleaned.indexOf("{");
|
|
1527
|
+
if (jsonStart > 0) cleaned = cleaned.slice(jsonStart);
|
|
1528
|
+
else if (jsonStart < 0) return;
|
|
1511
1529
|
// biome-ignore lint/suspicious/noExplicitAny: pi subagent JSON protocol has dynamic shape
|
|
1512
1530
|
let event: Record<string, any>;
|
|
1513
1531
|
try {
|
|
1514
|
-
event = JSON.parse(
|
|
1532
|
+
event = JSON.parse(cleaned);
|
|
1515
1533
|
} catch {
|
|
1516
1534
|
return;
|
|
1517
1535
|
}
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
SessionManager,
|
|
16
16
|
SettingsManager,
|
|
17
17
|
} from "@mariozechner/pi-coding-agent";
|
|
18
|
-
import { applyKnownModelMetadataOverrides } from "../../../
|
|
18
|
+
import { applyKnownModelMetadataOverrides } from "../../../runtime/model-metadata-overrides.js";
|
|
19
19
|
import { getTallowHomeDir, getTallowPath } from "../../_shared/tallow-paths.js";
|
|
20
20
|
import {
|
|
21
21
|
type AgentConfig,
|
|
@@ -255,7 +255,7 @@ export async function spawnTeammateSession(
|
|
|
255
255
|
// Use the user's tallow auth and model config so teammates inherit
|
|
256
256
|
// API keys and custom model definitions from the main session.
|
|
257
257
|
const authStorage = AuthStorage.create(getTallowPath("auth.json"));
|
|
258
|
-
const modelRegistry =
|
|
258
|
+
const modelRegistry = ModelRegistry.create(authStorage, getTallowPath("models.json"));
|
|
259
259
|
applyKnownModelMetadataOverrides(modelRegistry);
|
|
260
260
|
const model = modelRegistry.find(resolvedModel.provider, resolvedModel.id);
|
|
261
261
|
if (!model) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
3
|
+
import welcomeScreen from "../index.js";
|
|
4
|
+
|
|
5
|
+
describe("welcome-screen extension", () => {
|
|
6
|
+
test("registers session_start handler", () => {
|
|
7
|
+
const events: string[] = [];
|
|
8
|
+
const pi = {
|
|
9
|
+
on: (event: string) => {
|
|
10
|
+
events.push(event);
|
|
11
|
+
},
|
|
12
|
+
} as unknown as ExtensionAPI;
|
|
13
|
+
|
|
14
|
+
welcomeScreen(pi);
|
|
15
|
+
expect(events).toContain("session_start");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("does not register any commands or tools", () => {
|
|
19
|
+
const commands: string[] = [];
|
|
20
|
+
const tools: string[] = [];
|
|
21
|
+
const pi = {
|
|
22
|
+
on: () => {},
|
|
23
|
+
registerCommand: (name: string) => {
|
|
24
|
+
commands.push(name);
|
|
25
|
+
},
|
|
26
|
+
registerTool: (opts: { name: string }) => {
|
|
27
|
+
tools.push(opts.name);
|
|
28
|
+
},
|
|
29
|
+
} as unknown as ExtensionAPI;
|
|
30
|
+
|
|
31
|
+
welcomeScreen(pi);
|
|
32
|
+
expect(commands).toHaveLength(0);
|
|
33
|
+
expect(tools).toHaveLength(0);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "welcome-screen",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ASCII art welcome screen with version display and update notification",
|
|
5
|
+
"whenToUse": "Replaces the default startup header with a branded ASCII art welcome screen.",
|
|
6
|
+
"capabilities": {
|
|
7
|
+
"events": ["session_start"]
|
|
8
|
+
},
|
|
9
|
+
"permissionSurface": {
|
|
10
|
+
"filesystem": "none",
|
|
11
|
+
"shell": false,
|
|
12
|
+
"network": true,
|
|
13
|
+
"subprocess": false
|
|
14
|
+
},
|
|
15
|
+
"category": "ui",
|
|
16
|
+
"tags": ["welcome", "header", "startup", "branding"],
|
|
17
|
+
"files": ["index.ts"],
|
|
18
|
+
"relationships": [],
|
|
19
|
+
"npmDependencies": {}
|
|
20
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Welcome Screen Extension
|
|
3
|
+
*
|
|
4
|
+
* Replaces the default pi framework startup header with a branded ASCII art
|
|
5
|
+
* welcome screen showing the tallow logo, version, and update availability.
|
|
6
|
+
*
|
|
7
|
+
* The ASCII art is the tallow "T_" mark — a blocky amber T with a cursor,
|
|
8
|
+
* evoking the retro CRT terminal aesthetic of the logo.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
12
|
+
import type { TUI } from "@mariozechner/pi-tui";
|
|
13
|
+
import { visibleWidth } from "@mariozechner/pi-tui";
|
|
14
|
+
import { TALLOW_VERSION } from "../../runtime/config.js";
|
|
15
|
+
|
|
16
|
+
/** Timeout for npm registry fetch (ms). */
|
|
17
|
+
const FETCH_TIMEOUT = 4_000;
|
|
18
|
+
|
|
19
|
+
/** Registry URL for the tallow package. */
|
|
20
|
+
const REGISTRY_URL = "https://registry.npmjs.org/@dungle-scrubs/tallow/latest";
|
|
21
|
+
|
|
22
|
+
// ─── ASCII Art ───────────────────────────────────────────────────────────────
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The tallow "T_" mark — a blocky T with a cursor block.
|
|
26
|
+
* Proportions mirror the logo: wide top bar, centered thick stem, cursor lower-right.
|
|
27
|
+
*/
|
|
28
|
+
const LOGO_LINES = [" ▐████████████▌ ", " ████ ", " ████ ▐█▌ "];
|
|
29
|
+
|
|
30
|
+
// ─── Version Check ───────────────────────────────────────────────────────────
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Fetch the latest published version from the npm registry.
|
|
34
|
+
*
|
|
35
|
+
* @returns Latest version string, or null on failure
|
|
36
|
+
*/
|
|
37
|
+
async function fetchLatestVersion(): Promise<string | null> {
|
|
38
|
+
if (process.env.PI_SKIP_VERSION_CHECK === "1" || process.env.PI_OFFLINE) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const res = await fetch(REGISTRY_URL, {
|
|
43
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT),
|
|
44
|
+
});
|
|
45
|
+
if (!res.ok) return null;
|
|
46
|
+
const data = (await res.json()) as { version?: string };
|
|
47
|
+
return data.version ?? null;
|
|
48
|
+
} catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Compare two semver strings. Returns true if `latest` is newer than `current`.
|
|
55
|
+
*
|
|
56
|
+
* @param current - Currently installed version
|
|
57
|
+
* @param latest - Latest available version
|
|
58
|
+
* @returns True if latest is a newer version
|
|
59
|
+
*/
|
|
60
|
+
function isNewerVersion(current: string, latest: string): boolean {
|
|
61
|
+
const parse = (v: string): number[] => v.split(".").map(Number);
|
|
62
|
+
const c = parse(current);
|
|
63
|
+
const l = parse(latest);
|
|
64
|
+
for (let i = 0; i < 3; i++) {
|
|
65
|
+
if ((l[i] ?? 0) > (c[i] ?? 0)) return true;
|
|
66
|
+
if ((l[i] ?? 0) < (c[i] ?? 0)) return false;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ─── Colors ──────────────────────────────────────────────────────────────────
|
|
72
|
+
|
|
73
|
+
/** Amber/gold (matches the logo glow). */
|
|
74
|
+
const AMBER = "\x1b[38;2;255;191;0m";
|
|
75
|
+
/** Dim amber for version text. */
|
|
76
|
+
const DIM_AMBER = "\x1b[38;2;180;130;30m";
|
|
77
|
+
/** Green for update notification. */
|
|
78
|
+
const GREEN = "\x1b[38;2;100;220;100m";
|
|
79
|
+
/** Reset all styles. */
|
|
80
|
+
const RESET = "\x1b[0m";
|
|
81
|
+
|
|
82
|
+
// ─── Rendering ───────────────────────────────────────────────────────────────
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Center a styled string within a given terminal width.
|
|
86
|
+
*
|
|
87
|
+
* @param line - Styled line (may contain ANSI escapes)
|
|
88
|
+
* @param width - Terminal width
|
|
89
|
+
* @returns Left-padded line
|
|
90
|
+
*/
|
|
91
|
+
function centerLine(line: string, width: number): string {
|
|
92
|
+
const lineWidth = visibleWidth(line);
|
|
93
|
+
const left = Math.max(0, Math.floor((width - lineWidth) / 2));
|
|
94
|
+
return " ".repeat(left) + line;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Build the welcome screen lines.
|
|
99
|
+
*
|
|
100
|
+
* @param width - Terminal width for centering
|
|
101
|
+
* @param updateVersion - Newer version available, or null
|
|
102
|
+
* @returns Array of styled terminal lines
|
|
103
|
+
*/
|
|
104
|
+
function buildWelcomeLines(width: number, updateVersion: string | null): string[] {
|
|
105
|
+
const lines: string[] = [];
|
|
106
|
+
|
|
107
|
+
// Logo with amber coloring
|
|
108
|
+
for (const logoLine of LOGO_LINES) {
|
|
109
|
+
lines.push(centerLine(`${AMBER}${logoLine}${RESET}`, width));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Version line — dim amber, centered below logo
|
|
113
|
+
lines.push(centerLine(`${DIM_AMBER}tallow v${TALLOW_VERSION}${RESET}`, width));
|
|
114
|
+
|
|
115
|
+
// Update notification
|
|
116
|
+
if (updateVersion) {
|
|
117
|
+
lines.push(centerLine(`${GREEN}update available: v${updateVersion}${RESET}`, width));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return lines;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ─── Extension Entry ─────────────────────────────────────────────────────────
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Welcome screen extension.
|
|
127
|
+
* Replaces the default header with an ASCII art logo on session_start.
|
|
128
|
+
*
|
|
129
|
+
* @param pi - Extension API
|
|
130
|
+
*/
|
|
131
|
+
export default function welcomeScreenExtension(pi: ExtensionAPI): void {
|
|
132
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
133
|
+
// Skip for resumed/continued sessions — only show on fresh instances.
|
|
134
|
+
// Filter to message entries only — metadata entries like model_change and
|
|
135
|
+
// thinking_level_change are injected during session setup and exist even
|
|
136
|
+
// on a brand-new session. The role lives on entry.message, not the entry itself.
|
|
137
|
+
const hasConversation = ctx.sessionManager.getEntries().some((e) => {
|
|
138
|
+
const msg = (e as unknown as Record<string, unknown>).message as
|
|
139
|
+
| { role?: string }
|
|
140
|
+
| undefined;
|
|
141
|
+
return msg?.role === "user" || msg?.role === "assistant";
|
|
142
|
+
});
|
|
143
|
+
if (hasConversation) return;
|
|
144
|
+
|
|
145
|
+
let updateVersion: string | null = null;
|
|
146
|
+
let tuiRef: TUI | null = null;
|
|
147
|
+
|
|
148
|
+
// Set the header immediately with current version (no update info yet)
|
|
149
|
+
ctx.ui.setHeader((tui, _theme) => {
|
|
150
|
+
tuiRef = tui;
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
render(width: number): string[] {
|
|
154
|
+
return buildWelcomeLines(width, updateVersion);
|
|
155
|
+
},
|
|
156
|
+
invalidate(): void {
|
|
157
|
+
// No cached state to clear
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// Clear the changelog "What's New" children from the header container.
|
|
163
|
+
// setHeader only replaces the builtInHeader text component — the changelog
|
|
164
|
+
// section (DynamicBorder, "What's New" heading, Markdown body) lives as
|
|
165
|
+
// separate children in headerContainer and persists unless removed.
|
|
166
|
+
// headerContainer is the first child of the root TUI component.
|
|
167
|
+
queueMicrotask(() => {
|
|
168
|
+
if (!tuiRef) return;
|
|
169
|
+
const tuiChildren = (tuiRef as unknown as Record<string, unknown>).children as
|
|
170
|
+
| Array<Record<string, unknown>>
|
|
171
|
+
| undefined;
|
|
172
|
+
// headerContainer is the first child of the TUI root
|
|
173
|
+
const headerContainer = tuiChildren?.[0]?.children as { length: number } | undefined;
|
|
174
|
+
if (headerContainer && headerContainer.length > 2) {
|
|
175
|
+
// Keep [0]=Spacer and [1]=custom header, drop the rest (bottom spacer + changelog)
|
|
176
|
+
headerContainer.length = 2;
|
|
177
|
+
tuiRef.requestRender();
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// Fire-and-forget version check — re-renders header when resolved
|
|
182
|
+
fetchLatestVersion().then((latest) => {
|
|
183
|
+
if (latest && isNewerVersion(TALLOW_VERSION, latest)) {
|
|
184
|
+
updateVersion = latest;
|
|
185
|
+
tuiRef?.requestRender();
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
}
|
|
@@ -15,8 +15,8 @@ export { Text } from "./components/text.js";
|
|
|
15
15
|
export { TruncatedText } from "./components/truncated-text.js";
|
|
16
16
|
export type { EditorComponent } from "./editor-component.js";
|
|
17
17
|
export { type FuzzyMatch, fuzzyFilter, fuzzyMatch } from "./fuzzy.js";
|
|
18
|
-
export { DEFAULT_EDITOR_KEYBINDINGS, type EditorAction, type EditorKeybindingsConfig, EditorKeybindingsManager, getEditorKeybindings, setEditorKeybindings, } from "./keybindings.js";
|
|
19
|
-
export { isKeyRelease, isKeyRepeat, isKittyProtocolActive, Key, type KeyEventType, type KeyId, matchesKey, parseKey, setKittyProtocolActive, } from "./keys.js";
|
|
18
|
+
export { DEFAULT_EDITOR_KEYBINDINGS, type EditorAction, type EditorKeybindingsConfig, EditorKeybindingsManager, getEditorKeybindings, getKeybindings, type Keybinding, type KeybindingDefinition, type Keybindings, type KeybindingsConfig, KeybindingsManager, setEditorKeybindings, setKeybindings, TUI_KEYBINDINGS, } from "./keybindings.js";
|
|
19
|
+
export { isKeyRelease, isKeyRepeat, isKittyProtocolActive, isMouseEvent, Key, type KeyEventType, type KeyId, type MouseEvent, matchesKey, parseKey, parseMouseEvent, setKittyProtocolActive, } from "./keys.js";
|
|
20
20
|
export { StdinBuffer, type StdinBufferEventMap, type StdinBufferOptions } from "./stdin-buffer.js";
|
|
21
21
|
export { ProcessTerminal, type Terminal } from "./terminal.js";
|
|
22
22
|
export { allocateImageId, type CellDimensions, calculateImageLayout, createImageMetadata, deleteAllKittyImages, deleteKittyImage, detectCapabilities, detectImageFormat, encodeITerm2, encodeKitty, formatImageDimensions, getCapabilities, getCellDimensions, getGifDimensions, getImageDimensions, getJpegDimensions, getPngDimensions, getWebpDimensions, type ImageDimensions, type ImageFormat, type ImageLayout, type ImageMetadata, type ImageProtocol, type ImageRenderOptions, imageFallback, imageFormatToMime, renderImage, resetCapabilitiesCache, setCellDimensions, type TerminalCapabilities, } from "./terminal-image.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,4BAA4B,EAC5B,KAAK,YAAY,GACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,WAAW,EAChB,kBAAkB,EAClB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,qBAAqB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,O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X,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,GAAG,GACH,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -20,9 +20,9 @@ export { TruncatedText } from "./components/truncated-text.js";
|
|
|
20
20
|
// Fuzzy matching
|
|
21
21
|
export { fuzzyFilter, fuzzyMatch } from "./fuzzy.js";
|
|
22
22
|
// Keybindings
|
|
23
|
-
export { DEFAULT_EDITOR_KEYBINDINGS, EditorKeybindingsManager, getEditorKeybindings, setEditorKeybindings, } from "./keybindings.js";
|
|
23
|
+
export { DEFAULT_EDITOR_KEYBINDINGS, EditorKeybindingsManager, getEditorKeybindings, getKeybindings, KeybindingsManager, setEditorKeybindings, setKeybindings, TUI_KEYBINDINGS, } from "./keybindings.js";
|
|
24
24
|
// Keyboard input handling
|
|
25
|
-
export { isKeyRelease, isKeyRepeat, isKittyProtocolActive, Key, matchesKey, parseKey, setKittyProtocolActive, } from "./keys.js";
|
|
25
|
+
export { isKeyRelease, isKeyRepeat, isKittyProtocolActive, isMouseEvent, Key, matchesKey, parseKey, parseMouseEvent, setKittyProtocolActive, } from "./keys.js";
|
|
26
26
|
// Input buffering for batch splitting
|
|
27
27
|
export { StdinBuffer } from "./stdin-buffer.js";
|
|
28
28
|
// Terminal interface and implementations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAElC,uBAAuB;AACvB,OAAO,EAGN,4BAA4B,GAE5B,MAAM,mBAAmB,CAAC;AAC3B,gBAAgB;AAChB,OAAO,EAEN,kBAAkB,EAClB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,qBAAqB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,aAAa;AAC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