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:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user