Build decision flow editor and runtime integration

This commit is contained in:
Remi
2025-09-20 18:33:32 +02:00
parent 137bc84276
commit 526f74c3b1
4 changed files with 668 additions and 115 deletions

View File

@@ -955,6 +955,8 @@ const {
currentStep,
initializeFlight,
updateFrequencyVariables,
fetchRuntimeTree,
isReady: engineReady,
processPilotTransmission,
buildLLMContext,
applyLLMDecision,
@@ -1069,6 +1071,14 @@ onMounted(async () => {
})
}
try {
await fetchRuntimeTree()
} catch (err) {
console.error('Failed to load decision tree runtime', err)
error.value = 'Decision engine konnte nicht initialisiert werden.'
return
}
if (typeof window !== 'undefined') {
const storedVatsimId = window.localStorage.getItem(STORAGE_KEYS.vatsimId)
if (storedVatsimId) {
@@ -1606,6 +1616,17 @@ const loadFlightPlans = async () => {
}
const startMonitoring = async (flightPlan: any) => {
try {
if (!engineReady.value) {
await fetchRuntimeTree()
}
} catch (err) {
console.error('Failed to prepare decision engine', err)
error.value = 'Entscheidungsbaum konnte nicht geladen werden.'
return
}
error.value = ''
selectedPlan.value = flightPlan
initializeFlight(flightPlan)
currentScreen.value = 'monitor'