Skip to content

Commit a1a2380

Browse files
committed
fix: Update human-computer interaction warning information to use request ID
1 parent 17a97a7 commit a1a2380

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/api/providers/human-relay.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ async function startClipboardMonitoring(requestId: string, options?: ApiHandlerO
161161
if (normalizedClipboard === normalizedLastResponse) {
162162
panel?.webview.postMessage({
163163
type: "showHumanRelayResponseAlert",
164-
text: "It seems you copied the AI's response from the last interaction instead of the current task. Please check your interaction with the web AI",
164+
requestId: "lastInteraction",
165165
})
166166
return
167167
}
168168
if (!containsValidTags(currentClipboardContent)) {
169169
panel?.webview.postMessage({
170170
type: "showHumanRelayResponseAlert",
171-
text: "The AI's response does not seem to meet the RooCode format requirements. Please check your interaction with the web AI.",
171+
requestId: "invalidResponse",
172172
})
173173
return
174174
}

webview-ui/src/components/human-relay/HumanRelayDialog.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,14 @@ export const HumanRelayDialog: React.FC<HumanRelayDialogProps> = ({
7878
}
7979
// Handle duplicate response warning
8080
else if (message.type === "showHumanRelayResponseAlert") {
81-
setWarningMessage(message.text)
81+
if (message.requestId === "lastInteraction")
82+
setWarningMessage(
83+
"It seems you copied the AI's response from the last interaction instead of the current task. Please check your interaction with the web AI.",
84+
)
85+
else if (message.requestId === "invalidResponse")
86+
setWarningMessage(
87+
"The AI's response does not seem to meet the RooCode format requirements. Please check your interaction with the web AI.",
88+
)
8289
setShowDuplicateWarning(true)
8390
}
8491
}

0 commit comments

Comments
 (0)