fix mobile terminal geometry sync

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H
2026-04-30 18:03:23 -04:00
co-authored by Orca
parent 1c8f23f1e5
commit 4fe89e656a
9 changed files with 161 additions and 32 deletions
+12
View File
@@ -142,6 +142,8 @@ type RuntimePtyController = {
write(ptyId: string, data: string): boolean
kill(ptyId: string): boolean
getForegroundProcess(ptyId: string): Promise<string | null>
serializeBuffer?(ptyId: string): Promise<{ data: string; cols: number; rows: number } | null>
getSize?(ptyId: string): { cols: number; rows: number } | null
}
type RuntimeNotifier = {
@@ -507,6 +509,16 @@ export class OrcaRuntimeService {
}
}
serializeTerminalBuffer(
ptyId: string
): Promise<{ data: string; cols: number; rows: number } | null> {
return this.ptyController?.serializeBuffer?.(ptyId) ?? Promise.resolve(null)
}
getTerminalSize(ptyId: string): { cols: number; rows: number } | null {
return this.ptyController?.getSize?.(ptyId) ?? null
}
resolveLeafForHandle(handle: string): { ptyId: string | null } | null {
const record = this.handles.get(handle)
if (!record) {