You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: consolidate duplicated buildAgentCommand and spawnWithTimeout across watch capabilities #994
PR #988 fixed the --message flag across 8 files, but the underlying pattern (same command-building logic copy-pasted everywhere) is still there. Flagged by @diberry in her review.
What
Extract a shared buildAgentCommand() into a single location (e.g., watch/utils.ts)
Consolidate spawnWithTimeout() which appears in 4 places with identical implementation
Update docs/comments that still reference gh copilot (code now calls copilot directly)
Why
Prevents this class of bug from recurring. Next time the Copilot CLI changes a flag, it is one file to update instead of 8.
Hi! I'd like to work on this. Looking at the code, execute.ts and wave-dispatch.ts still carry their own copies of buildAgentCommand() and a spawn-with-timeout helper (identical to each other, diverging from the shared agent-spawn.ts module added for #920/#923 because they need the withAdditionalMcpConfig wiring). My plan is to extend agent-spawn.ts with a Copilot-flavored command builder and a pid-tracking-aware spawnAgent variant, then have both capabilities import from there instead of keeping local copies. Will open a PR shortly.
Activity
omercangumus commentedon Jul 2, 2026
Hi! I'd like to work on this. Looking at the code,
execute.tsandwave-dispatch.tsstill carry their own copies ofbuildAgentCommand()and a spawn-with-timeout helper (identical to each other, diverging from the sharedagent-spawn.tsmodule added for #920/#923 because they need thewithAdditionalMcpConfigwiring). My plan is to extendagent-spawn.tswith a Copilot-flavored command builder and a pid-tracking-awarespawnAgentvariant, then have both capabilities import from there instead of keeping local copies. Will open a PR shortly.refactor(cli): consolidate duplicated agent-spawn logic across watch …
chore: promote dev -> main (v0.12.0) (#1698)