feat(mobile): Add terminal powered by libghostty (#2056)

Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
Julius MarmingeandJulius Marminge committed 2026-04-17 19:48:19 -07:00
1 parent d686613e34
commit da6ea88331
84 files changed
+10510 -66

No files matched your search

@@ -602,16 +602,21 @@ export function TerminalViewport({
return;
}
const details = [
typeof event.exitCode === "number" ? `code ${event.exitCode}` : null,
typeof event.exitSignal === "number" ? `signal ${event.exitSignal}` : null,
]
.filter((value): value is string => value !== null)
.join(", ");
writeSystemMessage(
activeTerminal,
details.length > 0 ? `Process exited (${details})` : "Process exited",
);
if (event.type === "closed") {
writeSystemMessage(activeTerminal, "Terminal closed");
} else {
const details = [
typeof event.exitCode === "number" ? `code ${event.exitCode}` : null,
typeof event.exitSignal === "number" ? `signal ${event.exitSignal}` : null,
]
.filter((value): value is string => value !== null)
.join(", ");
writeSystemMessage(
activeTerminal,
details.length > 0 ? `Process exited (${details})` : "Process exited",
);
}
if (hasHandledExitRef.current) {
return;
}
+1
View File
@@ -7,6 +7,7 @@ export function terminalRunningSubprocessFromEvent(event: TerminalEvent): boolea
case "started":
case "restarted":
case "exited":
case "closed":
return false;
default:
return null;
+2
View File
@@ -34,6 +34,8 @@ function makeTerminalEvent(
return { ...base, type, ...overrides } as TerminalEvent;
case "exited":
return { ...base, type, exitCode: 0, exitSignal: null, ...overrides } as TerminalEvent;
case "closed":
return { ...base, type, ...overrides } as TerminalEvent;
case "started":
case "restarted":
return {