Conversations: the app starts without the libredesk link; attachments downloadable from the transcript frame

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-18 15:24:23 +01:00
1 parent 45db86d1ff
commit adc5ae12bd
4 files changed
+20 -6

No files matched your search

+10 -2
View File
@@ -13,17 +13,25 @@ import station
FOLDER = station.LABELS / "auto" / "conversations"
LIBREDESK = station.ROOT / "libredesk"
sys.path.insert(0, str(LIBREDESK / "conversations"))
import pompage # noqa: E402
sys.path.append(str(LIBREDESK / "conversations"))
try:
import pompage # noqa: E402
except ImportError: # the page is not core: without the link, the rest of the app runs
pompage = None
MISSING = "no libredesk/ link to ~/aimsight-libredesk with conversations/ (README)"
INLINE = {".png", ".jpg", ".jpeg", ".gif", ".webp"} # shown in the page; any other attachment is downloaded
def pump_state():
if not pompage:
return {"running": False, "log": [MISSING]}
return {"running": pompage.running(), "log": pompage.log()}
def pump(body):
if not pompage:
raise station.Refusal(MISSING)
try:
pompage.start(body.get("start") or "", body.get("end") or "", str(FOLDER))
except ValueError as e: