Add prompt management functionality to MCP server (#281)

This commit is contained in:
samanhappy
2025-08-20 14:23:55 +08:00
committed by GitHub
parent 81c3091a5c
commit 6020611f57
15 changed files with 1247 additions and 44 deletions

View File

@@ -1,6 +1,6 @@
import { getRepositoryFactory } from '../db/index.js';
import { VectorEmbeddingRepository } from '../db/repositories/index.js';
import { ToolInfo } from '../types/index.js';
import { Tool } from '../types/index.js';
import { getAppDataSource, initializeDatabase } from '../db/connection.js';
import { getSmartRoutingConfig } from '../utils/smartRouting.js';
import OpenAI from 'openai';
@@ -190,7 +190,7 @@ function generateFallbackEmbedding(text: string): number[] {
*/
export const saveToolsAsVectorEmbeddings = async (
serverName: string,
tools: ToolInfo[],
tools: Tool[],
): Promise<void> => {
try {
if (tools.length === 0) {