diff options
| author | adamdotdevin <[email protected]> | 2025-08-10 19:24:16 -0500 |
|---|---|---|
| committer | adamdotdevin <[email protected]> | 2025-08-10 19:25:03 -0500 |
| commit | b8d2aebf09313d451cec873b3d0807b818015b32 (patch) | |
| tree | 05f4edc9e4b15b6754e555a7b4eb03b46c997a58 /packages/sdk/go/config.go | |
| parent | 20e818ad05b385b51a29d265f0731155562e88c2 (diff) | |
| download | opencode-b8d2aebf09313d451cec873b3d0807b818015b32.tar.gz opencode-b8d2aebf09313d451cec873b3d0807b818015b32.zip | |
feat: thinking blocks rendered in tui and share page
Diffstat (limited to 'packages/sdk/go/config.go')
| -rw-r--r-- | packages/sdk/go/config.go | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/packages/sdk/go/config.go b/packages/sdk/go/config.go index a7b75a1bf..ed3e3c5ab 100644 --- a/packages/sdk/go/config.go +++ b/packages/sdk/go/config.go @@ -74,9 +74,10 @@ type Config struct { // Control sharing behavior:'manual' allows manual sharing via commands, 'auto' // enables automatic sharing, 'disabled' disables all sharing Share ConfigShare `json:"share"` - // Small model to use for tasks like title generation in the - // format of provider/model + // Small model to use for tasks like title generation in the format of + // provider/model SmallModel string `json:"small_model"` + Snapshot bool `json:"snapshot"` // Theme name to use for the interface Theme string `json:"theme"` // Custom username to display in conversations instead of system username @@ -105,6 +106,7 @@ type configJSON struct { Provider apijson.Field Share apijson.Field SmallModel apijson.Field + Snapshot apijson.Field Theme apijson.Field Username apijson.Field raw string @@ -780,9 +782,10 @@ func (r ConfigModePlanMode) IsKnown() bool { } type ConfigPermission struct { - Bash ConfigPermissionBashUnion `json:"bash"` - Edit ConfigPermissionEdit `json:"edit"` - JSON configPermissionJSON `json:"-"` + Bash ConfigPermissionBashUnion `json:"bash"` + Edit ConfigPermissionEdit `json:"edit"` + Webfetch ConfigPermissionWebfetch `json:"webfetch"` + JSON configPermissionJSON `json:"-"` } // configPermissionJSON contains the JSON metadata for the struct @@ -790,6 +793,7 @@ type ConfigPermission struct { type configPermissionJSON struct { Bash apijson.Field Edit apijson.Field + Webfetch apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -876,6 +880,22 @@ func (r ConfigPermissionEdit) IsKnown() bool { return false } +type ConfigPermissionWebfetch string + +const ( + ConfigPermissionWebfetchAsk ConfigPermissionWebfetch = "ask" + ConfigPermissionWebfetchAllow ConfigPermissionWebfetch = "allow" + ConfigPermissionWebfetchDeny ConfigPermissionWebfetch = "deny" +) + +func (r ConfigPermissionWebfetch) IsKnown() bool { + switch r { + case ConfigPermissionWebfetchAsk, ConfigPermissionWebfetchAllow, ConfigPermissionWebfetchDeny: + return true + } + return false +} + type ConfigProvider struct { Models map[string]ConfigProviderModel `json:"models,required"` ID string `json:"id"` |
