Prechádzať zdrojové kódy

fix: remove 10 unused type-only imports and declarations (#22696)

Kit Langton 22 hodín pred
rodič
commit
cf423d2769

+ 0 - 1
packages/app/src/components/file-tree.tsx

@@ -14,7 +14,6 @@ import {
   Switch,
   untrack,
   type ComponentProps,
-  type JSXElement,
   type ParentProps,
 } from "solid-js"
 import { Dynamic } from "solid-js/web"

+ 0 - 1
packages/app/src/context/global-sync/types.ts

@@ -8,7 +8,6 @@ import type {
   Part,
   Path,
   PermissionRequest,
-  Project,
   ProviderListResponse,
   QuestionRequest,
   Session,

+ 0 - 2
packages/app/src/i18n/ko.ts

@@ -1,7 +1,5 @@
 import { dict as en } from "./en"
 
-type Keys = keyof typeof en
-
 export const dict = {
   "command.category.suggested": "추천",
   "command.category.view": "보기",

+ 1 - 1
packages/opencode/src/cli/cmd/tui/context/sdk.tsx

@@ -1,5 +1,5 @@
 import { createOpencodeClient } from "@opencode-ai/sdk/v2"
-import type { GlobalEvent, Event } from "@opencode-ai/sdk/v2"
+import type { GlobalEvent } from "@opencode-ai/sdk/v2"
 import { createSimpleContext } from "./helper"
 import { createGlobalEmitter } from "@solid-primitives/event-bus"
 import { batch, onCleanup, onMount } from "solid-js"

+ 0 - 1
packages/opencode/src/cli/cmd/tui/plugin/api.tsx

@@ -19,7 +19,6 @@ import { Prompt } from "../component/prompt"
 import { Slot as HostSlot } from "./slots"
 import type { useToast } from "../ui/toast"
 import { Installation } from "@/installation"
-import { type OpencodeClient } from "@opencode-ai/sdk/v2"
 
 type RouteEntry = {
   key: symbol

+ 1 - 1
packages/opencode/src/cli/cmd/tui/ui/dialog-export-options.tsx

@@ -2,7 +2,7 @@ import { TextareaRenderable, TextAttributes } from "@opentui/core"
 import { useTheme } from "../context/theme"
 import { useDialog, type DialogContext } from "./dialog"
 import { createStore } from "solid-js/store"
-import { onMount, Show, type JSX } from "solid-js"
+import { onMount, Show } from "solid-js"
 import { useKeyboard } from "@opentui/solid"
 
 export type DialogExportOptionsProps = {

+ 0 - 7
packages/opencode/test/fixture/plugin-meta-worker.ts

@@ -1,10 +1,3 @@
-type Msg = {
-  file: string
-  spec: string
-  target: string
-  id: string
-}
-
 const raw = process.argv[2]
 if (!raw) throw new Error("Missing worker payload")
 

+ 0 - 1
packages/opencode/test/mcp/oauth-auto-connect.test.ts

@@ -1,6 +1,5 @@
 import { test, expect, mock, beforeEach } from "bun:test"
 import { Effect } from "effect"
-import type { MCP as MCPNS } from "../../src/mcp/index"
 
 // Mock UnauthorizedError to match the SDK's class
 class MockUnauthorizedError extends Error {

+ 0 - 1
packages/opencode/test/session/prompt-effect.test.ts

@@ -14,7 +14,6 @@ import { Permission } from "../../src/permission"
 import { Plugin } from "../../src/plugin"
 import { Provider as ProviderSvc } from "../../src/provider"
 import { Env } from "../../src/env"
-import type { Provider } from "../../src/provider"
 import { ModelID, ProviderID } from "../../src/provider/schema"
 import { Question } from "../../src/question"
 import { Todo } from "../../src/session/todo"

+ 0 - 1
packages/plugin/src/tui.ts

@@ -13,7 +13,6 @@ import type {
   QuestionRequest,
   SessionStatus,
   TextPart,
-  Workspace,
   Config as SdkConfig,
 } from "@opencode-ai/sdk/v2"
 import type { CliRenderer, ParsedKey, RGBA, SlotMode } from "@opentui/core"