mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-15 10:21:58 +00:00
This adds all the core logic and tests for the full Kitty Clipboard protocol in the `src/terminal` package. This is purposefully shaped similarly to the way we organize Kitty graphics. There is an umbrella `clipboard.zig` and then a bunch of leaf zig files that cover: request parsing, response encoding, state management, etc. I think that worked really well for Kitty graphics so we're doing it here too. The core logic covers every part of the protocol: read and write. The only thing hooked up to the end user is a DECRQM for mode 5522 will return unset. And it can't be set currently (since it never works yet). Outside of that, nothing in this diff is actually used in the real binary. **AI usage:** Validation against the spec and Kitty impl, test writing and coverage validation, of course some code writing but within the broad organizational shape I defined. I went through and either rewrote or wrote all the comments myself plus this PR message.