fix: switch consumers to service imports to break bundle cycles (#18438)

This commit is contained in:
Kit Langton
2026-03-20 16:55:46 -04:00
committed by GitHub
parent 3f249aba6d
commit 214a6c6cf1
15 changed files with 20 additions and 19 deletions

View File

@@ -20,7 +20,7 @@ import { Instance } from "../project/instance"
import { SessionPrompt } from "./prompt"
import { fn } from "@/util/fn"
import { Command } from "../command"
import { Snapshot } from "@/snapshot"
import { Snapshot } from "@/snapshot/service"
import { WorkspaceContext } from "../control-plane/workspace-context"
import { ProjectID } from "../project/schema"
import { WorkspaceID } from "../control-plane/schema"
@@ -28,7 +28,7 @@ import { SessionID, MessageID, PartID } from "./schema"
import type { Provider } from "@/provider/provider"
import { ModelID, ProviderID } from "@/provider/schema"
import { PermissionNext } from "@/permission"
import { Permission as PermissionNext } from "@/permission/service"
import { Global } from "@/global"
import type { LanguageModelV2Usage } from "@ai-sdk/provider"
import { iife } from "@/util/iife"

View File

@@ -21,7 +21,7 @@ import type { MessageV2 } from "./message-v2"
import { Plugin } from "@/plugin"
import { SystemPrompt } from "./system"
import { Flag } from "@/flag/flag"
import { PermissionNext } from "@/permission"
import { Permission as PermissionNext } from "@/permission/service"
import { Auth } from "@/auth"
export namespace LLM {

View File

@@ -4,7 +4,7 @@ import z from "zod"
import { NamedError } from "@opencode-ai/util/error"
import { APICallError, convertToModelMessages, LoadAPIKeyError, type ModelMessage, type UIMessage } from "ai"
import { LSP } from "../lsp"
import { Snapshot } from "@/snapshot"
import { Snapshot } from "@/snapshot/service"
import { fn } from "@/util/fn"
import { Database, NotFoundError, and, desc, eq, inArray, lt, or } from "@/storage/db"
import { MessageTable, PartTable, SessionTable } from "./session.sql"

View File

@@ -13,7 +13,7 @@ import { LLM } from "./llm"
import { Config } from "@/config/config"
import { SessionCompaction } from "./compaction"
import { PermissionNext } from "@/permission"
import { Question } from "@/question"
import { Question } from "@/question/service"
import { PartID } from "./schema"
import type { SessionID, MessageID } from "./schema"

View File

@@ -1,8 +1,8 @@
import { sqliteTable, text, integer, index, primaryKey } from "drizzle-orm/sqlite-core"
import { ProjectTable } from "../project/project.sql"
import type { MessageV2 } from "./message-v2"
import type { Snapshot } from "../snapshot"
import type { PermissionNext } from "../permission"
import type { Snapshot } from "../snapshot/service"
import type { Permission as PermissionNext } from "../permission/service"
import type { ProjectID } from "../project/schema"
import type { SessionID, MessageID, PartID } from "./schema"
import type { WorkspaceID } from "../control-plane/schema"

View File

@@ -11,7 +11,7 @@ import PROMPT_CODEX from "./prompt/codex.txt"
import PROMPT_TRINITY from "./prompt/trinity.txt"
import type { Provider } from "@/provider/provider"
import type { Agent } from "@/agent/agent"
import { PermissionNext } from "@/permission"
import { Permission as PermissionNext } from "@/permission/service"
import { Skill } from "@/skill"
export namespace SystemPrompt {