From 94459adba147778bfd8651527064c05f793af2ae Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 22 Jan 2026 00:22:45 -0800 Subject: [PATCH] Open the worktreeinclude file after creating it (#10891) Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> --- src/core/webview/worktree/handlers.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/webview/worktree/handlers.ts b/src/core/webview/worktree/handlers.ts index 59fffded5c..2b07447582 100644 --- a/src/core/webview/worktree/handlers.ts +++ b/src/core/webview/worktree/handlers.ts @@ -251,6 +251,16 @@ export async function handleCreateWorktreeInclude(provider: ClineProvider, conte try { await worktreeIncludeService.createWorktreeInclude(cwd, content) + + // Open the file in the editor for easy editing + try { + const filePath = path.join(cwd, ".worktreeinclude") + const document = await vscode.workspace.openTextDocument(filePath) + await vscode.window.showTextDocument(document) + } catch { + // Opening the file in editor is a convenience feature - don't fail the operation + } + return { success: true, message: ".worktreeinclude file created",