feat(webui): enhance ConfigSchemaGenerator with field_docs and UI metadata

- Add AttrDocBase.get_class_field_docs() classmethod for class-level field docs extraction
- Merge json_schema_extra (x-widget, x-icon, step) into schema output
- Map Pydantic constraints (ge/le) to minValue/maxValue for frontend compatibility
- Add ge=0, le=1 constraints to ChatConfig.talk_value for validation

Completes Task 1 (including subtasks 1a, 1b, 1c, 1d) of webui-config-visualization-refactor plan.
This commit is contained in:
DrSmoothl
2026-02-17 17:05:25 +08:00
parent 19c9c5a39a
commit 278a084c23
3 changed files with 26 additions and 2 deletions

View File

@@ -104,6 +104,8 @@ class ChatConfig(ConfigBase):
talk_value: float = Field(
default=1,
ge=0,
le=1,
json_schema_extra={
"x-widget": "slider",
"x-icon": "message-circle",