Skip to content

Show the same conversation as the VS Code extension: agents, session list, thinking, commands - #220

Open
LalaLolLucky wants to merge 2 commits into
eilonwy06:devfrom
LalaLolLucky:vscode-sync
Open

LalaLolLucky wants to merge 2 commits into
eilonwy06:devfrom
LalaLolLucky:vscode-sync

Conversation

@LalaLolLucky

@LalaLolLucky LalaLolLucky commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

Both clients read the same files (the CLI's transcripts and settings), so wherever the same conversation is drawn differently one of them is wrong. This brings the Eclipse view in line with the VS Code extension. Each rule was taken from the extension's own code (the list and title functions were also run against real transcripts) and checked against real conversations.

Agent map

  • Token counts were summed over every message, which counts the whole context again on each call: 30M for an agent the CLI reports at 296k. The CLI's figure is the latest message's usage. A reopened conversation now takes the totals and outcome the transcript records in each agent's task notice or result. A stale "didn't finish" notice, which the CLI re-sends after a resume, does not undo a finish.
  • A reopened conversation forgot whether an agent was stopped or failed (all grey "finished"); it now keeps it.
  • Agents started by an agent are listed under it, each with its own steps, tokens and clock. They were dropped because the reloaded steps carried no call id.
  • Durations count whole seconds (6m 19s, not 6m 20s), tokens read "296.1k tokens", and an agent with no count shows none.

Session list

  • Titles: rename, AI title, last prompt, summary, first message (skipping commands, tags, interruptions and meta lines), then "Image" or "Document". Untitled conversations used to show their first message; the extension shows the last prompt.
  • A conversation's time is its last user or assistant message, never later than the file, not the last line of any kind.
  • Left out as the extension leaves them out: sub-agent files, SDK and print-mode runs (sdk-*), background workers, and conversations continued in another file. Eclipse's own conversations (claude-eclipse-ide) are unaffected.
  • CLAUDE_CONFIG_DIR is honoured wherever transcripts are read or written (list, history, teleport, rewind and fork, the usage-probe cleanup). It was hard-coded to ~/.claude, so nothing was listed when it is set.

History and labels

  • A slash command keeps its arguments (/review 123, not /review), and a command's output shows as a note when a conversation is reopened.
  • Tool labels match (Update Todos, Web Fetch, Web Search, Search tools), the Todo list shows each item's content, and the tool-calls fold reads "N tool calls · M failed" and leaves out ToolSearch.
  • A fork is named for its parent plus " (fork)" and no longer carries the parent's titles, so the two don't share a name.
  • A teleport also writes the extension's marker line, and either client's marker shows one divider.

Thinking

  • A reopened conversation says how long the model thought ("Thought for 1s", from the duration the CLI records) and draws the model's narration (a thinking block whose signature marks it as such) as a line with a muted "· summary", as the extension does.
  • Live, Rust now tells the page when a thinking block starts and when one is narration (onThinkingBlock, a default method on the callback interface), so the rows come out the same as after a reload, including a "Thought for Ns" row before the narration line.

Attachments

  • Files dropped on the view attach as a paste or "Attach file…" attaches them (image, PDF, text or code). A type that cannot go in inline is named in a note that points to "Attach file…" (which can send its path); files over 32MB or unreadable ones are refused with a note. A drag of a tab is left alone, and a file let go over the view no longer replaces the view by opening it.
  • A dropped file that is one of the project's becomes an @ mention (@src/Foo.java, as picking it from the @ list writes it) and is not attached, as the extension does for a file dragged from its explorer. A page is told only a dropped file's name, size and last-write time, so the core looks in the @ list for a file of that name with that size, written within two seconds: a same-named file from elsewhere is not taken for the project's, and neither is one of two files that both fit.
  • The CLI's notes on where it saved a message's images ([Image: source: …]) showed as a bubble of their own when a conversation was reopened. They are for the model, and are now left out.

Not changed, on purpose

  • Archived sessions: the extension keeps them in VS Code's private state database, which is not a stable interface to read, so the two lists stay separate.
  • The compaction line's number: the extension's "k tokens freed" is the size before compaction under a misleading label; Eclipse's figure is the real saving.
  • Not matched: the path-collision rule and the over-200-character folder name, "couldn't open this session" placeholder rows, the 100-row cap, how meta and peer messages render, and abandoned branches (the extension follows parentUuid from the newest leaf).

How was this tested?

  • cargo test: 537 pass. New tests cover the title and time rules, the filters, config folder resolution, task notice parsing (including decoy tags in an agent's own result, a stale stopped notice, and nested agents), argument retention, the teleport markers, narration signatures and thinking durations.
  • Java: the new config folder helper and the fork title tests, plus the existing RewindServiceTest, run against the real Eclipse jars with the JUnit launcher; the changed classes compile.
  • Real data: the loader and list were run on real conversations and match the VS Code extension's values (agent tokens 296142 and 248092, the two nested agents' 219636 and 264659, the project's session titles and order).
  • The page changes were exercised headlessly in the real page (fold counts, labels, narration live and on reload, the three block orderings).
  • Tried by hand in Eclipse with a rebuilt native library (dropping files included).
  • Dropped-file recognition: tested in the real page with a stand-in for the host lookup, and in Rust for the matching rules. Not exercised: a live narration stream (a fresh CLI run would not produce thinking text on a Vertex login in six configurations I tried), and Bedrock or other providers.

Checklist

  • I have not changed version numbers in MANIFEST.MF, feature.xml, or site.xml — the maintainer sets these on release.
  • I have not added a CHANGELOG.md entry — the maintainer adds this on release.
  • I have not hand-edited the generated p2 artifacts under com.anthropic.claudecode.eclipse.site/.
  • If this touches claude-eclipse-core: I ran cargo test, and for any platform I can build and run on, rebuilt the native library and exercised it in a running Eclipse instance.
  • If this would need a native library for a platform I can't build and test myself, I've left that out and said so above rather than including an untested binary.

The rebuilt macOS library is not part of this PR; the maintainer's build produces it.

…list, thinking, commands

A conversation is one set of files that both clients read, so wherever the two draw it
differently one of them is wrong. Fixed on the Eclipse side, checked against the VS Code
extension's own code and against real transcripts.

Agent map
- Token counts were summed over every message, which counts the whole context again on each
  call (30M for an agent the CLI reports at 296k). The CLI's figure is the latest message's usage.
  A reopened conversation now takes the totals and outcome the transcript records in each
  agent's task notice or result (a stale "didn't finish" notice does not undo a finish).
- A reopened conversation lost whether an agent was stopped or failed; it now keeps it.
- Agents started by an agent are listed under it, each with its own log, tokens and clock.
- Durations count whole seconds, tokens read "296.1k tokens", none shows none.

Session list
- Titles follow the extension: rename, AI title, last prompt, summary, first message (skipping
  commands, tags, interruptions and meta lines), then Image or Document.
- A conversation's time is its last user or assistant message, never later than the file.
- Left out as the extension leaves them out: sub-agent files, SDK and print-mode runs,
  background workers, and conversations continued in another file.
- The CLI's config folder (CLAUDE_CONFIG_DIR) is honoured wherever transcripts are read or written.

History and labels
- A slash command keeps its arguments (/review 123); a command's output shows as a note.
- Tool labels match (Update Todos, Web Fetch, Web Search, Search tools), the Todo list shows
  each item's content, and the tool-calls fold counts failures and skips ToolSearch.
- A fork is named for its parent plus " (fork)" and no longer carries the parent's titles.
- A teleport writes the extension's marker too and either client's marker shows one divider.

Thinking
- A reopened conversation says how long the model thought ("Thought for 1s") and draws the
  model's narration (a thinking block whose signature says so) as a line with "· summary".
- Live, the page is told when a thinking block starts and when one is narration, so the
  rows come out as they do after a reload.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…in the project

Dropping files on the view attaches them as a paste or "Attach file…" does: an image as an image,
a PDF or a text file as a document. A file type that cannot go in inline (an archive, a binary)
is named in a note that points to "Attach file…", which can send its path, and a file over 32MB
or one that cannot be read is refused with a note. A file with no type of its own is typed from
its name. A drag of a tab carries text and is left alone, and a file let go over the view no
longer replaces the whole view by opening it.

A dropped file that is one of the project's is mentioned (`@src/Foo.java`, as picking it from the
`@` list writes it) and not attached, so Claude reads it where it is; the extension does the same
for a file dragged from its explorer. A page is told a dropped file's name, size and time of last
write but not where it lives, so the core looks in the `@` list for a file of that name with that
size, written within two seconds of that time: a same-named file from elsewhere is not taken for the
project's, nor is one of two files that both fit.

The CLI's notes on where it saved the images of a message ("[Image: source: …]", one meta line
with a block for each) showed as a bubble of their own when a conversation was reopened; they are
for the model and are now left out, whether they are a line of their own or sit in a message.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant