fix(tools.ts): sync with active tools when no saved state

Hook was showing all tools as enabled even though only 4 were active.
Now initializes from pi.getActiveTools() to match actual state.
This commit is contained in:
Mario Zechner 2026-01-04 18:50:45 +01:00
parent 31438fdf2a
commit b06bd1d24c

View file

@ -57,8 +57,8 @@ export default function toolsHook(pi: HookAPI) {
enabledTools = new Set(savedTools.filter((t: string) => allTools.includes(t)));
applyTools();
} else {
// No saved state - enable all tools by default
enabledTools = new Set(allTools);
// No saved state - sync with currently active tools
enabledTools = new Set(pi.getActiveTools());
}
}