Show warning if there's uncommitted changes (#92)

This commit is contained in:
Will Chen
2025-05-06 11:07:31 -07:00
committed by GitHub
parent 43ec6a4563
commit c425daf893
8 changed files with 65 additions and 10 deletions

View File

@@ -486,6 +486,7 @@ This conversation includes one or more image attachments. When the user uploads
event.sender.send("chat:response:end", {
chatId: req.chatId,
updatedFiles: status.updatedFiles ?? false,
uncommittedFiles: status.uncommittedFiles,
} satisfies ChatResponseEnd);
} else {
event.sender.send("chat:response:end", {

View File

@@ -331,7 +331,11 @@ const getProposalHandler = async (
const approveProposalHandler = async (
_event: IpcMainInvokeEvent,
{ chatId, messageId }: { chatId: number; messageId: number }
): Promise<{ success: boolean; error?: string }> => {
): Promise<{
success: boolean;
error?: string;
uncommittedFiles?: string[];
}> => {
logger.log(
`IPC: approve-proposal called for chatId: ${chatId}, messageId: ${messageId}`
);
@@ -380,7 +384,7 @@ const approveProposalHandler = async (
};
}
return { success: true };
return { success: true, uncommittedFiles: processResult.uncommittedFiles };
} catch (error) {
logger.error(`Error approving proposal for messageId ${messageId}:`, error);
return {