We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8acce14 commit c5276f6Copy full SHA for c5276f6
1 file changed
src/lib/components/workspace/Models/BuiltinTools.svelte
@@ -56,15 +56,6 @@
56
const allTools = Object.keys(toolLabels);
57
58
export let builtinTools: Record<string, boolean> = {};
59
-
60
- // Initialize missing keys to true (default enabled)
61
- $: {
62
- for (const tool of allTools) {
63
- if (!(tool in builtinTools)) {
64
- builtinTools[tool] = true;
65
- }
66
67
68
</script>
69
70
<div>
@@ -77,10 +68,12 @@
77
<Checkbox
78
state={builtinTools[tool] !== false ? 'checked' : 'unchecked'}
79
on:change={(e) => {
80
- builtinTools = {
81
- ...builtinTools,
82
- [tool]: e.detail === 'checked'
83
- };
71
+ if (e.detail === 'checked') {
72
+ delete builtinTools[tool];
73
+ } else {
74
+ builtinTools[tool] = false;
75
+ }
76
+ builtinTools = builtinTools;
84
}}
85
/>
86
0 commit comments