(id: string)
| 1948 | } |
| 1949 | |
| 1950 | async exportTaskWithId(id: string) { |
| 1951 | const { historyItem, apiConversationHistory } = await this.getTaskWithId(id) |
| 1952 | const fileName = getTaskFileName(historyItem.ts) |
| 1953 | const defaultUri = await resolveDefaultSaveUri(this.contextProxy, "lastTaskExportPath", fileName, { |
| 1954 | useWorkspace: false, |
| 1955 | fallbackDir: path.join(os.homedir(), "Downloads"), |
| 1956 | }) |
| 1957 | const saveUri = await downloadTask(historyItem.ts, apiConversationHistory, defaultUri) |
| 1958 | |
| 1959 | if (saveUri) { |
| 1960 | await saveLastExportPath(this.contextProxy, "lastTaskExportPath", saveUri) |
| 1961 | } |
| 1962 | } |
| 1963 | |
| 1964 | /* Condenses a task's message history to use fewer tokens. */ |
| 1965 | async condenseTaskContext(taskId: string) { |
no test coverage detected