davsclaus opened a new pull request, #30523: URL: https://github.com/apache/camel/pull/30523
_Claude Code on behalf of Claus Ibsen_ **Stacked on #30522** (it builds on its `GenAiTranscript` and changes the same detail panel). Only the last commit belongs to this PR. Because its base is not `main`, the "Build and test" workflow does not run here; the local run is below. I'll retarget it to `main` once #30522 is merged. ## What Last part of [CAMEL-27135](https://issues.apache.org/jira/browse/CAMEL-27135), after #30521 (the AI usage view) and #30522 (`t` shows the conversation). From GenAI observability level `detailed` (CAMEL-27131), an agent run is an `invoke_agent` span with a span per model call and per tool call. Until now the Spans waterfall showed them by span name only. - **`GenAiSpanView`** labels GenAI spans in the waterfall, each in its own colour: - `◆ agent support-agent · llama3.2`: an agent run, with its name and model - `● chat llama3.2 · 196→15 · tool_calls`: a model call, with its model, input→output tokens and finish reason - `⚙ tool lookupOrder {"orderId":"A-17"}`: a tool call, with its name and, at level `full`, its arguments on one line - **The detail panel of an agent run** shows: - its model and provider, and the conversation id when one is recorded - its model and tool calls, and the tokens (input, output, cached) - how its time splits into model calls, tool calls and the rest - the steps one by one, with time, tokens and finish reason The steps of an agent run nested in a tool call stay with that run. - **Display width:** the waterfall now pads and cuts its labels with `CharWidth`, as TamboUI's AGENTS.md asks, because a symbol, a CJK route name or an emoji can take two cells. Before this change, the GenAI rows started their bars one column to the right of the other rows. ## Tried live A camel-openai agent on Ollama (`llama3.2`) with one `ai-tool` route tool, run at `camel.aiObservability.level=full`. Ollama reports its prompt-cache hits, so the cached tokens are real:  ## Tests - `GenAiSpanViewTest`: - the labels of an agent run, a model call (with and without a known model) and a tool call - tool arguments are cut by display width, and a CJK character, a flag and a ZWJ emoji are never split - the steps of a run in order: a tool call whose route spans nest under it, a model call under a Camel span, and a nested run whose steps are left out - the totals and the lines of the detail panel - `SpansTabRenderTest`: the labels and summary in the waterfall, and all bars starting in one column with GenAI symbols, a CJK route, a flag and a ZWJ emoji - `camel-jbang-plugin-tui`, run locally: all tests pass (2654 before the width fix; `GenAiSpanViewTest` and `SpansTabRenderTest` again after it) Docs: the Spans section of `camel-jbang-tui-observe.adoc` (with the screenshot) and the Spans help page of the TUI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
