From c1fba39496d54c8b306d20d51d8688309da5986c Mon Sep 17 00:00:00 2001 From: mengyonghao <1533512157@qq.com> Date: Mon, 12 Jan 2026 21:13:21 +0800 Subject: [PATCH 1/3] feat(workflow): add conversation_id parameter --- api/app/core/workflow/executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/core/workflow/executor.py b/api/app/core/workflow/executor.py index 7274764a..d42fcf75 100644 --- a/api/app/core/workflow/executor.py +++ b/api/app/core/workflow/executor.py @@ -338,7 +338,6 @@ class WorkflowExecutor: chunk_count += 1 event_type = data.get("type", "node_chunk") # "message" or "node_chunk" logger.info(f"[CUSTOM] ✅ 收到 {event_type} #{chunk_count} from {data.get('node_id')}") - yield { "event": event_type, # "message" or "node_chunk" "data": { @@ -347,7 +346,8 @@ class WorkflowExecutor: "full_content": data.get("full_content"), "chunk_index": data.get("chunk_index"), "is_prefix": data.get("is_prefix"), - "is_suffix": data.get("is_suffix") + "is_suffix": data.get("is_suffix"), + "conversation_id": input_data.get("conversation_id"), } } From 38253fa49abd4efb19e515a49e78197d877037b4 Mon Sep 17 00:00:00 2001 From: mengyonghao <1533512157@qq.com> Date: Mon, 12 Jan 2026 21:14:12 +0800 Subject: [PATCH 2/3] feat(memory): enrich perceptual memory timeline content --- api/app/schemas/memory_perceptual_schema.py | 3 +++ api/app/services/memory_perceptual_service.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/api/app/schemas/memory_perceptual_schema.py b/api/app/schemas/memory_perceptual_schema.py index c2e4517e..05e01d2a 100644 --- a/api/app/schemas/memory_perceptual_schema.py +++ b/api/app/schemas/memory_perceptual_schema.py @@ -44,6 +44,9 @@ class PerceptualMemoryItem(BaseModel): summary: Optional[str] = Field(None, description="summary") storage_type: FileStorageType = Field(..., description="Storage type for file") created_time: int = Field(..., description="create time") + topic: str = Field(..., description="topic") + domain: str = Field(..., description="domain") + keywords: list[str] = Field(..., description="keywords") class Config: from_attributes = True diff --git a/api/app/services/memory_perceptual_service.py b/api/app/services/memory_perceptual_service.py index 5fafe48d..d257e80f 100644 --- a/api/app/services/memory_perceptual_service.py +++ b/api/app/services/memory_perceptual_service.py @@ -136,6 +136,9 @@ class MemoryPerceptualService: memory_items = [] for memory in memories: + meta_data = memory.meta_data or {} + content = meta_data.get("content") + content = Content(**content) memory_item = PerceptualMemoryItem( id=memory.id, perceptual_type=PerceptualType(memory.perceptual_type), @@ -143,6 +146,9 @@ class MemoryPerceptualService: file_name=memory.file_name, file_ext=memory.file_ext, summary=memory.summary, + topic=content.topic, + domain=content.domain, + keywords=content.keywords, created_time=int(memory.created_time.timestamp()*1000), storage_type=FileStorageType(memory.storage_service), ) From 6a0cbd7d8ef471ff19b3977c4eddd835def9e138 Mon Sep 17 00:00:00 2001 From: mengyonghao <1533512157@qq.com> Date: Mon, 12 Jan 2026 21:14:45 +0800 Subject: [PATCH 3/3] perf(memory): optimize working memory summarization prompt --- api/app/services/prompt/conversation_summary_system.jinja2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/app/services/prompt/conversation_summary_system.jinja2 b/api/app/services/prompt/conversation_summary_system.jinja2 index 2947c237..04e13abc 100644 --- a/api/app/services/prompt/conversation_summary_system.jinja2 +++ b/api/app/services/prompt/conversation_summary_system.jinja2 @@ -35,7 +35,8 @@ You are a professional dialogue content summarizer, specializing in extracting c 1. `theme`: A concise phrase describing the conversation’s core topic (e.g., "inquiry about delivery time rules"); 2. `summary`: A single sentence including "user request + AI response + interaction logic" (≤150 words); 3. `takeaways`: A list of brief bullet-point takeaways summarizing the key points from the conversation (e.g., ["User clarified delivery time differences between regular and remote areas"]). - 4. `question`: A list of brief declarative statements summarizing the pitfalls the user encountered during the current conversation.Return an empty list if none are present. + 4. `question`: The `question` field is a list of brief declarative statements describing objective pitfalls or problems the user actually encountered during the current conversation. +Strict rules: Only include problems that clearly and directly affected task progress. Each item must be a short, factual, declarative statement. Only record issues that are explicitly observable from the conversation. Do NOT include assumptions, interpretations, or stylistic judgments. 5. `info_score`: Numerical score (0–100) representing conversation information richness. - Language Style: Concise, objective, conversational (avoid overly formal terms).