export const IMAGE_WORKSPACE_UNAVAILABLE_CODE = 'IMAGE_WORKSPACE_UNAVAILABLE'; export const IMAGE_WORKSPACE_UNAVAILABLE_MESSAGE = '创作空间暂不可用'; export type ImageWorkspaceOption = { id: string; label: string; description?: string; }; export type ImageWorkspaceCapabilities = { modes: ImageWorkspaceOption[]; models: ImageWorkspaceOption[]; aspectRatios: ImageWorkspaceOption[]; resolutions: ImageWorkspaceOption[]; outputCounts: ImageWorkspaceOption[]; defaultModeId?: string; defaultModelId?: string; defaultAspectRatioId?: string; defaultResolutionId?: string; defaultOutputCountId?: string; maxReferenceImages: number; referenceUpload: { enabled: boolean; acceptedMimeTypes: string[]; maxBytes?: number; }; }; export type ImageWorkspaceAgent = { id: string; name: string; avatarUrl?: string | null; }; export type ImageWorkspaceImage = { id: string; url: string; thumbnailUrl?: string | null; alt?: string | null; }; export type ImageWorkspaceMessageStatus = 'queued' | 'running' | 'succeeded' | 'failed'; export type ImageWorkspaceMessage = { id: string; role: 'user' | 'assistant' | 'system'; agentId?: string | null; text?: string | null; images: ImageWorkspaceImage[]; status?: ImageWorkspaceMessageStatus; error?: string | null; createdAt: string; }; export type ImageWorkspaceProject = { id: string; name: string; agents: ImageWorkspaceAgent[]; activeAgentId?: string | null; messages: ImageWorkspaceMessage[]; updatedAt?: string | null; }; export type ImageWorkspaceSnapshot = { capabilities: ImageWorkspaceCapabilities; projects: ImageWorkspaceProject[]; activeProjectId?: string | null; }; export type ImageWorkspaceGenerationSettings = { modeId?: string; modelId?: string; aspectRatioId?: string; resolutionId?: string; outputCountId?: string; }; export type ImageWorkspaceSendMessageInput = { projectId: string; agentId: string; prompt: string; referenceImageIds: string[]; settings: ImageWorkspaceGenerationSettings; }; export type ImageWorkspaceReferenceUploadInput = { projectId: string; fileName: string; mimeType: string; contentBase64: string; }; export type ImageWorkspaceReferenceUploadResult = { workspace: ImageWorkspaceSnapshot; reference: ImageWorkspaceImage; };