fix: address PR review comments for v1.0 simplification

- Remove duplicate prompt field spread (line 160)
- Remove async from generatePrompt since slash commands are handled by Claude Code
- Add detailed comment explaining why prompt → agent mode logic
- Remove entire slash-commands loader and directories as Claude Code handles natively
- Simplify prompt generation to just pass through to Claude Code

These changes align with v1.0 philosophy: GitHub Action is a thin wrapper
that delegates everything to Claude Code for native handling.
This commit is contained in:
km-anthropic
2025-08-07 11:50:58 -07:00
parent acbef8d08c
commit 65896abe74
3 changed files with 10 additions and 169 deletions

View File

@@ -10,6 +10,12 @@ export type AutoDetectedMode = "tag" | "agent";
export function detectMode(context: GitHubContext): AutoDetectedMode {
// If prompt is provided, always use agent mode
// Reasoning: When users provide explicit instructions via the prompt parameter,
// they want Claude to execute those instructions immediately without waiting for
// @claude mentions or other triggers. This aligns with the v1.0 philosophy where
// Claude Code handles everything - the GitHub Action is just a thin wrapper that
// passes through prompts directly to Claude Code for native handling (including
// slash commands). This provides the most direct and flexible interaction model.
if (context.inputs?.prompt) {
return "agent";
}