← All source files

V7 / 2a442462cf3f

Lilith.Subagents.cs

Lilith/Agent/Lilith.Subagents.cs

Unchanged from the preceding version
CS
using Lilith.Core.Scenarios;

namespace Lilith.Agent;

public partial class Lilith
{
    partial void RegisterScenarioCommands(global::Lilith.Core.Commands.ChatCommandRegistry commands) =>
        commands.Register("subagents", "List agents; show or hide their detailed output.", context => SubagentCommands.Execute(Client, context.Arguments));
    private bool _showSubagentOutput;
    public bool ShowSubagentOutput
    {
        get => _llmclient?.ShowSubagentOutput ?? _showSubagentOutput;
        set { _showSubagentOutput = value; if (_llmclient is not null) _llmclient.ShowSubagentOutput = value; }
    }
    public SubagentSnapshot Subagents => Client.Subagents.Snapshot();

    public string HandleSubagentCommand(string command) => SubagentCommands.Execute(Client, command.Trim()[Math.Min(command.Trim().Length, "/subagents".Length)..]);
}