-
Notifications
You must be signed in to change notification settings - Fork 249
Add Terminal and StatelessTerminal renderables #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
remorses
wants to merge
31
commits into
sst:main
Choose a base branch
from
remorses:ghostty-opentui-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,483
−585
Conversation
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
- update build.zig for zig 0.15 API (createModule, standardOptimizeOption) - add ghostty-vt dependency for terminal emulation - use -gnu suffix for linux targets to fix PIC linker errors - update CI workflows to use zig 0.15.2 - update all zig source files for 0.15 compatibility
…inux - Update React and Solid workflows to use Zig 0.15.2 (required by ghostty-vt) - Skip macOS targets when building on non-macOS hosts (ghostty's apple-sdk doesn't support cross-compilation from Linux) - Update TypeScript build script to handle missing platform builds gracefully
- Add mitchellh/zig-build-macos-sdk dependency (official SDK used by Ghostty) - Configure SDK paths on module before loading ghostty dependencies - Update to latest ghostty commit - Remove skip logic for macOS targets since SDK is now provided
Native binaries for all platforms are built in the release workflow (build-native.yml on macOS). PR checks only need to build the TypeScript library and run tests.
macOS can cross-compile to all platforms (Linux, Windows, macOS). This avoids the complexity of setting up macOS SDK on Linux runners.
- By default, zig build now only builds for the native platform - Add -Dall option to zig build for building all platforms - Add --all flag to TypeScript build script - Update release workflow to use --all for cross-compilation This allows Linux users to run `bun run build` without failing on macOS targets.
- ArrayList.init(allocator) → ArrayListUnmanaged with allocator per-method - std.fmt.formatIntBuf → std.fmt.bufPrint - std.fmt.formatInt → writer.print - std.zon.parse.Status removed, use fromSlice directly
- Add vterm.zig with ghostty-vt integration for terminal emulation - Add VTerm FFI functions to lib.zig and zig.ts - Add StatelessTerminalRenderable and TerminalRenderable classes - Fix renderer.zig to skip stdout writes in testing mode (fixes hanging tests) - Fix circular dependency by moving VTerm types to lib/vterm-ffi.ts
Contributor
Author
|
Here is the multiplexing demo running 4 focusable opencode processes with support for mouse, scrolling and keys forwarding Screen.Recording.2025-12-24.at.12.59.23.mov |
1 task
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.
Stacked on #439 (zig 0.15 upgrade).
Adds terminal rendering support using ghostty-vt:
TerminalRenderable- stateful terminal emulator for interactive sessionsStatelessTerminalRenderable- fast renderer for first few lines of output (renders in ~ms, for opencode bash previews)The terminal output is renderd line by line instead of using character cells. This should make it pretty fast even for super long ANSI outputs if they don't use many colors. Each line will simply be a line of text in opentui.
Includes VTerm FFI bindings and registration in React, Solid, and Vue.
Here is how bash outputs looks like in opencode using these terminal renderables (only stateless for now):
Screen.Recording.2025-12-24.at.13.15.29.mov