memory view in chat client

This commit is contained in:
Storme-bit
2026-04-17 19:56:54 -07:00
parent b3fb936494
commit bf074295eb
2 changed files with 81 additions and 15 deletions

View File

@@ -115,7 +115,7 @@ export default function App() {
<AllProjectsView onProjectsChange={refreshProjects}/> <AllProjectsView onProjectsChange={refreshProjects}/>
)} )}
{view === 'settings' && <SettingsView />} {view === 'settings' && <SettingsView onNavigate={setView} />}
{view === 'project' && activeProject && ( {view === 'project' && activeProject && (
<ProjectView <ProjectView

View File

@@ -1,29 +1,78 @@
import React from 'react'; import React from 'react';
export default function SettingsView() { export default function SettingsView({ onNavigate }) {
return ( return (
<div className="flex-col flex-1 overflow-hidden" style={{ background: 'var(--bg-base)' }}> <div style={{ display: 'flex', flexDirection: 'column', flex: 1, overflow: 'hidden', background: 'var(--bg-base)' }}>
{/* Header */} {/* Header */}
<div className="panel-header" style={{ padding: '0 24px' }}> <div className="panel-header" style={{ padding: '0 24px' }}>
<span className="text-base" style={{ fontWeight: 500, color: 'var(--text-secondary)' }}> <span className="text-base" style={{ fontWeight: 500, color: 'var(--text-secondary)' }}>Settings</span>
Settings
</span>
</div> </div>
<div className="flex-1 scroll-y" style={{ padding: '24px' }}> <div className="flex-1 scroll-y" style={{ padding: '24px' }}>
<SettingsSection title="Appearance">
<Placeholder /> {/* Memory */}
</SettingsSection>
<SettingsSection title="Memory"> <SettingsSection title="Memory">
<Placeholder /> <SettingsRow
label="Memory Viewer"
description="Browse, search, and delete stored episodes"
action={<button className="btn-primary" style={{ padding: '6px 14px', fontSize: '13px' }}
onClick={() => onNavigate('memory')}>Open </button>}
/>
<SettingsRow
label="Semantic Search Results"
description="Max episodes retrieved per query"
action={<ComingSoon />}
/>
<SettingsRow
label="Episode Context Window"
description="Recent episodes injected into each prompt"
action={<ComingSoon />}
/>
</SettingsSection> </SettingsSection>
{/* Models */}
<SettingsSection title="Models"> <SettingsSection title="Models">
<Placeholder /> <SettingsRow
label="Active Model"
description="Model used for inference"
action={<ComingSoon />}
/>
<SettingsRow
label="Temperature"
description="Response creativity / randomness"
action={<ComingSoon />}
/>
<SettingsRow
label="Context Window"
description="Max tokens per request (-c flag)"
action={<ComingSoon />}
/>
</SettingsSection> </SettingsSection>
{/* About */}
<SettingsSection title="About"> <SettingsSection title="About">
<Placeholder /> <SettingsRow
label="Service Health"
description="Ping all four services"
action={<ComingSoon />}
/>
<SettingsRow
label="Version"
description="NexusAI"
action={<span className="text-sm text-muted">v0.1.0</span>}
/>
</SettingsSection> </SettingsSection>
{/* Appearance */}
<SettingsSection title="Appearance">
<SettingsRow
label="Theme"
description="UI colour scheme"
action={<ComingSoon />}
/>
</SettingsSection>
</div> </div>
</div> </div>
); );
@@ -47,10 +96,27 @@ function SettingsSection({ title, children }) {
); );
} }
function Placeholder() { function SettingsRow({ label, description, action }) {
return ( return (
<div className="text-sm text-muted" style={{ padding: '20px 16px' }}> <div style={{
Coming soon display: 'flex', alignItems: 'center', justifyContent: 'space-between',
padding: '14px 16px',
borderBottom: '1px solid var(--border)',
}}
// Remove bottom border on last child via CSS would need a class;
// easiest to just let it render the section border-radius clips it cleanly
>
<div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
<span className="text-sm" style={{ color: 'var(--text-primary)', fontWeight: 500 }}>{label}</span>
{description && <span className="text-xs text-muted">{description}</span>}
</div>
<div style={{ flexShrink: 0, marginLeft: 16 }}>
{action}
</div>
</div> </div>
); );
} }
function ComingSoon() {
return <span className="text-xs text-muted" style={{ fontStyle: 'italic' }}>Coming soon</span>;
}