fix(room): should_ai_respond only triggers on @ai mention

This commit is contained in:
ZhenYi 2026-04-28 22:14:10 +08:00
parent c2c079c74d
commit 46a0bdc21e

View File

@ -259,16 +259,11 @@ impl RoomService {
pub async fn should_ai_respond(&self, room_id: Uuid, content: &str) -> Result<bool, RoomError> {
let ai_config = history::get_room_ai_config(&self.db, room_id).await?;
let config = match ai_config {
Some(c) => c,
None => return Ok(false),
};
if config.use_exact {
return Ok(true);
}
let model_id_str = config.model.to_string();
for cap in mention_bracket_re().captures_iter(content) {