Repository navigation
Add interactive port mode and richer handoff context - #35
Merged
Merged
Conversation
Adopting a detected session can now open the target provider's own CLI in a terminal (in the adopted project, under the chosen account, seeded with the brief) instead of only running headless. The desktop drawer offers both as a mode toggle, defaulting to interactive so the developer drives the session directly. Adds a `relay detect --open` flag for the same. The handoff brief now carries a redacted, verbatim tail of the last 16 conversation turns rather than only the first and last prompt, so a port moves real recent context. Every turn passes through the redactor. Also: rune-safe truncate so a carried turn is never split mid-character; POSIX env values and args are shell-quoted (paths with spaces no longer break the launch); the interactive path re-applies the active account after a config reload; and the desktop surfaces adopt failures instead of reporting false success.
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.
What
Two changes to the detect -> adopt ("port") flow, plus fixes surfaced by review.
Interactive port (open the provider's own CLI)
Porting a detected session used to only run the target provider headless as a hidden child of the daemon, so nothing visibly happened except events in the dashboard. Adopt can now instead open the provider's own CLI in a terminal — in the adopted project directory, under the chosen account's config dir, seeded with a prompt that reads the full brief — then step back and let the developer drive it.
relay detect --openflag for the same from the CLI.POST /api/detect/adoptgains aninteractivefield.Richer handoff context
The transcript reader already read every turn and kept only the first/last prompt. The brief now also carries a redacted, verbatim tail of the last 16 user/assistant turns, rendered as a "Recent conversation" section, so a port moves real recent context rather than a one-line summary. Every turn passes through the redactor before it can cross the boundary.
Fixes (from an adversarial review of the above)
handOffSessionnow surfaces daemon body-level adopt errors instead of reporting false success and dismissing the panel.truncateis rune-safe, so a carried turn is never split mid-character.Tests
recent_turns_test.go(turn capture, window, rune-safe truncate) and an opt-inlaunch_smoke_test.gothat spawns a real terminal via the production launcher and asserts cwd + env crossed to the child.go build,go vet, gofmt, 151 Go tests,npm run typecheck, andelectron-vite buildall pass.Scope
Electron desktop (
packages/desktop) only; the legacy Rust egui UI is intentionally not mirrored.