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

Previously loaded items discarded when loading paginated prompts or tools #97

Open
heuperman opened this issue Dec 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@heuperman
Copy link
Contributor

Describe the bug
When loading additional items from a paginated response using the "List More Prompts" or "List More Tools" buttons all previously loaded prompts or tools are discarded and only the newly loaded items are shown in the pane.

The "List More Resources" and "List More Templates" buttons add additional items to the existing list as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Run inspector
  2. Connect to a server that returns paginated tools or prompts in response
  3. Click List Prompts (or List Tools) button
  4. List More Prompts or (List More Prompts) button

Expected behavior
Additional prompts are added to list of previously loaded prompts.

Actual behavior
Newly fetched prompts replace previously loaded prompts.

Additional context
This is happening because the listTools and listPrompts functions set the state to the newly fetched items instead of concatenating them with the items in the existing state, as listResources does.

@heuperman heuperman added the bug Something isn't working label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant