Skip to content

Commit e471b2e

Browse files
committed
fix(chat): guard chatId before adding task key to existingResourceKeys
1 parent 669f2ac commit e471b2e

File tree

1 file changed

+1
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/home/components/user-input

1 file changed

+1
-1
lines changed

apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export function UserInput({
211211
if (ctx.kind === 'table' && ctx.tableId) keys.add(`table:${ctx.tableId}`)
212212
if (ctx.kind === 'file' && ctx.fileId) keys.add(`file:${ctx.fileId}`)
213213
if (ctx.kind === 'folder' && ctx.folderId) keys.add(`folder:${ctx.folderId}`)
214-
if (ctx.kind === 'past_chat') keys.add(`task:${ctx.chatId}`)
214+
if (ctx.kind === 'past_chat' && ctx.chatId) keys.add(`task:${ctx.chatId}`)
215215
}
216216
return keys
217217
}, [contextManagement.selectedContexts])

0 commit comments

Comments
 (0)