-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Adds CodeTour to the RAG JS and TS templates (#11953)
* Adds CodeTour to the RAG JS template * Adds CodeTour for the TS sample Updates readme with a link to the Graph connector sample * Adds CodeTour as a recommended extension
- Loading branch information
1 parent
41e4cb8
commit 3be35d7
Showing
6 changed files
with
174 additions
and
2 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
templates/js/custom-copilot-rag-microsoft365/.tours/load-data-from-graph-connector.tour
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"$schema": "https://aka.ms/codetour-schema", | ||
"title": "Load data from Graph connector", | ||
"steps": [ | ||
{ | ||
"file": "aad.manifest.json", | ||
"description": "### Update Entra app manifest\n\nChange the permission to be able to read external items. This is necessary to grant your app access to external items imported to Microsoft 365 by the Microsoft Graph connector. Change the permission to:\n\n```text\nExternalItem.Read.All\n```", | ||
"line": 24, | ||
"selection": { | ||
"start": { | ||
"line": 24, | ||
"character": 28 | ||
}, | ||
"end": { | ||
"line": 24, | ||
"character": 42 | ||
} | ||
}, | ||
"title": "Update Entra app manifest" | ||
}, | ||
{ | ||
"file": "src/app/app.js", | ||
"description": "### Update default scopes\n\nUpdate the scopes that the Microsoft Graph client should request when connecting to Microsoft Graph. This is necessary for your app to be able to read external items imported by the Graph connector. Change the permission to:\n\n```text\nExternalItem.Read.All\n```", | ||
"line": 41, | ||
"selection": { | ||
"start": { | ||
"line": 41, | ||
"character": 19 | ||
}, | ||
"end": { | ||
"line": 41, | ||
"character": 33 | ||
} | ||
}, | ||
"title": "Update Entra app permissions" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.js", | ||
"description": "### Update entity type\n\nUpdate entity type to search for external items. This instructs Microsoft Search to only search for items of type `externalItem` which represents external items ingested by Graph connectors. Change the code to:\n\n```text\nexternalItem\n```", | ||
"line": 42, | ||
"selection": { | ||
"start": { | ||
"line": 42, | ||
"character": 32 | ||
}, | ||
"end": { | ||
"line": 42, | ||
"character": 41 | ||
} | ||
}, | ||
"title": "Update entity type" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.js", | ||
"description": "### Define content source\n\nDefine the name of your external connection. This scopes the search result to only include results from the specified external connection. Add the snippet and replace `myconnection` with your connection name:\n\n```json\n contentSources: [\n '/external/connections/myconnection'\n ],\n\n```", | ||
"line": 43, | ||
"title": "Define content source" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.js", | ||
"description": "### Update download code\n\nUpdate the code to download external item's contents:\n\n```javascript\n const rawContent = await this\n .downloadExternalContent(result.resource.properties.substrateContentDomainId);\n```\n", | ||
"line": 70, | ||
"selection": { | ||
"start": { | ||
"line": 68, | ||
"character": 1 | ||
}, | ||
"end": { | ||
"line": 70, | ||
"character": 15 | ||
} | ||
}, | ||
"title": "Update code to download external item's contents" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.js", | ||
"description": "### Define download content method\n\nDefine new method to retrieve external item's contents. Update `myconnection` with your connection's name:\n\n```javascript\n\n async downloadExternalContent(externalItemFullId) {\n const externalItemId = externalItemFullId.split(',')[1];\n const externalItem = await this.graphClient\n .api(`/external/connections/myconnection/items/${externalItemId}`)\n .get();\n return externalItem.content.value;\n }\n\n```\n", | ||
"line": 93, | ||
"title": "Define method to download external item's contents" | ||
} | ||
] | ||
} |
3 changes: 2 additions & 1 deletion
3
templates/js/custom-copilot-rag-microsoft365/.vscode/extensions.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"TeamsDevApp.ms-teams-vscode-extension" | ||
"TeamsDevApp.ms-teams-vscode-extension", | ||
"vsls-contrib.codetour" | ||
] | ||
} |
This file contains 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
82 changes: 82 additions & 0 deletions
82
templates/ts/custom-copilot-rag-microsoft365/.tours/load-data-from-graph-connector.tour
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"$schema": "https://aka.ms/codetour-schema", | ||
"title": "Load data from Graph connector", | ||
"steps": [ | ||
{ | ||
"file": "aad.manifest.json", | ||
"description": "### Update Entra app manifest\n\nChange the permission to be able to read external items. This is necessary to grant your app access to external items imported to Microsoft 365 by the Microsoft Graph connector. Change the permission to:\n\n```text\nExternalItem.Read.All\n```", | ||
"line": 24, | ||
"selection": { | ||
"start": { | ||
"line": 24, | ||
"character": 28 | ||
}, | ||
"end": { | ||
"line": 24, | ||
"character": 42 | ||
} | ||
}, | ||
"title": "Update Entra app manifest" | ||
}, | ||
{ | ||
"file": "src/app/app.ts", | ||
"description": "### Update default scopes\n\nUpdate the scopes that the Microsoft Graph client should request when connecting to Microsoft Graph. This is necessary for your app to be able to read external items imported by the Graph connector. Change the permission to:\n\n```text\nExternalItem.Read.All\n```", | ||
"line": 41, | ||
"selection": { | ||
"start": { | ||
"line": 41, | ||
"character": 19 | ||
}, | ||
"end": { | ||
"line": 41, | ||
"character": 33 | ||
} | ||
}, | ||
"title": "Update Entra app permissions" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.ts", | ||
"description": "### Update entity type\n\nUpdate entity type to search for external items. This instructs Microsoft Search to only search for items of type `externalItem` which represents external items ingested by Graph connectors. Change the code to:\n\n```text\nexternalItem\n```", | ||
"line": 61, | ||
"selection": { | ||
"start": { | ||
"line": 61, | ||
"character": 32 | ||
}, | ||
"end": { | ||
"line": 61, | ||
"character": 41 | ||
} | ||
}, | ||
"title": "Update entity type" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.ts", | ||
"description": "### Define content source\n\nDefine the name of your external connection. This scopes the search result to only include results from the specified external connection. Add the snippet and replace `myconnection` with your connection name:\n\n```json\n contentSources: [\n '/external/connections/myconnection'\n ],\n\n```", | ||
"line": 62, | ||
"title": "Define content source" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.ts", | ||
"description": "### Update download code\n\nUpdate the code to download external item's contents:\n\n```javascript\n const rawContent = await this\n .downloadExternalContent(result.resource.properties.substrateContentDomainId);\n```\n", | ||
"line": 89, | ||
"selection": { | ||
"start": { | ||
"line": 87, | ||
"character": 1 | ||
}, | ||
"end": { | ||
"line": 89, | ||
"character": 15 | ||
} | ||
}, | ||
"title": "Update code to download external item's contents" | ||
}, | ||
{ | ||
"file": "src/app/graphDataSource.ts", | ||
"description": "### Define download content method\n\nDefine new method to retrieve external item's contents. Update `myconnection` with your connection's name:\n\n```javascript\n\n private async downloadExternalContent(externalItemFullId: string) {\n const externalItemId = externalItemFullId.split(',')[1];\n const externalItem = await this.graphClient\n .api(`/external/connections/myconnection/items/${externalItemId}`)\n .get();\n return externalItem.content.value;\n }\n\n```\n", | ||
"line": 105, | ||
"title": "Define method to download external item's contents" | ||
} | ||
] | ||
} |
3 changes: 2 additions & 1 deletion
3
templates/ts/custom-copilot-rag-microsoft365/.vscode/extensions.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"TeamsDevApp.ms-teams-vscode-extension" | ||
"TeamsDevApp.ms-teams-vscode-extension", | ||
"vsls-contrib.codetour" | ||
] | ||
} |
This file contains 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