added RAG, Multiuser, TG bot
This commit is contained in:
@@ -16,6 +16,18 @@ def _format_time(seconds: int) -> str:
|
||||
return f"{minutes:02d}:{secs:02d}"
|
||||
|
||||
|
||||
def _format_image_generation_notice(data: dict[str, Any]) -> str:
|
||||
url = data.get("url", "")
|
||||
positive = (data.get("prompt") or "").strip()
|
||||
negative = (data.get("negative_prompt") or "").strip()
|
||||
lines = ["🎨 **Картинка готова**", "", f""]
|
||||
if positive:
|
||||
lines.extend(["", "**Comfy (+):**", f"```\n{positive}\n```"])
|
||||
if negative:
|
||||
lines.extend(["", "**Comfy (−):**", f"```\n{negative}\n```"])
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def format_phase_completed_notice(
|
||||
session: PomodoroSession,
|
||||
next_phase: str | None,
|
||||
@@ -253,8 +265,7 @@ def format_tool_notice(tool_name: str, raw_result: str) -> str | None:
|
||||
return f"💪 **Напоминание {r.get('kind')}** · {state}"
|
||||
|
||||
if tool_name == "generate_image" and data.get("ok"):
|
||||
url = data.get("url", "")
|
||||
return f"🎨 **Картинка готова**\n\n"
|
||||
return _format_image_generation_notice(data)
|
||||
|
||||
if tool_name == "create_shopping_list" and data.get("ok"):
|
||||
lst = data.get("list") or {}
|
||||
|
||||
Reference in New Issue
Block a user