Skip to content

Commit db76175

Browse files
authored
Added the UI for move_file tool (#1669)
* Added the UI for move_file tool * Updated README.md file
1 parent 32f47cf commit db76175

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
- Rovo Dev: Agent model selection both via /models command, and dedicated drop-down menu
99

10+
### Improvements
11+
12+
- Added the UI in the Rovo chat box for the moved file tool.
13+
1014
## What's new in 4.0.21
1115

1216
### Bug Fixes

src/rovo-dev/ui/utils.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export interface ToolReturnParseResult {
9595
filePath?: string;
9696
title?: string;
9797
technicalPlan?: TechnicalPlan;
98-
type?: 'modify' | 'create' | 'delete' | 'open' | 'bash';
98+
type?: 'modify' | 'create' | 'delete' | 'open' | 'bash' | 'move';
9999
}
100100

101101
export type Response = ChatMessage | ChatMessage[] | null;
@@ -111,7 +111,7 @@ export interface SavedPromptsResponse {
111111
}
112112
interface ToolReturnInfo {
113113
title: string;
114-
type: 'modify' | 'create' | 'delete' | 'open' | 'bash';
114+
type: 'modify' | 'create' | 'delete' | 'open' | 'bash' | 'move';
115115
}
116116

117117
export const modifyFileTitleMap: Record<string, ToolReturnInfo> = {
@@ -121,6 +121,7 @@ export const modifyFileTitleMap: Record<string, ToolReturnInfo> = {
121121
created: { title: 'Created file', type: 'create' },
122122
deleted: { title: 'Deleted file', type: 'delete' },
123123
updated: { title: 'Updated file', type: 'modify' },
124+
moved: { title: 'Moved file', type: 'move' },
124125
expanded_folder: { title: 'Expanded folder', type: 'open' },
125126
};
126127

@@ -143,6 +144,7 @@ export function parseToolReturnMessage(
143144
case 'open_files':
144145
case 'create_file':
145146
case 'delete_file':
147+
case 'move_file':
146148
const contentArray = msg.parsedContent ? msg.parsedContent : [msg.content];
147149
if (!Array.isArray(contentArray)) {
148150
console.warn('Invalid content format in ToolReturnMessage:', msg.content);
@@ -157,7 +159,7 @@ export function parseToolReturnMessage(
157159

158160
const trimmedLine = line.split('\n\n')[0].trim();
159161
const matches = trimmedLine.match(
160-
/^Successfully\s+(expanded code chunks|replaced code|opened|created|deleted|updated)(?:\s+in)?\s+(.+)?$/,
162+
/^Successfully\s+(expanded code chunks|replaced code|opened|moved|created|deleted|updated)(?:\s+in)?\s+(.+)?$/,
161163
);
162164
if (matches && matches.length >= 3) {
163165
let filePath = matches[2].trim();
@@ -274,7 +276,7 @@ export function parseToolReturnMessage(
274276
}
275277

276278
export const isCodeChangeTool = (toolName: string): boolean => {
277-
return ['find_and_replace_code', 'create_file', 'delete_file'].includes(toolName);
279+
return ['find_and_replace_code', 'create_file', 'delete_file', 'move_file'].includes(toolName);
278280
};
279281

280282
export const CODE_PLAN_EXECUTE_PROMPT = 'Execute the code plan that you have created';

0 commit comments

Comments
 (0)