opencode-visual-cache 1.7.0-oc2 → 1.7.2-oc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- export declare const PLUGIN_VERSION = "1.7.0-oc2";
1
+ export declare const PLUGIN_VERSION = "1.7.2-oc2";
package/dist/_version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // auto-generated
2
- export const PLUGIN_VERSION = "1.7.0-oc2";
2
+ export const PLUGIN_VERSION = "1.7.2-oc2";
package/dist/tui.js CHANGED
@@ -684,7 +684,7 @@ import { createElement as _$createElement } from "@opentui/solid";
684
684
  import { createMemo, createSignal, createEffect, onMount, onCleanup, Show, untrack } from "solid-js";
685
685
 
686
686
  // src/_version.ts
687
- var PLUGIN_VERSION = "1.7.0-oc2";
687
+ var PLUGIN_VERSION = "1.7.2-oc2";
688
688
 
689
689
  // src/panel/TokenCachePanel.tsx
690
690
  var MIN_PANEL_WIDTH = 20;
@@ -1,4 +1,6 @@
1
1
  /** @jsxImportSource @opentui/solid */
2
2
  import type { PluginModule } from "./types";
3
- declare const mod: PluginModule;
3
+ declare const mod: PluginModule & {
4
+ server: () => Promise<Record<string, never>>;
5
+ };
4
6
  export default mod;
package/dist/v2/index.js CHANGED
@@ -159,5 +159,8 @@ const mod = {
159
159
  // 偏好持久化(实验:storage.store 用法验证)
160
160
  context.storage.store("opencode-visual-cache.panel", { initial: { collapsed: false } });
161
161
  },
162
+ // V1 server 空实现(兼容标记):参考 oh-my-opencode-slim 的 { id, server, setup }——
163
+ // v2 加载 setup,但 V1 检测需要 server 字段识别为插件
164
+ server: async () => ({}),
162
165
  };
163
166
  export default mod;
package/dist/v2.js CHANGED
@@ -822,7 +822,7 @@ function estimateTokens(text) {
822
822
  }
823
823
 
824
824
  // src/_version.ts
825
- var PLUGIN_VERSION = "1.7.0-oc2";
825
+ var PLUGIN_VERSION = "1.7.2-oc2";
826
826
 
827
827
  // src/panel/TokenCachePanel.tsx
828
828
  var MIN_PANEL_WIDTH = 20;
@@ -2933,7 +2933,10 @@ var mod = {
2933
2933
  collapsed: false
2934
2934
  }
2935
2935
  });
2936
- }
2936
+ },
2937
+ // V1 server 空实现(兼容标记):参考 oh-my-opencode-slim 的 { id, server, setup }——
2938
+ // v2 加载 setup,但 V1 检测需要 server 字段识别为插件
2939
+ server: async () => ({})
2937
2940
  };
2938
2941
  var index_default = mod;
2939
2942
  export {
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "opencode-visual-cache",
3
- "version": "1.7.0-oc2",
3
+ "version": "1.7.2-oc2",
4
4
  "description": "OpenCode TUI plugin displaying real-time token cache hit rate in the sidebar",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
8
- ".": "./dist/v2.js"
8
+ ".": "./dist/v2.js",
9
+ "./server": "./dist/v2.js",
10
+ "./tui": "./tui/index.js"
9
11
  },
10
12
  "files": [
11
13
  "dist",
12
14
  "src",
13
15
  "install.mjs",
14
16
  "README.md",
15
- "README_EN.md"
17
+ "README_EN.md",
18
+ "tui"
16
19
  ],
17
20
  "bin": {
18
21
  "opencode-visual-cache": "install.mjs"
package/src/_version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // auto-generated
2
- export const PLUGIN_VERSION="1.7.0-oc2";
2
+ export const PLUGIN_VERSION="1.7.2-oc2";
package/src/v2/index.tsx CHANGED
@@ -153,7 +153,7 @@ function PluginRoot(props: {
153
153
  )
154
154
  }
155
155
 
156
- const mod: PluginModule = {
156
+ const mod: PluginModule & { server: () => Promise<Record<string, never>> } = {
157
157
  id: "opencode-visual-cache",
158
158
  setup(context: Context) {
159
159
  const api = createPanelApi(context)
@@ -179,6 +179,9 @@ const mod: PluginModule = {
179
179
  // 偏好持久化(实验:storage.store 用法验证)
180
180
  context.storage.store("opencode-visual-cache.panel", { initial: { collapsed: false } })
181
181
  },
182
+ // V1 server 空实现(兼容标记):参考 oh-my-opencode-slim 的 { id, server, setup }——
183
+ // v2 加载 setup,但 V1 检测需要 server 字段识别为插件
184
+ server: async () => ({}),
182
185
  }
183
186
 
184
187
  export default mod
package/tui/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // tui/index.js——V2 目录加载入口(opencode2 resolveLocal 对目录解析 dir/tui → 目录 index)
2
+ export { default } from '../dist/v2.js'