✨AI Column: Methods and handlers#31275
Conversation
…olumn-Properrties-Part1 # Conflicts: # packages/devextreme/js/__internal/grids/grid_core/ai_column/ai_column.integration.test.ts # packages/devextreme/js/__internal/grids/grid_core/ai_column/m_ai_column_controller.ts # packages/devextreme/js/__internal/grids/grid_core/ai_column/m_ai_column_integration_controller.ts
…olumn-Properrties-Part1
|
lgtm |
|
LGTM |
|
Lgtm |
|
|
||
| return { | ||
| data, | ||
| additionalInfo: response.additionalInfo, |
There was a problem hiding this comment.
Shouldn't 'response.additionalInfo' be parsed too?
There was a problem hiding this comment.
We expected this field will be read-to-use in the onAIColumnResponseReceived handler as its value came not from AI, but from an endpoint. So yes, it was planned it is already dictionary.
However we gonna to avoid using this handler and prefer do all necessary operations on the aiIntegration.sendRequest level. In the future there will be a task removing this field.
There was a problem hiding this comment.
Pull Request Overview
This PR implements core methods and handlers for the AI Column feature in the DevExtreme DataGrid, focusing on request management, caching, and event handling.
Key Changes:
- Added
abortRequest,sendRequest, and refresh methods with per-column tracking - Implemented
onAIColumnRequestCreatingandonAIColumnResponseReceivedevent handlers - Added caching logic to avoid redundant AI requests for already-processed data
Reviewed Changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
m_toast_view.ts |
Improved toast component creation and positioning configuration |
m_data_controller.ts |
Exported UserData type for use in AI column utilities |
m_columns_controller.ts |
Added getColumnByName helper method for column lookup |
utils.ts |
Created utility functions for data extraction and cache filtering |
utils.test.ts |
Added comprehensive unit tests for utility functions |
m_ai_column_view.ts |
Updated abort calls to include column name parameter |
m_ai_column_integration_controller.ts |
Implemented request lifecycle management with caching and event handlers |
m_ai_column_controller_utils.ts |
Deleted (functionality moved to utils.ts) |
m_ai_column_controller.ts |
Refactored to use integration controller for request handling |
m_ai_column_cache_controller.ts |
Updated return type to non-nullable empty object |
ai_column.integration.test.ts |
Added extensive integration tests for API methods and event handlers |
generateGridColumn.ts |
Enhanced response parsing to handle both string and object responses |
dependencies.ts |
Added 'toast' dependency to datagrid and gantt components |
DevExpress#31425) Co-authored-by: Alyar <>
Co-authored-by: Alyar <>
No description provided.