gitdataai/libs/transport/event/search.rs
ZhenYi 14f6e1e500 feat(core): initialize project with access control and AI integration
- Add gitignore and prettier configuration files for project scaffolding
- Implement room access control service with project member verification
- Create user access key management with CRUD operations and activity logging
- Add accordion UI component for frontend expandable sections
- Implement room AI configuration with list, upsert, and delete operations
- Add AI event types for agent join/leave/status change tracking
- Create streaming AI processing services for mode and react patterns
- Build room AI service with model detection and idempotency handling
- Integrate chat service orchestration for AI message processing
- Add typing indicators and stream cancellation for AI interactions
- Implement mention parsing and context extraction for AI agents
2026-05-03 06:04:31 +08:00

33 lines
867 B
Rust

use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use models::{RoomId, Uuid};
use super::message::MessageNewService;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SearchResultService {
pub q: String,
pub room: Uuid,
pub messages: Vec<SearchMessageHitService>,
pub total: i64,
pub took_ms: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SearchMessageHitService {
#[serde(flatten)]
pub message: MessageNewService,
pub highlighted_content: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SearchClient {
pub q: String,
pub room: Option<RoomId>,
pub start_time: Option<DateTime<Utc>>,
pub end_time: Option<DateTime<Utc>>,
pub sender_id: Option<Uuid>,
pub content_type: Option<String>,
pub limit: Option<u64>,
pub offset: Option<u64>,
}