AI Assistant: Implement new command for aiIntegration #33314
AI Assistant: Implement new command for aiIntegration #33314Raushen merged 15 commits intoDevExpress:26_1from
Conversation
…AIAssistant-aiIntegration
There was a problem hiding this comment.
Pull request overview
This PR extends the DevExtreme AI Integration surface with a new executeGridAssistant command intended to translate natural-language grid requests into structured grid actions, and introduces internal grid-side command execution scaffolding.
Changes:
- Added
executeGridAssistantto the publicAIIntegrationAPI and TypeScript declarations. - Implemented
ExecuteGridAssistantCommandwith a new prompt template and Jest coverage for prompt building / response parsing. - Introduced internal grid AI assistant command abstractions (
GridCommands, command registry, and an initialsortcommand).
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/common/ai-integration.d.ts | Adds public types + AIIntegration.executeGridAssistant method signature and associated request/response shapes. |
| packages/devextreme/js/__internal/core/ai_integration/core/prompt_manager.ts | Extends prompt template name union with executeGridAssistant. |
| packages/devextreme/js/__internal/core/ai_integration/templates/index.ts | Adds executeGridAssistant prompt template. |
| packages/devextreme/js/__internal/core/ai_integration/core/ai_integration.ts | Wires the new command into internal command registry and exposes executeGridAssistant method. |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.ts | Implements the new command (prompt data + response parsing). |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.test.ts | Adds Jest tests for the new command behavior. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/types.ts | Introduces internal types for grid assistant command handling. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/grid_commands.ts | Adds command registry, validation, and execution pipeline for grid assistant commands. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/base.ts | Defines internal grid command interface. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/index.ts | Registers default grid commands (currently sorting only). |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/sorting.ts | Implements initial sort command validation/execution. |
There was a problem hiding this comment.
Pull request overview
This PR extends the DevExtreme AI Integration infrastructure with a new executeGridAssistant command intended to power a DataGrid AI Assistant flow (controller + prompt template + command wiring), and adds the corresponding error code and tests.
Changes:
- Added a new AIIntegration command (
executeGridAssistant) with prompt template + command implementation and Jest unit tests. - Introduced a DataGrid internal controller to route assistant requests to
aiIntegration, including integration tests. - Added a new UI error code/message (
E1068) for missing AI assistant integration configuration.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/ui/widget/ui.errors.js | Adds error message E1068 for missing AI Assistant aiIntegration. |
| packages/devextreme/js/common/ai-integration.d.ts | Adds public types + method signature for executeGridAssistant and related DTOs. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/m_ai_assistant_integration_controller.ts | New controller to select AIIntegration instance and send assistant requests. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_integration_controller.integration.test.ts | Integration tests for controller behavior (fallback, abort, action hook). |
| packages/devextreme/js/__internal/core/ai_integration/templates/index.ts | Adds executeGridAssistant prompt template. |
| packages/devextreme/js/__internal/core/ai_integration/core/prompt_manager.ts | Extends PromptTemplateName union with executeGridAssistant. |
| packages/devextreme/js/__internal/core/ai_integration/core/ai_integration.ts | Registers new command name, command mapping, and public method executeGridAssistant. |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.ts | Implements the new command (prompt data + parsing). |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.test.ts | Unit tests for template usage, prompt building, parsing, and execution wiring. |
…AIAssistant-aiIntegration
There was a problem hiding this comment.
Pull request overview
This PR extends the DevExtreme AI Integration command set to support a new grid-focused “AI Assistant” workflow, adding a dedicated executeGridAssistant command end-to-end (types, templates, command implementation, and initial grid controller integration), plus tests and a new UI error code.
Changes:
- Added
executeGridAssistanttoAIIntegration(public API surface + internal command registration) with supporting request/response types. - Implemented
ExecuteGridAssistantCommandand its prompt template, plus Jest coverage. - Introduced a new grid-core
AIAssistantIntegrationControllerthat chooses the correctaiIntegrationinstance and wires request lifecycle behavior; added errorE1068.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/ts/dx.all.d.ts | Adds executeGridAssistant to the AIIntegration typings and declares related types in the global d.ts bundle. |
| packages/devextreme/js/ui/widget/ui.errors.js | Introduces error code E1068 for missing AI Assistant integration configuration. |
| packages/devextreme/js/common/ai-integration.d.ts | Adds public type declarations for executeGridAssistant params/result/response and updates the AIIntegration class declaration. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/m_ai_assistant_integration_controller.ts | New controller that resolves the appropriate AIIntegration instance and sends assistant requests with abort support. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_integration_controller.integration.test.ts | Integration tests for controller behavior (integration selection, aborting, action hook invocation). |
| packages/devextreme/js/__internal/core/ai_integration/templates/index.ts | Adds executeGridAssistant prompt template. |
| packages/devextreme/js/__internal/core/ai_integration/core/prompt_manager.ts | Extends PromptTemplateName union to include executeGridAssistant. |
| packages/devextreme/js/__internal/core/ai_integration/core/ai_integration.ts | Registers the new command and exposes executeGridAssistant on the AIIntegration class. |
| packages/devextreme/js/__internal/core/ai_integration/core/ai_integration.test.ts | Expands command-matrix test coverage to include ExecuteGridAssistantCommand. |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.ts | Implements the new command (prompt building + response parsing). |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.test.ts | Unit tests for template selection, prompt building, parsing, and execution wiring. |
| packages/devextreme-vue/src/common/index.ts | Re-exports ExecuteGridAssistantCommandResponse type through the Vue wrapper common namespace. |
| packages/devextreme-vue/src/common/ai-integration.ts | Re-exports ExecuteGridAssistantCommandResponse from devextreme/common/ai-integration. |
| packages/devextreme-react/src/common/index.ts | Re-exports ExecuteGridAssistantCommandResponse type through the React wrapper common namespace. |
| packages/devextreme-react/src/common/ai-integration.ts | Re-exports ExecuteGridAssistantCommandResponse from devextreme/common/ai-integration. |
| packages/devextreme-angular/src/index.ts | Re-exports ExecuteGridAssistantCommandResponse type from devextreme/common/ai-integration. |
| packages/devextreme-angular/src/common/index.ts | Re-exports ExecuteGridAssistantCommandResponse type through the Angular wrapper common namespace. |
| packages/devextreme-angular/src/common/ai-integration/index.ts | Re-exports ExecuteGridAssistantCommandResponse from devextreme/common/ai-integration. |
There was a problem hiding this comment.
Pull request overview
Adds a new AI Integration command (executeGridAssistant) intended for DataGrid AI Assistant scenarios, wiring it through DevExtreme’s AIIntegration command infrastructure and exposing relevant typings across wrappers.
Changes:
- Added
executeGridAssistantcommand to core AIIntegration (command registration, prompt template, command implementation). - Introduced
AIAssistantIntegrationControllerto route grid assistant requests throughaiIntegrationwith a new error code when not configured. - Extended TypeScript declarations and wrapper type re-exports for the new command response type.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/ts/dx.all.d.ts | Adds executeGridAssistant method + related types to the bundled d.ts. |
| packages/devextreme/js/ui/widget/ui.errors.js | Adds new error code E1068 for missing AI Assistant integration. |
| packages/devextreme/js/common/ai-integration.d.ts | Adds public types for executeGridAssistant params/response/result/action + method signature. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/m_ai_assistant_integration_controller.ts | New controller that selects the integration instance and sends assistant requests. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_integration_controller.integration.test.ts | Integration tests for controller behavior and option fallback logic. |
| packages/devextreme/js/__internal/core/ai_integration/templates/index.ts | Adds executeGridAssistant prompt template. |
| packages/devextreme/js/__internal/core/ai_integration/core/prompt_manager.ts | Registers executeGridAssistant as a valid template name. |
| packages/devextreme/js/__internal/core/ai_integration/core/ai_integration.ts | Registers the new command and exposes AIIntegration.executeGridAssistant. |
| packages/devextreme/js/__internal/core/ai_integration/core/ai_integration.test.ts | Extends command dispatch tests with the new command. |
| packages/devextreme/js/__internal/core/ai_integration/commands/index.ts | Exports the new command from the commands barrel. |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.ts | Implements prompt building and response parsing for the new command. |
| packages/devextreme/js/__internal/core/ai_integration/commands/executeGridAssistant.test.ts | Unit tests for the new command. |
| packages/devextreme-vue/src/common/index.ts | Re-exports the new command response type in Vue wrapper. |
| packages/devextreme-vue/src/common/ai-integration.ts | Re-exports the new command response type in Vue wrapper. |
| packages/devextreme-react/src/common/index.ts | Re-exports the new command response type in React wrapper. |
| packages/devextreme-react/src/common/ai-integration.ts | Re-exports the new command response type in React wrapper. |
| packages/devextreme-angular/src/index.ts | Re-exports the new command response type in Angular wrapper public index. |
| packages/devextreme-angular/src/common/index.ts | Re-exports the new command response type in Angular wrapper common index. |
| packages/devextreme-angular/src/common/ai-integration/index.ts | Re-exports the new command response type in Angular wrapper AI integration index. |
…AIAssistant-aiIntegration
|
|
||
| const controller = await createController({ | ||
| aiAssistant: { enabled: true, aiIntegration }, | ||
| onAIAssistantRequestCreating: (e: { cancel: boolean }): void => { |
There was a problem hiding this comment.
Please, add todo or create card to use real type when dts is ready
No description provided.