refactor: remove unused params/imports/types from lsp-tools, task-tools, delegate-task, skill-loader, context-window-monitor, plugin-config

This commit is contained in:
YeonGyu-Kim 2026-02-16 22:12:21 +09:00
parent 9dbb9552b8
commit 158ca3f22b
11 changed files with 9 additions and 13 deletions

View File

@ -18,8 +18,6 @@ interface WorkerOutputError {
error: { message: string; stack?: string }
}
type WorkerOutput = WorkerOutputSuccess | WorkerOutputError
const { signal } = workerData as { signal: Int32Array }
if (!parentPort) {

View File

@ -27,7 +27,7 @@ interface CachedTokenState {
tokens: TokenInfo
}
export function createContextWindowMonitorHook(ctx: PluginInput) {
export function createContextWindowMonitorHook(_ctx: PluginInput) {
const remindedSessions = new Set<string>()
const tokenCache = new Map<string, CachedTokenState>()

View File

@ -49,7 +49,7 @@ export function parseConfigPartially(
export function loadConfigFromPath(
configPath: string,
ctx: unknown
_ctx: unknown
): OhMyOpenCodeConfig | null {
try {
if (fs.existsSync(configPath)) {

View File

@ -26,7 +26,7 @@ export function resolveCategoryConfig(
categoryName: string,
options: ResolveCategoryConfigOptions
): ResolveCategoryConfigResult | null {
const { userCategories, inheritedModel, systemDefaultModel, availableModels } = options
const { userCategories, inheritedModel: _inheritedModel, systemDefaultModel, availableModels } = options
const defaultConfig = DEFAULT_CATEGORIES[categoryName]
const userConfig = userCategories?.[categoryName]

View File

@ -14,7 +14,7 @@ export const lsp_diagnostics: ToolDefinition = tool({
.optional()
.describe("Filter by severity level"),
},
execute: async (args, context) => {
execute: async (args, _context) => {
try {
const result = await withLspClient(args.filePath, async (client) => {
return (await client.diagnostics(args.filePath)) as { items?: Diagnostic[] } | Diagnostic[] | null

View File

@ -13,7 +13,7 @@ export const lsp_find_references: ToolDefinition = tool({
character: tool.schema.number().min(0).describe("0-based"),
includeDeclaration: tool.schema.boolean().optional().describe("Include the declaration itself"),
},
execute: async (args, context) => {
execute: async (args, _context) => {
try {
const result = await withLspClient(args.filePath, async (client) => {
return (await client.references(args.filePath, args.line, args.character, args.includeDeclaration ?? true)) as

View File

@ -11,7 +11,7 @@ export const lsp_goto_definition: ToolDefinition = tool({
line: tool.schema.number().min(1).describe("1-based"),
character: tool.schema.number().min(0).describe("0-based"),
},
execute: async (args, context) => {
execute: async (args, _context) => {
try {
const result = await withLspClient(args.filePath, async (client) => {
return (await client.definition(args.filePath, args.line, args.character)) as

View File

@ -12,7 +12,7 @@ export const lsp_prepare_rename: ToolDefinition = tool({
line: tool.schema.number().min(1).describe("1-based"),
character: tool.schema.number().min(0).describe("0-based"),
},
execute: async (args, context) => {
execute: async (args, _context) => {
try {
const result = await withLspClient(args.filePath, async (client) => {
return (await client.prepareRename(args.filePath, args.line, args.character)) as
@ -37,7 +37,7 @@ export const lsp_rename: ToolDefinition = tool({
character: tool.schema.number().min(0).describe("0-based"),
newName: tool.schema.string().describe("New symbol name"),
},
execute: async (args, context) => {
execute: async (args, _context) => {
try {
const edit = await withLspClient(args.filePath, async (client) => {
return (await client.rename(args.filePath, args.line, args.character, args.newName)) as WorkspaceEdit | null

View File

@ -17,7 +17,7 @@ export const lsp_symbols: ToolDefinition = tool({
query: tool.schema.string().optional().describe("Symbol name to search (required for workspace scope)"),
limit: tool.schema.number().optional().describe("Max results (default 50)"),
},
execute: async (args, context) => {
execute: async (args, _context) => {
try {
const scope = args.scope ?? "document"

View File

@ -1,7 +1,6 @@
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool"
import { join } from "path"
import type { OhMyOpenCodeConfig } from "../../config/schema"
import type { TaskGetInput } from "./types"
import { TaskGetInputSchema, TaskObjectSchema } from "./types"
import { getTaskDir, readJsonSafe } from "../../features/claude-tasks/storage"

View File

@ -2,7 +2,6 @@ import type { PluginInput } from "@opencode-ai/plugin";
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool";
import { join } from "path";
import type { OhMyOpenCodeConfig } from "../../config/schema";
import type { TaskObject, TaskUpdateInput } from "./types";
import { TaskObjectSchema, TaskUpdateInputSchema } from "./types";
import {
getTaskDir,