Simplify handlers & IPC client: move from Result pattern to throwing errors (#120)

This commit is contained in:
Will Chen
2025-05-09 15:14:12 -07:00
committed by GitHub
parent 26305ee090
commit c71638a508
25 changed files with 618 additions and 990 deletions

View File

@@ -6,6 +6,7 @@ import { ChevronRight, Circle } from "lucide-react";
import "@/components/chat/monaco";
import { IpcClient } from "@/ipc/ipc_client";
import { useSettings } from "@/hooks/useSettings";
import { showError } from "@/lib/toast";
interface FileEditorProps {
appId: number | null;
@@ -132,8 +133,7 @@ export const FileEditor = ({ appId, filePath }: FileEditorProps) => {
needsSaveRef.current = false;
setDisplayUnsavedChanges(false);
} catch (error) {
console.error("Error saving file:", error);
// Could add error notification here
showError(error);
} finally {
isSavingRef.current = false;
}