diff --git a/package.json b/package.json index 1aa18c5ba6..cd796fc505 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@agentclientprotocol/sdk": "^0.13.0", "@electron-toolkit/preload": "^3.0.2", "@electron-toolkit/utils": "^4.0.0", + "@fontsource/geist-mono": "^5.2.7", "@fontsource/geist-sans": "^5.2.5", "@radix-ui/react-collapsible": "^1.1.12", "@radix-ui/react-context-menu": "^2.2.16", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c1f23ec8e7..ef791833fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: '@electron-toolkit/utils': specifier: ^4.0.0 version: 4.0.0(electron@39.2.7) + '@fontsource/geist-mono': + specifier: ^5.2.7 + version: 5.2.7 '@fontsource/geist-sans': specifier: ^5.2.5 version: 5.2.5 @@ -692,6 +695,9 @@ packages: '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} + '@fontsource/geist-mono@5.2.7': + resolution: {integrity: sha512-xVPVFISJg/K0VVd+aQN0Y7X/sw9hUcJPyDWFJ5GpyU3bHELhoRsJkPSRSHXW32mOi0xZCUQDOaPj1sqIFJ1FGg==} + '@fontsource/geist-sans@5.2.5': resolution: {integrity: sha512-anllOHyJbElRs9fV15TeDRqAeb1IKm4bSknPl6ZMoyPTx1BBy7logudcUwpNjmQLkzn4Q0JGQLRCUKJYoyST6A==} @@ -4515,6 +4521,8 @@ snapshots: '@floating-ui/utils@0.2.10': {} + '@fontsource/geist-mono@5.2.7': {} + '@fontsource/geist-sans@5.2.5': {} '@humanfs/core@0.19.1': {} diff --git a/src/renderer/src/components/ChatView.tsx b/src/renderer/src/components/ChatView.tsx index 491319721c..db24c41b32 100644 --- a/src/renderer/src/components/ChatView.tsx +++ b/src/renderer/src/components/ChatView.tsx @@ -68,7 +68,7 @@ export function ChatView({ updates, isProcessing, hasSession, isInitializing, cu return (
{children}
, - h1: ({ children }) =>{children}
+ ), + // Headings: more space above (1.5x) than below (0.5x) for visual grouping + h1: ({ children }) => ( +
- {children}
-
- )
+ // Block code inside pre - no extra styling, pre handles it
+ return {children}
}
+ // Inline code
return (
-
+
{children}
)
},
pre: ({ children }) => (
-
+
{children}
),
+ // Links
a: ({ href, children }) => (
{children}
),
+ // Blockquote: subtle styling
blockquote: ({ children }) => (
-
+
{children}
),
- hr: () =>
,
+ hr: () =>
,
strong: ({ children }) => {children},
em: ({ children }) => {children},
// Table components for GFM table support
table: ({ children }) => (
-
+
{children}
diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx
index 99404c9c24..352b16fd25 100644
--- a/src/renderer/src/main.tsx
+++ b/src/renderer/src/main.tsx
@@ -1,4 +1,8 @@
-import '@fontsource/geist-sans'
+import '@fontsource/geist-sans/400.css'
+import '@fontsource/geist-sans/500.css'
+import '@fontsource/geist-sans/600.css'
+import '@fontsource/geist-sans/700.css'
+import '@fontsource/geist-mono/400.css'
import './styles/index.css'
import { StrictMode } from 'react'
diff --git a/src/renderer/src/styles/index.css b/src/renderer/src/styles/index.css
index f857fecc33..9c40480d77 100644
--- a/src/renderer/src/styles/index.css
+++ b/src/renderer/src/styles/index.css
@@ -42,6 +42,7 @@ body {
}
@theme inline {
+ --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);