generated from nhcarrigan/template
chore: fix cluppy
This commit is contained in:
@@ -321,6 +321,7 @@ mod tests {
|
|||||||
let event = StateChangeEvent {
|
let event = StateChangeEvent {
|
||||||
state: CharacterState::Coding,
|
state: CharacterState::Coding,
|
||||||
tool_name: Some("Edit".to_string()),
|
tool_name: Some("Edit".to_string()),
|
||||||
|
conversation_id: None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let serialized = serde_json::to_string(&event).unwrap();
|
let serialized = serde_json::to_string(&event).unwrap();
|
||||||
@@ -334,6 +335,7 @@ mod tests {
|
|||||||
line_type: "assistant".to_string(),
|
line_type: "assistant".to_string(),
|
||||||
content: "Test output".to_string(),
|
content: "Test output".to_string(),
|
||||||
tool_name: None,
|
tool_name: None,
|
||||||
|
conversation_id: None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let serialized = serde_json::to_string(&event).unwrap();
|
let serialized = serde_json::to_string(&event).unwrap();
|
||||||
|
|||||||
@@ -103,17 +103,6 @@ impl WslBridge {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub async fn new_with_loaded_achievements(app: &tauri::AppHandle) -> Self {
|
|
||||||
let bridge = Self::new();
|
|
||||||
|
|
||||||
// Load saved achievements into the stats
|
|
||||||
let achievements = crate::achievements::load_achievements(app).await;
|
|
||||||
println!("Loaded achievements into bridge: {} unlocked", achievements.unlocked.len());
|
|
||||||
bridge.stats.write().achievements = achievements;
|
|
||||||
|
|
||||||
bridge
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn start(&mut self, app: AppHandle, options: ClaudeStartOptions) -> Result<(), String> {
|
pub fn start(&mut self, app: AppHandle, options: ClaudeStartOptions) -> Result<(), String> {
|
||||||
if self.process.is_some() {
|
if self.process.is_some() {
|
||||||
@@ -394,15 +383,6 @@ impl WslBridge {
|
|||||||
self.stats.read().clone()
|
self.stats.read().clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn update_stats(&mut self, input_tokens: u64, output_tokens: u64, model: &str) {
|
|
||||||
self.stats.write().add_usage(input_tokens, output_tokens, model);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn reset_session_stats(&mut self) {
|
|
||||||
self.stats.write().reset_session();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for WslBridge {
|
impl Default for WslBridge {
|
||||||
@@ -914,9 +894,10 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_create_shared_bridge() {
|
fn test_create_shared_bridge_manager() {
|
||||||
let shared = create_shared_bridge();
|
use crate::bridge_manager::create_shared_bridge_manager;
|
||||||
let bridge = shared.lock();
|
let shared = create_shared_bridge_manager();
|
||||||
assert!(!bridge.is_running());
|
let manager = shared.lock();
|
||||||
|
assert!(manager.get_active_connections().is_empty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user