Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/single_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
EXECUTOR_TYPE = 'thread'
EXECUTOR_MAX_WORKERS = 30
SESSION_TYPE = 'filesystem'
VERSION = "0.239.009"
VERSION = "0.239.010"

SECRET_KEY = os.getenv('SECRET_KEY', 'dev-secret-key-change-in-production')

Expand Down
12 changes: 3 additions & 9 deletions application/single_app/static/js/chat/chat-message-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ function getMessageMarkdown(messageDiv, role) {
}

/**
* Get the sender label and timestamp from a message div.
* Get the sender label from a message div.
*/
function getMessageMeta(messageDiv, role) {
const senderEl = messageDiv.querySelector('.message-sender');
const sender = senderEl ? senderEl.innerText.trim() : (role === 'assistant' ? 'Assistant' : 'User');

const timestampEl = messageDiv.querySelector('.message-timestamp');
const timestamp = timestampEl ? timestampEl.innerText.trim() : '';

return { sender, timestamp };
return { sender };
}

/**
Expand Down Expand Up @@ -76,13 +73,10 @@ export function exportMessageAsMarkdown(messageDiv, messageId, role) {
return;
}

const { sender, timestamp } = getMessageMeta(messageDiv, role);
const { sender } = getMessageMeta(messageDiv, role);

const lines = [];
lines.push(`### ${sender}`);
if (timestamp) {
lines.push(`*${timestamp}*`);
}
lines.push('');
lines.push(content);
lines.push('');
Expand Down
4 changes: 2 additions & 2 deletions docs/explanation/features/MESSAGE_EXPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ The server verifies user ownership of the conversation, fetches the specific mes
### Export to Markdown
- **Location:** Three-dots dropdown → "Export to Markdown"
- **Icon:** `bi-markdown`
- **Behavior:** Entirely client-side. Grabs the message content from the existing hidden textarea (AI messages) or `.message-text` element (user messages), wraps it with a role/timestamp header, and triggers a `.md` file download via Blob URL.
- **Behavior:** Entirely client-side. Grabs the message content from the existing hidden textarea (AI messages) or `.message-text` element (user messages), wraps it with a role header, and triggers a `.md` file download via Blob URL.
- **Filename pattern:** `message_export_YYYYMMDD_HHMMSS.md`

### Export to Word
- **Location:** Three-dots dropdown → "Export to Word"
- **Icon:** `bi-file-earmark-word`
- **Behavior:** POSTs to `/api/message/export-word`. The backend generates a styled `.docx` document with:
- Title heading ("Message Export")
- Role and timestamp metadata
- Role metadata
- Message content with Markdown formatting preserved (headings, bold, italic, code blocks, lists)
- Citations section (if present on the message)
- **Filename pattern:** `message_export_YYYYMMDD_HHMMSS.docx`
Expand Down
2 changes: 1 addition & 1 deletion docs/explanation/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

* **Per-Message Export**
* Added export and action options to the three-dots dropdown menu on individual chat messages (both AI and user messages).
* **Export to Markdown**: Downloads the message as a `.md` file with role/timestamp header. Entirely client-side.
* **Export to Markdown**: Downloads the message as a `.md` file with a role header. Entirely client-side.
* **Export to Word**: Generates a styled `.docx` document via a new backend endpoint (`POST /api/message/export-word`). Includes Markdown-to-Word formatting (headings, bold, italic, code blocks, lists) and a citations section when present.
* **Use as Prompt**: Inserts the raw message content directly into the chat input box for reuse — no clipboard, one click and it's ready to edit and send.
* **Open in Email**: Opens the user's default email client with the message pre-filled in the subject and body via `mailto:`.
Expand Down