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

@@ -157,7 +157,6 @@ export function prepareContext(
disallowedTools: disallowedTools.join(","),
}),
...(prompt && { prompt }),
...(prompt && { prompt }),
...(claudeBranch && { claudeBranch }),
};
@@ -460,12 +459,12 @@ function getCommitInstructions(
}
}
export async function generatePrompt(
export function generatePrompt(
context: PreparedContext,
githubData: FetchDataResult,
useCommitSigning: boolean,
mode: Mode,
): Promise<string> {
): string {
// v1.0: Simply pass through the prompt to Claude Code
// Claude Code handles slash commands natively
const prompt = context.prompt || "";
@@ -767,8 +766,8 @@ export async function createPrompt(
recursive: true,
});
// Generate the prompt directly (now async due to slash commands)
const promptContent = await generatePrompt(
// Generate the prompt directly
const promptContent = generatePrompt(
preparedContext,
githubData,
context.inputs.useCommitSigning,