mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 10:21:16 +08:00
feat(openclaw): add Env/Tools/Agents config panels
- Migrate OpenClaw commands from provider.rs to dedicated commands/openclaw.rs - Add backend types and read/write for env, tools, agents.defaults sections - Create EnvPanel (API key + custom vars KV editor) - Create ToolsPanel (profile selector + allow/deny lists) - Create AgentsDefaultsPanel (default model + runtime parameters) - Extend App.tsx menu bar with Env/Tools/Agents buttons - Remove Prompts button for OpenClaw (overlaps with Workspace AGENTS.md)
This commit is contained in:
@@ -467,3 +467,23 @@ export interface OpenClawProviderConfig {
|
||||
api?: string; // API 协议类型(如 "openai-completions"、"anthropic")
|
||||
models?: OpenClawModel[]; // 可用模型列表
|
||||
}
|
||||
|
||||
// OpenClaw agents.defaults 完整配置
|
||||
export interface OpenClawAgentsDefaults {
|
||||
model?: OpenClawDefaultModel;
|
||||
models?: Record<string, OpenClawModelCatalogEntry>;
|
||||
[key: string]: unknown; // preserve unknown fields
|
||||
}
|
||||
|
||||
// OpenClaw env 配置(openclaw.json 的 env 节点)
|
||||
export interface OpenClawEnvConfig {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
// OpenClaw tools 配置(openclaw.json 的 tools 节点)
|
||||
export interface OpenClawToolsConfig {
|
||||
profile?: string;
|
||||
allow?: string[];
|
||||
deny?: string[];
|
||||
[key: string]: unknown; // preserve unknown fields
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user