microsoft / kiota

OpenAPI based HTTP Client code generator
https://aka.ms/kiota/docs
MIT License
2.83k stars 194 forks source link

Adjust selection options in VS Code extension to make "Copilot Plugin" more prominent #5109

Open maisarissi opened 1 month ago

maisarissi commented 1 month ago

The Copilot Plugin option shall become more prominent in the selection wizard in VS Code extension.

Expected

The selection options and flow shall be as described in the comment below #5109

Acceptance Criteria

Kiota Commands
├── Generate
│   ├── Client
│   │   ├── Create a new API Client - Class name
│   │   ├── Create a new API Client - Namespace 
│   │   ├── Create a new API client - Output directory
│   │   |   ├── Choose default
│   │   |   └── Browse
│   │   └── Pick a language
│   ├── Copilot plugin
│   │   └── Create a new plugin - Plugin name 
│   │   └── Create a new plugin - Output directory
│   │       ├── Choose default
│   │       └── Browse
│   └── Other
│       ├── Choose a type
│       │   ├── API Manifest
│       │   │   ├── Create a new manifest - Manifest name
│       │   │   └── Create a new manifest - Output directory
│       │   │       ├── Choose default
│       │   │       └── Browse
│       │   └── Open AI Plugin
│       │       └── Create a new OpenAI plugin - Output directory
│       │           ├── Choose default
│       │           └── Browse
└── ...
baywet commented 1 month ago

@maisarissi I'm a bit surprised by this request. Historically, we made a point to have parity between the CLI and the vscode extension capabilities so we don´t end up locking people out. I understand that in a TTK integration context, you'd like to have as few questions as possible. In that context, may I suggest we make this question a parameter for the deeplink, so the integrations can provide an answer for the user (and the user skips the question) instead?

maisarissi commented 1 month ago

@baywet for the deeplink integration, for sure, we shouldn't ask the question. But I also believe that even for one coming to Kiota VS Code extension to create a new plugin, because Copilot won't work properly with OpenAI, we might want just to generate the API Plugin.

baywet commented 1 month ago

I understand that Copilot can't ingest OpenAI plugins definitions today (probably ever). What's surprising to me here is this issue appears to request removing the ability to generate OpenAI plugins from the extension all together? Creating inconsistencies with the CLI experience.

Right now we have the following questions when you click on generate:

  1. What do you want to generate? (Client/plugin/manifest)
  2. Name?
  3. Plugin Type? (API Plugin/OpenAI plugin)

Let's start with the fact that a "manifest" is also a plugin in the CLI and the difference here is odd at best, which I pointed multiple times over.

Now, I understand you'd like to have Copilot plugins generation being one of the most obvious choices instead of having it buried somewhere. What do you think about this instead.

We'd ask the following questions when you click on generate (Copilot flow):

  1. What do you want to generate? (Client/Copilot Plugin/API Plugin)
  2. Name?

And the following questions when you click generate (manifest/OpenAI flow):

  1. What do you want to generate? (Client/Copilot Plugin/API Plugin)
  2. Name?
  3. Plugin type? (OpenAI plugin/API manifest)

This way we achieve:

maisarissi commented 1 month ago

We'd ask the following questions when you click on generate (Copilot flow):

  1. What do you want to generate? (Client/Copilot Plugin/API Plugin)
  2. Name?

Hmm, I think we could have something like this. I'm not just sure about the "API Plugin" name, because this is used to refer to "Copilot Plugins" and may cause some confusion. Thoughts on how we can call these other things? cc: @sebastienlevert this might also align with other investment like connectors/power platform.

But yes, I think we can have the flow like the following: For Client the flow would be:

  1. What do you want to generate? (Client/Copilot Plugin/Others) --> Selecting Client
  2. Client Name?
  3. Language
  4. Namespace
  5. etc..

For Copilot Plugin

  1. What do you want to generate? (Client/Copilot Plugin/Others) --> When selecting Copilot Plugin
  2. Name?

For Others (the third option, which will generate the OpenAI/API Manifest) :

  1. What you want to generate? (Client/Copilot Plugin/ Others) --> Selecting Others
  2. Select the type (OpenAI Plugin/API Manifest) --maybe other options from future investments in connectors/power platform
  3. Name?

What we think about that?

baywet commented 1 month ago

I believe words are missing in your last paragraph?

maisarissi commented 1 month ago

I've updated the comment 😄

baywet commented 4 weeks ago

Thanks for updating it. Yes I think we're on the same page at this point.

petrhollayms commented 3 weeks ago

@maisarissi Do we have a name for "TBD"?

darrelmiller commented 2 weeks ago

