mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	move these to the interfaces folder
This commit is contained in:
		
							parent
							
								
									1968a5fff8
								
							
						
					
					
						commit
						06924aad59
					
				@ -6,7 +6,7 @@ import becca from "../../../../becca/becca.js";
 | 
			
		||||
import vectorStore from "../../embeddings/index.js";
 | 
			
		||||
import providerManager from "../../providers/providers.js";
 | 
			
		||||
import contextService from "../../context/services/context_service.js";
 | 
			
		||||
import type { NoteSource } from "../interfaces/session.js";
 | 
			
		||||
import type { NoteSource } from "../../interfaces/chat_session.js";
 | 
			
		||||
import { SEARCH_CONSTANTS } from '../../constants/search_constants.js';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,8 @@
 | 
			
		||||
import log from "../../../log.js";
 | 
			
		||||
import type { Response } from "express";
 | 
			
		||||
import type { StreamChunk } from "../../ai_interface.js";
 | 
			
		||||
import type { LLMStreamMessage } from "../interfaces/ws_messages.js";
 | 
			
		||||
import type { ChatSession } from "../interfaces/session.js";
 | 
			
		||||
import type { LLMStreamMessage } from "../../interfaces/chat_ws_messages.js";
 | 
			
		||||
import type { ChatSession } from "../../interfaces/chat_session.js";
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Handles streaming of LLM responses via WebSocket
 | 
			
		||||
 | 
			
		||||
@ -7,8 +7,8 @@ import { ContextHandler } from './handlers/context_handler.js';
 | 
			
		||||
import { ToolHandler } from './handlers/tool_handler.js';
 | 
			
		||||
import { StreamHandler } from './handlers/stream_handler.js';
 | 
			
		||||
import * as messageFormatter from './utils/message_formatter.js';
 | 
			
		||||
import type { ChatSession, ChatMessage, NoteSource } from './interfaces/session.js';
 | 
			
		||||
import type { LLMStreamMessage } from './interfaces/ws_messages.js';
 | 
			
		||||
import type { ChatSession, ChatMessage, NoteSource } from '../interfaces/chat_session.js';
 | 
			
		||||
import type { LLMStreamMessage } from '../interfaces/chat_ws_messages.js';
 | 
			
		||||
 | 
			
		||||
// Export components
 | 
			
		||||
export {
 | 
			
		||||
 | 
			
		||||
@ -16,10 +16,10 @@ import { ToolHandler } from "./handlers/tool_handler.js";
 | 
			
		||||
import { StreamHandler } from "./handlers/stream_handler.js";
 | 
			
		||||
import SessionsStore from "./sessions_store.js";
 | 
			
		||||
import * as MessageFormatter from "./utils/message_formatter.js";
 | 
			
		||||
import type { NoteSource } from "./interfaces/session.js";
 | 
			
		||||
import type { LLMStreamMessage } from "./interfaces/ws_messages.js";
 | 
			
		||||
import type { ChatMessage } from '../chat/interfaces/session.js';
 | 
			
		||||
import type { ChatSession } from '../chat/interfaces/session.js';
 | 
			
		||||
import type { NoteSource } from "../interfaces/chat_session.js";
 | 
			
		||||
import type { LLMStreamMessage } from "../interfaces/chat_ws_messages.js";
 | 
			
		||||
import type { ChatMessage } from '../interfaces/chat_session.js';
 | 
			
		||||
import type { ChatSession } from '../interfaces/chat_session.js';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service to handle chat API interactions
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ import log from "../../log.js";
 | 
			
		||||
import { LLM_CONSTANTS } from '../constants/provider_constants.js';
 | 
			
		||||
import { SEARCH_CONSTANTS } from '../constants/search_constants.js';
 | 
			
		||||
import { randomString } from "../../utils.js";
 | 
			
		||||
import type { ChatSession, ChatMessage } from './interfaces/session.js';
 | 
			
		||||
import type { ChatSession, ChatMessage } from '../interfaces/chat_session.js';
 | 
			
		||||
 | 
			
		||||
// In-memory storage for sessions
 | 
			
		||||
const sessions = new Map<string, ChatSession>();
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Interfaces for chat sessions and related data
 | 
			
		||||
 */
 | 
			
		||||
import type { Message } from "../../ai_interface.js";
 | 
			
		||||
import type { Message } from "../ai_interface.js";
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Represents a source note from which context is drawn
 | 
			
		||||
@ -6,5 +6,5 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
import restChatService from './chat/rest_chat_service.js';
 | 
			
		||||
export * from './chat/interfaces/session.js';
 | 
			
		||||
export * from './interfaces/chat_session.js';
 | 
			
		||||
export default restChatService;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user