perf(bundle): replace broad storage and utils imports

This commit is contained in:
2026-07-14 18:13:55 +08:00
parent e270be9bd9
commit 0033625866
85 changed files with 136 additions and 97 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { fromCallback } from "xstate";
import { Logger } from "@/utils";
import { Logger } from "@/utils/logger";
import {
readLocalHistorySnapshot,
+3 -1
View File
@@ -1,7 +1,9 @@
import type { UiMessage } from "@/data/dto/chat";
import { resolveChatCacheOwnerKey } from "@/data/repositories/chat_cache_identity";
import { getChatRepository } from "@/data/repositories/chat_repository";
import { Logger, Result, todayString } from "@/utils";
import { Logger } from "@/utils/logger";
import { Result } from "@/utils/result";
import { todayString } from "@/utils/date";
import {
CHAT_HISTORY_LIMIT,
+2 -1
View File
@@ -1,4 +1,5 @@
import { Logger, todayString } from "@/utils";
import { Logger } from "@/utils/logger";
import { todayString } from "@/utils/date";
import { chatAssign, type ChatActionArgs } from "./chat-flow-actions";
import { beginPendingReply } from "./chat-machine.helpers";
+1 -1
View File
@@ -1,6 +1,6 @@
import { type ChatSendResponse, type UiMessage } from "@/data/dto/chat";
import type { ChatLockDetailData } from "@/data/schemas/chat";
import { todayString } from "@/utils";
import { todayString } from "@/utils/date";
/**
* ChatMessage[] -> UiMessage[].
+1 -1
View File
@@ -1,6 +1,6 @@
import type { UiMessage } from "@/data/dto/chat";
import type { PendingChatPromotion } from "@/data/storage/navigation";
import { todayString } from "@/utils";
import { todayString } from "@/utils/date";
import {
applySingleUnlockOutput,
+3 -1
View File
@@ -5,7 +5,9 @@ import { MessageQueue } from "@/core/net/message-queue";
import type { ChatSendResponse } from "@/data/dto/chat";
import { getChatRepository } from "@/data/repositories/chat_repository";
import { resolveChatCacheOwnerKey } from "@/data/repositories/chat_cache_identity";
import { Logger, Result, todayString } from "@/utils";
import { Logger } from "@/utils/logger";
import { Result } from "@/utils/result";
import { todayString } from "@/utils/date";
import type { ChatEvent } from "./chat-events";
import {
+2 -1
View File
@@ -2,7 +2,8 @@ import { fromPromise } from "xstate";
import { getChatRepository } from "@/data/repositories/chat_repository";
import { resolveChatCacheOwnerKey } from "@/data/repositories/chat_cache_identity";
import { Logger, Result } from "@/utils";
import { Logger } from "@/utils/logger";
import { Result } from "@/utils/result";
import {
chatAssign,