Give a cleared conversation a room of its own - #177
Merged
Merged
Conversation
When a cleared room is listed in the config's segment_rooms, the
conversation that /clear just ended becomes a segment: a private room
named by the conversation's opening line, holding a notice with the
archived-transcript pointer and an ai.cornball.lifecycle state event
({state: segment, segment_of, vault, since}) that clients group and
demote by. The ack names the segment so the user knows where it went.
Best-effort by construction: archive-and-reset stays the critical
path, a transport without channel_create + set_state skips with a
message (which also guards against a chat.api older than the new
chat_set_state), and a clear that archived nothing makes no segment,
since the transcript pointer is the segment's content. Requires
chat.api >= 0.0.1.22.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a cleared room is listed in the config's segment_rooms (character vector of room ids), /clear files the conversation it just ended as a segment: a private room named by the conversation's opening line, holding the archived-transcript pointer as a notice and an ai.cornball.lifecycle state event ({state: segment, segment_of, vault, since}) that clients can group and demote by. The /clear ack names the segment so the user knows where it went.
Best-effort by construction: archive-and-reset stays the critical path; a transport without channel_create + set_state skips with a message (which doubles as the guard against a chat.api predating chat_set_state, since the capability flag is absent there); a clear that archived nothing makes no segment, because the transcript pointer is the segment's content. Off entirely unless segment_rooms is configured.
Depends on cornball-ai/chat.api#15 (chat_set_state); the Suggests floor and .CHAT_API_MIN both move to 0.0.1.22. Touches the /clear branch in rooms.R, so flagging for #176's author: different area than bot_chat_client, conflicts unlikely but same file.