Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Added copilot alias to chatbot commands #6386

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/docs/about/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,8 @@ sidebar_position: 3

**Power Platform:**

- [pp chatbot get](../cmd/pp/chatbot/chatbot-get.mdx) - get information about the specified chatbot [#4107](https://github.com/pnp/cli-microsoft365/issues/4107)
- [pp chatbot remove](../cmd/pp/chatbot/chatbot-remove.mdx) - removes the specified chatbot [#4106](https://github.com/pnp/cli-microsoft365/issues/4106)
- [pp chatbot get](../cmd/pp/copilot/copilot-get.mdx) - get information about the specified chatbot [#4107](https://github.com/pnp/cli-microsoft365/issues/4107)
- [pp chatbot remove](../cmd/pp/copilot/copilot-remove.mdx) - removes the specified chatbot [#4106](https://github.com/pnp/cli-microsoft365/issues/4106)
- [pp dataverse table row list](../cmd/pp/dataverse/dataverse-table-row-list.mdx) - lists table rows for the given Dataverse table [#3791](https://github.com/pnp/cli-microsoft365/issues/3791)
- [pp solution publisher add](../cmd/pp/solution/solution-publisher-add.mdx) - adds a specified publisher in a given environment [#3977](https://github.com/pnp/cli-microsoft365/issues/3977)
- [pp dataverse table row remove](../cmd/pp/dataverse/dataverse-table-row-remove.mdx) - removes a row from a dataverse table in a given environment [#4030](https://github.com/pnp/cli-microsoft365/issues/4030)
Expand Down Expand Up @@ -1273,7 +1273,7 @@ sidebar_position: 3

- [pp card clone](../cmd/pp/card/card-clone.mdx) - clones a specific Microsoft Power Platform card in the specified Power Platform environment [#3790](https://github.com/pnp/cli-microsoft365/issues/3790)
- [pp card remove](../cmd/pp/card/card-remove.mdx) - removes the specified Microsoft Power Platform card in the specified Power Platform environment [#3781](https://github.com/pnp/cli-microsoft365/issues/3781)
- [pp chatbot list](../cmd/pp/chatbot/chatbot-list.mdx) - lists Microsoft Power Platform chatbot in the specified Power Platform environment [#3650](https://github.com/pnp/cli-microsoft365/issues/3650)
- [pp chatbot list](../cmd/pp/copilot/copilot-list.mdx) - lists Microsoft Power Platform chatbot in the specified Power Platform environment [#3650](https://github.com/pnp/cli-microsoft365/issues/3650)
- [pp dataverse table get](../cmd/pp/dataverse/dataverse-table-get.mdx) - lists a dataverse table in a given environment [#3726](https://github.com/pnp/cli-microsoft365/issues/3726)
- [pp dataverse table remove](../cmd/pp/dataverse/dataverse-table-remove.mdx) - removes a dataverse table in a given environment [#4031](https://github.com/pnp/cli-microsoft365/issues/4031)
- [pp solution remove](../cmd/pp/solution/solution-remove.mdx) - removes the specified solution in the specified Power Platform environment [#3723](https://github.com/pnp/cli-microsoft365/issues/3723)
Expand Down
milanholemans marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# pp chatbot get
# pp copilot get

Get information about the specified chatbot
Get information about the specified copilot

## Usage

```sh
m365 pp copilot get [options]
```

## Alias

```sh
m365 pp chatbot get [options]
```
Expand All @@ -19,10 +25,10 @@ m365 pp chatbot get [options]
: The name of the environment.

`-i, --id [id]`
: The id of the chatbot. Specify either `id` or `name` but not both.
: The id of the copilot. Specify either `id` or `name` but not both.

`-n, --name [name]`
: The name of the chatbot. Specify either `id` or `name` but not both.
: The name of the copilot. Specify either `id` or `name` but not both.

`--asAdmin`
: Run the command as admin for environments you do not have explicitly assigned permissions to.
Expand All @@ -32,28 +38,28 @@ m365 pp chatbot get [options]

## Examples

Get a specific chatbot in a specific environment based on name.
Get a specific copilot in a specific environment based on name.

```sh
m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --name "CLI 365 Chatbot"
m365 pp copilot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --name "CLI 365 Copilot"
```

Get a specific chatbot in a specific environment based on name as admin.
Get a specific copilot in a specific environment based on name as admin.

```sh
m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --name "CLI 365 Chatbot" --asAdmin
m365 pp copilot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --name "CLI 365 Copilot" --asAdmin
```

Get a specific chatbot in a specific environment based on id.
Get a specific copilot in a specific environment based on id.

```sh
m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893"
m365 pp copilot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893"
```

Get a specific chatbot in a specific environment based on id as admin.
Get a specific copilot in a specific environment based on id as admin.

```sh
m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893" --asAdmin
m365 pp copilot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893" --asAdmin
```

## Response
Expand All @@ -71,7 +77,7 @@ m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd5
"schemaname": "new_bot_23f5f58697fd43d595eb451c9797a53d",
"_ownerid_value": "5fa787c1-1c4d-ed11-bba1-000d3a2caf7f",
"overwritetime": "1900-01-01T00:00:00Z",
"name": "CLI 365 Chatbot",
"name": "CLI 365 Copilot",
"solutionid": "fd140aae-4df4-11dd-bd17-0019b9312238",
"ismanaged": false,
"versionnumber": 1421457,
Expand Down Expand Up @@ -119,7 +125,7 @@ m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd5
botid : 3a081d91-5ea8-40a7-8ac9-abbaa3fcb893
createdon : 2022-11-19T10:42:22Z
modifiedon : 2022-11-19T10:42:24Z
name : CLI 365 Chatbot
name : CLI 365 Copilot
publishedon: 2022-11-19T10:43:24Z
```

Expand All @@ -128,18 +134,18 @@ m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd5

```csv
name,botid,publishedon,createdon,modifiedon
CLI 365 Chatbot,3a081d91-5ea8-40a7-8ac9-abbaa3fcb893,2022-11-19T10:43:24Z,2022-11-19T10:42:22Z,2022-11-19T10:42:24Z
CLI 365 Copilot,3a081d91-5ea8-40a7-8ac9-abbaa3fcb893,2022-11-19T10:43:24Z,2022-11-19T10:42:22Z,2022-11-19T10:42:24Z
```

</TabItem>
<TabItem value="Markdown">

```md
# pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893"
# pp copilot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893"

Date: 9/1/2023

## CLI 365 Chatbot
## CLI 365 Copilot

Property | Value
---------|-------
Expand All @@ -151,7 +157,7 @@ m365 pp chatbot get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd5
schemaname | new\_bot\_23f5f58697fd43d595eb451c9797a53d
\_ownerid\_value | 5fa787c1-1c4d-ed11-bba1-000d3a2caf7f
overwritetime | 1900-01-01T00:00:00Z
name | CLI 365 Chatbot
name | CLI 365 Copilot
solutionid | fd140aae-4df4-11dd-bd17-0019b9312238
ismanaged | false
versionnumber | 1445843
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# pp chatbot list
# pp copilot list

Lists Microsoft Power Platform chatbot in the specified Power Platform environment
Lists Microsoft Power Platform copilots in the specified Power Platform environment

## Usage

```sh
m365 pp copilot list [options]
```

## Alias

```sh
m365 pp chatbot list [options]
```
Expand All @@ -26,16 +32,16 @@ m365 pp chatbot list [options]

## Examples

List chatbots in a specific environment.
List copilots in a specific environment.

```sh
m365 pp chatbot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5"
m365 pp copilot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5"
```

List chatbots in a specific environment as admin.
List copilots in a specific environment as admin.

```sh
m365 pp chatbot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --asAdmin
m365 pp copilot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --asAdmin
```

## Response
Expand All @@ -59,7 +65,7 @@ m365 pp chatbot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd
"isManaged": false,
"versionNumber": 1429641,
"timezoneRuleVersionNumber": 0,
"name": "CLI Chatbot",
"name": "CLI Copilot",
"statusCode": 1,
"owner": "Doe, John",
"overwriteTime": "1900-01-01T00:00:00Z",
Expand All @@ -77,28 +83,28 @@ m365 pp chatbot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd
<TabItem value="Text">

```text
name botid publishedOn createdOn botModifiedOn
------------ ------------------------------------ -------------------- -------------------- --------------------
CLI Chatbot 23f5f586-97fd-43d5-95eb-451c9797a53d 2022-11-19T19:19:53Z 2022-11-19T10:42:22Z 2022-11-19T20:19:57Z
name botid publishedOn createdOn botModifiedOn
----------- ------------------------------------ -------------------- -------------------- --------------------
CLI Copilot 23f5f586-97fd-43d5-95eb-451c9797a53d 2022-11-19T19:19:53Z 2022-11-19T10:42:22Z 2022-11-19T20:19:57Z
```

</TabItem>
<TabItem value="CSV">

```csv
name,botid,publishedOn,createdOn,botModifiedOn
CLI Chatbot,23f5f586-97fd-43d5-95eb-451c9797a53d,2022-11-19T19:19:53Z,2022-11-19T10:42:22Z,2022-11-19T20:19:57Z
CLI Copilot,23f5f586-97fd-43d5-95eb-451c9797a53d,2022-11-19T19:19:53Z,2022-11-19T10:42:22Z,2022-11-19T20:19:57Z
```

</TabItem>
<TabItem value="Markdown">

```md
# pp chatbot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5"
# pp copilot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5"

Date: 9/1/2023

## CLI Chatbot
## CLI Copilot

Property | Value
---------|-------
Expand All @@ -115,7 +121,7 @@ m365 pp chatbot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd
isManaged | false
versionNumber | 1429641
timezoneRuleVersionNumber | 0
name | CLI Chatbot
name | CLI Copilot
statusCode | 1
owner | Doe, John
overwriteTime | 1900-01-01T00:00:00Z
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import Global from '/docs/cmd/_global.mdx';

# pp chatbot remove
# pp copilot remove

Removes the specified chatbot
Removes the specified copilot

## Usage

```sh
m365 pp copilot remove [options]
```

## Alias

```sh
m365 pp chatbot remove [options]
```
Expand All @@ -17,10 +23,10 @@ m365 pp chatbot remove [options]
: The name of the environment.

`-i, --id [id]`
: The id of the chatbot. Specify either `id` or `name` but not both.
: The id of the copilot. Specify either `id` or `name` but not both.

`-n, --name [name]`
: The name of the chatbot. Specify either `id` or `name` but not both.
: The name of the copilot. Specify either `id` or `name` but not both.

`--asAdmin`
: Run the command as admin for environments you do not have explicitly assigned permissions to.
Expand All @@ -33,22 +39,22 @@ m365 pp chatbot remove [options]

## Examples

Removes the specified Microsoft Power Platform chatbot owned by the currently signed-in user based on name
Removes the specified Microsoft Power Platform copilot owned by the currently signed-in user based on name

```sh
m365 pp chatbot remove --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name "Chatbot Name"
m365 pp copilot remove --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name "Chatbot Name"
```

Removes the specified Microsoft Power Platform chatbot owned by the currently signed-in user based on id without confirmation
Removes the specified Microsoft Power Platform copilot owned by the currently signed-in user based on id without confirmation

```sh
m365 pp chatbot remove --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --id 9d9a13d0-6255-ed11-bba2-000d3adf774e --force
m365 pp copilot remove --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --id 9d9a13d0-6255-ed11-bba2-000d3adf774e --force
```

Removes the specified Microsoft Power Platform chatbot owned by another user based on name
Removes the specified Microsoft Power Platform copilot owned by another user based on name

```sh
m365 pp chatbot remove --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name "Chatbot Name" --asAdmin
m365 pp copilot remove --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name "Chatbot Name" --asAdmin
```

## Response
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/v7-upgrade-guidance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Besides that, when using JSON output, we had duplicate properties in the result.

### Updated output of `pp chatbot list`

The output of [pp chatbot list](./cmd/pp/chatbot/chatbot-list.mdx) contained a `displayName` property. However, the actual property coming from the API was called `name`. We changed `displayName` back to `name` so that it now aligns with the other chatbot commands where a `name` option can be used and a `name` property may be returned.
The output of [pp chatbot list](./cmd/pp/copilot/copilot-list.mdx) contained a `displayName` property. However, the actual property coming from the API was called `name`. We changed `displayName` back to `name` so that it now aligns with the other chatbot commands where a `name` option can be used and a `name` property may be returned.

#### What action do I need to take?

Expand Down Expand Up @@ -447,9 +447,9 @@ Command|Old option|New option
[pp card get](./cmd/pp/card/card-get.mdx)|`environment`|`environmentName`
[pp card list](./cmd/pp/card/card-list.mdx)|`environment`|`environmentName`
[pp card remove](./cmd/pp/card/card-remove.mdx)|`environment`|`environmentName`
[pp chatbot get](./cmd/pp/chatbot/chatbot-get.mdx)|`environment`|`environmentName`
[pp chatbot list](./cmd/pp/chatbot/chatbot-list.mdx)|`environment`|`environmentName`
[pp chatbot remove](./cmd/pp/chatbot/chatbot-remove.mdx)|`environment`|`environmentName`
[pp chatbot get](./cmd/pp/copilot/copilot-get.mdx)|`environment`|`environmentName`
[pp chatbot list](./cmd/pp/copilot/copilot-list.mdx)|`environment`|`environmentName`
[pp chatbot remove](./cmd/pp/copilot/copilot-remove.mdx)|`environment`|`environmentName`
[pp dataverse table get](./cmd/pp/dataverse/dataverse-table-get.mdx)|`environment`|`environmentName`
[pp dataverse table list](./cmd/pp/dataverse/dataverse-table-list.mdx)|`environment`|`environmentName`
[pp dataverse table remove](./cmd/pp/dataverse/dataverse-table-remove.mdx)|`environment`|`environmentName`
Expand Down
3 changes: 3 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ const config: Config = {
'client-redirects',
{
createRedirects(routePath) {
if (routePath.includes('/copilot')) {
return [routePath.replace('/copilot', '/chatbot')];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (routePath.includes('/copilot')) {
return [routePath.replace('/copilot', '/chatbot')];
}
if (routePath.includes('/copilot/copilot-')) {
return [routePath.replace('/copilot/copilot-', '/chatbot/chatbot-')];
}

if (routePath.includes('/entra')) {
return [routePath.replace('/entra', '/aad')];
}
Expand Down
14 changes: 7 additions & 7 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1657,21 +1657,21 @@ const sidebars: SidebarsConfig = {
]
},
{
chatbot: [
copilot: [
{
type: 'doc',
label: 'chatbot get',
id: 'cmd/pp/chatbot/chatbot-get'
label: 'copilot get',
id: 'cmd/pp/copilot/copilot-get'
},
{
type: 'doc',
label: 'chatbot list',
id: 'cmd/pp/chatbot/chatbot-list'
label: 'copliot list',
id: 'cmd/pp/copilot/copilot-list'
},
{
type: 'doc',
label: 'chatbot remove',
id: 'cmd/pp/chatbot/chatbot-remove'
label: 'copilot remove',
id: 'cmd/pp/copilot/copilot-remove'
}
]
},
Expand Down
3 changes: 3 additions & 0 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ describe('Lazy loading commands', () => {
'consent',
'flow connector export',
'flow connector list',
'pp chatbot get',
'pp chatbot list',
'pp chatbot remove',
'search externalconnection add',
'search externalconnection get',
'search externalconnection list',
Expand Down
3 changes: 3 additions & 0 deletions src/m365/pp/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default {
CHATBOT_GET: `${prefix} chatbot get`,
CHATBOT_LIST: `${prefix} chatbot list`,
CHATBOT_REMOVE: `${prefix} chatbot remove`,
COPILOT_GET: `${prefix} copilot get`,
COPILOT_LIST: `${prefix} copilot list`,
COPILOT_REMOVE: `${prefix} copilot remove`,
DATAVERSE_TABLE_LIST: `${prefix} dataverse table list`,
DATAVERSE_TABLE_GET: `${prefix} dataverse table get`,
DATAVERSE_TABLE_REMOVE: `${prefix} dataverse table remove`,
Expand Down
Loading