Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): show minimap previews as plain text, not raw markdown #15715

Mergednikhilnigamnik(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/15715/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 90 additions and 2 deletions (loading 1).

x
0 of 5 viewed, 5 left
44 additions and 0 deletionsapps/web/src/components/chat/timelineMinimapItems.test.tsModified
View file
@@ -64,6 +64,50 @@
expect(resolveTimelineMinimapPreview(null)).toBeNull();
});
​
+ it("renders assistant markdown only when resolving a preview and keeps user text literal", () => {
+ const userText = "Explain **operators** and [x] in [the docs](https://example.com/docs)";
+ const assistantText = [
+ "## Operators",
+ "Use **either** option from [the docs](https://example.com/docs).",
+ "",
+ "| Operator | Meaning |",
+ "| --- | :---: |",
+ "| `a \\| b` | either |",
+ "",
+ "- [x] Match `**/*.ts` files",
+ "",
+ "[x] deployment complete",
+ "",
+ "> Note: ~~old~~ new ",
+ "> Next line",
+ "",
+ "```sh",
+ "# install deps",
+ "- **not bold**",
+ "const snake_case = a * b;",
+ "```",
+ "",
+ "foo<br>bar",
+ "",
+ "<div>Critical <em>answer</em></div>",