Skip to content

Commit 3110406

Browse files
committed
fix: remove file_not_found_error to maintain backward compatibility
- Removed file_not_found_error from message types to fix compatibility with @roo-code/cloud v0.17.0 - Updated readFileTool.ts to use generic 'error' type instead - Removed unused FileNotFoundError component import from ChatRow.tsx - All TypeScript compilation errors resolved
1 parent d55baf9 commit 3110406

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

packages/types/src/message.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ export function isInteractiveAsk(ask: ClineAsk): ask is InteractiveAsk {
134134
* - `checkpoint_saved`: Indicates a checkpoint has been saved
135135
* - `rooignore_error`: Error related to .rooignore file processing
136136
* - `diff_error`: Error occurred while applying a diff/patch
137-
* - `file_not_found_error`: Error when attempting to read a file that doesn't exist
138137
* - `condense_context`: Context condensation/summarization has started
139138
* - `condense_context_error`: Error occurred during context condensation
140139
* - `codebase_search_result`: Results from searching the codebase
@@ -161,7 +160,6 @@ export const clineSays = [
161160
"checkpoint_saved",
162161
"rooignore_error",
163162
"diff_error",
164-
"file_not_found_error",
165163
"condense_context",
166164
"condense_context_error",
167165
"codebase_search_result",

src/core/tools/readFileTool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ export async function readFileTool(
648648
// Emit a unified file not found error message if any files were not found
649649
if (notFoundFiles.length > 0) {
650650
await cline.say(
651-
"file_not_found_error",
651+
"error",
652652
JSON.stringify({
653653
filePaths: notFoundFiles,
654654
error: "The requested files do not exist in the current workspace.",
@@ -769,7 +769,7 @@ export async function readFileTool(
769769
// Emit a unified file not found error message if any files were not found
770770
if (notFoundFiles.length > 0) {
771771
await cline.say(
772-
"file_not_found_error",
772+
"error",
773773
JSON.stringify({
774774
filePaths: notFoundFiles,
775775
error: "The requested files do not exist in the current workspace.",

webview-ui/src/components/chat/ChatRow.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import { CommandExecutionError } from "./CommandExecutionError"
4646
import { AutoApprovedRequestLimitWarning } from "./AutoApprovedRequestLimitWarning"
4747
import { CondenseContextErrorRow, CondensingContextRow, ContextCondenseRow } from "./ContextCondenseRow"
4848
import CodebaseSearchResultsDisplay from "./CodebaseSearchResultsDisplay"
49-
import { FileNotFoundError } from "./FileNotFoundError"
5049

5150
interface ChatRowProps {
5251
message: ClineMessage
@@ -1059,11 +1058,6 @@ export const ChatRowContent = ({
10591058
<Markdown markdown={message.text} partial={message.partial} />
10601059
</div>
10611060
)
1062-
case "file_not_found_error":
1063-
const errorData = safeJsonParse<{ filePath?: string; filePaths?: string[]; error: string }>(
1064-
message.text || "{}",
1065-
)
1066-
return <FileNotFoundError filePaths={errorData?.filePaths || errorData?.filePath || ""} />
10671061
case "user_feedback":
10681062
return (
10691063
<div className="bg-vscode-editor-background border rounded-xs p-1 overflow-hidden whitespace-pre-wrap">

0 commit comments

Comments
 (0)