feat: label code fences so Vicinae can colour them (#10)
This commit was merged in pull request #10.
This commit is contained in:
@@ -127,6 +127,25 @@ describe("buildThreadMarkdown", () => {
|
||||
expect(markdown).toContain("Ollama rejected the API key.");
|
||||
});
|
||||
|
||||
it("labels a bare code fence inside an answer", () => {
|
||||
// Vicinae gives a dark panel, a language header and a Copy button
|
||||
// (`MdCodeBlock.qml`); the label is what turns on syntax colouring.
|
||||
const markdown = buildThreadMarkdown([
|
||||
message({ role: "assistant", text: "Run this:\n\n```\ngit status\n```" }),
|
||||
]);
|
||||
|
||||
expect(markdown).toContain("```bash");
|
||||
});
|
||||
|
||||
it("leaves a fence the model already labelled alone", () => {
|
||||
const markdown = buildThreadMarkdown([
|
||||
message({ role: "assistant", text: "```rust\nfn main() {}\n```" }),
|
||||
]);
|
||||
|
||||
expect(markdown).toContain("```rust");
|
||||
expect(markdown).not.toContain("```bash");
|
||||
});
|
||||
|
||||
it("lists tools on one quiet line, flagging failures", () => {
|
||||
const markdown = buildThreadMarkdown([
|
||||
message({
|
||||
|
||||
Reference in New Issue
Block a user