Added opt-in sharing of feature usage with self-hosted servers (#1020)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Dominic NeuburgandThorsten Sommer authored and GitHub committed 2026-10-04 14:44:16 +02:00
1 parent 90c90910b3
commit 50aa11a34c
27 files changed
+531 -12

No files matched your search

+11 -1
View File
@@ -37,6 +37,15 @@ public abstract class AgentBase(ILogger<AgentBase> logger, SettingsManager setti
/// </summary>
protected abstract Type Type { get; }
/// <summary>
/// The component this agent runs as.
/// </summary>
/// <remarks>
/// Its requests name it, e.g., in the User-Agent for self-hosted servers. Without it, an agent
/// working for an assistant would be counted as chat.
/// </remarks>
protected abstract Tools.Components Component { get; }
/// <summary>
/// The name of the agent.
/// </summary>
@@ -75,9 +84,10 @@ public abstract class AgentBase(ILogger<AgentBase> logger, SettingsManager setti
Name = string.Empty,
SystemPrompt = systemPrompt,
Blocks = [],
RuntimeComponent = this.Component,
};
protected UserRequest AddUserRequest(ChatThread thread, string request)
protected static UserRequest AddUserRequest(ChatThread thread, string request)
{
var time = DateTimeOffset.Now;
var lastUserPrompt = new ContentText
@@ -18,6 +18,9 @@ public sealed class AgentDataSourceSelection (ILogger<AgentDataSourceSelection>
/// <inheritdoc />
protected override Type Type => Type.SYSTEM;
/// <inheritdoc />
protected override Tools.Components Component => Tools.Components.AGENT_DATA_SOURCE_SELECTION;
/// <inheritdoc />
public override string Id => "Data Source Selection";
@@ -110,7 +113,7 @@ public sealed class AgentDataSourceSelection (ILogger<AgentDataSourceSelection>
return EMPTY_BLOCK;
var thread = this.CreateChatThread(this.SystemPrompt(availableDataSources));
var userRequest = this.AddUserRequest(thread, text.Text);
var userRequest = AddUserRequest(thread, text.Text);
await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time);
var answer = thread.Blocks[^1];
@@ -16,6 +16,9 @@ public sealed class AgentRetrievalContextValidation (ILogger<AgentRetrievalConte
/// <inheritdoc />
protected override Type Type => Type.WORKER;
/// <inheritdoc />
protected override Tools.Components Component => Tools.Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION;
/// <inheritdoc />
public override string Id => "Retrieval Context Validation";
@@ -97,7 +100,7 @@ public sealed class AgentRetrievalContextValidation (ILogger<AgentRetrievalConte
return EMPTY_BLOCK;
var thread = this.CreateChatThread(this.SystemPrompt(retrievalContext));
var userRequest = this.AddUserRequest(thread, text.Text);
var userRequest = AddUserRequest(thread, text.Text);
await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time);
return thread.Blocks[^1];
@@ -15,6 +15,8 @@ public sealed class AgentTextContentCleaner(ILogger<AgentBase> logger, SettingsM
protected override Type Type => Type.SYSTEM;
protected override Tools.Components Component => Tools.Components.AGENT_TEXT_CONTENT_CLEANER;
public override string Id => "Text Content Cleaner";
protected override string JobDescription =>
@@ -65,7 +67,7 @@ public sealed class AgentTextContentCleaner(ILogger<AgentBase> logger, SettingsM
return EMPTY_BLOCK;
var thread = this.CreateChatThread(this.SystemPrompt(sourceURL));
var userRequest = this.AddUserRequest(thread, text.Text);
var userRequest = AddUserRequest(thread, text.Text);
await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time);
var answer = thread.Blocks[^1];
@@ -20,6 +20,8 @@ public sealed class AssistantAuditAgent(ILogger<AssistantAuditAgent> logger, ILo
protected override Type Type => Type.SYSTEM;
protected override Tools.Components Component => Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT;
public override string Id => "Assistant Plugin Security Audit";
protected override string JobDescription =>
@@ -109,7 +111,7 @@ public sealed class AssistantAuditAgent(ILogger<AssistantAuditAgent> logger, ILo
return EMPTY_BLOCK;
var thread = this.CreateChatThread(this.SystemPrompt(string.Empty));
var userRequest = this.AddUserRequest(thread, text.Text);
var userRequest = AddUserRequest(thread, text.Text);
await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time);
return thread.Blocks[^1];
}