fix(cosh): add installation of extension examples and update package …#271
Merged
samchu-zsl merged 1 commit intoalibaba:mainfrom Apr 22, 2026
Conversation
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
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.
Description
The
co extensions newcommand fails when the CLI is bundled (RPM installation) because theexamplesdirectory containing boilerplate templates is not included in the build output.After bundling,
import.meta.urlinnew.tsresolves to the directory ofcli.js(e.g./usr/lib/copilot-shell/), sojoin(__dirname, 'examples')points to a non-existent path. This fix ensures examples are copied intodist/examples/during build and installed alongside the CLI.Changes:
packages/cli/src/commands/extensions/examples/todist/examples/after bundlingdist/examples/to$(LIBDIR)/examples/duringmake installexamplesto the npm publishfileslistRelated Issue
fixes #259
Type of Change
Scope
cosh(copilot-shell)Checklist
cosh: Lint passes, type check passes, and tests passTesting
npm run bundleinsrc/copilot-shell/and verifydist/examples/is created with all 5 template directories (agent, commands, context, mcp-server, skills)co extensions new test mcp-serverand verify the template is successfully createdmake install DESTDIR=/tmp/test-install PREFIX=/usrand verify examples are installed to/tmp/test-install/usr/lib/copilot-shell/examples/Additional Notes
No changes to
new.ts— the existing path resolutionjoin(__dirname, 'examples')works correctly once examples are placed alongsidecli.js.