Skip to content

Commit

Permalink
fix: revert hack
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Jul 31, 2024
1 parent 12255c8 commit e5fc95d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
14 changes: 0 additions & 14 deletions examples/apps/screenpipe-app-tauri/components/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@ export function Settings({ className }: { className?: string }) {
updateSettings({ ...localSettings, useOllama: checked });
};

const handleCliToggle = async (checked: boolean) => {
setIsTogglingCli(true);
try {
await invoke("use_cli", { useCli: checked });
setLocalSettings({ ...localSettings, useCli: checked });
updateSettings({ ...localSettings, useCli: checked });
} catch (error) {
console.error("Failed to toggle sidecar:", error);
setIsTogglingCliError("Failed to toggle sidecar: " + error);
} finally {
setIsTogglingCli(false);
}
};

const handleStop = async () => {
setIsStopping(true);
try {
Expand Down
14 changes: 7 additions & 7 deletions examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
// resulting in multiple screenpipe instances
// (hard kill = cli, right click bottom bar), otherwise click on windows close should
// properly kill the sidecar
tauri::async_runtime::spawn(async {
let _ = tokio::process::Command::new("pkill")
.arg("-f")
.arg("screenpipe")
.output()
.await;
});
// tauri::async_runtime::spawn(async {
// let _ = tokio::process::Command::new("pkill")
// .arg("-f")
// .arg("screenpipe")
// .output()
// .await;
// });

// sleep 1s hack
std::thread::sleep(std::time::Duration::from_secs(1));
Expand Down

0 comments on commit e5fc95d

Please sign in to comment.