Skip to content
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
7 changes: 7 additions & 0 deletions samples/cea-techpulse-python/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
BOT_ID=
BOT_PASSWORD=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=
OPENAI_API_KEY=
NEWS_API_KEY=
18 changes: 18 additions & 0 deletions samples/cea-techpulse-python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# TeamsFx files
# env/.env.*.user
# env/.env.local
# env/.env.playground
# .env
appPackage/build

# python virtual environment
.venv/
__pycache__/

# others
.deployment/
node_modules/
devTools/*.log

# Dev tool directories
/devTools/
6 changes: 6 additions & 0 deletions samples/cea-techpulse-python/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"TeamsDevApp.ms-teams-vscode-extension",
"ms-python.python"
]
}
140 changes: 140 additions & 0 deletions samples/cea-techpulse-python/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"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": "1-Teams",
"order": 4
},
"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": "1-Teams",
"order": 5
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch Remote (Desktop)",
"type": "node",
"request": "launch",
"preLaunchTask": "Start Agent in Desktop Client (Remote)",
"presentation": {
"group": "1-Teams",
"order": 6
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch Agent (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": "Launch Agent (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": "Start Python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/app.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal"
},
{
"name": "Start Python (Playground)",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/app.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal",
"serverReadyAction": {
"pattern": "(started|listening|Running|Serving) (at|on) (https?://\\S+)",
"action": "startDebugging",
"name": "Start Microsoft 365 Agents Playground"
}
},
{
"name": "Start Microsoft 365 Agents Playground",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/devTools/playground/node_modules/@microsoft/m365agentsplayground/cli.js",
"args": [
"start"
],
"env": {
"PATH": "${workspaceFolder}/devTools/nodejs;${env:PATH}"
},
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
{
"name": "Debug in Teams (Edge)",
"configurations": ["Launch Agent (Edge)", "Start Python"],
"cascadeTerminateToConfigurations": ["Start Python"],
"preLaunchTask": "Start Agent Locally",
"presentation": {
"group": "1-Teams",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in Teams (Chrome)",
"configurations": ["Launch Agent (Chrome)", "Start Python"],
"cascadeTerminateToConfigurations": ["Start Python"],
"preLaunchTask": "Start Agent Locally",
"presentation": {
"group": "1-Teams",
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Teams (Desktop)",
"configurations": ["Start Python"],
"preLaunchTask": "Start Agent in Desktop Client",
"presentation": {
"group": "1-Teams",
"order": 3
},
"stopAll": true
},
{
"name": "Debug in Microsoft 365 Agents Playground",
"configurations": ["Start Python (Playground)"],
"preLaunchTask": "Deploy (Microsoft 365 Agents Playground)",
"presentation": {
"group": "0-TestTool",
"order": 1
},
"stopAll": true
}
]
}
11 changes: 11 additions & 0 deletions samples/cea-techpulse-python/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"debug.onTaskErrors": "abort",
"json.schemas": [
{
"fileMatch": [
"/aad.*.json"
],
"schema": {}
}
]
}
135 changes: 135 additions & 0 deletions samples/cea-techpulse-python/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
// This file is automatically generated by Microsoft 365 Agents Toolkit.
// The teamsfx tasks defined in this file require Microsoft 365 Agents Toolkit version >= 5.0.0.
// See https://aka.ms/teamsfx-tasks for details on how to customize each task.
{
"version": "2.0.0",
"tasks": [
{
// 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 (Microsoft 365 Agents Playground)",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Check if Node.js is installed and the version is >= 12.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
3978, // app service port
56150, // Microsoft 365 Agents Playground port
]
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy (Microsoft 365 Agents Playground)",
"dependsOn": [
"Validate prerequisites (Microsoft 365 Agents Playground)"
],
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "playground",
}
},
{
"label": "Start Agent Locally",
"dependsOn": [
"Validate prerequisites",
"Start local tunnel",
"Provision",
"Deploy"
],
"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": [
"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
]
}
},
{
// 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"
},
{
// 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 Agent in Desktop Client",
"dependsOn": [
"Validate prerequisites",
"Start local tunnel",
"Provision",
"Deploy",
"Start desktop client"
],
"dependsOrder": "sequence"
},
{
"label": "Start desktop client",
"type": "teamsfx",
"command": "launch-desktop-client",
"args": {
"url": "teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true"
}
},
{
"label": "Start Agent in Desktop Client (Remote)",
"type": "teamsfx",
"command": "launch-desktop-client",
"args": {
"url": "teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true"
}
}
]
}
10 changes: 10 additions & 0 deletions samples/cea-techpulse-python/.webappignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.venv/
.vscode/
.env
env/
__pycache__/
README.md
m365agents.yml
m365agents.local.yml
m365agents.playground.yml
/devTools/
Loading