fix: stabilize AI coach chat against truncation and empty replies
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -767,7 +767,7 @@ def format_chat_context_for_chat(
|
||||
max_chars: int = CHAT_CONTEXT_MAX_CHARS,
|
||||
) -> str:
|
||||
overview = format_chat_position_overview(payload)
|
||||
body = str(payload.get("text") or "").strip() or format_context_text(payload)
|
||||
body = format_chat_context_slim(payload)
|
||||
text = overview + "\n\n" + body
|
||||
if len(text) <= max_chars:
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user