Add markdown rendering with syntax highlighting and copy buttons
- Implement markdown parser using marked with Shiki syntax highlighting - Add CodeBlockInline component for tool call outputs with syntax highlighting - Add Markdown component for assistant message text with code blocks - Add ThemeProvider for light/dark mode support - Add copy buttons to all code blocks (markdown and tool calls) - Support 20+ languages: TypeScript, JavaScript, Python, Bash, JSON, HTML, CSS, C++, Java, C, C#, Rust, Go, PHP, Ruby, Swift, Kotlin, and more - Auto-detect language from file extensions in tool call outputs - Apply consistent styling for code blocks across the application - Fix whitespace handling in markdown-rendered text - Add language labels to all code blocks
This commit is contained in:
10
src/main.tsx
10
src/main.tsx
@@ -1,5 +1,6 @@
|
||||
import { render } from "solid-js/web"
|
||||
import App from "./App"
|
||||
import { ThemeProvider } from "./lib/theme"
|
||||
import "./index.css"
|
||||
|
||||
const root = document.getElementById("root")
|
||||
@@ -8,4 +9,11 @@ if (!root) {
|
||||
throw new Error("Root element not found")
|
||||
}
|
||||
|
||||
render(() => <App />, root)
|
||||
render(
|
||||
() => (
|
||||
<ThemeProvider>
|
||||
<App />
|
||||
</ThemeProvider>
|
||||
),
|
||||
root,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user