Commit Graph
7 Commits
Author SHA1 Message Date
Matthew Leibowitz 9c57490bf1 regen 2025-05-27 01:40:03 +02:00
Matthew Leibowitz aa31275bdc Merge remote-tracking branch 'upstream/main' into dev/system-prompt-file 2025-05-27 01:33:37 +02:00
Matthew Leibowitz 9aac9c75b3 Formatting 2025-05-26 04:03:09 +02:00
Matthew Leibowitz eb37c9a493 Formatting 2025-05-26 03:46:39 +02:00
Matthew Leibowitz 3e924fe06b Refactor the prompt reading logic 2025-05-25 19:08:36 +02:00
Matthew Leibowitz 96e0fda3bb Improve the tests a bit
Removed the duplicate code and just use helper functions.
2025-05-24 04:07:29 +02:00
Matthew Leibowitz 91ba53d8b4 feat: Add system-prompt-file input for file-based system prompts
This enhancement adds the ability to load a system prompt from a file, similar to
the existing prompt-file functionality, providing more flexibility when working with
complex system prompts.

Key changes:
- Added new `system-prompt-file` input to action.yml with proper description
- Updated main.ts implementation to handle file-based system prompts with:
  - File existence checking and appropriate error handling
  - Proper precedence (system-prompt-file takes priority over system-prompt)
  - Consistent error messages with existing prompt-file implementation

Test coverage added:
- Basic usage: Test verifies system-prompt-file loads content correctly
- Error handling: Test ensures proper errors when system-prompt-file doesn't exist
- Precedence: Test confirms system-prompt-file overrides system-prompt when both exist
- Integration: Test validates both prompt-file and system-prompt-file work together
- Max tokens: Test verifies custom token limits are properly passed to the model
- Testing infrastructure: Improved mock implementations that detect unexpected calls

Documentation:
- Updated README.md with system-prompt-file in inputs table
- Added dedicated usage example for system-prompt-file
- Fixed formatting in inputs table

CI/CD:
- Updated workflow to test system-prompt-file functionality with actual file content

This feature maintains backward compatibility while adding a useful option
for workflows that need to use more complex system prompts stored in files.
2025-05-24 03:50:15 +02:00