refactor(opencode): improve startup time by 38% (#30453)

Co-authored-by: starptech <starptech@starptechs-MBP.fritz.box>
This commit is contained in:
Dustin Deus
2026-06-02 21:20:25 +02:00
committed by GitHub
co-authored by starptech
parent 83c12f334e
commit 7dd2306dad
20 changed files with 1878 additions and 1851 deletions
+1 -1
View File
@@ -13,7 +13,6 @@ import type { GlobalEvent } from "@opencode-ai/sdk/v2"
import type { EventSource } from "./context/sdk"
import { win32DisableProcessedInput, win32InstallCtrlCGuard } from "./win32"
import { writeHeapSnapshot } from "v8"
import { TuiConfig } from "./config/tui"
import {
OPENCODE_PROCESS_ROLE,
OPENCODE_RUN_ID,
@@ -113,6 +112,7 @@ export const TuiThreadCommand = cmd({
describe: "agent to use",
}),
handler: async (args) => {
const { TuiConfig } = await import("./config/tui")
// Keep ENABLE_PROCESSED_INPUT cleared even if other code flips it.
// (Important when running under `bun run` wrappers on Windows.)
const unguard = win32InstallCtrlCGuard()