From 54baef299be6a61ec1aec1abbeb42e4112d3a2b5 Mon Sep 17 00:00:00 2001 From: Yimin-Jin Date: Wed, 15 Jan 2025 11:17:12 +0800 Subject: [PATCH] feat: add deep link for DA templates --- .../.{{NewProjectTypeName}}/launchSettings.json.tpl | 9 +++++++++ .../teamsapp.local.yml.tpl | 8 ++++++++ .../.{{NewProjectTypeName}}/launchSettings.json.tpl | 9 +++++++++ .../api-plugin-from-scratch-oauth/teamsapp.local.yml.tpl | 8 ++++++++ .../.{{NewProjectTypeName}}/launchSettings.json.tpl | 9 +++++++++ .../api-plugin-from-scratch/teamsapp.local.yml.tpl | 8 ++++++++ 6 files changed, 51 insertions(+) diff --git a/templates/csharp/api-plugin-from-scratch-bearer/.{{NewProjectTypeName}}/launchSettings.json.tpl b/templates/csharp/api-plugin-from-scratch-bearer/.{{NewProjectTypeName}}/launchSettings.json.tpl index 5a205e99ea..9a22b969e0 100644 --- a/templates/csharp/api-plugin-from-scratch-bearer/.{{NewProjectTypeName}}/launchSettings.json.tpl +++ b/templates/csharp/api-plugin-from-scratch-bearer/.{{NewProjectTypeName}}/launchSettings.json.tpl @@ -1,5 +1,6 @@ { "profiles": { + {{^DeclarativeCopilot}} // Launch project within the Microsoft 365 app "Microsoft 365 app (browser)": { "commandName": "Project", @@ -10,5 +11,13 @@ "commandName": "Project", "launchUrl": "https://teams.microsoft.com?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", } + {{/DeclarativeCopilot}} + {{#DeclarativeCopilot}} + // Launch project within Copilot + "Copilot (browser)": { + "commandName": "Project", + "launchUrl": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${{AGENT_HINT}}?auth=2" + } + {{/DeclarativeCopilot}} } } \ No newline at end of file diff --git a/templates/csharp/api-plugin-from-scratch-bearer/teamsapp.local.yml.tpl b/templates/csharp/api-plugin-from-scratch-bearer/teamsapp.local.yml.tpl index a680aa3d0f..e40ce95754 100644 --- a/templates/csharp/api-plugin-from-scratch-bearer/teamsapp.local.yml.tpl +++ b/templates/csharp/api-plugin-from-scratch-bearer/teamsapp.local.yml.tpl @@ -107,6 +107,7 @@ provision: target: ./Properties/launchSettings.json content: profiles: + {{^DeclarativeCopilot}} Microsoft 365 app (browser): commandName: "Project" dotnetRunMessages: true @@ -124,4 +125,11 @@ provision: environmentVariables: ASPNETCORE_ENVIRONMENT: "Development" hotReloadProfile: "aspnetcore" + {{/DeclarativeCopilot}} + {{#DeclarativeCopilot}} + "Copilot (browser)": { + "commandName": "Project", + "launchUrl": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${{AGENT_HINT}}?auth=2" + } + {{/DeclarativeCopilot}} {{/isNewProjectTypeEnabled}} diff --git a/templates/csharp/api-plugin-from-scratch-oauth/.{{NewProjectTypeName}}/launchSettings.json.tpl b/templates/csharp/api-plugin-from-scratch-oauth/.{{NewProjectTypeName}}/launchSettings.json.tpl index 5a205e99ea..9a22b969e0 100644 --- a/templates/csharp/api-plugin-from-scratch-oauth/.{{NewProjectTypeName}}/launchSettings.json.tpl +++ b/templates/csharp/api-plugin-from-scratch-oauth/.{{NewProjectTypeName}}/launchSettings.json.tpl @@ -1,5 +1,6 @@ { "profiles": { + {{^DeclarativeCopilot}} // Launch project within the Microsoft 365 app "Microsoft 365 app (browser)": { "commandName": "Project", @@ -10,5 +11,13 @@ "commandName": "Project", "launchUrl": "https://teams.microsoft.com?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", } + {{/DeclarativeCopilot}} + {{#DeclarativeCopilot}} + // Launch project within Copilot + "Copilot (browser)": { + "commandName": "Project", + "launchUrl": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${{AGENT_HINT}}?auth=2" + } + {{/DeclarativeCopilot}} } } \ No newline at end of file diff --git a/templates/csharp/api-plugin-from-scratch-oauth/teamsapp.local.yml.tpl b/templates/csharp/api-plugin-from-scratch-oauth/teamsapp.local.yml.tpl index ed82963eeb..822959f267 100644 --- a/templates/csharp/api-plugin-from-scratch-oauth/teamsapp.local.yml.tpl +++ b/templates/csharp/api-plugin-from-scratch-oauth/teamsapp.local.yml.tpl @@ -163,6 +163,7 @@ provision: target: ./Properties/launchSettings.json content: profiles: + {{^DeclarativeCopilot}} Microsoft 365 app (browser): commandName: "Project" dotnetRunMessages: true @@ -180,4 +181,11 @@ provision: environmentVariables: ASPNETCORE_ENVIRONMENT: "Development" hotReloadProfile: "aspnetcore" + {{/DeclarativeCopilot}} + {{#DeclarativeCopilot}} + "Copilot (browser)": { + "commandName": "Project", + "launchUrl": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${{AGENT_HINT}}?auth=2" + } + {{/DeclarativeCopilot}} {{/isNewProjectTypeEnabled}} \ No newline at end of file diff --git a/templates/csharp/api-plugin-from-scratch/.{{NewProjectTypeName}}/launchSettings.json.tpl b/templates/csharp/api-plugin-from-scratch/.{{NewProjectTypeName}}/launchSettings.json.tpl index 5a205e99ea..9a22b969e0 100644 --- a/templates/csharp/api-plugin-from-scratch/.{{NewProjectTypeName}}/launchSettings.json.tpl +++ b/templates/csharp/api-plugin-from-scratch/.{{NewProjectTypeName}}/launchSettings.json.tpl @@ -1,5 +1,6 @@ { "profiles": { + {{^DeclarativeCopilot}} // Launch project within the Microsoft 365 app "Microsoft 365 app (browser)": { "commandName": "Project", @@ -10,5 +11,13 @@ "commandName": "Project", "launchUrl": "https://teams.microsoft.com?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}", } + {{/DeclarativeCopilot}} + {{#DeclarativeCopilot}} + // Launch project within Copilot + "Copilot (browser)": { + "commandName": "Project", + "launchUrl": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${{AGENT_HINT}}?auth=2" + } + {{/DeclarativeCopilot}} } } \ No newline at end of file diff --git a/templates/csharp/api-plugin-from-scratch/teamsapp.local.yml.tpl b/templates/csharp/api-plugin-from-scratch/teamsapp.local.yml.tpl index 59d1b63208..5006626691 100644 --- a/templates/csharp/api-plugin-from-scratch/teamsapp.local.yml.tpl +++ b/templates/csharp/api-plugin-from-scratch/teamsapp.local.yml.tpl @@ -60,6 +60,7 @@ provision: target: ./Properties/launchSettings.json content: profiles: + {{^DeclarativeCopilot}} Microsoft 365 app (browser): commandName: "Project" dotnetRunMessages: true @@ -77,4 +78,11 @@ provision: environmentVariables: ASPNETCORE_ENVIRONMENT: "Development" hotReloadProfile: "aspnetcore" + {{/DeclarativeCopilot}} + {{#DeclarativeCopilot}} + "Copilot (browser)": { + "commandName": "Project", + "launchUrl": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${{AGENT_HINT}}?auth=2" + } + {{/DeclarativeCopilot}} {{/isNewProjectTypeEnabled}} \ No newline at end of file