mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 14:17:40 +00:00
fix(ui): preserve byProvider in tools_config whitelist on save
The PR #153 whitelist stripped byProvider on agent config save, but byProvider is actively used in policy.go for per-provider tool overrides. Add it to the whitelist and ToolPolicyConfig type.
This commit is contained in:
1 parent
0592be359d
commit
eefc5ef4f2
2 files changed
+2
-1
No files matched your search
@@ -78,7 +78,7 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) {
|
||||
const updates: Record<string, unknown> = {
|
||||
subagents_config: subEnabled ? sub : null,
|
||||
tools_config: toolsEnabled
|
||||
? { profile: tools.profile, allow: tools.allow, deny: tools.deny, alsoAllow: tools.alsoAllow }
|
||||
? { profile: tools.profile, allow: tools.allow, deny: tools.deny, alsoAllow: tools.alsoAllow, byProvider: tools.byProvider }
|
||||
: {},
|
||||
compaction_config: comp,
|
||||
context_pruning: pruneEnabled ? prune : null,
|
||||
|
||||
@@ -7,6 +7,7 @@ export interface ToolPolicyConfig {
|
||||
allow?: string[];
|
||||
deny?: string[];
|
||||
alsoAllow?: string[];
|
||||
byProvider?: Record<string, { profile?: string; allow?: string[]; deny?: string[]; alsoAllow?: string[] }>;
|
||||
}
|
||||
|
||||
export interface SubagentsConfig {
|
||||
|
||||
Reference in new issue
Block a user