feat(opencode): add model-level options editor

Add support for configuring per-model options like provider routing.
Each model row now has an expand/collapse toggle to show a key-value
editor for model-specific options (e.g., provider order, fallbacks).

- Add options field to OpenCodeModel in Rust and TypeScript
- Add expandable key-value editor UI for each model
- Use local state pattern for option key input to prevent focus loss
- Add i18n translations for zh/en/ja
This commit is contained in:
Jason
2026-01-19 15:05:01 +08:00
parent b0d0a2c466
commit 3bd3845ec0
6 changed files with 279 additions and 29 deletions
+1
View File
@@ -262,6 +262,7 @@ export interface OpenCodeModel {
context?: number;
output?: number;
};
options?: Record<string, unknown>; // 模型级别额外选项(provider 路由等)
}
// OpenCode 供应商选项