탭별 설정 해석기를 도입해 Cowork/Code 분기 동작을 단일화
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
- AgentTabSettingsResolver 신규 추가: 탭 판별, post-tool 검증 활성 여부, Code 전용 비활성 도구 목록 계산 - AgentLoopService.MergeDisabledTools에서 Code 전용 도구 비활성 계산을 resolver 경로로 전환 - AgentLoopTransitions.Execution에서 post-tool verification 판단 시 resolver 결과를 사용하도록 정리 - AgentTabSettingsResolverTests 신규 추가(탭 판별/검증 플래그 분기/비활성 도구 계산) - README.md 업데이트 시각(2026-04-04 13:32 KST) 및 변경 이력 항목 갱신 - docs/DEVELOPMENT.md 연속 실행 28차 이력 추가 - 검증: dotnet build(use shared compilation off) 경고 0/오류 0, 필터 테스트 49건 통과
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using AxCopilot.Models;
|
||||
using AxCopilot.Services.Agent;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
|
||||
namespace AxCopilot.Tests.Services;
|
||||
|
||||
public class AgentTabSettingsResolverTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("Code", true, false)]
|
||||
[InlineData("Cowork", false, true)]
|
||||
[InlineData("Chat", false, false)]
|
||||
[InlineData(null, false, false)]
|
||||
public void TabDetection_ShouldMatchExpected(string? tab, bool isCode, bool isCowork)
|
||||
{
|
||||
AgentTabSettingsResolver.IsCodeTab(tab).Should().Be(isCode);
|
||||
AgentTabSettingsResolver.IsCoworkTab(tab).Should().Be(isCowork);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IsPostToolVerificationEnabled_ShouldUseTabSpecificFlags()
|
||||
{
|
||||
var llm = new LlmSettings
|
||||
{
|
||||
EnableCoworkVerification = true,
|
||||
Code = new CodeSettings
|
||||
{
|
||||
EnableCodeVerification = false,
|
||||
}
|
||||
};
|
||||
|
||||
AgentTabSettingsResolver.IsPostToolVerificationEnabled("Cowork", llm).Should().BeTrue();
|
||||
AgentTabSettingsResolver.IsPostToolVerificationEnabled("Code", llm).Should().BeFalse();
|
||||
AgentTabSettingsResolver.IsPostToolVerificationEnabled("Chat", llm).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EnumerateCodeTabDisabledTools_ShouldReflectCodeSettings()
|
||||
{
|
||||
var code = new CodeSettings
|
||||
{
|
||||
EnablePlanModeTools = false,
|
||||
EnableWorktreeTools = true,
|
||||
EnableTeamTools = false,
|
||||
EnableCronTools = false,
|
||||
};
|
||||
|
||||
var disabled = AgentTabSettingsResolver.EnumerateCodeTabDisabledTools(code).ToList();
|
||||
|
||||
disabled.Should().Contain(["enter_plan_mode", "exit_plan_mode"]);
|
||||
disabled.Should().Contain(["team_create", "team_delete"]);
|
||||
disabled.Should().Contain(["cron_create", "cron_delete", "cron_list"]);
|
||||
disabled.Should().NotContain(["enter_worktree", "exit_worktree"]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user