Commit 0a6812a
committed
fix: register onMcpServersChange callback for real-time MCP status updates
The previous implementation manually fetched MCP servers after connect/disconnect,
which returned stale 'disconnected' state since the connection is asynchronous.
SDK's onMcpServersChange callback fires after the connection completes, but was
not registered.
Fix:
- Register onMcpServersChange in ChatSession's AgentCallbacks (wave-agent pattern)
- Forward callback through ChatProvider to webview via 'mcpServersUpdate' message
- ConfigurationDialog now handles both mcpServersResponse (initial) and
mcpServersUpdate (push) commands
- Remove redundant manual getMcpServers calls in messageHandler
- Update notification message to clarify it indicates request sent, not completion1 parent 3d42bed commit 0a6812a
4 files changed
Lines changed: 16 additions & 12 deletions
File tree
- src
- session
- webview/src/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
| 717 | + | |
722 | 718 | | |
723 | | - | |
| 719 | + | |
724 | 720 | | |
725 | 721 | | |
726 | 722 | | |
| |||
732 | 728 | | |
733 | 729 | | |
734 | 730 | | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
| 731 | + | |
740 | 732 | | |
741 | | - | |
| 733 | + | |
742 | 734 | | |
743 | 735 | | |
744 | 736 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
0 commit comments