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 11:22:00 UTC

[jira] [Commented] (CAMEL-24874) camel-core-languages - catalog: add the simple init block operators := and ~:= (simple.json) and fix the init block doc section

    [ https://issues.apache.org/jira/browse/CAMEL-24874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117691#comment-18117691 ] 

Claus Ibsen commented on CAMEL-24874:
-------------------------------------

PR: https://github.com/apache/camel/pull/26680

_Claude Code on behalf of davsclaus_

> camel-core-languages - catalog: add the simple init block operators := and ~:= (simple.json) and fix the init block doc section
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24874
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24874
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>
> The simple language gained init blocks with local variables ({{$name := <exp>;}}), local custom functions ({{$name ~:= ${trim()} ~> ${uppercase()};}}) and the chain operator {{~>}} (see https://camel.apache.org/blog/2026/09/camel-simple-customfunction/). The catalog ({{simple.json}}, generated from {{SimpleOperatorConstants}}) has {{~>}} and {{?~>}} with examples, but no operator entry for {{:=}} and {{~:=}}, so nothing that reads the catalog knows they exist: {{camel_catalog_doc simple}} / {{tui_catalog_doc}} (function and operator lists, {{optionsFilter}}), the generated JS validator, the MCP server and any external agent that fetches the catalog. The docs are the only place, and {{docPage=advanced}} is the whole 24 KB simple-advanced page.
> Scope:
> * add {{:=}} and {{~:=}} as operators with description, syntax and examples in {{SimpleOperatorConstants}} (kind {{init}}), regenerate the catalog
> * fix the init block section of simple-advanced.adoc: the unfinished sentence 'You can also declare custom functions using', 'a lso', '$nane'
> Out of scope (decided 2026-09-21): an always-on primer line in the TUI system prompt / {{CatalogDocs.SIMPLE_SYNTAX}} and special-casing of init blocks in {{AnswerChecks}}. These cost tokens on every turn for every user for a feature a local-model user asks for rarely, and there is no observed local-model failure with init blocks yet; the catalog entry is fetched only when asked. Revisit if a transcript shows the failure. The validator gap for multi-line simple expressions is CAMEL-24875.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)