generated from nhcarrigan/template
9f45ee329d
## Summary - Adds a two-step thread creation modal — step 1 picks the mode, step 2 configures generation options - Art mode now supports user-selectable aspect ratio (1:1, 4:3, 3:4, 16:9, 9:16, 21:9) - All three modes (Art, Avatar, Replace) now support user-selectable resolution (1K, 2K, 4K) - Mode label in the input area reflects the chosen settings (e.g. `🩷 Art Mode (16:9) · 4K`) - Backend cost calculation now scales with resolution - Regenerated `icon.ico` with clean BMP-only entries to fix Windows local builds ✨ This PR was created with help from Hikari~ 🌸 Reviewed-on: #18 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
58 lines
1.1 KiB
TypeScript
58 lines
1.1 KiB
TypeScript
/**
|
|
* @file Type definitions for the Tatsumi application.
|
|
* @copyright Naomi Carrigan
|
|
* @license Naomi's Public License
|
|
* @author Naomi Carrigan
|
|
*/
|
|
|
|
type AspectRatio = "1:1" | "3:4" | "4:3" | "9:16" | "16:9" | "21:9";
|
|
type ImageSize = "1K" | "2K" | "4K";
|
|
type Mode = "avatar" | "art" | "replace";
|
|
|
|
interface Config {
|
|
apiKey: string;
|
|
}
|
|
|
|
interface PendingInput {
|
|
imageBase64?: string;
|
|
imageMime?: string;
|
|
imagePreview?: string;
|
|
text?: string;
|
|
}
|
|
|
|
interface MessagePart {
|
|
imageData?: string;
|
|
mimeType?: string;
|
|
text?: string;
|
|
thoughtSignature?: string;
|
|
type: "image" | "text" | "thought";
|
|
}
|
|
|
|
interface ThreadMessage {
|
|
cost?: number;
|
|
parts: Array<MessagePart>;
|
|
role: "user" | "model";
|
|
}
|
|
|
|
interface Thread {
|
|
aspectRatio?: AspectRatio;
|
|
createdAt: number;
|
|
id: string;
|
|
imageSize?: ImageSize;
|
|
messages: Array<ThreadMessage>;
|
|
mode: Mode;
|
|
name: string;
|
|
updatedAt: number;
|
|
}
|
|
|
|
export type {
|
|
AspectRatio,
|
|
Config,
|
|
ImageSize,
|
|
MessagePart,
|
|
Mode,
|
|
PendingInput,
|
|
Thread,
|
|
ThreadMessage,
|
|
};
|