toolcraft 0.0.246 → 0.0.248
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/composition.json +2 -2
- package/dist/composition.json +2 -2
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/toolcraft-design/dist/dashboard/components/run-view.js +16 -12
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +2 -2
package/composition.json
CHANGED
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.248",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.248",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
package/dist/composition.json
CHANGED
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.248",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.248",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -9,9 +9,10 @@ export function renderRunView(buffer, options) {
|
|
|
9
9
|
const composer = options.showQueue && !options.composer?.focused ? undefined : options.composer;
|
|
10
10
|
const run = stats.run;
|
|
11
11
|
const theme = getTheme().styles;
|
|
12
|
+
const compactHeight = buffer.height < 18;
|
|
12
13
|
const width = Math.max(0, Math.min(164, buffer.width - 4));
|
|
13
14
|
const x = Math.max(0, Math.floor((buffer.width - width) / 2));
|
|
14
|
-
const sidebarWidth = !options.showQueue && width >= 106 ? Math.min(40, Math.floor(width * 0.29)) : 0;
|
|
15
|
+
const sidebarWidth = !compactHeight && !options.showQueue && width >= 106 ? Math.min(40, Math.floor(width * 0.29)) : 0;
|
|
15
16
|
const transcriptWidth = Math.max(0, width - (sidebarWidth > 0 ? sidebarWidth + 3 : 0));
|
|
16
17
|
const queue = run?.queue ?? [];
|
|
17
18
|
const plans = queue.filter((item) => item.kind === "plan");
|
|
@@ -23,8 +24,9 @@ export function renderRunView(buffer, options) {
|
|
|
23
24
|
const context = [run?.agent, run?.model ?? (run?.agent ? "default model" : undefined), run?.cwd].filter(Boolean).join(" · ");
|
|
24
25
|
put(buffer, { x, y: 1, width, height: 1 }, 0, context, theme.muted);
|
|
25
26
|
const draft = composer ? layoutComposer(composer, Math.max(1, transcriptWidth - 3)) : undefined;
|
|
26
|
-
const inputLines = draft ? Math.min(3, draft.lines.length) : 0;
|
|
27
|
-
const
|
|
27
|
+
const inputLines = draft ? Math.min(compactHeight ? 1 : 3, draft.lines.length) : 0;
|
|
28
|
+
const inputRow = compactHeight ? 1 : 2;
|
|
29
|
+
const composerHeight = composer ? inputLines + inputRow + (!compactHeight || composer.error || options.feedback ? 1 : 0) : 0;
|
|
28
30
|
const hint = composer?.focused
|
|
29
31
|
? composer.kind === "plan" ? "Enter Queue plan Ctrl+P Message Esc Browse"
|
|
30
32
|
: "Enter Queue Alt+Enter Newline Ctrl+P Plan Alt+↑↓ Target Esc Browse"
|
|
@@ -41,14 +43,14 @@ export function renderRunView(buffer, options) {
|
|
|
41
43
|
footerLines[footerLines.length - 1] = previous ? `${previous} ${part}` : part;
|
|
42
44
|
}
|
|
43
45
|
const footerY = Math.max(0, buffer.height - footerLines.length);
|
|
44
|
-
const composerY = Math.max(
|
|
46
|
+
const composerY = Math.max(0, footerY - composerHeight);
|
|
45
47
|
const contentBottom = composer ? composerY - 1 : footerY - 1;
|
|
46
|
-
let outputY = 3;
|
|
48
|
+
let outputY = compactHeight ? 2 : 3;
|
|
47
49
|
if (sidebarWidth === 0) {
|
|
48
50
|
if (activePlan?.kind === "plan") {
|
|
49
51
|
put(buffer, { x, y: outputY++, width, height: 1 }, 0, `${marker(activePlan.status)} ${activePlanIndex + 1}. ${basename(activePlan.path)}`, { bold: true });
|
|
50
52
|
}
|
|
51
|
-
if (nextPlan?.kind === "plan" && !options.showQueue) {
|
|
53
|
+
if (nextPlan?.kind === "plan" && !options.showQueue && !compactHeight) {
|
|
52
54
|
put(buffer, { x, y: outputY++, width, height: 1 }, 0, `○ ${activePlanIndex + 2}. ${basename(nextPlan.path)} · next`, theme.muted);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
@@ -67,7 +69,8 @@ export function renderRunView(buffer, options) {
|
|
|
67
69
|
const phase = truncateToWidth(plainTerminalText(phaseLabel), Math.max(8, transcriptWidth - progressLabel.length - 7));
|
|
68
70
|
const statusMarker = { running: "●", error: "!", paused: "Ⅱ", idle: "○", done: "✓" }[stats.status];
|
|
69
71
|
put(buffer, { x, y: outputY++, width: transcriptWidth, height: 1 }, 0, `${statusMarker} ${phase} · ${progressLabel}${run?.activity ? ` · ${run.activity}` : ""}`, stats.status === "error" ? theme.error : { bold: true });
|
|
70
|
-
|
|
72
|
+
if (!compactHeight)
|
|
73
|
+
outputY++;
|
|
71
74
|
const outputRect = { x, y: outputY, width: transcriptWidth, height: Math.max(0, contentBottom - outputY) };
|
|
72
75
|
let scrollOffset = options.scrollOffset;
|
|
73
76
|
let workOffset = options.workOffset ?? 0;
|
|
@@ -90,21 +93,22 @@ export function renderRunView(buffer, options) {
|
|
|
90
93
|
? "Usage unavailable" : `${formatNumber(stats.tokensIn + stats.tokensOut)} tokens`;
|
|
91
94
|
const pendingMessages = queue.filter((item) => item.kind === "message" && item.status === "pending").length;
|
|
92
95
|
const metrics = `${formatElapsed(stats.elapsedMs)} · ${usage}${pendingMessages ? ` · ${pendingMessages} message${pendingMessages === 1 ? "" : "s"} queued` : ""}${scrollOffset > 0 && !options.showQueue ? " · History paused" : ""}`;
|
|
93
|
-
put(buffer, { x, y:
|
|
96
|
+
put(buffer, { x, y: contentBottom, width: transcriptWidth, height: 1 }, 0, metrics, theme.muted);
|
|
94
97
|
let cursor;
|
|
95
98
|
if (composer && draft) {
|
|
96
99
|
const rect = { x, y: composerY, width: transcriptWidth, height: composerHeight };
|
|
97
100
|
const target = plans.find((plan) => plan.id === composer.afterPlanId) ?? activePlan;
|
|
98
101
|
const label = composer.kind === "plan" ? "ADD PLAN · joins the end of the queue"
|
|
99
102
|
: `AFTER ${target?.kind === "plan" ? basename(target.path) : "CURRENT PLAN"}`;
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
if (!compactHeight)
|
|
104
|
+
put(buffer, rect, 0, "─".repeat(transcriptWidth), theme.muted);
|
|
105
|
+
put(buffer, rect, inputRow - 1, options.submitting ? "Adding to queue…" : label, theme.muted);
|
|
102
106
|
const start = Math.max(0, Math.min(draft.cursor.y - inputLines + 1, draft.lines.length - inputLines));
|
|
103
107
|
for (let index = 0; index < inputLines; index++) {
|
|
104
108
|
const text = composer.text.length === 0
|
|
105
109
|
? composer.kind === "plan" ? "docs/plans/next-plan.md" : "Queue a message for this plan…"
|
|
106
110
|
: draft.lines[start + index] ?? "";
|
|
107
|
-
put(buffer, rect, index +
|
|
111
|
+
put(buffer, rect, index + inputRow, `${index === 0 ? "›" : " "} ${text}`, composer.text.length === 0 ? theme.muted : {});
|
|
108
112
|
}
|
|
109
113
|
if (composer.error)
|
|
110
114
|
put(buffer, rect, composerHeight - 1, composer.error, theme.error);
|
|
@@ -113,7 +117,7 @@ export function renderRunView(buffer, options) {
|
|
|
113
117
|
if (composer.focused && !options.submitting)
|
|
114
118
|
cursor = {
|
|
115
119
|
x: Math.min(buffer.width - 1, x + 3 + draft.cursor.x),
|
|
116
|
-
y: Math.max(0, Math.min(footerY - 1, composerY +
|
|
120
|
+
y: Math.max(0, Math.min(footerY - 1, composerY + inputRow + draft.cursor.y - start))
|
|
117
121
|
};
|
|
118
122
|
}
|
|
119
123
|
for (const [index, line] of footerLines.entries()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.248",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"yaml"
|
|
159
159
|
],
|
|
160
160
|
"optionalDependencies": {
|
|
161
|
-
"toolcraft-schema": "0.0.
|
|
161
|
+
"toolcraft-schema": "0.0.248",
|
|
162
162
|
"toolcraft-design": "*",
|
|
163
163
|
"@poe-code/frontmatter": "*",
|
|
164
164
|
"@poe-code/agent-mcp-config": "*",
|