refactor: extract LLM system prompt from profile-content to dedicated module
Move the ~110-line LLM system prompt to src/data/llm-prompt.ts, removing the LLMCopy type, getLLMCopy() accessor, and llm field from ProfileContent. llm.ts now imports the prompt directly. profile-content.ts drops from 246 to 133 lines, retaining only UI copy and search metadata.
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { getLLMCopy } from '@/lib/profile-content'
|
||||
import { LLM_SYSTEM_PROMPT } from '@/data/llm-prompt'
|
||||
|
||||
export interface ChatMessage {
|
||||
role: 'user' | 'assistant'
|
||||
@@ -19,7 +19,7 @@ export function isLLMAvailable(): boolean {
|
||||
}
|
||||
|
||||
export function buildSystemPrompt(): string {
|
||||
return getLLMCopy().systemPrompt
|
||||
return LLM_SYSTEM_PROMPT
|
||||
}
|
||||
|
||||
function buildRequestBody(
|
||||
|
||||
@@ -5,7 +5,6 @@ import type {
|
||||
EducationCopyEntry,
|
||||
ExperienceEducationUICopy,
|
||||
LatestResultsCopy,
|
||||
LLMCopy,
|
||||
ProfileContent,
|
||||
QuickActionCopyEntry,
|
||||
SidebarCopy,
|
||||
@@ -52,7 +51,4 @@ export function getEducationEntries(): ReadonlyArray<EducationCopyEntry> {
|
||||
return profileContent.experienceEducation.educationEntries
|
||||
}
|
||||
|
||||
export function getLLMCopy(): DeepReadonly<LLMCopy> {
|
||||
return profileContent.searchChat.llm
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user