Initial commit: ClawdDotNet
Import des bestehenden Projektstands in Git. - .NET 10 WinForms Anwendung (Multi-Agent / Tool-System) - .gitignore fuer Build-Artefakte, Secrets und Runtime-Daten ergaenzt Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
using System.ComponentModel;
|
||||
using ClawdDotNet.Core.Config;
|
||||
|
||||
namespace ClawdDotNet.Models;
|
||||
|
||||
/// <summary>
|
||||
/// PropertyGrid-freundlicher Wrapper um InstanceConfig.
|
||||
/// Änderungen werden direkt im zugrunde liegenden InstanceConfig-Objekt gespeichert.
|
||||
/// </summary>
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public sealed class InstanceSettingsViewModel
|
||||
{
|
||||
private readonly InstanceConfig _config;
|
||||
|
||||
public InstanceSettingsViewModel(InstanceConfig config)
|
||||
{
|
||||
_config = config;
|
||||
}
|
||||
|
||||
[Category("Instanz")]
|
||||
[DisplayName("Instanz-ID")]
|
||||
[Description("Eindeutige ID dieser laufenden Instanz.")]
|
||||
public string InstanceId
|
||||
{
|
||||
get => _config.InstanceId;
|
||||
set => _config.InstanceId = value;
|
||||
}
|
||||
|
||||
[Category("Instanz")]
|
||||
[DisplayName("Instanzname")]
|
||||
[Description("Anzeigename dieser Instanz (z.B. 'Aktien-Team').")]
|
||||
public string InstanceName
|
||||
{
|
||||
get => _config.InstanceName;
|
||||
set => _config.InstanceName = value;
|
||||
}
|
||||
|
||||
[Category("API")]
|
||||
[DisplayName("OpenRouter API-Key")]
|
||||
[Description("API-Schlüssel für OpenRouter. Wird für alle Agenten dieser Instanz verwendet.")]
|
||||
[PasswordPropertyText(true)]
|
||||
public string OpenRouterApiKey
|
||||
{
|
||||
get => _config.OpenRouterApiKey;
|
||||
set => _config.OpenRouterApiKey = value;
|
||||
}
|
||||
|
||||
[Category("Verzeichnisse")]
|
||||
[DisplayName("Arbeitsverzeichnis")]
|
||||
[Description("Basis-Arbeitsverzeichnis für diese Instanz.")]
|
||||
public string WorkingDirectory
|
||||
{
|
||||
get => _config.WorkingDirectory;
|
||||
set => _config.WorkingDirectory = value;
|
||||
}
|
||||
|
||||
[Category("Verzeichnisse")]
|
||||
[DisplayName("Log-Verzeichnis")]
|
||||
[Description("Verzeichnis für Log-Dateien dieser Instanz.")]
|
||||
public string LogDirectory
|
||||
{
|
||||
get => _config.LogDirectory;
|
||||
set => _config.LogDirectory = value;
|
||||
}
|
||||
|
||||
[Category("Netzwerk")]
|
||||
[DisplayName("Webserver-Port")]
|
||||
[Description("Port für den integrierten Webserver (0 = deaktiviert).")]
|
||||
public int WebServerPort
|
||||
{
|
||||
get => _config.WebServerPort;
|
||||
set => _config.WebServerPort = value;
|
||||
}
|
||||
|
||||
[Category("Agenten")]
|
||||
[DisplayName("Anzahl Agenten")]
|
||||
[Description("Anzahl der konfigurierten Agenten in dieser Instanz.")]
|
||||
[ReadOnly(true)]
|
||||
public int AgentCount => _config.Agents.Count;
|
||||
|
||||
[Browsable(false)]
|
||||
public InstanceConfig UnderlyingConfig => _config;
|
||||
|
||||
public override string ToString() => _config.InstanceName;
|
||||
}
|
||||
Reference in New Issue
Block a user