-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve on tool input handling and add tests #159
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
Merged
olaservo
merged 40 commits into
modelcontextprotocol:main
from
olaservo:handle-empty-json-fields
Mar 21, 2025
Merged
Changes from 30 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
592daca
Start adding changes to address json fields
olaservo 0e29e2c
Resolve issues where JSON fields are not being rendered in form mode
olaservo 0b105b2
Extract functions
olaservo 0747479
Handle edge case and add tests for functions
olaservo ede1ea0
Merge branch 'main' into handle-empty-json-fields
olaservo d4a64fb
Add client tests to workflow
olaservo 90ce628
Test workflow in my branch
olaservo 426fb87
Remove comment ans trigger workflow run
olaservo 238c228
Fix formatting
olaservo 8ac7ef0
Fix path to client
olaservo 720480c
Remove console.warn and extra comments to reduce code noise
olaservo d1f5b3b
Fix formatting
olaservo abd4877
Revert to only run on main
olaservo 6ec82e2
Remove some fluff
olaservo 44982e6
Default to nulls and update tests
olaservo 82bbe58
Fix formatting
olaservo a1eb343
Remove unused function plus tests
olaservo 0e50b68
Fix formatting
olaservo 36aa731
Fix issue where array type defaults to object
olaservo e7f55f0
Fix formatting
olaservo b01e386
Always use JSON mode if the schema type is object and has no properties
olaservo 06773bb
Fix formatting
olaservo 1ae77e9
Merge branch 'main' into handle-empty-json-fields
olaservo f9b105c
Use debounce instead
olaservo dd02b69
Merge branch 'handle-empty-json-fields' of https://github.com/olaserv…
olaservo 00836db
Fix formatting
olaservo 4efe7d7
Merge branch 'main' into handle-empty-json-fields
olaservo b9b116a
Remove duplicate react-dialog from merge
olaservo 1ff410c
Merge branch 'main' into handle-empty-json-fields
olaservo 1f214de
Merge branch 'main' into handle-empty-json-fields
olaservo a3740c4
Remove unneeded DynamicJsonForm.tsx
olaservo 7c4ed6a
Use working-directory instead of cd to client
olaservo e1b015e
Add comments explaining extra parsing logic
olaservo 50a65d0
Use generateDefaultValue for object and array defaults
olaservo cae7c76
Fix formatting
olaservo 28978ea
Update package lock after re-running npm install
olaservo 50131c6
Merge branch 'main' into handle-empty-json-fields
olaservo 7ddba51
Generate empty objects and arrays for non required object and array f…
olaservo a85d5e7
Fix formatting
olaservo c463dc5
Simplify check for defaults and add another test
olaservo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ server/build | |
| client/dist | ||
| client/tsconfig.app.tsbuildinfo | ||
| client/tsconfig.node.tsbuildinfo | ||
| .vscode | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| module.exports = { | ||
| preset: "ts-jest", | ||
| testEnvironment: "jsdom", | ||
| moduleNameMapper: { | ||
| "^@/(.*)$": "<rootDir>/src/$1", | ||
| "^../components/DynamicJsonForm$": | ||
| "<rootDir>/src/utils/__mocks__/DynamicJsonForm.ts", | ||
| "^../../components/DynamicJsonForm$": | ||
| "<rootDir>/src/utils/__mocks__/DynamicJsonForm.ts", | ||
| }, | ||
| transform: { | ||
| "^.+\\.tsx?$": [ | ||
| "ts-jest", | ||
| { | ||
| useESM: true, | ||
| jsx: "react-jsx", | ||
| tsconfig: "tsconfig.jest.json", | ||
| }, | ||
| ], | ||
| }, | ||
| extensionsToTreatAsEsm: [".ts", ".tsx"], | ||
| testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", | ||
| // Exclude directories and files that don't need to be tested | ||
| testPathIgnorePatterns: [ | ||
| "/node_modules/", | ||
| "/dist/", | ||
| "/bin/", | ||
| "\\.config\\.(js|ts|cjs|mjs)$", | ||
| ], | ||
| // Exclude the same patterns from coverage reports | ||
| coveragePathIgnorePatterns: [ | ||
| "/node_modules/", | ||
| "/dist/", | ||
| "/bin/", | ||
| "\\.config\\.(js|ts|cjs|mjs)$", | ||
| ], | ||
| }; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
TIOLI: