minor change

This commit is contained in:
Jicheng Lu 2024-11-21 19:37:56 -06:00
parent 8d207cbe7a
commit 54088fcc8b
2 changed files with 8 additions and 4 deletions

View file

@ -243,12 +243,16 @@ public class RoutingContext : IRoutingContext
public Stack<string> GetAgentStack()
{
return new Stack<string>(_stack);
var copy = _stack.ToList();
copy.Reverse();
return new Stack<string>(copy);
}
public void SetAgentStack(Stack<string> stack)
{
_stack = new Stack<string>(stack);
var copy = stack.ToList();
copy.Reverse();
_stack = new Stack<string>(copy);
}
public void ResetAgentStack()

View file

@ -25,8 +25,8 @@ public class SqlUtilityHook : IAgentUtilityHook
new AgentUtility
{
Name = UtilityName.SqlExecutor,
Functions = new List<UtilityFunction> { new(SQL_SELECT_FN), new(SQL_TABLE_DEFINITION_FN) },
Templates = new List<UtilityTemplate> { new($"sql_executor.fn") }
Functions = [new(SQL_SELECT_FN), new(SQL_TABLE_DEFINITION_FN)],
Templates = [new($"sql_executor.fn")]
}
};