MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / handleCreateWorktreeInclude

Function handleCreateWorktreeInclude

src/core/webview/worktree/handlers.ts:248–274  ·  view source on GitHub ↗
(provider: ClineProvider, content: string)

Source from the content-addressed store, hash-verified

246}
247
248export async function handleCreateWorktreeInclude(provider: ClineProvider, content: string): Promise<WorktreeResult> {
249 const cwd = provider.cwd
250
251 try {
252 await worktreeIncludeService.createWorktreeInclude(cwd, content)
253
254 // Open the file in the editor for easy editing
255 try {
256 const filePath = path.join(cwd, ".worktreeinclude")
257 const document = await vscode.workspace.openTextDocument(filePath)
258 await vscode.window.showTextDocument(document)
259 } catch {
260 // Opening the file in editor is a convenience feature - don't fail the operation
261 }
262
263 return {
264 success: true,
265 message: ".worktreeinclude file created",
266 }
267 } catch (error) {
268 const errorMessage = error instanceof Error ? error.message : String(error)
269 return {
270 success: false,
271 message: `Failed to create .worktreeinclude: ${errorMessage}`,
272 }
273 }
274}
275
276export async function handleCheckoutBranch(provider: ClineProvider, branch: string): Promise<WorktreeResult> {
277 const cwd = provider.cwd

Callers 1

webviewMessageHandlerFunction · 0.90

Calls 4

createWorktreeIncludeMethod · 0.80
openTextDocumentMethod · 0.80
showTextDocumentMethod · 0.80
StringInterface · 0.50

Tested by

no test coverage detected