권한 순환/슬래시 스크롤 체감 보강: claw-code 기준 코어 모드 정렬
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
- ChatWindow.NextPermission 순환을 Deny->Default->AcceptEdits->Plan->BypassPermissions->Deny로 정렬하고 DontAsk는 기본 순환에서 제외\n- AgentSettingsWindow 권한 모드 버튼 순환도 동일 코어 순환으로 맞춰 인라인/설정 체계를 일관화\n- SlashPopup_ScrollByDelta 개선: ScrollViewer 오프셋 이동 + 뷰포트 상단 기준 선택 동기화로 휠 스크롤 체감 개선\n- ChatWindowSlashPolicyTests에 NextPermission 순환 회귀 테스트 추가(Bypass/DontAsk 포함)\n- README.md, docs/DEVELOPMENT.md에 2026-04-04 17:27(KST) 이력 및 검증 결과 기록\n- 검증: dotnet build 경고0/오류0, dotnet test 필터 65 passed
This commit is contained in:
@@ -1,11 +1,28 @@
|
||||
using AxCopilot.Views;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
using System.Reflection;
|
||||
|
||||
namespace AxCopilot.Tests.Views;
|
||||
|
||||
public class ChatWindowSlashPolicyTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("Deny", "Default")]
|
||||
[InlineData("Default", "AcceptEdits")]
|
||||
[InlineData("AcceptEdits", "Plan")]
|
||||
[InlineData("Plan", "BypassPermissions")]
|
||||
[InlineData("BypassPermissions", "Deny")]
|
||||
[InlineData("DontAsk", "Deny")]
|
||||
public void NextPermission_ShouldCycleCoreModesAndReturnToDeny(string current, string expected)
|
||||
{
|
||||
var method = typeof(ChatWindow).GetMethod("NextPermission", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
method.Should().NotBeNull();
|
||||
|
||||
var result = method!.Invoke(null, new object[] { current }) as string;
|
||||
result.Should().Be(expected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildVerifySystemPrompt_ShouldContainStructuredSections()
|
||||
{
|
||||
@@ -40,9 +57,12 @@ public class ChatWindowSlashPolicyTests
|
||||
[InlineData("model", "model", "")]
|
||||
[InlineData("ask", "ask", "")]
|
||||
[InlineData("reconnect all", "reconnect", "all")]
|
||||
[InlineData("/compact", "open", "")]
|
||||
[InlineData("compact now", "compact", "now")]
|
||||
public void ParseGenericAction_ShouldParseExpected(string displayText, string expectedAction, string expectedArgument)
|
||||
{
|
||||
var (action, argument) = ChatWindow.ParseGenericAction(displayText, "/settings");
|
||||
var command = displayText.StartsWith("/compact", StringComparison.OrdinalIgnoreCase) ? "/compact" : "/settings";
|
||||
var (action, argument) = ChatWindow.ParseGenericAction(displayText, command);
|
||||
|
||||
action.Should().Be(expectedAction);
|
||||
argument.Should().Be(expectedArgument);
|
||||
@@ -60,6 +80,19 @@ public class ChatWindowSlashPolicyTests
|
||||
argument.Should().Be(expectedArgument);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/status", "open", "")]
|
||||
[InlineData("test", "test", "")]
|
||||
[InlineData("connection", "connection", "")]
|
||||
[InlineData("diag now", "diag", "now")]
|
||||
public void ParseGenericAction_ForStatus_ShouldParseExpected(string displayText, string expectedAction, string expectedArgument)
|
||||
{
|
||||
var (action, argument) = ChatWindow.ParseGenericAction(displayText, "/status");
|
||||
|
||||
action.Should().Be(expectedAction);
|
||||
argument.Should().Be(expectedArgument);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(false, "stdio", true, false, null, "Disabled")]
|
||||
[InlineData(true, "stdio", false, false, null, "Enabled")]
|
||||
|
||||
Reference in New Issue
Block a user