The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type { PreviewFailure } from "./previewFailure"; |
| 2 | import { ARCHIVE_MAX_BYTES } from "@t3tools/client-runtime/zip/bounded-zip"; |
| 3 | |
| 4 | export { |
| 5 | ARCHIVE_ENTRY_MAX_BYTES, |
| 6 | ARCHIVE_MAX_ENTRIES, |
| 7 | ARCHIVE_MAX_RATIO, |
| 8 | } from "@t3tools/client-runtime/zip/bounded-zip"; |
| 9 | export const BINARY_PREVIEW_MAX_BYTES = ARCHIVE_MAX_BYTES; |
| 10 | export const SQLITE_PAGE_SIZE = 50; |
| 11 | |
| 12 | export interface ArchiveEntry { |
| 13 | path: string; |
| 14 | size: number; |
| 15 | modified: string | null; |
| 16 | directory: boolean; |
| 17 | } |
| 18 | |
| 19 | export type BinaryWorkerRequest = |
| 20 | | { type: "open"; kind: "archive" | "sqlite"; name: string; bytes: ArrayBuffer } |
| 21 | | { type: "entry"; path: string } |
| 22 | | { type: "rows"; table: string; page: number }; |
| 23 | |
| 24 | export type BinaryWorkerResult = |
| 25 | | ({ type: "error" } & PreviewFailure) |
| 26 | | { type: "archive"; entries: ArchiveEntry[] } |
| 27 | | { type: "entry"; path: string; bytes: Uint8Array<ArrayBuffer> } |
| 28 | | { type: "sqlite"; tables: { name: string; count: number }[] } |
| 29 | | { type: "rows"; table: string; page: number; columns: string[]; rows: string[][] }; |