- 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
32 lines
703 B
Rust
32 lines
703 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct CdnConfig {
|
|
pub enabled: bool,
|
|
pub base_url: String,
|
|
pub upload_endpoint: String,
|
|
pub max_file_size: u64,
|
|
}
|
|
|
|
pub struct CdnManager {
|
|
config: CdnConfig,
|
|
}
|
|
|
|
impl CdnManager {
|
|
pub fn new(config: CdnConfig) -> Self {
|
|
Self { config }
|
|
}
|
|
|
|
pub async fn upload_file(
|
|
&self,
|
|
_file_data: &[u8],
|
|
_filename: &str,
|
|
) -> Result<String, crate::error::AppTransportError> {
|
|
Ok(format!("{}/placeholder.jpg", self.config.base_url))
|
|
}
|
|
|
|
pub fn get_url(&self, path: &str) -> String {
|
|
format!("{}/{}", self.config.base_url, path)
|
|
}
|
|
}
|