Inverted environment variable logic for hardware cursor.
EditCached environment variable lookup for performance.
EditAdded missing changelog entries and updated related files.
EditConfirmed changes and committed only relevant files.
Verifywe added a env var for cursor, we need to invert the logic, only use the hardware cursor if the env var is set
The user wants to change the logic for a cursor-related environment variable. They want to invert it so that the hardware cursor is only used if the env var is set (rather than the current logic which is probably the opposite).
Let me search for cursor-related environment variable handling in the codebase.
>grep -r -i "cursor" --include="*.ts" /Users/badlogic/workspaces/pi-mono/packages --ignore-case | grep -i "env\|ENV" | head -30/Users/badlogic/workspaces/pi-mono/packages/tui/src/tui.ts: if (process.env.PI_NO_HARDWARE_CURSOR === "1") {Found it. Let me read that file to see the current logic.
>grep -n -B 3 -A 5 "PI_NO_HARDWARE_CURSOR" /Users/badlogic/workspaces/pi-mono/packages/tui/src/tui.ts981- * @param totalLines Total number of rendered lines
982- */
983- private positionHardwareCursor(cursorPos: { row: number; col: number } | null, totalLines: number): void {
984: // PI_NO_HARDWARE_CURSOR=1 disables hardware cursor for terminals that don't handle it well
985: if (process.env.PI_NO_HARDWARE_CURSOR === "1") {
986- this.terminal.hideCursor();
987- return;
988- }
989-
990- if (!cursorPos || totalLines <= 0) {Current logic:
PI_NO_HARDWARE_CURSOR === "1", hide the cursor (don't use hardware cursor)The user wants to invert this: only use the hardware cursor if the env var is set. So the new env var should be something like PI_HARDWARE_CURSOR and if it's set, use the hardware cursor; otherwise, hide it.
Let me update this.
Done. The logic is now inverted:
PI_NO_HARDWARE_CURSOR=1 → hide cursor (opt-out)PI_HARDWARE_CURSOR=1 → show cursor (opt-in)Let me run the check to make sure there are no issues.
>cd /Users/badlogic/workspaces/pi-mono && npm run check 2>&1> pi-monorepo@0.0.3 check
> biome check --write . && tsgo --noEmit && npm run check -w @mariozechner/pi-web-ui
Checked 405 files in 314ms. No fixes applied.
> @mariozechner/pi-web-ui@0.47.0 check
> biome check --write . && tsc --noEmit && cd example && biome check --write . && tsc --noEmit
Checked 73 files in 43ms. No fixes applied.
Checked 3 files in 8ms. No fixes applied.Done. Check passes. The logic is now inverted:
PI_HARDWARE_CURSOR=1 enables the hardware cursorDone. Changed PI_NO_HARDWARE_CURSOR=1 (opt-out) to PI_HARDWARE_CURSOR=1 (opt-in). The hardware cursor is now disabled by default and only enabled when the env var is set.
if (process.env.PI_HARDWARE_CURSOR !== "1") { is this look up in env quick?
again
The user is asking if looking up process.env.PI_HARDWARE_CURSOR is quick, and they're concerned about it being called repeatedly (since this is in a render path likely called many times).
In Node.js, process.env lookups are not free - they involve a system call or at least some overhead. For a hot path like cursor positioning that might be called on every render, it would be better to cache the value once at startup or when the TUI is created.
Let me look at how this is structured to see the best place to cache it.
No, process.env lookups have overhead. Let me cache it:
>grep -n "class Tui" /Users/badlogic/workspaces/pi-mono/packages/tui/src/tui.ts | head -3(no output)Let me check how the TUI class is structured and where the private fields are defined.
>grep -n "private.*:" /Users/badlogic/workspaces/pi-mono/packages/tui/src/tui.ts | head -20200: private previousLines: string[] = [];
202: private focusedComponent: Component | null = null;
213: private overlayStack: {
307: private isOverlayVisible(entry: (typeof this.overlayStack)[number]): boolean {
316: private getTopmostVisibleOverlay(): (typeof this.overlayStack)[number] | undefined {
340: private queryCellSize(): void {
383: private handleInput(data: string): void {
424: private parseCellSizeResponse(): string {
466: private containsImage(line: string): boolean {
574: private resolveAnchorRow(anchor: OverlayAnchor, height: number, availHeight: number, marginTop: number): number {
591: private resolveAnchorCol(anchor: OverlayAnchor, width: number, availWidth: number, marginLeft: number): number {
609: private compositeOverlays(lines: string[], termWidth: number, termHeight: number): string[] {
683: private applyLineResets(lines: string[]): string[] {
744: private extractCursorPosition(lines: string[]): { row: number; col: number } | null {
762: private doRender(): void {
983: private positionHardwareCursor(cursorPos: { row: number; col: number } | null, totalLines: number): void {Let me read around line 200 to see the class structure and add the cached property there.
I'll add the cached property along with the other private fields and set it in the constructor.
Now let me update the positionHardwareCursor method to use the cached value instead of looking up the env var.
Now let me run the check to ensure everything is working correctly.
>cd /Users/badlogic/workspaces/pi-mono && npm run check 2>&1> pi-monorepo@0.0.3 check
> biome check --write . && tsgo --noEmit && npm run check -w @mariozechner/pi-web-ui
Checked 405 files in 317ms. No fixes applied.
> @mariozechner/pi-web-ui@0.47.0 check
> biome check --write . && tsc --noEmit && cd example && biome check --write . && tsc --noEmit
Checked 73 files in 40ms. No fixes applied.
Checked 3 files in 8ms. No fixes applied.Done. The value is now cached at class instantiation time, so there's no repeated process.env lookup on every render.
Done. Cached process.env.PI_HARDWARE_CURSOR === "1" once at class instantiation instead of looking it up on every render.
README.md needs an update in coding agent, and CHANGELOG.md probably as well (likely already has entry for the old way we enabled this)
Let me check the coding-agent README.md and CHANGELOG.md for references to the old env var.
>grep -n "CURSOR\|cursor" /Users/badlogic/workspaces/pi-mono/packages/coding-agent/README.md154:**IntelliJ IDEA (Integrated Terminal):** The built-in terminal has limited escape sequence support. If you experience cursor visibility issues, set `PI_NO_HARDWARE_CURSOR=1` before running pi. Note that Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal. Consider using a dedicated terminal emulator for the best experience.
316:| Arrow keys | Move cursor / browse history (Up when empty) |
364:| `cursorUp` | `up` | Move cursor up |
365:| `cursorDown` | `down` | Move cursor down |
366:| `cursorLeft` | `left` | Move cursor left |
367:| `cursorRight` | `right` | Move cursor right |
368:| `cursorWordLeft` | `alt+left`, `ctrl+left` | Move cursor word left |
369:| `cursorWordRight` | `alt+right`, `ctrl+right` | Move cursor word right |
370:| `cursorLineStart` | `home`, `ctrl+a` | Move to line start |
371:| `cursorLineEnd` | `end`, `ctrl+e` | Move to line end |
402: "cursorUp": ["up", "ctrl+p"],
403: "cursorDown": ["down", "ctrl+n"],
404: "cursorLeft": ["left", "ctrl+b"],
405: "cursorRight": ["right", "ctrl+f"],
406: "cursorWordLeft": ["alt+left", "alt+b"],
407: "cursorWordRight": ["alt+right", "alt+f"],
418: "cursorUp": ["up", "alt+k"],
419: "cursorDown": ["down", "alt+j"],
420: "cursorLeft": ["left", "alt+h"],
421: "cursorRight": ["right", "alt+l"],
422: "cursorWordLeft": ["alt+left", "alt+b"],
423: "cursorWordRight": ["alt+right", "alt+w"],>grep -n "CURSOR\|cursor" /Users/badlogic/workspaces/pi-mono/packages/coding-agent/CHANGELOG.md1128:- **Word navigation in input fields**: Added Ctrl+Left/Right and Alt+Left/Right for word-by-word cursor movement. ([#306](https://github.com/badlogic/pi-mono/pull/306) by [@kim0](https://github.com/kim0))
1372:- **Emoji deletion and cursor movement**: Backspace, Delete, and arrow keys now correctly handle multi-codepoint characters like emojis. Previously, deleting an emoji would leave partial bytes, corrupting the editor state. ([#240](https://github.com/badlogic/pi-mono/issues/240))
1947:- Fixed cursor position when navigating through wrapped lines in the editor
1971:- Fixed cursor positioning issues with multi-byte unicode characters in editorFound it. Line 154 in README.md mentions PI_NO_HARDWARE_CURSOR=1. I need to update that to the new PI_HARDWARE_CURSOR=1 with inverted logic.
Let me read around that line to get context and then check the CHANGELOG for any related entries.
>grep -n -B 2 -A 2 "Unreleased" /Users/badlogic/workspaces/pi-mono/packages/coding-agent/CHANGELOG.md | head -201-# Changelog
2-
3:## [Unreleased]
4-
5-### AddedLet me see the full Unreleased section to check if there's already an entry about this.
I don't see a specific entry about PI_NO_HARDWARE_CURSOR in the unreleased section. Let me search the entire changelog for it.
>grep -n "HARDWARE_CURSOR\|hardware cursor" /Users/badlogic/workspaces/pi-mono/packages/coding-agent/CHANGELOG.md(no output)
Command exited with code 1No existing entry. Let me update the README and add a changelog entry. The README line needs to be changed from PI_NO_HARDWARE_CURSOR=1 to PI_HARDWARE_CURSOR=1 with updated description. And I need to add a Changed entry in the changelog.
No existing changelog entry. Let me update both files:
Now I need to add a Changed entry to the changelog. Let me add it under [Unreleased].
Wait, this section is under version 0.47.0, not Unreleased. Let me check the structure again and add the Changed section under Unreleased if it doesn't exist.
I see, there's no "Changed" section under [Unreleased]. I accidentally added my entry to the [0.47.0] section. Let me fix this by reverting that change and adding a new Changed section under [Unreleased].
I added it to the wrong section. Let me fix that:
Now I need to add a Changed section under Unreleased, after the Fixed section.
Now let me run the check to make sure everything is fine.
>cd /Users/badlogic/workspaces/pi-mono && npm run check 2>&1> pi-monorepo@0.0.3 check
> biome check --write . && tsgo --noEmit && npm run check -w @mariozechner/pi-web-ui
Checked 405 files in 337ms. No fixes applied.
> @mariozechner/pi-web-ui@0.47.0 check
> biome check --write . && tsc --noEmit && cd example && biome check --write . && tsc --noEmit
Checked 73 files in 44ms. No fixes applied.
Checked 3 files in 8ms. No fixes applied.All done. Let me summarize the changes.
Done. Updated:
PI_NO_HARDWARE_CURSOR=1 to PI_HARDWARE_CURSOR=1 in IntelliJ section[Unreleased] → ### Changedfor all commits since the last release, check that we have changelog.md entries in the respective packages. any changelog.md entry in a package != coding-agent that also affects coding-agent should be duplicated in coding-agent. figure out a process to follow, then write a new prompt template called cl.md in .pi/prompts/ so we can repro this process easily in the future before a release
The user wants me to:
Let me start by figuring out what the last release was and getting the commits since then.
>cd /Users/badlogic/workspaces/pi-mono && git tag --sort=-version:refname | head -5v0.47.0
v0.46.0
v0.45.7
v0.45.6
v0.45.5The last release is v0.47.0. Let me get all commits since that tag.
>cd /Users/badlogic/workspaces/pi-mono && git log v0.47.0..HEAD --oneline09d9107d fix(coding-agent): expand tilde in PI_CODING_AGENT_DIR env var (#778)
12ab69fb fix(tui): decode Kitty CSI-u shifted symbols (#779)
ba8059a5 fix: sanitize bedrock tool call ids (#781)
c45ea27d feat(coding-agent): display timeout in bash tool UI (#780)
fc3ca545 docs(coding-agent): fix ctx.branch -> ctx.fork in extensions docs
4dbf094b Add PI_NO_HARDWARE_CURSOR env var for terminals with limited escape sequence support
3a475fe1 feat(coding-agent): extension command argument autocomplete (#775)
35e48ca0 feat(coding-agent): extension command argument autocomplete
f900eb59 Fix provider feature detection to use model.provider, not just URL
0b625b66 fix(coding-agent): prevent duplicate rendering of extension messages on startup, closes #765
0438decd docs: add changelog entry for #765
898a1a50 fix(coding-agent): prevent duplicate rendering of extension messages on startup
05d78ea2 Fix session picker 'No sessions found' overflow
3f4a6857 feat: add bash-style array slicing for $@ in prompt templates
43c4a80e docs: document prompt template slicing
f869cc4a feat: add bash-style array slicing for $@ in prompt templates
2836d977 Fix session picker empty state overflow
58839959 Fix session picker hint overflow (closes #764)
c5cf74e0 feat(coding-agent): export getShellConfig for extensions (#766)
b11b7d1f coding-agent: update theme-schema.json to match latest theme implementation (#763)
589a2ffc Add [Unreleased] section for next cycleNow let me check each relevant commit and see if they have changelog entries. Let me check the changelogs in each package to see what's already documented.
>cd /Users/badlogic/workspaces/pi-mono && for pkg in ai tui coding-agent; do echo "=== packages/$pkg/CHANGELOG.md [Unreleased] ===" && sed -n '/^## \[Unreleased\]/,/^## \[/p' packages/$pkg/CHANGELOG.md | head -40; done=== packages/ai/CHANGELOG.md [Unreleased] ===
## [Unreleased]
### Fixed
- Fixed OpenAI-compatible provider feature detection to use `model.provider` in addition to URL, allowing custom base URLs (e.g., proxies) to work correctly with provider-specific settings ([#774](https://github.com/badlogic/pi-mono/issues/774))
## [0.47.0] - 2026-01-16
=== packages/tui/CHANGELOG.md [Unreleased] ===
## [Unreleased]
### Added
- `PI_NO_HARDWARE_CURSOR=1` environment variable to disable hardware cursor positioning for terminals with limited escape sequence support (e.g., IntelliJ IDEA's built-in terminal)
### Fixed
- Decode Kitty CSI-u printable sequences in the editor so shifted symbol keys (e.g., `@`, `?`) work in terminals that enable Kitty keyboard protocol
## [0.47.0] - 2026-01-16
=== packages/coding-agent/CHANGELOG.md [Unreleased] ===
## [Unreleased]
### Added
- Added bash-style argument slicing for prompt templates ([#770](https://github.com/badlogic/pi-mono/pull/770) by [@airtonix](https://github.com/airtonix))
- Extension commands can provide argument auto-completions via `getArgumentCompletions` in `pi.registerCommand()` ([#775](https://github.com/badlogic/pi-mono/pull/775) by [@ribelo](https://github.com/ribelo))
### Fixed
- Fixed extension messages rendering twice on startup when `pi.sendMessage({ display: true })` is called during `session_start` ([#765](https://github.com/badlogic/pi-mono/pull/765) by [@dannote](https://github.com/dannote))
- Fixed `PI_CODING_AGENT_DIR` env var not expanding tilde (`~`) to home directory ([#768](https://github.com/badlogic/pi-mono/pull/778) by [@aliou](https://github.com/aliou))
### Changed
- Hardware cursor is now disabled by default for better terminal compatibility. Set `PI_HARDWARE_CURSOR=1` to enable (replaces `PI_NO_HARDWARE_CURSOR=1` which disabled it).
## [0.47.0] - 2026-01-16Now let me analyze commits vs changelog entries:
Commits since v0.47.0:
09d9107d fix(coding-agent): expand tilde in PI_CODING_AGENT_DIR env var (#778) - ✅ In coding-agent changelog
12ab69fb fix(tui): decode Kitty CSI-u shifted symbols (#779) - ✅ In tui changelog, but this affects coding-agent users too
ba8059a5 fix: sanitize bedrock tool call ids (#781) - ❌ Missing from ai changelog
c45ea27d feat(coding-agent): display timeout in bash tool UI (#780) - ❌ Missing from coding-agent changelog
fc3ca545 docs(coding-agent): fix ctx.branch -> ctx.fork in extensions docs - docs only, probably doesn't need changelog
4dbf094b Add PI_NO_HARDWARE_CURSOR env var... - ✅ In tui changelog (now updated to PI_HARDWARE_CURSOR), and in coding-agent changelog now
3a475fe1 feat(coding-agent): extension command argument autocomplete (#775) - ✅ In coding-agent changelog
35e48ca0 feat(coding-agent): extension command argument autocomplete - same as above, duplicate commit
f900eb59 Fix provider feature detection to use model.provider - ✅ In ai changelog
0b625b66 fix(coding-agent): prevent duplicate rendering... - ✅ In coding-agent changelog
0438decd docs: add changelog entry for #765 - changelog update itself
898a1a50 fix(coding-agent): prevent duplicate rendering... - same as 10
05d78ea2 Fix session picker 'No sessions found' overflow - ❌ Missing, affects tui and coding-agent
3f4a6857 feat: add bash-style array slicing for $@ in prompt templates - ✅ In coding-agent changelog
43c4a80e docs: document prompt template slicing - docs only
f869cc4a feat: add bash-style array slicing... - same as 14
2836d977 Fix session picker empty state overflow - same as 13
58839959 Fix session picker hint overflow (closes #764) - ❌ Missing, affects tui and coding-agent
c5cf74e0 feat(coding-agent): export getSh - need to check if this is documented
. Looking at the next entries, I see ellConfig for extensions (#766) which appears to be a continuation - this is missing from coding-agent changelog. Then b11b7d1f coding-agent: update theme-schema.json... is also absent from the changelog. The 589a2ffc Add [Unreleased] section for next cycle is just maintenance.
Several key gaps remain: ba8059a5 fix: sanitize bedrock tool call ids (#781) from the ai package, c45ea27d feat(coding-agent): display timeout in bash tool UI (#780) for coding-agent, and duplicate session picker fixes that need to be added to both tui and coding-agent changelogs.
Let me analyze which commits are missing changelog entries:
>cd /Users/badlogic/workspaces/pi-mono && git show ba8059a5 --stat | head -10commit ba8059a502809d15ec12811ef12bf0344e23bb8d
Author: Pablo Tovar <[REDACTED]>
Date: Fri Jan 16 17:51:48 2026 +0100
fix: sanitize bedrock tool call ids (#781)
packages/ai/src/providers/amazon-bedrock.ts | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)>cd /Users/badlogic/workspaces/pi-mono && git show c45ea27d --stat | head -10commit c45ea27de50308194dcd2b64a1306a3a8b924417
Author: Danila Poyarkov <[REDACTED]>
Date: Fri Jan 16 19:49:33 2026 +0300
feat(coding-agent): display timeout in bash tool UI (#780)
.../src/modes/interactive/components/tool-execution.ts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)>cd /Users/badlogic/workspaces/pi-mono && git show 05d78ea2 --stat | head -10commit 05d78ea2de8adbfd2bab47970852bcd543d3dc6a
Author: Mario Zechner <[REDACTED]>
Date: Fri Jan 16 12:11:01 2026 +0100
Fix session picker 'No sessions found' overflow
.../coding-agent/src/modes/interactive/components/session-selector.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)>cd /Users/badlogic/workspaces/pi-mono && git show 58839959 --stat | head -10commit 588399594c36cf4ee5bb04d4ab9e8220adc66b5f
Author: Mario Zechner <[REDACTED]>
Date: Fri Jan 16 12:01:40 2026 +0100
Fix session picker hint overflow (closes #764)
.../coding-agent/src/modes/interactive/components/session-selector.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)>cd /Users/badlogic/workspaces/pi-mono && git show c5cf74e0 --stat | head -10commit c5cf74e032ec31b926c5acc5e21b017cf434f63e
Author: Danila Poyarkov <[REDACTED]>
Date: Fri Jan 16 14:01:46 2026 +0300
feat(coding-agent): export getShellConfig for extensions (#766)
packages/coding-agent/src/index.ts | 2 ++
1 file changed, 2 insertions(+)>cd /Users/badlogic/workspaces/pi-mono && git show b11b7d1f --stat | head -10commit b11b7d1f84200d04df285339ed943a6c7172d6b6
Author: scutifer <[REDACTED]>
Date: Fri Jan 16 16:15:39 2026 +0530
coding-agent: update theme-schema.json to match latest theme implementation (#763)
* feat(coding-agent): update theme-schema.json
Added to required/properties:
- thinkingText - thinking block text color
- selectedBg - selected item backgroundNow I have a clear picture. Let me also check if the tui changelog entries need to be duplicated to coding-agent:
PI_NO_HARDWARE_CURSOR=1 → Already handled (we changed it to PI_HARDWARE_CURSOR and added to coding-agent)packages/ai/CHANGELOG.md:
ba8059a5 fix: sanitize bedrock tool call ids (#781) by @pjtf93packages/coding-agent/CHANGELOG.md:
c45ea27d feat(coding-agent): display timeout in bash tool UI (#780) by @dannote05d78ea2 Fix session picker 'No sessions found' overflow - internal fix, combined with #76458839959 Fix session picker hint overflow (closes #764) - internal fixc5cf74e0 feat(coding-agent): export getShellConfig for extensions (#766) by @dannoteb11b7d1f coding-agent: update theme-schema.json... by @scutifer (#763)Also need to duplicate from tui:
Let me also check if ai package fix affects coding-agent (bedrock tool call ids) - yes it does, since coding-agent uses ai package.
Let me update the changelogs.
Now I have a clear picture. Missing entries:
packages/ai:
ba8059a5 - sanitize bedrock tool call ids (#781)packages/coding-agent:
c45ea27d - display timeout in bash tool UI (#780)58839959 - session picker hint overflow (#764)c5cf74e0 - export getShellConfig for extensions (#766)b11b7d1f - update theme-schema.json (#763)Let me add these:
Let me add the bedrock fix to ai changelog.
Now let me update coding-agent CHANGELOG. I need to add:
Now add the fixed entries.
Now I should also update the tui changelog to fix the PI_NO_HARDWARE_CURSOR entry since we changed it.
Now let me run check and then create the prompt template.
>cd /Users/badlogic/workspaces/pi-mono && npm run check 2>&1> pi-monorepo@0.0.3 check
> biome check --write . && tsgo --noEmit && npm run check -w @mariozechner/pi-web-ui
Checked 405 files in 380ms. No fixes applied.
> @mariozechner/pi-web-ui@0.47.0 check
> biome check --write . && tsc --noEmit && cd example && biome check --write . && tsc --noEmit
Checked 73 files in 43ms. No fixes applied.
Checked 3 files in 8ms. No fixes applied.Now let me check if .pi/prompts/ exists and create the prompt template.
>ls -la /Users/badlogic/workspaces/pi-mono/.pi/prompts/ 2>/dev/null || echo "Directory does not exist"total 16
drwxr-xr-x@ 4 badlogic staff 128 Jan 16 01:12 .
drwxr-xr-x@ 5 badlogic staff 160 Jan 16 12:47 ..
-rw-r--r--@ 1 badlogic staff 669 Jan 8 19:37 is.md
-rw-r--r--@ 1 badlogic staff 2089 Jan 16 01:12 pr.mdLet me check the existing templates to understand the format.
Good, now I understand the format. Let me create the cl.md prompt template for the changelog audit process.
Let me verify the final state of all changelogs to make sure everything is in order.
>cd /Users/badlogic/workspaces/pi-mono && for pkg in ai tui coding-agent; do echo "=== packages/$pkg/CHANGELOG.md [Unreleased] ===" && sed -n '/^## \[Unreleased\]/,/^## \[/p' packages/$pkg/CHANGELOG.md | head -30; done=== packages/ai/CHANGELOG.md [Unreleased] ===
## [Unreleased]
### Fixed
- Fixed OpenAI-compatible provider feature detection to use `model.provider` in addition to URL, allowing custom base URLs (e.g., proxies) to work correctly with provider-specific settings ([#774](https://github.com/badlogic/pi-mono/issues/774))
- Fixed Bedrock tool call IDs to use only alphanumeric characters, avoiding API errors from invalid characters ([#781](https://github.com/badlogic/pi-mono/pull/781) by [@pjtf93](https://github.com/pjtf93))
## [0.47.0] - 2026-01-16
=== packages/tui/CHANGELOG.md [Unreleased] ===
## [Unreleased]
### Changed
- Hardware cursor is now disabled by default for better terminal compatibility. Set `PI_HARDWARE_CURSOR=1` to enable (replaces `PI_NO_HARDWARE_CURSOR=1` which disabled it).
### Fixed
- Decode Kitty CSI-u printable sequences in the editor so shifted symbol keys (e.g., `@`, `?`) work in terminals that enable Kitty keyboard protocol
## [0.47.0] - 2026-01-16
=== packages/coding-agent/CHANGELOG.md [Unreleased] ===
## [Unreleased]
### Added
- Added bash-style argument slicing for prompt templates ([#770](https://github.com/badlogic/pi-mono/pull/770) by [@airtonix](https://github.com/airtonix))
- Extension commands can provide argument auto-completions via `getArgumentCompletions` in `pi.registerCommand()` ([#775](https://github.com/badlogic/pi-mono/pull/775) by [@ribelo](https://github.com/ribelo))
- Bash tool now displays the timeout value in the UI when a timeout is set ([#780](https://github.com/badlogic/pi-mono/pull/780) by [@dannote](https://github.com/dannote))
- Export `getShellConfig` for extensions to detect user's shell environment ([#766](https://github.com/badlogic/pi-mono/pull/766) by [@dannote](https://github.com/dannote))
- Added `thinkingText` and `selectedBg` to theme schema ([#763](https://github.com/badlogic/pi-mono/pull/763) by [@scutifer](https://github.com/scutifer))
### Fixed
- Fixed extension messages rendering twice on startup when `pi.sendMessage({ display: true })` is called during `session_start` ([#765](https://github.com/badlogic/pi-mono/pull/765) by [@dannote](https://github.com/dannote))
- Fixed `PI_CODING_AGENT_DIR` env var not expanding tilde (`~`) to home directory ([#768](https://github.com/badlogic/pi-mono/pull/778) by [@aliou](https://github.com/aliou))
- Fixed session picker hint text overflow ([#764](https://github.com/badlogic/pi-mono/issues/764))
- Fixed Kitty keyboard protocol shifted symbol keys (e.g., `@`, `?`) not working in editor ([#779](https://github.com/badlogic/pi-mono/pull/779))
- Fixed Bedrock tool call IDs causing API errors from invalid characters ([#781](https://github.com/badlogic/pi-mono/pull/781) by [@pjtf93](https://github.com/pjtf93))
### Changed
- Hardware cursor is now disabled by default for better terminal compatibility. Set `PI_HARDWARE_CURSOR=1` to enable (replaces `PI_NO_HARDWARE_CURSOR=1` which disabled it).
## [0.47.0] - 2026-01-16All changelogs look good. Let me also verify there's no issue reference that's wrong. I noticed #768 in the PI_CODING_AGENT_DIR fix has the wrong PR link - it says #768 but links to #778. Let me check and fix that.
I see a typo in the existing entry. Let me fix it:
Let me check if there's a #779 PR for Kitty, or if it should just be an issue. Let me also check the attribution for the tui changelog entry on Kitty CSI-u.
>cd /Users/badlogic/workspaces/pi-mono && git log --oneline | grep -i "779\|kitty" | head -512ab69fb fix(tui): decode Kitty CSI-u shifted symbols (#779)
be26d362 Fix alt+backspace in Kitty mode and clamp Codex effort (refs #752)
c07126c0 fix(tui): remove Kitty protocol query timeout
7a44cf0d fix(tui): matchesKey now matches Kitty sequences for unmodified letter keys
a2f032a4 feat(tui): add Kitty keyboard protocol flag 2 support for key release eventsThe #779 is indeed a PR. Let me check who authored it.
>cd /Users/badlogic/workspaces/pi-mono && git show 12ab69fb --format="%an <%ae>" -sSarat Chandra <[REDACTED]>Let me get the GitHub username for attribution.
>gh pr view 779 --repo badlogic/pi-mono --json author -q '.author.login' 2>/dev/null || echo "not found"iamd3vilLet me update the tui changelog with proper attribution, and also fix the coding-agent entry.
Now fix the coding-agent entry too.
Good. Now let me also check the #774 entry in ai changelog - it's listed as an issue but the fix was done internally, so it might need a different format.
>cd /Users/badlogic/workspaces/pi-mono && git log --oneline | grep "774" | head -30774db2e feat: add wayland clipboard support for /copy command
77477f61 feat(coding-agent): add timeout option to extension dialogs with live countdown
36e77428 fix duplicated thinking tokens in chutes (#443)It's linked to an issue, not a PR. Let me check if it was a PR or internal fix.
>cd /Users/badlogic/workspaces/pi-mono && git log --oneline | grep -i "provider.*detection\|model.provider" | head -3f900eb59 Fix provider feature detection to use model.provider, not just URLThis was an internal fix (no PR number in the commit message). The changelog entry correctly uses "issues" URL. That's fine.
Now let me run the final check and summarize.
>cd /Users/badlogic/workspaces/pi-mono && npm run check 2>&1> pi-monorepo@0.0.3 check
> biome check --write . && tsgo --noEmit && npm run check -w @mariozechner/pi-web-ui
Checked 406 files in 392ms. No fixes applied.
> @mariozechner/pi-web-ui@0.47.0 check
> biome check --write . && tsc --noEmit && cd example && biome check --write . && tsc --noEmit
Checked 73 files in 48ms. No fixes applied.
Checked 3 files in 8ms. No fixes applied.All done. Let me summarize everything.
Done. Summary of changes:
Added missing changelog entries:
| Package | Commit | Entry |
|---|---|---|
| ai | ba8059a5 | Bedrock tool call ID sanitization (#781) |
| tui | 12ab69fb | Kitty CSI-u shifted symbols fix (#779) |
| coding-agent | c45ea27d | Bash tool timeout display (#780) |
| coding-agent | 58839959 | Session picker hint overflow (#764) |
| coding-agent | c5cf74e0 | Export getShellConfig (#766) |
| coding-agent | b11b7d1f | Theme schema update (#763) |
Cross-package duplications (to coding-agent):
Fixes:
PI_NO_HARDWARE_CURSOR entry to PI_HARDWARE_CURSOR (Changed section)#768 → #778 in PI_CODING_AGENT_DIR entryCreated prompt template: .pi/prompts/cl.md for future changelog audits before releases.
>code .pi/prompts/cl.md(no output)ok, commit the files you changed, do not touch the other changed files
Let me check which files I changed and commit only those.
>cd /Users/badlogic/workspaces/pi-mono && git status --shortM .github/workflows/build-binaries.yml
M packages/ai/CHANGELOG.md
M packages/ai/src/models.generated.ts
M packages/coding-agent/.gitignore
M packages/coding-agent/CHANGELOG.md
M packages/coding-agent/README.md
M packages/coding-agent/src/utils/image-convert.ts
M packages/coding-agent/src/utils/image-resize.ts
M packages/coding-agent/tsconfig.build.json
M packages/tui/CHANGELOG.md
M packages/tui/src/tui.ts
?? .pi/prompts/cl.md
?? packages/coding-agent/src/utils/photon.d.ts
?? scripts/build-binaries.shThe files I changed are:
Let me commit only these files.
>cd /Users/badlogic/workspaces/pi-mono && git add packages/ai/CHANGELOG.md packages/coding-agent/CHANGELOG.md packages/coding-agent/README.md packages/tui/CHANGELOG.md packages/tui/src/tui.ts .pi/prompts/cl.md && git commit -m "chore: audit changelog entries for v0.47.0, add cl.md prompt template
- Add missing changelog entries for commits since v0.47.0
- Cross-duplicate ai/tui fixes to coding-agent changelog
- Change PI_NO_HARDWARE_CURSOR to PI_HARDWARE_CURSOR (opt-in)
- Fix typo in PI_CODING_AGENT_DIR changelog entry
- Add .pi/prompts/cl.md for pre-release changelog audits"Running formatting, linting, and type checking...
> pi-monorepo@0.0.3 check
> biome check --write . && tsgo --noEmit && npm run check -w @mariozechner/pi-web-ui
Checked 406 files in 379ms. No fixes applied.
> @mariozechner/pi-web-ui@0.47.0 check
> biome check --write . && tsc --noEmit && cd example && biome check --write . && tsc --noEmit
Checked 73 files in 49ms. No fixes applied.
Checked 3 files in 9ms. No fixes applied.
✅ All pre-commit checks passed!
[main f57c2798] chore: audit changelog entries for v0.47.0, add cl.md prompt template
6 files changed, 67 insertions(+), 7 deletions(-)
create mode 100644 .pi/prompts/cl.mdDone. Committed only the files I modified.
Committed 6 files: 3 changelogs, README, tui.ts, and the new cl.md prompt template.