data model overhaul
This commit is contained in:
@@ -97,8 +97,19 @@ function createSystemPrompt(toolsData: any): string {
|
||||
projectUrl: tool.projectUrl ? 'self-hosted' : 'external'
|
||||
}));
|
||||
|
||||
// Dynamically build phases list from configuration
|
||||
const phasesDescription = toolsData.phases.map((phase: any) =>
|
||||
// Get regular phases (no more filtering needed)
|
||||
const regularPhases = toolsData.phases || [];
|
||||
|
||||
// Get domain-agnostic software phases
|
||||
const domainAgnosticSoftware = toolsData['domain-agnostic-software'] || [];
|
||||
|
||||
// Combine all phases for the description
|
||||
const allPhaseItems = [
|
||||
...regularPhases,
|
||||
...domainAgnosticSoftware
|
||||
];
|
||||
|
||||
const phasesDescription = allPhaseItems.map((phase: any) =>
|
||||
`- ${phase.id}: ${phase.name}`
|
||||
).join('\n');
|
||||
|
||||
@@ -107,10 +118,28 @@ function createSystemPrompt(toolsData: any): string {
|
||||
`- ${domain.id}: ${domain.name}`
|
||||
).join('\n');
|
||||
|
||||
const phaseDescriptions = toolsData.phases
|
||||
.filter((phase: any) => phase.id !== 'collaboration-general')
|
||||
.map((phase: any) => `- ${phase.name}: ${phase.description || 'Tools for this phase'}`)
|
||||
.join('\n');
|
||||
// Build dynamic phase descriptions for tool selection
|
||||
const phaseDescriptions = regularPhases.map((phase: any) => {
|
||||
// Create generic descriptions or you could add a 'description' field to the YAML
|
||||
const descriptions = {
|
||||
'data-collection': 'Imaging, Acquisition, Remote Collection Tools',
|
||||
'examination': 'Parsing, Extraction, Initial Analysis Tools',
|
||||
'analysis': 'Deep Analysis, Correlation, Visualization Tools',
|
||||
'reporting': 'Documentation, Visualization, Presentation Tools (z.B. QGIS für Geodaten, Timeline-Tools)'
|
||||
};
|
||||
return `- ${phase.name}: ${phase.description || descriptions[phase.id] || 'Tools for this phase'}`;
|
||||
}).join('\n');
|
||||
|
||||
// Add domain-agnostic software descriptions
|
||||
const domainAgnosticDescriptions = domainAgnosticSoftware.map((section: any) =>
|
||||
`- ${section.name}: ${section.description || 'Cross-cutting tools and platforms'}`
|
||||
).join('\n');
|
||||
|
||||
// Create valid phase values for JSON schema
|
||||
const validPhases = [
|
||||
...regularPhases.map((p: any) => p.id),
|
||||
...domainAgnosticSoftware.map((s: any) => s.id)
|
||||
].join('|');
|
||||
|
||||
return `Du bist ein DFIR (Digital Forensics and Incident Response) Experte, der Ermittlern bei der Toolauswahl hilft.
|
||||
|
||||
@@ -135,6 +164,9 @@ WICHTIGE REGELN:
|
||||
TOOL-AUSWAHL NACH PHASE:
|
||||
${phaseDescriptions}
|
||||
|
||||
DOMAIN-AGNOSTIC SOFTWARE:
|
||||
${domainAgnosticDescriptions}
|
||||
|
||||
ANTWORT-FORMAT (strict JSON):
|
||||
{
|
||||
"scenario_analysis": "Detaillierte Analyse des Szenarios auf Deutsch/English",
|
||||
@@ -142,7 +174,7 @@ ANTWORT-FORMAT (strict JSON):
|
||||
{
|
||||
"name": "EXAKTER Name aus der Database",
|
||||
"priority": "high|medium|low",
|
||||
"phase": "${toolsData.phases.filter((p: any) => p.id !== 'collaboration-general').map((p: any) => p.id).join('|')}",
|
||||
"phase": "${validPhases}",
|
||||
"justification": "Warum dieses Tool für diese Phase und Szenario geeignet ist"
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user