From fa204d8af04e23a862a8cfbcad43edd99153a895 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 2 Jan 2026 23:03:16 +0900 Subject: [PATCH] chore: remove dead code - unused imports and variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unused import OhMyOpenCodeConfig from src/index.ts - Remove unused import dirname from src/features/opencode-skill-loader/loader.ts - Remove unused import detectKeywords from src/hooks/keyword-detector/index.ts - Remove unused import CliMatch from src/tools/ast-grep/utils.ts - Prefix unused parameter _original in src/tools/ast-grep/utils.ts 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- src/features/opencode-skill-loader/loader.ts | 2 +- src/hooks/keyword-detector/index.ts | 2 +- src/index.ts | 2 +- src/tools/ast-grep/utils.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/features/opencode-skill-loader/loader.ts b/src/features/opencode-skill-loader/loader.ts index 8d7a041..b0bbd9b 100644 --- a/src/features/opencode-skill-loader/loader.ts +++ b/src/features/opencode-skill-loader/loader.ts @@ -1,5 +1,5 @@ import { existsSync, readdirSync, readFileSync } from "fs" -import { join, basename, dirname } from "path" +import { join, basename } from "path" import { homedir } from "os" import yaml from "js-yaml" import { parseFrontmatter } from "../../shared/frontmatter" diff --git a/src/hooks/keyword-detector/index.ts b/src/hooks/keyword-detector/index.ts index 49cf845..0db3ec0 100644 --- a/src/hooks/keyword-detector/index.ts +++ b/src/hooks/keyword-detector/index.ts @@ -1,5 +1,5 @@ import type { PluginInput } from "@opencode-ai/plugin" -import { detectKeywords, detectKeywordsWithType, extractPromptText } from "./detector" +import { detectKeywordsWithType, extractPromptText } from "./detector" import { log } from "../../shared" import { injectHookMessage } from "../../features/hook-message-injector" diff --git a/src/index.ts b/src/index.ts index 5e18f54..9daf4a5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -53,7 +53,7 @@ import { } from "./tools"; import { BackgroundManager } from "./features/background-agent"; import { SkillMcpManager } from "./features/skill-mcp-manager"; -import { type OhMyOpenCodeConfig, type HookName } from "./config"; +import { type HookName } from "./config"; import { log } from "./shared"; import { loadPluginConfig } from "./plugin-config"; import { createModelCacheState, getModelLimit } from "./plugin-state"; diff --git a/src/tools/ast-grep/utils.ts b/src/tools/ast-grep/utils.ts index 1ddd5a1..a7f27b8 100644 --- a/src/tools/ast-grep/utils.ts +++ b/src/tools/ast-grep/utils.ts @@ -1,4 +1,4 @@ -import type { CliMatch, AnalyzeResult, SgResult } from "./types" +import type { AnalyzeResult, SgResult } from "./types" export function formatSearchResult(result: SgResult): string { if (result.error) { @@ -93,7 +93,7 @@ export function formatAnalyzeResult(results: AnalyzeResult[], extractedMetaVars: return lines.join("\n") } -export function formatTransformResult(original: string, transformed: string, editCount: number): string { +export function formatTransformResult(_original: string, transformed: string, editCount: number): string { if (editCount === 0) { return "No matches found to transform" }