This repository was archived by the owner on May 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Adding Chat demo (Not stream) #11
Merged
Merged
Conversation
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
Contributor
Author
|
@gsabran I added also support for OpenAI, although for some reason responses from OpenAI are considerably slower than Claude's |
883917c to
7d6116b
Compare
gsabran
reviewed
Mar 5, 2025
MCPClient/Sources/stdioTransport/DataChannel+StdioProcess.swift
Outdated
Show resolved
Hide resolved
gsabran
reviewed
Mar 5, 2025
MCPClient/Sources/stdioTransport/DataChannel+StdioProcess.swift
Outdated
Show resolved
Hide resolved
gsabran
previously approved these changes
Mar 5, 2025
Owner
gsabran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some nits
| process.arguments = ["-c", "source ~/.zshrc && printenv"] | ||
| // Those are loaded for interactive login shell by zsh: | ||
| // https://www.freecodecamp.org/news/how-do-zsh-configuration-files-work/ | ||
| process.arguments = ["-c", "source ~/.zshenv; source ~/.zprofile; source ~/.zshrc; source ~/.zshrc; printenv"] |
Owner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: below I think looking for last instead of first is more correct, in the unexpected case sourcing one of those file was also printing the PATH. ie
if let path = env?.split(separator: "\n").filter({ $0.starts(with: "PATH=") }).last {Co-authored-by: Guillaume Sabran <sabranguillaume@gmail.com>
Co-authored-by: Guillaume Sabran <sabranguillaume@gmail.com>
gsabran
reviewed
Mar 5, 2025
gsabran
previously approved these changes
Mar 5, 2025
Co-authored-by: Guillaume Sabran <sabranguillaume@gmail.com>
gsabran
previously approved these changes
Mar 5, 2025
gsabran
previously approved these changes
Mar 5, 2025
gsabran
previously approved these changes
Mar 6, 2025
gsabran
previously approved these changes
Mar 6, 2025
gsabran
approved these changes
Mar 6, 2025
Owner
|
Thanks a lot @jamesrochabrun ! |
This was referenced Mar 6, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
This PR adds a demos in a Chat interface using MCP.
MCPDemo.mov
Other:
This PR "bridges" MCP tools from
mcp-swift-sdkin toSwiftAnthropicTools.This is needed as although they are similar, they are not the same object.
Decided to do a non stream demo first as handling tools with stream enabled involves more code for accumulating tools from stream. Once this is landed we can add one for stream.