LibreChat/api/server/utils/import
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
..
__data__ 🎥 feat: YouTube Tool (#5582) 2025-01-31 19:11:04 -05:00
fork.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
fork.spec.js 🏷️ fix: Increment Tag Counters When Forking/Duplicating Conversations (#9737) 2025-09-19 22:02:09 -04:00
importBatchBuilder.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
importConversations.js ⚖️ fix: Add Configurable File Size Cap for Conversation Imports (#10012) 2025-10-07 14:47:21 -04:00
importers-timestamp.spec.js 🐛 fix: ChatGPT import creating fragmented conversation tree (#11123) 2025-12-29 21:31:18 -05:00
importers.js feat: Add Claude conversation importer with thinking support (#11124) 2025-12-29 21:37:52 -05:00
importers.spec.js feat: Add Claude conversation importer with thinking support (#11124) 2025-12-29 21:37:52 -05:00
index.js ℹ️ refactor: Remove use of Agenda for Conversation Imports (#3024) 2024-06-10 13:00:34 -04:00