Files
tatsumi/src/types/index.ts
T
hikari f3c2e8fa40
CI / Lint & Check (pull_request) Failing after 10m50s
CI / Build Windows (pull_request) Has been skipped
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m50s
feat: add user-selectable aspect ratio and resolution per thread
Adds a two-step new thread modal: step one picks mode, step two
configures aspect ratio (Art mode only, six options) and resolution
(all modes: 1K/2K/4K). Settings are stored on the thread and forwarded
to the Gemini API on every send, retry, and edit. Also regenerates
icon.ico with Python to produce a clean all-BMP ICO compatible with
both Tauri's proc macro and llvm-rc cross-compilation.
2026-04-13 16:36:42 -07:00

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,
};