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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user