mirror of
https://github.com/stablyai/orca.git
synced 2026-10-13 00:02:54 +00:00
fix: stop sending cursor style escape sequences to PTY as input
The cursor style sequence (e.g. \e[5 q) was being sent to the shell via sendInput(), causing literal "[5 q" text to appear in the terminal. The shell doesn't interpret DECSCUSR sequences. Cursor style is already correctly applied via xterm.js terminal options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
56dda7a637
commit
287c4e0898
@@ -2,26 +2,19 @@ import type { ITheme } from '@xterm/xterm'
|
||||
import type { PaneManager } from '@/lib/pane-manager/pane-manager'
|
||||
import type { GlobalSettings } from '../../../../shared/types'
|
||||
import {
|
||||
getCursorStyleSequence,
|
||||
getBuiltinTheme,
|
||||
resolvePaneStyleOptions,
|
||||
resolveEffectiveTerminalAppearance
|
||||
} from '@/lib/terminal-theme'
|
||||
import type { PtyTransport } from './pty-transport'
|
||||
|
||||
export function applyTerminalAppearance(
|
||||
manager: PaneManager,
|
||||
settings: GlobalSettings,
|
||||
systemPrefersDark: boolean,
|
||||
paneFontSizes: Map<number, number>,
|
||||
paneTransports: Map<number, PtyTransport>
|
||||
paneFontSizes: Map<number, number>
|
||||
): void {
|
||||
const appearance = resolveEffectiveTerminalAppearance(settings, systemPrefersDark)
|
||||
const paneStyles = resolvePaneStyleOptions(settings)
|
||||
const cursorSequence = getCursorStyleSequence(
|
||||
settings.terminalCursorStyle,
|
||||
settings.terminalCursorBlink
|
||||
)
|
||||
const theme: ITheme | null = appearance.theme ?? getBuiltinTheme(appearance.themeName)
|
||||
const paneBackground = theme?.background ?? '#000000'
|
||||
|
||||
@@ -38,8 +31,6 @@ export function applyTerminalAppearance(
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
const transport = paneTransports.get(pane.id)
|
||||
transport?.sendInput(cursorSequence)
|
||||
}
|
||||
|
||||
manager.setPaneStyleOptions({
|
||||
|
||||
@@ -82,8 +82,7 @@ export function useTerminalPaneLifecycle({
|
||||
manager,
|
||||
currentSettings,
|
||||
systemPrefersDarkRef.current,
|
||||
paneFontSizesRef.current,
|
||||
paneTransportsRef.current
|
||||
paneFontSizesRef.current
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user