= ({ isBlockedByOtherUser = false }) => {
// Check if any attachments are still being processed (running AND progress < 100)
// When progress is 100, processing is done but waiting for send()
const hasProcessingAttachments = useAssistantState(({ composer }) =>
@@ -480,7 +484,8 @@ const ComposerAction: FC = () => {
return userConfigs?.some((c) => c.id === agentLlmId) ?? false;
}, [preferences, globalConfigs, userConfigs]);
- const isSendDisabled = hasProcessingAttachments || isComposerEmpty || !hasModelConfigured;
+ const isSendDisabled =
+ hasProcessingAttachments || isComposerEmpty || !hasModelConfigured || isBlockedByOtherUser;
return (
@@ -509,13 +514,15 @@ const ComposerAction: FC = () => {
({
url: `${ELECTRIC_URL}/v1/shape`,
@@ -12,8 +16,6 @@ export function useChatSessionState(threadId: number | null) {
table: "chat_session_state",
where: `thread_id = ${threadId}`,
},
- // Skip fetching if no threadId
- ...(threadId ? {} : { url: undefined as unknown as string }),
});
const sessionState = data?.[0] ?? null;