fix: disable form call to save cost (#1418)

This commit is contained in:
Bradley Axen
2025-02-28 15:44:11 +01:00
committed by GitHub
parent fe6cb72677
commit 077f3f23e1

View File

@@ -53,10 +53,10 @@ export default function ChatView({ setView }: { setView: (view: View) => void })
onFinish: async (message, _reason) => {
window.electron.stopPowerSaveBlocker();
// Extract text content from the message to pass to askAi
const messageText = getTextContent(message);
const fetchResponses = await askAi(messageText);
setMessageMetadata((prev) => ({ ...prev, [message.id || '']: fetchResponses }));
// Disabled askAi calls to save costs
// const messageText = getTextContent(message);
// const fetchResponses = await askAi(messageText);
// setMessageMetadata((prev) => ({ ...prev, [message.id || '']: fetchResponses }));
const timeSinceLastInteraction = Date.now() - lastInteractionTime;
window.electron.logInfo('last interaction:' + lastInteractionTime);