@polderlabs/bizar 4.4.13 → 4.5.1
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/bizar-dash/CHANGELOG.md +37 -276
- package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js +2 -0
- package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js.map +1 -0
- package/bizar-dash/dist/assets/main-eWZ4NlCL.css +1 -0
- package/bizar-dash/dist/assets/main-usWhlPWa.js +362 -0
- package/bizar-dash/dist/assets/main-usWhlPWa.js.map +1 -0
- package/bizar-dash/dist/assets/{mobile-DSb-t42Y.js → mobile-DQLFCjwJ.js} +2 -2
- package/bizar-dash/dist/assets/{mobile-DSb-t42Y.js.map → mobile-DQLFCjwJ.js.map} +1 -1
- package/bizar-dash/dist/assets/mobile-O6ANdD4W.js +352 -0
- package/bizar-dash/dist/assets/mobile-O6ANdD4W.js.map +1 -0
- package/bizar-dash/dist/index.html +3 -3
- package/bizar-dash/dist/mobile.html +2 -2
- package/bizar-dash/skills/agent-baseline/SKILL.md +80 -0
- package/bizar-dash/skills/bizar/SKILL.md +116 -0
- package/bizar-dash/skills/chat/SKILL.md +74 -0
- package/bizar-dash/skills/headroom/SKILL.md +94 -0
- package/bizar-dash/skills/lightrag/SKILL.md +86 -0
- package/bizar-dash/skills/minimax/SKILL.md +80 -0
- package/bizar-dash/skills/obsidian/SKILL.md +68 -0
- package/bizar-dash/skills/providers/SKILL.md +75 -0
- package/bizar-dash/skills/sdk/SKILL.md +138 -0
- package/bizar-dash/skills/self-improvement/SKILL.md +53 -0
- package/bizar-dash/skills/skills-cli/SKILL.md +94 -0
- package/bizar-dash/skills/usage/SKILL.md +62 -0
- package/bizar-dash/src/server/api.mjs +18 -0
- package/bizar-dash/src/server/headroom.mjs +645 -0
- package/bizar-dash/src/server/memory-lightrag.mjs +272 -2
- package/bizar-dash/src/server/memory-obsidian.mjs +230 -0
- package/bizar-dash/src/server/memory-store.mjs +189 -0
- package/bizar-dash/src/server/minimax-usage-store.mjs +372 -0
- package/bizar-dash/src/server/minimax.mjs +196 -5
- package/bizar-dash/src/server/providers-store.mjs +956 -0
- package/bizar-dash/src/server/routes/_shared.mjs +17 -0
- package/bizar-dash/src/server/routes/config.mjs +52 -1
- package/bizar-dash/src/server/routes/env-vars.mjs +165 -0
- package/bizar-dash/src/server/routes/headroom.mjs +126 -0
- package/bizar-dash/src/server/routes/lightrag.mjs +154 -0
- package/bizar-dash/src/server/routes/memory.mjs +668 -1
- package/bizar-dash/src/server/routes/opencode-session-detail.mjs +14 -29
- package/bizar-dash/src/server/routes/opencode-sessions.mjs +205 -3
- package/bizar-dash/src/server/routes/providers.mjs +266 -5
- package/bizar-dash/src/server/routes/skills.mjs +32 -43
- package/bizar-dash/src/server/routes/update.mjs +340 -0
- package/bizar-dash/src/server/routes/usage.mjs +136 -0
- package/bizar-dash/src/server/serve-info.mjs +135 -4
- package/bizar-dash/src/server/server.mjs +20 -0
- package/bizar-dash/src/server/skills-store.mjs +152 -262
- package/bizar-dash/src/web/App.tsx +120 -29
- package/bizar-dash/src/web/components/EnvVarManager.tsx +247 -0
- package/bizar-dash/src/web/components/HeadroomSettings.tsx +418 -0
- package/bizar-dash/src/web/components/HeadroomStatus.tsx +158 -0
- package/bizar-dash/src/web/components/SettingsSearch.tsx +213 -0
- package/bizar-dash/src/web/components/Topbar.tsx +2 -1
- package/bizar-dash/src/web/components/UsageChart.tsx +250 -0
- package/bizar-dash/src/web/components/UsageTable.tsx +90 -0
- package/bizar-dash/src/web/components/chat/ChatComposer.tsx +21 -25
- package/bizar-dash/src/web/components/chat/ChatInfoPanel.tsx +199 -37
- package/bizar-dash/src/web/components/chat/ChatThread.tsx +29 -17
- package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +7 -1
- package/bizar-dash/src/web/components/chat/InfoPanel.tsx +71 -6
- package/bizar-dash/src/web/components/chat/useChat.ts +751 -257
- package/bizar-dash/src/web/lib/api.ts +43 -0
- package/bizar-dash/src/web/lib/types.ts +16 -0
- package/bizar-dash/src/web/main.tsx +2 -0
- package/bizar-dash/src/web/mobile/views/MobileChat.tsx +110 -35
- package/bizar-dash/src/web/styles/chat.css +135 -1
- package/bizar-dash/src/web/styles/main.css +46 -0
- package/bizar-dash/src/web/styles/memory.css +955 -0
- package/bizar-dash/src/web/styles/minimax-usage.css +335 -0
- package/bizar-dash/src/web/styles/settings.css +418 -0
- package/bizar-dash/src/web/styles/skills.css +302 -0
- package/bizar-dash/src/web/styles/tasks.css +288 -0
- package/bizar-dash/src/web/views/Chat.tsx +276 -48
- package/bizar-dash/src/web/views/Config.tsx +3 -2065
- package/bizar-dash/src/web/views/Memory.tsx +140 -0
- package/bizar-dash/src/web/views/MiniMaxUsage.tsx +476 -461
- package/bizar-dash/src/web/views/Overview.tsx +3 -0
- package/bizar-dash/src/web/views/Settings.tsx +36 -0
- package/bizar-dash/src/web/views/Skills.tsx +208 -260
- package/bizar-dash/src/web/views/Tasks.tsx +348 -1119
- package/bizar-dash/src/web/views/memory/ConfigPanel.tsx +289 -0
- package/bizar-dash/src/web/views/memory/GitSyncPanel.tsx +220 -0
- package/bizar-dash/src/web/views/memory/LightragPanel.tsx +307 -0
- package/bizar-dash/src/web/views/memory/MemoryOverview.tsx +354 -0
- package/bizar-dash/src/web/views/memory/MemoryStatusCard.tsx +160 -0
- package/bizar-dash/src/web/views/memory/ObsidianPanel.tsx +642 -0
- package/bizar-dash/src/web/views/memory/SemanticSearchPanel.tsx +194 -0
- package/bizar-dash/tests/chat-session-create.test.mjs +391 -0
- package/bizar-dash/tests/chat-session-stream.test.mjs +308 -0
- package/bizar-dash/tests/env-vars-store.test.mjs +216 -0
- package/bizar-dash/tests/headroom-install.test.mjs +173 -0
- package/bizar-dash/tests/headroom-settings.test.mjs +126 -0
- package/bizar-dash/tests/headroom-status.test.mjs +117 -0
- package/bizar-dash/tests/lightrag-defaults.node.test.mjs +118 -0
- package/bizar-dash/tests/memory-lightrag-extended.test.mjs +162 -0
- package/bizar-dash/tests/memory-obsidian.test.mjs +269 -0
- package/bizar-dash/tests/memory-tab.test.mjs +322 -0
- package/bizar-dash/tests/minimax-chat-usage.test.mjs +178 -0
- package/bizar-dash/tests/minimax-usage-store.node.test.mjs +293 -0
- package/bizar-dash/tests/mod-upgrade.node.test.mjs +1 -1
- package/bizar-dash/tests/opencode-sessions-detail.test.mjs +12 -9
- package/bizar-dash/tests/providers-store-backup-keys.node.test.mjs +479 -3
- package/bizar-dash/tests/providers-store-search.node.test.mjs +166 -0
- package/bizar-dash/tests/skills-list.test.mjs +232 -0
- package/bizar-dash/tests/skills-search.test.mjs +222 -0
- package/bizar-dash/tests/submit-feedback.test.mjs +6 -6
- package/bizar-dash/tests/tasks-create.test.mjs +187 -0
- package/bizar-dash/tests/update-check.test.mjs +127 -0
- package/bizar-dash/tests/update-run.test.mjs +266 -0
- package/cli/bin.mjs +247 -1
- package/cli/provision.mjs +118 -4
- package/config/agents/_shared/SKILLS.md +109 -0
- package/package.json +1 -1
- package/bizar-dash/dist/assets/main-BB5mJurD.js +0 -352
- package/bizar-dash/dist/assets/main-BB5mJurD.js.map +0 -1
- package/bizar-dash/dist/assets/main-BsnQLXdh.css +0 -1
- package/bizar-dash/dist/assets/mobile-Dl1q7Cyq.js +0 -354
- package/bizar-dash/dist/assets/mobile-Dl1q7Cyq.js.map +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// src/web/views/Memory.tsx — v4.7.0 dedicated Memory tab.
|
|
2
|
+
//
|
|
3
|
+
// Three-column layout: left rail (source picker), main panel (per-source UI),
|
|
4
|
+
// and a top stat row + a health hero at the top of every panel for context.
|
|
5
|
+
//
|
|
6
|
+
// The Memory subsystem has 4 sources (LightRAG, Obsidian vault, git sync,
|
|
7
|
+
// semantic search) plus a config panel and a high-level overview. Each is a
|
|
8
|
+
// standalone component under views/memory/.
|
|
9
|
+
|
|
10
|
+
import { useCallback, useState } from 'react';
|
|
11
|
+
import {
|
|
12
|
+
Brain,
|
|
13
|
+
FileText,
|
|
14
|
+
GitBranch,
|
|
15
|
+
LayoutDashboard,
|
|
16
|
+
RefreshCw,
|
|
17
|
+
Search as SearchIcon,
|
|
18
|
+
Sliders,
|
|
19
|
+
} from 'lucide-react';
|
|
20
|
+
import { Card } from '../components/Card';
|
|
21
|
+
import { useToast } from '../components/Toast';
|
|
22
|
+
import { cn } from '../lib/utils';
|
|
23
|
+
import { MemoryOverview } from './memory/MemoryOverview';
|
|
24
|
+
import { LightragPanel } from './memory/LightragPanel';
|
|
25
|
+
import { ObsidianPanel } from './memory/ObsidianPanel';
|
|
26
|
+
import { GitSyncPanel } from './memory/GitSyncPanel';
|
|
27
|
+
import { SemanticSearchPanel } from './memory/SemanticSearchPanel';
|
|
28
|
+
import { ConfigPanel } from './memory/ConfigPanel';
|
|
29
|
+
|
|
30
|
+
type SubPanel = 'overview' | 'lightrag' | 'obsidian' | 'git' | 'semantic' | 'config';
|
|
31
|
+
|
|
32
|
+
type Props = {
|
|
33
|
+
snapshot: unknown;
|
|
34
|
+
settings: unknown;
|
|
35
|
+
activeTab: string;
|
|
36
|
+
setActiveTab: (id: string) => void;
|
|
37
|
+
refreshSnapshot: () => Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const SOURCES: Array<{
|
|
41
|
+
id: SubPanel;
|
|
42
|
+
label: string;
|
|
43
|
+
icon: typeof LayoutDashboard;
|
|
44
|
+
}> = [
|
|
45
|
+
{ id: 'overview', label: 'Overview', icon: LayoutDashboard },
|
|
46
|
+
{ id: 'lightrag', label: 'LightRAG', icon: Brain },
|
|
47
|
+
{ id: 'obsidian', label: 'Obsidian Vault', icon: FileText },
|
|
48
|
+
{ id: 'git', label: 'Git Sync', icon: GitBranch },
|
|
49
|
+
{ id: 'semantic', label: 'Semantic Search', icon: SearchIcon },
|
|
50
|
+
{ id: 'config', label: 'Config', icon: Sliders },
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
export function Memory(_props: Props) {
|
|
54
|
+
const toast = useToast();
|
|
55
|
+
const [active, setActive] = useState<SubPanel>('overview');
|
|
56
|
+
const [refreshKey, setRefreshKey] = useState(0);
|
|
57
|
+
|
|
58
|
+
const refresh = useCallback(() => {
|
|
59
|
+
setRefreshKey((k) => k + 1);
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
62
|
+
const onRefreshAll = useCallback(async () => {
|
|
63
|
+
refresh();
|
|
64
|
+
toast.info('Refreshing memory…', 1200);
|
|
65
|
+
}, [refresh, toast]);
|
|
66
|
+
|
|
67
|
+
const renderPanel = () => {
|
|
68
|
+
switch (active) {
|
|
69
|
+
case 'overview':
|
|
70
|
+
return <MemoryOverview refreshKey={refreshKey} onRefresh={refresh} setActiveSubPanel={setActive} />;
|
|
71
|
+
case 'lightrag':
|
|
72
|
+
return <LightragPanel refreshKey={refreshKey} />;
|
|
73
|
+
case 'obsidian':
|
|
74
|
+
return <ObsidianPanel refreshKey={refreshKey} />;
|
|
75
|
+
case 'git':
|
|
76
|
+
return <GitSyncPanel refreshKey={refreshKey} />;
|
|
77
|
+
case 'semantic':
|
|
78
|
+
return <SemanticSearchPanel refreshKey={refreshKey} />;
|
|
79
|
+
case 'config':
|
|
80
|
+
return <ConfigPanel refreshKey={refreshKey} />;
|
|
81
|
+
default:
|
|
82
|
+
return <Card>Unknown panel: {active}</Card>;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<div className="view view-memory memory-tab">
|
|
88
|
+
{/* ── Header ─────────────────────────────────────────────── */}
|
|
89
|
+
<header className="view-header">
|
|
90
|
+
<div className="view-header-text">
|
|
91
|
+
<h2 className="view-title">
|
|
92
|
+
<Brain size={18} /> Memory
|
|
93
|
+
</h2>
|
|
94
|
+
<p className="view-subtitle">
|
|
95
|
+
LightRAG, Obsidian vault, git sync, and semantic search — all in one place.
|
|
96
|
+
</p>
|
|
97
|
+
</div>
|
|
98
|
+
<div className="view-actions">
|
|
99
|
+
<button
|
|
100
|
+
type="button"
|
|
101
|
+
className="icon-btn"
|
|
102
|
+
onClick={onRefreshAll}
|
|
103
|
+
aria-label="Refresh memory"
|
|
104
|
+
title="Refresh"
|
|
105
|
+
>
|
|
106
|
+
<RefreshCw size={14} />
|
|
107
|
+
</button>
|
|
108
|
+
</div>
|
|
109
|
+
</header>
|
|
110
|
+
|
|
111
|
+
<div className="memory-tab-body">
|
|
112
|
+
{/* ── Source rail ─────────────────────────────────────── */}
|
|
113
|
+
<nav className="memory-source-rail" aria-label="Memory sources">
|
|
114
|
+
{SOURCES.map((s) => {
|
|
115
|
+
const Icon = s.icon;
|
|
116
|
+
const isActive = active === s.id;
|
|
117
|
+
return (
|
|
118
|
+
<button
|
|
119
|
+
key={s.id}
|
|
120
|
+
type="button"
|
|
121
|
+
role="tab"
|
|
122
|
+
aria-selected={isActive}
|
|
123
|
+
className={cn('memory-source-button', isActive && 'memory-source-button-active')}
|
|
124
|
+
onClick={() => setActive(s.id)}
|
|
125
|
+
>
|
|
126
|
+
<Icon size={16} aria-hidden />
|
|
127
|
+
<span>{s.label}</span>
|
|
128
|
+
</button>
|
|
129
|
+
);
|
|
130
|
+
})}
|
|
131
|
+
</nav>
|
|
132
|
+
|
|
133
|
+
{/* ── Main panel ─────────────────────────────────────── */}
|
|
134
|
+
<div className="memory-main" key={active}>
|
|
135
|
+
{renderPanel()}
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
140
|
+
}
|