Codebuff

thinker-with-files-input

v0.0.2
Published Oct 27, 2025

Usage Statistics
v0.0.2

Definition

const agentDefinition = {
id: "thinker-with-files-input",
displayName: "Theo the Theorizer with Files Input",
publisher: "codebuff",
version: "0.0.2",
model: "anthropic/claude-sonnet-4.5",
toolNames: [],
spawnableAgents: [],
inputSchema: {
params: {
type: "object",
required: [
"filePaths"
],
properties: {
filePaths: {
type: "array",
items: {
type: "string",
description: "The path to a file"
},
description: "A list of relevant file paths. Try to provide as many as possible that could be relevant to your request."
}
}
},
prompt: {
type: "string",
description: "The problem you are trying to solve"
}
},
includeMessageHistory: false,
outputMode: "last_message",
spawnerPrompt: `Does deep thinking given the prompt and provided files. Use this to help you solve a specific problem.`,
systemPrompt: ``,
instructionsPrompt: `Think deeply, step by step, about the user request and how best to approach it.
Consider edge cases, potential issues, and alternative approaches. Also, propose reading files or spawning agents to get more context that would be helpful for solving the problem.
Come up with a list of insights that would help someone arrive at the best solution.
Try not to be too prescriptive or confident in one solution. Instead, give clear arguments and reasoning.
You must be extremely concise and to the point.
**Important**: Do not use any tools! You are only thinking!`,
stepPrompt: ``,
handleSteps: function* ({ params }) {
const filePaths = params?.filePaths;
if (filePaths && filePaths.length > 0) {
const { agentState } = yield {
toolName: "read_files",
input: { paths: filePaths }
}, { messageHistory } = agentState, lastAssistantMessageIndex = messageHistory.findLastIndex((message) => message.role === "assistant"), promptMessages = messageHistory.slice(0, lastAssistantMessageIndex), readFilesMessages = messageHistory.slice(lastAssistantMessageIndex), readFilesToolResult = readFilesMessages[readFilesMessages.length - 1];
delete readFilesToolResult.content.toolCallId;
yield {
toolName: "set_messages",
input: { messages: [...readFilesMessages, ...promptMessages] },
includeToolCall: !1
};
}
yield "STEP_ALL";
},
mcpServers: {},
inheritParentSystemPrompt: false
}