toolcraft 0.0.252 → 0.0.253
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 +13 -11
- 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.253",
|
|
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.253",
|
|
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.253",
|
|
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.253",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -10,6 +10,7 @@ export function renderRunView(buffer, options) {
|
|
|
10
10
|
const run = stats.run;
|
|
11
11
|
const theme = getTheme().styles;
|
|
12
12
|
const compactHeight = buffer.height < 20;
|
|
13
|
+
const tight = buffer.height < 12 || buffer.width < 40;
|
|
13
14
|
const width = Math.max(0, Math.min(164, buffer.width - 4));
|
|
14
15
|
const x = Math.max(0, Math.floor((buffer.width - width) / 2));
|
|
15
16
|
const sidebarWidth = !compactHeight && !options.showQueue && width >= 106 ? Math.min(40, Math.floor(width * 0.29)) : 0;
|
|
@@ -26,13 +27,14 @@ export function renderRunView(buffer, options) {
|
|
|
26
27
|
const inputLines = draft ? Math.min(compactHeight ? 1 : 3, draft.lines.length) : 0;
|
|
27
28
|
const inputRow = compactHeight ? 1 : 2;
|
|
28
29
|
const composerHeight = composer ? inputLines + inputRow + (!compactHeight || composer.error || options.feedback ? 1 : 0) : 0;
|
|
29
|
-
const hint = composer?.focused
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
: options.
|
|
34
|
-
:
|
|
35
|
-
: "i Message p
|
|
30
|
+
const hint = tight ? composer?.focused ? "Enter Queue Esc Browse" : "i Message v Tasks q Quit"
|
|
31
|
+
: composer?.focused
|
|
32
|
+
? composer.kind === "plan" ? "Enter Queue plan Ctrl+P Message Esc Browse"
|
|
33
|
+
: "Enter Queue Alt+Enter Newline Ctrl+P Plan Alt+↑↓ Target Esc Browse"
|
|
34
|
+
: options.showQueue ? "↑↓ Scroll PgUp/PgDn Page Home/End Jump f Current v Activity i Message q Quit"
|
|
35
|
+
: options.hints ? options.hints.map((hint) => `${hint.key} ${hint.label}`).join(" ")
|
|
36
|
+
: width < 100 ? "i Message p Plan v Tasks d Details ↑↓ Scroll f Follow q Quit"
|
|
37
|
+
: "i Message p Add plan v Tasks & plans d Details ↑↓ Scroll f Follow q Quit";
|
|
36
38
|
const footerLines = [""];
|
|
37
39
|
for (const part of plainTerminalText(hint).split(" ")) {
|
|
38
40
|
const previous = footerLines.at(-1);
|
|
@@ -44,12 +46,12 @@ export function renderRunView(buffer, options) {
|
|
|
44
46
|
const footerY = Math.max(0, buffer.height - footerLines.length);
|
|
45
47
|
const composerY = Math.max(0, footerY - composerHeight);
|
|
46
48
|
const contentBottom = composer ? composerY - 1 : footerY - 1;
|
|
47
|
-
const showContext = !compactHeight || contentBottom >= 6;
|
|
49
|
+
const showContext = !tight && (!compactHeight || contentBottom >= 6);
|
|
48
50
|
if (showContext)
|
|
49
51
|
put(buffer, { x, y: 1, width, height: 1 }, 0, context, theme.muted);
|
|
50
52
|
let outputY = compactHeight ? showContext ? 2 : 1 : 3;
|
|
51
53
|
if (sidebarWidth === 0) {
|
|
52
|
-
if (activePlan?.kind === "plan") {
|
|
54
|
+
if (activePlan?.kind === "plan" && !tight) {
|
|
53
55
|
put(buffer, { x, y: outputY++, width, height: 1 }, 0, `${marker(activePlan.status)} ${activePlanIndex + 1}. ${basename(activePlan.path)}`, { bold: true });
|
|
54
56
|
}
|
|
55
57
|
if (nextPlan?.kind === "plan" && !options.showQueue && !compactHeight) {
|
|
@@ -59,7 +61,7 @@ export function renderRunView(buffer, options) {
|
|
|
59
61
|
const tasks = run?.tasks ?? [];
|
|
60
62
|
const completed = tasks.filter((task) => task.status === "completed").length;
|
|
61
63
|
const taskCount = tasks.length > 0 ? `${completed}/${tasks.length} tasks` : `${stats.iterationsLabel ?? "Iterations"} ${stats.iterations}`;
|
|
62
|
-
const step = run?.activeStep ? truncateToWidth(plainTerminalText(run.activeStep), Math.max(8, Math.floor(transcriptWidth / 4))) : undefined;
|
|
64
|
+
const step = run?.activeStep ? truncateToWidth(plainTerminalText(run.activeStep), Math.max(0, Math.min(Math.max(8, Math.floor(transcriptWidth / 4)), transcriptWidth - displayWidth(taskCount) - 12))) : undefined;
|
|
63
65
|
const progressLabel = [step, taskCount].filter(Boolean).join(" · ");
|
|
64
66
|
let phaseLabel = run?.phase ?? stats.currentAction ?? stats.status;
|
|
65
67
|
if (phaseLabel === "Follow-up") {
|
|
@@ -68,7 +70,7 @@ export function renderRunView(buffer, options) {
|
|
|
68
70
|
if (active >= 0)
|
|
69
71
|
phaseLabel += ` ${active + 1}/${messages.length}`;
|
|
70
72
|
}
|
|
71
|
-
const phase = truncateToWidth(plainTerminalText(phaseLabel), Math.max(
|
|
73
|
+
const phase = truncateToWidth(plainTerminalText(phaseLabel), Math.max(0, transcriptWidth - displayWidth(progressLabel) - 7));
|
|
72
74
|
const statusMarker = { running: "●", error: "!", paused: "Ⅱ", idle: "○", done: "✓" }[stats.status];
|
|
73
75
|
put(buffer, { x, y: outputY++, width: transcriptWidth, height: 1 }, 0, `${statusMarker} ${phase} · ${progressLabel}${run?.activity ? ` · ${run.activity}` : ""}`, stats.status === "error" ? theme.error : { bold: true });
|
|
74
76
|
if (!compactHeight)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.253",
|
|
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.253",
|
|
162
162
|
"toolcraft-design": "*",
|
|
163
163
|
"@poe-code/frontmatter": "*",
|
|
164
164
|
"@poe-code/agent-mcp-config": "*",
|