sunzeJAVA/dsh-session-importer ↗★ 0
dsh-session-importer
dsh plugin: import session records from other coding agents (Claude Code, Codex CLI, generic JSONL, Markdown) into the dsh session store
AI 분석
核心用途是实现多平台 AI 对话历史的统一归档。适合同时使用多种 AI 助手工具,并希望将分散的聊天记录、调试历史合并导入到 DSH 中统一管理的用户。
설치
검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗
Usage
In the web UI command palette (or any command surface):
/import-sessions [
] [--source auto|claude|codex|jsonl|markdown] [--cwd ] [--limit ] [--dry-run] [--retitle]
-
No
— auto-discovers the known agent data directories listed above. -
a file — imports that one transcript. -
a directory — scans recursively for*.jsonl(*.mdonly with--source markdown). -
--source— force a parser; defaultautodetects per file. -
--cwd— override the recorded working directory of imported sessions. -
--limit— cap messages per imported session (default unlimited). -
--dry-run— scan, parse, and report without writing anything. -
--retitle— backfill titles + sidebar projections for sessions imported by an older plugin version, without re-importing. Runs inside the host process (no restart needed). Run it once after upgrading the plugin:/import-sessions --retitle
Examples:
/import-sessions
/import-sessions ~/.claude/projects
/import-sessions /path/to/export.jsonl --source claude
/import-sessions /path/to/transcript.md --source markdown --cwd /path/to/project
/import-sessions --dry-run
Behavior notes
- Idempotent: each source file maps to a deterministic session id
(
import- -, versioned — a parser fix bumps the hash input, so re-importing after an upgrade creates fresh sessions instead of being rejected as duplicates). Re-importing the same file unchanged is skipped as a duplicate, so running the command repeatedly is safe. - Durability: imports write directly through the dsh session-persistence backend (the same append-only, fsync-durable machinery the live agent path uses), so no live agent session is required and writes survive restarts.
- Fidelity: tool calls are kept as
tool-callcontent blocks plustool/call+tool/resultevents (paired by id), mirroring native dsh sessions; Claude Codethinkingblocks and Codexreasoningblocks are imported asreasoningcontent blocks so tool-heavy turns still show the model's reasoning; very long blocks are truncated (200 KB text / 100 KB tool results) to keep imports bounded.