Skip to content

Commit 10a7d01

Browse files
Algorithm5838github-actions[bot]
authored andcommitted
fix: only persist disabled builtin tools in model meta
1 parent 75760ee commit 10a7d01

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/lib/components/workspace/Models/ModelEditor.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,11 @@
198198
}
199199
}
200200
201-
if (Object.keys(builtinTools).length > 0) {
202-
info.meta.builtinTools = builtinTools;
201+
const disabledTools = Object.fromEntries(
202+
Object.entries(builtinTools).filter(([_, v]) => v === false)
203+
);
204+
if (Object.keys(disabledTools).length > 0) {
205+
info.meta.builtinTools = disabledTools;
203206
} else {
204207
if (info.meta.builtinTools) {
205208
delete info.meta.builtinTools;

0 commit comments

Comments
 (0)