(taskId: string)
| 1963 | |
| 1964 | /* Condenses a task's message history to use fewer tokens. */ |
| 1965 | async condenseTaskContext(taskId: string) { |
| 1966 | let task: Task | undefined |
| 1967 | for (let i = this.clineStack.length - 1; i >= 0; i--) { |
| 1968 | if (this.clineStack[i].taskId === taskId) { |
| 1969 | task = this.clineStack[i] |
| 1970 | break |
| 1971 | } |
| 1972 | } |
| 1973 | if (!task) { |
| 1974 | throw new Error(`Task with id ${taskId} not found in stack`) |
| 1975 | } |
| 1976 | await task.condenseContext() |
| 1977 | await this.postMessageToWebview({ type: "condenseTaskContextResponse", text: taskId }) |
| 1978 | } |
| 1979 | |
| 1980 | // this function deletes a task from task history, and deletes its checkpoints and delete the task folder |
| 1981 | // If the task has subtasks (childIds), they will also be deleted recursively |
no test coverage detected