-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add injectVariables(), support magic variables for MCPs (workspaceFolder)
#4442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Coolio! Dockerized MCP Servers for Roo Marketplace FTW!!! Now if we can figure out how to compose multiples of those in the Docker MCP ecosystem... bobs our uncle! |
daniel-lxs
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.
Hey @NamesMT, Thank you for your contribution!
I left a minor suggestion but looks good to me!
|
Hi @daniel-lxs, please help me check the latest state, I've added |
Previously this is intended so that the CLI receives a correct empty path argument, but on a second thought, if the user have added the quotes themselves it might cause error. Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
5a1dd25 to
99ebb51
Compare
…kspaceFolder`) (#4442) * feat: add `injectVariables()`, support magic variables for MCPs * fix: fallback for `workspaceFolder` should just be an empty string Previously this is intended so that the CLI receives a correct empty path argument, but on a second thought, if the user have added the quotes themselves it might cause error. Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * chore: remove unused import * chore: better log format * chore: better describe the accepted config type and more extensive test --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Related GitHub Issue
Closes: #4017
Description
I added a new utility:
injectVariables(config, vars), and used itTest Procedure
I wrote some unit tests and used Extension Debug mode to test the real usage, confirming everything works as expected.
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Documentation Updates
Additional Notes
Get in Touch
NamesMT/@topnames_mtImportant
Adds
injectVariablesutility to inject variables into configurations, replacinginjectEnvinMcpHub.ts, with tests inconfig.test.ts.injectVariables(config, vars)inconfig.tsto inject variables into configurations, supporting nested variables and handlingnullorundefinedvalues.injectEnvwithinjectVariablesinMcpHub.tsto inject environment and magic variables (e.g.,workspaceFolder).injectVariablesinconfig.test.ts, covering variable replacement and handling of undefined or empty values.injectEnvto reflect changes in variable handling.This description was created by
for 5789a3e15c4a4399cb248a5eb1847b3e59c43988. You can customize this summary. It will automatically update as commits are pushed.