Skip to content

Commit 0572933

Browse files
authored
ENG-484 Enhance fixWithCline command execution by focusing chat input (RooCodeInc#3028)
* Enhance fixWithCline command execution by focusing chat input and adding a delay before processing the fixWithCline command. * feat: add OpenRouter base URL and balance display component * feat: add OpenRouter base URL and balance display component * feat: add OpenRouter base URL and balance display component
1 parent 99bbe17 commit 0572933

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@
114114
"title": "Add to Cline",
115115
"category": "Cline"
116116
},
117-
{
118-
"command": "cline.fixWithCline",
119-
"title": "Fix with Cline",
120-
"category": "Cline"
121-
},
122117
{
123118
"command": "cline.focusChatInput",
124119
"title": "Jump to Chat Input",

src/extension.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Import the module and reference it with the alias vscode in your code below
33
import { setTimeout as setTimeoutPromise } from "node:timers/promises"
44
import * as vscode from "vscode"
5+
import pWaitFor from "p-wait-for"
56
import { Logger } from "./services/logging/Logger"
67
import { createClineAPI } from "./exports"
78
import "./utils/path" // necessary to have access to String.prototype.toPosix
@@ -384,6 +385,10 @@ export function activate(context: vscode.ExtensionContext) {
384385
// Register the command handler
385386
context.subscriptions.push(
386387
vscode.commands.registerCommand("cline.fixWithCline", async (range: vscode.Range, diagnostics: vscode.Diagnostic[]) => {
388+
// Add this line to focus the chat input first
389+
await vscode.commands.executeCommand("cline.focusChatInput")
390+
// Wait for a webview instance to become visible after focusing
391+
await pWaitFor(() => !!WebviewProvider.getVisibleInstance())
387392
const editor = vscode.window.activeTextEditor
388393
if (!editor) {
389394
return

0 commit comments

Comments
 (0)