feat(sessions): import Qoder IDE session history#397
Merged
Conversation
Add Qoder (Alibaba's agentic IDE) as an external-history source using the existing imported-history pipeline: - reader discovers per-project transcripts at ~/.qoder/cache/projects/<proj>/conversation-history/<task>/<task>.jsonl (Anthropic-style content blocks, text-only), keyed by the composite <projectDir>/<taskDir> id since task dir names are truncated prefixes unique only per project - session metadata (title, timestamps, workspace) joined from the aicoding.questTaskListSnapshot key in Qoder's global state.vscdb, degrading gracefully when the app holds the db - best-effort trajectory recovery from per-launch logs: ACP tool_call events, SubAgentService registrations, ToolInvokeHandler/exthost invocations (terminal commands with cwd), FileChangeTracking edit events; attribution is content-first (workspace/cache paths) with an unambiguous-window fallback, and agent-tools spill files attach as read_file outputs - real edit diffs and per-session impact stats (files changed, +/- via line diff, touched files) from the chatEditingSessions snapshot store; store mtime folded into the discovery fingerprint (parser v2) - canonical mappings: run_in_terminal -> run_command_line, get_problems -> query_lsp, FileChangeTracking ops -> edit_file_by_replace - frontend registration: source descriptor, replay adapter, recent paths, source stats, kanban filter, model icon - turn duration label reads "<1min" instead of "0s" for imported transcripts that carry no timestamps
26 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Qoder (Alibaba's agentic IDE) as an external-history source, reusing the existing imported-history pipeline end to end (discovery cache, sidebar/kanban aggregation, replay, recent paths, data-sources panel).
Store format (discovered empirically)
~/.qoder/cache/projects/<proj>/conversation-history/<task>/<task>.jsonl— one{role, message:{content:[…]}}line per message with Anthropic-style blocks, text-only (no timestamps, no tool calls). Task dir names are truncated task-id prefixes unique only per project, so the source session id is the composite<projectDir>/<taskDir>(prefixqoderapp-).aicoding.questTaskListSnapshotkey in Qoder's globalstate.vscdb(title, timestamps, workspace path), matched by id-prefix + workspace basename; enrichment only — discovery works from the JSONL alone and degrades gracefully when the running app holds the db.Trajectory recovery (best-effort)
Tool calls stream over ACP and are not persisted to the transcript, so the reader correlates three surviving stores at load time:
questWindow/agent.log+ exthost logs: subagent registrations (type + prompt), locally-dispatched tool invocations with args (read_file, terminal commands withcwd), andFileChangeTrackingedit events (which carry the session id directly)agent-tools/spill files (oversized tool outputs) attach asread_fileoutputschatEditingSessions/<session>/snapshot store provides real before/after file bodies →edit_file_by_replacecards with actual diffs, and per-session impact stats (files changed,+/-via line diff, touched files) at sync time; the store mtime is folded into the discovery fingerprint so post-sync edits re-parse (parser v2)run_in_terminal→run_command_line,get_problems→query_lsp, edit ops →edit_file_by_replaceLogs rotate per app launch, so older sessions fall back to the text-only transcript automatically.
Also included
<1mininstead of a broken-looking0sfor imported transcripts that carry no timestamps.Testing
orgtrack_core(transcript parsing, snapshot matching, composite-id discovery, log parsing/attribution with overlapping session windows, spill/output attachment, edit-store resolution, diff-based impact); full crate suite passes (264)1 file, +35 −0) for the file-creating sessionNote
CI may currently be red on
developitself:imported_history_statis registered inhandler_list.incand called fromstat.ts, but the Rust command function isn't committed yet (it exists in a local working tree). This PR neither touches nor depends on that command.