Stufe 4c (#764): Kommentare in C#, WebUI-Skripten, CSS und HTML auf Englisch
Rund 2.600 Kommentarblöcke in 310 C#-Dateien übersetzt, Begründungen vollständig erhalten: blockweise gleiche Anzahl wie vorher, kein Block unter 60 % seiner Länge, der Code außerhalb der Kommentare per Tokenizer byte-identisch geprüft. Zitate deutscher Oberflächentexte und Testdaten bleiben deutsch. WebUI: Kommentare in JS/CSS/HTML übersetzt, JSDoc-@param an die in 4b umbenannten Parameter angeglichen. Dabei behoben: - 4b hatte "tag" (HTML-Tag) als deutsches "Tag" gelesen und zu "dayValue" gemacht (makeElement, svg, Tagesübersicht) - zurück auf tag/day. - Aufgaben "InProgress" bekamen die Plakettenart "laufend", für die es nie eine CSS-Klasse gab - jetzt "success" wie laufende Instanzen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
da4ceac7d5
commit
837a634a22
@@ -5,17 +5,17 @@ using ClawdDotNet.Core.Tools;
|
||||
namespace ClawdDotNet.Core.Tests.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Ein Tool, das einen anderen Agenten beauftragt — der Nachbau dessen, was
|
||||
/// <c>AgentComm.send_message</c> und <c>AgentSpawn.spawn_agent</c> tun.
|
||||
/// A tool that commissions another agent — the replica of what
|
||||
/// <c>AgentComm.send_message</c> and <c>AgentSpawn.spawn_agent</c> do.
|
||||
///
|
||||
/// <para>Der Nachbau ist nötig, weil beide Werkzeuge in eigenen Projekten liegen, die
|
||||
/// <c>ClawdDotNet.Core.Tests</c> nicht referenziert. Entscheidend ist ohnehin nur die
|
||||
/// eine Zeile, in der sie sich hier gleichen: Die Delegationskette des eigenen Laufs
|
||||
/// wird weitergereicht. Ein Tool, das sie unterschlägt, macht aus einem Zyklus eine
|
||||
/// neue Beauftragung — genau der Fall, den B8 beschreibt.</para>
|
||||
/// <para>The replica is necessary because both tools lie in projects of their own that
|
||||
/// <c>ClawdDotNet.Core.Tests</c> does not reference. All that matters anyway is the
|
||||
/// one line in which they are the same here: the delegation chain of the own run
|
||||
/// is passed on. A tool that suppresses it turns a cycle into a
|
||||
/// new commission — exactly the case B8 describes.</para>
|
||||
///
|
||||
/// <para>Wen ein Agent beauftragt, steht in <paramref name="routes"/>: agentId → Ziel.
|
||||
/// Wer dort nicht vorkommt, delegiert nicht und antwortet schlicht.</para>
|
||||
/// <para>Whom an agent commissions is in <paramref name="routes"/>: agentId → target.
|
||||
/// Whoever does not appear there does not delegate and simply answers.</para>
|
||||
/// </summary>
|
||||
internal sealed class DelegatingTool : IAgentTool
|
||||
{
|
||||
@@ -30,13 +30,13 @@ internal sealed class DelegatingTool : IAgentTool
|
||||
{ "type": "object", "properties": { "message": { "type": "string" } } }
|
||||
""").RootElement.Clone();
|
||||
|
||||
/// <summary>Was zurückkam — Aufrufer, Ziel und das Ergebnis der Weitergabe.</summary>
|
||||
/// <summary>What came back — caller, target and the result of the hand-off.</summary>
|
||||
public ConcurrentBag<(string From, string To, bool Delivered, string? Error)> Handoffs { get; } = new();
|
||||
|
||||
/// <param name="delayBeforeHandoff">
|
||||
/// Wartezeit, bevor weitergegeben wird. Der Fake-Client antwortet synchron; ohne
|
||||
/// diese Pause läuft ein Chat vollständig durch, bevor der nächste überhaupt
|
||||
/// beginnt, und zwei Ketten können sich nicht überschneiden.
|
||||
/// Waiting time before handing off. The fake client answers synchronously; without
|
||||
/// this pause a chat runs through completely before the next one even
|
||||
/// begins, and two chains cannot overlap.
|
||||
/// </param>
|
||||
public DelegatingTool(
|
||||
IReadOnlyDictionary<string, string> routes,
|
||||
@@ -74,8 +74,8 @@ internal sealed class DelegatingTool : IAgentTool
|
||||
|
||||
Handoffs.Add((context.AgentId, target, result.Delivered, result.Error));
|
||||
|
||||
// Wie das echte Tool: Eine Ablehnung ist kein Wurf, sondern ein Ergebnis, das
|
||||
// der Agent lesen und auf das er anders reagieren kann.
|
||||
// Like the real tool: a rejection is not a throw, but a result that
|
||||
// the agent can read and react to differently.
|
||||
return result.Delivered
|
||||
? ToolResult.Ok(result.Response ?? "")
|
||||
: ToolResult.Ok(JsonSerializer.Serialize(new { delivered = false, error = result.Error }));
|
||||
|
||||
Reference in New Issue
Block a user