feat(worker): TicketSystemConfig + ticket_api_base_url in worker.config.json
This commit is contained in:
@@ -57,6 +57,10 @@ public sealed class WorkerConfig
|
||||
[JsonPropertyName("usage_poll_interval_idle_seconds")]
|
||||
public int UsagePollIntervalIdleSeconds { get; set; } = 900;
|
||||
|
||||
/// <summary>Base URL of the Bandel ticket-system API. Null = ticket integration off entirely.</summary>
|
||||
[JsonPropertyName("ticket_api_base_url")]
|
||||
public string? TicketApiBaseUrl { get; set; }
|
||||
|
||||
public static string DefaultConfigPath =>
|
||||
Path.Combine(Paths.AppDataRoot(), "worker.config.json");
|
||||
|
||||
@@ -103,6 +107,11 @@ public sealed class WorkerConfig
|
||||
public void SaveClaudeBin(string? path = null)
|
||||
=> SaveKey("claude_bin", JsonValue.Create(ClaudeBin), path);
|
||||
|
||||
/// <summary>Persistiert NUR <c>ticket_api_base_url</c>, gleiches read-modify-write wie
|
||||
/// <see cref="SaveClaudeBin"/> — jedes andere Feld der Datei bleibt unangetastet.</summary>
|
||||
public void SaveTicketApiBaseUrl(string? path = null)
|
||||
=> SaveKey("ticket_api_base_url", JsonValue.Create(TicketApiBaseUrl), path);
|
||||
|
||||
private static void SaveKey(string key, JsonNode? value, string? path)
|
||||
{
|
||||
path ??= DefaultConfigPath;
|
||||
|
||||
Reference in New Issue
Block a user