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

Function handleNewTask

src/activate/handleTask.ts:7–23  ·  view source on GitHub ↗
(params: { prompt?: string } | null | undefined)

Source from the content-addressed store, hash-verified

5import { t } from "../i18n"
6
7export const handleNewTask = async (params: { prompt?: string } | null | undefined) => {
8 let prompt = params?.prompt
9
10 if (!prompt) {
11 prompt = await vscode.window.showInputBox({
12 prompt: t("common:input.task_prompt"),
13 placeHolder: t("common:input.task_placeholder"),
14 })
15 }
16
17 if (!prompt) {
18 await vscode.commands.executeCommand(`${Package.name}.SidebarProvider.focus`)
19 return
20 }
21
22 await ClineProvider.handleCodeAction("newTask", "NEW_TASK", { userInput: prompt })
23}

Callers

nothing calls this directly

Calls 4

tFunction · 0.90
showInputBoxMethod · 0.80
executeCommandMethod · 0.80
handleCodeActionMethod · 0.80

Tested by

no test coverage detected