echoes-vault-opencode 1.0.23 → 1.0.24
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/package.json +1 -1
- package/tui.tsx +24 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echoes-vault-opencode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
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",
|
package/tui.tsx
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/** @jsxImportSource @opentui/solid */
|
|
2
2
|
import type { TuiPlugin, TuiPluginModule } from "@opencode-ai/plugin/tui"
|
|
3
|
-
|
|
4
3
|
type VaultState = {
|
|
5
4
|
initialized: boolean
|
|
6
5
|
sessionActive: boolean
|
|
7
6
|
pagesCount: number
|
|
8
7
|
lastSession: string | null
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
const KV = "echoes_vault"
|
|
12
10
|
let vault: VaultState = { initialized: true, sessionActive: true, pagesCount: 15, lastSession: "2026-07-03" } // Заглушка для теста визуала
|
|
13
|
-
|
|
14
11
|
const tui: TuiPlugin = async (api) => {
|
|
12
|
+
// Инициализацию событий пока оставляем, она написана логично
|
|
15
13
|
try {
|
|
16
14
|
const saved = api.kv.get<VaultState>(KV)
|
|
17
15
|
if (saved) vault = saved
|
|
@@ -23,10 +21,11 @@ const tui: TuiPlugin = async (api) => {
|
|
|
23
21
|
vault.lastSession = new Date().toISOString().slice(0, 10)
|
|
24
22
|
save()
|
|
25
23
|
})
|
|
24
|
+
// ... остальные события ...
|
|
26
25
|
} catch (error) {
|
|
27
26
|
console.error("[echoes-vault] event init failed:", error)
|
|
28
27
|
}
|
|
29
|
-
|
|
28
|
+
// Отрисовка UI
|
|
30
29
|
api.slots.register({
|
|
31
30
|
slots: {
|
|
32
31
|
sidebar_content({ session_id }: { session_id: string }) {
|
|
@@ -34,37 +33,40 @@ const tui: TuiPlugin = async (api) => {
|
|
|
34
33
|
const title = sessionInfo?.title ?? "current"
|
|
35
34
|
const count = vault.pagesCount
|
|
36
35
|
const active = vault.sessionActive
|
|
37
|
-
|
|
38
36
|
return (
|
|
39
37
|
<box flexDirection="column" paddingBottom={1}>
|
|
38
|
+
|
|
39
|
+
{/* Блок 1: Статус хранилища */}
|
|
40
40
|
<box flexDirection="column" paddingBottom={1}>
|
|
41
|
+
{/* Заголовок (белый, жирный) */}
|
|
41
42
|
<text bold>EchoesVault</text>
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
{/* Бледный текст статуса */}
|
|
45
|
+
<text color={active ? "
|
|
46
|
+
#4caf50" : "gray"}>
|
|
47
|
+
• {active ? Active (${title}) : "Disconnected"}
|
|
48
|
+
</text>
|
|
49
|
+
<text color="gray">
|
|
47
50
|
• {count} pages indexed
|
|
48
|
-
|
|
49
|
-
</box>
|
|
50
|
-
<box flexDirection="column">
|
|
51
|
-
<text bold>Commands</text>
|
|
52
|
-
|
|
53
|
-
<text color="textMuted"> /echoes-init (Init vault)</text>
|
|
54
|
-
<text color="textMuted"> /echoes-start (Start session)</text>
|
|
55
|
-
<text color="textMuted"> /echoes-end (End session)</text>
|
|
56
|
-
<text color="textMuted"> /echoes-status (Show status)</text>
|
|
57
|
-
</box>
|
|
51
|
+
</text>
|
|
58
52
|
</box>
|
|
59
|
-
)
|
|
53
|
+
{/* Блок 2: Легенда команд (вместо неработающих кнопок) */}
|
|
54
|
+
<box flexDirection="column">
|
|
55
|
+
<text bold>Commands</text>
|
|
56
|
+
|
|
57
|
+
<text color="gray"> /echoes-init (Init vault)</text>
|
|
58
|
+
<text color="gray"> /echoes-start (Start session)</text>
|
|
59
|
+
<text color="gray"> /echoes-end (End session)</text>
|
|
60
|
+
<text color="gray"> /echoes-status (Show status)</text>
|
|
61
|
+
</box>
|
|
62
|
+
</box>
|
|
63
|
+
)
|
|
60
64
|
},
|
|
61
65
|
},
|
|
62
66
|
})
|
|
63
67
|
}
|
|
64
|
-
|
|
65
68
|
const plugin: TuiPluginModule & { id: string } = {
|
|
66
69
|
id: "echoes-vault-sidebar",
|
|
67
70
|
tui,
|
|
68
71
|
}
|
|
69
|
-
|
|
70
72
|
export default plugin
|