fix: aid <workspace> goes straight to the prompt editor again - #666
Conversation
0.59.0 (#662) put the agent, model and effort pickers in front of every promptless launch on a terminal, so `aid owner/repo` asked three questions before the prompt. The pickers now run only for a line that names no workspace (a bare `aid`, or flags alone such as `aid --codex`), which is the line that already went through dl's workspace picker. A line that names its workspace gets the editor alone and the agent's defaults, as 0.58.0 did. The picker tests move to the bare form and take the workspace picker first; the editor tests drop the picker answers.
The e2e test drives `aid <workspace>`, which now reaches the prompt editor with no picker, so its picker-answering branch could never run. Expect the editor directly and drop the unused `time` import. The take_the_defaults doc in the pty tests said every launch meets the pickers; only a line with no workspace does.
…only # Conflicts: # CHANGELOG.md
Reviewer's GuideRestores the pre-0.59 behavior for named-workspace launches: only workspace-less interactive commands show the agent, model, and effort pickers, while named workspaces go directly to the prompt editor with defaults and line-provided flags. The implementation tracks the argument-parsing path through Sequence diagram for named-workspace prompt launchsequenceDiagram
participant User
participant aid as aid.run
participant Parser as rewrite.parse_aid_args
participant Prompt as interactive.collect_prompt
participant Editor as dl.read_prompt
participant Agent
User->>aid: aid workspace
aid->>Parser: parse_aid_args
Parser-->>aid: Line.Ready
aid->>Prompt: collect_prompt(Pickers.Skip)
Prompt->>Editor: read_prompt
Editor-->>Prompt: prompt
Prompt->>Agent: launch with defaults and line flags
Sequence diagram for workspace-less picker launchsequenceDiagram
participant User
participant aid as aid.run
participant Parser as rewrite.parse_aid_args
participant Workspace as dl.pick_workspace
participant Prompt as interactive.collect_prompt
participant Pickers as settle
participant Editor as dl.read_prompt
User->>aid: aid or aid --codex
aid->>Parser: parse_aid_args
Parser-->>aid: UsageError.NoWorkspace
aid->>Workspace: pick_workspace
Workspace-->>aid: workspace_id
aid->>Prompt: collect_prompt(Pickers.Ask)
Prompt->>Pickers: settle
Pickers-->>Prompt: selected settings
Prompt->>Editor: read_prompt
Flow diagram for interactive aid picker selectionflowchart TD
A[aid command line] --> B{parse_aid_args}
B -->|Ready: workspace named| C[Pickers.Skip]
B -->|NoWorkspace| D[dl.pick_workspace]
D --> E[Pickers.Ask]
C --> F[collect_prompt]
E --> F
F -->|Skip| G[Prompt editor]
F -->|Ask| H[settle]
H --> G
G --> I[Start agent]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
All four copies of the version move together: Cargo.toml, Cargo.lock, and the README conda badge and dl --version transcript.
Codecov Report❌ Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
0.59.0 (#662) put the agent, model and effort pickers in front of every promptless
aidlaunch on a terminal. Soaid owner/repoasked three questions before you could type the prompt.Now only a line that names no workspace gets the pickers: a bare
aid, or flags alone likeaid --codex. That is the line that already went through dl's workspace picker. A line that names its workspace goes straight to the prompt editor and starts the agent on its defaults plus whatever flags the line gave, as 0.58.0 did. The pasting fixes from #662 stay.How it works:
run()knows which arm produced the line. Only theNoWorkspacearm, afterdl::pick_workspace(), passesPickers::Asktocollect_prompt(); every other arm passesPickers::Skip, andsettle()runs only underAsk.aid <ws>also never reads or writesaid-recent.tsv, so a model a bareaidremembered does not leak into it.Tests (
rust/aid/tests/interactive.rs, on a real pty):a_named_workspace_goes_straight_to_the_editor_with_no_pickeris new and failed before the fix.a_choice_a_bare_aid_remembered_stays_out_of_aid_workspaceis new.aidand take the workspace picker first. The editor tests drop their picker answers. The Esc-in-a-picker test uses a--stoppedworld so the boot still has anupto block on.Docs: help text, README,
docs/cli.md, CHANGELOG, plus two comments the change made false (one in the e2e test, which loses a picker branch that can no longer run).Checked locally:
cargo test -p aid, clippy, fmt, prek, and the non-e2e pytest suite all pass. Five pushed-by-URL lifecycle tests (four indevlaunch-core, one indl/tests/lifecycle.rs) fail on this host onorigin/maintoo, so they are not from this branch.🤖 Generated with Claude Code
Summary by Sourcery
Restore the pre-0.59.0 interactive flow so explicitly targeted workspaces open directly in the prompt editor, while workspace-less launches retain the selection pickers.
Bug Fixes:
aidcommands that explicitly name a workspace, avoiding the agent, model, and effort pickers.Enhancements:
aidcommands.Build:
Documentation:
Tests: