opencode-visual-cache 1.0.0 → 1.0.2
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.
- package/README.md +19 -6
- package/README_EN.md +19 -5
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
<div align="center">
|
|
20
20
|
<strong>支持折叠,节省侧边栏占用👇</strong> <br>
|
|
21
|
-
<img src="
|
|
21
|
+
<img src="https://raw.githubusercontent.com/Hotakus/opencode-visual-cache/master/assets/example2.png"></img>
|
|
22
22
|
</div>
|
|
23
23
|
<div align="center">
|
|
24
24
|
<strong>展开👇</strong> <br>
|
|
25
|
-
<img src="
|
|
25
|
+
<img src="https://raw.githubusercontent.com/Hotakus/opencode-visual-cache/master/assets/example1.png"></img>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
---
|
|
@@ -40,14 +40,27 @@
|
|
|
40
40
|
|
|
41
41
|
## 安装
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
### 1. 安装插件
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g opencode-visual-cache
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. 配置 TUI 插件
|
|
50
|
+
|
|
51
|
+
创建或编辑 `~/.config/opencode/tui.jsonc`:
|
|
46
52
|
|
|
47
53
|
```jsonc
|
|
48
|
-
|
|
54
|
+
{
|
|
55
|
+
"$schema": "https://opencode.ai/tui.json",
|
|
56
|
+
"plugin": ["opencode-visual-cache"]
|
|
57
|
+
}
|
|
49
58
|
```
|
|
50
59
|
|
|
60
|
+
### 3. 重启 OpenCode
|
|
61
|
+
|
|
62
|
+
进入任意 session,侧边栏即可看到缓存统计面板。
|
|
63
|
+
|
|
51
64
|
---
|
|
52
65
|
|
|
53
66
|
## 调试
|
package/README_EN.md
CHANGED
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
<div align="center">
|
|
20
20
|
<strong>Collapsed 👇</strong> <br>
|
|
21
|
-
<img src="
|
|
21
|
+
<img src="https://raw.githubusercontent.com/Hotakus/opencode-visual-cache/master/assets/example2.png"></img>
|
|
22
22
|
</div>
|
|
23
23
|
<div align="center">
|
|
24
24
|
<strong>Expanded 👇</strong> <br>
|
|
25
|
-
<img src="
|
|
25
|
+
<img src="https://raw.githubusercontent.com/Hotakus/opencode-visual-cache/master/assets/example1.png"></img>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
---
|
|
@@ -41,13 +41,27 @@
|
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
### 1. Install the plugin
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g opencode-visual-cache
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 2. Configure TUI plugin
|
|
51
|
+
|
|
52
|
+
Create or edit `~/.config/opencode/tui.jsonc`:
|
|
46
53
|
|
|
47
54
|
```jsonc
|
|
48
|
-
|
|
55
|
+
{
|
|
56
|
+
"$schema": "https://opencode.ai/tui.json",
|
|
57
|
+
"plugin": ["opencode-visual-cache"]
|
|
58
|
+
}
|
|
49
59
|
```
|
|
50
60
|
|
|
61
|
+
### 3. Restart OpenCode
|
|
62
|
+
|
|
63
|
+
Open any session — the cache stats panel appears in the sidebar.
|
|
64
|
+
|
|
51
65
|
---
|
|
52
66
|
|
|
53
67
|
## Debug
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-visual-cache",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
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",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"./tui": {
|
|
14
14
|
"import": "./src/index.tsx",
|
|
15
|
-
"config": {
|
|
15
|
+
"config": {
|
|
16
|
+
"enabled": true
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
},
|
|
18
20
|
"files": [
|