Repository navigation
Conversation
Fixes ghostty-org#14843 A query action (a=q) with the "e" key set asks which of its keys are supported for the action named by "e", so that clients can detect features such as Unicode placeholders without hardcoding a list of terminals. The reply echoes "e" and every supported non-default key: <ESC>_Ga=q,i=31,e=T,U=1<ESC>\ -> <ESC>_Gi=31,e=T,U=1;OK<ESC>\ A feature query loads nothing, ignores its payload, and leaves any chunked load in progress alone. An unknown action gets a plain OK. Mediums and PNG are only reported when they would actually work: t=f, t=t and t=s follow the image limits (and the target for shared memory), and f=100 requires a PNG decoder. https://sw.kovidgoyal.net/kitty/graphics-protocol/#querying-support-for-protocol-features
68ae0fa to
462d6d3
Compare
vancluever
left a comment
There was a problem hiding this comment.
I looked over the code and I didn't see anything that stood out per se, but I want to refer this to @mitchellh to do a once-over as I haven't really been keeping up on the kitty graphics/unicode placeholder stuff. Do we have a way to test this though with say a tool that would otherwise fail if the inability to do the query doesn't exist?
Support for querying is very new, even in Kitty. The only client (other than something in Kitty) that I know of is the discord client that the original discussion was about. I could certainly whip something up, but that wouldn't really reflect "real world" usage. |
Fixes #14843
A query action (a=q) with the "e" key set asks which of its keys are supported for the action named by "e", so that clients can detect features such as Unicode placeholders without hardcoding a list of terminals. The reply echoes "e" and every supported non-default key:
A feature query loads nothing, ignores its payload, and leaves any chunked load in progress alone. An unknown action gets a plain OK.
Mediums and PNG are only reported when they would actually work: t=f, t=t and t=s follow the image limits (and the target for shared memory), and f=100 requires a PNG decoder.
https://sw.kovidgoyal.net/kitty/graphics-protocol/#querying-support-for-protocol-features
AI disclosure: Claude Code was used in the preparation of this PR.