Skip to content

Revert "Demos: DataGrid/TreeList aicolumn - handle inline module"#33674

Open
mpreyskurantov wants to merge 1 commit into
26_1from
revert-33639-26_1_csp-aicolumn
Open

Revert "Demos: DataGrid/TreeList aicolumn - handle inline module"#33674
mpreyskurantov wants to merge 1 commit into
26_1from
revert-33639-26_1_csp-aicolumn

Conversation

@mpreyskurantov
Copy link
Copy Markdown
Contributor

Reverts #33639

@mpreyskurantov mpreyskurantov requested a review from a team as a code owner May 22, 2026 07:30
Copilot AI review requested due to automatic review settings May 22, 2026 07:30
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

Reverts prior changes that moved OpenAI SDK loading into the jQuery index.js ES modules for AI demos, restoring the pattern where the SDK is imported via an inline <script type="module"> in the HTML and exposed on window for classic scripts to use.

Changes:

  • Added inline module imports (from https://esm.sh/openai@4.73.1) in jQuery demo HTML files and switched index.js back to a classic script (no top-level ESM import).
  • Updated the CSP demo allowlist to permit inline module scripts ('unsafe-inline') for DataGrid/AIColumns and TreeList/AIColumns.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/demos/utils/server/csp-server.js Allows inline module scripts for AIColumns demos under the CSP test server.
apps/demos/Demos/TreeList/AIColumns/jQuery/index.js Removes ESM import and relies on window.AzureOpenAI.
apps/demos/Demos/TreeList/AIColumns/jQuery/index.html Adds inline module import and switches index.js to classic script.
apps/demos/Demos/DataGrid/AIColumns/jQuery/index.js Removes ESM import and relies on window.AzureOpenAI.
apps/demos/Demos/DataGrid/AIColumns/jQuery/index.html Adds inline module import and switches index.js to classic script.
apps/demos/Demos/DataGrid/AIAssistant/jQuery/index.js Removes ESM import and relies on window.AzureOpenAI.
apps/demos/Demos/DataGrid/AIAssistant/jQuery/index.html Adds inline module import and switches index.js to classic script.

Comment on lines +12 to +16
<script type="module">
import { AzureOpenAI } from "https://esm.sh/openai@4.73.1";

window.AzureOpenAI = AzureOpenAI;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants