mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Close diff view even if it loses focus
This commit is contained in:
@@ -408,10 +408,13 @@ export class ClaudeDev {
|
|||||||
diff: diffRepresentation,
|
diff: diffRepresentation,
|
||||||
} as ClaudeSayTool)
|
} as ClaudeSayTool)
|
||||||
)
|
)
|
||||||
// close the diff view if it's open
|
// close the diff view
|
||||||
if (vscode.window.activeTextEditor?.document.uri.scheme === "claude-dev-diff") {
|
vscode.workspace.textDocuments
|
||||||
await vscode.commands.executeCommand("workbench.action.closeActiveEditor")
|
.filter((doc) => doc.uri.scheme === "claude-dev-diff")
|
||||||
}
|
.forEach(async (doc) => {
|
||||||
|
await vscode.window.showTextDocument(doc.uri, { preserveFocus: false, preview: true })
|
||||||
|
await vscode.commands.executeCommand("workbench.action.closeActiveEditor")
|
||||||
|
})
|
||||||
if (response !== "yesButtonTapped") {
|
if (response !== "yesButtonTapped") {
|
||||||
if (response === "textResponse" && text) {
|
if (response === "textResponse" && text) {
|
||||||
await this.say("user_feedback", text)
|
await this.say("user_feedback", text)
|
||||||
@@ -441,9 +444,12 @@ export class ClaudeDev {
|
|||||||
"tool",
|
"tool",
|
||||||
JSON.stringify({ tool: "newFileCreated", path: filePath, content: newContent } as ClaudeSayTool)
|
JSON.stringify({ tool: "newFileCreated", path: filePath, content: newContent } as ClaudeSayTool)
|
||||||
)
|
)
|
||||||
if (vscode.window.activeTextEditor?.document.uri.scheme === "claude-dev-diff") {
|
vscode.workspace.textDocuments
|
||||||
await vscode.commands.executeCommand("workbench.action.closeActiveEditor")
|
.filter((doc) => doc.uri.scheme === "claude-dev-diff")
|
||||||
}
|
.forEach(async (doc) => {
|
||||||
|
await vscode.window.showTextDocument(doc.uri, { preserveFocus: false, preview: true })
|
||||||
|
await vscode.commands.executeCommand("workbench.action.closeActiveEditor")
|
||||||
|
})
|
||||||
if (response !== "yesButtonTapped") {
|
if (response !== "yesButtonTapped") {
|
||||||
if (response === "textResponse" && text) {
|
if (response === "textResponse" && text) {
|
||||||
await this.say("user_feedback", text)
|
await this.say("user_feedback", text)
|
||||||
|
|||||||
Reference in New Issue
Block a user