Skip to content

AI Assistant: Implement new command for aiIntegration #33314

Merged
Raushen merged 15 commits intoDevExpress:26_1from
Raushen:AIAssistant-aiIntegration
Apr 21, 2026
Merged

AI Assistant: Implement new command for aiIntegration #33314
Raushen merged 15 commits intoDevExpress:26_1from
Raushen:AIAssistant-aiIntegration

Conversation

@Raushen
Copy link
Copy Markdown
Contributor

@Raushen Raushen commented Apr 16, 2026

No description provided.

@Raushen Raushen self-assigned this Apr 16, 2026
Copilot AI review requested due to automatic review settings April 16, 2026 12:09
@Raushen Raushen requested a review from a team as a code owner April 16, 2026 12:09
@Raushen Raushen added WIP Work in progress 26_1 labels Apr 16, 2026
@github-actions github-actions Bot added the .d.ts label Apr 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 executeGridAssistant to the public AIIntegration API and TypeScript declarations.
  • Implemented ExecuteGridAssistantCommand with a new prompt template and Jest coverage for prompt building / response parsing.
  • Introduced internal grid AI assistant command abstractions (GridCommands, command registry, and an initial sort command).

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.

Comment thread packages/devextreme/js/__internal/grids/grid_core/ai_assistant/types.ts Outdated
Comment thread packages/devextreme/js/__internal/grids/grid_core/ai_assistant/grid_commands.ts Outdated
@Raushen Raushen changed the title Ai assistant ai integration AI Assistant: Implement new command for aiIntegration Apr 17, 2026
@Raushen Raushen removed the WIP Work in progress label Apr 17, 2026
Copilot AI review requested due to automatic review settings April 17, 2026 03:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI review requested due to automatic review settings April 17, 2026 09:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 executeGridAssistant to AIIntegration (public API surface + internal command registration) with supporting request/response types.
  • Implemented ExecuteGridAssistantCommand and its prompt template, plus Jest coverage.
  • Introduced a new grid-core AIAssistantIntegrationController that chooses the correct aiIntegration instance and wires request lifecycle behavior; added error E1068.

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.

Copilot AI review requested due to automatic review settings April 17, 2026 12:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 executeGridAssistant command to core AIIntegration (command registration, prompt template, command implementation).
  • Introduced AIAssistantIntegrationController to route grid assistant requests through aiIntegration with 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.

Comment thread packages/devextreme/js/__internal/core/ai_integration/core/ai_integration.test.ts Outdated

const controller = await createController({
aiAssistant: { enabled: true, aiIntegration },
onAIAssistantRequestCreating: (e: { cancel: boolean }): void => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add todo or create card to use real type when dts is ready

@Raushen Raushen merged commit d02efd5 into DevExpress:26_1 Apr 21, 2026
103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants