You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(terminal): add search images and prompt navigation - #2147
Terminal search now paints configured match backgrounds and foregrounds before text and cursor. Kitty graphics are accepted by default with a bounded image store and rendered from cached premultiplied pixels, including PNG, source crops, z ordering, replacement/deletion, synchronized updates, scrolling and Unicode placeholders. OSC 133 semantic prompt phases gate Option/Alt click cursor movement across wrapped graphemes and wide cells.
Verification
go tool nsgo test ./base/terminal — 62 passed, 3 skips (2 existing platform/helper skips and the new native pixel test when headless)
go tool nsgo check -target macos,ios,windows,linux,android,web,tvos,watchos -jobs 4 — all targets vetted
go tool nsgo test -target macos -activate -run "TestOptionClickPrompt|TestTerminalGraphicsPixels|TestTerminalGraphicsPlaceholders" — native 3 passed
module layering, skills, driver hooks and duplicate-platform gates passed
Native proof screenshots are in the test output for Option-click, search plus images, and Unicode placeholders. Browser integration needs the pinned semantic prompt callback foreign-type adaptations from #2144 (opt42 allowlist and foreignType case).
Relative image placements rooted in Unicode virtual placements remain a documented roadmap goal because the pinned placement API exposes no viewport origin for them. Native normal relative placements, normal images and Unicode placeholders use the shared renderer on every supported backend.
Integration notes for the parallel terminal PRs: retain one native_test.go; retain the CellWide helper from #2141; #2142 mouse capture must bypass Alt-only left clicks accepted by promptDistance; #2145 contrast handling must use the effective search background/foreground. With #2144, register cbSemanticPrompt with signature viii, read its request with foreignValue[semanticPrompt], add optSemanticPrompt to the scalar callback allowlist, and map semanticPrompt to GhosttyTerminalSemanticPrompt in foreignType.
Reviewed. Checked the new GhosttyTerminalSemanticPrompt layout is validated against the manifest like the other callback structs, that Option-click only moves within the current OSC 133 input (rechecked on release, cancelled by drags and outside releases, and sent as one encoded burst of arrow keys), that Kitty images stay bounded by Options.ImageLimit (64 MiB default, disabled when negative), and that search colors are painted under glyphs and the cursor.
Rebased onto main: squashed the two commits first (the second only renamed graphics.go to images.go, which collided with main's new box-drawing graphics.go), kept main's minimum-contrast step and applied the search foreground after it, kept CursorBlink beside the new ImageLimit in tsx, moved the CHANGELOG.md bullet into changelog.d/terminal-search-images-1461.md, and unwrapped the hard-wrapped comments. vet (linux, darwin, windows) and -race tests for base/terminal and tsx/terminal pass on Linux; changelog check passes. #2144 will need to adapt to the new semantic prompt callback when it is rebased.
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
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.
What changed
Terminal search now paints configured match backgrounds and foregrounds before text and cursor. Kitty graphics are accepted by default with a bounded image store and rendered from cached premultiplied pixels, including PNG, source crops, z ordering, replacement/deletion, synchronized updates, scrolling and Unicode placeholders. OSC 133 semantic prompt phases gate Option/Alt click cursor movement across wrapped graphemes and wide cells.
Verification
go tool nsgo test ./base/terminal— 62 passed, 3 skips (2 existing platform/helper skips and the new native pixel test when headless)go tool nsgo check -target macos,ios,windows,linux,android,web,tvos,watchos -jobs 4— all targets vettedgo tool nsgo test -target macos -activate -run "TestOptionClickPrompt|TestTerminalGraphicsPixels|TestTerminalGraphicsPlaceholders"— native 3 passedNative proof screenshots are in the test output for Option-click, search plus images, and Unicode placeholders. Browser integration needs the pinned semantic prompt callback foreign-type adaptations from #2144 (
opt42allowlist andforeignTypecase).Relative image placements rooted in Unicode virtual placements remain a documented roadmap goal because the pinned placement API exposes no viewport origin for them. Native normal relative placements, normal images and Unicode placeholders use the shared renderer on every supported backend.
Integration notes for the parallel terminal PRs: retain one
native_test.go; retain theCellWidehelper from #2141; #2142 mouse capture must bypass Alt-only left clicks accepted bypromptDistance; #2145 contrast handling must use the effective search background/foreground. With #2144, registercbSemanticPromptwith signatureviii, read its request withforeignValue[semanticPrompt], addoptSemanticPromptto the scalar callback allowlist, and mapsemanticPrompttoGhosttyTerminalSemanticPromptinforeignType.Closes #1461.