it("formats aggregates with grouping and brace-collapse", () => {
vi.stubEnv("HOME", home); const out = formatToolAggregate(" fs ", [
`${home}/dir/a.txt`,
`${home}/dir/b.txt`, "note", "a→b",
]);
expect(out).toMatch(/^ Fs/);
expect(out).toContain("~/dir/{a.txt, b.txt}");
expect(out).toContain("note");
expect(out).toContain("a→b");
});
it("wraps aggregate meta in backticks when markdown is enabled", () => {
vi.stubEnv("HOME", home); const out = formatToolAggregate("fs", [`${home}/dir/a.txt`], { markdown: true });
expect(out).toContain("`~/dir/a.txt`");
});
it("uses a longer inline code delimiter when meta contains backticks", () => { const out = formatToolAggregate("fs", ["name `with` ticks"], { markdown: true });
expect(out).toBe(" Fs: ``name `with` ticks``");
});
it("keeps exec flags outside markdown and moves them to the front", () => {
vi.stubEnv("HOME", home); const out = formatToolAggregate("exec", [`cd ${home}/dir && gemini 2>&1 · elevated`], {
markdown: true,
});
expect(out).toBe("️ Exec: elevated · `cd ~/dir && gemini 2>&1`");
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.