chore: v0.0.53 - make debug logging toggleable via DEBUG_ENABLED constant

- Set DEBUG_ENABLED = false by default
- Set to true to re-enable file-based debug logging
This commit is contained in:
Troed Sångberg
2026-06-13 23:41:32 +02:00
parent bba57e2eb5
commit 9ff08beb1b
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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": {
+3 -1
View File
@@ -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)