Skip to content

Commit ef10f69

Browse files
committed
🐛 Fix ky not working due to fetch rewriting by mistral package
Closes baptisteArno#1396
1 parent 6a4a43e commit ef10f69

File tree

15 files changed

+28
-14
lines changed

15 files changed

+28
-14
lines changed

apps/builder/next.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ const nextConfig = {
5656
if (nextRuntime === 'edge') {
5757
config.resolve.alias['minio'] = false
5858
config.resolve.alias['got'] = false
59-
config.resolve.alias['qrcode'] = false
6059
return config
6160
}
6261
// These packages are imports from the integrations definition files that can be ignored for the client.
6362
config.resolve.alias['minio'] = false
6463
config.resolve.alias['got'] = false
6564
config.resolve.alias['openai'] = false
66-
config.resolve.alias['qrcode'] = false
6765
return config
6866
},
6967
headers: async () => {

apps/docs/contribute/the-forge/block.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ After using the [CLI](./cli) to create your new block. The `index.ts` file conta
2626
name="LightLogo"
2727
type="(props: React.SVGProps<SVGSVGElement>) => React.JSX.Element"
2828
required
29-
></ResponseField>
29+
/>
3030

3131
<ResponseField
3232
name="DarkLogo"

apps/docs/contribute/the-forge/run.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ An action can do one of the following things:
1313

1414
The most common action is to execute a function on the server. This is done by simply declaring that function in the action block.
1515

16+
If you need to use an external package that is not compatible with web browser environment, you will have to dynamically import it in the server function. You can find an example of this in the [Anthropic's Create Chat Message action](https://github.com/baptisteArno/typebot.io/blob/main/packages/forge/blocks/anthropic/actions/createChatMessage.tsx)
17+
1618
Example:
1719

1820
```ts

apps/docs/openapi/builder.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19902,6 +19902,8 @@
1990219902
"type": "string",
1990319903
"enum": [
1990419904
"claude-3-opus-20240229",
19905+
"claude-3-sonnet-20240229",
19906+
"claude-3-haiku-20240307",
1990519907
"claude-2.1",
1990619908
"claude-2.0",
1990719909
"claude-instant-1.2"

apps/docs/openapi/viewer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10477,6 +10477,8 @@
1047710477
"type": "string",
1047810478
"enum": [
1047910479
"claude-3-opus-20240229",
10480+
"claude-3-sonnet-20240229",
10481+
"claude-3-haiku-20240307",
1048010482
"claude-2.1",
1048110483
"claude-2.0",
1048210484
"claude-instant-1.2"

apps/viewer/next.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ const nextConfig = {
5656
if (nextRuntime === 'edge') {
5757
config.resolve.alias['minio'] = false
5858
config.resolve.alias['got'] = false
59-
config.resolve.alias['qrcode'] = false
6059
return config
6160
}
6261
// These packages are imports from the integrations definition files that can be ignored for the client.
6362
config.resolve.alias['minio'] = false
6463
config.resolve.alias['got'] = false
6564
config.resolve.alias['openai'] = false
66-
config.resolve.alias['qrcode'] = false
6765
return config
6866
},
6967
async redirects() {

packages/bot-engine/apiHandlers/continueChat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type Props = {
1313
sessionId: string
1414
}
1515
export const continueChat = async ({ origin, sessionId, message }: Props) => {
16+
console.log('test')
1617
const session = await getSession(sessionId)
1718

1819
if (!session) {

packages/bot-engine/executeGroup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export const executeGroup = async (
111111
logs,
112112
visitedEdges,
113113
}
114+
console.log('yes')
114115
const executionResponse = (
115116
isLogicBlock(block)
116117
? await executeLogic(newSessionState)(block)

packages/bot-engine/executeIntegration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { env } from '@typebot.io/env'
1616
export const executeIntegration =
1717
(state: SessionState) =>
1818
async (block: IntegrationBlock): Promise<ExecuteIntegrationResponse> => {
19+
console.log('HI')
1920
switch (block.type) {
2021
case IntegrationBlockType.GOOGLE_SHEETS:
2122
return {

packages/bot-engine/forge/executeForgedBlock.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const executeForgedBlock = async (
2727
const blockDef = forgedBlocks[block.type]
2828
if (!blockDef) return { outgoingEdgeId: block.outgoingEdgeId }
2929
const action = blockDef.actions.find((a) => a.name === block.options.action)
30+
console.log('test', action)
3031
const noCredentialsError = {
3132
status: 'error',
3233
description: 'Credentials not provided for integration',
@@ -60,7 +61,9 @@ export const executeForgedBlock = async (
6061
state.isStreamEnabled &&
6162
!state.whatsApp &&
6263
// TODO: Enable once chat api is rolling
63-
isPlaneteScale()
64+
isPlaneteScale() &&
65+
credentials &&
66+
isCredentialsV2(credentials)
6467
// !process.env.VERCEL_ENV
6568
) {
6669
return {

0 commit comments

Comments
 (0)