|
23 | 23 | ---@class OpencodeToggleDecision |
24 | 24 | ---@field action 'open'|'close'|'hide'|'close_hidden'|'restore_hidden'|'migrate' |
25 | 25 |
|
26 | | ----@class OpencodeSessionStateMutations |
27 | | ----@field set_active fun(session: Session|nil, opts?: OpencodeProtectedStateSetOptions) |
28 | | ----@field clear_active fun(opts?: OpencodeProtectedStateSetOptions) |
29 | | ----@field set_restore_points fun(points: RestorePoint[], opts?: OpencodeProtectedStateSetOptions) |
30 | | ----@field reset_restore_points fun(opts?: OpencodeProtectedStateSetOptions) |
31 | | ----@field set_last_sent_context fun(context: OpencodeContext|nil) |
32 | | ----@field set_user_message_count fun(count: table<string, number>) |
33 | | - |
34 | | ----@class OpencodeJobStateMutations |
35 | | ----@field increment_count fun(delta?: integer, opts?: OpencodeProtectedStateSetOptions) |
36 | | ----@field decrement_count fun(delta?: integer, opts?: OpencodeProtectedStateSetOptions) |
37 | | ----@field set_count fun(count: integer, opts?: OpencodeProtectedStateSetOptions) |
38 | | ----@field set_server fun(server: OpencodeServer|nil, opts?: OpencodeProtectedStateSetOptions) |
39 | | ----@field clear_server fun(opts?: OpencodeProtectedStateSetOptions) |
40 | | ----@field set_api_client fun(client: OpencodeApiClient|nil) |
41 | | ----@field set_event_manager fun(manager: EventManager|nil) |
42 | | ----@field set_opencode_cli_version fun(version: string|nil) |
43 | | - |
44 | | ----@class OpencodeUiStateMutations |
45 | | ----@field set_windows fun(windows: OpencodeWindowState|nil) |
46 | | ----@field clear_windows fun() |
47 | | ----@field set_opening fun(is_opening: boolean) |
48 | | ----@field set_panel_focused fun(is_focused: boolean) |
49 | | ----@field set_last_focused_window fun(win_type: 'input'|'output'|nil) |
50 | | ----@field set_display_route fun(route: any) |
51 | | ----@field clear_display_route fun() |
52 | | ----@field set_last_code_window fun(win_id: integer|nil) |
53 | | ----@field set_current_code_buf fun(bufnr: integer|nil) |
54 | | ----@field set_last_window_width_ratio fun(ratio: number|nil) |
55 | | ----@field clear_last_window_width_ratio fun() |
56 | | ----@field set_input_content fun(lines: table) |
57 | | ----@field set_saved_window_options fun(opts: table|nil) |
58 | | ----@field set_pre_zoom_width fun(width: integer|nil) |
59 | | - |
60 | | ----@class OpencodeModelStateMutations |
61 | | ----@field set_mode fun(mode: string|nil) |
62 | | ----@field clear_mode fun() |
63 | | ----@field set_model fun(model: string|nil) |
64 | | ----@field clear_model fun() |
65 | | ----@field set_model_info fun(info: table|nil) |
66 | | ----@field set_variant fun(variant: string|nil) |
67 | | ----@field clear_variant fun() |
68 | | ----@field set_mode_model_map fun(mode_map: table<string, string>) |
69 | | ----@field set_mode_model_override fun(mode: string, model: string) |
70 | | - |
71 | | ----@class OpencodeRendererStateMutations |
72 | | ----@field set_messages fun(messages: OpencodeMessage[]|nil) |
73 | | ----@field set_current_message fun(message: OpencodeMessage|nil) |
74 | | ----@field set_last_user_message fun(message: OpencodeMessage|nil) |
75 | | ----@field set_pending_permissions fun(permissions: OpencodePermission[]) |
76 | | ----@field set_cost fun(cost: number) |
77 | | ----@field set_tokens_count fun(count: number) |
78 | | - |
79 | | ----@class OpencodeContextStateMutations |
80 | | ----@field set_current_context_config fun(config: OpencodeContextConfig|nil) |
81 | | ----@field set_context_updated_at fun(timestamp: number|nil) |
82 | | ----@field set_current_cwd fun(cwd: string|nil) |
83 | | - |
84 | 26 | ---@class OpencodeState |
85 | 27 | ---@field windows OpencodeWindowState|nil |
86 | 28 | ---@field is_opening boolean |
|
0 commit comments