diff --git a/src/core/tools/applyDiffTool.ts b/src/core/tools/applyDiffTool.ts
index d8ae9fa610..c57a62c17d 100644
--- a/src/core/tools/applyDiffTool.ts
+++ b/src/core/tools/applyDiffTool.ts
@@ -108,7 +108,7 @@ export async function applyDiffTool(
}
if (currentCount >= 2) {
- await cline.say("error", formattedError)
+ await cline.say("diff_error", formattedError)
}
pushToolResult(formattedError)
return
diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts
index 40939e4e32..0efc708928 100644
--- a/src/exports/roo-code.d.ts
+++ b/src/exports/roo-code.d.ts
@@ -387,6 +387,7 @@ type ClineMessage = {
| "subtask_result"
| "checkpoint_saved"
| "rooignore_error"
+ | "diff_error"
)
| undefined
text?: string | undefined
@@ -467,6 +468,7 @@ type RooCodeEvents = {
| "subtask_result"
| "checkpoint_saved"
| "rooignore_error"
+ | "diff_error"
)
| undefined
text?: string | undefined
diff --git a/src/exports/types.ts b/src/exports/types.ts
index 64a955554e..f61be2e04f 100644
--- a/src/exports/types.ts
+++ b/src/exports/types.ts
@@ -392,6 +392,7 @@ type ClineMessage = {
| "subtask_result"
| "checkpoint_saved"
| "rooignore_error"
+ | "diff_error"
)
| undefined
text?: string | undefined
@@ -476,6 +477,7 @@ type RooCodeEvents = {
| "subtask_result"
| "checkpoint_saved"
| "rooignore_error"
+ | "diff_error"
)
| undefined
text?: string | undefined
diff --git a/src/schemas/index.ts b/src/schemas/index.ts
index 208c061b53..637aaeabe5 100644
--- a/src/schemas/index.ts
+++ b/src/schemas/index.ts
@@ -742,6 +742,7 @@ export const clineSays = [
"subtask_result",
"checkpoint_saved",
"rooignore_error",
+ "diff_error",
] as const
export const clineSaySchema = z.enum(clineSays)
diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx
index e73086e5dd..aaa9f93e78 100644
--- a/webview-ui/src/components/chat/ChatRow.tsx
+++ b/webview-ui/src/components/chat/ChatRow.tsx
@@ -86,6 +86,9 @@ export const ChatRowContent = ({
const { t } = useTranslation()
const { mcpServers, alwaysAllowMcp, currentCheckpoint } = useExtensionState()
const [reasoningCollapsed, setReasoningCollapsed] = useState(true)
+ const [isDiffErrorExpanded, setIsDiffErrorExpanded] = useState(false)
+ const [showCopySuccess, setShowCopySuccess] = useState(false)
+ const { copyWithFeedback } = useCopyToClipboard()
const [cost, apiReqCancelReason, apiReqStreamingFailedMessage] = useMemo(() => {
if (message.text !== null && message.text !== undefined && message.say === "api_req_started") {
@@ -602,6 +605,98 @@ export const ChatRowContent = ({
switch (message.type) {
case "say":
switch (message.say) {
+ case "diff_error":
+ return (
+
+
+
setIsDiffErrorExpanded(!isDiffErrorExpanded)}>
+
+
+ {t("chat:diffError.title")}
+
+
+ {
+ e.stopPropagation()
+
+ // Call copyWithFeedback and handle the Promise
+ copyWithFeedback(message.text || "").then((success) => {
+ if (success) {
+ // Show checkmark
+ setShowCopySuccess(true)
+
+ // Reset after a brief delay
+ setTimeout(() => {
+ setShowCopySuccess(false)
+ }, 1000)
+ }
+ })
+ }}>
+
+
+
+
+
+ {isDiffErrorExpanded && (
+
+
+
+ )}
+
+
+ )
case "subtask_result":
return (
diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json
index 87643da195..6c913965d6 100644
--- a/webview-ui/src/i18n/locales/ca/chat.json
+++ b/webview-ui/src/i18n/locales/ca/chat.json
@@ -83,6 +83,9 @@
"edit": "Edita...",
"forNextMode": "per al següent mode",
"error": "Error",
+ "diffError": {
+ "title": "Edició fallida"
+ },
"troubleMessage": "Roo està tenint problemes...",
"apiRequest": {
"title": "Sol·licitud API",
diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json
index 0b378f0db5..cb97b0bc84 100644
--- a/webview-ui/src/i18n/locales/de/chat.json
+++ b/webview-ui/src/i18n/locales/de/chat.json
@@ -83,6 +83,9 @@
"edit": "Bearbeiten...",
"forNextMode": "für nächsten Modus",
"error": "Fehler",
+ "diffError": {
+ "title": "Bearbeitung fehlgeschlagen"
+ },
"troubleMessage": "Roo hat Probleme...",
"apiRequest": {
"title": "API-Anfrage",
diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json
index d29dbd6162..f9f838356d 100644
--- a/webview-ui/src/i18n/locales/en/chat.json
+++ b/webview-ui/src/i18n/locales/en/chat.json
@@ -154,6 +154,9 @@
},
"taskCompleted": "Task Completed",
"error": "Error",
+ "diffError": {
+ "title": "Edit Unsuccessful"
+ },
"troubleMessage": "Roo is having trouble...",
"shellIntegration": {
"unavailable": "Shell Integration Unavailable",
diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json
index 4d53776d24..caa1b6048c 100644
--- a/webview-ui/src/i18n/locales/es/chat.json
+++ b/webview-ui/src/i18n/locales/es/chat.json
@@ -83,6 +83,9 @@
"edit": "Editar...",
"forNextMode": "para el siguiente modo",
"error": "Error",
+ "diffError": {
+ "title": "Edición fallida"
+ },
"troubleMessage": "Roo está teniendo problemas...",
"apiRequest": {
"title": "Solicitud API",
diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json
index c5771955b4..28254ab1c8 100644
--- a/webview-ui/src/i18n/locales/fr/chat.json
+++ b/webview-ui/src/i18n/locales/fr/chat.json
@@ -83,6 +83,9 @@
"edit": "Éditer...",
"forNextMode": "pour le prochain mode",
"error": "Erreur",
+ "diffError": {
+ "title": "Modification échouée"
+ },
"troubleMessage": "Roo rencontre des difficultés...",
"apiRequest": {
"title": "Requête API",
diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json
index a044bf7e21..78904af006 100644
--- a/webview-ui/src/i18n/locales/hi/chat.json
+++ b/webview-ui/src/i18n/locales/hi/chat.json
@@ -83,6 +83,9 @@
"edit": "संपादित करें...",
"forNextMode": "अगले मोड के लिए",
"error": "त्रुटि",
+ "diffError": {
+ "title": "संपादन असफल"
+ },
"troubleMessage": "Roo को समस्या हो रही है...",
"apiRequest": {
"title": "API अनुरोध",
diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json
index 03c22b7643..cb1d5f6dc1 100644
--- a/webview-ui/src/i18n/locales/it/chat.json
+++ b/webview-ui/src/i18n/locales/it/chat.json
@@ -86,6 +86,9 @@
"wantsToFetch": "Roo vuole recuperare istruzioni dettagliate per aiutare con l'attività corrente"
},
"error": "Errore",
+ "diffError": {
+ "title": "Modifica non riuscita"
+ },
"troubleMessage": "Roo sta avendo problemi...",
"apiRequest": {
"title": "Richiesta API",
diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json
index b817edfae7..4eb1aa52fe 100644
--- a/webview-ui/src/i18n/locales/ja/chat.json
+++ b/webview-ui/src/i18n/locales/ja/chat.json
@@ -83,6 +83,9 @@
"edit": "編集...",
"forNextMode": "次のモード用",
"error": "エラー",
+ "diffError": {
+ "title": "編集に失敗しました"
+ },
"troubleMessage": "Rooに問題が発生しています...",
"apiRequest": {
"title": "APIリクエスト",
diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json
index e7c26d0abc..2f4bff5cd3 100644
--- a/webview-ui/src/i18n/locales/ko/chat.json
+++ b/webview-ui/src/i18n/locales/ko/chat.json
@@ -83,6 +83,9 @@
"edit": "편집...",
"forNextMode": "다음 모드용",
"error": "오류",
+ "diffError": {
+ "title": "편집 실패"
+ },
"troubleMessage": "Roo에 문제가 발생했습니다...",
"apiRequest": {
"title": "API 요청",
diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json
index cd12f58dca..372b347943 100644
--- a/webview-ui/src/i18n/locales/pl/chat.json
+++ b/webview-ui/src/i18n/locales/pl/chat.json
@@ -83,6 +83,9 @@
"edit": "Edytuj...",
"forNextMode": "dla następnego trybu",
"error": "Błąd",
+ "diffError": {
+ "title": "Edycja nieudana"
+ },
"troubleMessage": "Roo ma problemy...",
"apiRequest": {
"title": "Zapytanie API",
diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json
index 250f32ce7e..d5d7aefc56 100644
--- a/webview-ui/src/i18n/locales/pt-BR/chat.json
+++ b/webview-ui/src/i18n/locales/pt-BR/chat.json
@@ -83,6 +83,9 @@
"edit": "Editar...",
"forNextMode": "para o próximo modo",
"error": "Erro",
+ "diffError": {
+ "title": "Edição mal-sucedida"
+ },
"troubleMessage": "Roo está tendo problemas...",
"apiRequest": {
"title": "Requisição API",
diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json
index 34fc592990..3e4d68d618 100644
--- a/webview-ui/src/i18n/locales/tr/chat.json
+++ b/webview-ui/src/i18n/locales/tr/chat.json
@@ -83,6 +83,9 @@
"edit": "Düzenle...",
"forNextMode": "sonraki mod için",
"error": "Hata",
+ "diffError": {
+ "title": "Düzenleme Başarısız"
+ },
"troubleMessage": "Roo sorun yaşıyor...",
"apiRequest": {
"title": "API İsteği",
diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json
index 184b4447e7..7c417d54ef 100644
--- a/webview-ui/src/i18n/locales/vi/chat.json
+++ b/webview-ui/src/i18n/locales/vi/chat.json
@@ -83,6 +83,9 @@
"edit": "Chỉnh sửa...",
"forNextMode": "cho chế độ tiếp theo",
"error": "Lỗi",
+ "diffError": {
+ "title": "Chỉnh sửa không thành công"
+ },
"troubleMessage": "Roo đang gặp sự cố...",
"apiRequest": {
"title": "Yêu cầu API",
diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json
index d834fc81b8..a8c261642c 100644
--- a/webview-ui/src/i18n/locales/zh-CN/chat.json
+++ b/webview-ui/src/i18n/locales/zh-CN/chat.json
@@ -83,6 +83,9 @@
"edit": "编辑...",
"forNextMode": "用于下一个模式",
"error": "错误",
+ "diffError": {
+ "title": "编辑失败"
+ },
"troubleMessage": "Roo遇到问题...",
"apiRequest": {
"title": "API请求",
diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json
index e00a1b6f09..b232eea889 100644
--- a/webview-ui/src/i18n/locales/zh-TW/chat.json
+++ b/webview-ui/src/i18n/locales/zh-TW/chat.json
@@ -83,6 +83,9 @@
"edit": "編輯...",
"forNextMode": "用於下一個模式",
"error": "錯誤",
+ "diffError": {
+ "title": "編輯失敗"
+ },
"troubleMessage": "Roo 遇到問題...",
"apiRequest": {
"title": "API 請求",