fix reusable prompt example#28
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a reusable prompt example that broke after PR #16 switched to using filekeys, and adds an improved error message when a taskflow is not found.
Key Changes:
- Updated prompt reference syntax to use the new filekey format (PROMPTS_ prefix without .yaml extension)
- Enhanced error handling to display available taskflows when an invalid taskflow is requested
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| taskflows/examples/example_reusable_prompt.yaml | Updated prompt reference from old path format to new filekey format with PROMPTS_ prefix |
| main.py | Added user-friendly error message listing available taskflows before raising ValueError |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| Tell me more about apples. | ||
|
|
||
| {{ GitHubSecurityLab/seclab-taskflow-agent/prompts/examples/example_prompt.yaml }} | ||
| {{ PROMPTS_GitHubSecurityLab/seclab-taskflow-agent/prompts/examples/example_prompt }} |
There was a problem hiding this comment.
This was actually a deliberate change because the "PROMPTS" thing wasn't working. Do you know where that mechanism is implemented?
There was a problem hiding this comment.
It's probably because you didn't change the prompt path to match the filekey. It's implemented here: https://github.com/GitHubSecurityLab/seclab-taskflow-agent/blob/main/main.py#L466 Maybe the error message there should also list the available prompts
Fix reusable prompt example after #16 switched to use filekeys.
Drive by: Add error message that includes available taskflows when the taskflow is not found.