Skip to content

Commit 29c7827

Browse files
authored
fix(deployed-chat): include workspace id in deployed chat request (#1664)
1 parent 22f9d6e commit 29c7827

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

apps/sim/app/api/chat/[identifier]/route.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export async function POST(
9898
const workflowResult = await db
9999
.select({
100100
isDeployed: workflow.isDeployed,
101+
workspaceId: workflow.workspaceId,
101102
})
102103
.from(workflow)
103104
.where(eq(workflow.id, deployment.workflowId))
@@ -146,7 +147,12 @@ export async function POST(
146147

147148
const stream = await createStreamingResponse({
148149
requestId,
149-
workflow: { id: deployment.workflowId, userId: deployment.userId, isDeployed: true },
150+
workflow: {
151+
id: deployment.workflowId,
152+
userId: deployment.userId,
153+
workspaceId: workflowResult[0].workspaceId,
154+
isDeployed: true,
155+
},
150156
input: workflowInput,
151157
executingUserId: deployment.userId,
152158
streamConfig: {

apps/sim/lib/workflows/streaming.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface StreamingConfig {
1616

1717
export interface StreamingResponseOptions {
1818
requestId: string
19-
workflow: { id: string; userId: string; isDeployed?: boolean }
19+
workflow: { id: string; userId: string; workspaceId?: string | null; isDeployed?: boolean }
2020
input: any
2121
executingUserId: string
2222
streamConfig: StreamingConfig

0 commit comments

Comments
 (0)