From ef4f021fca583c38040c11efd58e6982edb1fe1b Mon Sep 17 00:00:00 2001 From: huimiu Date: Fri, 17 Jan 2025 17:46:41 +0800 Subject: [PATCH] fix: remove the message-extension-copilot template --- .../message-extension-copilot/.gitignore | 26 -- .../.{{NewProjectTypeName}}/.gitignore | 14 - .../.{{NewProjectTypeName}}/README.md.tpl | 50 --- .../launchSettings.json.tpl | 35 --- ...rojectTypeName}}.{{NewProjectTypeExt}}.tpl | 6 - ...tTypeName}}.{{NewProjectTypeExt}}.user.tpl | 14 - .../{{ProjectName}}.slnLaunch.user.tpl | 124 -------- .../AdapterWithErrorHandler.cs.tpl | 28 -- .../message-extension-copilot/Config.cs.tpl | 10 - .../Controllers/BotController.cs.tpl | 30 -- .../message-extension-copilot/Program.cs.tpl | 45 --- .../Properties/launchSettings.json.tpl | 121 -------- .../message-extension-copilot/README.md.tpl | 51 --- .../Resources/helloWorldCard.json | 19 -- .../Search/SearchApp.cs.tpl | 72 ----- .../appPackage/color.png | Bin 5923 -> 0 bytes .../appPackage/manifest.json.tpl | 60 ---- .../appPackage/outline.png | Bin 492 -> 0 bytes .../appsettings.json | 14 - .../message-extension-copilot/env/.env.dev | 15 - .../env/.env.dev.user | 3 - .../message-extension-copilot/env/.env.local | 10 - .../env/.env.local.user | 4 - .../infra/azure.bicep | 86 ----- .../infra/azure.parameters.json.tpl | 15 - .../infra/botRegistration/azurebot.bicep | 52 ---- .../infra/botRegistration/readme.md | 1 - .../teamsapp.local.yml.tpl | 135 -------- .../teamsapp.yml.tpl | 116 ------- .../{{ProjectName}}.csproj.tpl | 28 -- .../js/message-extension-copilot/.gitignore | 17 - .../message-extension-copilot/.localConfigs | 3 - .../.vscode/extensions.json | 5 - .../.vscode/launch.json.tpl | 293 ------------------ .../.vscode/settings.json | 11 - .../.vscode/tasks.json | 256 --------------- .../message-extension-copilot/.webappignore | 28 -- .../message-extension-copilot/README.md.tpl | 85 ----- .../appPackage/color.png | Bin 5923 -> 0 bytes .../appPackage/manifest.json.tpl | 60 ---- .../appPackage/outline.png | Bin 492 -> 0 bytes .../js/message-extension-copilot/env/.env.dev | 16 - .../env/.env.dev.user | 4 - .../message-extension-copilot/env/.env.local | 11 - .../env/.env.local.user | 5 - .../env/.env.testtool | 8 - .../infra/azure.bicep | 95 ------ .../infra/azure.parameters.json.tpl | 15 - .../infra/botRegistration/azurebot.bicep | 52 ---- .../infra/botRegistration/readme.md | 1 - .../package.json.tpl | 33 -- .../src/adaptiveCards/helloWorldCard.json | 19 -- .../message-extension-copilot/src/config.js | 8 - .../js/message-extension-copilot/src/index.js | 62 ---- .../src/searchApp.js | 59 ---- .../teamsapp.local.yml.tpl | 94 ------ .../teamsapp.testtool.yml | 24 -- .../teamsapp.yml.tpl | 136 -------- .../js/message-extension-copilot/web.config | 60 ---- .../ts/message-extension-copilot/.gitignore | 20 -- .../message-extension-copilot/.localConfigs | 3 - .../.vscode/extensions.json | 5 - .../.vscode/launch.json.tpl | 293 ------------------ .../.vscode/settings.json | 11 - .../.vscode/tasks.json | 256 --------------- .../message-extension-copilot/.webappignore | 28 -- .../message-extension-copilot/README.md.tpl | 85 ----- .../appPackage/color.png | Bin 5923 -> 0 bytes .../appPackage/manifest.json.tpl | 60 ---- .../appPackage/outline.png | Bin 492 -> 0 bytes .../ts/message-extension-copilot/env/.env.dev | 16 - .../env/.env.dev.user | 4 - .../message-extension-copilot/env/.env.local | 11 - .../env/.env.local.user | 5 - .../env/.env.testtool | 8 - .../infra/azure.bicep | 95 ------ .../infra/azure.parameters.json.tpl | 15 - .../infra/botRegistration/azurebot.bicep | 52 ---- .../infra/botRegistration/readme.md | 1 - .../package.json.tpl | 42 --- .../src/adaptiveCards/helloWorldCard.json | 19 -- .../message-extension-copilot/src/config.ts | 8 - .../ts/message-extension-copilot/src/index.ts | 67 ---- .../src/searchApp.ts | 65 ---- .../teamsapp.local.yml.tpl | 95 ------ .../teamsapp.testtool.yml | 24 -- .../teamsapp.yml.tpl | 140 --------- .../message-extension-copilot/tsconfig.json | 15 - .../ts/message-extension-copilot/web.config | 60 ---- 89 files changed, 4147 deletions(-) delete mode 100644 templates/csharp/message-extension-copilot/.gitignore delete mode 100644 templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/.gitignore delete mode 100644 templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/README.md.tpl delete mode 100644 templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/launchSettings.json.tpl delete mode 100644 templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.tpl delete mode 100644 templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.user.tpl delete mode 100644 templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{ProjectName}}.slnLaunch.user.tpl delete mode 100644 templates/csharp/message-extension-copilot/AdapterWithErrorHandler.cs.tpl delete mode 100644 templates/csharp/message-extension-copilot/Config.cs.tpl delete mode 100644 templates/csharp/message-extension-copilot/Controllers/BotController.cs.tpl delete mode 100644 templates/csharp/message-extension-copilot/Program.cs.tpl delete mode 100644 templates/csharp/message-extension-copilot/Properties/launchSettings.json.tpl delete mode 100644 templates/csharp/message-extension-copilot/README.md.tpl delete mode 100644 templates/csharp/message-extension-copilot/Resources/helloWorldCard.json delete mode 100644 templates/csharp/message-extension-copilot/Search/SearchApp.cs.tpl delete mode 100644 templates/csharp/message-extension-copilot/appPackage/color.png delete mode 100644 templates/csharp/message-extension-copilot/appPackage/manifest.json.tpl delete mode 100644 templates/csharp/message-extension-copilot/appPackage/outline.png delete mode 100644 templates/csharp/message-extension-copilot/appsettings.json delete mode 100644 templates/csharp/message-extension-copilot/env/.env.dev delete mode 100644 templates/csharp/message-extension-copilot/env/.env.dev.user delete mode 100644 templates/csharp/message-extension-copilot/env/.env.local delete mode 100644 templates/csharp/message-extension-copilot/env/.env.local.user delete mode 100644 templates/csharp/message-extension-copilot/infra/azure.bicep delete mode 100644 templates/csharp/message-extension-copilot/infra/azure.parameters.json.tpl delete mode 100644 templates/csharp/message-extension-copilot/infra/botRegistration/azurebot.bicep delete mode 100644 templates/csharp/message-extension-copilot/infra/botRegistration/readme.md delete mode 100644 templates/csharp/message-extension-copilot/teamsapp.local.yml.tpl delete mode 100644 templates/csharp/message-extension-copilot/teamsapp.yml.tpl delete mode 100644 templates/csharp/message-extension-copilot/{{ProjectName}}.csproj.tpl delete mode 100644 templates/js/message-extension-copilot/.gitignore delete mode 100644 templates/js/message-extension-copilot/.localConfigs delete mode 100644 templates/js/message-extension-copilot/.vscode/extensions.json delete mode 100644 templates/js/message-extension-copilot/.vscode/launch.json.tpl delete mode 100644 templates/js/message-extension-copilot/.vscode/settings.json delete mode 100644 templates/js/message-extension-copilot/.vscode/tasks.json delete mode 100644 templates/js/message-extension-copilot/.webappignore delete mode 100644 templates/js/message-extension-copilot/README.md.tpl delete mode 100644 templates/js/message-extension-copilot/appPackage/color.png delete mode 100644 templates/js/message-extension-copilot/appPackage/manifest.json.tpl delete mode 100644 templates/js/message-extension-copilot/appPackage/outline.png delete mode 100644 templates/js/message-extension-copilot/env/.env.dev delete mode 100644 templates/js/message-extension-copilot/env/.env.dev.user delete mode 100644 templates/js/message-extension-copilot/env/.env.local delete mode 100644 templates/js/message-extension-copilot/env/.env.local.user delete mode 100644 templates/js/message-extension-copilot/env/.env.testtool delete mode 100644 templates/js/message-extension-copilot/infra/azure.bicep delete mode 100644 templates/js/message-extension-copilot/infra/azure.parameters.json.tpl delete mode 100644 templates/js/message-extension-copilot/infra/botRegistration/azurebot.bicep delete mode 100644 templates/js/message-extension-copilot/infra/botRegistration/readme.md delete mode 100644 templates/js/message-extension-copilot/package.json.tpl delete mode 100644 templates/js/message-extension-copilot/src/adaptiveCards/helloWorldCard.json delete mode 100644 templates/js/message-extension-copilot/src/config.js delete mode 100644 templates/js/message-extension-copilot/src/index.js delete mode 100644 templates/js/message-extension-copilot/src/searchApp.js delete mode 100644 templates/js/message-extension-copilot/teamsapp.local.yml.tpl delete mode 100644 templates/js/message-extension-copilot/teamsapp.testtool.yml delete mode 100644 templates/js/message-extension-copilot/teamsapp.yml.tpl delete mode 100644 templates/js/message-extension-copilot/web.config delete mode 100644 templates/ts/message-extension-copilot/.gitignore delete mode 100644 templates/ts/message-extension-copilot/.localConfigs delete mode 100644 templates/ts/message-extension-copilot/.vscode/extensions.json delete mode 100644 templates/ts/message-extension-copilot/.vscode/launch.json.tpl delete mode 100644 templates/ts/message-extension-copilot/.vscode/settings.json delete mode 100644 templates/ts/message-extension-copilot/.vscode/tasks.json delete mode 100644 templates/ts/message-extension-copilot/.webappignore delete mode 100644 templates/ts/message-extension-copilot/README.md.tpl delete mode 100644 templates/ts/message-extension-copilot/appPackage/color.png delete mode 100644 templates/ts/message-extension-copilot/appPackage/manifest.json.tpl delete mode 100644 templates/ts/message-extension-copilot/appPackage/outline.png delete mode 100644 templates/ts/message-extension-copilot/env/.env.dev delete mode 100644 templates/ts/message-extension-copilot/env/.env.dev.user delete mode 100644 templates/ts/message-extension-copilot/env/.env.local delete mode 100644 templates/ts/message-extension-copilot/env/.env.local.user delete mode 100644 templates/ts/message-extension-copilot/env/.env.testtool delete mode 100644 templates/ts/message-extension-copilot/infra/azure.bicep delete mode 100644 templates/ts/message-extension-copilot/infra/azure.parameters.json.tpl delete mode 100644 templates/ts/message-extension-copilot/infra/botRegistration/azurebot.bicep delete mode 100644 templates/ts/message-extension-copilot/infra/botRegistration/readme.md delete mode 100644 templates/ts/message-extension-copilot/package.json.tpl delete mode 100644 templates/ts/message-extension-copilot/src/adaptiveCards/helloWorldCard.json delete mode 100644 templates/ts/message-extension-copilot/src/config.ts delete mode 100644 templates/ts/message-extension-copilot/src/index.ts delete mode 100644 templates/ts/message-extension-copilot/src/searchApp.ts delete mode 100644 templates/ts/message-extension-copilot/teamsapp.local.yml.tpl delete mode 100644 templates/ts/message-extension-copilot/teamsapp.testtool.yml delete mode 100644 templates/ts/message-extension-copilot/teamsapp.yml.tpl delete mode 100644 templates/ts/message-extension-copilot/tsconfig.json delete mode 100644 templates/ts/message-extension-copilot/web.config diff --git a/templates/csharp/message-extension-copilot/.gitignore b/templates/csharp/message-extension-copilot/.gitignore deleted file mode 100644 index 9ecb6a5c1b1..00000000000 --- a/templates/csharp/message-extension-copilot/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# TeamsFx files -build -appPackage/build -env/.env.*.user -env/.env.local -appsettings.Development.json -.deployment -appsettings.TestTool.json - -# User-specific files -*.user - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Notification local store -.notification.localstore.json diff --git a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/.gitignore b/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/.gitignore deleted file mode 100644 index 3de544e49c5..00000000000 --- a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# TeamsFx files -build -appPackage/build -env/.env.*.user -env/.env.local -appsettings.Development.json -.deployment -appsettings.Development.json - -# User-specific files -*.user - -# Notification local store -.notification.localstore \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/README.md.tpl b/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/README.md.tpl deleted file mode 100644 index 2ef14d449dd..00000000000 --- a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/README.md.tpl +++ /dev/null @@ -1,50 +0,0 @@ -# Welcome to Teams Toolkit! - -## Quick Start - -> **Prerequisites** -> -> To run the app template in your local dev machine, you will need: -> -> - [Visual Studio 2022](https://aka.ms/vs) 17.8 or higher and [install Teams Toolkit](https://aka.ms/install-teams-toolkit-vs). -{{^enableTestToolByDefault}} -> - A [Microsoft 365 account for development](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) -{{/enableTestToolByDefault}} -> - [Microsoft 365 Copilot license](https://learn.microsoft.com/microsoft-365-copilot/extensibility/prerequisites#prerequisites) - -{{#enableTestToolByDefault}} -1. Press F5 to start debugging which launches your app in Teams App Test Tool using a web browser. -2. You can search NuGet package from compose message area, or from the command box. -{{/enableTestToolByDefault}} -{{^enableTestToolByDefault}} -1. In the debug dropdown menu, select Dev Tunnels > Create a Tunnel (set authentication type to Public) or select an existing public dev tunnel -
![image](https://raw.githubusercontent.com/OfficeDev/TeamsFx/dev/docs/images/visualstudio/debug/create-devtunnel-button.png). -2. Right-click the '{{NewProjectTypeName}}' project and select Teams Toolkit > Prepare Teams App Dependencies -3. If prompted, sign in with a Microsoft 365 account for the Teams organization you want - to install the app to. -4. Press F5, or select Debug > Start Debugging menu in Visual Studio to start your app -
![image](https://raw.githubusercontent.com/OfficeDev/TeamsFx/dev/docs/images/visualstudio/debug/debug-button.png) -5. In the launched browser, select the Add button to load the app in Teams. -6. You can search for NuGet package from the message input field or the command box. -{{/enableTestToolByDefault}} - -> For local debugging using Teams Toolkit CLI, you need to do some extra steps described in [Set up your Teams Toolkit CLI for local debugging](https://aka.ms/teamsfx-cli-debugging). - -{{^enableTestToolByDefault}} -## Debug in Test Tool -Teams App Test Tool allows developers test and debug bots locally without needing Microsoft 365 accounts, development tunnels, or Teams app and bot registration. See https://aka.ms/teams-toolkit-vs-test-tool for more details. -{{/enableTestToolByDefault}} - -## Run the app on other platforms - -The Teams app can run in other platforms like Outlook and Microsoft 365 app. See https://aka.ms/vs-ttk-debug-multi-profiles for more details. - -## Get more info - -- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin) - -## Report an issue - -Select Visual Studio > Help > Send Feedback > Report a Problem. -Or, create an issue directly in our GitHub repository: -https://github.com/OfficeDev/TeamsFx/issues diff --git a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/launchSettings.json.tpl b/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/launchSettings.json.tpl deleted file mode 100644 index 4c57989778b..00000000000 --- a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/launchSettings.json.tpl +++ /dev/null @@ -1,35 +0,0 @@ -{ - "profiles": { -{{#enableTestToolByDefault}} - // Launch project within Teams App Test Tool - "Teams App Test Tool (browser)": { - "commandName": "Project", - "launchTestTool": true, - "launchUrl": "http://localhost:56150", - }, -{{/enableTestToolByDefault}} - // Debug project within Teams - "Microsoft Teams (browser)": { - "commandName": "Project", - "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", - }, - // Debug project within Copilot - "Copilot (browser)": { - "commandName": "Project", - "launchUrl": "https://teams.microsoft.com?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", - }, - // Debug project within Outlook - "Outlook (browser)": { - "commandName": "Project", - "launchUrl": "https://outlook.office.com/mail?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", - }, -{{^enableTestToolByDefault}} - // Launch project within Teams App Test Tool - "Teams App Test Tool (browser)": { - "commandName": "Project", - "launchTestTool": true, - "launchUrl": "http://localhost:56150", - }, -{{/enableTestToolByDefault}} - } -} \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.tpl b/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.tpl deleted file mode 100644 index a31df153eac..00000000000 --- a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.tpl +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.user.tpl b/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.user.tpl deleted file mode 100644 index 541a09bd78d..00000000000 --- a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{NewProjectTypeName}}.{{NewProjectTypeExt}}.user.tpl +++ /dev/null @@ -1,14 +0,0 @@ - - - - ProjectDebugger - - -{{#enableTestToolByDefault}} - Teams App Test Tool (browser) -{{/enableTestToolByDefault}} -{{^enableTestToolByDefault}} - Microsoft Teams (browser) -{{/enableTestToolByDefault}} - - \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{ProjectName}}.slnLaunch.user.tpl b/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{ProjectName}}.slnLaunch.user.tpl deleted file mode 100644 index 950205a4517..00000000000 --- a/templates/csharp/message-extension-copilot/.{{NewProjectTypeName}}/{{ProjectName}}.slnLaunch.user.tpl +++ /dev/null @@ -1,124 +0,0 @@ -[ -{{#enableTestToolByDefault}} - { - "Name": "Teams App Test Tool (browser)", - "Projects": [ - { - "Path": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Name": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Action": "StartWithoutDebugging", - "DebugTarget": "Teams App Test Tool (browser)" - }, - { -{{#PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}.csproj", - "Name": "{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} -{{^PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}\\{{ProjectName}}.csproj", - "Name": "{{ProjectName}}\\{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} - "Action": "Start", - "DebugTarget": "Teams App Test Tool" - } - ] - }, -{{/enableTestToolByDefault}} - { - "Name": "Microsoft Teams (browser)", - "Projects": [ - { - "Path": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Name": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Action": "StartWithoutDebugging", - "DebugTarget": "Microsoft Teams (browser)" - }, - { -{{#PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}.csproj", - "Name": "{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} -{{^PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}\\{{ProjectName}}.csproj", - "Name": "{{ProjectName}}\\{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} - "Action": "Start", - "DebugTarget": "Start Project" - } - ] - }, - { - "Name": "Copilot (browser)", - "Projects": [ - { - "Path": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Name": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Action": "StartWithoutDebugging", - "DebugTarget": "Copilot (browser)" - }, - { -{{#PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}.csproj", - "Name": "{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} -{{^PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}\\{{ProjectName}}.csproj", - "Name": "{{ProjectName}}\\{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} - "Action": "Start", - "DebugTarget": "Start Project" - } - ] - }, - { - "Name": "Outlook (browser)", - "Projects": [ - { - "Path": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Name": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Action": "StartWithoutDebugging", - "DebugTarget": "Outlook (browser)" - }, - { -{{#PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}.csproj", - "Name": "{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} -{{^PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}\\{{ProjectName}}.csproj", - "Name": "{{ProjectName}}\\{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} - "Action": "Start", - "DebugTarget": "Start Project" - } - ] -{{#enableTestToolByDefault}} - } -{{/enableTestToolByDefault}} -{{^enableTestToolByDefault}} - }, - { - "Name": "Teams App Test Tool (browser)", - "Projects": [ - { - "Path": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Name": "{{NewProjectTypeName}}\\{{NewProjectTypeName}}.{{NewProjectTypeExt}}", - "Action": "StartWithoutDebugging", - "DebugTarget": "Teams App Test Tool (browser)" - }, - { -{{#PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}.csproj", - "Name": "{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} -{{^PlaceProjectFileInSolutionDir}} - "Path": "{{ProjectName}}\\{{ProjectName}}.csproj", - "Name": "{{ProjectName}}\\{{ProjectName}}.csproj", -{{/PlaceProjectFileInSolutionDir}} - "Action": "Start", - "DebugTarget": "Teams App Test Tool" - } - ] - } -{{/enableTestToolByDefault}} -] \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/AdapterWithErrorHandler.cs.tpl b/templates/csharp/message-extension-copilot/AdapterWithErrorHandler.cs.tpl deleted file mode 100644 index 7a6a34cadce..00000000000 --- a/templates/csharp/message-extension-copilot/AdapterWithErrorHandler.cs.tpl +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; - -namespace {{SafeProjectName}}; - -public class AdapterWithErrorHandler : CloudAdapter -{ - public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger logger) - : base(auth, logger) - { - OnTurnError = async (turnContext, exception) => - { - // Log any leaked exception from the application. - // NOTE: In production environment, you should consider logging this to - // Azure Application Insights. Visit https://aka.ms/bottelemetry to see how - // to add telemetry capture to your bot. - logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); - - // Send a message to the user - await turnContext.SendActivityAsync("The bot encountered an error or bug."); - await turnContext.SendActivityAsync("To continue to run this bot, please fix the bot source code."); - - // Send a trace activity, which will be displayed in the Bot Framework Emulator - await turnContext.TraceActivityAsync("OnTurnError Trace", exception.Message, "https://www.botframework.com/schemas/error", "TurnError"); - }; - } -} \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/Config.cs.tpl b/templates/csharp/message-extension-copilot/Config.cs.tpl deleted file mode 100644 index 273f1154921..00000000000 --- a/templates/csharp/message-extension-copilot/Config.cs.tpl +++ /dev/null @@ -1,10 +0,0 @@ -namespace {{SafeProjectName}} -{ - public class ConfigOptions - { - public string BOT_ID { get; set; } - public string BOT_PASSWORD { get; set; } - public string BOT_TYPE { get; set; } - public string BOT_TENANT_ID { get; set; } - } -} diff --git a/templates/csharp/message-extension-copilot/Controllers/BotController.cs.tpl b/templates/csharp/message-extension-copilot/Controllers/BotController.cs.tpl deleted file mode 100644 index 42783957403..00000000000 --- a/templates/csharp/message-extension-copilot/Controllers/BotController.cs.tpl +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; - -namespace {{SafeProjectName}}.Controllers; - -// This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot -// implementation at runtime. Multiple different IBot implementations running at different endpoints can be -// achieved by specifying a more specific type for the bot constructor argument. -[Route("api/messages")] -[ApiController] -public class BotController : ControllerBase -{ - private readonly IBotFrameworkHttpAdapter Adapter; - private readonly IBot Bot; - - public BotController(IBotFrameworkHttpAdapter adapter, IBot bot) - { - Adapter = adapter; - Bot = bot; - } - - [HttpPost, HttpGet] - public async Task PostAsync() - { - // Delegate the processing of the HTTP POST to the adapter. - // The adapter will invoke the bot. - await Adapter.ProcessAsync(Request, Response, Bot); - } -} \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/Program.cs.tpl b/templates/csharp/message-extension-copilot/Program.cs.tpl deleted file mode 100644 index 2d3c0ed0826..00000000000 --- a/templates/csharp/message-extension-copilot/Program.cs.tpl +++ /dev/null @@ -1,45 +0,0 @@ -using {{SafeProjectName}}; -using {{SafeProjectName}}.Search; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Connector.Authentication; - -var builder = WebApplication.CreateBuilder(args); - -builder.Services.AddControllers(); -builder.Services.AddHttpClient("WebClient", client => client.Timeout = TimeSpan.FromSeconds(600)); -builder.Services.AddHttpContextAccessor(); - -// Create the Bot Framework Authentication to be used with the Bot Adapter. -var config = builder.Configuration.Get(); -builder.Configuration["MicrosoftAppType"] = config.BOT_TYPE; -builder.Configuration["MicrosoftAppId"] = config.BOT_ID; -builder.Configuration["MicrosoftAppPassword"] = config.BOT_PASSWORD; -builder.Configuration["MicrosoftAppTenantId"] = config.BOT_TENANT_ID; -builder.Services.AddSingleton(); - -// Create the Bot Framework Adapter with error handling enabled. -builder.Services.AddSingleton(); - -// Create the bot as a transient. In this case the ASP Controller is expecting an IBot. -builder.Services.AddTransient(); - -var app = builder.Build(); - -if (app.Environment.IsDevelopment()) -{ - app.UseDeveloperExceptionPage(); -} -app.UseStaticFiles(); - -app.UseRouting(); - -app.UseAuthentication(); -app.UseAuthorization(); - -app.UseEndpoints(endpoints => -{ - endpoints.MapControllers(); -}); - -app.Run(); \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/Properties/launchSettings.json.tpl b/templates/csharp/message-extension-copilot/Properties/launchSettings.json.tpl deleted file mode 100644 index c6335ce5776..00000000000 --- a/templates/csharp/message-extension-copilot/Properties/launchSettings.json.tpl +++ /dev/null @@ -1,121 +0,0 @@ -{ - "profiles": { -{{^isNewProjectTypeEnabled}} -{{#enableTestToolByDefault}} - // Debug project within Teams App Test Tool - "Teams App Test Tool (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchTestTool": true, - "launchUrl": "http://localhost:56150", - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "TestTool", - "TEAMSFX_NOTIFICATION_STORE_FILENAME": ".notification.testtoolstore.json" - }, - "hotReloadProfile": "aspnetcore" - }, -{{/enableTestToolByDefault}} - // Debug project within Teams - "Microsoft Teams (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", - "applicationUrl": "https://localhost:7130;http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" - }, - // Debug project within Copilot - "Copilot (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://teams.microsoft.com?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", - "applicationUrl": "https://localhost:7130;http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" - }, - // Debug project within Outlook - "Outlook (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "https://outlook.office.com/mail?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", - "applicationUrl": "https://localhost:7130;http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" - }, -{{^enableTestToolByDefault}} - // Debug project within Teams App Test Tool - "Teams App Test Tool (browser)": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchTestTool": true, - "launchUrl": "http://localhost:56150", - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "TestTool", - "TEAMSFX_NOTIFICATION_STORE_FILENAME": ".notification.testtoolstore.json" - }, - "hotReloadProfile": "aspnetcore" - }, -{{/enableTestToolByDefault}} - //// Uncomment following profile to debug project only (without launching Teams) - //, - //"Start Project (not in Teams)": { - // "commandName": "Project", - // "dotnetRunMessages": true, - // "launchBrowser": true, - // "applicationUrl": "https://localhost:7130;http://localhost:5130", - // "environmentVariables": { - // "ASPNETCORE_ENVIRONMENT": "Development" - // }, - // "hotReloadProfile": "aspnetcore" - //} -{{/isNewProjectTypeEnabled}} -{{#isNewProjectTypeEnabled}} -{{#enableTestToolByDefault}} - "Teams App Test Tool": { - "commandName": "Project", - "dotnetRunMessages": true, - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "TestTool", - "TEAMSFX_NOTIFICATION_STORE_FILENAME": ".notification.testtoolstore.json" - }, - "hotReloadProfile": "aspnetcore" - }, -{{/enableTestToolByDefault}} - "Start Project": { - "commandName": "Project", - "dotnetRunMessages": true, - "applicationUrl": "https://localhost:7130;http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "hotReloadProfile": "aspnetcore" - }, -{{^enableTestToolByDefault}} - "Teams App Test Tool": { - "commandName": "Project", - "dotnetRunMessages": true, - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "TestTool", - "TEAMSFX_NOTIFICATION_STORE_FILENAME": ".notification.testtoolstore.json" - }, - "hotReloadProfile": "aspnetcore" - }, -{{/enableTestToolByDefault}} -{{/isNewProjectTypeEnabled}} - } -} diff --git a/templates/csharp/message-extension-copilot/README.md.tpl b/templates/csharp/message-extension-copilot/README.md.tpl deleted file mode 100644 index 1a8748fa9dd..00000000000 --- a/templates/csharp/message-extension-copilot/README.md.tpl +++ /dev/null @@ -1,51 +0,0 @@ -# Welcome to Teams Toolkit! - -## Quick Start - -> **Prerequisites** -> -> To run the app template in your local dev machine, you will need: -> -> - [Visual Studio 2022](https://aka.ms/vs) 17.8 or higher and [install Teams Toolkit](https://aka.ms/install-teams-toolkit-vs). -{{^enableTestToolByDefault}} -> - A [Microsoft 365 account for development](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts). -{{/enableTestToolByDefault}} -> - [Microsoft 365 Copilot license](https://learn.microsoft.com/microsoft-365-copilot/extensibility/prerequisites#prerequisites) - -{{#enableTestToolByDefault}} -1. Press F5 to start debugging which launches your app in Teams App Test Tool using a web browser. -2. You can search NuGet package from compose message area, or from the command box. -{{/enableTestToolByDefault}} -{{^enableTestToolByDefault}} -1. In the debug dropdown menu, select `Dev Tunnels > Create a Tunnel` (set authentication type to Public) or select an existing public dev tunnel. -2. Right-click your project and select `Teams Toolkit > Prepare Teams App Dependencies`. -3. If prompted, sign in with a Microsoft 365 account for the Teams organization you want - to install the app to. -4. To directly trigger the Message Extension in Teams, you can: - 1. In the debug dropdown menu, select `Microsoft Teams (browser)`. - 2. In the launched browser, select the Add button to load the app in Teams. - 3. You can search NuGet package from compose message area, or from the command box. -5. To trigger the Message Extension through Copilot, you can: - 1. In the debug dropdown menu, select `Copilot (browser)`. - 2. When Teams launches in the browser, click the Apps icon from Teams client left rail to open Teams app store and search for Copilot. - 3. Open the `Copilot` app, select `Plugins`, and from the list of plugins, turn on the toggle for your message extension. Now, you can send a prompt to trigger your plugin. - 4. Send a message to Copilot to find an NuGet package information. For example: Find the NuGet package info on Microsoft.CSharp. - > Note: This prompt may not always make Copilot include a response from your message extension. If it happens, try some other prompts or leave a feedback to us by thumbing down the Copilot response and leave a message tagged with [MessageExtension]. -{{/enableTestToolByDefault}} - -> For local debugging using Teams Toolkit CLI, you need to do some extra steps described in [Set up your Teams Toolkit CLI for local debugging](https://aka.ms/teamsfx-cli-debugging). - -{{^enableTestToolByDefault}} -## Debug in Test Tool -Teams App Test Tool allows developers test and debug bots locally without needing Microsoft 365 accounts, development tunnels, or Teams app and bot registration. See https://aka.ms/teams-toolkit-vs-test-tool for more details. -{{/enableTestToolByDefault}} - -## Learn more - -- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin) - -## Report an issue - -Select Visual Studio > Help > Send Feedback > Report a Problem. -Or, you can create an issue directly in our GitHub repository: -https://github.com/OfficeDev/TeamsFx/issues diff --git a/templates/csharp/message-extension-copilot/Resources/helloWorldCard.json b/templates/csharp/message-extension-copilot/Resources/helloWorldCard.json deleted file mode 100644 index dcab7e8a9b7..00000000000 --- a/templates/csharp/message-extension-copilot/Resources/helloWorldCard.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "AdaptiveCard", - "body": [ - { - "type": "TextBlock", - "text": "${name}", - "wrap": true, - "size": "Large" - }, - { - "type": "TextBlock", - "text": "${description}", - "wrap": true, - "size": "Medium" - } - ], - "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", - "version": "1.4" -} diff --git a/templates/csharp/message-extension-copilot/Search/SearchApp.cs.tpl b/templates/csharp/message-extension-copilot/Search/SearchApp.cs.tpl deleted file mode 100644 index b35ecdeacb6..00000000000 --- a/templates/csharp/message-extension-copilot/Search/SearchApp.cs.tpl +++ /dev/null @@ -1,72 +0,0 @@ -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Teams; -using Microsoft.Bot.Schema; -using Microsoft.Bot.Schema.Teams; -using AdaptiveCards; -using Newtonsoft.Json.Linq; - -namespace {{SafeProjectName}}.Search; - -public class SearchApp : TeamsActivityHandler -{ - private readonly string _adaptiveCardFilePath = Path.Combine(".", "Resources", "helloWorldCard.json"); - // Search - protected override async Task OnTeamsMessagingExtensionQueryAsync(ITurnContext turnContext, MessagingExtensionQuery query, CancellationToken cancellationToken) - { - var templateJson = await System.IO.File.ReadAllTextAsync(_adaptiveCardFilePath, cancellationToken); - var template = new AdaptiveCards.Templating.AdaptiveCardTemplate(templateJson); - - var text = query?.Parameters?[0]?.Value as string ?? string.Empty; - var packages = await FindPackages(text); - // We take every row of the results and wrap them in cards wrapped in in MessagingExtensionAttachment objects. - var attachments = packages.Select(package => - { - var previewCard = new ThumbnailCard { Title = package.Item1 }; - - var adaptiveCardJson = template.Expand(new { name = package.Item1, description = package.Item3 }); - var adaptiveCard = AdaptiveCard.FromJson(adaptiveCardJson).Card; - if (!string.IsNullOrEmpty(package.Item5)) - { - previewCard.Images = new List() { new CardImage(package.Item5, "Icon") }; - adaptiveCard.Body.Insert(0, new AdaptiveImage() - { - Url = new Uri(package.Item5), - Style = AdaptiveImageStyle.Person, - Size = AdaptiveImageSize.Small, - }); - } - var attachment = new MessagingExtensionAttachment - { - ContentType = AdaptiveCard.ContentType, - Content = adaptiveCard, - Preview = previewCard.ToAttachment() - }; - - return attachment; - }).ToList(); - - return new MessagingExtensionResponse - { - ComposeExtension = new MessagingExtensionResult - { - Type = "result", - AttachmentLayout = "list", - Attachments = attachments - } - }; - } - - // Generate a set of substrings to illustrate the idea of a set of results coming back from a query. - private async Task> FindPackages(string text) - { - var httpClient = new HttpClient(); - var response = await httpClient.GetStringAsync($"https://azuresearch-usnc.nuget.org/query?q=id:{text}&prerelease=true"); - var obj = JObject.Parse(response); - return obj["data"].Select(item => ( - item["id"].ToString(), - item["version"].ToString(), - item["description"].ToString(), - item["projectUrl"]?.ToString(), - item["iconUrl"]?.ToString())); - } -} \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/appPackage/color.png b/templates/csharp/message-extension-copilot/appPackage/color.png deleted file mode 100644 index 11e255fa0b831ca86ff380e109882ffdca5dc3d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5923 zcmdUzE!S;tIkI1(i7JC%D`W{_2j7|h@a9Eg`&12yHEgW#QwnQNMGd~FaNEOWYC6WST zcZCMu!HEEpWP|_#oED%q`v3HTFuZ|y+lNs+_!4Z~Zjy(d0W_(y1U(XAVUcT^=cKak z4ZM%C#_10i+)r@-G-1{2`)#E4q$U02q38G|njRKtjhY=CL_nXEKKj?@S##X?KE8sr z%UXd=qa@yf%Qq~72`hN09a4Pm^Y)PmK}S)qfiT@GFtBWki31pinT)x9-lrc6hR<$K zQA6-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KEeskPL!+9W3Y{t4x>?rQr7R^ofnk`LU&fu|<>d0U-fh^DQrmA6gl$*>HE8 zSVb1S;4zgvy;DHUNVILODA&95RFb-GMU_8uSE$sb*Kr>yO+mVq$P7(h2(xV5q+a@@GDppSPAlvvQ(qAd4X%ATlM zAUMUBN^4XH?Ru4eIom?vTqLs)AuLx{y>uACJ0k`C-2ePpE|xzHkLV{l|Jf<{-=8;c zHZ-w+E1&52d@WJ=_|Ii9{EgN5&0ztdLC>vJs|8_=`Z-+KR}GUIL=4Bx1H|li37~P` zNaT~?Vx3bK-v+aG)e;+@Nx;iEq0S68-tf+dYxC25Y-FkwBaJ9h|I5JId?o$CO#zp( z_A;6(%AFU26j5lJ?LxTT&k2F)&DA(}gY^&(B|VFV0U2S2C=DzAhp>NZ+LG0pF z$F3c(FJ=Vw?v){<_9V`vw@-rFMH~W^WIL)rIIhK^C!yk4OcX!VTNb4>_cK*9s-1kY z#fIcy)j`|BnTf18c(US{uu&_6*^?dpS`%FU217hOU%wbVH3+s8(OR#uy=%8^G?RWB z_?Nso!tmGSEEY?Rk(xgBwEm4SevfYO!O=ASs+`Rf`z&TvzBb{QfBK9PTIxWW+sHWk zeP~8ShYPo$t|-pVi!wj=oV(+18#U?`9&mbU^LJtrdVGC99E8|H;{QNYO_ zMYzTB+BRtahSBJ4s=5|IvP~$fSuRX%Hd2G9$*WGrcTN1vnHMr^eqqH=mZKAZrayT` zXBdr-LBeMO+Qp8ITRJ8sD;eHRPV*~{Hl@vMRYz+49{W?pI9CA-i3OhS)lw48&VzG} z3E@xJwYSY?7evbU2r3n4BIT)+UiCx4t-3Q(zo|U12zJd zfB~Og9|&86Vk+vmv-Grc`#nb$K>Y;bS9%{yqk{ea60QD^|LRnD@I@=mT{6Vx#;3i_ TvMtV90~2)p5d diff --git a/templates/csharp/message-extension-copilot/appPackage/manifest.json.tpl b/templates/csharp/message-extension-copilot/appPackage/manifest.json.tpl deleted file mode 100644 index f108b453595..00000000000 --- a/templates/csharp/message-extension-copilot/appPackage/manifest.json.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json", - "manifestVersion": "devPreview", - "version": "1.0.0", - "id": "${{TEAMS_APP_ID}}", - "developer": { - "name": "Teams App, Inc.", - "websiteUrl": "https://www.example.com", - "privacyUrl": "https://www.example.com/privacy", - "termsOfUseUrl": "https://www.example.com/termofuse" - }, - "icons": { - "color": "color.png", - "outline": "outline.png" - }, - "name": { - "short": "{{appName}}${{APP_NAME_SUFFIX}}", - "full": "full name for {{appName}}" - }, - "description": { - "short": "Find NuGet package according to the NuGet package name.", - "full": "Find NuGet package according to the NuGet package name." - }, - "accentColor": "#FFFFFF", - "bots": [], - "composeExtensions": [ - { - "botId": "${{BOT_ID}}", - "commands": [ - { - "id": "findNuGetPackage", - "context": [ - "compose", - "commandBox" - ], - "description": "Find NuGet package according to the NuGet package name", - "title": "Find NuGet Package", - "type": "query", - "semanticDescription": "This command retrieves detailed information about a NuGet package using the provided NuGet package name.", - "parameters": [ - { - "name": "NuGetPackageName", - "title": "NuGet Package Name", - "description": "The name of the NuGet package to be searched", - "inputType": "text", - "semanticDescription": "This parameter is used to identify the specific NuGet package to be queried. Users should provide the exact name of the NuGet package they want to retrieve information for as the value of this parameter." - } - ] - } - ] - } - ], - "configurableTabs": [], - "staticTabs": [], - "permissions": [ - "identity", - "messageTeamMembers" - ], - "validDomains": [] -} \ No newline at end of file diff --git a/templates/csharp/message-extension-copilot/appPackage/outline.png b/templates/csharp/message-extension-copilot/appPackage/outline.png deleted file mode 100644 index f7a4c864475f219c8ff252e15ee250cd2308c9f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmVfQ-;iK$xI(f`$oT17L!(LFfcz168`nA*Cc%I0atv-RTUm zZ2wkd832qx#F%V@dJ3`^u!1Jbu|MA-*zqXsjx6)|^3FfFwG`kef*{y-Ind7Q&tc211>U&A`hY=1aJl9Iuetm z$}wv*0hFK%+BrvIsvN?C7pA3{MC8=uea7593GXf-z|+;_E5i;~j+ukPpM7$AJ - - - {{TargetFramework}} - enable - - -{{^isNewProjectTypeEnabled}} - - - - - - - - - -{{/isNewProjectTypeEnabled}} - - - - - - - - - - diff --git a/templates/js/message-extension-copilot/.gitignore b/templates/js/message-extension-copilot/.gitignore deleted file mode 100644 index e82f670672c..00000000000 --- a/templates/js/message-extension-copilot/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# TeamsFx files -# env/.env.*.user -# env/.env.local -.localConfigs -.localConfigs.testTool -.notification.localstore.json -.notification.testtoolstore.json -/devTools -appPackage/build - -# dependencies -node_modules/ - -# misc -.env -.deployment -.DS_Store diff --git a/templates/js/message-extension-copilot/.localConfigs b/templates/js/message-extension-copilot/.localConfigs deleted file mode 100644 index 38398a297a4..00000000000 --- a/templates/js/message-extension-copilot/.localConfigs +++ /dev/null @@ -1,3 +0,0 @@ -# A gitignored place holder file for local runtime configurations -BOT_ID= -BOT_PASSWORD= \ No newline at end of file diff --git a/templates/js/message-extension-copilot/.vscode/extensions.json b/templates/js/message-extension-copilot/.vscode/extensions.json deleted file mode 100644 index aac0a6e3470..00000000000 --- a/templates/js/message-extension-copilot/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "TeamsDevApp.ms-teams-vscode-extension" - ] -} diff --git a/templates/js/message-extension-copilot/.vscode/launch.json.tpl b/templates/js/message-extension-copilot/.vscode/launch.json.tpl deleted file mode 100644 index 8bb8cb138ca..00000000000 --- a/templates/js/message-extension-copilot/.vscode/launch.json.tpl +++ /dev/null @@ -1,293 +0,0 @@ -{ - "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": 4 - }, - "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": 5 - }, - "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 Remote in Copilot (Edge)", - "type": "msedge", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "presentation": { - "group": "group 2: Copilot", - "order": 3 - }, - "internalConsoleOptions": "neverOpen" - }, - { - "name": "Launch Remote in Copilot (Chrome)", - "type": "chrome", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "presentation": { - "group": "group 2: Copilot", - "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", - "perScriptSourcemaps": "yes" - }, - { - "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", - "perScriptSourcemaps": "yes" - }, - { - "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", - "perScriptSourcemaps": "yes" - }, - { - "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", - "perScriptSourcemaps": "yes" - }, - { - "name": "Launch App in Copilot (Edge)", - "type": "msedge", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "cascadeTerminateToConfigurations": [ - "Attach to Local Service" - ], - "presentation": { - "group": "all", - "hidden": true - }, - "internalConsoleOptions": "neverOpen", - "perScriptSourcemaps": "yes" - }, - { - "name": "Launch App in Copilot (Chrome)", - "type": "chrome", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "cascadeTerminateToConfigurations": [ - "Attach to Local Service" - ], - "presentation": { - "group": "all", - "hidden": true - }, - "internalConsoleOptions": "neverOpen", - "perScriptSourcemaps": "yes" - }, - { - "name": "Attach to Local Service", - "type": "node", - "request": "attach", - "port": 9239, - "restart": true, - "presentation": { - "group": "all", - "hidden": true - }, - "internalConsoleOptions": "neverOpen" - }, - { - "name": "Launch Remote in Teams (Desktop)", - "type": "node", - "request": "launch", - "preLaunchTask": "Start Teams App in Desktop Client (Remote)", - "presentation": { - "group": "group 1: Teams", - "order": 6 - }, - "internalConsoleOptions": "neverOpen", - } - ], - "compounds": [ - { - "name": "Debug in Test Tool", - "configurations": [ - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App (Test Tool)", - "presentation": { -{{#enableMETestToolByDefault}} - "group": "group 0: Teams App Test Tool", -{{/enableMETestToolByDefault}} -{{^enableMETestToolByDefault}} - "group": "group 3: Teams App Test Tool", -{{/enableMETestToolByDefault}} - "order": 1 - }, - "stopAll": true - }, - { - "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 Teams (Desktop)", - "configurations": [ - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App in Desktop Client", - "presentation": { - "group": "group 1: Teams", - "order": 3 - }, - "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 - }, - { - "name": "Debug in Copilot (Edge)", - "configurations": [ - "Launch App in Copilot (Edge)", - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App Locally (Copilot)", - "presentation": { - "group": "group 2: Copilot", - "order": 1 - }, - "stopAll": true - }, - { - "name": "Debug in Copilot (Chrome)", - "configurations": [ - "Launch App in Copilot (Chrome)", - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App Locally (Copilot)", - "presentation": { - "group": "group 2: Copilot", - "order": 2 - }, - "stopAll": true - } - ] -} diff --git a/templates/js/message-extension-copilot/.vscode/settings.json b/templates/js/message-extension-copilot/.vscode/settings.json deleted file mode 100644 index 4299620253e..00000000000 --- a/templates/js/message-extension-copilot/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "debug.onTaskErrors": "abort", - "json.schemas": [ - { - "fileMatch": [ - "/aad.*.json" - ], - "schema": {} - } - ] -} diff --git a/templates/js/message-extension-copilot/.vscode/tasks.json b/templates/js/message-extension-copilot/.vscode/tasks.json deleted file mode 100644 index 2e9b16cefcc..00000000000 --- a/templates/js/message-extension-copilot/.vscode/tasks.json +++ /dev/null @@ -1,256 +0,0 @@ -// 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 (Test Tool)", - "dependsOn": [ - "Validate prerequisites (Test Tool)", - "Deploy (Test Tool)", - "Start application (Test Tool)", - "Start Test Tool" - ], - "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 (Test Tool)", - "type": "teamsfx", - "command": "debug-check-prerequisites", - "args": { - "prerequisites": [ - "nodejs", // Validate if Node.js is installed. - "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 - 56150 // test tool port - ] - } - }, - { - // Build project. - // See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args. - "label": "Deploy (Test Tool)", - "type": "teamsfx", - "command": "deploy", - "args": { - "env": "testtool" - } - }, - { - "label": "Start application (Test Tool)", - "type": "shell", - "command": "npm run dev:teamsfx:testtool", - "isBackground": true, - "options": { - "cwd": "${workspaceFolder}" - }, - "problemMatcher": { - "pattern": [ - { - "regexp": "^.*$", - "file": 0, - "location": 1, - "message": 2 - } - ], - "background": { - "activeOnStart": true, - "beginsPattern": "[nodemon] starting", - "endsPattern": "app listening to|Bot/ME service listening at|[nodemon] app crashed" - } - } - }, - { - "label": "Start Test Tool", - "type": "shell", - "command": "npm run dev:teamsfx:launch-testtool", - "isBackground": true, - "options": { - "env": { - "PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin:${env:PATH}" - } - }, - "windows": { - "options": { - "env": { - "PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin;${env:PATH}" - } - } - }, - "problemMatcher": { - "pattern": [ - { - "regexp": "^.*$", - "file": 0, - "location": 1, - "message": 2 - } - ], - "background": { - "activeOnStart": true, - "beginsPattern": ".*", - "endsPattern": "Listening on" - } - }, - "presentation": { - "panel": "dedicated", - "reveal": "silent" - } - }, - { - "label": "Start Teams App Locally", - "dependsOn": [ - "Validate prerequisites", - "Start local tunnel", - "Provision", - "Deploy", - "Start application" - ], - "dependsOrder": "sequence" - }, - { - "label": "Start Teams App Locally (Copilot)", - "dependsOn": [ - "Validate prerequisites", - "Validate Copilot access", - "Start local tunnel", - "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 - ] - } - }, - { - // Check Copilot access. - // See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args. - "label": "Validate Copilot access", - "type": "teamsfx", - "command": "debug-check-prerequisites", - "args": { - "prerequisites": [ - "copilotAccess" // Validate if the account has Copilot access. - ] - } - }, - { - // 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 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": "app listening to|Bot/ME service listening at|[nodemon] app crashed" - } - } - }, - { - "label": "Start Teams App in Desktop Client", - "dependsOn": [ - "Validate prerequisites", - "Start local tunnel", - "Provision", - "Deploy", - "Start application", - "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 Teams App in Desktop Client (Remote)", - "type": "teamsfx", - "command": "launch-desktop-client", - "args": { - "url": "teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true" - } - } - ] -} \ No newline at end of file diff --git a/templates/js/message-extension-copilot/.webappignore b/templates/js/message-extension-copilot/.webappignore deleted file mode 100644 index 50d2cf44848..00000000000 --- a/templates/js/message-extension-copilot/.webappignore +++ /dev/null @@ -1,28 +0,0 @@ -.webappignore -.fx -.deployment -.localConfigs -.localConfigs.testTool -.notification.localstore.json -.notification.testtoolstore.json -/devTools -.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/ diff --git a/templates/js/message-extension-copilot/README.md.tpl b/templates/js/message-extension-copilot/README.md.tpl deleted file mode 100644 index 60a9c618b6c..00000000000 --- a/templates/js/message-extension-copilot/README.md.tpl +++ /dev/null @@ -1,85 +0,0 @@ -# Overview of Custom Search Results template - -This app template is a search-based [message extension](https://docs.microsoft.com/microsoftteams/platform/messaging-extensions/what-are-messaging-extensions?tabs=nodejs) that allows users to search an external system and share results through the compose message area of the Microsoft Teams client. You can now build and run your search-based message extensions in Teams, Copilot for Windows desktop and web experiences. - -## Get started with the template - -> **Prerequisites** -> -> To run the template in your local dev machine, you will need: -> -> - [Node.js](https://nodejs.org/), supported versions: 18, 20 -> - A [Microsoft 365 account for development](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) -> - [Set up your dev environment for extending Teams apps across Microsoft 365](https://aka.ms/teamsfx-m365-apps-prerequisites) -> Please note that after you enrolled your developer tenant in Office 365 Target Release, it may take couple days for the enrollment to take effect. -> - [Teams Toolkit Visual Studio Code Extension](https://aka.ms/teams-toolkit) version 5.0.0 and higher or [Teams Toolkit CLI](https://aka.ms/teamsfx-toolkit-cli) -> - [Microsoft 365 Copilot license](https://learn.microsoft.com/microsoft-365-copilot/extensibility/prerequisites#prerequisites) - -> For local debugging using Teams Toolkit CLI, you need to do some extra steps described in [Set up your Teams Toolkit CLI for local debugging](https://aka.ms/teamsfx-cli-debugging). - -1. First, select the Teams Toolkit icon on the left in the VS Code toolbar. -{{^enableMETestToolByDefault}} -2. In the Account section, sign in with your [Microsoft 365 account](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) if you haven't already. -{{/enableMETestToolByDefault}} -{{#enableMETestToolByDefault}} -3. To directly trigger the Message Extension in Teams App Test Tool, you can: - 1. Press F5 to start debugging which launches your app in Teams App Test Tool using a web browser. Select `Debug in Test Tool`. - 2. When Test Tool launches in the browser, click the `+` in compose message area and select `Search command` to trigger the search commands. -{{/enableMETestToolByDefault}} -3. To directly trigger the Message Extension in Teams, you can: - 1. Press F5 to start debugging which launches your app in Teams using a web browser. Select `Debug in Teams (Edge)` or `Debug in Teams (Chrome)`. - 2. When Teams launches in the browser, select the Add button in the dialog to install your app to Teams. - 3. `@mention` Your message extension from the `search box area`, `@mention` your message extension from the `compose message area` or click the `...` under compose message area to find your message extension. -4. To trigger the Message Extension through Copilot, you can: - 1. Select `Debug in Copilot (Edge)` or `Debug in Copilot (Chrome)` from the launch configuration dropdown. - 2. When Teams launches in the browser, click the `Apps` icon from Teams client left rail to open Teams app store and search for `Copilot`. - 3. Open the `Copilot` app, select `Plugins`, and from the list of plugins, turn on the toggle for your message extension. Now, you can send a prompt to trigger your plugin. - 4. Send a message to Copilot to find an NPM package information. For example: `Find the npm package info on teamsfx-react`. - > Note: This prompt may not always make Copilot include a response from your message extension. If it happens, try some other prompts or leave a feedback to us by thumbing down the Copilot response and leave a message tagged with [MessageExtension]. - -**Congratulations**! You are running an application that can now search npm registries in Teams and Copilot. - -![Search ME Copilot](https://github.com/OfficeDev/TeamsFx/assets/107838226/0beaa86e-d446-4ab3-a701-eec205d1b367) - -## What's included in the template - -| Folder | Contents | -| ------------- | -------------------------------------------- | -| `.vscode/` | VSCode files for debugging | -| `appPackage/` | Templates for the Teams application manifest | -| `env/` | Environment files | -| `infra/` | Templates for provisioning Azure resources | -| `src/` | The source code for the search application | - -The following files can be customized and demonstrate an example implementation to get you started. - -| File | Contents | -| ------------------ | ---------------------------------------------------------------------------------------------- | -| `src/searchApp.js` | Handles the business logic for this app template to query npm registry and return result list. | -| `src/index.js` | `index.js` is used to setup and configure the Message Extension. | - -The following are Teams Toolkit specific project files. You can [visit a complete guide on Github](https://github.com/OfficeDev/TeamsFx/wiki/Teams-Toolkit-Visual-Studio-Code-v5-Guide#overview) to understand how Teams Toolkit works. - -| File | Contents | -| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `teamsapp.yml` | This is the main Teams Toolkit project file. The project file defines two primary things: Properties and configuration Stage definitions. | -| `teamsapp.local.yml` | This overrides `teamsapp.yml` with actions that enable local execution and debugging. | -| `teamsapp.testtool.yml`| This overrides `teamsapp.yml` with actions that enable local execution and debugging in Teams App Test Tool. | - -## Extend the template - -Following documentation will help you to extend the template. - -- [Add or manage the environment](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-multi-env) -- [Create multi-capability app](https://learn.microsoft.com/microsoftteams/platform/toolkit/add-capability) -- [Add single sign on to your app](https://learn.microsoft.com/microsoftteams/platform/toolkit/add-single-sign-on) -- [Access data in Microsoft Graph](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-sdk#microsoft-graph-scenarios) -- [Use an existing Microsoft Entra application](https://learn.microsoft.com/microsoftteams/platform/toolkit/use-existing-aad-app) -- [Customize the Teams app manifest](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-preview-and-customize-app-manifest) -- Host your app in Azure by [provision cloud resources](https://learn.microsoft.com/microsoftteams/platform/toolkit/provision) and [deploy the code to cloud](https://learn.microsoft.com/microsoftteams/platform/toolkit/deploy) -- [Collaborate on app development](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-collaboration) -- [Set up the CI/CD pipeline](https://learn.microsoft.com/microsoftteams/platform/toolkit/use-cicd-template) -- [Publish the app to your organization or the Microsoft Teams app store](https://learn.microsoft.com/microsoftteams/platform/toolkit/publish) -- [Develop with Teams Toolkit CLI](https://aka.ms/teams-toolkit-cli/debug) -- [Preview the app on mobile clients](https://aka.ms/teamsfx-mobile) -- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin) diff --git a/templates/js/message-extension-copilot/appPackage/color.png b/templates/js/message-extension-copilot/appPackage/color.png deleted file mode 100644 index 11e255fa0b831ca86ff380e109882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N1vnHMr^eqqH=mZKAZrayT` zXBdr-LBeMO+Qp8ITRJ8sD;eHRPV*~{Hl@vMRYz+49{W?pI9CA-i3OhS)lw48&VzG} z3E@xJwYSY?7evbU2r3n4BIT)+UiCx4t-3Q(zo|U12zJd zfB~Og9|&86Vk+vmv-Grc`#nb$K>Y;bS9%{yqk{ea60QD^|LRnD@I@=mT{6Vx#;3i_ TvMtV90~2)p5d diff --git a/templates/js/message-extension-copilot/appPackage/manifest.json.tpl b/templates/js/message-extension-copilot/appPackage/manifest.json.tpl deleted file mode 100644 index b5b8e7221c8..00000000000 --- a/templates/js/message-extension-copilot/appPackage/manifest.json.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json", - "manifestVersion": "devPreview", - "version": "1.0.0", - "id": "${{TEAMS_APP_ID}}", - "developer": { - "name": "Teams App, Inc.", - "websiteUrl": "https://www.example.com", - "privacyUrl": "https://www.example.com/privacy", - "termsOfUseUrl": "https://www.example.com/termofuse" - }, - "icons": { - "color": "color.png", - "outline": "outline.png" - }, - "name": { - "short": "{{appName}}${{APP_NAME_SUFFIX}}", - "full": "full name for {{appName}}" - }, - "description": { - "short": "Find npm package by name.", - "full": "Find npm package according to the npm package name." - }, - "accentColor": "#FFFFFF", - "bots": [], - "composeExtensions": [ - { - "botId": "${{BOT_ID}}", - "commands": [ - { - "id": "findNpmPackage", - "context": [ - "compose", - "commandBox" - ], - "description": "Find npm package according to the npm package name", - "title": "Find Npm Package", - "type": "query", - "semanticDescription": "This command retrieves detailed information about an npm package using the provided npm package name.", - "parameters": [ - { - "name": "NpmPackageName", - "title": "Npm Package Name", - "description": "The name of the npm package to be searched", - "inputType": "text", - "semanticDescription": "This parameter is used to identify the specific npm package to be queried. Users should provide the exact name of the npm package they want to retrieve information for as the value of this parameter." - } - ] - } - ] - } - ], - "configurableTabs": [], - "staticTabs": [], - "permissions": [ - "identity", - "messageTeamMembers" - ], - "validDomains": [] -} \ No newline at end of file diff --git a/templates/js/message-extension-copilot/appPackage/outline.png b/templates/js/message-extension-copilot/appPackage/outline.png deleted file mode 100644 index f7a4c864475f219c8ff252e15ee250cd2308c9f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmVfQ-;iK$xI(f`$oT17L!(LFfcz168`nA*Cc%I0atv-RTUm zZ2wkd832qx#F%V@dJ3`^u!1Jbu|MA-*zqXsjx6)|^3FfFwG`kef*{y-Ind7Q&tc211>U&A`hY=1aJl9Iuetm z$}wv*0hFK%+BrvIsvN?C7pA3{MC8=uea7593GXf-z|+;_E5i;~j+ukPpM7$AJ { - // This check writes out errors to console log .vs. app insights. - // NOTE: In production environment, you should consider logging this to Azure - // application insights. See https://aka.ms/bottelemetry for telemetry - // configuration instructions. - console.error(`\n [onTurnError] unhandled error: ${error}`); - - // Send a message to the user - await context.sendActivity(`The bot encountered an unhandled error:\n ${error.message}`); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); -}; - -// Create the bot that will handle incoming messages. -const searchApp = new SearchApp(); - -// Create express application. -const expressApp = express(); -expressApp.use(express.json()); - -const server = expressApp.listen(process.env.port || process.env.PORT || 3978, () => { - console.log(`\nBot Started, ${expressApp.name} listening to`, server.address()); -}); - -// Listen for incoming requests. -expressApp.post("/api/messages", async (req, res) => { - await adapter.process(req, res, async (context) => { - await searchApp.run(context); - }); -}); - -// Gracefully shutdown HTTP server -["exit", "uncaughtException", "SIGINT", "SIGTERM", "SIGUSR1", "SIGUSR2"].forEach((event) => { - process.on(event, () => { - server.close(); - }); -}); diff --git a/templates/js/message-extension-copilot/src/searchApp.js b/templates/js/message-extension-copilot/src/searchApp.js deleted file mode 100644 index 7f8e8e70761..00000000000 --- a/templates/js/message-extension-copilot/src/searchApp.js +++ /dev/null @@ -1,59 +0,0 @@ -const axios = require("axios"); -const querystring = require("querystring"); -const { TeamsActivityHandler, CardFactory } = require("botbuilder"); -const ACData = require("adaptivecards-templating"); -const helloWorldCard = require("./adaptiveCards/helloWorldCard.json"); - -class SearchApp extends TeamsActivityHandler { - constructor() { - super(); - } - - // Message extension Code - // Search. - async handleTeamsMessagingExtensionQuery(context, query) { - const searchQuery = query.parameters[0].value; - - // Due to npmjs search limitations, do not search if input length < 2 - if (searchQuery.length < 2) { - return { - composeExtension: { - type: "result", - attachmentLayout: "list", - attachments: [], - }, - }; - } - - const response = await axios.get( - `http://registry.npmjs.com/-/v1/search?${querystring.stringify({ - text: searchQuery, - size: 8, - })}` - ); - - const attachments = []; - response.data.objects.forEach((obj) => { - const template = new ACData.Template(helloWorldCard); - const card = template.expand({ - $root: { - name: obj.package.name, - description: obj.package.description, - }, - }); - const preview = CardFactory.heroCard(obj.package.name); - const attachment = { ...CardFactory.adaptiveCard(card), preview }; - attachments.push(attachment); - }); - - return { - composeExtension: { - type: "result", - attachmentLayout: "list", - attachments: attachments, - }, - }; - } -} - -module.exports.SearchApp = SearchApp; diff --git a/templates/js/message-extension-copilot/teamsapp.local.yml.tpl b/templates/js/message-extension-copilot/teamsapp.local.yml.tpl deleted file mode 100644 index cc2946b64ab..00000000000 --- a/templates/js/message-extension-copilot/teamsapp.local.yml.tpl +++ /dev/null @@ -1,94 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.7/yaml.schema.json -# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file -# Visit https://aka.ms/teamsfx-actions for details on actions -version: v1.7 - -provision: - # Creates a Teams app - - uses: teamsApp/create - with: - # Teams app name - name: {{appName}}${{APP_NAME_SUFFIX}} - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID - - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - - # Create or update the bot registration on dev.botframework.com - - uses: botFramework/create - with: - botId: ${{BOT_ID}} - name: {{appName}} - messagingEndpoint: ${{BOT_ENDPOINT}}/api/messages - description: "" - channels: - - name: msteams - - name: m365extensions - - # Validate using manifest schema - - uses: teamsApp/validateManifest - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - - # Build Teams app package with latest env value - - uses: teamsApp/zipAppPackage - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputFolder: ./appPackage/build - # Validate app package using validation rules - - uses: teamsApp/validateAppPackage - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - - # Apply the Teams app manifest to an existing Teams app in - # Teams Developer Portal. - # Will use the app id in manifest file to determine which Teams app to update. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID - -deploy: - # Run npm command - - uses: cli/runNpmCommand - name: install dependencies - with: - args: install --no-audit - # Generate runtime environment variables - - uses: file/createOrUpdateEnvironmentFile - with: - target: ./.localConfigs - envs: - BOT_ID: ${{BOT_ID}} - BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} - BOT_TYPE: 'MultiTenant' \ No newline at end of file diff --git a/templates/js/message-extension-copilot/teamsapp.testtool.yml b/templates/js/message-extension-copilot/teamsapp.testtool.yml deleted file mode 100644 index a069dd7de9a..00000000000 --- a/templates/js/message-extension-copilot/teamsapp.testtool.yml +++ /dev/null @@ -1,24 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.3/yaml.schema.json -# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file -# Visit https://aka.ms/teamsfx-actions for details on actions -version: v1.3 - -deploy: - # Install development tool(s) - - uses: devTool/install - with: - testTool: - version: ~0.2.1 - symlinkDir: ./devTools/teamsapptester - - # Run npm command - - uses: cli/runNpmCommand - with: - args: install --no-audit - - # Generate runtime environment variables - - uses: file/createOrUpdateEnvironmentFile - with: - target: ./.localConfigs.testTool - envs: - TEAMSFX_NOTIFICATION_STORE_FILENAME: ${{TEAMSFX_NOTIFICATION_STORE_FILENAME}} \ No newline at end of file diff --git a/templates/js/message-extension-copilot/teamsapp.yml.tpl b/templates/js/message-extension-copilot/teamsapp.yml.tpl deleted file mode 100644 index b9b76961d3b..00000000000 --- a/templates/js/message-extension-copilot/teamsapp.yml.tpl +++ /dev/null @@ -1,136 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.7/yaml.schema.json -# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file -# Visit https://aka.ms/teamsfx-actions for details on actions -version: v1.7 - -environmentFolderPath: ./env - -# Triggered when 'teamsapp provision' is executed -provision: - # Creates a Teams app - - uses: teamsApp/create - with: - # Teams app name - name: {{appName}}${{APP_NAME_SUFFIX}} - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID - - - uses: arm/deploy # Deploy given ARM templates parallelly. - with: - # AZURE_SUBSCRIPTION_ID is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select a subscription. - # Referencing other environment variables with empty values - # will skip the subscription selection prompt. - subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} - # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select or create one - # resource group. - # Referencing other environment variables with empty values - # will skip the resource group selection prompt. - resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} - templates: - - path: ./infra/azure.bicep # Relative path to this file - # Relative path to this yaml file. - # Placeholders will be replaced with corresponding environment - # variable before ARM deployment. - parameters: ./infra/azure.parameters.json - # Required when deploying ARM template - deploymentName: Create-resources-for-me - # Teams Toolkit will download this bicep CLI version from github for you, - # will use bicep CLI in PATH if you remove this config. - bicepCliVersion: v0.9.1 - - # Validate using manifest schema - - uses: teamsApp/validateManifest - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - # Build Teams app package with latest env value - - uses: teamsApp/zipAppPackage - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputFolder: ./appPackage/build - # Validate app package using validation rules - - uses: teamsApp/validateAppPackage - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Apply the Teams app manifest to an existing Teams app in - # Teams Developer Portal. - # Will use the app id in manifest file to determine which Teams app to update. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID - -# Triggered when 'teamsapp deploy' is executed -deploy: - # Run npm command - - uses: cli/runNpmCommand - name: install dependencies - with: - args: install --production - # Deploy your application to Azure App Service using the zip deploy feature. - # For additional details, refer to https://aka.ms/zip-deploy-to-app-services. - - uses: azureAppService/zipDeploy - with: - # Deploy base folder - artifactFolder: . - # Ignore file location, leave blank will ignore nothing - ignoreFile: .webappignore - # The resource id of the cloud resource to be deployed to. - # This key will be generated by arm/deploy action automatically. - # You can replace it with your existing Azure Resource id - # or add it to your environment variable file. - resourceId: ${{BOT_AZURE_APP_SERVICE_RESOURCE_ID}} - -# Triggered when 'teamsapp publish' is executed -publish: - # Validate using manifest schema - - uses: teamsApp/validateManifest - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - # Build Teams app package with latest env value - - uses: teamsApp/zipAppPackage - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputFolder: ./appPackage/build - # Validate app package using validation rules - - uses: teamsApp/validateAppPackage - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Apply the Teams app manifest to an existing Teams app in - # Teams Developer Portal. - # Will use the app id in manifest file to determine which Teams app to update. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Publish the app to - # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) - # for review and approval - - uses: teamsApp/publishAppPackage - with: - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/templates/js/message-extension-copilot/web.config b/templates/js/message-extension-copilot/web.config deleted file mode 100644 index c766d73352c..00000000000 --- a/templates/js/message-extension-copilot/web.config +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/ts/message-extension-copilot/.gitignore b/templates/ts/message-extension-copilot/.gitignore deleted file mode 100644 index b891a68cb1f..00000000000 --- a/templates/ts/message-extension-copilot/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# TeamsFx files -env/.env.*.user -env/.env.local -.localConfigs -.localConfigs.testTool -.notification.localstore.json -.notification.testtoolstore.json -/devTools -appPackage/build - -# dependencies -node_modules/ - -# misc -.env -.deployment -.DS_Store - -# build -lib/ diff --git a/templates/ts/message-extension-copilot/.localConfigs b/templates/ts/message-extension-copilot/.localConfigs deleted file mode 100644 index 38398a297a4..00000000000 --- a/templates/ts/message-extension-copilot/.localConfigs +++ /dev/null @@ -1,3 +0,0 @@ -# A gitignored place holder file for local runtime configurations -BOT_ID= -BOT_PASSWORD= \ No newline at end of file diff --git a/templates/ts/message-extension-copilot/.vscode/extensions.json b/templates/ts/message-extension-copilot/.vscode/extensions.json deleted file mode 100644 index aac0a6e3470..00000000000 --- a/templates/ts/message-extension-copilot/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "TeamsDevApp.ms-teams-vscode-extension" - ] -} diff --git a/templates/ts/message-extension-copilot/.vscode/launch.json.tpl b/templates/ts/message-extension-copilot/.vscode/launch.json.tpl deleted file mode 100644 index 8bb8cb138ca..00000000000 --- a/templates/ts/message-extension-copilot/.vscode/launch.json.tpl +++ /dev/null @@ -1,293 +0,0 @@ -{ - "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": 4 - }, - "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": 5 - }, - "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 Remote in Copilot (Edge)", - "type": "msedge", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "presentation": { - "group": "group 2: Copilot", - "order": 3 - }, - "internalConsoleOptions": "neverOpen" - }, - { - "name": "Launch Remote in Copilot (Chrome)", - "type": "chrome", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "presentation": { - "group": "group 2: Copilot", - "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", - "perScriptSourcemaps": "yes" - }, - { - "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", - "perScriptSourcemaps": "yes" - }, - { - "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", - "perScriptSourcemaps": "yes" - }, - { - "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", - "perScriptSourcemaps": "yes" - }, - { - "name": "Launch App in Copilot (Edge)", - "type": "msedge", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "cascadeTerminateToConfigurations": [ - "Attach to Local Service" - ], - "presentation": { - "group": "all", - "hidden": true - }, - "internalConsoleOptions": "neverOpen", - "perScriptSourcemaps": "yes" - }, - { - "name": "Launch App in Copilot (Chrome)", - "type": "chrome", - "request": "launch", - "url": "https://teams.microsoft.com?${account-hint}", - "cascadeTerminateToConfigurations": [ - "Attach to Local Service" - ], - "presentation": { - "group": "all", - "hidden": true - }, - "internalConsoleOptions": "neverOpen", - "perScriptSourcemaps": "yes" - }, - { - "name": "Attach to Local Service", - "type": "node", - "request": "attach", - "port": 9239, - "restart": true, - "presentation": { - "group": "all", - "hidden": true - }, - "internalConsoleOptions": "neverOpen" - }, - { - "name": "Launch Remote in Teams (Desktop)", - "type": "node", - "request": "launch", - "preLaunchTask": "Start Teams App in Desktop Client (Remote)", - "presentation": { - "group": "group 1: Teams", - "order": 6 - }, - "internalConsoleOptions": "neverOpen", - } - ], - "compounds": [ - { - "name": "Debug in Test Tool", - "configurations": [ - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App (Test Tool)", - "presentation": { -{{#enableMETestToolByDefault}} - "group": "group 0: Teams App Test Tool", -{{/enableMETestToolByDefault}} -{{^enableMETestToolByDefault}} - "group": "group 3: Teams App Test Tool", -{{/enableMETestToolByDefault}} - "order": 1 - }, - "stopAll": true - }, - { - "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 Teams (Desktop)", - "configurations": [ - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App in Desktop Client", - "presentation": { - "group": "group 1: Teams", - "order": 3 - }, - "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 - }, - { - "name": "Debug in Copilot (Edge)", - "configurations": [ - "Launch App in Copilot (Edge)", - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App Locally (Copilot)", - "presentation": { - "group": "group 2: Copilot", - "order": 1 - }, - "stopAll": true - }, - { - "name": "Debug in Copilot (Chrome)", - "configurations": [ - "Launch App in Copilot (Chrome)", - "Attach to Local Service" - ], - "preLaunchTask": "Start Teams App Locally (Copilot)", - "presentation": { - "group": "group 2: Copilot", - "order": 2 - }, - "stopAll": true - } - ] -} diff --git a/templates/ts/message-extension-copilot/.vscode/settings.json b/templates/ts/message-extension-copilot/.vscode/settings.json deleted file mode 100644 index 4299620253e..00000000000 --- a/templates/ts/message-extension-copilot/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "debug.onTaskErrors": "abort", - "json.schemas": [ - { - "fileMatch": [ - "/aad.*.json" - ], - "schema": {} - } - ] -} diff --git a/templates/ts/message-extension-copilot/.vscode/tasks.json b/templates/ts/message-extension-copilot/.vscode/tasks.json deleted file mode 100644 index 2e9b16cefcc..00000000000 --- a/templates/ts/message-extension-copilot/.vscode/tasks.json +++ /dev/null @@ -1,256 +0,0 @@ -// 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 (Test Tool)", - "dependsOn": [ - "Validate prerequisites (Test Tool)", - "Deploy (Test Tool)", - "Start application (Test Tool)", - "Start Test Tool" - ], - "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 (Test Tool)", - "type": "teamsfx", - "command": "debug-check-prerequisites", - "args": { - "prerequisites": [ - "nodejs", // Validate if Node.js is installed. - "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 - 56150 // test tool port - ] - } - }, - { - // Build project. - // See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args. - "label": "Deploy (Test Tool)", - "type": "teamsfx", - "command": "deploy", - "args": { - "env": "testtool" - } - }, - { - "label": "Start application (Test Tool)", - "type": "shell", - "command": "npm run dev:teamsfx:testtool", - "isBackground": true, - "options": { - "cwd": "${workspaceFolder}" - }, - "problemMatcher": { - "pattern": [ - { - "regexp": "^.*$", - "file": 0, - "location": 1, - "message": 2 - } - ], - "background": { - "activeOnStart": true, - "beginsPattern": "[nodemon] starting", - "endsPattern": "app listening to|Bot/ME service listening at|[nodemon] app crashed" - } - } - }, - { - "label": "Start Test Tool", - "type": "shell", - "command": "npm run dev:teamsfx:launch-testtool", - "isBackground": true, - "options": { - "env": { - "PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin:${env:PATH}" - } - }, - "windows": { - "options": { - "env": { - "PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin;${env:PATH}" - } - } - }, - "problemMatcher": { - "pattern": [ - { - "regexp": "^.*$", - "file": 0, - "location": 1, - "message": 2 - } - ], - "background": { - "activeOnStart": true, - "beginsPattern": ".*", - "endsPattern": "Listening on" - } - }, - "presentation": { - "panel": "dedicated", - "reveal": "silent" - } - }, - { - "label": "Start Teams App Locally", - "dependsOn": [ - "Validate prerequisites", - "Start local tunnel", - "Provision", - "Deploy", - "Start application" - ], - "dependsOrder": "sequence" - }, - { - "label": "Start Teams App Locally (Copilot)", - "dependsOn": [ - "Validate prerequisites", - "Validate Copilot access", - "Start local tunnel", - "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 - ] - } - }, - { - // Check Copilot access. - // See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args. - "label": "Validate Copilot access", - "type": "teamsfx", - "command": "debug-check-prerequisites", - "args": { - "prerequisites": [ - "copilotAccess" // Validate if the account has Copilot access. - ] - } - }, - { - // 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 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": "app listening to|Bot/ME service listening at|[nodemon] app crashed" - } - } - }, - { - "label": "Start Teams App in Desktop Client", - "dependsOn": [ - "Validate prerequisites", - "Start local tunnel", - "Provision", - "Deploy", - "Start application", - "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 Teams App in Desktop Client (Remote)", - "type": "teamsfx", - "command": "launch-desktop-client", - "args": { - "url": "teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true" - } - } - ] -} \ No newline at end of file diff --git a/templates/ts/message-extension-copilot/.webappignore b/templates/ts/message-extension-copilot/.webappignore deleted file mode 100644 index 50d2cf44848..00000000000 --- a/templates/ts/message-extension-copilot/.webappignore +++ /dev/null @@ -1,28 +0,0 @@ -.webappignore -.fx -.deployment -.localConfigs -.localConfigs.testTool -.notification.localstore.json -.notification.testtoolstore.json -/devTools -.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/ diff --git a/templates/ts/message-extension-copilot/README.md.tpl b/templates/ts/message-extension-copilot/README.md.tpl deleted file mode 100644 index bff9beea4af..00000000000 --- a/templates/ts/message-extension-copilot/README.md.tpl +++ /dev/null @@ -1,85 +0,0 @@ -# Overview of Custom Search Results template - -This app template is a search-based [message extension](https://docs.microsoft.com/microsoftteams/platform/messaging-extensions/what-are-messaging-extensions?tabs=nodejs) that allows users to search an external system and share results through the compose message area of the Microsoft Teams client. You can now build and run your search-based message extensions in Teams, Copilot for Windows desktop and web experiences. - -## Get started with the template - -> **Prerequisites** -> -> To run the template in your local dev machine, you will need: -> -> - [Node.js](https://nodejs.org/), supported versions: 18, 20 -> - A [Microsoft 365 account for development](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) -> - [Set up your dev environment for extending Teams apps across Microsoft 365](https://aka.ms/teamsfx-m365-apps-prerequisites) -> Please note that after you enrolled your developer tenant in Office 365 Target Release, it may take couple days for the enrollment to take effect. -> - [Teams Toolkit Visual Studio Code Extension](https://aka.ms/teams-toolkit) version 5.0.0 and higher or [Teams Toolkit CLI](https://aka.ms/teamsfx-toolkit-cli) -> - [Microsoft 365 Copilot license](https://learn.microsoft.com/microsoft-365-copilot/extensibility/prerequisites#prerequisites) - -> For local debugging using Teams Toolkit CLI, you need to do some extra steps described in [Set up your Teams Toolkit CLI for local debugging](https://aka.ms/teamsfx-cli-debugging). - -1. First, select the Teams Toolkit icon on the left in the VS Code toolbar. -{{^enableMETestToolByDefault}} -2. In the Account section, sign in with your [Microsoft 365 account](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) if you haven't already. -{{/enableMETestToolByDefault}} -{{#enableMETestToolByDefault}} -3. To directly trigger the Message Extension in Teams App Test Tool, you can: - 1. Press F5 to start debugging which launches your app in Teams App Test Tool using a web browser. Select `Debug in Test Tool`. - 2. When Test Tool launches in the browser, click the `+` in compose message area and select `Search command` to trigger the search commands. -{{/enableMETestToolByDefault}} -3. To directly trigger the Message Extension in Teams, you can: - 1. Press F5 to start debugging which launches your app in Teams using a web browser. Select `Debug in Teams (Edge)` or `Debug in Teams (Chrome)`. - 2. When Teams launches in the browser, select the Add button in the dialog to install your app to Teams. - 3. `@mention` Your message extension from the `search box area`, `@mention` your message extension from the `compose message area` or click the `...` under compose message area to find your message extension. -4. To trigger the Message Extension through Copilot, you can: - 1. Select `Debug in Copilot (Edge)` or `Debug in Copilot (Chrome)` from the launch configuration dropdown. - 2. When Teams launches in the browser, click the `Apps` icon from Teams client left rail to open Teams app store and search for `Copilot`. - 3. Open the `Copilot` app, select `Plugins`, and from the list of plugins, turn on the toggle for your message extension. Now, you can send a prompt to trigger your plugin. - 4. Send a message to Copilot to find an NPM package information. For example: `Find the npm package info on teamsfx-react`. - > Note: This prompt may not always make Copilot include a response from your message extension. If it happens, try some other prompts or leave a feedback to us by thumbing down the Copilot response and leave a message tagged with [MessageExtension]. - -**Congratulations**! You are running an application that can now search npm registries in Teams and Copilot. - -![Search ME Copilot](https://github.com/OfficeDev/TeamsFx/assets/107838226/0beaa86e-d446-4ab3-a701-eec205d1b367) - -## What's included in the template - -| Folder | Contents | -| ------------- | -------------------------------------------- | -| `.vscode/` | VSCode files for debugging | -| `appPackage/` | Templates for the Teams application manifest | -| `env/` | Environment files | -| `infra/` | Templates for provisioning Azure resources | -| `src/` | The source code for the search application | - -The following files can be customized and demonstrate an example implementation to get you started. - -| File | Contents | -| ------------------ | ---------------------------------------------------------------------------------------------- | -| `src/searchApp.ts` | Handles the business logic for this app template to query npm registry and return result list. | -| `src/index.ts` | `index.ts` is used to setup and configure the Message Extension. | - -The following are Teams Toolkit specific project files. You can [visit a complete guide on Github](https://github.com/OfficeDev/TeamsFx/wiki/Teams-Toolkit-Visual-Studio-Code-v5-Guide#overview) to understand how Teams Toolkit works. - -| File | Contents | -| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `teamsapp.yml` | This is the main Teams Toolkit project file. The project file defines two primary things: Properties and configuration Stage definitions. | -| `teamsapp.local.yml` | This overrides `teamsapp.yml` with actions that enable local execution and debugging. | -| `teamsapp.testtool.yml`| This overrides `teamsapp.yml` with actions that enable local execution and debugging in Teams App Test Tool. | - -## Extend the template - -Following documentation will help you to extend the template. - -- [Add or manage the environment](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-multi-env) -- [Create multi-capability app](https://learn.microsoft.com/microsoftteams/platform/toolkit/add-capability) -- [Add single sign on to your app](https://learn.microsoft.com/microsoftteams/platform/toolkit/add-single-sign-on) -- [Access data in Microsoft Graph](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-sdk#microsoft-graph-scenarios) -- [Use an existing Microsoft Entra application](https://learn.microsoft.com/microsoftteams/platform/toolkit/use-existing-aad-app) -- [Customize the Teams app manifest](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-preview-and-customize-app-manifest) -- Host your app in Azure by [provision cloud resources](https://learn.microsoft.com/microsoftteams/platform/toolkit/provision) and [deploy the code to cloud](https://learn.microsoft.com/microsoftteams/platform/toolkit/deploy) -- [Collaborate on app development](https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-collaboration) -- [Set up the CI/CD pipeline](https://learn.microsoft.com/microsoftteams/platform/toolkit/use-cicd-template) -- [Publish the app to your organization or the Microsoft Teams app store](https://learn.microsoft.com/microsoftteams/platform/toolkit/publish) -- [Develop with Teams Toolkit CLI](https://aka.ms/teams-toolkit-cli/debug) -- [Preview the app on mobile clients](https://aka.ms/teamsfx-mobile) -- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin) diff --git a/templates/ts/message-extension-copilot/appPackage/color.png b/templates/ts/message-extension-copilot/appPackage/color.png deleted file mode 100644 index 11e255fa0b831ca86ff380e109882ffdca5dc3d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5923 zcmdUzE!S;tIkI1(i7JC%D`W{_2j7|h@a9Eg`&12yHEgW#QwnQNMGd~FaNEOWYC6WST zcZCMu!HEEpWP|_#oED%q`v3HTFuZ|y+lNs+_!4Z~Zjy(d0W_(y1U(XAVUcT^=cKak z4ZM%C#_10i+)r@-G-1{2`)#E4q$U02q38G|njRKtjhY=CL_nXEKKj?@S##X?KE8sr z%UXd=qa@yf%Qq~72`hN09a4Pm^Y)PmK}S)qfiT@GFtBW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~K1I+?LG%;-gxKGX z+ln3yJKEeskPL!+9W3Y{t4x>?rQr7R^ofnk`LU&fu|<>d0U-fh^DQrmA6gl$*>HE8 zSVb1S;4zgvy;DHUNVILODA&95RFb-GMU_8uSE$sb*Kr>yO+mVq$P7(h2(xV5q+a@@GDppSPAlvvQ(qAd4X%ATlM zAUMUBN^4XH?Ru4eIom?vTqLs)AuLx{y>uACJ0k`C-2ePpE|xzHkLV{l|Jf<{-=8;c zHZ-w+E1&52d@WJ=_|Ii9{EgN5&0ztdLC>vJs|8_=`Z-+KR}GUIL=4Bx1H|li37~P` zNaT~?Vx3bK-v+aG)e;+@Nx;iEq0S68-tf+dYxC25Y-FkwBaJ9h|I5JId?o$CO#zp( z_A;6(%AFU26j5lJ?LxTT&k2F)&DA(}gY^&(B|VFV0U2S2C=DzAhp>NZ+LG0pF z$F3c(FJ=Vw?v){<_9V`vw@-rFMH~W^WIL)rIIhK^C!yk4OcX!VTNb4>_cK*9s-1kY z#fIcy)j`|BnTf18c(US{uu&_6*^?dpS`%FU217hOU%wbVH3+s8(OR#uy=%8^G?RWB z_?Nso!tmGSEEY?Rk(xgBwEm4SevfYO!O=ASs+`Rf`z&TvzBb{QfBK9PTIxWW+sHWk zeP~8ShYPo$t|-pVi!wj=oV(+18#U?`9&mbU^LJtrdVGC99E8|H;{QNYO_ zMYzTB+BRtahSBJ4s=5|IvP~$fSuRX%Hd2G9$*WGrcTN1vnHMr^eqqH=mZKAZrayT` zXBdr-LBeMO+Qp8ITRJ8sD;eHRPV*~{Hl@vMRYz+49{W?pI9CA-i3OhS)lw48&VzG} z3E@xJwYSY?7evbU2r3n4BIT)+UiCx4t-3Q(zo|U12zJd zfB~Og9|&86Vk+vmv-Grc`#nb$K>Y;bS9%{yqk{ea60QD^|LRnD@I@=mT{6Vx#;3i_ TvMtV90~2)p5d diff --git a/templates/ts/message-extension-copilot/appPackage/manifest.json.tpl b/templates/ts/message-extension-copilot/appPackage/manifest.json.tpl deleted file mode 100644 index b5b8e7221c8..00000000000 --- a/templates/ts/message-extension-copilot/appPackage/manifest.json.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json", - "manifestVersion": "devPreview", - "version": "1.0.0", - "id": "${{TEAMS_APP_ID}}", - "developer": { - "name": "Teams App, Inc.", - "websiteUrl": "https://www.example.com", - "privacyUrl": "https://www.example.com/privacy", - "termsOfUseUrl": "https://www.example.com/termofuse" - }, - "icons": { - "color": "color.png", - "outline": "outline.png" - }, - "name": { - "short": "{{appName}}${{APP_NAME_SUFFIX}}", - "full": "full name for {{appName}}" - }, - "description": { - "short": "Find npm package by name.", - "full": "Find npm package according to the npm package name." - }, - "accentColor": "#FFFFFF", - "bots": [], - "composeExtensions": [ - { - "botId": "${{BOT_ID}}", - "commands": [ - { - "id": "findNpmPackage", - "context": [ - "compose", - "commandBox" - ], - "description": "Find npm package according to the npm package name", - "title": "Find Npm Package", - "type": "query", - "semanticDescription": "This command retrieves detailed information about an npm package using the provided npm package name.", - "parameters": [ - { - "name": "NpmPackageName", - "title": "Npm Package Name", - "description": "The name of the npm package to be searched", - "inputType": "text", - "semanticDescription": "This parameter is used to identify the specific npm package to be queried. Users should provide the exact name of the npm package they want to retrieve information for as the value of this parameter." - } - ] - } - ] - } - ], - "configurableTabs": [], - "staticTabs": [], - "permissions": [ - "identity", - "messageTeamMembers" - ], - "validDomains": [] -} \ No newline at end of file diff --git a/templates/ts/message-extension-copilot/appPackage/outline.png b/templates/ts/message-extension-copilot/appPackage/outline.png deleted file mode 100644 index f7a4c864475f219c8ff252e15ee250cd2308c9f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmVfQ-;iK$xI(f`$oT17L!(LFfcz168`nA*Cc%I0atv-RTUm zZ2wkd832qx#F%V@dJ3`^u!1Jbu|MA-*zqXsjx6)|^3FfFwG`kef*{y-Ind7Q&tc211>U&A`hY=1aJl9Iuetm z$}wv*0hFK%+BrvIsvN?C7pA3{MC8=uea7593GXf-z|+;_E5i;~j+ukPpM7$AJ { - // This check writes out errors to console log .vs. app insights. - // NOTE: In production environment, you should consider logging this to Azure - // application insights. - console.error(`\n [onTurnError] unhandled error: ${error}`); - - // Send a trace activity, which will be displayed in Bot Framework Emulator - await context.sendTraceActivity( - "OnTurnError Trace", - `${error}`, - "https://www.botframework.com/schemas/error", - "TurnError" - ); - - // Send a message to the user - await context.sendActivity(`The bot encountered unhandled error:\n ${error.message}`); - await context.sendActivity("To continue to run this bot, please fix the bot source code."); -}; - -// Set the onTurnError for the singleton CloudAdapter. -adapter.onTurnError = onTurnErrorHandler; - -// Create the bot that will handle incoming messages. -const searchApp = new SearchApp(); - -// Create express application. -const expressApp = express(); -expressApp.use(express.json()); - -const server = expressApp.listen(process.env.port || process.env.PORT || 3978, () => { - console.log(`\nBot Started, ${expressApp.name} listening to`, server.address()); -}); - -// Listen for incoming requests. -expressApp.post("/api/messages", async (req, res) => { - await adapter.process(req, res, async (context) => { - await searchApp.run(context); - }); -}); diff --git a/templates/ts/message-extension-copilot/src/searchApp.ts b/templates/ts/message-extension-copilot/src/searchApp.ts deleted file mode 100644 index 6e7c6de2e28..00000000000 --- a/templates/ts/message-extension-copilot/src/searchApp.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { default as axios } from "axios"; -import * as querystring from "querystring"; -import { - TeamsActivityHandler, - CardFactory, - TurnContext, - MessagingExtensionQuery, - MessagingExtensionResponse, -} from "botbuilder"; -import * as ACData from "adaptivecards-templating"; -import helloWorldCard from "./adaptiveCards/helloWorldCard.json"; - -export class SearchApp extends TeamsActivityHandler { - constructor() { - super(); - } - - // Search. - public async handleTeamsMessagingExtensionQuery( - context: TurnContext, - query: MessagingExtensionQuery - ): Promise { - const searchQuery = query.parameters[0].value; - - // Due to npmjs search limitations, do not search if input length < 2 - if (searchQuery.length < 2) { - return { - composeExtension: { - type: "result", - attachmentLayout: "list", - attachments: [], - }, - }; - } - - const response = await axios.get( - `http://registry.npmjs.com/-/v1/search?${querystring.stringify({ - text: searchQuery, - size: 8, - })}` - ); - - const attachments = []; - response.data.objects.forEach((obj) => { - const template = new ACData.Template(helloWorldCard); - const card = template.expand({ - $root: { - name: obj.package.name, - description: obj.package.description, - }, - }); - const preview = CardFactory.heroCard(obj.package.name); - const attachment = { ...CardFactory.adaptiveCard(card), preview }; - attachments.push(attachment); - }); - - return { - composeExtension: { - type: "result", - attachmentLayout: "list", - attachments: attachments, - }, - }; - } -} diff --git a/templates/ts/message-extension-copilot/teamsapp.local.yml.tpl b/templates/ts/message-extension-copilot/teamsapp.local.yml.tpl deleted file mode 100644 index 2297caa3b3d..00000000000 --- a/templates/ts/message-extension-copilot/teamsapp.local.yml.tpl +++ /dev/null @@ -1,95 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.7/yaml.schema.json -# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file -# Visit https://aka.ms/teamsfx-actions for details on actions -version: v1.7 - -provision: - # Creates a Teams app - - uses: teamsApp/create - with: - # Teams app name - name: {{appName}}${{APP_NAME_SUFFIX}} - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID - - # Create or reuse an existing Microsoft Entra application for bot. - - uses: aadApp/create - with: - # The Microsoft Entra application's display name - name: {{appName}}${{APP_NAME_SUFFIX}} - generateClientSecret: true - signInAudience: AzureADMultipleOrgs - writeToEnvironmentFile: - # The Microsoft Entra application's client id created for bot. - clientId: BOT_ID - # The Microsoft Entra application's client secret created for bot. - clientSecret: SECRET_BOT_PASSWORD - # The Microsoft Entra application's object id created for bot. - objectId: BOT_OBJECT_ID - - # Create or update the bot registration on dev.botframework.com - - uses: botFramework/create - with: - botId: ${{BOT_ID}} - name: {{appName}} - messagingEndpoint: ${{BOT_ENDPOINT}}/api/messages - description: "" - channels: - - name: msteams - - name: m365extensions - - # Validate using manifest schema - - uses: teamsApp/validateManifest - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - - # Build Teams app package with latest env value - - uses: teamsApp/zipAppPackage - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputFolder: ./appPackage/build - # Validate app package using validation rules - - uses: teamsApp/validateAppPackage - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - - # Apply the Teams app manifest to an existing Teams app in - # Teams Developer Portal. - # Will use the app id in manifest file to determine which Teams app to update. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID - -deploy: - # Run npm command - - uses: cli/runNpmCommand - name: install dependencies - with: - args: install --no-audit - - # Generate runtime environment variables - - uses: file/createOrUpdateEnvironmentFile - with: - target: ./.localConfigs - envs: - BOT_ID: ${{BOT_ID}} - BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} - BOT_TYPE: 'MultiTenant' diff --git a/templates/ts/message-extension-copilot/teamsapp.testtool.yml b/templates/ts/message-extension-copilot/teamsapp.testtool.yml deleted file mode 100644 index a069dd7de9a..00000000000 --- a/templates/ts/message-extension-copilot/teamsapp.testtool.yml +++ /dev/null @@ -1,24 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.3/yaml.schema.json -# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file -# Visit https://aka.ms/teamsfx-actions for details on actions -version: v1.3 - -deploy: - # Install development tool(s) - - uses: devTool/install - with: - testTool: - version: ~0.2.1 - symlinkDir: ./devTools/teamsapptester - - # Run npm command - - uses: cli/runNpmCommand - with: - args: install --no-audit - - # Generate runtime environment variables - - uses: file/createOrUpdateEnvironmentFile - with: - target: ./.localConfigs.testTool - envs: - TEAMSFX_NOTIFICATION_STORE_FILENAME: ${{TEAMSFX_NOTIFICATION_STORE_FILENAME}} \ No newline at end of file diff --git a/templates/ts/message-extension-copilot/teamsapp.yml.tpl b/templates/ts/message-extension-copilot/teamsapp.yml.tpl deleted file mode 100644 index 87252116560..00000000000 --- a/templates/ts/message-extension-copilot/teamsapp.yml.tpl +++ /dev/null @@ -1,140 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.7/yaml.schema.json -# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file -# Visit https://aka.ms/teamsfx-actions for details on actions -version: v1.7 - -environmentFolderPath: ./env - -# Triggered when 'teamsapp provision' is executed -provision: - # Creates a Teams app - - uses: teamsApp/create - with: - # Teams app name - name: {{appName}}${{APP_NAME_SUFFIX}} - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID - - - uses: arm/deploy # Deploy given ARM templates parallelly. - with: - # AZURE_SUBSCRIPTION_ID is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select a subscription. - # Referencing other environment variables with empty values - # will skip the subscription selection prompt. - subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} - # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select or create one - # resource group. - # Referencing other environment variables with empty values - # will skip the resource group selection prompt. - resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} - templates: - - path: ./infra/azure.bicep # Relative path to this file - # Relative path to this yaml file. - # Placeholders will be replaced with corresponding environment - # variable before ARM deployment. - parameters: ./infra/azure.parameters.json - # Required when deploying ARM template - deploymentName: Create-resources-for-me - # Teams Toolkit will download this bicep CLI version from github for you, - # will use bicep CLI in PATH if you remove this config. - bicepCliVersion: v0.9.1 - - # Validate using manifest schema - - uses: teamsApp/validateManifest - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - # Build Teams app package with latest env value - - uses: teamsApp/zipAppPackage - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputFolder: ./appPackage/build - # Validate app package using validation rules - - uses: teamsApp/validateAppPackage - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Apply the Teams app manifest to an existing Teams app in - # Teams Developer Portal. - # Will use the app id in manifest file to determine which Teams app to update. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Extend your Teams app to Outlook and the Microsoft 365 app - - uses: teamsApp/extendToM365 - with: - # Relative path to the build app package. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - titleId: M365_TITLE_ID - appId: M365_APP_ID - -# Triggered when 'teamsapp deploy' is executed -deploy: - # Run npm command - - uses: cli/runNpmCommand - name: install dependencies - with: - args: install - - uses: cli/runNpmCommand - name: build app - with: - args: run build --if-present - # Deploy your application to Azure App Service using the zip deploy feature. - # For additional details, refer to https://aka.ms/zip-deploy-to-app-services. - - uses: azureAppService/zipDeploy - with: - # Deploy base folder - artifactFolder: . - # Ignore file location, leave blank will ignore nothing - ignoreFile: .webappignore - # The resource id of the cloud resource to be deployed to. - # This key will be generated by arm/deploy action automatically. - # You can replace it with your existing Azure Resource id - # or add it to your environment variable file. - resourceId: ${{BOT_AZURE_APP_SERVICE_RESOURCE_ID}} - -# Triggered when 'teamsapp publish' is executed -publish: - # Validate using manifest schema - - uses: teamsApp/validateManifest - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - # Build Teams app package with latest env value - - uses: teamsApp/zipAppPackage - with: - # Path to manifest template - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputFolder: ./appPackage/build - # Validate app package using validation rules - - uses: teamsApp/validateAppPackage - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Apply the Teams app manifest to an existing Teams app in - # Teams Developer Portal. - # Will use the app id in manifest file to determine which Teams app to update. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Publish the app to - # Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) - # for review and approval - - uses: teamsApp/publishAppPackage - with: - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - # Write the information of created resources into environment file for - # the specified environment variable(s). - writeToEnvironmentFile: - publishedAppId: TEAMS_APP_PUBLISHED_APP_ID diff --git a/templates/ts/message-extension-copilot/tsconfig.json b/templates/ts/message-extension-copilot/tsconfig.json deleted file mode 100644 index 385a05ba674..00000000000 --- a/templates/ts/message-extension-copilot/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "target": "es2017", - "module": "commonjs", - "outDir": "./lib", - "rootDir": "./", - "moduleResolution": "nodenext", - "sourceMap": true, - "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo", - "resolveJsonModule": true, - "esModuleInterop": true, - } -} diff --git a/templates/ts/message-extension-copilot/web.config b/templates/ts/message-extension-copilot/web.config deleted file mode 100644 index 28463f64d9d..00000000000 --- a/templates/ts/message-extension-copilot/web.config +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -