feat: Open Code agent

This commit is contained in:
bracesproul
2025-03-06 20:04:55 -08:00
parent c8e985ca69
commit 38710f3cb0
5 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { v4 as uuidv4 } from "uuid";
import { AIMessage } from "@langchain/langgraph-sdk";
import { OpenCodeState, OpenCodeUpdate } from "../types";
export async function planner(state: OpenCodeState): Promise<OpenCodeUpdate> {
const aiMessage: AIMessage = {
type: "ai",
id: uuidv4(),
content: "",
tool_calls: [
{
name: "update_file",
args: {
args: {
new_file_content: "ADD_CODE_HERE"
},
},
id: uuidv4(),
type: "tool_call",
}
]
}
const toolMessage = {}
}