2
0

🐛 Fix streaming text selection (#1444)

This commit is contained in:
Baptiste Arnaud
2024-04-12 11:02:28 +02:00
committed by GitHub
parent d608a30e47
commit 3f367800df
10 changed files with 52 additions and 25 deletions

View File

@@ -59,11 +59,8 @@ export const executeForgedBlock = async (
) &&
state.isStreamEnabled &&
!state.whatsApp &&
// TODO: Enable once chat api is rolling
isPlaneteScale() &&
credentials &&
isCredentialsV2(credentials)
// !process.env.VERCEL_ENV
(!process.env.VERCEL_ENV ||
(isPlaneteScale() && credentials && isCredentialsV2(credentials)))
) {
return {
outgoingEdgeId: block.outgoingEdgeId,
@@ -72,6 +69,7 @@ export const executeForgedBlock = async (
type: 'stream',
expectsDedicatedReply: true,
stream: true,
runtime: process.env.VERCEL_ENV ? 'edge' : 'nodejs',
},
],
}