fix(room): should_ai_respond only triggers on @ai mention
This commit is contained in:
parent
c2c079c74d
commit
46a0bdc21e
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user