Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
rename files with underscore
perf3ctd149e218964c
diff --git a/src/services/llm/chat/handlers/context-handler.ts b/src/services/llm/chat/handlers/context_handler.tssimilarity index 100%rename from src/services/llm/chat/handlers/context-handler.tsrename to src/services/llm/chat/handlers/context_handler.tsdiff --git a/src/services/llm/chat/handlers/stream-handler.ts b/src/services/llm/chat/handlers/stream_handler.tssimilarity index 98%rename from src/services/llm/chat/handlers/stream-handler.tsrename to src/services/llm/chat/handlers/stream_handler.tsindex 492345c24d..688e44b203 100644--- a/src/services/llm/chat/handlers/stream-handler.ts+++ b/src/services/llm/chat/handlers/stream_handler.ts@@ -4,7 +4,7 @@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 { LLMStreamMessage } from "../interfaces/ws_messages.js";import type { ChatSession } from "../interfaces/session.js";/**@@ -50,7 +50,7 @@ export class StreamHandler {try {// Import the tool handler- const { ToolHandler } = await import('./tool-handler.js');+ const { ToolHandler } = await import('./tool_handler.js');// Generate the LLM completion with streaming enabledconst response = await service.generateChatCompletion(aiMessages, {@@ -198,7 +198,7 @@ export class StreamHandler {service?: any): Promise<void> {// Import tool handler lazily to avoid circular dependencies- const { ToolHandler } = await import('./tool-handler.js');+ const { ToolHandler } = await import('./tool_handler.js');let messageContent = '';diff --git a/src/services/llm/chat/handlers/tool-handler.ts b/src/services/llm/chat/handlers/tool_handler.tssimilarity index 99%rename from src/services/llm/chat/handlers/tool-handler.tsrename to src/services/llm/chat/handlers/tool_handler.tsindex 43f9101a34..7cbfd13161 100644--- a/src/services/llm/chat/handlers/tool-handler.ts+++ b/src/services/llm/chat/handlers/tool_handler.ts@@ -3,7 +3,7 @@*/import log from "../../../log.js";import type { Message } from "../../ai_interface.js";-import SessionsStore from "../sessions-store.js";+import SessionsStore from "../sessions_store.js";/*** Handles the execution of LLM toolsdiff --git a/src/services/llm/chat/index.ts b/src/services/llm/chat/index.tsindex b311e26832..e29860cadb 100644--- a/src/services/llm/chat/index.ts+++ b/src/services/llm/chat/index.ts@@ -1,14 +1,14 @@/*** Chat module export*/-import restChatService from './rest-chat-service.js';-import sessionsStore from './sessions-store.js';-import { ContextHandler } from './handlers/context-handler.js';-import { ToolHandler } from './handlers/tool-handler.js';-import { StreamHandler } from './handlers/stream-handler.js';+import restChatService from './rest_chat_service.js';+import sessionsStore from './sessions_store.js';+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 { LLMStreamMessage } from './interfaces/ws_messages.js';// Export componentsexport {diff --git a/src/services/llm/chat/interfaces/ws-messages.ts b/src/services/llm/chat/interfaces/ws_messages.tssimilarity index 100%rename from src/services/llm/chat/interfaces/ws-messages.tsrename to src/services/llm/chat/interfaces/ws_messages.tsdiff --git a/src/services/llm/chat/rest-chat-service.ts b/src/services/llm/chat/rest_chat_service.tssimilarity index 98%rename from src/services/llm/chat/rest-chat-service.tsrename to src/services/llm/chat/rest_chat_service.tsindex 04ed50d826..51834c4a33 100644--- a/src/services/llm/chat/rest-chat-service.ts+++ b/src/services/llm/chat/rest_chat_service.ts@@ -11,13 +11,13 @@ import options from "../../options.js";import { SEARCH_CONSTANTS } from '../constants/search_constants.js';// Import our refactored modules-import { ContextHandler } from "./handlers/context-handler.js";-import { ToolHandler } from "./handlers/tool-handler.js";-import { StreamHandler } from "./handlers/stream-handler.js";-import SessionsStore from "./sessions-store.js";+import { ContextHandler } from "./handlers/context_handler.js";+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 { LLMStreamMessage } from "./interfaces/ws_messages.js";/*** Service to handle chat API interactionsdiff --git a/src/services/llm/chat/sessions-store.ts b/src/services/llm/chat/sessions_store.tssimilarity index 100%rename from src/services/llm/chat/sessions-store.tsrename to src/services/llm/chat/sessions_store.tsdiff --git a/src/services/llm/rest_chat_service.ts b/src/services/llm/rest_chat_service.tsindex 4de7114149..ee7462db86 100644--- a/src/services/llm/rest_chat_service.ts+++ b/src/services/llm/rest_chat_service.ts@@ -5,6 +5,6 @@* See chat/rest-chat-service.ts for the actual implementation.*/-import restChatService from './chat/rest-chat-service.js';+import restChatService from './chat/rest_chat_service.js';export * from './chat/interfaces/session.js';export default restChatService;