mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-12 03:30:28 +01:00
fix(copilot): on Windows, run bash blocks in Git for Windows Bash (#3047)
Copilot CLI on Windows ran gstack's extensionless helpers straight from PowerShell, which opened an app picker, and bare bash can resolve to WSL. The Copilot tool glossary (rendered into every Copilot skill) now says to run each bash block in Git for Windows Bash by its full path and never to translate a block into PowerShell. The PR's PowerShell repair skill and README section are not taken. Co-authored-by: nareshh74 <nareshh74@users.noreply.github.com>
This commit is contained in:
1 parent
9618336820
commit
3df850f64e
2 files changed
+11
-1
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ import { defineHost, GBRAIN_RESOLVERS, preambleToolGlossary } from './define-hos
|
||||
// GitHub Copilot CLI (#393). Ported from PR #2323 (@andrey-esipov) with ideas
|
||||
// from #396/#487 (@ridermw) and #1852 (@lolisaigao1234); disposition in
|
||||
// docs/ADDING_A_HOST.md "GitHub Copilot CLI".
|
||||
const COPILOT_TOOL_GLOSSARY = '**GitHub Copilot tool names:** `AskUserQuestion` means your `ask_user` tool (one question per call: put the decision brief in the question and each option in the choices). `ExitPlanMode` means `exit_plan_mode`; the Agent tool means `task`; the Read tool means `view`; the Skill tool means `skill`. Copilot has no `mcp__*__AskUserQuestion` variant.';
|
||||
const COPILOT_TOOL_GLOSSARY = '**GitHub Copilot tool names:** `AskUserQuestion` means your `ask_user` tool (one question per call: put the decision brief in the question and each option in the choices). `ExitPlanMode` means `exit_plan_mode`; the Agent tool means `task`; the Read tool means `view`; the Skill tool means `skill`. Copilot has no `mcp__*__AskUserQuestion` variant. **On Windows (#3047):** run each bash block in Git for Windows Bash by its full path (usually `C:\\Program Files\\Git\\bin\\bash.exe`; bare `bash` can start WSL instead). Never translate a block into PowerShell, and never run an extensionless gstack helper from PowerShell directly: Windows opens an app picker instead of running it.';
|
||||
|
||||
const copilot = defineHost({
|
||||
name: 'copilot',
|
||||
|
||||
@@ -790,3 +790,13 @@ describe('host renders name the host\'s own tools and identities (#2626, #2015,
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('#3047: Copilot on Windows runs bash blocks in Git for Windows Bash', () => {
|
||||
test('the Copilot tool glossary names Git Bash by full path and forbids PowerShell translation', async () => {
|
||||
const { default: copilot } = await import('../hosts/copilot');
|
||||
const glossary = JSON.stringify(copilot.toolRewrites);
|
||||
expect(glossary).toContain('Git for Windows Bash by its full path');
|
||||
expect(glossary).toContain('bare `bash` can start WSL');
|
||||
expect(glossary).toContain('Never translate a block into PowerShell');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user