gnodet-bot commented on code in PR #29906:
URL: https://github.com/apache/camel/pull/29906#discussion_r4572682010


##########
docs/user-manual/modules/ROOT/pages/camel-jbang-tui-ai.adoc:
##########
@@ -183,6 +183,25 @@ does not fix it the answer is shown as it is with a 
*Simple check* line under it
 and the error, and the AI log has the exchange. Placeholders that are not 
simple (a Maven
 `$\{camel-version}`, a shell variable) are left alone.
 
+The code blocks of an answer are checked for what does not exist: a key or an 
option the YAML DSL does
+not have (`multiplier` in a `redeliveryPolicy`, where the option is 
`backOffMultiplier`), an option the
+component of an endpoint does not have (`deleteAfterRead` on `file`), and a 
`camel.*` key that is not a
+Camel option (`camel.server.context-path`), in any block. A snippet is checked 
as a part of what it
+belongs to: a `from:` without its route, a list of steps and a single EIP as 
the steps of a route, and a
+`redeliveryPolicy:` under an `onException`. Each mistake is marked with a line 
under its code block,
+with its line in the block and the hint of the validator when it has one:
+
+[source,text]
+----
+✗ line 5: `deleteAfterRead` is not an option of the `file` component (did you 
mean `delete`?)
+----
+
+The answer is not sent back for a correction, which would cost a local model 
the whole answer again.
+The model is told of the marks, and of a simple expression it did not fix, 
with your next question, so
+its next answer does not repeat them. What a snippet leaves out on purpose is 
not marked: a required

Review Comment:
   **Doc (low):** "The model is told of the marks, and of a simple expression 
it did not fix, with your next question" — passive and heavy. Active rewrite: 
"Your next question tells the model about the marks and any simple expression 
it did not fix."
   
   ```suggestion
   Your next question tells the model about the marks and any simple expression 
it did not fix, so
   ```



##########
docs/user-manual/modules/ROOT/pages/camel-jbang-ai.adoc:
##########
@@ -59,6 +59,18 @@ With a question, the answer is the only output on stdout, so 
a script can use it
 `--show-tools` and the token usage of `--show-stats` are printed on stderr. 
`camel ask` exits with `1` when the LLM
 cannot answer, such as when it is not reachable or the call fails.
 
+The code in an answer is checked against the Camel catalog, as it is what you 
copy. An invalid simple expression gets
+the model one turn to fix it. What does not exist in the code blocks is 
printed on stderr under the answer, one

Review Comment:
   **Doc (low):** "as it is what you copy" — the causal link reads clearer with 
"because". Also, the second sentence ("What does not exist in the code blocks 
is printed...") starts with a subject-heavy passive noun phrase; active voice 
would be more direct: "Each key or option that does not exist is printed on 
stderr...".
   
   ```suggestion
   The code in an answer is checked against the Camel catalog, because it is 
what you copy. An invalid simple expression gets
   ```



-- 
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