-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Separate API Service for Web Interface #174
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few nits/comments. Functionally seems there though.
EDIT: Do we want to remove /api
with this also?
// useEffect(async () => { | ||
// const newConv = await createConversation(); | ||
// setConversationId(newConv?.conversationId); | ||
// mutateConversations([newConv!]); | ||
// }, [conversations]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// useEffect(async () => { | |
// const newConv = await createConversation(); | |
// setConversationId(newConv?.conversationId); | |
// mutateConversations([newConv!]); | |
// }, [conversations]); | |
responseReader.releaseLock(); | ||
responseReader = null; | ||
|
||
mutateMessages(); | ||
} catch (error) { | ||
console.error('Chat error:', error); | ||
setCanSend(true); | ||
} finally { | ||
// Cleanup | ||
if (thoughtReader) { | ||
try { | ||
thoughtReader.releaseLock(); | ||
} catch (e) { | ||
console.error('Error releasing thought reader:', e); | ||
} | ||
} | ||
if (responseReader) { | ||
try { | ||
responseReader.releaseLock(); | ||
} catch (e) { | ||
console.error('Error releasing response reader:', e); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: release the responseReader
lock in the finally
clause.
throw new Error(`No response body for ${type} stream`); | ||
} | ||
|
||
console.log(`${type} stream connected successfully`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(`${type} stream connected successfully`); |
@@ -73,17 +83,18 @@ export default function Sidebar({ | |||
}); | |||
|
|||
if (isConfirmed) { | |||
await conversation.delete(); | |||
await deleteConversation(conversation.conversationId); | |||
// await conversation.delete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// await conversation.delete(); |
@@ -20,11 +21,14 @@ | |||
"@stripe/stripe-js": "^4.9.0", | |||
"@supabase/ssr": "^0.5.2", | |||
"@supabase/supabase-js": "^2.45.6", | |||
"ai": "^4.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using this? I didn't see any references to it.
No description provided.