feat(copilot): add initial prompt support via -i flag#1387
feat(copilot): add initial prompt support via -i flag#1387arnestrickmann merged 1 commit intogeneralaction:mainfrom
Conversation
|
@naaa760 is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds a single-line change to Key observations:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| src/shared/providers/registry.ts | Adds initialPromptFlag: '-i' to the GitHub Copilot provider definition, wiring initial-prompt CLI arg support. Change is minimal and follows the same pattern as Gemini/Qwen, but no tests were added and the correctness of -i as the Copilot CLI flag is unverified in this diff. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[registry.ts\ncopilot provider\ninitialPromptFlag: '-i'] --> B[resolveProviderCommandConfig]
B --> C{customConfig\ninitialPromptFlag set?}
C -- Yes --> D[Use custom flag]
C -- No --> E[Use provider.initialPromptFlag\n= '-i']
D --> F[buildProviderCliArgs]
E --> F
F --> G{initialPromptFlag !== undefined\n&& !useKeystrokeInjection\n&& initialPrompt.trim?}
G -- No --> H[Skip initial prompt arg]
G -- Yes --> I{initialPromptFlag truthy?}
I -- Yes --> J[push '-i' to args]
I -- No --> K[Skip flag, push prompt only]
J --> L[push prompt text to args]
K --> L
L --> M[PTY spawns: copilot --allow-all-tools -i 'prompt text']
Last reviewed commit: 2a91c8d
| versionArgs: ['--version'], | ||
| cli: 'copilot', | ||
| autoApproveFlag: '--allow-all-tools', | ||
| initialPromptFlag: '-i', |
There was a problem hiding this comment.
No tests added for the new flag
The PR checklist marks "I have added tests that prove my fix is effective or that my feature works" as checked, but the diff only touches registry.ts — no new tests were added. Other providers have snapshot/unit coverage for their initialPromptFlag values via buildProviderCliArgs (e.g., the existing tests in src/test/main/ptyManager.test.ts). A test confirming that the copilot provider resolves to initialPromptFlag: '-i' and that the resulting CLI args include -i <prompt> would prevent regressions and make the intent explicit.
|
please do you have any idea of platform where i can take issues and solve for a fee? |
summary
Fixes
fix : #1385
Snapshot
N/A
Type of change
[x] New feature (non-breaking change which adds functionality)
Mandatory Tasks
Checklist
[x] I have read the contributing guide
[x] My code follows the style guidelines of this project (pnpm run format)
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have checked if my PR needs changes to the documentation
[x] I have checked if my changes generate no new warnings (pnpm run lint)
[x] I have added tests that prove my fix is effective or that my feature works