Files
AX-Copilot-Codex/src/AxCopilot/Services/Agent/AgentTabSettingsResolver.cs
lacvet 6b645ccbb7
Some checks failed
Release Gate / gate (push) Has been cancelled
AX Agent 레거시 plan 도구와 상태 배지 노출을 추가 정리
- code 탭에서 enter_plan_mode/exit_plan_mode 도구를 항상 비활성화해 레거시 설정값이 런타임을 흔들지 않도록 정리

- queue/재시도 대기만 남은 상태에서는 RuntimeActivityBadge와 상단 strip이 기본 노출되지 않게 조정

- idle Cowork/Code 헤더 소음을 줄이도록 ChatWindow 상태 표시 조건을 추가 보정

- README와 DEVELOPMENT 문서에 2026-04-05 20:48 (KST) 기준 변경 내역 반영

- 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ (경고 0 / 오류 0)
2026-04-05 17:55:01 +09:00

49 lines
1.4 KiB
C#

using AxCopilot.Models;
namespace AxCopilot.Services.Agent;
internal static class AgentTabSettingsResolver
{
public static bool IsCodeTab(string? activeTab)
=> string.Equals(activeTab, "Code", StringComparison.OrdinalIgnoreCase);
public static bool IsCoworkTab(string? activeTab)
=> string.Equals(activeTab, "Cowork", StringComparison.OrdinalIgnoreCase);
public static bool IsPostToolVerificationEnabled(string? activeTab, LlmSettings llm)
{
if (IsCodeTab(activeTab))
return llm.Code.EnableCodeVerification;
if (IsCoworkTab(activeTab))
return llm.EnableCoworkVerification;
return false;
}
public static IEnumerable<string> EnumerateCodeTabDisabledTools(CodeSettings code)
{
// Plan mode tools are legacy compatibility only and stay disabled
// regardless of any persisted value.
yield return "enter_plan_mode";
yield return "exit_plan_mode";
if (!code.EnableWorktreeTools)
{
yield return "enter_worktree";
yield return "exit_worktree";
}
if (!code.EnableTeamTools)
{
yield return "team_create";
yield return "team_delete";
}
if (!code.EnableCronTools)
{
yield return "cron_create";
yield return "cron_delete";
yield return "cron_list";
}
}
}