#6888: feat: PowerShell completion install/uninstall + templates script + voice-call hangup fix
docs
channel: voice-call
cli
scripts
commands
agents
Cluster:
CLI Enhancements and Fixes
This PR re-introduces the work from `feat/pwsh-completion-install-uninstall` as a cleaned-up branch (`rework/pwsh-completion-install-uninstall`). It includes the following grouped changes:
- feat(completion): add PowerShell automated install & uninstall (squashed)
- feat: add `copy-templates` script, include it in build, and add workspace template resolution & tests
- fix(voice-call): hang up rejected inbound calls and add test (squashed)
Notes:
- I created a backup of the original branch at `backup/feat/pwsh-completion-install-uninstall-before-reset` in the fork if you want to review the original commits.
- I ran targeted tests for the changed areas: completion and voice-call tests passed locally.
If you'd like, I can split these into separate PRs (completion vs templates vs voice-call) or adjust the commit messages/style per contribution guidelines.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR bundles three feature areas: (1) adds automated shell completion install/uninstall including PowerShell integration (CLI + onboarding + postinstall tests), (2) adds a `copy-templates` build step and workspace template resolution/tests, and (3) fixes voice-call behavior by hanging up rejected inbound calls with new test coverage.
Key changes touch build/package metadata (`package.json`, `pnpm-lock.yaml`), new scripts under `scripts/`, CLI wiring (`src/cli/completion-cli.ts`, `src/cli/program/command-registry.ts`), and agent/workspace runtime behavior (`src/agents/*`).
Main issues found:
- `scripts/copy-templates.ts` uses a CommonJS entrypoint check (`require.main`) but the repo is ESM (`type: module`), which will throw at runtime and break the build.
- `package.json` drops previously present `pnpm.onlyBuiltDependencies` and several `pnpm.overrides`, which likely changes install/build behavior and can undo intentional dependency pinning.
- The new `sanitizeSessionHistory` API in `src/agents/pi-embedded-runner/history.ts` doesn’t actually emit sanitized content (it only counts it), so its behavior doesn’t match its name/documentation.
Other notes:
- The voice-call rejected-inbound hangup path can leave a persisted call record if the provider hangup fails (best-effort path); worth tightening to avoid state leakage.
- Completion docs heading uses an emoji, which can create unstable Mintlify anchors.
<h3>Confidence Score: 2/5</h3>
- Not safe to merge as-is due to a likely build-breaking ESM/CJS issue and risky package.json config regressions.
- `scripts/copy-templates.ts` will throw under ESM because it references `require`, and the build now invokes it. Additionally, removal of pnpm build/override settings can change dependency resolution and native build behavior. The remaining findings are more localized behavioral issues that are probably fixable without large refactors.
- scripts/copy-templates.ts, package.json, pnpm-lock.yaml, src/agents/pi-embedded-runner/history.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<details><summary><h4>Context used (3)</h4></summary>
- Context from `dashboard` - docs/cli/agents.md ([source](https://app.greptile.com/review/custom-context?memory=057a11aa-5c5f-48bb-8d53-91b27b0fe3a2))
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
</details>
<!-- /greptile_comment -->
Most Similar PRs
#7085: test: skip flaky workspace-paths & safe-bins tests on non-Linux/CI ...
by ThinkIbrokeIt · 2026-02-02
79.6%
#12308: fix(cli): redirect log output to stderr during completion script ge...
by mcaxtr · 2026-02-09
78.2%
#8713: feat: gateway memory monitor, install linger, docs and failover
by quratus · 2026-02-04
78.1%
#7494: feat(completion): PowerShell automated install & uninstall
by ThinkIbrokeIt · 2026-02-02
78.0%
#6694: fix: Cache completion install
by s0up4200 · 2026-02-01
77.6%
#3973: fix: enhance npm package integrity checks and include critical files
by YeSuX · 2026-01-29
77.5%
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
77.5%
#18493: making pnpm build:ui and pnpm build to work on windows
by darkpowerxo · 2026-02-16
77.5%
#20081: feat: post-compaction triage UX — fuzzy ok + stage-2 gate + Discord...
by PrivacySmurf · 2026-02-18
77.0%
#12871: fix: use bash and warn about shell injection (issue #12836)
by ambicuity · 2026-02-09
76.5%