Align dev workflow with node-based electron-vite dev and tighten assistant markdown layout

This commit is contained in:
Shantur Rathore
2025-10-30 22:58:49 +00:00
parent 37a47699e3
commit 505a06de05
10 changed files with 8173 additions and 60 deletions

View File

@@ -5,6 +5,7 @@ import type { TextPart } from "../types/message"
interface MarkdownProps {
part: TextPart
isDark?: boolean
size?: "base" | "sm" | "tight"
}
export function Markdown(props: MarkdownProps) {
@@ -94,5 +95,17 @@ export function Markdown(props: MarkdownProps) {
})
})
return <div ref={containerRef} class="prose prose-sm dark:prose-invert max-w-none" innerHTML={html()} />
const proseClass = () => {
const classes = ["prose", "dark:prose-invert", "max-w-none"]
if (props.size === "tight") {
classes.push("prose-sm", "prose-tight")
} else if (props.size === "sm") {
classes.push("prose-sm")
}
return classes.join(" ")
}
return <div ref={containerRef} class={proseClass()} innerHTML={html()} />
}