mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 23:14:13 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user