export function preferQuickEditTools(activeTools: string[]): string[] { // Keep filtering "substitute_edit" (no longer registered): cleans up legacy saved active-tools state that still references it. const withoutDisabledTools = activeTools.filter((toolName) => toolName !== "edit" && toolName !== "substitute_edit"); return ["quick_edit", "target_edit"].reduce( (tools, toolName) => (tools.includes(toolName) ? tools : [...tools, toolName]), withoutDisabledTools, ); }