i18n: Englisch als Hauptsprache, Sprachpakete fuer Desktop und WebUI (#661)
Umbau durch Gemini Flash, Durchsicht und Nacharbeit durch Claude. Umfang: - Desktop: LocalizationManager (JSON-Pakete, Rueckfall auf Englisch, Umschalten zur Laufzeit), Localize-Markup-Erweiterung, Sprachwahl in den Einstellungen (AppSettings.Language, Vorgabe "en"); 317 Schluessel je Sprache - WebUI: alle Ansichten auf t()/data-i18n, 656 Schluessel je Sprache - Agenten-Werkzeuge: Beschreibungen, Schemata und Meldungen auf Englisch - Tests an die englischen Meldungen angepasst, keine Pruefung abgeschwaecht Nacharbeit bei der Durchsicht: - ~25 Kommentarbloecke mit Begruendungen waren ersatzlos entfallen, darunter sicherheitsrelevante (NTFS-Datenstrom beim shared:-Praefix, Bremse gegen Agentenschleifen, doppelter POST beim Anlegen einer Instanz). Wieder eingesetzt: auf Englisch, wo die Datei umgestellt ist, sonst im Wortlaut. - Drei WebUI-Schluessel fehlten (logs.paused, instances.instanceOfflineError, instances.noInstanceActiveError). Weil t() bei fehlendem Schluessel den Schluessel selbst liefert, griff der "|| err.message"-Rueckfall nie — die Oberflaeche haette den Schluesselnamen angezeigt. Geprueft: Schluesselgleichheit en/de, Platzhalter je Schluessel, jeder im Code benutzte Schluessel vorhanden, node --check fuer alle Module, 1.220 Tests gruen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
69718122f3
commit
ad71682c2d
@@ -9,9 +9,9 @@ public sealed class AgentSpawnTool : IAgentTool
|
||||
public string Name => "AgentSpawn";
|
||||
|
||||
public string Description =>
|
||||
"Ermöglicht es, andere Agenten zu starten und ihnen eine Aufgabe zuzuweisen. " +
|
||||
"Der Zielagent wird als eigenständiger Run gestartet und führt die Aufgabe unabhängig aus. " +
|
||||
"Verwende dies, um Aufgaben an spezialisierte Agenten zu delegieren.";
|
||||
"Allows launching other agents and assigning them a task. " +
|
||||
"The target agent runs independently to complete the task. " +
|
||||
"Use this to delegate tasks to specialized agents.";
|
||||
|
||||
public JsonElement InputSchema { get; } = JsonDocument.Parse("""
|
||||
{
|
||||
@@ -20,15 +20,15 @@ public sealed class AgentSpawnTool : IAgentTool
|
||||
"action": {
|
||||
"type": "string",
|
||||
"enum": ["list_agents", "spawn_agent"],
|
||||
"description": "Die auszuführende Aktion: 'list_agents' listet alle verfügbaren Agenten auf, 'spawn_agent' startet einen Agenten mit einer Aufgabe."
|
||||
"description": "The action to perform: 'list_agents' lists all available agents, 'spawn_agent' launches an agent with a task."
|
||||
},
|
||||
"targetAgentId": {
|
||||
"type": "string",
|
||||
"description": "Die ID des Ziel-Agenten (nur für spawn_agent erforderlich)"
|
||||
"description": "The ID of the target agent (required for spawn_agent)"
|
||||
},
|
||||
"taskMessage": {
|
||||
"type": "string",
|
||||
"description": "Die Aufgabe/Anweisung für den Ziel-Agenten (nur für spawn_agent erforderlich)"
|
||||
"description": "The task/instruction for the target agent (required for spawn_agent)"
|
||||
}
|
||||
},
|
||||
"required": ["action"]
|
||||
@@ -42,7 +42,7 @@ public sealed class AgentSpawnTool : IAgentTool
|
||||
? actionEl.GetString() : null;
|
||||
|
||||
if (context.MessageRouter is null)
|
||||
return ToolResult.Fail("AgentSpawn ist nicht verfügbar: Kein MessageRouter konfiguriert.");
|
||||
return ToolResult.Fail("AgentSpawn is not available: No MessageRouter configured.");
|
||||
|
||||
switch (action)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ public sealed class AgentSpawnTool : IAgentTool
|
||||
return await SpawnAgent(input, context, ct);
|
||||
|
||||
default:
|
||||
return ToolResult.Fail($"Unbekannte Aktion: '{action}'. Verwende 'list_agents' oder 'spawn_agent'.");
|
||||
return ToolResult.Fail($"Unknown action: '{action}'. Use 'list_agents' or 'spawn_agent'.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public sealed class AgentSpawnTool : IAgentTool
|
||||
if (agents.Count == 0)
|
||||
return ToolResult.Ok(JsonSerializer.Serialize(new
|
||||
{
|
||||
info = "Keine anderen Agenten in dieser Instanz gefunden.",
|
||||
info = "No other agents found in this instance.",
|
||||
agents = Array.Empty<object>()
|
||||
}));
|
||||
|
||||
@@ -87,13 +87,13 @@ public sealed class AgentSpawnTool : IAgentTool
|
||||
var taskMessage = input.TryGetProperty("taskMessage", out var msg) ? msg.GetString() : null;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(targetId))
|
||||
return ToolResult.Fail("'targetAgentId' ist erforderlich für spawn_agent.");
|
||||
return ToolResult.Fail("'targetAgentId' is required for spawn_agent.");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(taskMessage))
|
||||
return ToolResult.Fail("'taskMessage' ist erforderlich für spawn_agent.");
|
||||
return ToolResult.Fail("'taskMessage' is required for spawn_agent.");
|
||||
|
||||
if (targetId == context.AgentId)
|
||||
return ToolResult.Fail("Du kannst dich nicht selbst spawnen.");
|
||||
return ToolResult.Fail("You cannot spawn yourself.");
|
||||
|
||||
context.Logger.LogInformation(
|
||||
"Agent {From} spawnt Agent {To} mit Aufgabe: {Task}",
|
||||
@@ -115,6 +115,6 @@ public sealed class AgentSpawnTool : IAgentTool
|
||||
}));
|
||||
}
|
||||
|
||||
return ToolResult.Fail($"Agent konnte nicht gestartet werden: {result.Error}");
|
||||
return ToolResult.Fail($"Agent could not be started: {result.Error}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user