Feature Request: Add -PromptFromFile Parameter to Task Cmdlets
Summary
Add a -PromptFromFile parameter to the following cmdlets to support reading prompts from external files:
Invoke-QwenTask
Invoke-CodexTask
Invoke-GeminiTask
Motivation
Currently, these cmdlets only accept prompts via the -Prompt parameter as inline strings. This creates several issues:
- Multiline prompts are difficult to handle - PowerShell here-strings can be cumbersome and error-prone when passed as arguments
- Large prompts clutter scripts - Long prompt templates make scripts harder to read and maintain
- No easy way to version prompt templates - Storing prompts in separate files allows better version control and reuse
- Encoding issues - Inline strings may have encoding/escaping problems with special characters
Proposed Solution
Add a new -PromptFromFile parameter that accepts a file path:
# Example usage
Invoke-QwenTask -PromptFromFile "C:\prompts\my-task-prompt.txt"
# Could also support relative paths
Invoke-CodexTask -PromptFromFile ".\prompts\analysis-prompt.md"
# Potential combination with other parameters
Invoke-GeminiTask -PromptFromFile "prompt.txt" -Model "gemini-pro"
Implementation Considerations
- Parameter validation - Ensure the file exists and is readable
- Encoding support - Support UTF-8 encoding (with/without BOM)
- Mutual exclusivity -
-Prompt and -PromptFromFile should be mutually exclusive
- Error handling - Clear error messages if file cannot be read
Example Prompt File
Analyze the following code and identify potential security issues:
1. Check for SQL injection vulnerabilities
2. Look for hardcoded credentials
3. Identify missing input validation
Provide recommendations for each issue found.
Benefits
- ✅ Cleaner scripts with separated concerns
- ✅ Easy reuse of common prompt templates
- ✅ Better support for complex/multiline prompts
- ✅ Simpler prompt iteration and A/B testing
- ✅ Team collaboration on prompt templates
Feature Request: Add
-PromptFromFileParameter to Task CmdletsSummary
Add a
-PromptFromFileparameter to the following cmdlets to support reading prompts from external files:Invoke-QwenTaskInvoke-CodexTaskInvoke-GeminiTaskMotivation
Currently, these cmdlets only accept prompts via the
-Promptparameter as inline strings. This creates several issues:Proposed Solution
Add a new
-PromptFromFileparameter that accepts a file path:Implementation Considerations
-Promptand-PromptFromFileshould be mutually exclusiveExample Prompt File
Benefits