mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
adding timestamp to the Exported Task markdown file (#293)
per feature request https://github.com/saoudrizwan/claude-dev/issues/278 this makes the file more readable/parseable. also added minor fix in README for debugging. Test Plan: 1. Launch Debug Instance of VSCode 2. Went to Extension, clicked on a recent Task, clicked "Export" 3. Opened saved export file, saw properly formatted timestamp above each User/Assistant action. Co-authored-by: Philip Fung
This commit is contained in:
@@ -7,6 +7,7 @@ export async function downloadTask(dateTs: number, conversationHistory: Anthropi
|
||||
// File name
|
||||
const date = new Date(dateTs)
|
||||
const month = date.toLocaleString("en-US", { month: "short" }).toLowerCase()
|
||||
const monthLong = date.toLocaleString("en-US", { month: "long" })
|
||||
const day = date.getDate()
|
||||
const year = date.getFullYear()
|
||||
let hours = date.getHours()
|
||||
@@ -24,8 +25,8 @@ export async function downloadTask(dateTs: number, conversationHistory: Anthropi
|
||||
const content = Array.isArray(message.content)
|
||||
? message.content.map(formatContentBlockToMarkdown).join("\n")
|
||||
: message.content
|
||||
|
||||
return `${role}\n\n${content}\n\n`
|
||||
const timestamp = `# ${monthLong} ${day},${year} ${hours}:${minutes}:${seconds}${ampm}`;
|
||||
return `${timestamp}\n${role}\n\n${content}\n\n`
|
||||
})
|
||||
.join("---\n\n")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user