You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/09/21 10:49:00 UTC
[jira] [Created] (CAMEL-24874) camel-jbang - TUI AI: teach local models the simple init block and chain operator ($init{ }init$, ~:=, ~>)
Claus Ibsen created CAMEL-24874:
-----------------------------------
Summary: camel-jbang - TUI AI: teach local models the simple init block and chain operator ($init{ }init$, ~:=, ~>)
Key: CAMEL-24874
URL: https://issues.apache.org/jira/browse/CAMEL-24874
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
The simple language gained init blocks with local custom functions ({{$init{ $cleanName ~:= ${trim()} ~> ${uppercase()}; }init$}}) and the chain operator {{~>}} (see https://camel.apache.org/blog/2026/09/camel-simple-customfunction/). These tokens are new (not in any model's training data) and have no analogue in other languages, so a small local model driving the TUI AI panel is expected to write {{->}}, {{|>}} or {{:=}} instead, put the operator inside the {{${}}} placeholder (as observed with {{?:}}), or forget the {{}init$}} terminator or the trailing {{;}}.
Proposed:
* extend the simple syntax primer ({{TuiToolRegistry.SIMPLE_SYNTAX}}) with a one-line rule and example for {{$init{ }init$}}, {{~:=}} and {{~>}}
* extend {{AnswerChecks}} (CAMEL-24805) so these mistakes are detected in the answer and the model gets its one correction turn
* make sure {{camel_catalog_doc}} / {{tui_catalog_doc}} serve the init block and chain operator section of simple-advanced when asked
The prompt budget is nearly full ({{AiPanelPromptBudgetTest}}), so this needs trimming elsewhere or a raised budget in the same change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)