cleanup comments
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import * as core from "@actions/core";
|
||||
import { ClaudeAgent } from "./agents/claude.ts";
|
||||
|
||||
// Expected environment variables that should be passed as inputs
|
||||
export const EXPECTED_INPUTS: string[] = [
|
||||
"ANTHROPIC_API_KEY",
|
||||
"GITHUB_TOKEN",
|
||||
@@ -29,24 +28,19 @@ export interface MainResult {
|
||||
|
||||
export async function main(params: MainParams): Promise<MainResult> {
|
||||
try {
|
||||
// Extract inputs from params
|
||||
const { inputs, env, cwd } = params;
|
||||
|
||||
// Set working directory if different from current
|
||||
if (cwd !== process.cwd()) {
|
||||
process.chdir(cwd);
|
||||
}
|
||||
|
||||
// Set environment variables
|
||||
Object.assign(process.env, env);
|
||||
|
||||
core.info(`→ Starting agent run with Claude Code`);
|
||||
|
||||
// Create and install the Claude agent
|
||||
const agent = new ClaudeAgent({ apiKey: inputs.anthropic_api_key });
|
||||
await agent.install();
|
||||
|
||||
// Execute the agent with the prompt
|
||||
const result = await agent.execute(inputs.prompt);
|
||||
|
||||
if (!result.success) {
|
||||
|
||||
Reference in New Issue
Block a user