Resolve the remaining unused-symbol warnings

This commit is contained in:
Thorsten Sommer 2026-09-06 14:20:53 +02:00
parent fb8e37aaf3
commit 2c212f75f6
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 16 additions and 1 deletions

View File

@ -679,7 +679,7 @@ public sealed partial class DataSourceEmbeddingService
if (matches.Count == 0)
return [text];
return matches.Cast<Match>().Select(match => match.Value).ToList();
return matches.Select(match => match.Value).ToList();
}
private static List<(int Start, int End, string Text)> ReadLines(string text)

View File

@ -23,6 +23,13 @@ public sealed class DataSourceLocalRetrievalService(
BM25,
}
//
// A hit keeps the complete shape both retrieval channels deliver, even where nothing reads a
// value yet. Merging is deterministic on purpose for now, so Channel, Score and Rank have no
// consumer until reranking arrives. Naming them still beats handing an unlabelled tuple of
// strings and numbers through the service.
//
// ReSharper disable NotAccessedPositionalProperty.Local
private sealed record LocalRetrievalHit(
RetrievalChannel Channel,
string ChunkId,
@ -41,6 +48,7 @@ public sealed class DataSourceLocalRetrievalService(
int Rank,
string ConfidenceLevel,
int ConfidenceLevelRank);
// ReSharper restore NotAccessedPositionalProperty.Local
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(DataSourceLocalFile dataSource, IContent lastUserPrompt, ChatThread thread, CancellationToken token = default) =>
this.RetrieveDataAsync(dataSource, lastUserPrompt, token);

View File

@ -9,6 +9,13 @@ namespace AIStudio.Tools.Services;
public sealed class DataSourceService
{
//
// Trust is recorded for every participating provider, while only the chat provider's trust
// decides about external data sources below. The agent which validates retrieval contexts
// checks its own provider before it runs, so nothing slips through today. Keeping the value
// named here is what makes that asymmetry visible.
//
// ReSharper disable once NotAccessedPositionalProperty.Local
private readonly record struct ParticipatingProvider(string Role, bool IsTrusted, ConfidenceLevel ConfidenceLevel);
private readonly RustService rustService;