Skip to content

Commit c9638c9

Browse files
committed
Fix default timeout value.
Many callsites don’t pass duration, relying on the default. The way the default was specified was wrong, resulting in an 'undefined' value if no duration is passed instead of 5000. Passing `undefined` to setTimeout causes an immediate timeout (in practise a very shortly visible TUI toast UI.
1 parent 66e8c57 commit c9638c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/opencode/src/cli/cmd/tui

packages/opencode/src/cli/cmd/tui/event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const TuiEvent = {
3737
title: z.string().optional(),
3838
message: z.string(),
3939
variant: z.enum(["info", "success", "warning", "error"]),
40-
duration: z.number().default(5000).optional().describe("Duration in milliseconds"),
40+
duration: z.number().optional().default(5000).describe("Duration in milliseconds"),
4141
}),
4242
),
4343
SessionSelect: BusEvent.define(

0 commit comments

Comments
 (0)