From aa61f922a1863b79a96b5034ce6c09a354bbf294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Troed=20S=C3=A5ngberg?= Date: Sat, 13 Jun 2026 21:15:22 +0200 Subject: [PATCH] Fix plugin loading: correct TUI signature, fix regex syntax, restore SessionPromptRight component --- package.json | 5 +---- tui.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6d14334..99ce8e2 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,9 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@troed/oc-ls-stats", - "version": "0.0.17", + "version": "0.0.19", "type": "module", "exports": { - ".": { - "import": "./tui.tsx" - }, "./tui": { "import": "./tui.tsx" } diff --git a/tui.tsx b/tui.tsx index 88888b9..1ca6877 100644 --- a/tui.tsx +++ b/tui.tsx @@ -89,8 +89,8 @@ function parseJSONC(text: string): unknown { } if (ch === ",") { - const next = text.indexOf(/[\s}])/), i + 1) - if (next !== -1 && /[\}])]/.test(text[next])) { + const next = text.indexOf(/[\s}\]]/, i + 1) + if (next !== -1 && /[\s}\]]/.test(text[next])) { i++ continue } @@ -275,7 +275,7 @@ function SessionPromptRight(props: { return <>{text() ? {text()} : null} } -const tui: TuiPlugin = async (api, options) => { +const tui: TuiPlugin = async (api) => { console.log("[oc-ls-stats] TUI plugin loaded!") const tracker: TrackerState = { streamSamplesBySession: {}, @@ -480,7 +480,7 @@ const tui: TuiPlugin = async (api, options) => { api.slots.register({ slots: { session_prompt_right(_ctx, value) { - return *** SCOPED v0.0.17 LOADED *** + return }, }, })