style: use top-level type imports in the media changes
AGENTS.md asks for top-level `import type` instead of inline `type` specifiers; this applies it to the import statements the media work added or changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
This commit is contained in:
parent
05196fd20e
commit
c17445874d
@ -3,13 +3,8 @@ import { ArtifactTooLargeError } from "@rakazo/adapter-kit";
|
|||||||
import { artifactMaxBytes, storeArtifactStream } from "@rakazo/adapters";
|
import { artifactMaxBytes, storeArtifactStream } from "@rakazo/adapters";
|
||||||
import type { Actor } from "@rakazo/contracts";
|
import type { Actor } from "@rakazo/contracts";
|
||||||
import { attachmentKindOf, isAllowedAttachmentMimeType } from "@rakazo/contracts";
|
import { attachmentKindOf, isAllowedAttachmentMimeType } from "@rakazo/contracts";
|
||||||
import {
|
import type { PrismaClient } from "@rakazo/db";
|
||||||
createGroupRepos,
|
import { createGroupRepos, createRepos, IsolationError, requireMembership } from "@rakazo/db";
|
||||||
createRepos,
|
|
||||||
IsolationError,
|
|
||||||
type PrismaClient,
|
|
||||||
requireMembership,
|
|
||||||
} from "@rakazo/db";
|
|
||||||
import type { Context, Hono } from "hono";
|
import type { Context, Hono } from "hono";
|
||||||
import { cancelBody } from "./http-body.js";
|
import { cancelBody } from "./http-body.js";
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { ORPCError } from "@orpc/server";
|
import { ORPCError } from "@orpc/server";
|
||||||
import type { AdapterContext } from "@rakazo/adapter-kit";
|
import type { AdapterContext } from "@rakazo/adapter-kit";
|
||||||
|
import type { EncryptedSecretStore } from "@rakazo/adapters";
|
||||||
import {
|
import {
|
||||||
createOpenAiCompatibleTranscriptionProvider,
|
createOpenAiCompatibleTranscriptionProvider,
|
||||||
createVoiceProvider,
|
createVoiceProvider,
|
||||||
type EncryptedSecretStore,
|
|
||||||
isVoiceProviderId,
|
isVoiceProviderId,
|
||||||
listVoiceCatalog,
|
listVoiceCatalog,
|
||||||
loadMediaSettings,
|
loadMediaSettings,
|
||||||
|
|||||||
@ -65,17 +65,19 @@ import {
|
|||||||
type MarkdownArtifactPreviewTarget,
|
type MarkdownArtifactPreviewTarget,
|
||||||
} from "../components/markdown-artifact-preview";
|
} from "../components/markdown-artifact-preview";
|
||||||
import { NativeSymbol } from "../components/native-symbol";
|
import { NativeSymbol } from "../components/native-symbol";
|
||||||
|
import type {
|
||||||
|
MobileBot,
|
||||||
|
MobileGroup,
|
||||||
|
MobileMessage,
|
||||||
|
MobileMessagePage,
|
||||||
|
MobileSnapshot,
|
||||||
|
} from "../lib/api";
|
||||||
import {
|
import {
|
||||||
applyMobileThreadEvent,
|
applyMobileThreadEvent,
|
||||||
blockText,
|
blockText,
|
||||||
copyableMobileMessageText,
|
copyableMobileMessageText,
|
||||||
currentApiBase,
|
currentApiBase,
|
||||||
loadSessionToken,
|
loadSessionToken,
|
||||||
type MobileBot,
|
|
||||||
type MobileGroup,
|
|
||||||
type MobileMessage,
|
|
||||||
type MobileMessagePage,
|
|
||||||
type MobileSnapshot,
|
|
||||||
mergeMobileSnapshot,
|
mergeMobileSnapshot,
|
||||||
messageAttachments,
|
messageAttachments,
|
||||||
messagingProviderLabel,
|
messagingProviderLabel,
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
// @vitest-environment jsdom
|
// @vitest-environment jsdom
|
||||||
|
|
||||||
import { act } from "react";
|
import { act } from "react";
|
||||||
import { createRoot, type Root } from "react-dom/client";
|
import type { Root } from "react-dom/client";
|
||||||
|
import { createRoot } from "react-dom/client";
|
||||||
import { renderToStaticMarkup } from "react-dom/server";
|
import { renderToStaticMarkup } from "react-dom/server";
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { useLingui } from "@lingui/react/macro";
|
import { useLingui } from "@lingui/react/macro";
|
||||||
import { buttonVariants } from "@rakazo/ui-web";
|
import { buttonVariants } from "@rakazo/ui-web";
|
||||||
import { Download } from "lucide-react";
|
import { Download } from "lucide-react";
|
||||||
import { type RefObject, useEffect, useRef, useState } from "react";
|
import type { RefObject } from "react";
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { artifactUrl } from "../../lib/artifact-url";
|
import { artifactUrl } from "../../lib/artifact-url";
|
||||||
|
|
||||||
export type MediaPlayerProps = {
|
export type MediaPlayerProps = {
|
||||||
|
|||||||
@ -2,7 +2,8 @@ import { createHash } from "node:crypto";
|
|||||||
import { mkdtemp, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
import { mkdtemp, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { type AdapterContext, ArtifactTooLargeError } from "@rakazo/adapter-kit";
|
import type { AdapterContext } from "@rakazo/adapter-kit";
|
||||||
|
import { ArtifactTooLargeError } from "@rakazo/adapter-kit";
|
||||||
import { afterEach, describe, expect, it } from "vitest";
|
import { afterEach, describe, expect, it } from "vitest";
|
||||||
import { LocalArtifactStore } from "./artifacts.js";
|
import { LocalArtifactStore } from "./artifacts.js";
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,19 @@
|
|||||||
import { createHash, randomUUID } from "node:crypto";
|
import { createHash, randomUUID } from "node:crypto";
|
||||||
import { constants } from "node:fs";
|
import { constants } from "node:fs";
|
||||||
import { type FileHandle, lstat, mkdir, open, rm } from "node:fs/promises";
|
import type { FileHandle } from "node:fs/promises";
|
||||||
|
import { lstat, mkdir, open, rm } from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import {
|
import type {
|
||||||
type AdapterContext,
|
AdapterContext,
|
||||||
type ArtifactByteRange,
|
ArtifactByteRange,
|
||||||
type ArtifactPut,
|
ArtifactPut,
|
||||||
type ArtifactStore,
|
ArtifactStore,
|
||||||
type ArtifactStreamPut,
|
ArtifactStreamPut,
|
||||||
ArtifactTooLargeError,
|
NotificationMessage,
|
||||||
type NotificationMessage,
|
NotificationProvider,
|
||||||
type NotificationProvider,
|
StoredArtifactStream,
|
||||||
type StoredArtifactStream,
|
|
||||||
} from "@rakazo/adapter-kit";
|
} from "@rakazo/adapter-kit";
|
||||||
|
import { ArtifactTooLargeError } from "@rakazo/adapter-kit";
|
||||||
|
|
||||||
const O_NOFOLLOW = constants.O_NOFOLLOW ?? 0;
|
const O_NOFOLLOW = constants.O_NOFOLLOW ?? 0;
|
||||||
const READ_CHUNK_BYTES = 256 * 1024;
|
const READ_CHUNK_BYTES = 256 * 1024;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user