This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-27 03:19:10 -04:00
1 parent f59d86a10c
commit 2f2bf38e34
1 file changed
+12 -10
+12 -10
View File
@@ -845,7 +845,7 @@
}; };
// ── Lifecycle ──────────────────────────────────────────────────────── // ── Lifecycle ────────────────────────────────────────────────────────
onMount(async () => { onMount(() => {
const terminal = getTerminal(); const terminal = getTerminal();
let handledDisplayFile = false; let handledDisplayFile = false;
@@ -904,16 +904,18 @@
if (!handledDisplayFile && terminal) { if (!handledDisplayFile && terminal) {
loading = true; loading = true;
// Discover server features on initial mount void (async () => {
const config = await getTerminalConfig(terminal.url, terminal.key); // Discover server features on initial mount
terminalEnabled = config?.features?.terminal !== false; const config = await getTerminalConfig(terminal.url, terminal.key);
terminalEnabled = config?.features?.terminal !== false;
if (chatId || savedPath === '/') { if (chatId || savedPath === '/') {
// Fetch session-specific cwd from the server (or global default for new chats) // Fetch session-specific cwd from the server (or global default for new chats)
savedPath = applyCwd(await getCwd(terminal.url, terminal.key, chatId ?? undefined)); savedPath = applyCwd(await getCwd(terminal.url, terminal.key, chatId ?? undefined));
} }
savedPath = clampToFileRoot(savedPath); savedPath = clampToFileRoot(savedPath);
loadDir(savedPath); loadDir(savedPath);
})();
} }
mounted = true; mounted = true;