Kitty dnd parser#13029
Conversation
Adds an OSC 72 parser following the kitty drag and drop protocol specification. Parses metadata and payload into a Command.kitty_dnd_protocol variant. Reassembly of chunked transfers and any action handling are intentionally out of scope here; stream.zig logs the command as unimplemented for now. Includes a walkthrough document covering the design and each touched file.
Trims over-commented fields and enum variants to match the repo baseline (kitty_clipboard_protocol style). Adds 11 tests covering metadata/payload parsing, all EventType values, integer keys, negative sentinels, case-sensitive key matching, and BEL terminator recording. Removes the development walkthrough document.
jcollie
left a comment
There was a problem hiding this comment.
Be nice to have some more comments but otherwise this looks good. Didn't look at the spec, only looking at the Zig code here.
|
Looks like a great starting point thank you. |
Head branch was pushed to by a user without write access
|
Just completed drag and drop into the terminal, for GTK. Yet to implement drag and drop out of the terminal. took some help from Claude again. |
bo2themax
left a comment
There was a problem hiding this comment.
I don't see any Swift or header file changes, but I'll approve it just in case it blocks the merge in the future.
jcollie
left a comment
There was a problem hiding this comment.
I'm going to have to block this PR. You were asked to submit the protocol parsing only but you've added the whole implementation as well. If you roll back the implementation changes we can get this approved, and then in a separate PR you can submit the GTK implementation.
5fb4a3d to
c488ccd
Compare
|
Rolled back to just the parser implementation. I'll make a separate PR for the GTK soon. |
(#12852)
I opened a discussion to work on the new kitty dnd protocol and implementing it for Ghostty. I was told to work on the parser but not to hook up any actions to it yet. So, that's what I did! Largely based the format on kitty_clipboard_protocol.zig, and used Claude Opus 4.8 (Claude Code) for writing tests and some structural guidance early on. Would love to get started on adding actions as well!