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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ktskumar
Copy link
Contributor

Closes #6261

Enhancement:
Updated below commands,

[☑] Rename pp chatbot get to pp copilot get
[☑] Add alias pp chatbot get to renamed command
[☑] Rename pp chatbot list to pp copilot list
[☑] Add alias pp chatbot list to renamed command
[☑] Rename pp chatbot remove to pp copilot remove
[☑] Add alias pp chatbot remove to renamed command

@milanholemans
Copy link
Contributor

Hi @ktskumar, could you fix the error in the docs? Seems like you'll have to update the navigation nodes to the pages.

   These sidebar document ids do not exist:
  - cmd/pp/chatbot/chatbot-get
  - cmd/pp/chatbot/chatbot-list
  - cmd/pp/chatbot/chatbot-remove

@milanholemans milanholemans marked this pull request as draft September 25, 2024 22:29
@ktskumar ktskumar marked this pull request as ready for review September 25, 2024 23:15
@ktskumar
Copy link
Contributor Author

ktskumar commented Sep 26, 2024

Hi @milanholemans, I have updated the navigation code. Pls review it

@milanholemans
Copy link
Contributor

Hi @milanholemans, I have updated the navigation code. Pls review it

Seems like there are still broken links in the release notes, could you have a look at it?

@milanholemans milanholemans marked this pull request as draft September 26, 2024 08:10
@ktskumar ktskumar marked this pull request as ready for review September 26, 2024 11:24
@milanholemans milanholemans self-assigned this Oct 17, 2024
Copy link
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

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

Nice start, let's do a couple of improvements before we merge it.

m365 pp copilot get [options]
```

## alias
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's start with an uppercase letter.

m365 pp copilot list [options]
```

## alias
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's start with an uppercase letter.

@@ -79,26 +85,26 @@ m365 pp chatbot list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd
```text
name botid publishedOn createdOn botModifiedOn
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the headers are a bit out of sync. Can you fix that as well?

m365 pp copilot remove [options]
```

## alias
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's start with an uppercase letter.

@@ -89,21 +93,21 @@ class PpChatbotGetCommand extends PowerPlatformCommand {

public async commandAction(logger: Logger, args: CommandArgs): Promise<void> {
if (this.verbose) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As first thing to do, let's log a deprecation message to notify our users that the old name will go away. You can use the this.showDeprecationWarning(...) for this.

@@ -55,7 +59,7 @@ class PpChatbotListCommand extends PowerPlatformCommand {

public async commandAction(logger: Logger, args: CommandArgs): Promise<void> {
if (this.verbose) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's log a deprecation message here as well.


it('defines alias', () => {
const alias = command.alias();
assert.notStrictEqual(typeof alias, 'undefined');
Copy link
Contributor

Choose a reason for hiding this comment

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

If we check for an alias, let's use an exact match on the old name.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also add a docs redirect from the old chatbot URLs to the new Copilot URLs:

'client-redirects',
{
createRedirects(routePath) {
if (routePath.includes('/entra')) {
return [routePath.replace('/entra', '/aad')];
}
return [];
}
} satisfies ClientRedirectsOptions

@milanholemans milanholemans marked this pull request as draft October 17, 2024 20:20
@ktskumar ktskumar marked this pull request as ready for review October 19, 2024 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Add copilot alias to chatbot commands
2 participants