Skip to content

IDE: visible agent sign-in, real signed-in status, import of an agent's own chats (#297, #298) - #299

Merged
aMonteSl merged 1 commit into
idefrom
claude/project-thread-9m9bjg
Nov 27, 2026
Merged

aMonteSl merged 1 commit into
idefrom
claude/project-thread-9m9bjg

Conversation

@aMonteSl

Copy link
Copy Markdown
Collaborator

Fixes the sign-in Adrián could not complete on Windows and adds the import of existing chats (epic #265).

Sign-in (#297)

  • Cause: a terminal sign-in ran its command in a terminal the window never showed. The button then called terminal.show(), which opened a new, empty Git Bash. The login program waited out of sight.
  • Fix: the login program now runs directly, with no shell, in a terminal tab of its own.
    • New TerminalHost.runProgram / TerminalService.createProgram.
    • The renderer starts it through TerminalPanel.runTask, sized to the panel.
    • The command line is shown on the first line.
    • Nothing is typed into the person's shell, so there is no quoting and no start-up race.
    • loginProgram() picks the terminal-auth command, or the agent's launch with the method's arguments. A custom agent's .cmd launch is refused with a hint.
  • Check now asks who is signed in. It calls auth/status (an ACP draft that Claude Code and Codex answer when they advertise auth.status) and shows Needs login or Signed in as .... Claude Code opens sessions while signed out and refuses only the first prompt, which is why it showed Ready before. Agents that cannot answer are judged by session/new, as before.
  • Agent-side logins (Codex ChatGPT, Gemini Google) still go through authenticate, with a "follow the browser" status.

Import chats (#298)

  • Import chats on a ready agent lists that agent's chats for the open folder through ACP session/list:
    • paginated, newest first, at most 200;
    • without chats from other folders or chats already in the IDE.
  • The chosen chats are added at once. Each one reads its messages from the agent's session/load replay the first time it opens (historyPending), with the person's chunked messages joined. Then it continues the same agent session.
  • The IDE never opens the vendor's history files; the agent reads them itself.

Verification

  • npm run ide:test: typecheck, ESLint 0 warnings, 1009 pass. ide:smoke OK on Linux; uiPolicy 4/4.
  • New test/agentLoginImport.test.ts uses an in-process agent with auth/status, session/list (two pages, another folder's chat) and session/load. It covers:
    • login program and size;
    • needs-login, signed-in and unknown status;
    • list, import, no duplicates, replay into the transcript;
    • continuation without a second load, and bad input.
  • Against the real @agentclientprotocol/claude-agent-acp 0.113.0 in the real window (Linux):
    • Claude Subscription opens its own terminal tab, prints the sign-in link and waits for the code;
    • auth/status and session/list answer through Check and Import chats.
  • Docs: the README's agent-first section and the manual test guide (rows 2.3 and 3.6).

Generated by Claude Code

@aMonteSl
aMonteSl merged commit 61e3254 into ide Nov 27, 2026
13 checks passed
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.

2 participants