feat(chat): refactor chat message handling and introduce private messaging support
- Updated `uni_message_sender.py` to allow for private messaging by removing the mandatory group ID and adding user ID handling. - Enhanced chat history retrieval and clearing functions in `routes.py` and `service.py` to support both group and private chat scenarios. - Introduced a new `ChatScrollContext` for managing message scrolling and highlighting in the chat UI. - Created a `ListItemEditorHookFactory` for rendering a rich UI editor for list items in configuration settings, replacing the previous JSON text display. - Improved message serialization for consistent display in chat history. - Added detailed logging for chat history operations and error handling. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -70,11 +70,15 @@ class ConfigSchemaGenerator:
|
||||
) -> Dict[str, Any]:
|
||||
field_docs = config_class.get_class_field_docs()
|
||||
field_type = cls._map_field_type(annotation)
|
||||
raw_description = field_docs.get(field_name, field_info.description or "")
|
||||
# `_wrap_` 标记在配置类 docstring 中表示该说明应作为块级注释(独立成行)
|
||||
# 在前端展示时把它转为换行符,使描述以新行起始或在中间换行
|
||||
description = raw_description.replace("_wrap_", "\n").strip("\n")
|
||||
schema: Dict[str, Any] = {
|
||||
"name": field_name,
|
||||
"type": field_type,
|
||||
"label": field_name,
|
||||
"description": field_docs.get(field_name, field_info.description or ""),
|
||||
"description": description,
|
||||
"required": field_info.is_required(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user