Store AI Chat History in Project Folders for Cross-Device Project Synchronization

Problem Description

Current Issues:

Currently, Cursor’s AI chat history is stored globally, which causes:

  • Chat records cannot sync with project folders across different devices
  • Loss of AI conversation context when switching between home and office environments
  • Unable to share project-related AI conversation history in team collaboration
  • Project-related technical discussions and solutions cannot be persistently saved within projects

Proposed Solution

核心功能 | Core Features

  1. Project-Local Storage

    • Create .cursor/ folder in each project root directory
    • Store AI chat history for that project in .cursor/chat-history.json
  2. ** Auto-Detection and Loading**

    • Auto-detect and load local chat history when Cursor opens a project
    • Automatically merge with global records if local history is detected
  3. ** UI Enhancement**

    • Add “Project History” option in the top-right history button
    • Provide toggle view between global history and project history
    • Show history source indicator (global/project-local)
  4. ** Sync and Backup**

    • Support exporting existing global chat records to project folders
    • Provide option to mark specific conversations as “project-related” and auto-save to project
1 Like