davsclaus opened a new pull request, #29364: URL: https://github.com/apache/camel/pull/29364
[CAMEL-26702](https://issues.apache.org/jira/browse/CAMEL-26702): explain with AI on the chaos screen, an experiment to try out. The chaos screen shows what a rule does live, but not what that means, and someone who adds "Downstream returns an error" wants to know what the fault simulated and how the routes coped. **Chaos screen, Shift+F8 on the selected rule:** the AI panel opens with a question built from the rule's live state (`ChaosAiPrompt.of`): - the rule; - how often it fired, and its rate against the rule's own; - the effect (recovered, handled, failed, in flight); - the expectation and its outcome; - the messages lost at the dead letter channel; - the last 5 recent faults; - the counts of the routes those faults were in. The question asks the AI to say in plain words what the fault simulates, what the routes did with it, and whether a message was lost. Then it asks for suggestions to make the routes cope (redelivery with a delay, an idempotent consumer, a circuit breaker, a timeout), with changes made via `camel_edit_file` only when the user agrees. It points to `camel_runtime_chaos_report` for the full report. **Errors tab, Shift+F8 on an error marked 🎲:** "explain with AI" replaces "fix with AI", and the footer says so. The question (`ChaosAiPrompt.ofError`) says the error was injected on purpose by the rule, gives the exception, route, step and whether it was handled, adds the rule's state, and tells the AI not to treat it as a bug. Fix with AI is unchanged for every other error. As with Fix with AI, the question goes into the AI panel's input, so the user sends it with Enter or changes it first. **Plumbing:** - `MonitorContext.AskAi.ask(String)` opens the AI panel with a question a screen made. - `explainLogError` now defaults to it, which keeps `CamelMonitor` at its size cap. - The chaos and errors help pages describe the key. **Tests:** `ChaosAiPromptTest` covers the question's content, Shift+F8 and the footer hint on both tabs. All 2339 TUI module tests pass (1 skipped). _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS -- 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]
