Fix message types
This commit is contained in:
@@ -50,9 +50,17 @@ const getProposalHandler = async (
|
||||
columns: {
|
||||
id: true, // Fetch the ID
|
||||
content: true, // Fetch the content to parse
|
||||
approvalState: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (
|
||||
latestAssistantMessage?.approvalState === "approved" ||
|
||||
latestAssistantMessage?.approvalState === "rejected"
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (latestAssistantMessage?.content && latestAssistantMessage.id) {
|
||||
const messageId = latestAssistantMessage.id; // Get the message ID
|
||||
console.log(
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { Message } from "ai";
|
||||
import type { IpcRenderer } from "electron";
|
||||
import {
|
||||
type ChatSummary,
|
||||
@@ -15,6 +14,7 @@ import type {
|
||||
CreateAppResult,
|
||||
ListAppsResponse,
|
||||
NodeSystemInfo,
|
||||
Message,
|
||||
Version,
|
||||
} from "./ipc_types";
|
||||
import type { Proposal } from "@/lib/schemas";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import type { Message } from "ai";
|
||||
|
||||
export interface AppOutput {
|
||||
type: "stdout" | "stderr" | "info" | "client-error";
|
||||
message: string;
|
||||
@@ -37,6 +35,13 @@ export interface CreateAppResult {
|
||||
chatId: number;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
id: string;
|
||||
role: "user" | "assistant";
|
||||
content: string;
|
||||
approvalState?: "approved" | "rejected";
|
||||
}
|
||||
|
||||
export interface Chat {
|
||||
id: number;
|
||||
title: string;
|
||||
|
||||
Reference in New Issue
Block a user