首页布局优化前

This commit is contained in:
iven
2026-03-17 23:26:16 +08:00
parent 74dbf42644
commit e262200f1e
89 changed files with 2266 additions and 2120 deletions

View File

@@ -1,4 +1,7 @@
// Browser action definitions for Hands system
// Note: These types are reserved for future Browser Hand automation features
#![allow(dead_code)]
use serde::{Deserialize, Serialize};

View File

@@ -324,10 +324,10 @@ impl BrowserClient {
let client = self.get_client(session_id).await?;
let locator = Locator::Css(selector);
// Use wait_for_find with proper API
// Use the new wait().for_element() API instead of deprecated wait_for_find
let element = tokio::time::timeout(
Duration::from_millis(timeout_ms),
client.wait_for_find(locator)
client.wait().for_element(locator)
)
.await
.map_err(|_| BrowserError::Timeout {

View File

@@ -1,8 +1,10 @@
// Tauri commands for browser automation
// Note: Some imports are reserved for future Browser Hand features
use crate::browser::actions::{ActionResult, BrowserAction, BrowserTask, FormField};
#![allow(unused_imports)]
use crate::browser::actions::BrowserAction;
use crate::browser::client::BrowserClient;
use crate::browser::error::BrowserError;
use crate::browser::session::{BrowserType, SessionConfig};
use serde::{Deserialize, Serialize};
use std::sync::Arc;

View File

@@ -1,4 +1,7 @@
// Browser automation error types
// Note: Some variants are reserved for future error handling scenarios
#![allow(dead_code)]
use serde::Serialize;
use thiserror::Error;

View File

@@ -1,5 +1,9 @@
// Browser automation module using Fantoccini
// Provides Browser Hand capabilities for ZCLAW
//
// Note: Public exports are reserved for future Browser Hand features
#![allow(unused_imports)]
pub mod client;
pub mod commands;
@@ -7,6 +11,7 @@ pub mod error;
pub mod session;
pub mod actions;
// Re-export main types for convenience
pub use client::BrowserClient;
pub use error::{BrowserError, Result};
pub use session::{BrowserSession, SessionConfig};

View File

@@ -166,6 +166,9 @@ impl SessionManager {
sessions.values().cloned().collect()
}
/// Get the number of active sessions
/// Reserved for future status dashboard
#[allow(dead_code)]
pub async fn session_count(&self) -> usize {
let sessions = self.sessions.read().await;
sessions.len()

View File

@@ -2,6 +2,10 @@
//!
//! Provides LLM API integration for memory extraction.
//! Supports multiple providers with a unified interface.
//!
//! Note: Some fields are reserved for future streaming and provider selection features
#![allow(dead_code)]
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

View File

@@ -9,6 +9,10 @@
//! - L2 (Deep): Load full content for most relevant items
//!
//! Reference: ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md §4.3
//!
//! Note: These types are reserved for future memory integration features
#![allow(dead_code)]
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

View File

@@ -9,9 +9,12 @@
//! - agent_lesson: Lessons learned by the agent from interactions
//! - agent_pattern: Recurring patterns the agent should remember
//! - task: Task-related information for follow-up
//!
//! Note: Some fields and methods are reserved for future LLM-powered extraction
#![allow(dead_code)]
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
// === Types ===

View File

@@ -9,5 +9,9 @@
pub mod extractor;
pub mod context_builder;
// Re-export main types for convenience
// Note: Some types are reserved for future memory integration features
#[allow(unused_imports)]
pub use extractor::{SessionExtractor, ExtractedMemory, ExtractionConfig};
#[allow(unused_imports)]
pub use context_builder::{ContextBuilder, EnhancedContext, ContextLevel};

View File

@@ -7,7 +7,6 @@
use serde::{Deserialize, Serialize};
use std::process::Command;
use tauri::AppHandle;
// === Types ===
@@ -131,6 +130,9 @@ fn run_viking_cli(args: &[&str]) -> Result<String, String> {
}
}
/// Helper function to run Viking CLI and parse JSON output
/// Reserved for future JSON-based commands
#[allow(dead_code)]
fn run_viking_cli_json<T: for<'de> Deserialize<'de>>(args: &[&str]) -> Result<T, String> {
let output = run_viking_cli(args)?;