lovcode icon indicating copy to clipboard operation
lovcode copied to clipboard

feat: Import and browse OpenCode session history

Open afaf-tech opened this issue 4 months ago • 0 comments

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

afaf-tech avatar Aug 03 '26 02:08 afaf-tech