Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: copilot plugin template from scratch #9403

Merged
merged 8 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions templates/ts/copilot-plugin-from-scratch/.funcignore
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
30 changes: 30 additions & 0 deletions templates/ts/copilot-plugin-from-scratch/.gitignore
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
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 templates/ts/copilot-plugin-from-scratch/.vscode/launch.json
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 templates/ts/copilot-plugin-from-scratch/.vscode/settings.json
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 templates/ts/copilot-plugin-from-scratch/.vscode/tasks.json
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}"
}
}
]
}
3 changes: 3 additions & 0 deletions templates/ts/copilot-plugin-from-scratch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copilot Plugin Template from Scratch

To be completed.
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')}"
}
]
}
]
}
]
}
Loading
Loading