Skip to content

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

feat(memory): add lifecycle and source label helpers

Steven Enamakel8633643a2cef
diff --git a/app/src/components/memory/memoryLifecycleLabels.ts b/app/src/components/memory/memoryLifecycleLabels.ts
index f7d5a1308f..9a12966462 100644
--- a/app/src/components/memory/memoryLifecycleLabels.ts
+++ b/app/src/components/memory/memoryLifecycleLabels.ts
@@ -1,11 +1,7 @@
/**
- * Labels for the memory lifecycle surface: brain source types, background job
- * kinds and job outcomes. Literal `t()` keys (not built from the value) so the
+ * Labels for the memory lifecycle surface: brain source types. Literal `t()` keys (not built from the value) so the
* i18n scanner can see every one of them; an unknown value shows as-is.
*/
-import type { JobOutcome } from '../../services/api/memoryApi';
-import type { BadgeVariant } from '../ui';
-
type Translate = (key: string, fallback?: string) => string;
/** A brain source type's label: the well-known ones translated, any other id verbatim. */
@@ -17,50 +13,7 @@ export function brainSourceLabel(source: string, t: Translate): string {
return t('memoryPage.brain.source.pdf');
case 'markdown':
return t('memoryPage.brain.source.markdown');
- case 'notion':
- return t('memoryPage.brain.source.notion');
- case 'github':
- return t('memoryPage.brain.source.github');
- case 'web':
- return t('memoryPage.brain.source.web');
default:
return source;
}
}
-
-/** A background job kind's label (`build_beliefs`, `ingest_brain`). */
-export function jobKindLabel(kind: string, t: Translate): string {
- switch (kind) {
- case 'build_beliefs':
- return t('memoryPage.background.job.buildBeliefs');
- case 'ingest_brain':
- return t('memoryPage.background.job.ingestBrain');
- default:
- return kind;
- }
-}
-
-export function jobOutcomeLabel(outcome: JobOutcome, t: Translate): string {
- switch (outcome) {
- case 'done':
- return t('memoryPage.background.outcome.done');
- case 'started':
- return t('memoryPage.background.outcome.started');
- case 'scheduled':
- return t('memoryPage.background.outcome.scheduled');
- case 'skipped':
- return t('memoryPage.background.outcome.skipped');
- case 'failed':
- return t('memoryPage.background.outcome.failed');
- default:
- return String(outcome);
- }
-}
-
-export const JOB_OUTCOME_VARIANT: Record<JobOutcome, BadgeVariant> = {
- done: 'success',
- started: 'primary',
- scheduled: 'neutral',
- skipped: 'warning',
- failed: 'danger',
-};
diff --git a/app/src/components/memory/memorySourceLabels.ts b/app/src/components/memory/memorySourceLabels.ts
index fd30561087..c2d8d0be21 100644
--- a/app/src/components/memory/memorySourceLabels.ts
+++ b/app/src/components/memory/memorySourceLabels.ts
@@ -13,14 +13,6 @@ export function sourceKindLabel(kind: DocumentSourceKind, t: Translate): string
return t('memoryPage.sourceKind.folder');
case 'file':
return t('memoryPage.sourceKind.file');
- case 'link':
- return t('memoryPage.sourceKind.link');
- case 'github':
- return t('memoryPage.sourceKind.github');
- case 'rss':
- return t('memoryPage.sourceKind.rss');
- case 'composio':
- return t('memoryPage.sourceKind.composio');
default:
return String(kind);
}
@@ -33,14 +25,6 @@ export function sourceTargetHint(kind: DocumentSourceKind, t: Translate): string
return t('memoryPage.sourceTarget.folder');
case 'file':
return t('memoryPage.sourceTarget.file');
- case 'link':
- return t('memoryPage.sourceTarget.link');
- case 'github':
- return t('memoryPage.sourceTarget.github');
- case 'rss':
- return t('memoryPage.sourceTarget.rss');
- case 'composio':
- return t('memoryPage.sourceTarget.composio');
default:
return '';
}