mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-24 15:34:13 +08:00
feat: enhance mode routing with track_progress and context preservation
This PR implements enhanced mode routing to address two critical v1 migration issues: 1. Lost GitHub context when using custom prompts in tag mode 2. Missing tracking comments for automatic PR reviews Changes: - Add track_progress input to force tag mode with tracking comments for PR/issue events - Support custom prompt injection in tag mode via <custom_instructions> section - Inject GitHub context as environment variables in agent mode - Validate track_progress usage (only allowed for PR/issue events) - Comprehensive test coverage for new routing logic Event Routing: - Comment events: Default to tag mode, switch to agent with explicit prompt - PR/Issue events: Default to agent mode, switch to tag mode with track_progress - Custom prompts can now be used in tag mode without losing context This ensures backward compatibility while solving context preservation and tracking visibility issues reported in discussions #490 and #491.
This commit is contained in:
@@ -99,4 +99,5 @@ export type EventData =
|
||||
// Combined type with separate eventData field
|
||||
export type PreparedContext = CommonFields & {
|
||||
eventData: EventData;
|
||||
githubContext?: import("../github/context").GitHubContext;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user