- Function naming: advanced_paste_from_<input>_to_<output> is now the only
supported format. The old format without _to_ is removed.
- Each script must define exactly one advanced_paste_from_* function.
- Added WSL execution path (ExecuteScriptViaWslAsync) for users with Python
only in WSL.
- New settings: UseWsl toggle and WslDistribution text field in Settings UI.
- Runner sets ADVANCED_PASTE_WORK_DIR env var so file-output scripts write
to Windows-accessible paths under /mnt/c/ when running in WSL.
- Updated unit tests: replaced InferFormatsFromSignature tests with
ReadMetadata tests covering the new naming convention.
- Updated documentation with WSL mode instructions and work_dir guidance.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 11 unit tests for V2 format inference from convert() signature
- Fix IntegrationTestUserSettings mock to implement IsPythonScriptsEnabled
- All 33 PythonScriptServiceTests pass
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Extract script name, line, and column from Python tracebacks in error summaries
- Add ParsePipInstallError to show concise pip errors with full stderr in details tooltip
- Add timeouts to pip install (Windows/WSL) and import-check subprocesses to prevent UI freezes
- Add PythonPackageInstallTimeout resource string
- Add unit tests for all new parsing logic
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>