MCPcopy Create free account
hub / github.com/GCWing/BitFun / computer_use_ocr_debug_dir

Function computer_use_ocr_debug_dir

src/apps/desktop/src/computer_use/screen_ocr.rs:63–79  ·  view source on GitHub ↗

Same directory as agent `screenshot` debug (`workspace/.bitfun/computer_use_debug`), when PathManager is available.

()

Source from the content-addressed store, hash-verified

61
62/// Same directory as agent `screenshot` debug (`workspace/.bitfun/computer_use_debug`), when PathManager is available.
63fn computer_use_ocr_debug_dir() -> PathBuf {
64 if let Ok(pm) = try_get_path_manager_arc() {
65 return pm
66 .default_assistant_workspace_dir(None)
67 .join(".bitfun")
68 .join("computer_use_debug");
69 }
70 dirs::home_dir()
71 .map(|h| {
72 h.join(".bitfun")
73 .join("personal_assistant")
74 .join("workspace")
75 .join(".bitfun")
76 .join("computer_use_debug")
77 })
78 .unwrap_or_else(|| std::env::temp_dir().join("computer_use_debug"))
79}
80
81/// Persists `shot.bytes` (same buffer as Vision / WinRT / Tesseract) before OCR runs.
82fn save_ocr_debug_jpeg(shot: &ComputerScreenshot, text_query: &str) {

Callers 1

save_ocr_debug_jpegFunction · 0.85

Calls 5

try_get_path_manager_arcFunction · 0.85
home_dirFunction · 0.85
temp_dirFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected