@vitest-agent/ui 5.2.1 → 5.2.2
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/dispatcher/helpers.js +3 -15
- package/index.js +1 -1
- package/package.json +8 -8
package/dispatcher/helpers.js
CHANGED
|
@@ -177,12 +177,6 @@ const formatTagCountSuffix = (tagCounts) => {
|
|
|
177
177
|
return [...entries].sort(([a], [b]) => a.localeCompare(b)).map(([tag, count]) => `${tag}:${count}`).join(" ");
|
|
178
178
|
};
|
|
179
179
|
/**
|
|
180
|
-
* A render width no table reaches, so the kit never truncates a cell: a
|
|
181
|
-
* project name or a coverage path is printed whole however long it is
|
|
182
|
-
* (issue #237 follow-up).
|
|
183
|
-
*/
|
|
184
|
-
const UNBOUNDED_WIDTH = Number.MAX_SAFE_INTEGER;
|
|
185
|
-
/**
|
|
186
180
|
* Format the `Projects (N):` block as an array of lines including the
|
|
187
181
|
* leading header and each project row, indented two spaces.
|
|
188
182
|
*
|
|
@@ -195,10 +189,7 @@ const UNBOUNDED_WIDTH = Number.MAX_SAFE_INTEGER;
|
|
|
195
189
|
const formatProjectsTable = (projects) => {
|
|
196
190
|
if (projects.length === 0) return [];
|
|
197
191
|
const table = Doc.table([{ header: "" }, { header: "" }], projects.map(projectCells));
|
|
198
|
-
const rows = Render.plain([table], Render.contextOf({
|
|
199
|
-
audience: "agent",
|
|
200
|
-
width: UNBOUNDED_WIDTH
|
|
201
|
-
})).split("\n").map((row) => ` ${row}`);
|
|
192
|
+
const rows = Render.plain([table], Render.contextOf({ audience: "agent" })).split("\n").map((row) => ` ${row}`);
|
|
202
193
|
return [`Projects (${projects.length}):`, ...rows];
|
|
203
194
|
};
|
|
204
195
|
/**
|
|
@@ -220,7 +211,7 @@ const sumOf = (projects, pick) => projects.reduce((sum, p) => sum + pick(p), 0);
|
|
|
220
211
|
* array when `belowTarget` is empty.
|
|
221
212
|
*
|
|
222
213
|
* @remarks
|
|
223
|
-
* The table renders at
|
|
214
|
+
* The table renders at the kit's default unbounded width (`Render.contextOf`'s `Infinity`), so the kit never truncates a
|
|
224
215
|
* cell and a printed path is always whole (issue #237 follow-up). Columns are
|
|
225
216
|
* padded by display width and the percentage cells are centred by the kit.
|
|
226
217
|
* Each path is a `Doc.link` written through `link`, so a hyperlink wraps the
|
|
@@ -254,10 +245,7 @@ const formatBelowTargetTable = (belowTarget, limit, link = (_target, label) => l
|
|
|
254
245
|
overflow: (hidden) => `… ${hidden} more (use the test_coverage MCP tool for the full list)`
|
|
255
246
|
});
|
|
256
247
|
return ["Files below aspirational target:", ...Render.ansi([table], {
|
|
257
|
-
...Render.contextOf({
|
|
258
|
-
audience: "human",
|
|
259
|
-
width: UNBOUNDED_WIDTH
|
|
260
|
-
}),
|
|
248
|
+
...Render.contextOf({ audience: "human" }),
|
|
261
249
|
link: (target, label) => "file" in target ? link(target, label) : label
|
|
262
250
|
}).split("\n")];
|
|
263
251
|
};
|
package/index.js
CHANGED
|
@@ -18,6 +18,6 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
|
|
|
18
18
|
*
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
const CURRENT_UI_VERSION = "5.2.
|
|
21
|
+
const CURRENT_UI_VERSION = "5.2.2";
|
|
22
22
|
|
|
23
23
|
export { ActionSeverity, CURRENT_UI_VERSION, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_FAILURE_LABEL, SUITE_LOAD_FAILURE_LABEL, SuggestedActionRecord, TestRecord, VitestAgentStatus, VitestAgentTokens, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatcherTable, dominantClassification, formatDisplayDuration, formatSuggestedActionLines, initialRenderState, inkStyle, reduceRenderState, reduceRenderStateAll, renderAgent, spinnerFrame, statusGlyph, statusInkStyle, synthesizeFromAgentReport, synthesizeRunEvents };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/ui",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared event-sourced renderer for vitest-agent. React Ink view for humans, plain-string view for agents, both fed by the same reducer over a RunEvent stream.",
|
|
6
6
|
"keywords": [
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"./package.json": "./package.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@vitest-agent/sdk": "9.0.
|
|
48
|
-
"effect": "
|
|
47
|
+
"@vitest-agent/sdk": "9.0.2",
|
|
48
|
+
"effect": "~4.1.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@effected/cli": "^0.
|
|
52
|
-
"@effected/config-file": "^0.
|
|
53
|
-
"@effected/env": "^0.
|
|
54
|
-
"@effected/glob": "^0.
|
|
55
|
-
"@effected/walker": "^0.
|
|
51
|
+
"@effected/cli": "^0.25.0",
|
|
52
|
+
"@effected/config-file": "^0.23.0",
|
|
53
|
+
"@effected/env": "^0.9.0",
|
|
54
|
+
"@effected/glob": "^0.17.0",
|
|
55
|
+
"@effected/walker": "^0.24.0",
|
|
56
56
|
"ink": "^8.0.0",
|
|
57
57
|
"react": "^19.3.0"
|
|
58
58
|
},
|