Commit f9fde32
fix(chat): scope tool-call rendering per-message + style genui demo views (#446)
* fix(chat): scope chat-tool-calls to its message via toolCallIds
chat-tool-calls.toolCalls fell back to the agent's GLOBAL toolCalls
list whenever the message had string content — which is the LangGraph
adapter's default (extractTextContent always reduces complex content
to a string). Every AI bubble in a thread re-rendered the entire
thread's tool calls; with 3 AI messages and 4 tool calls, the chat
showed 3 identical tool-call blocks.
Fix: add `Message.toolCallIds?: string[]` populated by the LangGraph
adapter from raw `tool_calls[].id`. chat-tool-calls prefers this
per-message list when present; the legacy Anthropic-style content-block
path stays as a fallback; the global-list fallback now fires ONLY when
no message context is provided at all.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* style(c-generative-ui): replace Tailwind classes with scoped CSS
The cockpit-chat-generative-ui-angular app doesn't have Tailwind
configured — styles.css only imports theme tokens. All Tailwind
classes (rounded-lg, border-white/10, bg-white/5, flex, gap-6, etc.)
were silently no-ops, rendering stat cards as bare stacked text and
charts/tables without their card chrome.
Convert all 6 view components to scoped Angular styles (or styleUrls)
using raw CSS:
- stat-card: card chrome, uppercase tracked label, large value,
colored delta (green for up, red for down via data-trend attr)
- bar-chart + line-chart: card chrome, gradient fills, gridlines,
consistent axis-label and title styling
- line-chart: area-fill path under the line via SVG path d=
- data-grid: card chrome, uppercase header row, zebra striping,
tabular-nums, horizontal scroll for narrow widths
- dashboard-grid: vertical flex stack, 16px gap
- container: CSS grid with row direction = equal columns based on
child count, collapses to 2-col then 1-col at responsive breakpoints
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(c-generative-ui): update view specs for new attribute-based styling
* chore(docs): regenerate api docs
* fix(e2e): toolbar field locators use stable data-field attributes
PR #444 dropped visible label text from the demo shell toolbar to tighten
the layout, but the examples/chat e2e helpers used `.filter({ hasText:
label })` to find the four toolbar fields (Model, Effort, Gen UI, Theme)
— with labels gone, ~5 tests failed on every CI run since #444 merged.
Add `data-field` attributes to the four `.demo-shell__field` wrappers
and switch the e2e helpers + the one inlined locator in
model-picker.spec.ts to query by attribute. Helper signatures unchanged
(label arg now maps to data-field via a small lookup table) so call
sites in control-palette, color-scheme, model-picker, etc. need no
changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent 48e5c40 commit f9fde32
16 files changed
Lines changed: 398 additions & 87 deletions
File tree
- apps/website/content/docs/chat/api
- cockpit/chat/generative-ui/angular/src/app/views
- examples/chat/angular
- e2e
- src/app/shell
- libs
- chat/src/lib
- agent
- primitives/chat-tool-calls
- langgraph/src/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5873 | 5873 | | |
5874 | 5874 | | |
5875 | 5875 | | |
| 5876 | + | |
| 5877 | + | |
| 5878 | + | |
| 5879 | + | |
| 5880 | + | |
| 5881 | + | |
5876 | 5882 | | |
5877 | 5883 | | |
5878 | 5884 | | |
| |||
Lines changed: 81 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
14 | 29 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
21 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
22 | 61 | | |
23 | 62 | | |
24 | 63 | | |
25 | 64 | | |
26 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
27 | 96 | | |
28 | 97 | | |
29 | 98 | | |
| |||
32 | 101 | | |
33 | 102 | | |
34 | 103 | | |
35 | | - | |
36 | | - | |
| 104 | + | |
| 105 | + | |
37 | 106 | | |
38 | 107 | | |
39 | 108 | | |
| |||
46 | 115 | | |
47 | 116 | | |
48 | 117 | | |
49 | | - | |
| 118 | + | |
50 | 119 | | |
51 | 120 | | |
52 | 121 | | |
| |||
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 51 | + | |
| 52 | + | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| |||
Lines changed: 26 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
17 | 41 | | |
18 | 42 | | |
19 | 43 | | |
20 | 44 | | |
21 | 45 | | |
22 | 46 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 47 | + | |
28 | 48 | | |
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
17 | 27 | | |
18 | 28 | | |
19 | 29 | | |
| |||
Lines changed: 70 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
26 | 19 | | |
27 | | - | |
| 20 | + | |
28 | 21 | | |
29 | 22 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
37 | 90 | | |
38 | 91 | | |
39 | 92 | | |
| |||
0 commit comments