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

copilot handoff sample #129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
19 changes: 19 additions & 0 deletions samples/msgext-copilot-handoff/ts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# TeamsFx files
env/.env.*.user
env/.env.local
.localConfigs
appPackage/build

# dependencies
node_modules/

# misc
.env
.deployment
.DS_Store

# build
lib/

# Azurite storage
_storage_emulator
5 changes: 5 additions & 0 deletions samples/msgext-copilot-handoff/ts/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"TeamsDevApp.ms-teams-vscode-extension"
]
}
171 changes: 171 additions & 0 deletions samples/msgext-copilot-handoff/ts/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Remote in Teams (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "group 1: Teams",
"order": 3
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch Remote in Teams (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "group 1: Teams",
"order": 3
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch Remote in Outlook (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://outlook.office.com/mail?${account-hint}",
"presentation": {
"group": "group 2: Outlook",
"order": 3
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch Remote in Outlook (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://outlook.office.com/mail?${account-hint}",
"presentation": {
"group": "group 2: Outlook",
"order": 3
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch App in Teams (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch App in Teams (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch App in Outlook (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://outlook.office.com/mail?${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch App in Outlook (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://outlook.office.com/mail?${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Local Service",
"type": "node",
"request": "attach",
"port": 9239,
"restart": true,
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
{
"name": "Debug in Teams (Edge)",
"configurations": [
"Launch App in Teams (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 1: Teams",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in Teams (Chrome)",
"configurations": [
"Launch App in Teams (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 1: Teams",
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Outlook (Edge)",
"configurations": [
"Launch App in Outlook (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 2: Outlook",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in Outlook (Chrome)",
"configurations": [
"Launch App in Outlook (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 2: Outlook",
"order": 2
},
"stopAll": true
}
]
}
18 changes: 18 additions & 0 deletions samples/msgext-copilot-handoff/ts/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"debug.onTaskErrors": "abort",
"json.schemas": [
{
"fileMatch": [
"/aad.*.json"
],
"schema": {}
}
],
"cSpell.words": [
"botbuilder",
"msgext",
"Northwind",
"Sideloading",
"TEAMSFX"
]
}
139 changes: 139 additions & 0 deletions samples/msgext-copilot-handoff/ts/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
// 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",
"Start local tunnel",
"npm install",
"Start Azurite emulator",
"Provision",
"Deploy",
"Start application"
],
"dependsOrder": "sequence"
},
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
"label": "Validate prerequisites",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Validate if Node.js is installed.
"m365Account", // Sign-in prompt for Microsoft 365 account, then validate if the account enables the sideloading permission.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
3978, // app service port
9239 // app inspector port for Node.js debugger
]
}
},
{
// Start the local tunnel service to forward public URL to local port and inspect traffic.
// See https://aka.ms/teamsfx-tasks/local-tunnel for the detailed args definitions.
"label": "Start local tunnel",
"type": "teamsfx",
"command": "debug-start-local-tunnel",
"args": {
"type": "dev-tunnel",
"ports": [
{
"portNumber": 3978,
"protocol": "http",
"access": "public",
"writeToEnvironmentFile": {
"endpoint": "BOT_ENDPOINT", // output tunnel endpoint as BOT_ENDPOINT
"domain": "BOT_DOMAIN" // output tunnel domain as BOT_DOMAIN
}
}
],
"env": "local"
},
"isBackground": true,
"problemMatcher": "$teamsfx-local-tunnel-watch"
},
{
"type": "shell",
"label": "npm install",
"command": "npm install --no-audit"
},
{
"label": "Start Azurite emulator",
"type": "shell",
"command": "npm run storage",
"isBackground": true,
"problemMatcher": {
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "Azurite",
"endsPattern": "successfully listening"
}
},
"options": {
"cwd": "${workspaceFolder}"
},
"presentation": {
"reveal": "silent"
}
},
{
// Create the debug resources.
// See https://aka.ms/teamsfx-tasks/provision to know the details and how to customize the args.
"label": "Provision",
"type": "teamsfx",
"command": "provision",
"args": {
"env": "local"
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy",
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "local"
}
},
{
"label": "Start application",
"type": "shell",
"command": "npm run dev:teamsfx",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": {
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "[nodemon] starting",
"endsPattern": "restify listening to|Bot/ME service listening at|[nodemon] app crashed"
}
}
}
]
}
24 changes: 24 additions & 0 deletions samples/msgext-copilot-handoff/ts/.webappignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.webappignore
.fx
.deployment
.localConfigs
.vscode
*.js.map
*.ts.map
*.ts
.git*
.tsbuildinfo
CHANGELOG.md
readme.md
local.settings.json
test
tsconfig.json
.DS_Store
teamsapp.yml
teamsapp.*.yml
/env/
/node_modules/.bin
/node_modules/ts-node
/node_modules/typescript
/appPackage/
/infra/
Loading