uploads: centralise via ChatHubApi::save_upload, refactor handlers
Nightly Build / build (push) Successful in 6m41s
Nightly Build / build (push) Successful in 6m41s
Extract shared upload seam in skald-core, move Telegram and web handlers to use it. Simplify media attachment routing. Clean up unused deps and dead code.
This commit is contained in:
@@ -20,7 +20,7 @@ use crate::config::DatetimeConfig;
|
||||
use crate::db::{chat_history, chat_sessions_stack};
|
||||
use crate::events::ServerEvent;
|
||||
use core_api::message_meta::MessageMetadata;
|
||||
use core_api::user_fs::SharedFs;
|
||||
use core_api::user_fs::{SharedFs, UserFs};
|
||||
use crate::llm::LlmManager;
|
||||
use crate::mcp::McpProvider;
|
||||
use crate::image_generate::ImageGeneratorManager;
|
||||
@@ -414,6 +414,13 @@ impl ChatSessionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
/// The caller's current filesystem snapshot (home + shared folders + projects
|
||||
/// + docs). Cheap — clones an `Arc`. Used by upload persistence to place files
|
||||
/// in the owner's home.
|
||||
pub fn user_fs(&self) -> Arc<UserFs> {
|
||||
self.fs.load()
|
||||
}
|
||||
|
||||
/// Override the session used for scratchpad reads/writes.
|
||||
/// Called by the cron runner for async tasks so they share the parent's scratchpad.
|
||||
pub fn set_scratchpad_session_id(&self, id: i64) {
|
||||
|
||||
Reference in New Issue
Block a user