feat(opencode): add extra options editor for SDK configuration

Add key-value pair editor for configuring additional SDK options like
timeout, setCacheKey, etc. Values are automatically parsed to appropriate
types (number, boolean, object) on save.

- Add `extra` field with serde flatten in Rust backend
- Add index signature to OpenCodeProviderOptions type
- Create ExtraOptionKeyInput component with local state pattern
- Place extra options section above models configuration
This commit is contained in:
Jason
2026-01-19 11:42:24 +08:00
parent 73013c10af
commit b0d0a2c466
7 changed files with 259 additions and 3 deletions
+2
View File
@@ -269,6 +269,8 @@ export interface OpenCodeProviderOptions {
baseURL?: string;
apiKey?: string;
headers?: Record<string, string>;
// 支持额外选项(timeout, setCacheKey 等)
[key: string]: unknown;
}
// OpenCode 供应商配置(settings_config 结构)