Skip to content

Conversation

@continue
Copy link
Contributor

@continue continue bot commented Oct 14, 2025

Summary

Fixes an issue where using cn -p --agent owner/package incorrectly required a prompt argument, even though agent files can provide their own prompts.

Changes

  • Modified prompt validation in index.ts to check for --agent flag presence
  • Agent files with prompts no longer require additional user prompts
  • Added example usage with --agent flag to the error message
  • Added test case to verify --agent flag bypasses prompt requirement

Example 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:

cn -p --agent owner/package  # Uses agent file's prompt
cn -p --agent owner/package "additional context"  # Combines both prompts

Testing

  • Added new test case: "should not require prompt when using --agent flag with -p"
  • Existing tests continue to pass

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.

  • Bug Fixes
    • Skip prompt requirement when -p is used with --agent in index.ts.
    • Add agent usage example to the -p error message.
    • Add e2e test to verify --agent bypasses the prompt check.

- 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]>
@continue continue bot requested a review from a team as a code owner October 14, 2025 04:31
@continue continue bot requested review from tingwai and removed request for a team October 14, 2025 04:31
@github-actions
Copy link

⚠️ PR Title Format

Your PR title doesn't follow the conventional commit format, but this won't block your PR from being merged. We recommend using this format for better project organization.

Expected Format:

<type>[optional scope]: <description>

Examples:

  • feat: add changelog generation support
  • fix: resolve login redirect issue
  • docs: update README with new instructions
  • chore: update dependencies

Valid Types:

feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

This helps with:

  • 📝 Automatic changelog generation
  • 🚀 Automated semantic versioning
  • 📊 Better project history tracking

This is a non-blocking warning - your PR can still be merged without fixing this.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 14, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 14, 2025
@sestinj sestinj merged commit f7e69d8 into main Oct 14, 2025
53 of 55 checks passed
@sestinj sestinj deleted the fix-agent-prompt-validation branch October 14, 2025 05:02
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 14, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 14, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 14, 2025

🎉 This PR is included in version 1.28.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants