This commit is contained in:
Timothy Jaeryang Baek
2026-04-17 14:18:45 +09:00
parent 8acce144f9
commit c5276f62d0
@@ -56,15 +56,6 @@
const allTools = Object.keys(toolLabels);
export let builtinTools: Record<string, boolean> = {};
// Initialize missing keys to true (default enabled)
$: {
for (const tool of allTools) {
if (!(tool in builtinTools)) {
builtinTools[tool] = true;
}
}
}
</script>
<div>
@@ -77,10 +68,12 @@
<Checkbox
state={builtinTools[tool] !== false ? 'checked' : 'unchecked'}
on:change={(e) => {
builtinTools = {
...builtinTools,
[tool]: e.detail === 'checked'
};
if (e.detail === 'checked') {
delete builtinTools[tool];
} else {
builtinTools[tool] = false;
}
builtinTools = builtinTools;
}}
/>