-
-
Notifications
You must be signed in to change notification settings - Fork 166
feat: support complex structure args #147
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
Reviewer's GuideThis PR enriches argument processing to handle nested object and array structures: it extends the OpenAPI converter with a recursive builder, adapts data-transfer and config structs for nested ItemsConfig fields, refines template rendering to normalize JSON strings, and hooks normalization into the tool execution pipeline. Sequence diagram for argument normalization in tool executionsequenceDiagram
participant Server
participant Template
participant Args as args (map)
Server->>Args: fillDefaultArgs(tool, args)
Server->>Template: NormalizeJSONStringValues(args)
Template->>Args: Normalize JSON string values (in-place)
Server->>Server: Log tool execution
Class diagram for updated ItemsConfig structureclassDiagram
class ItemsConfig {
+string Type
+string[] Enum
+map<string, any> Properties
+ItemsConfig* Items
+string[] Required
}
Class diagram for recursive ItemsConfig conversion in DTOclassDiagram
class config~ItemsConfig~ {
+string Type
+string[] Enum
+map<string, any> Properties
+ItemsConfig* Items
+string[] Required
}
class dto~ItemsConfig~ {
+string Type
+string[] Enum
+map<string, any> Properties
+ItemsConfig* Items
+string[] Required
}
config~ItemsConfig~ <.. dto~ItemsConfig~ : FromItemsConfig(cfg)
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
iFurySt
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! Thanks
fix: issue 支持复杂参数
fix: default tenant name
feat: add .history ignore
feat: support config first complex arg edit
🔍 影响范围
核心模块:pkg/openapi/converter.go 中的 OpenAPI 转换逻辑
数据结构:internal/common/config/mcp.go 中的配置定义
向后兼容:保持了现有 API 的兼容性,不影响已有功能
Summary by Sourcery
Support complex nested object and array arguments by extending the OpenAPI converter, configuration/DTO schema, and rendering logic to handle recursive structures and normalize JSON string values
New Features:
Enhancements: