You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(mcp): Track and broadcast MCP instance changes - #745
Askimo load the mcp tools in every chat conversation as new ones. This PR to modify the McpInstanceService to cache the tool results
Related Issue(s)
Type of Change
[] 🐛 Bug fix
✨ New feature
💥 Breaking change
📝 Documentation
♻️ Refactor (no functional change)
🧪 Tests
🔧 Chore / tooling / CI
What Changed & Why
Askimo load the mcp tools in every chat conversation as new ones. This PR to modify the McpInstanceService to cache the tool results hence it does not need to re-connect mcp servers in every chat conversation
- Introduces `McpInstancesChangedEvent` to notify components of server status updates.
- The `McpInstanceService` now broadcasts this event after cache invalidation, synchronizing UI state.
- Formalizes server metadata using the new `McpServerInfo` structure.
- Updates the chat input field to react to and utilize the new event flow for instance management.
fetchToolsFromInstance can throw directly when mcpClient.listTools() fails, so this getOrElse does not isolate failures per server. The outer runCatching then aborts the entire map, causing one unavailable MCP server to hide every healthy server from the popup. Wrap the call itself so each server failure produces only that server's empty tool list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Askimo load the mcp tools in every chat conversation as new ones. This PR to modify the McpInstanceService to cache the tool results
Related Issue(s)
Type of Change
What Changed & Why
Askimo load the mcp tools in every chat conversation as new ones. This PR to modify the McpInstanceService to cache the tool results hence it does not need to re-connect mcp servers in every chat conversation
How to Test
./gradlew testScreenshots / Recordings (if applicable)
Checklist
main./gradlew spotlessApplyand./gradlew detektlocally./gradlew testand all tests passgit commit -sAdditional Notes