feat(bot/extension/watcher): Discord 아티팩트 알림 개선 — 파일 첨부 전송, truncation 확대, 동적 .md 감시
This commit is contained in:
@@ -308,9 +308,11 @@ class CollectorBridge:
|
||||
data = json.loads(f.read_text(encoding="utf-8-sig"))
|
||||
project = data.get("project_name", self.project_name)
|
||||
content = data.get("content", "")
|
||||
if content:
|
||||
await self.remote.asend_chat(project, content)
|
||||
logger.info(f"[COLLECTOR] → Gateway: chat snapshot len={len(content)}")
|
||||
attached_files = data.get("attached_files", [])
|
||||
if content or attached_files:
|
||||
await self.remote.asend_chat(project, content, attached_files=attached_files)
|
||||
af_info = f" +{len(attached_files)} files" if attached_files else ""
|
||||
logger.info(f"[COLLECTOR] → Gateway: chat snapshot len={len(content)}{af_info}")
|
||||
f.unlink() # Cleanup after forwarding
|
||||
except (json.JSONDecodeError, OSError) as e:
|
||||
logger.warning(f"[COLLECTOR] bad chat snapshot {f.name}: {e}")
|
||||
|
||||
Reference in New Issue
Block a user