mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Add browser_action tool
This commit is contained in:
@@ -57,6 +57,7 @@ export type ClineAsk =
|
||||
| "resume_task"
|
||||
| "resume_completed_task"
|
||||
| "mistake_limit_reached"
|
||||
| "browser_action_launch"
|
||||
|
||||
export type ClineSay =
|
||||
| "task"
|
||||
@@ -71,7 +72,8 @@ export type ClineSay =
|
||||
| "command_output"
|
||||
| "tool"
|
||||
| "shell_integration_warning"
|
||||
| "inspect_site_result"
|
||||
| "browser_action"
|
||||
| "browser_action_result"
|
||||
|
||||
export interface ClineSayTool {
|
||||
tool:
|
||||
@@ -82,7 +84,6 @@ export interface ClineSayTool {
|
||||
| "listFilesRecursive"
|
||||
| "listCodeDefinitionNames"
|
||||
| "searchFiles"
|
||||
| "inspectSite"
|
||||
path?: string
|
||||
diff?: string
|
||||
content?: string
|
||||
@@ -90,6 +91,23 @@ export interface ClineSayTool {
|
||||
filePattern?: string
|
||||
}
|
||||
|
||||
// must keep in sync with system prompt
|
||||
export const browserActions = ["launch", "click", "type", "scroll_down", "scroll_up", "close"] as const
|
||||
export type BrowserAction = (typeof browserActions)[number]
|
||||
|
||||
export interface ClineSayBrowserAction {
|
||||
action: BrowserAction
|
||||
coordinate?: string
|
||||
text?: string
|
||||
}
|
||||
|
||||
export type BrowserActionResult = {
|
||||
screenshot?: string
|
||||
logs?: string
|
||||
currentUrl?: string
|
||||
currentMousePosition?: string
|
||||
}
|
||||
|
||||
export interface ClineApiReqInfo {
|
||||
request?: string
|
||||
tokensIn?: number
|
||||
|
||||
Reference in New Issue
Block a user