Commit Graph

27 Commits

Author SHA1 Message Date
KavyapriyaJG
0b1c00baab Ft - Display section reset on clear button hit 2025-04-17 00:04:58 +05:30
Nathan Arseneau
98ea4a12d6 Merge branch 'main' into dark-mode-fix 2025-04-11 20:13:31 -04:00
Nathan Arseneau
8d20044b33 fix darkmode color and padding for the tab item 2025-04-05 11:47:44 -04:00
Shinya Fujino
0fd2e12c7b Fix inconsistent gap between TabsList and TabsContent 2025-04-04 22:39:55 +09:00
NicolasMontone
c964ff5cfe Use copy button insde JSON view component 2025-04-02 10:39:39 -03:00
cgoing
18ca6e28a7 Use <pre> tag inside JsonView component for consistency 2025-03-27 12:55:36 +09:00
cgoing
f0b28d4760 feat: json view component 2025-03-25 01:48:29 +09:00
cliffhall
952bee2605 Fix prettier complaints 2025-03-08 15:08:12 -05:00
cliffhall
a669272fda Track subscribed resources and show the appropriate subscribe or unsubscribe button on selected resource panel.
If the server does not support resource subscriptions, do not show any subscription buttons.

* In App.tsx
  - useState for resourceSubscriptions, setResourceSubscriptions a Set of type string.
  - in subscribeToResource()
    - only make the request to subscribe if the uri is not in the resourceSubscriptions set
  - in unsubscribeFromResource()
    - only make the request to unsubscribe if the uri is in the resourceSubscriptions set
  - in ResourceTab element,
    - pass a boolean resourceSubscriptionsSupported as serverCapabilities.resources.subscribe
    - pass resourceSubscriptions as a prop
* In ResourcesTab.tsx
  - deconstruct resourceSubscriptions and resourceSubscriptionsSupported from props and add prop type
  - in selected resource panel
    - don't show subscribe or unsubscribe buttons unless resourceSubscriptionsSupported is true
    - only show subscribe button if selected resource uri is not in resourceSubscriptions set
    - only show unsubscribe button if selected resource uri is in resourceSubscriptions set
    - wrap buttons in a flex div that is
      - justified right
      - has a minimal gap between
      - 2/5 wide (just big enough to contain two buttons and leave the h3 text 3/5 of the row to render and not overflow.
2025-03-08 13:40:37 -05:00
cliffhall
747c0154c5 WIP: Subscribe to resources
* In App.tsx
  - added subscribeToResource()
    - takes a uri
    - sends a `resources/subscribe` message with the uri
  - added unsubscribeFromResource()
    - takes a uri
    - sends a `resources/unsubscribe` message with the uri
  - in ResourcesTab element,
    - pass subscribeToResource and subscribeToResource invokers to component
* In notificationTypes.ts
  - add ServerNotificationSchema to NotificationSchema to permit server update messages.

* In ResourcesTab.tsx
  - deconstruct subscribeToResource and unsubscribeFromResource and add prop types
  - Add Subscribe and Unsubscribe buttons to selected resource panel, left of the refresh button. They call the sub and unsub functions that came in on props, passing the selected resource URI.
  - [WIP]: Will show the appropriate button in a follow up commit.
* In useConnection.ts
  - import ResourceUpdatedNotificationSchema
  - in the connect function,
    - set onNotification as the handler for ResourceUpdatedNotificationSchema
2025-03-08 11:05:13 -05:00
Gavin Aboulhosn
7f713fe40e refactor(completions): improve completion handling and error states
- Move completion logic from App.tsx to useConnection hook
- Replace useCompletion with simpler useCompletionState hook
- Add graceful fallback for servers without completion support
- Improve error handling and state management
- Update PromptsTab and ResourcesTab to use new completion API
- Add type safety improvements across completion interfaces
2025-02-12 19:05:51 -05:00
Gavin Aboulhosn
9b624e8c87 feat(completions): integrate MCP Completion support into Prompts and Resources tabs
- create useCompletion hook to fetch completions with debouncing and abort control
- Updated `PromptsTab.tsx` and `ResourcesTab.tsx` to utilize the `Combobox` component and `useCompletions` hook, enabling argument autocompletion for prompts and resource URIs as per the MCP specification.
- Added a combobox to show completions
2025-02-12 11:21:27 -05:00
Kees Heuperman
cc17ba8d56 feat: Add button to clear loaded items
Add a button to the ListPane component that clears loaded items. This
will allow the user to clear and reload resources, resource templates,
prompts or tools when they expect the available items to have changed.
2024-12-01 09:50:53 +01:00
Ashwin Bhat
78182eab10 dark mode fixes 2024-11-20 11:25:06 -08:00
Justin Spahr-Summers
3e46011614 Marginally better dark mode support 2024-11-12 12:34:10 +00:00
Justin Spahr-Summers
645f2e942e Add support for listing and filling resource templates 2024-11-07 14:02:53 +00:00
David Soria Parra
216c8a15d5 run prettier 2024-11-04 21:29:59 +00:00
Justin Spahr-Summers
82f3d99639 Install TypeScript SDK from registry 2024-10-28 10:42:31 +00:00
Ashwin Bhat
7680d5272a updates for sdk 2024-10-18 10:00:13 -07:00
Ashwin Bhat
24d005ac84 add pagination handling for lists 2024-10-17 17:11:30 -07:00
Ashwin Bhat
0ffedbf8fa fix type errors 2024-10-16 16:22:14 -07:00
Ashwin Bhat
c6a11422f4 updates for sdk update 2024-10-16 16:22:14 -07:00
Ashwin Bhat
14da4793f7 extract transport logic 2024-10-11 08:42:31 -07:00
Ashwin Bhat
1497dbda29 handle long resource names in UI 2024-10-11 08:41:12 -07:00
Ashwin Bhat
019777bd93 extract listpane 2024-10-09 09:05:43 -07:00
Ashwin Bhat
0c66e16dda resource refreshing 2024-10-08 16:49:12 -07:00
Ashwin Bhat
3cdd6faed7 init client 2024-10-07 16:28:05 -07:00