fix: require content to create workspace — no more empty submissions

Replace allowEmptySubmit/emptySubmitLabel with hasExternalContent prop
that treats GitHub items the same as text and images in submit gating.
This commit is contained in:
Mohamed Boudra
2026-04-14 17:28:31 +07:00
parent 89db6d3187
commit c80d7a8165
5 changed files with 17 additions and 46 deletions
@@ -3,7 +3,7 @@ export type AgentInputSubmitResult = "noop" | "queued" | "submitted" | "failed";
export interface AgentInputSubmitActionInput<TImage> {
message: string;
imageAttachments?: TImage[];
allowEmptySubmit?: boolean;
hasExternalContent?: boolean;
forceSend?: boolean;
isAgentRunning: boolean;
canSubmit: boolean;
@@ -23,7 +23,7 @@ export async function submitAgentInput<TImage>(
const trimmedMessage = input.message.trim();
const imageAttachments = input.imageAttachments;
if (!trimmedMessage && !imageAttachments?.length && !input.allowEmptySubmit) {
if (!trimmedMessage && !imageAttachments?.length && !input.hasExternalContent) {
return "noop";
}