fix: normalize gateway dev mode detection

This commit is contained in:
Peter Steinberger
2026-01-18 01:08:42 +00:00
parent 2c070952e1
commit 36d88f6079
29 changed files with 95 additions and 107 deletions

View File

@@ -711,7 +711,10 @@ export class MemoryIndexManager {
}));
}
private shouldSyncSessions(params?: { reason?: string; force?: boolean }, needsFullReindex = false) {
private shouldSyncSessions(
params?: { reason?: string; force?: boolean },
needsFullReindex = false,
) {
if (!this.sources.has("sessions")) return false;
if (params?.force) return true;
const reason = params?.reason;
@@ -876,9 +879,7 @@ export class MemoryIndexManager {
force?: boolean;
progress?: (update: MemorySyncProgressUpdate) => void;
}) {
const progress = params?.progress
? this.createSyncProgress(params.progress)
: undefined;
const progress = params?.progress ? this.createSyncProgress(params.progress) : undefined;
const vectorReady = await this.ensureVectorReady();
const meta = this.readMeta();
const needsFullReindex =
@@ -972,7 +973,10 @@ export class MemoryIndexManager {
}
private normalizeSessionText(value: string): string {
return value.replace(/\s*\n+\s*/g, " ").replace(/\s+/g, " ").trim();
return value
.replace(/\s*\n+\s*/g, " ")
.replace(/\s+/g, " ")
.trim();
}
private extractSessionText(content: unknown): string | null {