-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix: Allow --agent flag without prompt in headless mode #8227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Modified prompt validation to check for --agent flag presence - Agent files can provide their own prompts, so no user prompt is required - Added example usage with --agent flag to error message - Added test case to verify --agent flag bypasses prompt requirement Fixes issue where 'cn -p --agent owner/package' incorrectly required a prompt Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]> Co-authored-by: Username <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 2 files
|
🎉 This PR is included in version 1.28.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.25.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Fixes an issue where using
cn -p --agent owner/packageincorrectly required a prompt argument, even though agent files can provide their own prompts.Changes
index.tsto check for--agentflag presence--agentflag to the error message--agentflag bypasses prompt requirementExample Usage
Before this fix, the following command would fail:
cn -p --agent owner/package # Error: A prompt is required when using the -p/--print flag.After this fix, it works correctly:
Testing
This agent session was co-authored by dallin and Continue.
Summary by cubic
Allows using --agent with -p in headless mode without a user prompt. Agent files can supply the prompt; optional user text still works.