Skip to content

Add browser-pick routing for CLI threads#174

Merged
SDSLeon merged 2 commits into
masterfrom
issue-168
Jun 14, 2026
Merged

Add browser-pick routing for CLI threads#174
SDSLeon merged 2 commits into
masterfrom
issue-168

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Tickets: none

  • Feature + refactor: add a CLI browser-pick flow that reads live composer state, supports ask/terminal/composer routing, and falls back to plain text for terminal-native threads.
  • Add a Terminal settings control for the new cliPickerTarget, and persist the setting through shared settings/defaults.
  • Teach the supervisor to stage PTY input without submitting it and to localize picker attachments into the workspace for agents that can only read inside their worktree.
  • Wire the new IPC/runtime contract end to end and add tests for shared settings, workspace attachment rewriting, and staged-input behavior.

- add `cliPickerTarget` and live composer state for picker routing
- stage terminal input through IPC and copy sandboxed attachments locally
- cover shared settings and runtime staging behavior with tests
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
lightcode-landing Skipped Skipped Jun 14, 2026 8:51am

@SDSLeon SDSLeon merged commit 8b85677 into master Jun 14, 2026
6 checks passed
@SDSLeon SDSLeon deleted the issue-168 branch June 14, 2026 08:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a11f3b08e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

): Promise<PromptSegment[] | undefined> {
if (!segments || segments.length === 0) return segments;
if (!session.adapter.capabilities.requiresWorkspaceLocalAttachments) return segments;
if (session.projectLocation.kind === "wsl") return segments;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Localize WSL attachments before handing them to Command Code

For adapters with requiresWorkspaceLocalAttachments (Command Code sets this), WSL attachments still need to end up under the WSL project directory. Returning here leaves the result from rewriteSegmentsForWsl under the distro home .lightcode/attachments directory, so in a WSL Command Code thread a browser pick is staged/submitted as @/home/.../.lightcode/attachments/..., outside the worktree that the sandboxed CLI can read. This makes the new picker/attachment flow fail specifically for Command Code on WSL projects.

Useful? React with 👍 / 👎.

}
prepared = true;
}
const dest = join(attachmentsDir, basename(segment.path));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make workspace attachment filenames unique

When two out-of-workspace segments share the same basename, both are copied to the same destination and the later copy overwrites the earlier one; the rewritten prompt then points both attachments at the same file. This can happen with repeated browser screenshots or files picked from different directories that have the same name, causing the agent to see the wrong attachment content. Use a per-segment unique filename or subdirectory instead of only basename(segment.path).

Useful? React with 👍 / 👎.

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.

feat: Can u me the browser selection for ui directly provide input to the terminal text input rather than the application's text box

1 participant