improvement(mship): mcp persistence in chat - #5974
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThe PR makes MCP servers persistently enabled across subsequent chat turns.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or non-blocking defects identified in the changed behavior. The implementation consistently unions persisted and current MCP contexts, deduplicates server IDs, and aligns the emitted tool metadata and model instructions with persistent direct invocation.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/chat/post.ts | Collects unique MCP server IDs from persisted conversation contexts and the current turn before payload construction. |
| apps/sim/lib/copilot/mcp-tools.ts | Marks explicitly enabled MCP tools as directly callable rather than deferred. |
| apps/sim/lib/copilot/chat/process-contents.ts | Updates MCP prompt context to describe chat-lifetime enablement and direct invocation. |
| apps/sim/lib/copilot/chat/post.test.ts | Adds coverage for inherited MCP enablement and deduplication across turns. |
| apps/sim/lib/copilot/mcp-tools.test.ts | Updates the schema assertion for non-deferred MCP tools. |
Sequence Diagram
sequenceDiagram
participant User
participant Chat as Chat handler
participant History as Conversation history
participant Payload as Payload builder
participant MCP as MCP tools
participant Model as Mothership
User->>Chat: Tag MCP server
Chat->>History: Persist user message and MCP context
Chat->>Payload: Current and historical server IDs
Payload->>MCP: Resolve enabled servers' tools
MCP-->>Payload: Directly callable tool schemas
Payload->>Model: Send message and enabled tools
User->>Chat: Send later message without tag
Chat->>History: Read earlier MCP context
Chat->>Payload: Reuse enabled server IDs
Payload->>Model: Send later message with same tools
Reviews (1): Last reviewed commit: "Fixes" | Re-trigger Greptile
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
MCP persistence in chat for mship
Type of Change
Testing
Manual
Checklist