diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile index 9c5c83e2a..cd0406c9f 100644 --- a/.circleci/Dockerfile +++ b/.circleci/Dockerfile @@ -5,7 +5,7 @@ USER root # Install system dependencies or any other tools you need RUN apt-get update && sudo apt-get install -y \ - libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf protobuf-compiler cmake + libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf protobuf-compiler cmake gobjc clang gnustep-devel libobjc4 libgnustep-base-dev libasound2-dev pkg-config fuse libfuse2 mesa-utils mesa-vulkan-drivers # Install Go ENV GO_VERSION 1.22.0 @@ -29,8 +29,8 @@ RUN echo 'export PATH="/usr/local/bin:$PATH"' >> $HOME/.bashrc # Install Rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> /home/circleci/.bashrc -RUN ~/.cargo/bin/rustup install 1.80 -RUN ~/.cargo/bin/rustup default 1.80 +RUN ~/.cargo/bin/rustup install 1.81 +RUN ~/.cargo/bin/rustup default 1.81 RUN ~/.cargo/bin/rustup target add wasm32-unknown-unknown # Install Deno diff --git a/.circleci/config.yml b/.circleci/config.yml index 71221b909..26f602add 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ orbs: jobs: build-and-test: docker: - - image: coasys/ad4m-ci-linux:latest@sha256:989a070068192050e61f2fab134f598739b0ec6756588fada602709081b28152 + - image: coasys/ad4m-ci-linux:latest@sha256:2dd8206db5ee73ae58f48e2c2db595320ab88b94f5e0c0ddc99698191a03114f resource_class: xlarge steps: - checkout @@ -52,9 +52,6 @@ jobs: - run: name: cargo fmt --check command: cargo fmt --check - - run: - name: install gobjc - command: sudo apt-get install gobjc clang gnustep-devel libobjc4 libgnustep-base-dev libasound2-dev pkg-config fuse libfuse2 mesa-utils mesa-vulkan-drivers - run: name: Install dependencies command: pnpm install --no-frozen-lockfile @@ -80,10 +77,10 @@ jobs: paths: - ./target/release/ad4m - ./target/release/ad4m-executor - #- run: - # name: cargo clippy - # no_output_timeout: 30m - # command: cargo clippy --all --exclude ad4m-launcher + - run: + name: cargo clippy + no_output_timeout: 30m + command: cargo clippy --all --exclude ad4m-launcher - run: name: Remove pnpm patches command: node removePnpm.js diff --git a/rust-executor/src/ai_service/mod.rs b/rust-executor/src/ai_service/mod.rs index de2a382dd..7aaa56c7f 100644 --- a/rust-executor/src/ai_service/mod.rs +++ b/rust-executor/src/ai_service/mod.rs @@ -254,7 +254,7 @@ impl AIService { Ok(tasks) } - pub async fn spawn_embedding_model(&self, model_id: String) { + async fn spawn_embedding_model(&self, model_id: String) { let (bert_tx, mut bert_rx) = mpsc::unbounded_channel::(); thread::spawn({ @@ -296,7 +296,7 @@ impl AIService { .insert(model_id, bert_tx); } - pub async fn spawn_llm_model(&self, model_id: String) { + async fn spawn_llm_model(&self, model_id: String) { let (llama_tx, mut llama_rx) = mpsc::unbounded_channel::(); thread::spawn({ @@ -517,7 +517,7 @@ impl AIService { pub async fn open_transcription_stream(&self, _model_id: String) -> Result { let stream_id = uuid::Uuid::new_v4().to_string(); let stream_id_clone = stream_id.clone(); - let (samples_tx, sampels_rx) = futures_channel::mpsc::unbounded::>(); + let (samples_tx, samples_rx) = futures_channel::mpsc::unbounded::>(); //TODO: use drop_rx to exit thread let (drop_tx, drop_rx) = oneshot::channel(); let (done_tx, done_rx) = oneshot::channel(); @@ -534,7 +534,7 @@ impl AIService { if let Ok(whisper) = maybe_model { let audio_stream = AudioStream { read_data: Vec::new(), - receiver: Box::pin(sampels_rx.map(futures_util::stream::iter).flatten()), + receiver: Box::pin(samples_rx.map(futures_util::stream::iter).flatten()), }; let mut word_stream = audio_stream diff --git a/ui/src-tauri/src/lib.rs b/ui/src-tauri/src/lib.rs index 2e3409a97..a0b77a388 100644 --- a/ui/src-tauri/src/lib.rs +++ b/ui/src-tauri/src/lib.rs @@ -253,8 +253,8 @@ pub fn run() { open_logs_folder(); }); - build_menu(&app.handle())?; - build_system_tray(&app.handle())?; + build_menu(app.handle())?; + build_system_tray(app.handle())?; let config = rust_executor::Ad4mConfig { admin_credential: Some(req_credential.to_string()), @@ -295,15 +295,14 @@ pub fn run() { Ok(()) }) - .on_window_event(|window, event| match event { - tauri::WindowEvent::CloseRequested { api, .. } => { + .on_window_event(|window, event| { + if let tauri::WindowEvent::CloseRequested { api, .. } = event { if let Err(e) = window.hide() { println!("Error trying to hide window: {:?}", e); } else { api.prevent_close(); } } - _ => {} }) .build(tauri::generate_context!()); diff --git a/ui/src-tauri/src/system_tray.rs b/ui/src-tauri/src/system_tray.rs index 34730149b..db8575f83 100644 --- a/ui/src-tauri/src/system_tray.rs +++ b/ui/src-tauri/src/system_tray.rs @@ -59,13 +59,15 @@ pub fn build_system_tray(app: &AppHandle) -> Result<()> { _ => log::error!("Event is not defined."), }) .menu_on_left_click(false) - .on_tray_icon_event(|tray, event| match event { - TrayIconEvent::Click { + .on_tray_icon_event(|tray, event| { + if let TrayIconEvent::Click { button: MouseButton::Left, button_state: MouseButtonState::Up, .. - } => toggle_main_window(tray.app_handle()), - _ => {} + } = event + { + toggle_main_window(tray.app_handle()) + } }) .build(app)?; diff --git a/ui/src-tauri/tauri.conf.json b/ui/src-tauri/tauri.conf.json index e9ac3df91..a357498b3 100644 --- a/ui/src-tauri/tauri.conf.json +++ b/ui/src-tauri/tauri.conf.json @@ -3,14 +3,6 @@ "mainBinaryName": "ADAM Launcher", "version": "0.10.0-rc9", "identifier": "dev.ad4m.ad4min", - "plugins": { - "updater": { - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEM1OTBGNDkzMkI2MTczMEMKUldRTWMyRXJrL1NReGFTUVBTMjRhQWlEVTFuOHBkcEZwbmEwSG9DdWczeDdtRUdNK3hMMm1GUnoK", - "endpoints": [ - "https://launcher-update-worker.perspect3vism.workers.dev/update/{{target}}/{{current_version}}" - ] - } - }, "app": { "security": { "csp": null @@ -78,7 +70,6 @@ "appimage": { "bundleMediaFramework": true } - }, - "createUpdaterArtifacts": "v1Compatible" + } } } \ No newline at end of file