Show the local RAG index on the information page

This commit is contained in:
Thorsten Sommer committed 2026-09-17 11:00:01 +02:00
1 parent 1e712f5f83
commit bcc1a3b5eb
5 files changed
+224 -54

No files matched your search

@@ -69,6 +69,25 @@ public sealed class DatabaseClientProvider(RustService rustService, ILoggerFacto
client.Status);
}
/// <summary>
/// Builds the client which stands in for a database role that cannot serve right now.
/// </summary>
/// <remarks>
/// Callers outside this namespace get their stand-in from here instead of naming the concrete
/// type themselves, so a new role does not have to be spelled out in every one of them.
/// </remarks>
/// <param name="databaseRole">The role the stand-in has to fill.</param>
/// <param name="name">The name to show for the database.</param>
/// <param name="reason">Why the database is not available.</param>
/// <param name="status">Whether the database is starting or unavailable.</param>
/// <returns>A client which answers every operation without a database behind it.</returns>
public static DatabaseClient CreateUnavailableClient(DatabaseRole databaseRole, string name, string? reason, DatabaseClientStatus status) => databaseRole switch
{
DatabaseRole.VECTOR_STORE => new NoVectorStoreClient(name, reason, status),
DatabaseRole.INDEX_STORE => new NoIndexStoreClient(name, reason, status),
_ => new NoDatabaseClient(name, reason, status)
};
private DatabaseClient CacheIfAvailable(DatabaseRole databaseRole, DatabaseClient client)
{
if (!client.IsAvailable)
@@ -1,5 +1,3 @@
using System.Globalization;
using AIStudio.Tools.Databases.IndexStore;
using AIStudio.Tools.PluginSystem;
using AIStudio.Tools.Rust;