Add in-app Feynman help

This commit is contained in:
Advait Paliwal
2026-03-22 14:46:09 -07:00
parent dbdad94adc
commit c6a226c2c2
2 changed files with 84 additions and 0 deletions

View File

@@ -138,6 +138,9 @@ async function probeTerminalBackgroundHex(timeoutMs = 120): Promise<string | und
}
const wasRaw = "isRaw" in input ? Boolean((input as typeof input & { isRaw?: boolean }).isRaw) : false;
const wasFlowing = "readableFlowing" in input
? (input as typeof input & { readableFlowing?: boolean | null }).readableFlowing
: null;
return await new Promise<string | undefined>((resolve) => {
let settled = false;
@@ -157,6 +160,9 @@ async function probeTerminalBackgroundHex(timeoutMs = 120): Promise<string | und
} catch {
// Ignore raw mode restore failures and return best-effort detection.
}
if (wasFlowing !== true) {
input.pause();
}
resolve(value);
};