echoes-vault-opencode 1.0.22 → 1.0.23

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