Move to a terminal driven integration to have better interactions
This commit is contained in:
+31
-20
@@ -1,29 +1,40 @@
|
||||
# Feature documentation
|
||||
|
||||
One file per capability. Each records what the feature does, how it is wired,
|
||||
the protocol facts it depends on, and the traps found while building it — so a
|
||||
future session does not have to re-derive them.
|
||||
the protocol facts it depends on, and the traps found while building it.
|
||||
|
||||
| Feature | Status | Code |
|
||||
| --- | --- | --- |
|
||||
| [Session transport](session-transport.md) | Implemented | `Scripts/client.js` |
|
||||
| [Conversation model](conversation-model.md) | Implemented | `Scripts/session.js` |
|
||||
| [Transcript](transcript.md) | Implemented | `Scripts/transcript.js` |
|
||||
| [Sidebar](sidebar.md) | Implemented | `Scripts/sidebar.js` |
|
||||
| [Tool approvals](tool-approvals.md) | Implemented | `Scripts/permissions.js`, `Scripts/diff.js` |
|
||||
| [Plan mode](plan-mode.md) | Implemented | `Scripts/permissions.js` |
|
||||
| [Questions](questions.md) | Implemented | `Scripts/permissions.js` |
|
||||
| [Launching sessions](launching.md) | Implemented | `Scripts/launch.js` |
|
||||
| [Sessions sidebar](sessions.md) | Implemented | `Scripts/sidebar.js`, `Scripts/sessions-store.js` |
|
||||
| [Authentication](authentication.md) | Implemented | `Scripts/auth.js`, `Scripts/cli.js` |
|
||||
| [Context and prompting](context.md) | Implemented | `Scripts/main.js` |
|
||||
| [Session history](session-history.md) | Implemented | `Scripts/sessions-store.js` |
|
||||
| [IDE bridge](ide-bridge.md) | **Proposed — not built** | — |
|
||||
| [IDE bridge](ide-bridge.md) | **Next — not built** | — |
|
||||
|
||||
## The one-paragraph architecture
|
||||
## Architecture
|
||||
|
||||
The extension spawns one `claude` process per window and speaks its
|
||||
newline-delimited JSON protocol over stdio. Session messages (assistant text,
|
||||
tool calls, results) and control traffic (the initialize handshake, permission
|
||||
prompts, interrupts) share that pipe. `client.js` owns the framing; `session.js`
|
||||
turns messages into a conversation model; `transcript.js`, `sidebar.js` and
|
||||
`permissions.js` are views over that model. Nothing else runs — no Node sidecar,
|
||||
no bundled copy of Claude Code, no network access of the extension's own.
|
||||
Chat happens in a terminal running `claude`. The extension does not own a
|
||||
session and does not proxy the conversation; it prepares launch commands, tracks
|
||||
the project's sessions, and manages the account behind them.
|
||||
|
||||
```
|
||||
Nova sidebar ──copy command──> clipboard ──you paste──> terminal running claude
|
||||
│ │
|
||||
└── reads ~/.claude/projects/<slug>/*.jsonl ───────────────────┘
|
||||
(the same store the CLI uses)
|
||||
```
|
||||
|
||||
Because a launched session is an ordinary CLI session, it is resumable from any
|
||||
terminal and eligible for `--remote-control` — nothing about it is specific to
|
||||
this extension.
|
||||
|
||||
## History
|
||||
|
||||
The extension previously drove `claude --print` over its stream-json protocol
|
||||
and rendered the conversation into a Markdown tab, with approvals, plan review
|
||||
and question answering in Nova panels. That was removed: modal panels truncated
|
||||
long questions and lost their input whenever you clicked away to check
|
||||
something. The terminal TUI handles those interactions properly.
|
||||
|
||||
That implementation — including the stream-json transport, the editable-proposal
|
||||
flow, and the change reconstruction in `Scripts/diff.js` — is preserved in commit
|
||||
`89d1a06` and is the starting point for the [IDE bridge](ide-bridge.md).
|
||||
|
||||
Reference in New Issue
Block a user