Add live CEO briefing, Wereldexport CRM, halal engine, and realtime cockpit.
Ship export intel with contact filters and CRM push, Herman live digest with Telegram briefing, halal recommendation engine, revenue cockpit, and dashboard polling/WebSocket fixes.
This commit is contained in:
@@ -28,6 +28,22 @@ IMAGE_KEYWORDS = (
|
||||
"make image", "maak plaatje", "/genfoto",
|
||||
)
|
||||
|
||||
BRIEFING_KEYWORDS = (
|
||||
"/briefing", "briefing", "samenvatting", "dagrapport",
|
||||
"ochtendbriefing", "avondbriefing", "ceo briefing", "live briefing",
|
||||
)
|
||||
|
||||
|
||||
def _wants_briefing(raw: str) -> bool:
|
||||
t = (raw or "").strip().lower()
|
||||
if not t:
|
||||
return False
|
||||
if t.startswith("/briefing"):
|
||||
return True
|
||||
if len(t) > 120:
|
||||
return False
|
||||
return any(k in t for k in BRIEFING_KEYWORDS)
|
||||
|
||||
|
||||
def _wants_image(raw: str) -> bool:
|
||||
t = (raw or "").strip().lower()
|
||||
@@ -137,6 +153,28 @@ async def chat(
|
||||
)
|
||||
return routed
|
||||
|
||||
if channel == "telegram" and _wants_briefing(message):
|
||||
from app.services.briefing import build_live_digest_text, collect_briefing_data
|
||||
|
||||
data = collect_briefing_data()
|
||||
reply = build_live_digest_text(data)
|
||||
await _log_event(
|
||||
"herman",
|
||||
"briefing",
|
||||
"Live briefing (Telegram)",
|
||||
reply[:1500],
|
||||
{"channel": channel, "source": "live_digest"},
|
||||
channel=channel,
|
||||
)
|
||||
return {
|
||||
"agent": "herman",
|
||||
"agent_label": "Herman · Briefing",
|
||||
"reply": reply,
|
||||
"delegated_agents": ["herman"],
|
||||
"routing_reason": "Live cockpit-samenvatting",
|
||||
"agent_steps": _agent_steps([], "Live digest uit briefing engine"),
|
||||
}
|
||||
|
||||
if webbuilder_agent.wants_website(message):
|
||||
try:
|
||||
outcome = await webbuilder_agent.generate_from_message(message, channel=channel, wait=False)
|
||||
|
||||
Reference in New Issue
Block a user