summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-11-05 20:14:31 -0500
committerDax Raad <[email protected]>2025-11-05 20:14:31 -0500
commit6555a33eff502268bfa008c12fb61c556261a917 (patch)
tree09a055b68a99806f160dfddd562d34348c8d990a
parent247ce447760f6afbf9c522865fbfc43a15e2cefc (diff)
downloadopencode-6555a33eff502268bfa008c12fb61c556261a917.tar.gz
opencode-6555a33eff502268bfa008c12fb61c556261a917.zip
type errors
-rw-r--r--packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx3
-rw-r--r--packages/opencode/src/util/log.ts5
2 files changed, 5 insertions, 3 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
index c3ae1407d..663e4f520 100644
--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@@ -8,6 +8,7 @@ import {
t,
dim,
fg,
+ type KeyBinding,
} from "@opentui/core"
import { createEffect, createMemo, Match, Switch, type JSX, onMount, batch } from "solid-js"
import { useLocal } from "@tui/context/local"
@@ -84,7 +85,7 @@ export function Prompt(props: PromptProps) {
shift: binding.shift || undefined,
action: "submit" as const,
})),
- ]
+ ] satisfies KeyBinding[]
})
const fileStyleId = syntax().getStyleId("extmark.file")!
diff --git a/packages/opencode/src/util/log.ts b/packages/opencode/src/util/log.ts
index 5b013c05f..e771a903a 100644
--- a/packages/opencode/src/util/log.ts
+++ b/packages/opencode/src/util/log.ts
@@ -65,9 +65,10 @@ export namespace Log {
const logfile = Bun.file(logpath)
await fs.truncate(logpath).catch(() => {})
const writer = logfile.writer()
- write = (msg: any) => {
- writer.write(msg)
+ write = async (msg: any) => {
+ const num = writer.write(msg)
writer.flush()
+ return num
}
}