|
1 | | -import * as vscode from "vscode" |
2 | | - |
3 | 1 | import { EventEmitter } from "events" |
4 | 2 |
|
5 | | -import type { ProviderSettings, GlobalSettings } from "./types" |
| 3 | +import * as vscode from "vscode" |
6 | 4 |
|
7 | | -export type RooCodeSettings = GlobalSettings & ProviderSettings |
| 5 | +import type { ProviderSettings, GlobalSettings, ClineMessage, TokenUsage } from "./types" |
8 | 6 |
|
9 | | -export interface TokenUsage { |
10 | | - totalTokensIn: number |
11 | | - totalTokensOut: number |
12 | | - totalCacheWrites?: number |
13 | | - totalCacheReads?: number |
14 | | - totalCost: number |
15 | | - contextTokens: number |
16 | | -} |
| 7 | +type RooCodeSettings = GlobalSettings & ProviderSettings |
| 8 | + |
| 9 | +export type { RooCodeSettings, ProviderSettings, GlobalSettings, ClineMessage, TokenUsage } |
17 | 10 |
|
18 | 11 | export interface RooCodeEvents { |
19 | 12 | message: [{ taskId: string; action: "created" | "updated"; message: ClineMessage }] |
@@ -101,62 +94,3 @@ export interface RooCodeAPI extends EventEmitter<RooCodeEvents> { |
101 | 94 | */ |
102 | 95 | log(message: string): void |
103 | 96 | } |
104 | | - |
105 | | -export type ClineAsk = |
106 | | - | "followup" |
107 | | - | "command" |
108 | | - | "command_output" |
109 | | - | "completion_result" |
110 | | - | "tool" |
111 | | - | "api_req_failed" |
112 | | - | "resume_task" |
113 | | - | "resume_completed_task" |
114 | | - | "mistake_limit_reached" |
115 | | - | "browser_action_launch" |
116 | | - | "use_mcp_server" |
117 | | - | "finishTask" |
118 | | - |
119 | | -export type ClineSay = |
120 | | - | "task" |
121 | | - | "error" |
122 | | - | "api_req_started" |
123 | | - | "api_req_finished" |
124 | | - | "api_req_retried" |
125 | | - | "api_req_retry_delayed" |
126 | | - | "api_req_deleted" |
127 | | - | "text" |
128 | | - | "reasoning" |
129 | | - | "completion_result" |
130 | | - | "user_feedback" |
131 | | - | "user_feedback_diff" |
132 | | - | "command_output" |
133 | | - | "tool" |
134 | | - | "shell_integration_warning" |
135 | | - | "browser_action" |
136 | | - | "browser_action_result" |
137 | | - | "command" |
138 | | - | "mcp_server_request_started" |
139 | | - | "mcp_server_response" |
140 | | - | "new_task_started" |
141 | | - | "new_task" |
142 | | - | "checkpoint_saved" |
143 | | - | "rooignore_error" |
144 | | - |
145 | | -export type ToolProgressStatus = { |
146 | | - icon?: string |
147 | | - text?: string |
148 | | -} |
149 | | - |
150 | | -export interface ClineMessage { |
151 | | - ts: number |
152 | | - type: "ask" | "say" |
153 | | - ask?: ClineAsk |
154 | | - say?: ClineSay |
155 | | - text?: string |
156 | | - images?: string[] |
157 | | - partial?: boolean |
158 | | - reasoning?: string |
159 | | - conversationHistoryIndex?: number |
160 | | - checkpoint?: Record<string, unknown> |
161 | | - progressStatus?: ToolProgressStatus |
162 | | -} |
0 commit comments