From 84150587a71bb2b83c188404184173bef3828494 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Sat, 17 Aug 2024 09:20:14 -0400 Subject: [PATCH] Fix exporting current open task --- src/providers/ClaudeDevProvider.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/providers/ClaudeDevProvider.ts b/src/providers/ClaudeDevProvider.ts index c175c2f..089eaf0 100644 --- a/src/providers/ClaudeDevProvider.ts +++ b/src/providers/ClaudeDevProvider.ts @@ -326,8 +326,10 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider { await this.postMessageToWebview({ type: "selectedImages", images }) break case "exportCurrentTask": - const firstMessageTs = this.claudeDev?.claudeMessages.at(0)?.ts ?? Date.now() - downloadTask(firstMessageTs, this.claudeDev?.apiConversationHistory ?? []) + const currentTaskId = this.claudeDev?.taskId + if (currentTaskId) { + this.exportTaskWithId(currentTaskId) + } break case "showTaskWithId": this.showTaskWithId(message.text!)