Files
pgadmin4/docs/en_US
Dave Page 990b4f5e54 Fix an issue where the AI Assistant was not retaining conversation context between messages, with chat history compaction to manage token budgets.
* Address CodeRabbit review feedback for chat context and compaction.

- Track tool-use turns as groups instead of one-to-one pairs, so
  multi-tool assistant messages don't leave orphaned results.
- Add fallback to shrink the recent window when protected messages
  alone exceed the token budget, preventing compaction no-ops.
- Fix low-value test fixtures to keep transient messages short so
  they actually classify as low-importance.
- Guard Clear button against in-flight stream race conditions by
  adding a clearedRef flag and cancelling active streams.
- Assert that conversation history is actually passed through to
  chat_with_database in the "With History" test.

* Address remaining CodeRabbit review feedback for compaction module.

- Expand protected set to cover full tool groups, preventing orphaned
  tool call/result messages when a turn straddles the recent window.
- Add input validation in deserialize_history() for non-list/non-dict data.
- Strengthen test assertion for preserved recent window tail.


* Fix CI test failures in compaction and NLQ chat tests.

- Lower max_tokens budget in test_drops_low_value to reliably force
  compaction (500 was borderline, use 200).
- Consume SSE response data before asserting mock calls in NLQ chat
  test, since Flask's streaming generator only executes on iteration.


* Clarify mock patch target in NLQ chat test.

Add comment explaining why we patch the source module rather than the
use site: the endpoint uses a local import inside the function body,
so there is no module-level binding to patch.
2026-03-16 19:02:36 +05:30
..
2016-06-07 09:04:58 +01:00
2019-03-08 15:29:05 +00:00
2024-07-02 10:34:30 +05:30
2026-01-05 13:33:45 +05:30
2026-01-05 13:33:45 +05:30
2019-03-08 15:29:05 +00:00
2019-03-08 15:29:05 +00:00
2019-12-05 06:35:57 -05:00
2020-08-18 11:15:24 +01:00
2021-02-22 16:47:16 +05:30
2022-03-14 15:26:54 +00:00
2022-05-09 12:39:29 +05:30
2022-12-14 15:56:05 +05:30
2023-01-16 19:34:33 +05:30
2023-05-03 15:21:01 +05:30
2023-05-29 11:03:39 +05:30
2023-08-16 15:32:17 +05:30
2023-10-17 15:19:40 +05:30
2024-04-09 08:37:41 +05:30
2024-11-07 22:02:18 +05:30
2025-04-23 15:41:43 +05:30
2025-07-23 17:56:15 +05:30
2023-03-28 22:20:14 +05:30
2019-03-08 15:29:05 +00:00