mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-03 09:13:30 +00:00
fix: send empty objects instead of null for tools_config and other_config when disabled or empty.
This commit is contained in:
1 parent
a4325e2abe
commit
99c0d7e445
1 file changed
+2
-2
@@ -73,7 +73,7 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) {
|
||||
try {
|
||||
const updates: Record<string, unknown> = {
|
||||
subagents_config: subEnabled ? sub : null,
|
||||
tools_config: toolsEnabled ? tools : null,
|
||||
tools_config: toolsEnabled ? tools : {},
|
||||
compaction_config: compEnabled ? comp : null,
|
||||
context_pruning: pruneEnabled ? prune : null,
|
||||
sandbox_config: sbEnabled ? sb : null,
|
||||
@@ -87,7 +87,7 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) {
|
||||
if (qgEnabled && qualityGates.length > 0) {
|
||||
otherBase.quality_gates = qualityGates;
|
||||
}
|
||||
updates.other_config = Object.keys(otherBase).length > 0 ? otherBase : null;
|
||||
updates.other_config = Object.keys(otherBase).length > 0 ? otherBase : {};
|
||||
await onUpdate(updates);
|
||||
setSaved(true);
|
||||
setTimeout(() => setSaved(false), 3000);
|
||||
|
||||
Reference in new issue
Block a user