mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Refactor tools
This commit is contained in:
@@ -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()}`,
|
||||
|
||||
Reference in New Issue
Block a user