mirror of
https://github.com/stablyai/orca.git
synced 2026-10-26 00:03:55 +00:00
Fix Windows CJK terminal repaint and ConPTY wrap markers
Fix native Windows CJK terminal repaint and ConPTY wrap metadata handling.\n\nNormalize filesystem realpath results before authorization so WSL UNC roots compare consistently in CI.
This commit is contained in:
@@ -176,6 +176,33 @@ describe('createPtySubprocess', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('uses bundled ConPTY for native Windows daemon terminals', () => {
|
||||
const proc = mockPtyProcess()
|
||||
spawnMock.mockReturnValue(proc)
|
||||
const platform = Object.getOwnPropertyDescriptor(process, 'platform')
|
||||
Object.defineProperty(process, 'platform', { value: 'win32' })
|
||||
|
||||
try {
|
||||
createPtySubprocess({
|
||||
sessionId: 'test',
|
||||
cols: 80,
|
||||
rows: 24,
|
||||
cwd: 'C:\\repo',
|
||||
env: { COMSPEC: 'C:\\Windows\\System32\\cmd.exe' }
|
||||
})
|
||||
} finally {
|
||||
if (platform) {
|
||||
Object.defineProperty(process, 'platform', platform)
|
||||
}
|
||||
}
|
||||
|
||||
expect(spawnMock).toHaveBeenCalledWith(
|
||||
expect.any(String),
|
||||
expect.any(Array),
|
||||
expect.objectContaining({ useConptyDll: true })
|
||||
)
|
||||
})
|
||||
|
||||
it('suppresses the first-run Powerlevel10k wizard for daemon terminals', () => {
|
||||
const proc = mockPtyProcess()
|
||||
spawnMock.mockReturnValue(proc)
|
||||
|
||||
@@ -483,7 +483,10 @@ function spawnDaemonPtyWithWindowsFallback(args: {
|
||||
cols: args.cols,
|
||||
rows: args.rows,
|
||||
cwd,
|
||||
env: args.env
|
||||
env: args.env,
|
||||
// Why: bundled ConPTY has the modern wrap-marker behavior xterm expects;
|
||||
// legacy system ConPTY can corrupt full-width TUI rows in scrollback.
|
||||
...(process.platform === 'win32' ? { useConptyDll: true } : {})
|
||||
})
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user