Files
gitbook/packages
Zeno Kapitein 581eabe383 Add Custom language option to OpenAPI code samples
OpenAPI code-sample blocks now show a language icon next to every option and add a "Custom language" entry that opens the assistant pre-filled (as a draft, not sent) with the current request staged as a reference and the prompt "Rewrite this in the following language: ", letting readers rewrite the request in any language.

- react-openapi: new OpenAPICodeSampleAssistant context the host app fills in; the selector renders per-language icons and the Custom action item (OpenAPISelect gains an action/onAction concept so it fires without changing the selection). Adds getCodeSampleIcon to the render context and 3 translation keys across all locales.
- gitbook: new setDraft controller method + inputDraft state so the chat input can be pre-filled without sending; OpenAPICodeSampleAIProvider bridges the GitBook assistant (logo, name, reference + draft action) into react-openapi, mounted once in SpaceLayout (covers site and embed); maps languages to icons.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:29:12 +02:00
..
2026-02-25 11:37:48 +01:00
2026-05-19 13:24:41 +02:00
2025-10-15 13:30:24 +02:00
2026-06-12 14:55:55 +02:00
2026-05-19 13:24:41 +02:00
2026-03-31 17:01:13 +02:00