1. Script header documentation (doc/devdocs/modules/advancedpaste-python-scripts.md)
- Complete reference for all @advancedpaste: header tags
- Windows and WSL/Linux execution mode protocols
- Declaring dependencies, security trust model, error handling
- Example scripts for both platforms
2. Custom scripts folder setting in Settings UI
- Added ScriptsFolder property to AdvancedPasteViewModel
- Added SettingsCard with TextBox + Browse folder dialog in XAML
- Added localization strings for the new setting
3. Auto-detect missing Python modules from import statements
- Scans script body for import/from-import statements
- Filters Python stdlib modules (CPython 3.12 set)
- Well-known import-to-pip mapping table (pywin32, Pillow, opencv-python, etc.)
- Merges auto-detected imports with explicit @advancedpaste:requires entries
- Explicit requires always take precedence
4. Better error messages for Python script failures
- Parses stderr to extract the final Python exception line
- User-friendly summaries for ModuleNotFoundError, SyntaxError, etc.
- ModuleNotFoundError includes pip install hint from the mapping table
- Full traceback available in Details section of the error UI
Added 12 unit tests for MergeWithAutoDetectedImports and ParsePythonError.
Fixed IntegrationTestUserSettings mock to implement IUserSettings Python members.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>