feat(coding-agent): enabled MCP Markdown result rendering by default
mcp.renderMarkdownResults now defaults to true; set false to keep raw text. Non-JSON detection and structured JSON-tree rendering unchanged.
This commit is contained in:
@@ -29,7 +29,7 @@ describe("ToolExecutionComponent custom renderer failures", () => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
settings.set("mcp.renderMarkdownResults", false);
|
||||
settings.set("mcp.renderMarkdownResults", true);
|
||||
});
|
||||
|
||||
it("falls back to the custom tool label when a renderCall child component throws during render", () => {
|
||||
@@ -120,21 +120,10 @@ describe("MCP result Markdown rendering", () => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
settings.set("mcp.renderMarkdownResults", false);
|
||||
});
|
||||
|
||||
it("keeps Markdown syntax literal by default", () => {
|
||||
const component = renderMCPResult(
|
||||
{ content: [{ type: "text", text: "**bold result**" }], details },
|
||||
{ expanded: true, isPartial: false },
|
||||
theme,
|
||||
);
|
||||
|
||||
expect(visibleText(component.render(80))).toContain("**bold result**");
|
||||
});
|
||||
|
||||
it("renders inline Markdown when the opt-in setting is enabled", () => {
|
||||
settings.set("mcp.renderMarkdownResults", true);
|
||||
});
|
||||
|
||||
it("renders inline Markdown by default", () => {
|
||||
const component = renderMCPResult(
|
||||
{ content: [{ type: "text", text: "**bold result** and `code`" }], details },
|
||||
{ expanded: true, isPartial: false },
|
||||
@@ -147,6 +136,17 @@ describe("MCP result Markdown rendering", () => {
|
||||
expect(rendered).not.toContain("`code`");
|
||||
});
|
||||
|
||||
it("keeps Markdown syntax literal when the setting is disabled", () => {
|
||||
settings.set("mcp.renderMarkdownResults", false);
|
||||
const component = renderMCPResult(
|
||||
{ content: [{ type: "text", text: "**bold result**" }], details },
|
||||
{ expanded: true, isPartial: false },
|
||||
theme,
|
||||
);
|
||||
|
||||
expect(visibleText(component.render(80))).toContain("**bold result**");
|
||||
});
|
||||
|
||||
it("preserves structured JSON rendering when Markdown is enabled", () => {
|
||||
settings.set("mcp.renderMarkdownResults", true);
|
||||
const component = renderMCPResult(
|
||||
|
||||
Reference in New Issue
Block a user