mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
enable track_progress for comments, fix mcp config (#558)
* enable track_progress for comments * refactor: pass mode explicitly to prepareMcpConfig Update prepareMcpConfig to receive the mode parameter from its callers instead of detecting agent mode by checking context.inputs.prompt. This makes mode determination explicit and controlled by the caller. Also update all test cases to include the required mode parameter and fix agent mode test expectations to match new behavior where MCP config is only included when tools are explicitly allowed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix test --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -85,6 +85,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockContext,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -106,6 +107,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockContextWithSigning,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -129,6 +131,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: ["mcp__github__create_issue", "mcp__github__create_pr"],
|
||||
context: mockContext,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -149,6 +152,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: ["mcp__github_inline_comment__create_inline_comment"],
|
||||
context: mockPRContext,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -169,6 +173,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockContext,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -189,6 +194,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockContextWithSigning,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -208,6 +214,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockContextWithSigning,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -225,6 +232,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockPRContext,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -244,6 +252,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockContext,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
@@ -261,6 +270,7 @@ describe("prepareMcpConfig", () => {
|
||||
baseBranch: "main",
|
||||
allowedTools: [],
|
||||
context: mockPRContext,
|
||||
mode: "tag",
|
||||
});
|
||||
|
||||
const parsed = JSON.parse(result);
|
||||
|
||||
Reference in New Issue
Block a user