2
0

🐛 Fix ky not working due to fetch rewriting by mistral package

Closes #1396
This commit is contained in:
Baptiste Arnaud
2024-04-03 14:35:18 +02:00
parent 6a4a43efb4
commit ef10f69f92
15 changed files with 28 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ type Props = {
sessionId: string
}
export const continueChat = async ({ origin, sessionId, message }: Props) => {
console.log('test')
const session = await getSession(sessionId)
if (!session) {

View File

@@ -111,6 +111,7 @@ export const executeGroup = async (
logs,
visitedEdges,
}
console.log('yes')
const executionResponse = (
isLogicBlock(block)
? await executeLogic(newSessionState)(block)

View File

@@ -16,6 +16,7 @@ import { env } from '@typebot.io/env'
export const executeIntegration =
(state: SessionState) =>
async (block: IntegrationBlock): Promise<ExecuteIntegrationResponse> => {
console.log('HI')
switch (block.type) {
case IntegrationBlockType.GOOGLE_SHEETS:
return {

View File

@@ -27,6 +27,7 @@ export const executeForgedBlock = async (
const blockDef = forgedBlocks[block.type]
if (!blockDef) return { outgoingEdgeId: block.outgoingEdgeId }
const action = blockDef.actions.find((a) => a.name === block.options.action)
console.log('test', action)
const noCredentialsError = {
status: 'error',
description: 'Credentials not provided for integration',
@@ -60,7 +61,9 @@ export const executeForgedBlock = async (
state.isStreamEnabled &&
!state.whatsApp &&
// TODO: Enable once chat api is rolling
isPlaneteScale()
isPlaneteScale() &&
credentials &&
isCredentialsV2(credentials)
// !process.env.VERCEL_ENV
) {
return {