Class AiCodeBlockLanguage

java.lang.Object
io.jmix.aichat.kit.component.codeblock.AiCodeBlockLanguage

public final class AiCodeBlockLanguage extends Object
Language ids for AiCodeBlock#setLanguage(String), so the common ones do not have to be spelled from memory.

The set is not exhaustive and is not a contract: the language is a plain String everywhere it is used, any other value remains valid, and which values actually highlight is decided by the client highlighter rather than by this class. The ids here are the conventional fence-info spellings, which the built-in highlight.js highlighter accepts and which also read well in the block's toolbar label, since the same value is displayed there verbatim.

A constant added here must be added in two more places. The codeLanguageType enumeration in ui.xsd restates the ids, because a schema resource cannot reference Java; AiCodeBlockLanguageSchemaTest asserts the two agree. The language property options in StudioAiChatComponents do reference these constants, so a typo there is impossible, but a missing entry cannot be caught: @StudioProperty declares no @Retention, so it defaults to CLASS and no test can read the annotation. This note is the only enforcement that half has.