diff --git a/src/apps/chat/components/message/fragments-attachment-doc/DocAttachmentFragment.tsx b/src/apps/chat/components/message/fragments-attachment-doc/DocAttachmentFragment.tsx
index fb6fd4727..deaa26ad2 100644
--- a/src/apps/chat/components/message/fragments-attachment-doc/DocAttachmentFragment.tsx
+++ b/src/apps/chat/components/message/fragments-attachment-doc/DocAttachmentFragment.tsx
@@ -156,14 +156,16 @@ export function DocAttachmentFragment(props: {
Attachment Title
{fragment.title}
- Doc Title
- {fragmentDocPart.l1Title}
Identifier
{fragmentDocPart.ref}
- Render type
- {fragmentDocPart.vdt}
+ Doc Title
+ {fragmentDocPart.l1Title}
+ Doc Version
+ {fragmentDocPart.version || '(none)'}
Text Mime type
{fragmentDocPart.data?.mimeType || '(unknown)'}
+ Render type
+ {fragmentDocPart.vdt}
Text Buffer Id
{fragmentId}
diff --git a/src/apps/chat/components/message/fragments-content/ViewDocPartModal.tsx b/src/apps/chat/components/message/fragments-content/ViewDocPartModal.tsx
index 8d3df7533..958222c63 100644
--- a/src/apps/chat/components/message/fragments-content/ViewDocPartModal.tsx
+++ b/src/apps/chat/components/message/fragments-content/ViewDocPartModal.tsx
@@ -73,12 +73,14 @@ export function ViewDocPartModal(props: {
{docPart.l1Title}
Identifier
{docPart.ref}
- Mime type
+ Mime Type
{docPart.data?.mimeType || '(unknown)'}
- Render type
+ Render Type
{docPart.vdt}
- Rendering as
+ Rendering As
{renderAsMarkdown ? 'Markdown' : /*renderAsCode ? 'Code' :*/ 'Text'} (auto)
+ Doc Version
+ {docPart.version || '(none)'}
diff --git a/src/common/attachment-drafts/attachment.pipeline.ts b/src/common/attachment-drafts/attachment.pipeline.ts
index 73563a061..7bebd3a69 100644
--- a/src/common/attachment-drafts/attachment.pipeline.ts
+++ b/src/common/attachment-drafts/attachment.pipeline.ts
@@ -25,6 +25,7 @@ export const DEFAULT_ADRAFT_IMAGE_QUALITY = 0.96;
const PDF_IMAGE_PAGE_SCALE = 1.5;
const PDF_IMAGE_QUALITY = 0.5;
const ENABLE_TEXT_AND_IMAGES = false; // 2.0
+const DOCPART_DEFAULT_VERSION = 1;
// internal mimes, only used to route data within us (source -> input -> converters)
@@ -466,7 +467,7 @@ export async function attachmentPerformConversion(
case 'text':
const possibleLiveFileId = await attachmentGetLiveFileId(source);
const textualInlineData = createDMessageDataInlineText(_inputDataToString(input.data), input.mimeType);
- newFragments.push(createDocAttachmentFragment(title, caption, _guessDocVDT(input.mimeType), textualInlineData, refString, docMeta, possibleLiveFileId));
+ newFragments.push(createDocAttachmentFragment(title, caption, _guessDocVDT(input.mimeType), textualInlineData, refString, DOCPART_DEFAULT_VERSION, docMeta, possibleLiveFileId));
break;
// html as-is
@@ -474,7 +475,7 @@ export async function attachmentPerformConversion(
// NOTE: before we had the following: createTextAttachmentFragment(ref || '\n', input.altData!), which
// was used to wrap the HTML in a code block to facilitate AutoRenderBlocks's parser. Historic note, for future debugging.
const richTextData = createDMessageDataInlineText(input.altData || '', input.altMimeType);
- newFragments.push(createDocAttachmentFragment(title, caption, DVMimeType.VndAgiCode, richTextData, refString, docMeta));
+ newFragments.push(createDocAttachmentFragment(title, caption, DVMimeType.VndAgiCode, richTextData, refString, DOCPART_DEFAULT_VERSION, docMeta));
break;
// html cleaned
@@ -487,7 +488,7 @@ export async function attachmentPerformConversion(
// remove svg elements
.replace(/