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

We shouldn't delete the declarativeCopilot node when adding the plugins node in the manifest.json #4935

Closed
maisarissi opened this issue Jul 4, 2024 · 1 comment · Fixed by #4937
Assignees
Labels
type:bug A broken experience
Milestone

Comments

@maisarissi
Copy link
Contributor

maisarissi commented Jul 4, 2024

When creating a plugin, we are adding the plugins node if there is a manifest.json file in the output directory.

I have created a declarative copilot using TTK, which creates the project with a declarativeCopilot.json and a manifest.json files.
The manifest.json is created with the following copilotExtension node:

"copilotExtensions": {
        "declarativeCopilots": [            
            {
                "id": "declarativeCopilot",
                "file": "declarativeCopilot.json"
            }
        ]
}

However, when Kiota is creating the plugin, its replace the above with the following:

"copilotExtensions": {
        "plugins": [
            {
                "id": "myplugin",
                "file": "myplugin-apiplugin.json"
            }
        ]
}

The expected behaviour would be to keep what is in it, and add the plugins node:

"copilotExtensions": {
        "declarativeCopilots": [            
            {
                "id": "declarativeCopilot",
                "file": "declarativeCopilot.json"
            }
        ],
        "plugins": [
            {
                "id": "myplugin",
                "file": "myplugin-apiplugin.json"
            }
        ]
}

Also, if there is already a plugin node like the above, when adding another plugin to the same project, the expected behavior is the following:

"copilotExtensions": {
        "declarativeCopilots": [            
            {
                "id": "declarativeCopilot",
                "file": "declarativeCopilot.json"
            }
        ],
        "plugins": [
            {
                "id": "myplugin",
                "file": "myplugin-apiplugin.json"
            },
            {
                "id": "anotherplugin",
                "file": "anotherplugin-apiplugin.json"
            }
        ]
}
@maisarissi maisarissi added type:bug A broken experience status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Jul 4, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Jul 4, 2024
@andrueastman andrueastman removed the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Jul 4, 2024
@andrueastman andrueastman moved this from Needs Triage 🔍 to Todo 📃 in Kiota Jul 4, 2024
@baywet baywet added this to the Kiota v1.17 milestone Jul 4, 2024
@baywet baywet assigned baywet and unassigned andrueastman Jul 4, 2024
@baywet baywet modified the milestones: Kiota v1.17, Kiota v1.16 Jul 4, 2024
@baywet
Copy link
Member

baywet commented Jul 4, 2024

authored #4937

@github-project-automation github-project-automation bot moved this from Todo 📃 to Done ✔️ in Kiota Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A broken experience
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants