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

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.

docs/docs/cmd/pp/copilot/copilot-get.mdx Outdated Show resolved Hide resolved
docs/docs/cmd/pp/copilot/copilot-list.mdx Outdated Show resolved Hide resolved
docs/docs/cmd/pp/copilot/copilot-list.mdx Outdated Show resolved Hide resolved
docs/docs/cmd/pp/copilot/copilot-remove.mdx Outdated Show resolved Hide resolved
src/m365/pp/commands/copilot/copilot-get.ts Show resolved Hide resolved
src/m365/pp/commands/copilot/copilot-list.ts Show resolved Hide resolved
src/m365/pp/commands/copilot/copilot-list.spec.ts Outdated Show resolved Hide resolved
docs/docs/cmd/pp/copilot/copilot-get.mdx Show resolved Hide resolved
@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
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.

Let's do a couple of changes to finish it.

Comment on lines 140 to 143
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.

Let's remove this test.

@@ -88,22 +92,23 @@ class PpChatbotGetCommand extends PowerPlatformCommand {
}

public async commandAction(logger: Logger, args: CommandArgs): Promise<void> {
await this.showDeprecationWarning(logger, "pp chatbot get", "pp copilot get");
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 use the command names from the command file commands.CHATBOT_GET and commands.COPILOT_GET.

Comment on lines 186 to 189
it('defines alias', () => {
const alias = command.alias();
assert.notStrictEqual(typeof alias, 'copilot');
});
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 remove this test.

@@ -54,8 +58,9 @@ class PpChatbotListCommand extends PowerPlatformCommand {
}

public async commandAction(logger: Logger, args: CommandArgs): Promise<void> {
await this.showDeprecationWarning(logger, "pp chatbot list", "pp copilot list");
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 use the command names from the command file.

Comment on lines 87 to 90
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.

Let's remove this test.

@@ -90,45 +94,46 @@ class PpChatbotRemoveCommand extends PowerPlatformCommand {
}

public async commandAction(logger: Logger, args: CommandArgs): Promise<void> {
await this.showDeprecationWarning(logger, "pp chatbot remove", "pp copilot remove");
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 use command names from the command file.

Comment on lines 52 to 54
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-')];
}

@milanholemans milanholemans marked this pull request as draft November 10, 2024 22:31
@ktskumar ktskumar marked this pull request as ready for review November 13, 2024 00:49
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.

Nothing more to add!

@milanholemans
Copy link
Contributor

Merged manually, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Add copilot alias to chatbot commands
2 participants