davsclaus commented on code in PR #25491:
URL: https://github.com/apache/camel/pull/25491#discussion_r3782058287
##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java:
##########
@@ -1482,6 +1518,45 @@ private void renderStats(Frame frame, Rect area) {
}
}
+ private List<AiUsageEntry> combinedUsageEntries() {
+ List<AiUsageEntry> combined = new ArrayList<>(usageHistory.size() + 8);
+ combined.addAll(usageHistory);
+ List<SpanEntry> spans = otelSpans.get();
+ if (spans != null && !spans.isEmpty()) {
+ combined.addAll(GenAiSpanUsageExtractor.extract(spans));
+ }
+ return combined;
+ }
+
+ private static String modelTableKey(AiUsageEntry entry) {
+ String modelProvider = entry.model() + " (" + entry.provider() + ")";
+ if (entry.source() == AiUsageSource.ROUTE) {
+ String route = entry.routeId() != null &&
!entry.routeId().isBlank() ? entry.routeId() : "route";
+ return "[route:" + route + "] " + modelProvider;
+ }
+ return "[tui] " + modelProvider;
+ }
+
Review Comment:
Fixed — removed the duplicate `isStatsViewForTesting()` method and updated
`CamelMonitor` and the test to use `isStatsView()` instead.
_Claude Code on behalf of @davsclaus_
##########
dsl/camel-jbang/camel-jbang-plugin-tui/pom.xml:
##########
@@ -41,6 +41,11 @@
</properties>
<dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-ai-observability-api</artifactId>
Review Comment:
Fixed — added the missing
`<artifactId>camel-ai-observability-api</artifactId>` and removed the
unnecessary `<version>` element (BOM-managed).
_Claude Code on behalf of @davsclaus_
--
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]