11import { preloadPatchFile } from "@pierre/diffs/ssr" ;
2- import { useCallback , useEffect , useRef , useState } from "react" ;
2+ import { useEffect , useRef , useState } from "react" ;
33import { ComposerPromptEditor , type ComposerPromptEditorHandle } from "../ComposerPromptEditor" ;
44import { EMPTY_COMPOSER_CONTEXT_RECORDS } from "../composerContextPresentation" ;
55import { terminalThemeFromApp } from "../ThreadTerminalDrawer" ;
@@ -22,10 +22,10 @@ export function PromptFontPreview() {
2222 const editorRef = useRef < ComposerPromptEditorHandle > ( null ) ;
2323 const [ prompt , setPrompt ] = useState ( PROMPT_PREVIEW_TEXT ) ;
2424 const [ cursor , setCursor ] = useState ( PROMPT_PREVIEW_TEXT . length ) ;
25- const onChange = useCallback ( ( nextValue : string , nextCursor : number ) => {
25+ const onChange = ( nextValue : string , nextCursor : number ) => {
2626 setPrompt ( nextValue ) ;
2727 setCursor ( nextCursor ) ;
28- } , [ ] ) ;
28+ } ;
2929 return (
3030 < div className = "mt-1 mb-2 rounded-lg border border-border bg-background px-3 py-2" >
3131 < ComposerPromptEditor
@@ -173,6 +173,7 @@ export function TerminalFontPreview({ family, size }: { family: string; size: nu
173173 const surface = surfaceRef . current ;
174174 if ( ! mount || ! surface ) return ;
175175 surface . setTheme ( terminalThemeFromApp ( mount ) ) ;
176+ // oxlint-disable-next-line react/exhaustive-effect-dependencies -- The tokens come from the DOM's computed styles, which a theme change rewrites.
176177 } , [ theme , resolvedTheme ] ) ;
177178
178179 useEffect ( ( ) => {
0 commit comments