with open('hooks/use-auto-tagging.ts', 'r') as f: content = f.read() # Make sure we add `const { language } = useLanguage();` content = content.replace( 'export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoTaggingProps) {', 'export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoTaggingProps) {\n const { language } = useLanguage();' ) with open('hooks/use-auto-tagging.ts', 'w') as f: f.write(content)