-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: copilot plugin ts template from scratch (#9403)
- Loading branch information
Showing
25 changed files
with
876 additions
and
0 deletions.
There are no files selected for viewing
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,12 @@ | ||
*.js.map | ||
*.ts | ||
.git* | ||
.localConfigs | ||
.vscode | ||
local.settings.json | ||
test | ||
tsconfig.json | ||
.DS_Store | ||
.deployment | ||
node_modules/.bin | ||
node_modules/azure-functions-core-tools |
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,30 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
# TeamsFx files | ||
env/.env.*.user | ||
env/.env.local | ||
.DS_Store | ||
build | ||
appPackage/build | ||
.deployment | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# Dev tool directories | ||
/devTools/ | ||
|
||
# TypeScript output | ||
dist | ||
out | ||
|
||
# Azure Functions artifacts | ||
bin | ||
obj | ||
appsettings.json | ||
local.settings.json | ||
|
||
# Local data | ||
.localConfigs |
5 changes: 5 additions & 0 deletions
5
templates/ts/copilot-plugin-from-scratch/.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"teamsdevapp.ms-teams-vscode-extension" | ||
] | ||
} |
95 changes: 95 additions & 0 deletions
95
templates/ts/copilot-plugin-from-scratch/.vscode/launch.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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Remote (Edge)", | ||
"type": "msedge", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"presentation": { | ||
"group": "remote", | ||
"order": 1 | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Launch Remote (Chrome)", | ||
"type": "chrome", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"presentation": { | ||
"group": "remote", | ||
"order": 2 | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Attach to Frontend (Edge)", | ||
"type": "msedge", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"presentation": { | ||
"group": "all", | ||
"hidden": true | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Attach to Frontend (Chrome)", | ||
"type": "chrome", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"presentation": { | ||
"group": "all", | ||
"hidden": true | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Attach to Backend", | ||
"type": "node", | ||
"request": "attach", | ||
"port": 9229, | ||
"restart": true, | ||
"presentation": { | ||
"group": "all", | ||
"hidden": true | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Attach to Node Functions", | ||
"type": "node", | ||
"request": "attach", | ||
"port": 9229, | ||
"preLaunchTask": "func: host start" | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Debug (Edge)", | ||
"configurations": [ | ||
"Attach to Backend" | ||
], | ||
"preLaunchTask": "Start Teams App Locally", | ||
"presentation": { | ||
"group": "all", | ||
"order": 1 | ||
}, | ||
"stopAll": true | ||
}, | ||
{ | ||
"name": "Debug (Chrome)", | ||
"configurations": [ | ||
"Attach to Frontend (Chrome)", | ||
"Attach to Backend" | ||
], | ||
"preLaunchTask": "Start Teams App Locally", | ||
"presentation": { | ||
"group": "all", | ||
"order": 2 | ||
}, | ||
"stopAll": true | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
templates/ts/copilot-plugin-from-scratch/.vscode/settings.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"debug.onTaskErrors": "abort", | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": [ | ||
"/aad.*.json" | ||
], | ||
"schema": {} | ||
} | ||
], | ||
"files.exclude": { | ||
"obj": true, | ||
"bin": true | ||
}, | ||
"azureFunctions.postDeployTask": "npm install (functions)", | ||
"azureFunctions.projectLanguage": "TypeScript", | ||
"azureFunctions.projectRuntime": "~4", | ||
"debug.internalConsoleOptions": "neverOpen", | ||
"azureFunctions.preDeployTask": "npm prune (functions)" | ||
} |
148 changes: 148 additions & 0 deletions
148
templates/ts/copilot-plugin-from-scratch/.vscode/tasks.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 |
---|---|---|
@@ -0,0 +1,148 @@ | ||
// This file is automatically generated by Teams Toolkit. | ||
// The teamsfx tasks defined in this file require Teams Toolkit version >= 5.0.0. | ||
// See https://aka.ms/teamsfx-tasks for details on how to customize each task. | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Start Teams App Locally", | ||
"dependsOn": [ | ||
"Validate prerequisites", | ||
"Create resources", | ||
"Build project", | ||
"Start application" | ||
], | ||
"dependsOrder": "sequence" | ||
}, | ||
{ | ||
"label": "Validate prerequisites", | ||
"type": "teamsfx", | ||
"command": "debug-check-prerequisites", | ||
"args": { | ||
"prerequisites": [ | ||
"nodejs", | ||
"m365Account", | ||
"portOccupancy" | ||
], | ||
"portOccupancy": [ | ||
53000, | ||
7071, | ||
9229 | ||
] | ||
} | ||
}, | ||
{ | ||
"label": "Create resources", | ||
"type": "teamsfx", | ||
"command": "provision", | ||
"args": { | ||
"env": "local" | ||
} | ||
}, | ||
{ | ||
"label": "Build project", | ||
"type": "teamsfx", | ||
"command": "deploy", | ||
"args": { | ||
"env": "local" | ||
} | ||
}, | ||
{ | ||
"label": "Start application", | ||
"dependsOn": [ | ||
"Start backend" | ||
] | ||
}, | ||
{ | ||
"label": "Start backend", | ||
"type": "shell", | ||
"command": "npm run dev:teamsfx", | ||
"isBackground": true, | ||
"options": { | ||
"cwd": "${workspaceFolder}", | ||
"env": { | ||
"PATH": "${workspaceFolder}/devTools/func:${env:PATH}" | ||
} | ||
}, | ||
"windows": { | ||
"options": { | ||
"env": { | ||
"PATH": "${workspaceFolder}/devTools/func;${env:PATH}" | ||
} | ||
} | ||
}, | ||
"problemMatcher": { | ||
"pattern": { | ||
"regexp": "^.*$", | ||
"file": 0, | ||
"location": 1, | ||
"message": 2 | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^.*(Job host stopped|signaling restart).*$", | ||
"endsPattern": "^.*(Worker process started and initialized|Host lock lease acquired by instance ID).*$" | ||
} | ||
}, | ||
"presentation": { | ||
"reveal": "silent" | ||
}, | ||
"dependsOn": "Watch backend" | ||
}, | ||
{ | ||
"label": "Watch backend", | ||
"type": "shell", | ||
"command": "npm run watch", | ||
"isBackground": true, | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"problemMatcher": "$tsc-watch", | ||
"presentation": { | ||
"reveal": "silent" | ||
} | ||
}, | ||
{ | ||
"type": "func", | ||
"label": "func: host start", | ||
"command": "host start", | ||
"problemMatcher": "$func-node-watch", | ||
"isBackground": true, | ||
"dependsOn": "npm build (functions)", | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "npm build (functions)", | ||
"command": "npm run build", | ||
"dependsOn": [ | ||
"func: extensions install", | ||
"npm install (functions)" | ||
], | ||
"problemMatcher": "$tsc", | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "npm install (functions)", | ||
"command": "npm install", | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "npm prune (functions)", | ||
"command": "npm prune --production", | ||
"dependsOn": "npm build (functions)", | ||
"problemMatcher": [], | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
} | ||
} | ||
] | ||
} |
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,3 @@ | ||
# Copilot Plugin Template from Scratch | ||
|
||
To be completed. |
62 changes: 62 additions & 0 deletions
62
templates/ts/copilot-plugin-from-scratch/appPackage/adaptiveCards/repair.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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"version": "1.6", | ||
"body": [ | ||
{ | ||
"type": "Container", | ||
"items": [ | ||
{ | ||
"type": "ColumnSet", | ||
"columns": [ | ||
{ | ||
"type": "Column", | ||
"width": "stretch", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Title: ${if(title, title, 'N/A')}", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Description: ${if(description, description, 'N/A')}", | ||
"wrap": true | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Assigned To: ${if(assignedTo, assignedTo, 'N/A')}", | ||
"wrap": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"items": [ | ||
{ | ||
"type": "Image", | ||
"url": "${if(image, image, '')}", | ||
"size": "Medium" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "FactSet", | ||
"facts": [ | ||
{ | ||
"title": "Repair ID:", | ||
"value": "${if(id, id, 'N/A')}" | ||
}, | ||
{ | ||
"title": "Date:", | ||
"value": "${if(date, date, 'N/A')}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.