summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/pkg
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-06-18 22:59:42 -0400
committerDax Raad <[email protected]>2025-06-18 23:01:19 -0400
commitbd8c3cd0f1e30f5ed1cbf222415cef136edd14a9 (patch)
tree1e630283bb595c6e1f8ce21d83ae8ba99f24e51a /packages/tui/pkg
parente5e9b3e3c04df00db57d573d3cc0a029736184b1 (diff)
downloadopencode-bd8c3cd0f1e30f5ed1cbf222415cef136edd14a9.tar.gz
opencode-bd8c3cd0f1e30f5ed1cbf222415cef136edd14a9.zip
BREAKING CONFIG CHANGE
We have changed the config format yet again - but this should be the final time. You can see the readme for more details but the summary is - got rid of global providers config - got rid of global toml - global config is now in `~/.config/opencode/config.json` - it will be merged with any project level config
Diffstat (limited to 'packages/tui/pkg')
-rw-r--r--packages/tui/pkg/client/gen/openapi.json104
-rw-r--r--packages/tui/pkg/client/generated-client.go50
2 files changed, 142 insertions, 12 deletions
diff --git a/packages/tui/pkg/client/gen/openapi.json b/packages/tui/pkg/client/gen/openapi.json
index ea055a64f..862a84d7d 100644
--- a/packages/tui/pkg/client/gen/openapi.json
+++ b/packages/tui/pkg/client/gen/openapi.json
@@ -1397,22 +1397,26 @@
"type": "string"
},
"keybinds": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "$ref": "#/components/schemas/Config.Keybinds"
},
"autoshare": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Share newly created sessions automatically"
},
"autoupdate": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Automatically update to the latest version"
},
"disabled_providers": {
"type": "array",
"items": {
"type": "string"
- }
+ },
+ "description": "Disable providers that are loaded automatically"
+ },
+ "model": {
+ "type": "string",
+ "description": "Model to use in the format of provider/model, eg anthropic/claude-2"
},
"provider": {
"type": "object",
@@ -1528,6 +1532,92 @@
}
}
},
+ "Config.Keybinds": {
+ "type": "object",
+ "properties": {
+ "leader": {
+ "type": "string"
+ },
+ "help": {
+ "type": "string"
+ },
+ "editor_open": {
+ "type": "string"
+ },
+ "session_new": {
+ "type": "string"
+ },
+ "session_list": {
+ "type": "string"
+ },
+ "session_share": {
+ "type": "string"
+ },
+ "session_interrupt": {
+ "type": "string"
+ },
+ "session_compact": {
+ "type": "string"
+ },
+ "tool_details": {
+ "type": "string"
+ },
+ "model_list": {
+ "type": "string"
+ },
+ "theme_list": {
+ "type": "string"
+ },
+ "project_init": {
+ "type": "string"
+ },
+ "input_clear": {
+ "type": "string"
+ },
+ "input_paste": {
+ "type": "string"
+ },
+ "input_submit": {
+ "type": "string"
+ },
+ "input_newline": {
+ "type": "string"
+ },
+ "history_previous": {
+ "type": "string"
+ },
+ "history_next": {
+ "type": "string"
+ },
+ "messages_page_up": {
+ "type": "string"
+ },
+ "messages_page_down": {
+ "type": "string"
+ },
+ "messages_half_page_up": {
+ "type": "string"
+ },
+ "messages_half_page_down": {
+ "type": "string"
+ },
+ "messages_previous": {
+ "type": "string"
+ },
+ "messages_next": {
+ "type": "string"
+ },
+ "messages_first": {
+ "type": "string"
+ },
+ "messages_last": {
+ "type": "string"
+ },
+ "app_exit": {
+ "type": "string"
+ }
+ }
+ },
"Provider.Info": {
"type": "object",
"properties": {
diff --git a/packages/tui/pkg/client/generated-client.go b/packages/tui/pkg/client/generated-client.go
index c2ecffe94..15acb5488 100644
--- a/packages/tui/pkg/client/generated-client.go
+++ b/packages/tui/pkg/client/generated-client.go
@@ -41,13 +41,22 @@ type AppInfo struct {
// ConfigInfo defines model for Config.Info.
type ConfigInfo struct {
- Schema *string `json:"$schema,omitempty"`
- Autoshare *bool `json:"autoshare,omitempty"`
- Autoupdate *bool `json:"autoupdate,omitempty"`
+ Schema *string `json:"$schema,omitempty"`
+
+ // Autoshare Share newly created sessions automatically
+ Autoshare *bool `json:"autoshare,omitempty"`
+
+ // Autoupdate Automatically update to the latest version
+ Autoupdate *bool `json:"autoupdate,omitempty"`
+
+ // DisabledProviders Disable providers that are loaded automatically
DisabledProviders *[]string `json:"disabled_providers,omitempty"`
- Keybinds *map[string]string `json:"keybinds,omitempty"`
+ Keybinds *ConfigKeybinds `json:"keybinds,omitempty"`
Mcp *map[string]ConfigInfo_Mcp_AdditionalProperties `json:"mcp,omitempty"`
- Provider *map[string]struct {
+
+ // Model Model to use in the format of provider/model, eg anthropic/claude-2
+ Model *string `json:"model,omitempty"`
+ Provider *map[string]struct {
Api *string `json:"api,omitempty"`
Env *[]string `json:"env,omitempty"`
Id *string `json:"id,omitempty"`
@@ -80,6 +89,37 @@ type ConfigInfo_Mcp_AdditionalProperties struct {
union json.RawMessage
}
+// ConfigKeybinds defines model for Config.Keybinds.
+type ConfigKeybinds struct {
+ AppExit *string `json:"app_exit,omitempty"`
+ EditorOpen *string `json:"editor_open,omitempty"`
+ Help *string `json:"help,omitempty"`
+ HistoryNext *string `json:"history_next,omitempty"`
+ HistoryPrevious *string `json:"history_previous,omitempty"`
+ InputClear *string `json:"input_clear,omitempty"`
+ InputNewline *string `json:"input_newline,omitempty"`
+ InputPaste *string `json:"input_paste,omitempty"`
+ InputSubmit *string `json:"input_submit,omitempty"`
+ Leader *string `json:"leader,omitempty"`
+ MessagesFirst *string `json:"messages_first,omitempty"`
+ MessagesHalfPageDown *string `json:"messages_half_page_down,omitempty"`
+ MessagesHalfPageUp *string `json:"messages_half_page_up,omitempty"`
+ MessagesLast *string `json:"messages_last,omitempty"`
+ MessagesNext *string `json:"messages_next,omitempty"`
+ MessagesPageDown *string `json:"messages_page_down,omitempty"`
+ MessagesPageUp *string `json:"messages_page_up,omitempty"`
+ MessagesPrevious *string `json:"messages_previous,omitempty"`
+ ModelList *string `json:"model_list,omitempty"`
+ ProjectInit *string `json:"project_init,omitempty"`
+ SessionCompact *string `json:"session_compact,omitempty"`
+ SessionInterrupt *string `json:"session_interrupt,omitempty"`
+ SessionList *string `json:"session_list,omitempty"`
+ SessionNew *string `json:"session_new,omitempty"`
+ SessionShare *string `json:"session_share,omitempty"`
+ ThemeList *string `json:"theme_list,omitempty"`
+ ToolDetails *string `json:"tool_details,omitempty"`
+}
+
// ConfigMcpLocal defines model for Config.McpLocal.
type ConfigMcpLocal struct {
Command []string `json:"command"`