davsclaus opened a new pull request, #27218:
URL: https://github.com/apache/camel/pull/27218

   CAMEL-25040 gave a **component** the start of its documentation page, 
because an option list can only say what can be *set* and syntax that is not an 
option is invisible in it. That change was scoped to components. The `semantic` 
language, new and Preview in 4.23, shows what the scoping costs.
   
   What `camel_catalog_doc(name=semantic, kind=language)` returned before:
   
   ```
   title, description, groupId/artifactId, since, supportLevel
   options: id, language, expression   (+2 omitted)
   ```
   
   Not one of `question`, `instructions`, `criteria` or `threshold` — which is 
everything a route actually has to write. The page has all of it (29,406 
characters), but only under `includeDoc=true`, which is off by default and 
which an author who does not already know the answer has no reason to ask for.
   
   `languageDoc` and `dataFormatDoc` now carry the excerpt as `componentDoc` 
does, with a larger budget — 3600 against a component's 1400 — because a 
component says most of what it does through its options and these say it in 
prose. At that size the `semantic` answer reaches the YAML of a named question:
   
   ```yaml
   - semantic:
       question:
         department:
           type: choice
           instructions: Which department should handle this message?
           criteria:
             billing: Invoices, payments and refunds
         actionable:
           type: boolean
           threshold: 0.8
   ```
   
   …and the `choice` that routes on the result. `simple` gets its quick 
example, `jsonpath` its syntax.
   
   Two details:
   
   - **A sub-page or the whole page is not also excerpted.** 
`docPage=functions` returns that page as text and `includeDoc=true` returns all 
of it; neither wants the start of it repeated.
   - **AsciiDoc line comments are dropped outside a fence.** `jsonpath` opened 
its excerpt with `// language options: START` / `END` around a generated table, 
spending budget on markers. Inside a fence a `//` is code and stays.
   
   Tests: `CatalogDocExcerptTest` gains four cases — the semantic language 
carries the four words its options cannot say; a data format carries an excerpt 
with no `include::` left in it; a sub-page and `includeDoc` are not also 
excerpted; and line comments are dropped outside a fence but kept inside one. 
394 tests of the `ai` package green, plus a full reactor build.
   
   The check on whether the excerpt carries *enough* is 
https://zinebbendhiba.com/posts/system-one-models-in-java-camel-s-semantic-language-and-langchain4j-s-decision-api/
 — a worked route with `threshold` and `${variable.decisions[...]}`; the 
excerpt now reaches both halves of that pattern.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to