Skip to content

Commit

Permalink
🚑 Fix adding tool directories
Browse files Browse the repository at this point in the history
  • Loading branch information
wesen committed Feb 12, 2025
1 parent a060679 commit 55d1240
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
11 changes: 10 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/go-go-mcp",
"args": ["start", "--transport", "sse", "--profile", "all", "--log-level", "debug", "--port", "3000"],
"args": ["start", "--transport", "sse", "--profile", "html-extraction", "--log-level", "debug", "--port", "3000"],
"cwd": "${workspaceFolder}"
},
{
"name": "Add HTML Extraction Tool",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/go-go-mcp",
"args": ["config", "add-tool", "html-extraction", "--dir", "~/code/wesen/corporate-headquarters/go-go-mcp/examples/html-extract"],
"cwd": "${workspaceFolder}"
}
]
Expand Down
10 changes: 9 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,4 +1022,12 @@ Enhanced parameter validation to return cast values along with validation errors
- Modified `CheckValueValidity` to return both the cast value and any validation errors
- Added `setReflectValue` method to handle setting reflect values with proper type casting
- Updated tests to verify cast values
- Improved error messages for invalid choices
- Improved error messages for invalid choices

# Improved YAML Editor Value Node Creation

Refactored YAML editor to have a more maintainable and recursive value node creation system:
- Extracted value node creation logic into a dedicated CreateValueNode method
- Made value creation process recursive for nested structures
- Improved error handling with more specific error messages
- Centralized value node creation logic for better maintainability
5 changes: 1 addition & 4 deletions cmd/go-go-mcp/cmds/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,7 @@ func NewConfigAddToolCommand() *cobra.Command {
}

if dir != "" {
err = editor.AddToolDirectory(args[0], dir, map[string]interface{}{
"debug": false,
"verbose": false,
})
err = editor.AddToolDirectory(args[0], dir, map[string]interface{}{})
if err != nil {
return fmt.Errorf("could not add tool directory: %w", err)
}
Expand Down

0 comments on commit 55d1240

Please sign in to comment.