Skip to content

Commit 94459ad

Browse files
Open the worktreeinclude file after creating it (#10891)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
1 parent 73b1b38 commit 94459ad

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/core/webview/worktree/handlers.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,16 @@ export async function handleCreateWorktreeInclude(provider: ClineProvider, conte
251251

252252
try {
253253
await worktreeIncludeService.createWorktreeInclude(cwd, content)
254+
255+
// Open the file in the editor for easy editing
256+
try {
257+
const filePath = path.join(cwd, ".worktreeinclude")
258+
const document = await vscode.workspace.openTextDocument(filePath)
259+
await vscode.window.showTextDocument(document)
260+
} catch {
261+
// Opening the file in editor is a convenience feature - don't fail the operation
262+
}
263+
254264
return {
255265
success: true,
256266
message: ".worktreeinclude file created",

0 commit comments

Comments
 (0)