Refactor chat input & properly update state for proposal

This commit is contained in:
Will Chen
2025-04-18 12:32:57 -07:00
parent db7ac39c97
commit b2e3631a29
10 changed files with 140 additions and 48 deletions

View File

@@ -17,15 +17,9 @@ import type {
Message,
Version,
} from "./ipc_types";
import type { Proposal } from "@/lib/schemas";
import type { Proposal, ProposalResult } from "@/lib/schemas";
import { showError } from "@/lib/toast";
// Define the structure returned by getProposal
interface ProposalResult {
proposal: Proposal;
messageId: number;
}
export interface ChatStreamCallbacks {
onUpdate: (messages: Message[]) => void;
onEnd: (response: ChatResponseEnd) => void;