macOS: bundle a build-time-generated Help Book#13260
Conversation
jparise
left a comment
There was a problem hiding this comment.
I think the CApi.zig side could use some work. It looks more intrusive that the feature probably warrants. Or maybe some of this code shouldn't be in CAap.zig itself.
The other pattern that could be interesting is generating the macOS help strings at build time (and producing a .plist or similar resource) and consuming it in the macOS app.
Plist generation is a good idea. I thought the changes in CApi.zig are already generating those entry in compile time. |
Or perhaps generate a Help Book directly. I haven't used that format before, though, so I'm not sure how it trades off against the control of doing something more custom and integrated. |
With this, you can now search config options, keybind actions, and cli help.
Inspired by
+explain-configand idea of HelpBook from @jparise!The diff might be overwhelming, but it doesn't affect terminals. The main part of this pr is basically HTML generation and bundling them into a .help bundle. This was first introduced in OS X and is archived, but it still works with Tips.app on macOS 27.
AI Closure
Claude implemented most of it. I just learned how help books work and did my best to let Claude document.
TBH I didn't read every line of changes in those html/css/js files, but I tested a lot of random pages; it looks good.
I did review every Zig change after a few rounds of review from different Claude sessions; I couldn't see anything bad.