Prevents UTF-8 encoding crash when pasting text from Word or Google Docs, which may contain lone surrogate code points (U+D800-U+DFFF). Reuses existing _sanitize_surrogates() from run_agent module.
434 KiB
434 KiB