Skip to content

feat: Import and browse OpenCode session history #33

Description

@afaf-tech

Summary

Add support for importing and browsing OpenCode chat session history within Lovcode's session viewer, alongside the existing Claude Code and Codex history views.

Motivation

Lovcode's primary feature is browsing AI coding session history with full-text search. OpenCode users have rich session histories stored locally that they currently can't view in Lovcode. Adding OpenCode history support makes Lovcode the true single-pane-of-glass for all AI coding activity.

Proposed Feature

  • Auto-import OpenCode sessions from ~/.local/share/opencode/
  • Display OpenCode sessions in the session list with a distinct tool badge/icon
  • Full-text search across OpenCode conversations (leveraging existing Tantivy + jieba index)
  • Structured content blocks — render OpenCode's tool calls, thinking blocks, and file diffs in Lovcode's existing block viewer
  • Session metadata — show model used, token counts, duration, project path

Technical Notes

  • OpenCode session storage: ~/.local/share/opencode/
  • Session format likely differs from Claude Code's .jsonl format — will need a parser adapter
  • OpenCode supports plan mode vs build mode — sessions may contain both
  • File change tracking data may be embedded in sessions

Data Source Filter

This would add a third option to the data source switcher:

  • Claude Code
  • Codex
  • OpenCode ← new
  • claude.ai (web)

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions