Fix business plans
This commit is contained in:
@@ -330,8 +330,17 @@ class BPCommandHandler(CommandHandler):
|
||||
)
|
||||
|
||||
fanout_stats = {"sent_bindings": 0, "failed_bindings": 0}
|
||||
fanout_text = summary
|
||||
if ai_warning:
|
||||
warning_text = str(ai_warning or "").strip()
|
||||
if len(warning_text) > 300:
|
||||
warning_text = warning_text[:297].rstrip() + "..."
|
||||
fanout_text = (
|
||||
"[bp] AI generation failed. Draft document was saved in fallback mode."
|
||||
+ (f"\nReason: {warning_text}" if warning_text else "")
|
||||
)
|
||||
if "post_result" in action_types:
|
||||
fanout_stats = await self._fanout(run, summary)
|
||||
fanout_stats = await self._fanout(run, fanout_text)
|
||||
|
||||
if "status_in_source" == profile.visibility_mode:
|
||||
status_text = f"[bp] Generated business plan: {document.title}"
|
||||
|
||||
Reference in New Issue
Block a user