refactor: modernize code, improve performance, and clean up various components.
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Toak.Core.Skills;
|
||||
|
||||
public class DynamicSkill : ISkill
|
||||
public class DynamicSkill(SkillDefinition def) : ISkill
|
||||
{
|
||||
private readonly SkillDefinition _def;
|
||||
private readonly SkillDefinition _def = def;
|
||||
|
||||
public string Name => _def.Name;
|
||||
public string Description => _def.Description;
|
||||
@@ -13,11 +12,6 @@ public class DynamicSkill : ISkill
|
||||
|
||||
public bool HandlesExecution => _def.Action.ToLowerInvariant() == "script";
|
||||
|
||||
public DynamicSkill(SkillDefinition def)
|
||||
{
|
||||
_def = def;
|
||||
}
|
||||
|
||||
public string GetSystemPrompt(string rawTranscript)
|
||||
{
|
||||
return _def.SystemPrompt.Replace("{transcript}", rawTranscript);
|
||||
|
||||
Reference in New Issue
Block a user