Skip to content

Commit

Permalink
refactor: remove declarativecopilot flag in template (#13134)
Browse files Browse the repository at this point in the history
* refactor: remove declarativecopilot flag in template

* refactor: minor
  • Loading branch information
yuqizhou77 authored Feb 6, 2025
1 parent f28a649 commit b42b88d
Show file tree
Hide file tree
Showing 57 changed files with 715 additions and 2,768 deletions.
63 changes: 0 additions & 63 deletions templates/common/api-plugin-existing-api/.vscode/launch.json.tpl
Original file line number Diff line number Diff line change
@@ -1,65 +1,3 @@
{{^DeclarativeCopilot}}
{
"version": "0.2.0",
"configurations": [
{
"name": "Preview in the Microsoft 365 app (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://www.office.com/chat?auth=2&developerMode=Basic",
"presentation": {
"group": "group 1: the Microsoft 365 app",
"order": 1
},
"internalConsoleOptions": "neverOpen",
"runtimeArgs": [
"--remote-debugging-port=9222",
"--no-first-run",
"--user-data-dir=${env:TEMP}/copilot-msedge-user-data-dir"
]
},
{
"name": "Preview in the Microsoft 365 app (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://www.office.com/chat?auth=2&developerMode=Basic",
"presentation": {
"group": "group 1: the Microsoft 365 app",
"order": 2
},
"internalConsoleOptions": "neverOpen",
"runtimeArgs": [
"--remote-debugging-port=9223",
"--no-first-run",
"--user-data-dir=${env:TEMP}/copilot-chrome-user-data-dir"
]
},
{
"name": "Preview in Teams (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://teams.microsoft.com?${account-hint}",
"presentation": {
"group": "group 2: Teams",
"order": 1
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Preview in Teams (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://teams.microsoft.com?${account-hint}",
"presentation": {
"group": "group 2: Teams",
"order": 2
},
"internalConsoleOptions": "neverOpen"
}
]
}
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
{
"version": "0.2.0",
"configurations": [
Expand Down Expand Up @@ -97,5 +35,4 @@
}
]
}
{{/DeclarativeCopilot}}

35 changes: 2 additions & 33 deletions templates/common/api-plugin-existing-api/README.md.tpl
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
{{^DeclarativeCopilot}}
# Overview of the API Plugin template

## Build an API Plugin from OpenAPI description document

With Copilot extensibility, you can augment Microsoft 365 Copilot with custom skills and organizational knowledge specific to your enterprise and users to enable truly spectacular AI scenarios. For example:

- Retrieve real-time information, for example, latest news coverage on a product launch.
- Retrieve knowledge-based information, for example, my team’s design files in Figma.

When you extend Microsoft 365 Copilot, you maximize the efficiency of your apps and data with AI, by:

- Enriching the data estate of your enterprise with industry-leading AI.
- Keeping your users in the flow of their work, start to finish.
- Inheriting world-class security, compliance, and privacy policies.

![image](https://github.com/user-attachments/assets/1c125380-a935-4f65-a3b8-e8b9a646f3bc)
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
# Overview of the basic declarative agent with API plugin template

## Build a basic declarative agent with API plugin
Expand All @@ -27,7 +8,6 @@ You can extend declarative agents using plugins to retrieve data and execute tas

![image](https://github.com/user-attachments/assets/9939972e-0449-410c-b237-d9d748cd6628)

{{/DeclarativeCopilot}}

## Get started with the template

Expand All @@ -44,15 +24,8 @@ You can extend declarative agents using plugins to retrieve data and execute tas
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.
3. Create Teams app by clicking `Provision` in "Lifecycle" section.
4. Select `Preview in Copilot (Edge)` or `Preview in Copilot (Chrome)` from the launch configuration dropdown.
{{^DeclarativeCopilot}}
4. When Teams launches in the browser, open the `Copilot` app.
5. Select `Plugins`, and from the list of plugins, turn on the toggle for your plugin. Now, you can send a prompt to trigger your plugin.
> Note: Please make sure to switch to New Teams when Teams web client has launched
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
4. Select your declarative agent from the `Copilot` app.
5. Send a prompt.
{{/DeclarativeCopilot}}
5. Select your declarative agent from the `Copilot` app.
6. Send a prompt.

{{#ApiKey}}
> [!NOTE]
Expand Down Expand Up @@ -86,15 +59,13 @@ You can extend declarative agents using plugins to retrieve data and execute tas
| `.vscode` | VSCode files for debugging |
| `appPackage` | Templates for the Teams application manifest, the plugin manifest and the API specification |
| `env` | Environment files |
{{#DeclarativeCopilot}}

The following files can be customized and demonstrate an example implementation to get you started.

| File | Contents |
| ------------------------------------ | ------------------------------------------------------------------------------ |
| `appPackage/declarativeCopilot.json` | Define the behaviour and configurations of the declarative agent. |
| `appPackage/manifest.json` | Teams application manifest that defines metadata for your declarative agent. |
{{/DeclarativeCopilot}}

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.

Expand All @@ -104,9 +75,7 @@ The following are Teams Toolkit specific project files. You can [visit a complet

## Addition information and references

{{#DeclarativeCopilot}}
- [Declarative agents for Microsoft 365](https://aka.ms/teams-toolkit-declarative-agent)
{{/DeclarativeCopilot}}
- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin)
- [Message extensions for Microsoft 365 Copilot](https://learn.microsoft.com/microsoft-365-copilot/extensibility/overview-message-extension-bot)
- [Microsoft Graph Connectors for Microsoft 365 Copilot](https://learn.microsoft.com/microsoft-365-copilot/extensibility/overview-graph-connector)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"full": "Full description for {{appName}}"
},
"accentColor": "#FFFFFF",
{{#DeclarativeCopilot}}
"copilotAgents": {
"declarativeAgents": [
{
Expand All @@ -31,7 +30,6 @@
}
]
},
{{/DeclarativeCopilot}}
"permissions": [
"identity",
"messageTeamMembers"
Expand Down
5 changes: 0 additions & 5 deletions templates/csharp/api-plugin-existing-api/README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@ to install the app to.

## Learn more

{{^DeclarativeCopilot}}
- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin)
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
- [Declarative agents for Microsoft 365](https://aka.ms/teams-toolkit-declarative-agent)
{{/DeclarativeCopilot}}

## Report an issue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"full": "Full description for {{appName}}"
},
"accentColor": "#FFFFFF",
{{#DeclarativeCopilot}}
"copilotAgents": {
"declarativeAgents": [
{
Expand All @@ -31,7 +30,6 @@
}
]
},
{{/DeclarativeCopilot}}
"permissions": [
"identity",
"messageTeamMembers"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@

<ItemGroup>
<ProjectCapability Include="TeamsFx" />
{{#DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
{{/DeclarativeCopilot}}
{{^DeclarativeCopilot}}
<ProjectCapability Include="ApiPlugin" />
{{/DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
</ItemGroup>

<ItemGroup>
Expand All @@ -25,12 +20,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" Sdk="Microsoft.TeamsFx.Sdk">
<ItemGroup>
{{#DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
{{/DeclarativeCopilot}}
{{^DeclarativeCopilot}}
<ProjectCapability Include="ApiPlugin" />
{{/DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
</ItemGroup>
<ItemGroup>
<ProjectCapability Include="ProjectConfigurationsDeclaredDimensions" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
## Get more info
{{^DeclarativeCopilot}}
- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin)
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
- [Declarative agents for Microsoft 365](https://aka.ms/teams-toolkit-declarative-agent)
{{/DeclarativeCopilot}}
## Report an issue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
{
"profiles": {
{{^DeclarativeCopilot}}
// Launch project within the Microsoft 365 app
"Microsoft 365 app (browser)": {
"commandName": "Project",
"launchUrl": "https://www.office.com/chat?auth=2",
},
// Launch project within Teams
"Microsoft Teams (browser)": {
"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}}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
</ItemGroup>
<ItemGroup>
<ProjectCapability Include="ProjectConfigurationsDeclaredDimensions" />
{{#DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
{{/DeclarativeCopilot}}
{{^DeclarativeCopilot}}
<ProjectCapability Include="ApiPlugin" />
{{/DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@
## Learn more
{{^DeclarativeCopilot}}
- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin)
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
- [Declarative agents for Microsoft 365](https://aka.ms/teams-toolkit-declarative-agent)
{{/DeclarativeCopilot}}
## Report an issue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,12 @@
},
"accentColor": "#FFFFFF",
"copilotAgents": {
{{^DeclarativeCopilot}}
"plugins": [
{
"id": "plugin_1",
"file": "ai-plugin.json"
}
]
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
"declarativeAgents": [
{
"id": "repairDeclarativeAgent",
"file": "repairDeclarativeAgent.json"
}
]
{{/DeclarativeCopilot}}
},
"permissions": [
"identity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,29 +107,8 @@ provision:
target: ./Properties/launchSettings.json
content:
profiles:
{{^DeclarativeCopilot}}
Microsoft 365 app (browser):
commandName: "Project"
dotnetRunMessages: true
launchBrowser: true
launchUrl: "https://www.office.com/chat?auth=2"
environmentVariables:
ASPNETCORE_ENVIRONMENT: "Development"
hotReloadProfile: "aspnetcore"
Microsoft Teams (browser):
commandName: "Project"
commandLineArgs: "host start --port 5130 --pause-on-error"
dotnetRunMessages: true
launchBrowser: true
launchUrl: "https://teams.microsoft.com?appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}"
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}}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
{{^isNewProjectTypeEnabled}}
<ItemGroup>
<ProjectCapability Include="TeamsFx" />
{{#DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
{{/DeclarativeCopilot}}
{{^DeclarativeCopilot}}
<ProjectCapability Include="ApiPlugin" />
{{/DeclarativeCopilot}}
<ProjectCapability Include="DeclarativeAgent" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@
## Get more info

{{^DeclarativeCopilot}}
- [Extend Microsoft 365 Copilot](https://aka.ms/teamsfx-copilot-plugin)
{{/DeclarativeCopilot}}
{{#DeclarativeCopilot}}
- [Declarative agents for Microsoft 365](https://aka.ms/teams-toolkit-declarative-agent)
{{/DeclarativeCopilot}}

## Report an issue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
{
"profiles": {
{{^DeclarativeCopilot}}
// Launch project within the Microsoft 365 app
"Microsoft 365 app (browser)": {
"commandName": "Project",
"launchUrl": "https://www.office.com/chat?auth=2",
},
// Launch project within Teams
"Microsoft Teams (browser)": {
"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}}
}
}
Loading

0 comments on commit b42b88d

Please sign in to comment.