/** @jsxImportSource @opentui/solid */ // P-COMP fixtures of highlighted code and a patch as the transcript's Write and Edit tools show them // (routes/session/index.tsx): inside , and PatchDiff in the unified view with word wrap. // crates/ui/tests/all/content.rs compares opencode_ui::code and opencode_ui::diff with them. import { PatchDiff } from "../../../tui/src/component/patch-diff" import { useTheme, useThemes } from "../../../tui/src/context/theme" import { renderComponent } from "../lib/component" const corpus: Record = await Bun.file(new URL("../fixtures/U.4a/corpus.json", import.meta.url)).json() function Code() { const theme = useTheme() const { currentSyntax: syntax } = useThemes() return ( ) } function Patch() { const theme = useTheme() const { currentSyntax: syntax } = useThemes() return ( ) } await renderComponent({ fixture: "U.4a/code", width: 60, height: 10, element: () => , ready: (frame) => frame.includes("steps.length"), // Highlighting arrives from the tree-sitter worker after the text; give it time before the frame settles again. act: () => Bun.sleep(500), }) await renderComponent({ fixture: "U.4a/diff", width: 60, height: 14, element: () => , ready: (frame) => frame.includes("unreachable"), act: () => Bun.sleep(500), })