mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
fix(ci): restore editor line budget
This commit is contained in:
@@ -29,6 +29,7 @@ import { buildDiffEditorHideUnchangedOptions } from './diff-editor-hide-unchange
|
||||
import { useDiffEditorRegistration } from './diff-navigation-context'
|
||||
import { preserveDiffViewStateAcrossModelSwaps } from './diff-model-swap-view-state'
|
||||
import { monacoFindOptions } from './monaco-find-options'
|
||||
import { resolveDocumentTheme } from '@/lib/document-theme'
|
||||
|
||||
export default function DiffViewer({
|
||||
modelKey,
|
||||
@@ -66,11 +67,8 @@ export default function DiffViewer({
|
||||
() => (allDiffComments ?? []).filter((c) => c.filePath === relativePath && isDiffComment(c)),
|
||||
[allDiffComments, relativePath]
|
||||
)
|
||||
const terminalFontSize = settings?.terminalFontSize ?? 13
|
||||
const diffEditorFontSize = computeDiffEditorFontSize(terminalFontSize, editorFontZoomLevel)
|
||||
const isDark =
|
||||
settings?.theme === 'dark' ||
|
||||
(settings?.theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
const terminalFontSize = settings?.terminalFontSize ?? 13,
|
||||
diffEditorFontSize = computeDiffEditorFontSize(terminalFontSize, editorFontZoomLevel)
|
||||
|
||||
const diffEditorRef = useRef<editor.IStandaloneDiffEditor | null>(null)
|
||||
const { registerDiffEditor, unregisterDiffEditor } = useDiffEditorRegistration()
|
||||
@@ -411,7 +409,7 @@ export default function DiffViewer({
|
||||
language={language}
|
||||
original={originalContent}
|
||||
modified={modifiedContent}
|
||||
theme={isDark ? 'vs-dark' : 'vs'}
|
||||
theme={resolveDocumentTheme(settings?.theme ?? 'light') ? 'vs-dark' : 'vs'}
|
||||
onMount={handleMount}
|
||||
// Why: key models by tab identity and preserve the modified undo stack across Changes-mode HEAD rotations.
|
||||
originalModelPath={currentDiffModelPaths.originalModelPath}
|
||||
|
||||
Reference in New Issue
Block a user