fix: VLM-Bildanalyse Bugfixes (Prompt, UI, Logging)
- Fix 1: Claude-Prompt weist generische Natur-Objekte ab (forest, mountain etc.) Objects-Array nur fuer OSINT-relevante Infrastruktur, Rest in terrain/landscape_clues - Fix 2: Freundliche UI-Meldungen bei leeren Objects, 0 Treffern, gefilterten Tags Button ausgegraut + Hinweis wenn keine Infrastruktur erkannt - Fix 3: generate_queries gibt JSON statt HTTP 400 bei leeren Fragments - Fix 4: Verbose Objekt-Match-Logging auf debug reduziert - Fix 5: Verwaiste static/js/ui/overpass.js geloescht Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -62,6 +62,7 @@ const VlmUI = {
|
||||
'</label>' +
|
||||
'<button class="overpass-exec-btn" id="vlm-search-btn" onclick="VlmUI._confirmAndSearch()" style="margin-top:8px">AUF GLOBE SUCHEN</button>' +
|
||||
'<div id="vlm-search-result" style="margin-top:8px;font-size:11px;color:var(--text-dim);display:none"></div>' +
|
||||
'<div id="vlm-no-infra" style="display:none;font-size:11px;margin-top:6px;padding:8px;border-radius:4px;background:rgba(255,152,0,0.1);border:1px solid rgba(255,152,0,0.3);color:#ff9800">Keine OSINT-relevante Infrastruktur erkannt. Standortschaetzung und Landschaftsmerkmale sind weiterhin verfuegbar.</div>' +
|
||||
'</div>' +
|
||||
// Reset
|
||||
'<button id="vlm-reset-btn" onclick="VlmUI._reset()" ' +
|
||||
@@ -180,6 +181,17 @@ const VlmUI = {
|
||||
})
|
||||
.then(function(data) {
|
||||
self._currentAnalysis = data;
|
||||
|
||||
// Fix 2c: Bei leeren objects Button disablen
|
||||
var noInfraEl = document.getElementById('vlm-no-infra');
|
||||
var searchBtn = document.getElementById('vlm-search-btn');
|
||||
if (!data.objects || data.objects.length === 0) {
|
||||
if (searchBtn) { searchBtn.disabled = true; searchBtn.style.opacity = '0.4'; }
|
||||
if (noInfraEl) noInfraEl.style.display = 'block';
|
||||
} else {
|
||||
if (searchBtn) { searchBtn.disabled = false; searchBtn.style.opacity = '1'; }
|
||||
if (noInfraEl) noInfraEl.style.display = 'none';
|
||||
}
|
||||
self._showResults(data);
|
||||
})
|
||||
.catch(function(e) {
|
||||
@@ -441,6 +453,17 @@ const VlmUI = {
|
||||
return r.json();
|
||||
})
|
||||
.then(function(data) {
|
||||
// Fix 2a: Backend meldet keine passenden Tags
|
||||
if (data.no_infrastructure) {
|
||||
if (searchResult) {
|
||||
var prefix = hasExifGps ? 'EXIF GPS-Marker gesetzt | ' : '';
|
||||
searchResult.style.display = 'block';
|
||||
searchResult.textContent = prefix + 'Keine passenden OSM-Tags fuer die erkannten Objekte. Die Objekte sind zu generisch fuer eine Overpass-Suche.';
|
||||
searchResult.style.color = '#ff9800';
|
||||
}
|
||||
if (btn) { btn.disabled = false; btn.textContent = 'AUF GLOBE SUCHEN'; }
|
||||
return;
|
||||
}
|
||||
var src = hasExifGps ? 'EXIF BBox' : (data.region ? 'Region: ' + data.region : 'weltweit');
|
||||
if (searchResult) searchResult.textContent = statusParts.join(' | ') + (statusParts.length ? ' | ' : '') + 'Query generiert (' + data.tag_count + ' Tags, ' + src + '). Suche OSM-Daten...';
|
||||
|
||||
@@ -487,6 +510,11 @@ const VlmUI = {
|
||||
}
|
||||
var countEl = document.getElementById('count-vlm');
|
||||
if (countEl) countEl.textContent = data.total;
|
||||
// Fix 2b: 0 Treffer erklaerend melden
|
||||
if (data.total === 0 && searchResult) {
|
||||
searchResult.textContent = (hasExifGps ? 'EXIF GPS-Marker gesetzt | ' : '') + 'Keine passenden Orte in OSM gefunden. Region moeglicherweise zu ungenau oder Objekte nicht in OpenStreetMap erfasst.';
|
||||
searchResult.style.color = '#ff9800';
|
||||
}
|
||||
})
|
||||
.catch(function(e) {
|
||||
if (searchResult) {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren