feat: add human-readable CI log output for show_full_output mode
Replace raw JSON dumps with concise, scannable log lines when show_full_output is enabled. Adds an onMessage callback to the SDK runner that formats each message type into 1-2 line summaries with emoji prefixes, tool-specific parameter display, result correlation for parallel tool calls, and subagent progress tracking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec1a718b2e
commit
ed536bb8a3
5 files changed
+1074
-13
No files matched your search
+19
-9
@@ -34,6 +34,7 @@ import { installPlugins } from "../../base-action/src/install-plugins";
|
||||
import { preparePrompt } from "../../base-action/src/prepare-prompt";
|
||||
import { runClaude } from "../../base-action/src/run-claude";
|
||||
import type { ClaudeRunResult } from "../../base-action/src/run-claude-sdk";
|
||||
import { createCiOutputFormatter } from "../ci-output-formatter";
|
||||
|
||||
/**
|
||||
* Install Claude Code CLI, handling retry logic and custom executable paths.
|
||||
@@ -243,15 +244,24 @@ async function run() {
|
||||
promptFile,
|
||||
});
|
||||
|
||||
const claudeResult: ClaudeRunResult = await runClaude(promptConfig.path, {
|
||||
claudeArgs: prepareResult.claudeArgs,
|
||||
disallowedTools: process.env.DISALLOWED_TOOLS || undefined,
|
||||
appendSystemPrompt: process.env.APPEND_SYSTEM_PROMPT,
|
||||
model: process.env.ANTHROPIC_MODEL,
|
||||
pathToClaudeCodeExecutable:
|
||||
process.env.INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE,
|
||||
showFullOutput: process.env.INPUT_SHOW_FULL_OUTPUT,
|
||||
});
|
||||
const showFullOutput =
|
||||
process.env.INPUT_SHOW_FULL_OUTPUT === "true" ||
|
||||
process.env.ACTIONS_STEP_DEBUG === "true";
|
||||
const onMessage = showFullOutput ? createCiOutputFormatter() : undefined;
|
||||
|
||||
const claudeResult: ClaudeRunResult = await runClaude(
|
||||
promptConfig.path,
|
||||
{
|
||||
claudeArgs: prepareResult.claudeArgs,
|
||||
disallowedTools: process.env.DISALLOWED_TOOLS || undefined,
|
||||
appendSystemPrompt: process.env.APPEND_SYSTEM_PROMPT,
|
||||
model: process.env.ANTHROPIC_MODEL,
|
||||
pathToClaudeCodeExecutable:
|
||||
process.env.INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE,
|
||||
showFullOutput: process.env.INPUT_SHOW_FULL_OUTPUT,
|
||||
},
|
||||
onMessage,
|
||||
);
|
||||
|
||||
claudeSuccess = claudeResult.conclusion === "success";
|
||||
executionFile = claudeResult.executionFile;
|
||||
|
||||
Reference in new issue
Block a user