Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(api): restore memory facet label fallback

Steven Enamakel973e1360cf93
diff --git a/app/src/components/memory/memoryFacetLabels.ts b/app/src/components/memory/memoryFacetLabels.ts
index ab9084715d..b4204ea95e 100644
--- a/app/src/components/memory/memoryFacetLabels.ts
+++ b/app/src/components/memory/memoryFacetLabels.ts
@@ -36,6 +36,8 @@ export function facetLabel(facet: Facet, t: Translate): string {
return t('memoryPage.explorer.facet.toolCall');
case 'tag':
return t('memoryPage.explorer.facet.tag');
+ case 'namespace':
+ return t('memoryPage.explorer.facet.namespace');
default:
return String(facet);
}
@@ -58,9 +60,15 @@ function sourceLabel(kind: SourceKind, t: Translate): string {
export function facetValueLabel(facet: Facet, value: string, t: Translate): string {
if (facet === 'kind') return kindLabel(value as ItemKind, t);
if (facet === 'source') return sourceLabel(value as SourceKind, t);
+ if (facet === 'namespace') return namespaceLabel(value, t);
return value;
}
+/** A memory node as a reader sees it: the shared root named, agents verbatim. */
+export function namespaceLabel(value: string, t: Translate): string {
+ return value === 'root' ? t('memoryPage.explorer.namespace.root') : value;
+}
+
/** Whether values of `facet` are identifiers or paths, shown in a monospace face. */
export function isMonoFacet(facet: Facet): boolean {
return facet !== 'kind' && facet !== 'source' && facet !== 'tag';
diff --git a/app/src/services/api/memoryApi.ts b/app/src/services/api/memoryApi.ts
index 86df84db67..678c57d049 100644
--- a/app/src/services/api/memoryApi.ts
+++ b/app/src/services/api/memoryApi.ts
@@ -223,10 +223,12 @@ export type Facet =
| 'thread'
| 'agent'
| 'tool_call'
- | 'tag';
+ | 'tag'
+ | 'namespace';
export const FACETS: readonly Facet[] = [
'kind',
+ 'namespace',
'source',
'source_id',
'workspace',
@@ -320,6 +322,8 @@ export interface SourceAddRequest {
}
export interface MemoryContext {
+ /** The memory node the brief is about; `root` is the one every agent shares. */
+ namespace: string;
markdown: string;
tokens: number;
generated_at: string | null;
@@ -548,12 +552,16 @@ export function memorySourcesSync(id?: string): Promise<{ started: string[] }> {
// ─── context.md ──────────────────────────────────────────────────────────────
-export function memoryContextGet(): Promise<MemoryContext> {
- return call<MemoryContext>(CORE_RPC_METHODS.memoryContextGet);
+/** The memory node every agent shares. */
+export const ROOT_NAMESPACE = 'root';
+
+/** The brief of one memory node (`root` when omitted). */
+export function memoryContextGet(namespace?: string): Promise<MemoryContext> {
+ return call<MemoryContext>(CORE_RPC_METHODS.memoryContextGet, { namespace });
}
-export function memoryContextRefresh(): Promise<MemoryContext> {
- return call<MemoryContext>(CORE_RPC_METHODS.memoryContextRefresh);
+export function memoryContextRefresh(namespace?: string): Promise<MemoryContext> {
+ return call<MemoryContext>(CORE_RPC_METHODS.memoryContextRefresh, { namespace });
}
export function memoryContextSet(update: ContextUpdate): Promise<MemoryContext> {