Files
cc-connect/platform
cg33andClaude 41cfde7663 fix(slack): pass file uploads to agent (fixes #292) (#296)
* fix(codex): avoid closing events channel before readLoop exits

Close() previously closed cs.events after an 8s wait even when wg.Wait
had not finished, while readLoop could still send in flushPendingAsText
(turn.completed), causing "panic: send on closed channel" after /stop
then /new. Defer channel close until readLoop completes.

Fixes https://github.com/chenhg5/cc-connect/issues/281

* fix(slack): pass non-image file uploads to agent as FileAttachment

- Map PDF/text and other non-audio/non-image Slack shares to core.FileAttachment
  so the engine persists them and has_files is true for the agent.
- Parse files from app_mention raw inner JSON (slack-go omits Files on AppMentionEvent).
- Allow app_mention with only attachments and empty stripped text.

Fixes #292

Made-with: Cursor

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-24 14:16:30 +08:00
..