feat: embedding model warning modal on frontend load
- InfoEndpoint: EmbeddingService injiziert, embeddingAvailable in /api/info Response - title.js: _showEmbeddingWarning() Modal via _createModal() wenn Modell fehlt - base.css: ol margin-left wie ul (geordnete Listen)
This commit is contained in:
1 parent
f941eae00a
commit
a646e695cd
3 files changed
+21
-3
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Gott.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
@@ -14,7 +15,7 @@ public static class InfoEndpoint
|
||||
app.MapGet("/api/info", HandleInfo);
|
||||
}
|
||||
|
||||
private static IResult HandleInfo()
|
||||
private static IResult HandleInfo(EmbeddingService embeddingService)
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var location = assembly.Location;
|
||||
@@ -39,6 +40,7 @@ public static class InfoEndpoint
|
||||
}
|
||||
|
||||
var isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
|
||||
return Results.Json(new { buildTime, isWindows });
|
||||
var embeddingAvailable = embeddingService.IsAvailable;
|
||||
return Results.Json(new { buildTime, isWindows, embeddingAvailable });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user