fix(coding-agent): preserve share page tool output indentation closes #3440
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed shared/exported plain-text tool output to preserve indentation instead of collapsing leading whitespace in the web share page ([#3440](https://github.com/badlogic/pi-mono/issues/3440))
|
||||
- Fixed skill resolution to dedupe symlinked aliases by canonical path, so `pi config` no longer shows duplicate skill entries when `~/.pi/agent/skills` points to `~/.agents/skills` ([#3405](https://github.com/badlogic/pi-mono/issues/3405))
|
||||
- Fixed OpenRouter request attribution to include Pi app headers (`HTTP-Referer: https://pi.dev`, `X-OpenRouter-Title: pi`, `X-OpenRouter-Categories: cli-agent`) when sessions are created through the coding-agent SDK and install telemetry is enabled ([#3414](https://github.com/badlogic/pi-mono/issues/3414))
|
||||
|
||||
|
||||
@@ -510,6 +510,7 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: var(--line-height);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.tool-output pre {
|
||||
|
||||
12
packages/coding-agent/test/export-html-whitespace.test.ts
Normal file
12
packages/coding-agent/test/export-html-whitespace.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { readFileSync } from "fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("export HTML tool output whitespace", () => {
|
||||
it("preserves whitespace for plain-text tool output containers", () => {
|
||||
const css = readFileSync(new URL("../src/core/export-html/template.css", import.meta.url), "utf-8");
|
||||
|
||||
expect(css).toMatch(
|
||||
/\.tool-output > div,\s*\.output-preview,\s*\.output-full\s*\{[\s\S]*?white-space:\s*pre-wrap;/,
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user