Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 008021df1c |
+1
-15
@@ -16,7 +16,6 @@ export class ClaudeAgent implements Agent {
|
|||||||
startTime: 0,
|
startTime: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
constructor(config: AgentConfig) {
|
constructor(config: AgentConfig) {
|
||||||
if (!config.apiKey) {
|
if (!config.apiKey) {
|
||||||
throw new Error("Claude agent requires an API key");
|
throw new Error("Claude agent requires an API key");
|
||||||
@@ -74,7 +73,6 @@ export class ClaudeAgent implements Agent {
|
|||||||
core.info("Running Claude Code...");
|
core.info("Running Claude Code...");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const claudePath = `${process.env.HOME}/.local/bin/claude`;
|
const claudePath = `${process.env.HOME}/.local/bin/claude`;
|
||||||
console.log(boxString(prompt, { title: "Prompt" }));
|
console.log(boxString(prompt, { title: "Prompt" }));
|
||||||
const args = [
|
const args = [
|
||||||
@@ -152,8 +150,7 @@ export class ClaudeAgent implements Agent {
|
|||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
try {
|
try {
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
} catch {
|
} catch {}
|
||||||
}
|
|
||||||
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
@@ -195,15 +192,6 @@ function processJSONChunk(chunk: string, agent?: ClaudeAgent): void {
|
|||||||
],
|
],
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if MCP servers are expected but failed
|
|
||||||
if (parsedChunk.mcp_servers?.length > 0) {
|
|
||||||
const failedServers = parsedChunk.mcp_servers.filter((server: any) => server.status === "failed");
|
|
||||||
if (failedServers.length > 0) {
|
|
||||||
const failedNames = failedServers.map((server: any) => server.name).join(", ");
|
|
||||||
throw new Error(`MCP servers failed to start: ${failedNames}. This indicates a configuration or environment issue that prevents GitHub integration from working.`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -279,7 +267,6 @@ function processJSONChunk(chunk: string, agent?: ClaudeAgent): void {
|
|||||||
core.info(` └─ bash_command: ${input.bash_command}`);
|
core.info(` └─ bash_command: ${input.bash_command}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -300,7 +287,6 @@ function processJSONChunk(chunk: string, agent?: ClaudeAgent): void {
|
|||||||
|
|
||||||
case "result":
|
case "result":
|
||||||
if (parsedChunk.subtype === "success") {
|
if (parsedChunk.subtype === "success") {
|
||||||
|
|
||||||
core.info(
|
core.info(
|
||||||
tableString([
|
tableString([
|
||||||
["Cost", `$${parsedChunk.total_cost_usd?.toFixed(4) || "0.0000"}`],
|
["Cost", `$${parsedChunk.total_cost_usd?.toFixed(4) || "0.0000"}`],
|
||||||
|
|||||||
@@ -25858,13 +25858,6 @@ function processJSONChunk(chunk, agent) {
|
|||||||
]
|
]
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
if (parsedChunk.mcp_servers?.length > 0) {
|
|
||||||
const failedServers = parsedChunk.mcp_servers.filter((server) => server.status === "failed");
|
|
||||||
if (failedServers.length > 0) {
|
|
||||||
const failedNames = failedServers.map((server) => server.name).join(", ");
|
|
||||||
throw new Error(`MCP servers failed to start: ${failedNames}. This indicates a configuration or environment issue that prevents GitHub integration from working.`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "assistant":
|
case "assistant":
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user