mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
Refactor tools
This commit is contained in:
parent
8b69e2a8b5
commit
b347acf4f0
2 changed files with 3 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ import { ClaudeAskResponse } from "../shared/WebviewMessage"
|
|||
import { findLast, findLastIndex } from "../utils/array"
|
||||
import { arePathsEqual } from "../utils/path"
|
||||
import { parseMentions } from "./mentions"
|
||||
import { tools } from "./prompts/tools"
|
||||
import { TOOLS } from "./prompts/tools"
|
||||
import { truncateHalfConversation } from "./sliding-window"
|
||||
import { ClaudeDevProvider } from "./webview/ClaudeDevProvider"
|
||||
|
||||
|
|
@ -1464,7 +1464,7 @@ ${this.customInstructions.trim()}
|
|||
const { message, userCredits } = await this.api.createMessage(
|
||||
systemPrompt,
|
||||
this.apiConversationHistory,
|
||||
tools(cwd, this.api.getModel().info.supportsImages)
|
||||
TOOLS(cwd, this.api.getModel().info.supportsImages)
|
||||
)
|
||||
if (userCredits !== undefined) {
|
||||
console.log("Updating credits", userCredits)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Tool } from "../../shared/Tool"
|
||||
|
||||
export const tools = (cwd: string, supportsImages: boolean): Tool[] => [
|
||||
export const TOOLS = (cwd: string, supportsImages: boolean): Tool[] => [
|
||||
{
|
||||
name: "execute_command",
|
||||
description: `Execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Commands will be executed in the current working directory: ${cwd.toPosix()}`,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue