-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cfa40eb
Showing
35 changed files
with
1,194 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,13 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"provisionParameters": { | ||
"value": { | ||
"botAadAppClientId": "{{state.teams-bot.botId}}", | ||
"botAadAppClientSecret": "{{state.teams-bot.botPassword}}", | ||
"resourceBaseName": "openaiteam2ab769" | ||
} | ||
} | ||
} | ||
} |
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,18 @@ | ||
{ | ||
"$schema": "https://aka.ms/teamsfx-env-config-schema", | ||
"description": "You can customize the TeamsFx config for different environments. Visit https://aka.ms/teamsfx-env-config to learn more about this.", | ||
"manifest": { | ||
"appName": { | ||
"short": "openai-teams-bot", | ||
"full": "Full name for openai-teams-bot" | ||
}, | ||
"description": { | ||
"short": "Short description of openai-teams-bot", | ||
"full": "Full description of openai-teams-bot" | ||
}, | ||
"icons": { | ||
"color": "resources/color.png", | ||
"outline": "resources/outline.png" | ||
} | ||
} | ||
} |
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,60 @@ | ||
{ | ||
"appName": "openai-teams-bot", | ||
"projectId": "7b645719-832e-4408-a185-7d1d52f4011e", | ||
"version": "2.1.0", | ||
"components": [ | ||
{ | ||
"name": "teams-bot", | ||
"hosting": "azure-web-app", | ||
"provision": false, | ||
"deploy": true, | ||
"capabilities": [ | ||
"bot" | ||
], | ||
"build": true, | ||
"folder": "bot" | ||
}, | ||
{ | ||
"name": "bot-service", | ||
"provision": true | ||
}, | ||
{ | ||
"name": "azure-web-app", | ||
"scenario": "Bot", | ||
"connections": [ | ||
"identity", | ||
"teams-bot" | ||
] | ||
}, | ||
{ | ||
"name": "identity", | ||
"provision": true | ||
} | ||
], | ||
"programmingLanguage": "typescript", | ||
"solutionSettings": { | ||
"name": "fx-solution-azure", | ||
"version": "1.0.0", | ||
"hostType": "Azure", | ||
"azureResources": [], | ||
"capabilities": [ | ||
"Bot" | ||
], | ||
"activeResourcePlugins": [ | ||
"fx-resource-local-debug", | ||
"fx-resource-appstudio", | ||
"fx-resource-cicd", | ||
"fx-resource-api-connector", | ||
"fx-resource-bot", | ||
"fx-resource-identity" | ||
] | ||
}, | ||
"pluginSettings": { | ||
"fx-resource-bot": { | ||
"host-type": "app-service", | ||
"capabilities": [ | ||
"bot" | ||
] | ||
} | ||
} | ||
} |
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,10 @@ | ||
# TeamsFx files | ||
node_modules | ||
.fx/configs/localSettings.json | ||
.fx/states/*.userdata | ||
.DS_Store | ||
.env.teamsfx.local | ||
subscriptionInfo.json | ||
build | ||
.fx/configs/config.local.json | ||
.fx/states/state.local.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": "pwa-msedge", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"presentation": { | ||
"group": "remote", | ||
"order": 1 | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Launch Remote (Chrome)", | ||
"type": "pwa-chrome", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"presentation": { | ||
"group": "remote", | ||
"order": 2 | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Launch Bot (Edge)", | ||
"type": "pwa-msedge", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"cascadeTerminateToConfigurations": [ | ||
"Attach to Bot" | ||
], | ||
"presentation": { | ||
"group": "all", | ||
"hidden": true | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Launch Bot (Chrome)", | ||
"type": "pwa-chrome", | ||
"request": "launch", | ||
"url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}", | ||
"cascadeTerminateToConfigurations": [ | ||
"Attach to Bot" | ||
], | ||
"presentation": { | ||
"group": "all", | ||
"hidden": true | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"name": "Attach to Bot", | ||
"type": "pwa-node", | ||
"request": "attach", | ||
"port": 9239, | ||
"restart": true, | ||
"presentation": { | ||
"group": "all", | ||
"hidden": true | ||
}, | ||
"internalConsoleOptions": "neverOpen" | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Debug (Edge)", | ||
"configurations": [ | ||
"Launch Bot (Edge)", | ||
"Attach to Bot" | ||
], | ||
"preLaunchTask": "Start Teams App Locally", | ||
"presentation": { | ||
"group": "all", | ||
"order": 1 | ||
}, | ||
"stopAll": true | ||
}, | ||
{ | ||
"name": "Debug (Chrome)", | ||
"configurations": [ | ||
"Launch Bot (Chrome)", | ||
"Attach to Bot" | ||
], | ||
"preLaunchTask": "Start Teams App Locally", | ||
"presentation": { | ||
"group": "all", | ||
"order": 2 | ||
}, | ||
"stopAll": true | ||
} | ||
] | ||
} |
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,11 @@ | ||
{ | ||
"debug.onTaskErrors": "abort", | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": [ | ||
"/aad.*.json" | ||
], | ||
"schema": {} | ||
} | ||
] | ||
} |
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,122 @@ | ||
// This file is automatically generated by Teams Toolkit. | ||
// The teamsfx tasks defined in this file require Teams Toolkit version >= 4.1.0. | ||
// See https://aka.ms/teamsfx-debug-tasks for details on how to customize each task and how to integrate with existing Teams Toolkit projects. | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Start Teams App Locally", | ||
"dependsOn": [ | ||
"Validate & install prerequisites", | ||
"Install npm packages", | ||
"Start local tunnel", | ||
"Set up bot", | ||
"Build & upload Teams manifest", | ||
"Start services" | ||
], | ||
"dependsOrder": "sequence" | ||
}, | ||
{ | ||
// Check if all required prerequisites are installed and will install them if not. | ||
// See https://aka.ms/teamsfx-check-prerequisites-task to know the details and how to customize the args. | ||
"label": "Validate & install 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. | ||
"ngrok", // Install Ngrok. Bot project requires a public message endpoint, and ngrok can help create public tunnel for your local service. | ||
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied. | ||
], | ||
"portOccupancy": [ | ||
3978, // bot service port | ||
9239 // bot inspector port for Node.js debugger | ||
] | ||
} | ||
}, | ||
{ | ||
// Check if all the npm packages are installed and will install them if not. | ||
// See https://aka.ms/teamsfx-npm-package-task to know the details and how to customize the args. | ||
"label": "Install npm packages", | ||
"type": "teamsfx", | ||
"command": "debug-npm-install", | ||
"args": { | ||
"projects": [ | ||
{ | ||
"cwd": "${workspaceFolder}/bot", | ||
"npmInstallArgs": [ | ||
"--no-audit" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
// Start the local tunnel service to forward public ngrok URL to local port and inspect traffic. | ||
// See https://aka.ms/teamsfx-local-tunnel-task to know the details and how to customize the args. | ||
"label": "Start local tunnel", | ||
"type": "teamsfx", | ||
"command": "debug-start-local-tunnel", | ||
"args": { | ||
"ngrokArgs": "http 3978 --log=stdout --log-format=logfmt" | ||
}, | ||
"isBackground": true, | ||
"problemMatcher": "$teamsfx-local-tunnel-watch" | ||
}, | ||
{ | ||
// Register resources and prepare local launch information for Bot. | ||
// See https://aka.ms/teamsfx-debug-set-up-bot-task to know the details and how to customize the args. | ||
"label": "Set up bot", | ||
"type": "teamsfx", | ||
"command": "debug-set-up-bot", | ||
"args": { | ||
//// Enter your own bot information if using the existing bot. //// | ||
// "botId": "", | ||
// "botPassword": "", // use plain text or environment variable reference like ${env:BOT_PASSWORD} | ||
"botMessagingEndpoint": "/api/messages" // use your own routing "/any/path", or full URL "https://contoso.com/any/path" | ||
} | ||
}, | ||
{ | ||
// Build and upload Teams manifest. | ||
// See https://aka.ms/teamsfx-debug-prepare-manifest-task to know the details and how to customize the args. | ||
"label": "Build & upload Teams manifest", | ||
"type": "teamsfx", | ||
"command": "debug-prepare-manifest", | ||
"args": { | ||
//// Enter your own Teams app package path if using the existing Teams manifest. //// | ||
// "appPackagePath": "" | ||
} | ||
}, | ||
{ | ||
"label": "Start services", | ||
"dependsOn": [ | ||
"Start bot" | ||
] | ||
}, | ||
{ | ||
"label": "Start bot", | ||
"type": "shell", | ||
"command": "npm run dev:teamsfx", | ||
"isBackground": true, | ||
"options": { | ||
"cwd": "${workspaceFolder}/bot" | ||
}, | ||
"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" | ||
} | ||
} | ||
} | ||
] | ||
} |
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,10 @@ | ||
# dependencies | ||
node_modules/ | ||
|
||
# misc | ||
.env | ||
.deployment | ||
.DS_Store | ||
|
||
# build | ||
lib/ |
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,17 @@ | ||
.fx | ||
.deployment | ||
.vscode | ||
*.js.map | ||
*.ts.map | ||
*.ts | ||
.git* | ||
.tsbuildinfo | ||
CHANGELOG.md | ||
readme.md | ||
local.settings.json | ||
test | ||
tsconfig.json | ||
.DS_Store | ||
node_modules/.bin | ||
node_modules/ts-node | ||
node_modules/typescript |
Oops, something went wrong.