diff --git a/package.json b/package.json index 343775c..0fcb06d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@troed/oc-ls-stats", - "version": "0.0.52", + "version": "0.0.53", "type": "module", "exports": { "./tui": { diff --git a/tui.tsx b/tui.tsx index 0b4d7ae..564a736 100644 --- a/tui.tsx +++ b/tui.tsx @@ -1,10 +1,12 @@ /** @jsxImportSource @opentui/solid */ import type { TuiPlugin, TuiPluginModule } from "@opencode-ai/plugin/tui" import { createMemo, createSignal } from "solid-js" -import { writeFileSync, appendFileSync } from "fs" +import { appendFileSync } from "fs" +const DEBUG_ENABLED = false const DEBUG_LOG = "/tmp/oc-ls-stats-debug.log" function debug(...args: unknown[]) { + if (!DEBUG_ENABLED) return try { const line = `${args.map(a => typeof a === "object" ? JSON.stringify(a) : String(a)).join(" ")}\n` appendFileSync(DEBUG_LOG, line)