Refactor session ID references from sdk_session_id to memory_session_id across multiple services and database queries
- Updated SQL queries in cleanup-duplicates.ts and context-generator.ts to use memory_session_id. - Modified interfaces in context-generator.ts to reflect the new session ID naming. - Implemented a repair migration in SessionStore.ts to rename columns in existing tables. - Adjusted FormattingService.ts and SDKAgent.ts to utilize memory_session_id for session handling. - Ensured SearchManager.ts retrieves summaries and observations using the updated memory_session_id.
This commit is contained in:
@@ -1376,13 +1376,13 @@ export class SearchManager {
|
||||
lines.push('');
|
||||
|
||||
for (const session of sessions) {
|
||||
if (!session.sdk_session_id) continue;
|
||||
if (!session.memory_session_id) continue;
|
||||
|
||||
lines.push('---');
|
||||
lines.push('');
|
||||
|
||||
if (session.has_summary) {
|
||||
const summary = this.sessionStore.getSummaryForSession(session.sdk_session_id);
|
||||
const summary = this.sessionStore.getSummaryForSession(session.memory_session_id);
|
||||
if (summary) {
|
||||
const promptLabel = summary.prompt_number ? ` (Prompt #${summary.prompt_number})` : '';
|
||||
lines.push(`**Summary${promptLabel}**`);
|
||||
@@ -1432,7 +1432,7 @@ export class SearchManager {
|
||||
lines.push(`**Request:** ${session.user_prompt}`);
|
||||
}
|
||||
|
||||
const observations = this.sessionStore.getObservationsForSession(session.sdk_session_id);
|
||||
const observations = this.sessionStore.getObservationsForSession(session.memory_session_id);
|
||||
if (observations.length > 0) {
|
||||
lines.push('');
|
||||
lines.push(`**Observations (${observations.length}):**`);
|
||||
|
||||
Reference in New Issue
Block a user