perf(webui): reduce repeated work and bound history rendering (#5703)
* perf(webui): reduce repeated work and bound history rendering * fix(webui): keep continuation reasoning with its answer * refactor(webui): reuse answer buffers and prepared copy text * perf(webui): restore conditional replay buffer initialization * fix(webui): remove code block pagination
This commit is contained in:
1 parent
1c451b5b5f
commit
1469d4811c
32 files changed
+1156
-361
No files matched your search
@@ -1,9 +1,17 @@
|
||||
import { act, fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { FilePreviewAvailabilityProvider } from "@/components/FilePreviewAvailabilityContext";
|
||||
import MarkdownTextRenderer from "@/components/MarkdownTextRenderer";
|
||||
|
||||
|
||||
// Exercise the asynchronous math boundary once, then test the loaded grammar cases.
|
||||
beforeAll(async () => {
|
||||
const view = render(<MarkdownTextRenderer>{"$$x^2$$"}</MarkdownTextRenderer>);
|
||||
await waitFor(() => expect(view.container.querySelector(".katex")).toBeInTheDocument());
|
||||
view.unmount();
|
||||
});
|
||||
|
||||
describe("MarkdownTextRenderer", () => {
|
||||
it("renders clickable markdown links in blue", () => {
|
||||
render(<MarkdownTextRenderer>[local server](http://127.0.0.1:7891/)</MarkdownTextRenderer>);
|
||||
|
||||
Reference in new issue
Block a user