echoes-vault-opencode 1.1.7 → 1.1.8

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 (2) hide show
  1. package/package.json +4 -2
  2. package/tui.tsx +32 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echoes-vault-opencode",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "EchoesVault — persistent memory plugin for OpenCode. Obsidian-style knowledge base with daily logs, encyclopedia pages, and session resumption.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -28,7 +28,9 @@
28
28
  ],
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@opencode-ai/plugin": ">=1.16.0"
31
+ "@opencode-ai/plugin": ">=1.16.0",
32
+ "@opentui/solid": ">=0.4.3",
33
+ "solid-js": ">=1.9.0"
32
34
  },
33
35
  "devDependencies": {
34
36
  "@types/node": "^22.0.0",
package/tui.tsx CHANGED
@@ -59,6 +59,18 @@ const tui: TuiPlugin = async (api) => {
59
59
  return "Session Not Started"
60
60
  }
61
61
 
62
+ const vaultHealthColor = () => {
63
+ const pages = state()?.stats?.totalPages ?? 0
64
+ if (pages > 200) return theme.error
65
+ if (pages >= 170) return theme.warning
66
+ return theme.success
67
+ }
68
+
69
+ const vaultUsagePercent = () => {
70
+ const pages = state()?.stats?.totalPages ?? 0
71
+ return Math.round((pages / 200) * 100)
72
+ }
73
+
62
74
  const statusDesc = () => {
63
75
  const s = state()
64
76
  if (!s || !s.initialized) return null
@@ -83,6 +95,25 @@ const tui: TuiPlugin = async (api) => {
83
95
  return "to load context"
84
96
  }
85
97
 
98
+ const vaultHealthSection = () => {
99
+ const s = state()
100
+ if (!s || !s.initialized) return null
101
+ const pages = s.stats?.totalPages ?? 0
102
+ return (
103
+ <box flexDirection="column">
104
+ <box flexDirection="row">
105
+ <text fg={vaultHealthColor()}>{"• "}</text>
106
+ <text fg={theme.text}><b>Vault Health</b></text>
107
+ </box>
108
+ <text fg={theme.textMuted}>{" Pages: "}{pages}</text>
109
+ <text fg={theme.textMuted}>{" Usage: "}{vaultUsagePercent()}{"%"}</text>
110
+ {pages > 200 ? (
111
+ <text fg={theme.textMuted}>{" Consider migrating to RAG"}</text>
112
+ ) : null}
113
+ </box>
114
+ )
115
+ }
116
+
86
117
  return (
87
118
  <box flexDirection="column">
88
119
  <box flexDirection="row">
@@ -102,6 +133,7 @@ const tui: TuiPlugin = async (api) => {
102
133
  <text fg={theme.textMuted}> {statusCmdHint()}</text>
103
134
  </box>
104
135
  )}
136
+ {vaultHealthSection()}
105
137
  </box>
106
138
  )
107
139
  },