fix: resolve TypeScript and Rust build errors and warnings
- Fixed TypeScript errors in ClaudeCodeSession.tsx: - Removed unused imports (Square, PreviewPromptDialog, etc.) - Removed unused handleOpenPreview function - Fixed unused detectedUrl state variable - Fixed TypeScript error in StreamMessage.tsx: - Removed unused useMemo import - Fixed TypeScript errors in ToolWidgets.tsx: - Prefixed unused result props with underscore in multiple widgets - Fixed Rust warnings: - Removed unused imports in commands modules - Prefixed unused variables with underscore - Added #[allow(dead_code)] for API methods intended for future use Closes #31 Closes #23 Closes #21 Closes #22
This commit is contained in:
@@ -244,11 +244,13 @@ impl CheckpointPaths {
|
||||
self.checkpoint_dir(checkpoint_id).join("messages.jsonl")
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn file_snapshot_path(&self, _checkpoint_id: &str, file_hash: &str) -> PathBuf {
|
||||
// In content-addressable storage, files are stored by hash in the content pool
|
||||
self.files_dir.join("content_pool").join(file_hash)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn file_reference_path(&self, checkpoint_id: &str, safe_filename: &str) -> PathBuf {
|
||||
// References are stored per checkpoint
|
||||
self.files_dir.join("refs").join(checkpoint_id).join(format!("{}.json", safe_filename))
|
||||
|
@@ -87,6 +87,7 @@ impl CheckpointState {
|
||||
/// Gets an existing CheckpointManager for a session
|
||||
///
|
||||
/// Returns None if no manager exists for the session
|
||||
#[allow(dead_code)]
|
||||
pub async fn get_manager(&self, session_id: &str) -> Option<Arc<CheckpointManager>> {
|
||||
let managers = self.managers.read().await;
|
||||
managers.get(session_id).map(Arc::clone)
|
||||
@@ -103,6 +104,7 @@ impl CheckpointState {
|
||||
/// Clears all managers
|
||||
///
|
||||
/// This is useful for cleanup during application shutdown
|
||||
#[allow(dead_code)]
|
||||
pub async fn clear_all(&self) {
|
||||
let mut managers = self.managers.write().await;
|
||||
managers.clear();
|
||||
@@ -121,11 +123,13 @@ impl CheckpointState {
|
||||
}
|
||||
|
||||
/// Checks if a session has an active manager
|
||||
#[allow(dead_code)]
|
||||
pub async fn has_active_manager(&self, session_id: &str) -> bool {
|
||||
self.get_manager(session_id).await.is_some()
|
||||
}
|
||||
|
||||
/// Clears all managers and returns the count that were cleared
|
||||
#[allow(dead_code)]
|
||||
pub async fn clear_all_and_count(&self) -> usize {
|
||||
let count = self.active_count().await;
|
||||
self.clear_all().await;
|
||||
|
Reference in New Issue
Block a user