mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 14:24:13 +08:00
Default systemPrompt to claude_code preset
Without an explicit systemPrompt, the SDK would use no system prompt. Now it defaults to the claude_code preset to match CLI behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,7 @@ export function parseSdkOptions(options: ClaudeOptions): ParsedSdkOptions {
|
|||||||
env.GITHUB_ACTION_INPUTS = process.env.INPUT_ACTION_INPUTS_PRESENT;
|
env.GITHUB_ACTION_INPUTS = process.env.INPUT_ACTION_INPUTS_PRESENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build system prompt option
|
// Build system prompt option - default to claude_code preset
|
||||||
let systemPrompt: SdkOptions["systemPrompt"];
|
let systemPrompt: SdkOptions["systemPrompt"];
|
||||||
if (options.systemPrompt) {
|
if (options.systemPrompt) {
|
||||||
systemPrompt = options.systemPrompt;
|
systemPrompt = options.systemPrompt;
|
||||||
@@ -111,6 +111,12 @@ export function parseSdkOptions(options: ClaudeOptions): ParsedSdkOptions {
|
|||||||
preset: "claude_code",
|
preset: "claude_code",
|
||||||
append: options.appendSystemPrompt,
|
append: options.appendSystemPrompt,
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
// Default to claude_code preset when no custom prompt is specified
|
||||||
|
systemPrompt = {
|
||||||
|
type: "preset",
|
||||||
|
preset: "claude_code",
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build SDK options - use merged tools from both direct options and claudeArgs
|
// Build SDK options - use merged tools from both direct options and claudeArgs
|
||||||
|
|||||||
Reference in New Issue
Block a user