Support Linux refactoring checks
This commit is contained in:
19
src/app.rs
19
src/app.rs
@@ -19,7 +19,7 @@ use crate::config::{
|
||||
GitDiffWhitespace,
|
||||
};
|
||||
use crate::database::{Database, ProjectWithSessions, SessionState, StoredMessage};
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(any(target_os = "macos", test))]
|
||||
use crate::engine::ChatTurn;
|
||||
use crate::metrics::{KvCacheReport, Metrics, MetricsSnapshot};
|
||||
use crate::model::{self, DownloadOutcome, DownloadProgress, ManagedArtifactId, ModelChoice};
|
||||
@@ -36,9 +36,11 @@ use rfd::AsyncFileDialog;
|
||||
use std::collections::{HashMap, HashSet, VecDeque};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use std::sync::mpsc::{self, TryRecvError};
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
#[cfg(target_os = "macos")]
|
||||
use std::sync::{Mutex, RwLock};
|
||||
use std::thread;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
@@ -595,6 +597,7 @@ impl App {
|
||||
active_generation: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_compaction: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_tool_check: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
agent_tools: None,
|
||||
@@ -737,6 +740,7 @@ impl App {
|
||||
active_generation: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_compaction: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_tool_check: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
agent_tools: None,
|
||||
@@ -1567,8 +1571,11 @@ impl App {
|
||||
self.error = Some(format!("Could not play media: {error}"));
|
||||
}
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
if let Err(error) = std::process::Command::new("open").arg(url).spawn() {
|
||||
self.error = Some(format!("Could not open media: {error}"));
|
||||
{
|
||||
let _ = (title, video);
|
||||
if let Err(error) = std::process::Command::new("open").arg(url).spawn() {
|
||||
self.error = Some(format!("Could not open media: {error}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Message::RequestA2uiDismiss(surface_id) => {
|
||||
@@ -1788,8 +1795,10 @@ impl App {
|
||||
if let Some(database) = &mut self.database {
|
||||
match database.delete_project(project_id) {
|
||||
Ok(()) => {
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let _ = checkpoint_ids;
|
||||
#[cfg(target_os = "macos")]
|
||||
for session_id in checkpoint_ids {
|
||||
#[cfg(target_os = "macos")]
|
||||
self.background_chats.remove(&session_id);
|
||||
}
|
||||
self.drafts.remove(&project_id);
|
||||
|
||||
Reference in New Issue
Block a user