Revert "Demos: DataGrid/TreeList aicolumn - handle inline module"#33674
Open
mpreyskurantov wants to merge 1 commit into
Open
Revert "Demos: DataGrid/TreeList aicolumn - handle inline module"#33674mpreyskurantov wants to merge 1 commit into
mpreyskurantov wants to merge 1 commit into
Conversation
)" This reverts commit 926b263.
Contributor
There was a problem hiding this comment.
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 switchedindex.jsback to a classic script (no top-level ESM import). - Updated the CSP demo allowlist to permit inline module scripts (
'unsafe-inline') forDataGrid/AIColumnsandTreeList/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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #33639