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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. 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.19",
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: true, pagesCount: 15, lastSession: "2026-07-03" } // Заглушка для теста визуала
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
- // Отрисовка UI
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
- <text bold>EchoesVault</text>
46
- <text color={active ? "#4caf50" : "gray"}>
47
- {active ? `Active (${title})` : "Disconnected"}
48
- </text>
49
- <text color="gray">
50
- • {count} pages indexed
51
- </text>
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 color="gray"> /echoes-init (Init vault)</text>
57
- <text color="gray"> /echoes-start (Start session)</text>
58
- <text color="gray"> /echoes-end (End session)</text>
59
- <text color="gray"> /echoes-status (Show status)</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>