Add per-launch agent, model, and yolo overrides for open and new#299
Open
jongio wants to merge 1 commit into
Open
Add per-launch agent, model, and yolo overrides for open and new#299jongio wants to merge 1 commit into
jongio wants to merge 1 commit into
Conversation
Add --agent, --model, and --yolo flags to the open and new subcommands so a single launch can override the saved config values without editing config first. The overrides apply to every launch mode and to --print, and are never written back to the config file. Also fix a latent deadlock in TestPrintUsage_Output. It wrote printUsage output to an os.Pipe and only drained it after the call returned, which blocks once the text passes the Windows pipe buffer size. The new usage lines pushed it over that limit, so the test now drains the pipe from a goroutine. Closes #294 Co-authored-by: Copilot App <[email protected]>
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.
Closes #294
Summary
Adds
--agent,--model, and--yoloflags to theopenandnewsubcommands so a single launch can override the saved config values without editing config first.--agent <name>and--model <name>accept both--flag valueand--flag=valueforms.--yoloenables yolo mode for the launch;--yolo=true/--yolo=falseset it explicitly.--print. They are never written back to the config file.Shell completion (bash, zsh, fish, powershell),
dispatch help, and the README document the new flags.Verification
go build ./...go test ./...go vet ./...golangci-lint run(0 issues)mage deadcode(OK)New tests cover flag parsing for both subcommands, the apply step, and an end-to-end
open --printrun confirming the overrides reach the resume config. This change also fixes a latent deadlock inTestPrintUsage_Output, which drained its stdout pipe only afterprintUsagereturned; the longer usage text passed the Windows pipe buffer size, so the test now drains the pipe from a goroutine.