mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
Fix empty message bubble after switching plan/act with a message
This commit is contained in:
parent
796eac558c
commit
aab26e9a38
2 changed files with 8 additions and 3 deletions
|
|
@ -2712,9 +2712,14 @@ export class Cline {
|
|||
// }
|
||||
|
||||
this.isAwaitingPlanResponse = true
|
||||
const { text, images } = await this.ask("plan_mode_response", response, false)
|
||||
let { text, images } = await this.ask("plan_mode_response", response, false)
|
||||
this.isAwaitingPlanResponse = false
|
||||
|
||||
// webview invoke sendMessage will send this marker in order to put webview into the proper state (responding to an ask) and as a flag to extension that the user switched to ACT mode.
|
||||
if (text === "PLAN_MODE_TOGGLE_RESPONSE") {
|
||||
text = ""
|
||||
}
|
||||
|
||||
if (this.didRespondToPlanAskBySwitchingMode) {
|
||||
pushToolResult(
|
||||
formatResponse.toolResult(
|
||||
|
|
@ -2730,7 +2735,7 @@ export class Cline {
|
|||
pushToolResult(formatResponse.toolResult(`<user_message>\n${text}\n</user_message>`, images))
|
||||
}
|
||||
|
||||
if (text || images) {
|
||||
if (text || images?.length) {
|
||||
await this.say("user_feedback", text ?? "", images)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||
await this.postMessageToWebview({
|
||||
type: "invoke",
|
||||
invoke: "sendMessage",
|
||||
text: message.chatContent?.message || "[Proceeding with the task...]",
|
||||
text: message.chatContent?.message || "PLAN_MODE_TOGGLE_RESPONSE",
|
||||
images: message.chatContent?.images,
|
||||
})
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue