fix(console-ui): render binary invocation output safely

- decode UTF-8 responses in fatal mode and reject control-byte payloads
- fall back to hexadecimal output instead of replacement characters
- show response byte count, selected representation, automatic fallback, and latency
- preserve the existing counter u64 representation and cover the wiring in SSR tests
This commit is contained in:
Maofeng
2026-07-29 19:20:15 +08:00
parent 51b452ecc5
commit 72c901c478
3 changed files with 88 additions and 12 deletions
+2
View File
@@ -99,6 +99,8 @@ test("uses TanStack Start routing and produces Node artifacts", async () => {
assert.match(indexRoute, /切换对外版本/);
assert.match(indexRoute, /Host 能力/);
assert.match(indexRoute, /service\.capabilities/);
assert.match(indexRoute, /TextDecoder\("utf-8", \{ fatal: true \}\)/);
assert.match(indexRoute, /outputFormat\.automatic/);
assert.match(apiClient, /\/api\/v1\/deployments/);
assert.match(apiClient, /capabilities: BackendCapability\[\]/);
assert.match(router, /createRouter/);