fix: format verbose tool output by channel

This commit is contained in:
Peter Steinberger
2026-01-17 10:17:57 +00:00
parent 4ca38286d8
commit 31e8ecca10
12 changed files with 86 additions and 7 deletions

View File

@@ -36,6 +36,12 @@ describe("tool meta formatting", () => {
expect(out).toContain("a→b");
});
it("wraps aggregate meta in backticks when markdown is enabled", () => {
vi.stubEnv("HOME", "/Users/test");
const out = formatToolAggregate("fs", ["/Users/test/dir/a.txt"], { markdown: true });
expect(out).toContain("`~/dir/a.txt`");
});
it("formats prefixes with default labels", () => {
vi.stubEnv("HOME", "/Users/test");
expect(formatToolPrefix(undefined, undefined)).toBe("🧩 tool");