LibreChat/api/server/utils
Jakub Fidler c7469ce884
feat: Add Claude conversation importer with thinking support (#11124)
*  feat: Add Claude conversation importer with thinking support

Add support for importing Claude conversation exports:
- Detect Claude format by checking for chat_messages property
- Extract text and thinking content from content array
- Format thinking blocks using LibreChat's { type: 'think' } format
- Preserve timestamps from original conversation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

*  feat: Improve Claude importer with tests and timestamp handling

- Remove hardcoded model (Claude exports don't include model info)
- Add timestamp ordering to ensure parents appear before children
- Add fallback to conv.created_at for null message timestamps
- Add comprehensive tests for Claude importer:
  - Basic import, thinking content, timestamp handling
  - Empty messages, text fallback, default conversation name

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 21:37:52 -05:00
..
__tests__ 🗂️ fix: Disable express-static-gzip for Uploaded Images (#8307) 2025-07-11 16:51:53 -04:00
emails 🔒 fix: href Attribute in Email Microsoft Template 2025-09-08 14:39:00 -04:00
import feat: Add Claude conversation importer with thinking support (#11124) 2025-12-29 21:37:52 -05:00
files.js 📚 feat: Add Source Citations for File Search in Agents (#8652) 2025-08-13 16:24:16 -04:00
getFileStrategy.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
handleText.js 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
index.js refactor: Optimize & Standardize Tokenizer Usage (#10777) 2025-12-02 12:22:04 -05:00
queue.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
removePorts.js feat: bun api support 🥟 (#1021) 2023-10-07 11:16:06 -04:00
sendEmail.js 📂 refactor: File Read Operations (#9747) 2025-09-20 10:17:24 -04:00
staticCache.js 🗂️ fix: Disable express-static-gzip for Uploaded Images (#8307) 2025-07-11 16:51:53 -04:00