fix(nx/docker): LLM prompts not accessible

This commit is contained in:
Elian Doran 2025-04-25 16:28:36 +03:00
parent 69f854034f
commit 8f26d4cf63
No known key found for this signature in database
5 changed files with 2 additions and 5 deletions

View File

@ -9,15 +9,12 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { RESOURCE_DIR } from '../../resource_dir';
// Load system prompt from markdown file
const loadSystemPrompt = (): string => {
try {
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const promptPath = path.join(__dirname, '../prompts/base_system_prompt.md');
const promptPath = path.join(RESOURCE_DIR, "llm", "prompts", "base_system_prompt.md");
const promptContent = fs.readFileSync(promptPath, 'utf8');
// Strip the markdown title if needed
return promptContent.replace(/^# TriliumNext Base System Prompt\n+/, '');