mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 06:29:24 +08:00
One partner serving three study groups plus DMs rendered as a flat list where every row looked like a private chat: the only label is the opening message, which in a group is one student's question (#1229). The data was never lost — sessions are already one file per chat — it just never reached the list. The channels state the kind of conversation on the inbound event and DeepTutor was dropping it: Feishu sends ``chat_type`` ("group" / "p2p"), Slack and Mattermost send ``channel_type``. Delivery is the only moment this is known for certain, so the turn records it, and the summary reads it back. No prefix sniffing, no lookup on the read path, and nothing has to import a channel to render a list. ``conversation_scope`` is the single place those three vocabularies become the two words a reader cares about. A channel that says nothing — or says something new — yields no label at all, and the row renders as it always did; a list that guesses is worse than one that stays quiet. Sessions written before this carry no origin and are likewise unlabelled rather than marked "unknown". This is the distinction the report called the minimal useful fix. Resolving a Feishu group's *name* through the chats API, which is what it asked for first, is left out on purpose: it needs a call and a cache I cannot exercise against a real tenant here. The regenerated contract picks up ``/api/knowledge-bases/delete`` as well — the committed schema was already behind by that route before this change, and the file is generated, so it comes back whole.