echoes-vault-opencode 1.0.20 → 1.0.22

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