webui: add sessions/memory management and show full hot-reload field details

This commit is contained in:
DBT
2026-02-25 18:25:23 +00:00
parent 379a0a2366
commit 98add491be
9 changed files with 5488 additions and 25 deletions

View File

@@ -19,7 +19,7 @@ function setPath(obj: any, path: string, value: any) {
const Config: React.FC = () => {
const { t } = useTranslation();
const { cfg, setCfg, cfgRaw, setCfgRaw, loadConfig, q } = useAppContext();
const { cfg, setCfg, cfgRaw, setCfgRaw, loadConfig, hotReloadFieldDetails, q } = useAppContext();
const [showRaw, setShowRaw] = useState(false);
async function saveConfig() {
@@ -53,6 +53,18 @@ const Config: React.FC = () => {
</button>
</div>
<div className="bg-zinc-900/40 border border-zinc-800/80 rounded-2xl p-4">
<div className="text-sm font-semibold text-zinc-300 mb-2"></div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-2 text-xs">
{hotReloadFieldDetails.map((it) => (
<div key={it.path} className="p-2 rounded bg-zinc-950 border border-zinc-800">
<div className="font-mono text-zinc-200">{it.path}</div>
<div className="text-zinc-400">{it.name || ''}{it.description ? ` · ${it.description}` : ''}</div>
</div>
))}
</div>
</div>
<div className="flex-1 bg-zinc-900/40 border border-zinc-800/80 rounded-2xl overflow-hidden flex flex-col shadow-sm">
{!showRaw ? (
<div className="p-8 overflow-y-auto">