Documentation
Core Features/Session Management

Session Management

ThinkCode's session management features allow you to organize your AI interactions, preserve important context, and collaborate effectively with your team. This guide explains how to maximize productivity through effective session management.

Understanding ThinkCode Sessions

A ThinkCode session encapsulates:

  1. Your conversation history with the AI
  2. The code files and snippets that provide context
  3. Project-specific information
  4. User-defined preferences and settings
graph TD
    A[ThinkCode Session] --> B[Conversation History]
    A --> C[Code Context]
    A --> D[Project Information]
    A --> E[User Preferences]
    
    style A fill:#f96,stroke:#333,stroke-width:2px

Why Session Management Matters

Effective session management helps you:

  • Maintain context: Preserve important information across coding sessions
  • Organize work: Separate different tasks and projects
  • Collaborate: Share knowledge with team members
  • Track progress: Document the evolution of your solutions
  • Optimize AI assistance: Provide the right context for better AI responses

Session Types

ThinkCode supports different types of sessions:

Project Sessions

Connected to a specific codebase:

  • Automatically includes relevant project context
  • Persists across IDE restarts
  • Can be shared with team members
  • Indexes project structure for better AI assistance

Topic Sessions

Focused on a specific problem or domain:

  • Concentrates on a particular task or problem
  • Can span across multiple projects
  • Useful for deep exploration of specific topics
  • Helps maintain focus on a single concern

Ephemeral Sessions

Temporary sessions for quick tasks:

  • Not automatically saved
  • Useful for quick questions and tasks
  • Minimal context loading for faster responses
  • Can be converted to persistent sessions if needed

Managing Sessions

Creating Sessions

Start a new session:

  1. Click the "New Session" button in the Think Panel
  2. Choose a session type (Project, Topic, or Ephemeral)
  3. Name your session (e.g., "Auth Feature Development" or "Performance Optimization")
  4. Select optional parameters like AI model, role, and context scope

Alternatively, use the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search for "Think: New Session".

Saving Sessions

Preserve important sessions:

  1. In the active Think Panel, click the "Save" icon
  2. Choose a location in your session library
  3. Add optional tags for better organization
  4. Include a brief description of the session's purpose

Switching Between Sessions

Easily navigate between different sessions:

  1. Click "Sessions" in the Think Panel
  2. Browse your saved sessions
  3. Select a session to resume
  4. Filter sessions by project, date, or tags

Session Context Management

Control what information is included in your session:

Adding Context

Include specific files or folders:

  1. Right-click a file or folder in the Explorer
  2. Select "Add to Think Context"
  3. Choose which session to add it to

Or use the Command Palette: "Think: Add Selection to Context"

Viewing Current Context

See what context the AI has access to:

  1. In the Think Panel, click the "Context" button
  2. Review files, folders, and other information included
  3. Adjust context scope as needed

Clearing Context

Reset the session context:

  1. In the Think Panel, click "Context"
  2. Select "Clear Context"
  3. Choose what to clear (files, conversation, or both)

Collaboration Features

Share your AI interactions with team members:

Exporting Sessions

Create shareable session files:

  1. Open the session you want to share
  2. Click "Export Session" in the Think Panel
  3. Choose what to include (conversation, context, both)
  4. Save as a .thinksession file

Importing Sessions

Load sessions shared by others:

  1. Click "Import Session" in the Think Panel
  2. Select a .thinksession file
  3. Review the session contents
  4. Click "Load Session"

Real-time Collaboration

Work together in the same session:

  1. Click "Share" in the Think Panel
  2. Choose "Start Collaboration Session"
  3. Share the generated link with teammates
  4. Team members can join with view-only or edit permissions

Session Organization

Keep your sessions well-organized:

Session Library

Browse and manage all your sessions:

  1. Access the Session Library from the Think Panel or Command Palette
  2. View sessions organized by project, date, or custom categories
  3. Search for specific sessions by name or content
  4. Batch operations for archiving or deleting sessions

Session Tagging

Add metadata to your sessions:

  1. Select a session in the Session Library
  2. Click "Edit Tags"
  3. Add descriptive tags like "debugging", "performance", "learning"
  4. Use tags for filtering and organization

Session Folders

Group related sessions:

  1. In the Session Library, click "New Folder"
  2. Name your folder (e.g., "Authentication System", "UI Refactoring")
  3. Drag and drop sessions into folders
  4. Nest folders for hierarchical organization

Advanced Session Features

Session Templates

Create reusable session configurations:

  1. Set up a session with your preferred settings
  2. From the Session Library, select "Save as Template"
  3. Name and describe your template
  4. Use the template for future sessions

Auto-saving

Configure automatic session saving:

{
  "think.sessions.autoSave": true,
  "think.sessions.autoSaveInterval": 5,
  "think.sessions.maxAutoSaveSessions": 10
}

Session Merging

Combine insights from multiple sessions:

  1. Select two or more sessions in the Session Library
  2. Choose "Merge Sessions"
  3. Select what to include from each session
  4. Name and save the merged session

Session Settings

Customize session behavior:

Default Session Type

{
  "think.sessions.defaultType": "project", // project, topic, or ephemeral
  "think.sessions.autoCreateProjectSessions": true
}

Context Management

{
  "think.sessions.maxContextFiles": 50,
  "think.sessions.excludePatterns": ["node_modules/**", "dist/**", "*.log"],
  "think.sessions.includeGitHistory": false
}

Session Storage

{
  "think.sessions.storageLocation": "cloud", // cloud or local
  "think.sessions.syncAcrossDevices": true,
  "think.sessions.maxCloudStorage": 1000 // in MB
}

Best Practices

Effective Session Organization

Maximize productivity with these techniques:

  1. Use descriptive names: Name sessions clearly (e.g., "Auth API Debugging" instead of "Session 5")
  2. Create purpose-specific sessions: Dedicate sessions to specific tasks rather than mixing concerns
  3. Archive completed sessions: Move completed work to archives instead of deleting
  4. Review session history: Periodically review past sessions for valuable insights
  5. Tag consistently: Develop a consistent tagging system for your team

Optimizing Context

Provide the right amount of context:

  1. Be selective: Include only relevant files in the context
  2. Update context: Refresh context when working on different parts of the codebase
  3. Include documentation: Add README files and comments for better AI understanding
  4. Remove noise: Exclude generated files, logs, and other noise

Collaborative Workflows

Work effectively with team members:

  1. Document session purpose: Include a brief description of what the session aims to accomplish
  2. Share key insights: Extract and share important discoveries from your sessions
  3. Create onboarding sessions: Use sessions to help new team members understand the codebase
  4. Define session ownership: Assign clear responsibility for maintaining shared sessions

Troubleshooting

Common Session Issues

IssueSolution
Session not savingCheck storage permissions and available space
Missing contextVerify files are added to context and not excluded by patterns
Slow session loadingReduce context size or upgrade your subscription for higher limits
Session conflictsUse the conflict resolution tool to merge changes
Lost sessionsCheck the session recovery feature in the Library

Recovery Options

Recover accidentally deleted or corrupted sessions:

  1. In the Session Library, click "Recovery"
  2. Browse available recovery points
  3. Preview and restore the desired session version

Next Steps

To further enhance your ThinkCode experience:

Pro Tip

Use session templates to standardize AI interactions across your team. Create templates for common tasks like code reviews, debugging sessions, and architecture discussions to ensure consistent AI assistance.