From ac9911e59d9fd15e5b298a20052991603e2ad249 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 17 May 2025 23:58:47 -0400 Subject: [PATCH] move storyteller crate --- crates/desktop/artcraft/src/lib.rs | 2 +- .../services/fal/commands/fal_background_removal_command.rs | 2 +- .../services/fal/commands/fal_kling_image_to_video_command.rs | 2 +- crates/desktop/artcraft/src/services/mod.rs | 3 ++- crates/desktop/artcraft/src/services/storyteller/mod.rs | 1 + .../{state/storyteller => services/storyteller/state}/mod.rs | 0 .../state}/read_storyteller_credentials_from_disk.rs | 0 .../storyteller/state}/storyteller_credential_holder.rs | 0 .../storyteller/state}/storyteller_credential_manager.rs | 4 ++-- crates/desktop/artcraft/src/state/mod.rs | 3 +-- .../desktop/artcraft/src/threads/fal_task_polling_thread.rs | 2 +- .../src/threads/main_window_thread/main_window_thread.rs | 2 +- .../main_window_thread/persist_storyteller_cookies_task.rs | 2 +- .../desktop/artcraft/src/threads/sora_task_polling_thread.rs | 2 +- 14 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 crates/desktop/artcraft/src/services/storyteller/mod.rs rename crates/desktop/artcraft/src/{state/storyteller => services/storyteller/state}/mod.rs (100%) rename crates/desktop/artcraft/src/{state/storyteller => services/storyteller/state}/read_storyteller_credentials_from_disk.rs (100%) rename crates/desktop/artcraft/src/{state/storyteller => services/storyteller/state}/storyteller_credential_holder.rs (100%) rename crates/desktop/artcraft/src/{state/storyteller => services/storyteller/state}/storyteller_credential_manager.rs (93%) diff --git a/crates/desktop/artcraft/src/lib.rs b/crates/desktop/artcraft/src/lib.rs index f7679d0845..2762ed8968 100644 --- a/crates/desktop/artcraft/src/lib.rs +++ b/crates/desktop/artcraft/src/lib.rs @@ -29,7 +29,7 @@ use crate::state::app_preferences::app_preferences_manager::load_app_preferences use crate::state::data_dir::app_data_root::AppDataRoot; use crate::state::main_window_position::MainWindowPosition; use crate::state::main_window_size::MainWindowSize; -use crate::state::storyteller::storyteller_credential_manager::StorytellerCredentialManager; +use crate::services::storyteller::state::storyteller_credential_manager::StorytellerCredentialManager; use crate::threads::discord_presence_thread::discord_presence_thread; use crate::threads::fal_task_polling_thread::fal_task_polling_thread; use crate::threads::main_window_thread::main_window_thread::main_window_thread; diff --git a/crates/desktop/artcraft/src/services/fal/commands/fal_background_removal_command.rs b/crates/desktop/artcraft/src/services/fal/commands/fal_background_removal_command.rs index 96be61836d..da172f4569 100644 --- a/crates/desktop/artcraft/src/services/fal/commands/fal_background_removal_command.rs +++ b/crates/desktop/artcraft/src/services/fal/commands/fal_background_removal_command.rs @@ -9,7 +9,7 @@ use crate::services::sora::state::sora_credential_manager::SoraCredentialManager use crate::services::sora::state::sora_task_queue::SoraTaskQueue; use crate::state::data_dir::app_data_root::AppDataRoot; use crate::state::data_dir::trait_data_subdir::DataSubdir; -use crate::state::storyteller::storyteller_credential_manager::StorytellerCredentialManager; +use crate::services::storyteller::state::storyteller_credential_manager::StorytellerCredentialManager; use crate::utils::get_url_file_extension::get_url_file_extension; use crate::utils::simple_http_download::simple_http_download; use crate::utils::simple_http_download_to_tempfile::simple_http_download_to_tempfile; diff --git a/crates/desktop/artcraft/src/services/fal/commands/fal_kling_image_to_video_command.rs b/crates/desktop/artcraft/src/services/fal/commands/fal_kling_image_to_video_command.rs index d1fc5cf5e2..a35e40b90b 100644 --- a/crates/desktop/artcraft/src/services/fal/commands/fal_kling_image_to_video_command.rs +++ b/crates/desktop/artcraft/src/services/fal/commands/fal_kling_image_to_video_command.rs @@ -10,7 +10,7 @@ use crate::services::sora::state::sora_credential_manager::SoraCredentialManager use crate::services::sora::state::sora_task_queue::SoraTaskQueue; use crate::state::data_dir::app_data_root::AppDataRoot; use crate::state::data_dir::trait_data_subdir::DataSubdir; -use crate::state::storyteller::storyteller_credential_manager::StorytellerCredentialManager; +use crate::services::storyteller::state::storyteller_credential_manager::StorytellerCredentialManager; use crate::utils::get_url_file_extension::get_url_file_extension; use crate::utils::simple_http_download::simple_http_download; use crate::utils::simple_http_download_to_tempfile::simple_http_download_to_tempfile; diff --git a/crates/desktop/artcraft/src/services/mod.rs b/crates/desktop/artcraft/src/services/mod.rs index febc6a6823..8b92875ecb 100644 --- a/crates/desktop/artcraft/src/services/mod.rs +++ b/crates/desktop/artcraft/src/services/mod.rs @@ -1,2 +1,3 @@ pub mod fal; -pub mod sora; \ No newline at end of file +pub mod sora; +pub mod storyteller; \ No newline at end of file diff --git a/crates/desktop/artcraft/src/services/storyteller/mod.rs b/crates/desktop/artcraft/src/services/storyteller/mod.rs new file mode 100644 index 0000000000..0d0b840411 --- /dev/null +++ b/crates/desktop/artcraft/src/services/storyteller/mod.rs @@ -0,0 +1 @@ +pub mod state; \ No newline at end of file diff --git a/crates/desktop/artcraft/src/state/storyteller/mod.rs b/crates/desktop/artcraft/src/services/storyteller/state/mod.rs similarity index 100% rename from crates/desktop/artcraft/src/state/storyteller/mod.rs rename to crates/desktop/artcraft/src/services/storyteller/state/mod.rs diff --git a/crates/desktop/artcraft/src/state/storyteller/read_storyteller_credentials_from_disk.rs b/crates/desktop/artcraft/src/services/storyteller/state/read_storyteller_credentials_from_disk.rs similarity index 100% rename from crates/desktop/artcraft/src/state/storyteller/read_storyteller_credentials_from_disk.rs rename to crates/desktop/artcraft/src/services/storyteller/state/read_storyteller_credentials_from_disk.rs diff --git a/crates/desktop/artcraft/src/state/storyteller/storyteller_credential_holder.rs b/crates/desktop/artcraft/src/services/storyteller/state/storyteller_credential_holder.rs similarity index 100% rename from crates/desktop/artcraft/src/state/storyteller/storyteller_credential_holder.rs rename to crates/desktop/artcraft/src/services/storyteller/state/storyteller_credential_holder.rs diff --git a/crates/desktop/artcraft/src/state/storyteller/storyteller_credential_manager.rs b/crates/desktop/artcraft/src/services/storyteller/state/storyteller_credential_manager.rs similarity index 93% rename from crates/desktop/artcraft/src/state/storyteller/storyteller_credential_manager.rs rename to crates/desktop/artcraft/src/services/storyteller/state/storyteller_credential_manager.rs index 97da98a84c..90a00689b3 100644 --- a/crates/desktop/artcraft/src/state/storyteller/storyteller_credential_manager.rs +++ b/crates/desktop/artcraft/src/services/storyteller/state/storyteller_credential_manager.rs @@ -1,8 +1,8 @@ use crate::services::sora::state::read_sora_credentials_from_disk::read_sora_credentials_from_disk; use crate::services::sora::state::sora_credential_holder::SoraCredentialHolder; use crate::state::data_dir::app_data_root::AppDataRoot; -use crate::state::storyteller::read_storyteller_credentials_from_disk::read_storyteller_credentials_from_disk; -use crate::state::storyteller::storyteller_credential_holder::StorytellerCredentialHolder; +use crate::services::storyteller::state::read_storyteller_credentials_from_disk::read_storyteller_credentials_from_disk; +use crate::services::storyteller::state::storyteller_credential_holder::StorytellerCredentialHolder; use anyhow::anyhow; use errors::AnyhowResult; use log::{error, info, warn}; diff --git a/crates/desktop/artcraft/src/state/mod.rs b/crates/desktop/artcraft/src/state/mod.rs index 0e4cf6d584..beda27a3c3 100644 --- a/crates/desktop/artcraft/src/state/mod.rs +++ b/crates/desktop/artcraft/src/state/mod.rs @@ -4,5 +4,4 @@ pub mod data_dir; pub mod expanduser; pub mod main_window_position; pub mod main_window_size; -pub mod os_platform; -pub mod storyteller; \ No newline at end of file +pub mod os_platform; \ No newline at end of file diff --git a/crates/desktop/artcraft/src/threads/fal_task_polling_thread.rs b/crates/desktop/artcraft/src/threads/fal_task_polling_thread.rs index 9a5d6a6e22..113759141d 100644 --- a/crates/desktop/artcraft/src/threads/fal_task_polling_thread.rs +++ b/crates/desktop/artcraft/src/threads/fal_task_polling_thread.rs @@ -6,7 +6,7 @@ use crate::state::data_dir::trait_data_subdir::DataSubdir; use crate::services::fal::state::fal_credential_manager::FalCredentialManager; use crate::services::fal::state::fal_task_queue::FalTaskQueue; use crate::services::sora::state::sora_credential_manager::SoraCredentialManager; -use crate::state::storyteller::storyteller_credential_manager::StorytellerCredentialManager; +use crate::services::storyteller::state::storyteller_credential_manager::StorytellerCredentialManager; use errors::AnyhowResult; use fal_client::export::queue::Status; use fal_client::fal_error_plus::FalErrorPlus; diff --git a/crates/desktop/artcraft/src/threads/main_window_thread/main_window_thread.rs b/crates/desktop/artcraft/src/threads/main_window_thread/main_window_thread.rs index f9f258327b..6df338e597 100644 --- a/crates/desktop/artcraft/src/threads/main_window_thread/main_window_thread.rs +++ b/crates/desktop/artcraft/src/threads/main_window_thread/main_window_thread.rs @@ -2,7 +2,7 @@ use crate::state::app_startup_time::AppStartupTime; use crate::state::data_dir::app_data_root::AppDataRoot; use crate::state::main_window_position::MainWindowPosition; use crate::state::main_window_size::MainWindowSize; -use crate::state::storyteller::storyteller_credential_manager::StorytellerCredentialManager; +use crate::services::storyteller::state::storyteller_credential_manager::StorytellerCredentialManager; use crate::threads::main_window_thread::persist_storyteller_cookies_task::persist_storyteller_cookies_task; use crate::threads::main_window_thread::persist_window_position_task::persist_window_position_task; use crate::threads::main_window_thread::persist_window_resize_task::persist_window_resize_task; diff --git a/crates/desktop/artcraft/src/threads/main_window_thread/persist_storyteller_cookies_task.rs b/crates/desktop/artcraft/src/threads/main_window_thread/persist_storyteller_cookies_task.rs index 49c5c4bdf0..79d6aad870 100644 --- a/crates/desktop/artcraft/src/threads/main_window_thread/persist_storyteller_cookies_task.rs +++ b/crates/desktop/artcraft/src/threads/main_window_thread/persist_storyteller_cookies_task.rs @@ -1,6 +1,6 @@ use crate::state::app_startup_time::AppStartupTime; use crate::state::data_dir::app_data_root::AppDataRoot; -use crate::state::storyteller::storyteller_credential_manager::StorytellerCredentialManager; +use crate::services::storyteller::state::storyteller_credential_manager::StorytellerCredentialManager; use anyhow::anyhow; use chrono::TimeDelta; use errors::AnyhowResult; diff --git a/crates/desktop/artcraft/src/threads/sora_task_polling_thread.rs b/crates/desktop/artcraft/src/threads/sora_task_polling_thread.rs index edc42edf55..024d8778c2 100644 --- a/crates/desktop/artcraft/src/threads/sora_task_polling_thread.rs +++ b/crates/desktop/artcraft/src/threads/sora_task_polling_thread.rs @@ -5,7 +5,7 @@ use crate::state::data_dir::app_data_root::AppDataRoot; use crate::state::data_dir::trait_data_subdir::DataSubdir; use crate::services::sora::state::sora_credential_manager::SoraCredentialManager; use crate::services::sora::state::sora_task_queue::SoraTaskQueue; -use crate::state::storyteller::storyteller_credential_manager::StorytellerCredentialManager; +use crate::services::storyteller::state::storyteller_credential_manager::StorytellerCredentialManager; use errors::AnyhowResult; use log::{error, info}; use openai_sora_client::recipes::list_sora_task_status_with_session_auto_renew::{list_sora_task_status_with_session_auto_renew, StatusRequestArgs};