get rid of unused functions

This commit is contained in:
perf3ct 2025-04-16 20:10:41 +00:00
parent 3da33987a0
commit 8f1723c386
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -43,36 +43,6 @@ interface SessionOptions {
contextNoteId?: string;
}
// In-memory storage for sessions
// In a production app, this should be stored in a database
const sessions = restChatService.getSessions();
// Flag to track if cleanup timer has been initialized
let cleanupInitialized = false;
/**
* Initialize the session cleanup timer to remove old/inactive sessions
* Only call this after database is initialized
*/
function initializeCleanupTimer() {
restChatService.initializeCleanupTimer();
cleanupInitialized = true;
}
/**
* Check if the database is initialized
*/
function isDatabaseInitialized(): boolean {
return restChatService.isDatabaseInitialized();
}
/**
* Get the AI service manager in a way that doesn't crash at startup
*/
function safelyUseAIManager(): boolean {
return restChatService.safelyUseAIManager();
}
/**
* @swagger
* /api/llm/sessions:
@ -348,20 +318,6 @@ async function deleteSession(req: Request, res: Response) {
return restChatService.deleteSession(req, res);
}
/**
* Find relevant notes based on search query
*/
async function findRelevantNotes(content: string, contextNoteId: string | null = null, limit = 5): Promise<NoteSource[]> {
return restChatService.findRelevantNotes(content, contextNoteId, limit);
}
/**
* Build a prompt with context from relevant notes
*/
function buildContextFromNotes(sources: NoteSource[], query: string): string {
return restChatService.buildContextFromNotes(sources, query);
}
/**
* @swagger
* /api/llm/sessions/{sessionId}/messages: