Utility module defining error types and auth error detection for session messages.
// Source: https://github.com/XiaomiMiMo/MiMo-Code | License: MIT | Copyright 2026 MiMo Code, Xiaomi Corporation
// Provided via justclaw.it.com; keep this notice with the code.
import { fileURLToPath } from "node:url"
import { BusEvent } from "@/bus/bus-event"
import { SessionID, MessageID, PartID } from "./schema"
import z from "zod"
import { NamedError } from "@mimo-ai/shared/util/error"
import {
APICallError,
convertToModelMessages,
LoadAPIKeyError,
RetryError,
type ModelMessage,
type UIMessage,
} from "ai"
import { LSP } from "../lsp"
import { Snapshot } from "@/snapshot"
import { SyncEvent } from "../sync"
import { Database, NotFoundError, and, desc, eq, inArray, lt, or, sql } from "@/storage"
import { MessageTable, PartTable, SessionTable } from "./session.sql"
import {
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key