opencode-visual-cache 1.0.1 → 1.0.4

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.
Files changed (3) hide show
  1. package/README.md +29 -4
  2. package/README_EN.md +29 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -40,14 +40,39 @@
40
40
 
41
41
  ## 安装
42
42
 
43
- > [!NOTE]
44
- > 安装方式待定 —— 本喵还在研究如何发布喵~
45
- > 发布后将更新此部分。
43
+ ### 方式一:OpenCode 命令安装(推荐)
44
+
45
+ OpenCode 中按 **`Shift + P`** 打开命令面板,搜索 **`install plugin`**,输入:
46
+
47
+ ```
48
+ opencode-visual-cache
49
+ ```
50
+
51
+ 回车即可完成安装与配置。
52
+
53
+ ### 方式二:手动安装
54
+
55
+ **1. 安装插件**
56
+
57
+ ```bash
58
+ npm install -g opencode-visual-cache
59
+ ```
60
+
61
+ **2. 配置 TUI 插件**
62
+
63
+ 创建或编辑 `~/.config/opencode/tui.jsonc`:
46
64
 
47
65
  ```jsonc
48
- // TODO: 安装步骤
66
+ {
67
+ "$schema": "https://opencode.ai/tui.json",
68
+ "plugin": ["opencode-visual-cache"]
69
+ }
49
70
  ```
50
71
 
72
+ ### 重启 OpenCode
73
+
74
+ 进入任意 session,侧边栏即可看到缓存统计面板。
75
+
51
76
  ---
52
77
 
53
78
  ## 调试
package/README_EN.md CHANGED
@@ -41,13 +41,39 @@
41
41
 
42
42
  ## Installation
43
43
 
44
- > [!NOTE]
45
- > Installation method TBD — will be updated after publishing.
44
+ ### Option 1: OpenCode Command (recommended)
45
+
46
+ Press **`Shift + P`** in OpenCode to open the command palette, search **`install plugin`**, then type:
47
+
48
+ ```
49
+ opencode-visual-cache
50
+ ```
51
+
52
+ Press Enter to install and configure automatically.
53
+
54
+ ### Option 2: Manual
55
+
56
+ **1. Install the plugin**
57
+
58
+ ```bash
59
+ npm install -g opencode-visual-cache
60
+ ```
61
+
62
+ **2. Configure TUI plugin**
63
+
64
+ Create or edit `~/.config/opencode/tui.jsonc`:
46
65
 
47
66
  ```jsonc
48
- // TODO: install steps
67
+ {
68
+ "$schema": "https://opencode.ai/tui.json",
69
+ "plugin": ["opencode-visual-cache"]
70
+ }
49
71
  ```
50
72
 
73
+ ### Restart OpenCode
74
+
75
+ Open any session — the cache stats panel appears in the sidebar.
76
+
51
77
  ---
52
78
 
53
79
  ## Debug
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-visual-cache",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "description": "OpenCode TUI plugin displaying real-time token cache hit rate in the sidebar",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",