Skip to content

Commit 8e64726

Browse files
committed
fix(chat): exempt only Project-owned file tabs from the stream workspace guard
1 parent 19d46f1 commit 8e64726

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/sim/app/workspace/[workspaceId]/home/hooks/stream/handle-resource-event.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { searchResourceMatchesOwner } from '@/lib/mothership/resources/search'
1010
import {
1111
chatResourceKeyFor,
1212
getChatResourceSelectionId,
13+
isFileResourceType,
1314
mergeChatResource,
1415
} from '@/lib/mothership/resources/types'
1516
import { notifyWorkflowExternalUpdate } from '@/lib/workflows/external-update'
@@ -198,7 +199,7 @@ export function handleResourceEvent(ctx: StreamLoopContext, parsed: ResourceEven
198199
if (
199200
workspaceId
200201
? chatWorkspaceId && workspaceId !== chatWorkspaceId
201-
: owner?.entityType !== 'project'
202+
: !(owner?.entityType === 'project' && isFileResourceType(payload.resource.type))
202203
)
203204
return
204205
// Browser and terminal tabs are projected from the desktop app's live

0 commit comments

Comments
 (0)