|
@@ -1,5 +1,3 @@
|
|
|
-// type that represents json data that is sent from extension to webview, called ExtensionMessage and has 'type' enum which can be 'plusButtonClicked' or 'settingsButtonClicked' or 'hello'
|
|
|
|
|
-
|
|
|
|
|
import { ApiConfiguration, ApiProvider, ModelInfo } from "./api"
|
|
import { ApiConfiguration, ApiProvider, ModelInfo } from "./api"
|
|
|
import { HistoryItem } from "./HistoryItem"
|
|
import { HistoryItem } from "./HistoryItem"
|
|
|
import { McpServer } from "./mcp"
|
|
import { McpServer } from "./mcp"
|
|
@@ -9,6 +7,7 @@ import { CustomSupportPrompts } from "./support-prompt"
|
|
|
import { ExperimentId } from "./experiments"
|
|
import { ExperimentId } from "./experiments"
|
|
|
import { CheckpointStorage } from "./checkpoints"
|
|
import { CheckpointStorage } from "./checkpoints"
|
|
|
import { TelemetrySetting } from "./TelemetrySetting"
|
|
import { TelemetrySetting } from "./TelemetrySetting"
|
|
|
|
|
+import { ClineMessage, ClineAsk, ClineSay } from "../exports/roo-code"
|
|
|
|
|
|
|
|
export interface LanguageModelChatSelector {
|
|
export interface LanguageModelChatSelector {
|
|
|
vendor?: string
|
|
vendor?: string
|
|
@@ -17,7 +16,9 @@ export interface LanguageModelChatSelector {
|
|
|
id?: string
|
|
id?: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// webview will hold state
|
|
|
|
|
|
|
+// Represents JSON data that is sent from extension to webview, called
|
|
|
|
|
+// ExtensionMessage and has 'type' enum which can be 'plusButtonClicked' or
|
|
|
|
|
+// 'settingsButtonClicked' or 'hello'. Webview will hold state.
|
|
|
export interface ExtensionMessage {
|
|
export interface ExtensionMessage {
|
|
|
type:
|
|
type:
|
|
|
| "action"
|
|
| "action"
|
|
@@ -145,58 +146,7 @@ export interface ExtensionState {
|
|
|
showRooIgnoredFiles: boolean // Whether to show .rooignore'd files in listings
|
|
showRooIgnoredFiles: boolean // Whether to show .rooignore'd files in listings
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export interface ClineMessage {
|
|
|
|
|
- ts: number
|
|
|
|
|
- type: "ask" | "say"
|
|
|
|
|
- ask?: ClineAsk
|
|
|
|
|
- say?: ClineSay
|
|
|
|
|
- text?: string
|
|
|
|
|
- images?: string[]
|
|
|
|
|
- partial?: boolean
|
|
|
|
|
- reasoning?: string
|
|
|
|
|
- conversationHistoryIndex?: number
|
|
|
|
|
- checkpoint?: Record<string, unknown>
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-export type ClineAsk =
|
|
|
|
|
- | "followup"
|
|
|
|
|
- | "command"
|
|
|
|
|
- | "command_output"
|
|
|
|
|
- | "completion_result"
|
|
|
|
|
- | "tool"
|
|
|
|
|
- | "api_req_failed"
|
|
|
|
|
- | "resume_task"
|
|
|
|
|
- | "resume_completed_task"
|
|
|
|
|
- | "mistake_limit_reached"
|
|
|
|
|
- | "browser_action_launch"
|
|
|
|
|
- | "use_mcp_server"
|
|
|
|
|
- | "finishTask"
|
|
|
|
|
-
|
|
|
|
|
-export type ClineSay =
|
|
|
|
|
- | "task"
|
|
|
|
|
- | "error"
|
|
|
|
|
- | "api_req_started"
|
|
|
|
|
- | "api_req_finished"
|
|
|
|
|
- | "api_req_retried"
|
|
|
|
|
- | "api_req_retry_delayed"
|
|
|
|
|
- | "api_req_deleted"
|
|
|
|
|
- | "text"
|
|
|
|
|
- | "reasoning"
|
|
|
|
|
- | "completion_result"
|
|
|
|
|
- | "user_feedback"
|
|
|
|
|
- | "user_feedback_diff"
|
|
|
|
|
- | "command_output"
|
|
|
|
|
- | "tool"
|
|
|
|
|
- | "shell_integration_warning"
|
|
|
|
|
- | "browser_action"
|
|
|
|
|
- | "browser_action_result"
|
|
|
|
|
- | "command"
|
|
|
|
|
- | "mcp_server_request_started"
|
|
|
|
|
- | "mcp_server_response"
|
|
|
|
|
- | "new_task_started"
|
|
|
|
|
- | "new_task"
|
|
|
|
|
- | "checkpoint_saved"
|
|
|
|
|
- | "rooignore_error"
|
|
|
|
|
|
|
+export type { ClineMessage, ClineAsk, ClineSay }
|
|
|
|
|
|
|
|
export interface ClineSayTool {
|
|
export interface ClineSayTool {
|
|
|
tool:
|
|
tool:
|
|
@@ -220,8 +170,9 @@ export interface ClineSayTool {
|
|
|
reason?: string
|
|
reason?: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// must keep in sync with system prompt
|
|
|
|
|
|
|
+// Must keep in sync with system prompt.
|
|
|
export const browserActions = ["launch", "click", "type", "scroll_down", "scroll_up", "close"] as const
|
|
export const browserActions = ["launch", "click", "type", "scroll_down", "scroll_up", "close"] as const
|
|
|
|
|
+
|
|
|
export type BrowserAction = (typeof browserActions)[number]
|
|
export type BrowserAction = (typeof browserActions)[number]
|
|
|
|
|
|
|
|
export interface ClineSayBrowserAction {
|
|
export interface ClineSayBrowserAction {
|
|
@@ -256,7 +207,6 @@ export interface ClineApiReqInfo {
|
|
|
streamingFailedMessage?: string
|
|
streamingFailedMessage?: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// Human relay related message types
|
|
|
|
|
export interface ShowHumanRelayDialogMessage {
|
|
export interface ShowHumanRelayDialogMessage {
|
|
|
type: "showHumanRelayDialog"
|
|
type: "showHumanRelayDialog"
|
|
|
requestId: string
|
|
requestId: string
|