fix: thread allowEmptySubmit through composer submit path

The Create button on the new workspace screen was visible but clicking
it did nothing — submitAgentInput() still rejected empty payloads as
"noop". Thread allowEmptySubmit through Composer into submitAgentInput
so the callback fires and workspace creation + redirect completes.

Adds regression test for the empty-submit path.
This commit is contained in:
Mohamed Boudra
2026-04-15 11:53:05 +07:00
parent 43bec954ea
commit 60cc73f87e
3 changed files with 41 additions and 1 deletions
@@ -4,6 +4,7 @@ export interface AgentInputSubmitActionInput<TImage> {
message: string;
imageAttachments?: TImage[];
hasExternalContent?: boolean;
allowEmptySubmit?: boolean;
forceSend?: boolean;
isAgentRunning: boolean;
canSubmit: boolean;
@@ -23,7 +24,12 @@ export async function submitAgentInput<TImage>(
const trimmedMessage = input.message.trim();
const imageAttachments = input.imageAttachments;
if (!trimmedMessage && !imageAttachments?.length && !input.hasExternalContent) {
if (
!trimmedMessage &&
!imageAttachments?.length &&
!input.hasExternalContent &&
!input.allowEmptySubmit
) {
return "noop";
}