feat: add memory candidates viewer with filtering and confidence visualization
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
import { processRequest, OrchestratorError } from '$lib/services/orchestrator';
|
||||
import { OrchestrationState } from '$lib/proto/llm_multiverse/v1/orchestrator_pb';
|
||||
import { sessionStore } from '$lib/stores/sessions.svelte';
|
||||
import { memoryStore } from '$lib/stores/memory.svelte';
|
||||
|
||||
let messages: ChatMessage[] = $state([]);
|
||||
let isStreaming = $state(false);
|
||||
@@ -30,6 +31,7 @@
|
||||
);
|
||||
let showConfig = $state(false);
|
||||
const lineageHref = resolveRoute('/lineage');
|
||||
const memoryHref = resolveRoute('/memory');
|
||||
|
||||
const isNonDefaultConfig = $derived(
|
||||
sessionConfig.overrideLevel !== OverrideLevel.NONE ||
|
||||
@@ -106,6 +108,16 @@
|
||||
}
|
||||
if (response.finalResult) {
|
||||
finalResult = response.finalResult;
|
||||
if (response.finalResult.newMemoryCandidates.length > 0) {
|
||||
memoryStore.addCandidates(
|
||||
sessionId,
|
||||
response.finalResult.newMemoryCandidates.map((mc) => ({
|
||||
content: mc.content,
|
||||
source: mc.source,
|
||||
confidence: mc.confidence
|
||||
}))
|
||||
);
|
||||
}
|
||||
}
|
||||
const idx = messages.length - 1;
|
||||
messages[idx] = {
|
||||
@@ -145,6 +157,12 @@
|
||||
>
|
||||
Lineage
|
||||
</a>
|
||||
<a
|
||||
href={memoryHref}
|
||||
class="rounded-lg px-2.5 py-1.5 text-sm text-gray-600 hover:bg-gray-100 hover:text-gray-900"
|
||||
>
|
||||
Memory
|
||||
</a>
|
||||
<!-- eslint-enable svelte/no-navigation-without-resolve -->
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user