echoes-vault-opencode 1.0.19 → 1.0.20
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 +21 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echoes-vault-opencode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
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
|
@@ -9,9 +9,10 @@ type VaultState = {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const KV = "echoes_vault"
|
|
12
|
-
let vault: VaultState = { initialized: true, sessionActive:
|
|
12
|
+
let vault: VaultState = { initialized: true, sessionActive: false, pagesCount: 0, lastSession: null }
|
|
13
13
|
|
|
14
14
|
const tui: TuiPlugin = async (api) => {
|
|
15
|
+
// Блок инициализации событий...
|
|
15
16
|
try {
|
|
16
17
|
const saved = api.kv.get<VaultState>(KV)
|
|
17
18
|
if (saved) vault = saved
|
|
@@ -25,12 +26,12 @@ const tui: TuiPlugin = async (api) => {
|
|
|
25
26
|
vault.lastSession = new Date().toISOString().slice(0, 10)
|
|
26
27
|
save()
|
|
27
28
|
})
|
|
28
|
-
|
|
29
|
+
// ... остальные события
|
|
29
30
|
} catch (error) {
|
|
30
31
|
console.error("[echoes-vault] event init failed:", error)
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
//
|
|
34
|
+
// Обновленный UI
|
|
34
35
|
api.slots.register({
|
|
35
36
|
slots: {
|
|
36
37
|
sidebar_content({ session_id }: { session_id: string }) {
|
|
@@ -41,22 +42,28 @@ const tui: TuiPlugin = async (api) => {
|
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
44
|
<box flexDirection="column" paddingBottom={1}>
|
|
45
|
+
|
|
46
|
+
{/* Блок 1: Статус хранилища */}
|
|
44
47
|
<box flexDirection="column" paddingBottom={1}>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
{/* Если статус активен - цвет зеленый. Если нет - делаем тусклым */}
|
|
49
|
+
{active ? (
|
|
50
|
+
<text color="green">• Active ({title})</text>
|
|
51
|
+
) : (
|
|
52
|
+
<text dim>• Disconnected</text>
|
|
53
|
+
)}
|
|
54
|
+
|
|
55
|
+
{/* Используем атрибут dim для тусклого текста */}
|
|
56
|
+
<text dim>• {count} pages indexed</text>
|
|
52
57
|
</box>
|
|
58
|
+
|
|
59
|
+
{/* Блок 2: Легенда команд */}
|
|
53
60
|
<box flexDirection="column">
|
|
54
61
|
<text bold>Commands</text>
|
|
55
62
|
|
|
56
|
-
<text
|
|
57
|
-
<text
|
|
58
|
-
<text
|
|
59
|
-
<text
|
|
63
|
+
<text dim> /echoes-init (Init vault)</text>
|
|
64
|
+
<text dim> /echoes-start (Start session)</text>
|
|
65
|
+
<text dim> /echoes-end (End session)</text>
|
|
66
|
+
<text dim> /echoes-status (Show status)</text>
|
|
60
67
|
</box>
|
|
61
68
|
|
|
62
69
|
</box>
|