Thanks for helping improve pi-commandcode-provider.
This is an unofficial Command Code provider for pi. Keep changes small, tested, and easy to review.
npm install
npm testUseful commands:
npm run typecheck
npm run format:check
npm run test:unit
npm run test:models
npm run test:oauth
npm run test:abort
npm run test:stream
npm run test:pi-localBefore opening a PR, run:
npm test
npm run format:check
git diff --checkFor release and npm smoke-test steps, see RELEASE.md.
- Keep PRs focused on one problem or feature.
- Add or update tests for behavior changes.
- Update
README.md,CHANGELOG.md, orRELEASE.mdwhen user-facing behavior changes. - Avoid broad refactors unless the PR is specifically about refactoring.
- Do not include API keys, tokens, real auth files,
.envfiles, or other secrets. - Prefer documented/public Command Code API behavior. If compatibility with CLI behavior is needed, document why.
- Make sure npm package contents still make sense when
package.jsonfileschanges.
For provider, auth, request-shape, or stream changes, test both local code and the package form when possible.
Local extension smoke:
pi --no-extensions -e ./index.ts --list-models commandcodeNpm package smoke and isolated /login testing are documented in RELEASE.md.
Use Angular-style Conventional Commits.
Format:
<type>(<scope>): <subject>Examples:
feat(auth): support Command Code CLI auth files
fix(core): cap max tokens by selected model
docs(release): document npm smoke testing
test(stream): cover reasoning start events
chore(release): publish 0.1.1Use one of these types:
feat: a new user-facing featurefix: a bug fixdocs: documentation-only changesstyle: formatting-only changes, no behavior changerefactor: code restructuring without behavior changeperf: performance improvementtest: adding or changing testsbuild: package, dependency, or build-system changesci: CI workflow changeschore: maintenance that does not fit another typerevert: revert a previous commit
Use a short lowercase scope. Prefer existing project areas:
authoauthcoremodelsstreamtestsdocsreleasedepsci
A scope is strongly recommended. If no scope fits, choose the closest project area instead of omitting it.
- Use imperative mood:
fix(auth): read oauth credentials, notfixedorfixes. - Keep it concise.
- Start lowercase after the colon.
- Do not end with a period.
Use a body when the reason is not obvious:
fix(core): cap max tokens by selected model
Command Code can return models with lower output limits than the provider-wide cap.
Clamp defaults to the selected model so requests do not exceed upstream limits.Breaking changes must be marked with ! or a BREAKING CHANGE: footer:
feat(api)!: switch to provider api endpoints
BREAKING CHANGE: removes support for the legacy internal generate endpoint.