Skip to main content

metis_docs_tui/services/
workspace.rs

1use anyhow::Result;
2use metis_core::application::services::workspace::WorkspaceDetectionService;
3use std::path::PathBuf;
4
5/// Service for workspace operations
6pub struct WorkspaceService {
7    detection_service: WorkspaceDetectionService,
8}
9
10impl WorkspaceService {
11    pub fn new() -> Self {
12        Self {
13            detection_service: WorkspaceDetectionService::new(),
14        }
15    }
16
17    pub async fn check_workspace(&self) -> Result<Option<PathBuf>> {
18        self.detection_service.find_workspace()
19    }
20}
21
22impl Default for WorkspaceService {
23    fn default() -> Self {
24        Self::new()
25    }
26}