|
|
@@ -1543,9 +1543,7 @@ async def process_chat_response(
|
|
|
if not metadata.get("chat_id", "").startswith(
|
|
|
"local:"
|
|
|
): # Only update titles and tags for non-temp chats
|
|
|
- if (
|
|
|
- TASKS.TITLE_GENERATION in tasks
|
|
|
- ):
|
|
|
+ if TASKS.TITLE_GENERATION in tasks:
|
|
|
user_message = get_last_user_message(messages)
|
|
|
if user_message and len(user_message) > 100:
|
|
|
user_message = user_message[:100] + "..."
|
|
|
@@ -1938,9 +1936,11 @@ async def process_chat_response(
|
|
|
content = f"{content}{tool_calls_display_content}"
|
|
|
|
|
|
elif block["type"] == "reasoning":
|
|
|
- reasoning_display_content = "\n".join(
|
|
|
- (f"> {line}" if not line.startswith(">") else line)
|
|
|
- for line in block["content"].splitlines()
|
|
|
+ reasoning_display_content = html.escape(
|
|
|
+ "\n".join(
|
|
|
+ (f"> {line}" if not line.startswith(">") else line)
|
|
|
+ for line in block["content"].splitlines()
|
|
|
+ )
|
|
|
)
|
|
|
|
|
|
reasoning_duration = block.get("duration", None)
|