From 0f2e8ea2b49fcab8c539449b51c40eea8215c2d3 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Tue, 20 Jan 2026 10:43:43 -0600 Subject: wip(app): i18n --- packages/app/src/utils/prompt.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/app/src/utils') diff --git a/packages/app/src/utils/prompt.ts b/packages/app/src/utils/prompt.ts index 5d9edfed1..35aec0071 100644 --- a/packages/app/src/utils/prompt.ts +++ b/packages/app/src/utils/prompt.ts @@ -53,10 +53,11 @@ function textPartValue(parts: Part[]) { * Extract prompt content from message parts for restoring into the prompt input. * This is used by undo to restore the original user prompt. */ -export function extractPromptFromParts(parts: Part[], opts?: { directory?: string }): Prompt { +export function extractPromptFromParts(parts: Part[], opts?: { directory?: string; attachmentName?: string }): Prompt { const textPart = textPartValue(parts) const text = textPart?.text ?? "" const directory = opts?.directory + const attachmentName = opts?.attachmentName ?? "attachment" const toRelative = (path: string) => { if (!directory) return path @@ -104,7 +105,7 @@ export function extractPromptFromParts(parts: Part[], opts?: { directory?: strin images.push({ type: "image", id: filePart.id, - filename: filePart.filename ?? "attachment", + filename: filePart.filename ?? attachmentName, mime: filePart.mime, dataUrl: filePart.url, }) -- cgit v1.2.3