mirror of
https://fastgit.cc/https://github.com/anomalyco/opencode
synced 2026-04-21 21:31:53 +08:00
refactor: switch mcp siblings to self-reexport imports
This commit is contained in:
@@ -5,7 +5,7 @@ import { UnauthorizedError } from "@modelcontextprotocol/sdk/client/auth.js"
|
||||
import * as prompts from "@clack/prompts"
|
||||
import { UI } from "../ui"
|
||||
import { MCP } from "../../mcp"
|
||||
import { McpAuth } from "../../mcp"
|
||||
import { McpAuth } from "@/mcp/auth"
|
||||
import { McpOAuthProvider } from "../../mcp/oauth-provider"
|
||||
import { Config } from "../../config"
|
||||
import { Instance } from "../../project/instance"
|
||||
|
||||
@@ -35,7 +35,7 @@ import { Instruction } from "@/session/instruction"
|
||||
import { LLM } from "@/session/llm"
|
||||
import { LSP } from "@/lsp"
|
||||
import { MCP } from "@/mcp"
|
||||
import { McpAuth } from "@/mcp"
|
||||
import { McpAuth } from "@/mcp/auth"
|
||||
import { Command } from "@/command"
|
||||
import { Truncate } from "@/tool"
|
||||
import { ToolRegistry } from "@/tool"
|
||||
|
||||
@@ -140,3 +140,4 @@ export const layer = Layer.effect(
|
||||
)
|
||||
|
||||
export const defaultLayer = layer.pipe(Layer.provide(AppFileSystem.defaultLayer))
|
||||
export * as McpAuth from "./auth"
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
export * as MCP from "./mcp"
|
||||
export * as McpAuth from "./auth"
|
||||
export * as McpOAuthCallback from "./oauth-callback"
|
||||
|
||||
@@ -228,3 +228,4 @@ export async function stop(): Promise<void> {
|
||||
export function isRunning(): boolean {
|
||||
return server !== undefined
|
||||
}
|
||||
export * as McpOAuthCallback from "./oauth-callback"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { test, expect, describe, afterEach } from "bun:test"
|
||||
import { McpOAuthCallback } from "../../src/mcp"
|
||||
import { McpOAuthCallback } from "../../src/mcp/oauth-callback"
|
||||
import { parseRedirectUri } from "../../src/mcp/oauth-provider"
|
||||
|
||||
describe("parseRedirectUri", () => {
|
||||
|
||||
Reference in New Issue
Block a user