How about "Other". That will give us room for things like documentation, breaking change model, or whatever else we dream up.

baywet commented 2 weeks ago

Because OpenAI retired plugins, we can probably remove the option all together. Generating an API manifest is essentially the same, except you get the manifest as an extra file.

sebastienlevert commented 2 weeks ago

I think I can live with "Other" for now and would support http file creation, md documentation, API manifest, etc.

maisarissi commented 2 weeks ago

I'm good with Other as well. Let's go with that. I've updated the comment to reflect this.

thewahome commented 1 week ago

@maisarissi @petrhollayms @baywet I have here a graphical summary of what we are talking about just to make it a bit clearer.

Can you confirm that this is the expected flow of questions and options? Once confirmed we can have this summary in the Acceptance Criteria.

Kiota Commands
├── Generate
│   ├── Client
│   │   ├── Choose a name for the client class (input)
│   │   ├── Choose a name for the client class namespace (input)
│   │   ├── Choose an output path
│   │   |   ├── Choose default
│   │   |   └── Browse
│   │   └── Pick a language
│   ├── Copilot plugin
│   │   └── Enter a plugin name (input / default / skipped)
│   │   └── Select output path (or skipped)
│   │       ├── Choose default
│   │       └── Browse
│   └── Others
│       ├── Select an option
│       |   ├── API Manifest
│       |   └── Open AI Plugin
│       ├── Enter a name (input)
│       └── Choose an output path
│           ├── Choose default
│           └── Browse
└── ...
baywet commented 1 week ago

Thanks for taking the time to describe this like that. It helps! LGTM. Only detail, I think we'll have a default for the plugin name as well (description or deeplink)

sebastienlevert commented 1 week ago

Thanks for the visuals, it's exactly what we had in mind! Thanks!

maisarissi commented 1 week ago

Yes @thewahome, this is the desired outcome. Thanks for making sure we are all on the same page here.

thewahome commented 4 days ago

@sebastienlevert in the Acceptance criteria, I have added an asterix next to the question title. It indicates the text that needs to be confirmed or changed so that it can align with the new order. These need to be clear before handing over to the translators. Can I get the updated text in the AC itself?

sebastienlevert commented 3 days ago

For some reason I can't edit the initial issue.

Almost all the values in the AC are good (including the ones with asterix). I'd just ask if we can capitalize the first letter of each copy.

For example : "Manifest name"

The only change would be that "Others" would become "Other" singluar.

Thanks!

thewahome commented 3 days ago

Hey @sebastienlevert From what you are saying these two would not match the content being created unless an Open AI plugin is also treated as a manifest

I think we need a new generic title for these two to cater for both choices.

sebastienlevert commented 3 days ago

For OpenAI plugins, we should always create ai-plugin.json (which is the standard). So it means we should not give the option and skip this question.

For an OpenAI plugin, it would be Create a new OpenAI plugin - Output directory.

So here would be the final.

Kiota Commands
├── Generate
│   ├── Client
│   │   ├── Create a new API Client - Class name
│   │   ├── Create a new API Client - Namespace 
│   │   ├── Create a new API client - Output directory
│   │   |   ├── Choose default
│   │   |   └── Browse
│   │   └── Pick a language
│   ├── Copilot plugin
│   │   └── Create a new plugin - Plugin name 
│   │   └── Create a new plugin - Output directory
│   │       ├── Choose default
│   │       └── Browse
│   └── Other
│       ├── Choose a type
│       │   ├── API Manifest
│       │   │   ├── Create a new manifest - Manifest name
│       │   │   └── Create a new manifest - Output directory
│       │   │       ├── Choose default
│       │   │       └── Browse
│       │   └── Open AI Plugin
│       │       └── Create a new OpenAI plugin - Output directory
│       │           ├── Choose default
│       │           └── Browse
└── ...
andrueastman commented 2 days ago

Just checking in here @sebastienlevert, did we not stop generating OpenAI plugins as the service does not require them anymore? see ref https://github.com/microsoft/kiota/pull/5227.
I believe the latest versions manifest library also does not allow the writing of the OpenAI plugin properties(v1 props such as Auth and Àpi) in as well.

Would this be a good opportunity to clear that up from the UI? Or would we want to bring them back?

thewahome commented 2 hours ago

Changes:

On hitting Generate, these are the options provided. Notice Generate an API client changes to Client, image

Generate a Plugin changes to Copilot plugin The option to set the name is next. Not selecting a type image

Generate an API Manifest changes to Other API Manifest and Open AI Plugin are added as options image

Manifest image

OpenAI plugin image

A quick video is available here