(params: { prompt?: string } | null | undefined)
| 5 | import { t } from "../i18n" |
| 6 | |
| 7 | export 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 | } |
nothing calls this directly
no test coverage detected