fix(webui): unify skill and session link highlighting (#6454)

* fix(webui): refine skill reference highlighting

* fix(webui): highlight composer skills and align session links
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-25 21:42:53 +08:00
1 parent d14c54c31c
commit 424d2debc2
12 files changed
+305 -91

No files matched your search

@@ -21,10 +21,10 @@ describe("MarkdownTextRenderer", () => {
expect(link).toHaveClass("text-blue-500", "dark:text-blue-300");
});
it("renders canonical session references as same-tab links", () => {
it.each(["#session/", "#/chat/"])("renders %s session references as same-tab links", (prefix) => {
render(
<MarkdownTextRenderer>
{"We discussed this in [收费设计](#session/websocket%3Apricing)."}
{`We discussed this in [收费设计](${prefix}websocket%3Apricing).`}
</MarkdownTextRenderer>,
);
@@ -32,7 +32,10 @@ describe("MarkdownTextRenderer", () => {
expect(link).toHaveAttribute("href", "#/chat/websocket%3Apricing");
expect(link).not.toHaveAttribute("target");
expect(link.getAttribute("style")).toContain(
"text-decoration-color: var(--inline-token-highlight)",
"text-decoration-color: var(--inline-reference-highlight)",
);
expect(link.firstElementChild?.getAttribute("style")).toContain(
"color: var(--inline-reference-highlight)",
);
});