Commit 7c4cbe1
fix(c-generative-ui): tighten plan_tools to call ONE tool for filter/scope
"Filter to cancelled flights only" was calling all 4 tools (kpis +
trend + airlines + disruptions) and dumping the filtered result as
plaintext instead of letting the data_grid component re-render. The
per-turn plan_tools context just said "decide which tools to call" —
too permissive; gpt-5-mini defaults to refreshing everything.
Tighter rules now in the per-turn system context (not just the static
prompt file, which the model demonstrably ignores for tool-selection):
1) FILTER / SCOPE → exactly ONE tool, the one backing the affected
component, with new parameters. No spec regen.
2) STRUCTURAL → regen spec, then call only tools for NEW components.
3) QUESTION → no tools, no JSON, just prose.
Calling all four is now explicitly reserved for "refresh" / "reload" /
"update everything". Applied to both umbrella backend and standalone.
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent 22b2fd1 commit 7c4cbe1
2 files changed
Lines changed: 40 additions & 6 deletions
File tree
- cockpit
- chat/generative-ui/python/src
- langgraph/streaming/python/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| |||
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| |||
0 commit comments