Skip to content

Implement unified group‑chat context and optional GROUP_ADMINS setting #45

Description

@s-nagaev

Goal

Enable Chibi to maintain a single, unified conversation context in group chats and introduce an optional GROUP_ADMINS setting to control who can change the model and reset the chat.

Motivation

  • In group chats, Chibi currently treats each mention or reply as a separate conversation, losing context between participants.
  • Defining group‑bot administrators allows granular control over critical commands (e.g. changing the LLM or resetting history) and prevents misuse.

Tasks

  1. Unified group context

    • Detect messages in a group chat where Chibi is addressed (mentions or replies).
    • Append all such messages into one shared conversation history per chat (instead of per‑user).
    • Ensure replies and mentions both feed into and read from this global context.
  2. GROUP_ADMINS setting

    • Introduce an env‑var or config key GROUP_ADMINS (e.g. list of user IDs).
    • Only users in GROUP_ADMINS may use /set_model and /reset commands in group chats.
    • Others receive a “permission denied” message if they attempt those commands.

Reference

Similar implementation in Hiroshi: s-nagaev/hiroshi#16

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions