코워크 코드 내부설정 컨텍스트 토큰 기본값을 32K로 상향

LlmSettings.MaxContextTokens 기본값을 32768로 조정하고 메인 설정의 컨텍스트 토큰 카드에 32K 선택지를 추가했다.

AgentSettingsWindow의 잘못된 입력 fallback도 32K 기준으로 바꿔 내부설정이 4K로 되돌아가지 않도록 정리했다.

검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_context32k\\ -p:IntermediateOutputPath=obj\\verify_context32k\\ / dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter SettingsServiceTests -p:OutputPath=bin\\verify_context32k_tests\\ -p:IntermediateOutputPath=obj\\verify_context32k_tests\
This commit is contained in:
2026-04-15 14:29:04 +09:00
parent b260008663
commit d3b6b1a936
7 changed files with 33 additions and 4 deletions

View File

@@ -7,6 +7,14 @@ Windows 전용 시맨틱 런처 & 워크스페이스 매니저
개발 참고: Claw Code 동등성 작업 추적 문서
`docs/claw-code-parity-plan.md`
- 업데이트: 2026-04-15 15:18 (KST)
- 코워크/코드 내부설정의 최대 컨텍스트 토큰 기본값을 32K로 올렸습니다. [AppSettings.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Models/AppSettings.cs)의 `MaxContextTokens` 기본값을 `32_768`로 변경해 신규 설정/신규 세션이 바로 32K 기준으로 시작됩니다.
- [SettingsWindow.xaml](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/SettingsWindow.xaml)과 [SettingsWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/SettingsWindow.xaml.cs)에는 `32K` 선택 카드를 추가해 메인 설정에서도 기본 선택과 표시가 어긋나지 않게 맞췄습니다.
- [AgentSettingsWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/AgentSettingsWindow.xaml.cs)는 잘못된 입력 fallback도 32K 기준으로 바꿔, 내부 설정에서 값이 비정상이더라도 다시 4K로 떨어지지 않게 했습니다.
- 테스트: [SettingsServiceTests.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot.Tests/Services/SettingsServiceTests.cs) 확장
- 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_context32k\\ -p:IntermediateOutputPath=obj\\verify_context32k\\` 경고 0 / 오류 0
- 검증: `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "SettingsServiceTests" -p:OutputPath=bin\\verify_context32k_tests\\ -p:IntermediateOutputPath=obj\\verify_context32k_tests\\` 통과 32
- 업데이트: 2026-04-15 10:57 (KST)
- 업데이트: 2026-04-15 15:09 (KST)
- Code/Cowork 작업 폴더 선택 직후 빠른 전송에서도 대화 메타데이터와 UI 표시가 어긋나지 않도록 정리했습니다. [ChatWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml.cs)는 폴더 선택 시 현재 대화가 없으면 즉시 생성해 `WorkFolder`를 먼저 반영하고, 현재 폴더 표시도 탭별 최근 폴더(`CodeWorkFolder`/`CoworkWorkFolder`)를 우선 읽도록 바꿨습니다.

View File

@@ -1365,3 +1365,10 @@ UI ?붿옄???€洹쒕え 由ы뙥?좊쭅 ???꾪뿕 ?묒뾽 ??湲곕줉???덉쟾
- 테스트: `src/AxCopilot.Tests/Services/ChatSessionStateServiceTests.cs`에서 fresh conversation 기본 폴더 승계와 탭별 우선순위를 검증하도록 확장
- 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_workfolder_sync\\ -p:IntermediateOutputPath=obj\\verify_workfolder_sync\\` 경고 0 / 오류 0
- 검증: `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "ChatSessionStateServiceTests" -p:OutputPath=bin\\verify_workfolder_sync_tests\\ -p:IntermediateOutputPath=obj\\verify_workfolder_sync_tests\\` 통과 37
업데이트: 2026-04-15 15:18 (KST)
- `src/AxCopilot/Models/AppSettings.cs`의 `LlmSettings.MaxContextTokens` 기본값을 `32_768`로 조정했습니다. 이제 신규 설치, 신규 세션, 초기화 이후의 코워크/코드 내부설정은 32K 컨텍스트 기준으로 시작합니다.
- `src/AxCopilot/Views/SettingsWindow.xaml`과 `src/AxCopilot/Views/SettingsWindow.xaml.cs`에는 `32K` 컨텍스트 카드와 선택 로직을 추가했습니다. 기존 4K/16K/64K 사이의 간격 때문에 32K 기본값이 64K처럼 보이던 불일치를 제거합니다.
- `src/AxCopilot/Views/AgentSettingsWindow.xaml.cs`는 `TxtMaxContextTokens` 파싱 실패 시 fallback 값을 4096에서 32768로 변경했습니다. 내부 설정 창에서 잘못된 입력을 저장하더라도 기본 컨텍스트가 다시 4K로 내려가지 않습니다.
- 테스트: `src/AxCopilot.Tests/Services/SettingsServiceTests.cs`에 `LlmSettings_DefaultMaxContextTokens_IsThirtyTwoK` 추가
- 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_context32k\\ -p:IntermediateOutputPath=obj\\verify_context32k\\` 경고 0 / 오류 0
- 검증: `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "SettingsServiceTests" -p:OutputPath=bin\\verify_context32k_tests\\ -p:IntermediateOutputPath=obj\\verify_context32k_tests\\` 통과 32

View File

@@ -52,6 +52,12 @@ public class SettingsServiceTests
new AppSettings().IndexPaths.Should().NotBeEmpty();
}
[Fact]
public void LlmSettings_DefaultMaxContextTokens_IsThirtyTwoK()
{
new LlmSettings().MaxContextTokens.Should().Be(32_768);
}
// ─── LauncherSettings 테마 ───────────────────────────────────────────────
[Theory]

View File

@@ -773,9 +773,9 @@ public class LlmSettings
[JsonPropertyName("streaming")]
public bool Streaming { get; set; } = true;
/// <summary>최대 컨텍스트 토큰 수. 기본값 4096.</summary>
/// <summary>최대 컨텍스트 토큰 수. 기본값 32768.</summary>
[JsonPropertyName("maxContextTokens")]
public int MaxContextTokens { get; set; } = 4096;
public int MaxContextTokens { get; set; } = 32_768;
/// <summary>대화 보관 기간(일). 7 | 30 | 90 | 0(무제한). 기본값 30.</summary>
[JsonPropertyName("retentionDays")]

View File

@@ -549,7 +549,7 @@ public partial class AgentSettingsWindow : Window
_llm.EnableProactiveContextCompact = ChkEnableProactiveCompact.IsChecked == true;
_llm.ContextCompactTriggerPercent = ParseInt(TxtContextCompactTriggerPercent.Text, 80, 10, 95);
_llm.MaxContextTokens = ParseInt(TxtMaxContextTokens.Text, 4096, 1024, 200000);
_llm.MaxContextTokens = ParseInt(TxtMaxContextTokens.Text, 32_768, 1024, 200000);
_llm.MaxRetryOnError = ParseInt(TxtMaxRetryOnError.Text, 3, 0, 10);
_llm.EnableIbmDiagnosticLog = ChkEnableIbmDiagnosticLog.IsChecked == true;

View File

@@ -3973,6 +3973,12 @@
Style="{StaticResource AgentSubTabStyle}"
Margin="0,0,6,6"
Checked="AgentContextTokensCard_Checked"/>
<RadioButton x:Name="AgentContextTokens32K"
Content="32K"
GroupName="AgentContextTokens"
Style="{StaticResource AgentSubTabStyle}"
Margin="0,0,6,6"
Checked="AgentContextTokensCard_Checked"/>
<RadioButton x:Name="AgentContextTokens64K"
Content="64K"
GroupName="AgentContextTokens"

View File

@@ -197,7 +197,8 @@ public partial class SettingsWindow : Window
var maxContextTokens = _vm.LlmMaxContextTokens;
if (AgentContextTokens4K != null) AgentContextTokens4K.IsChecked = maxContextTokens <= 4_096;
if (AgentContextTokens16K != null) AgentContextTokens16K.IsChecked = maxContextTokens > 4_096 && maxContextTokens <= 16_384;
if (AgentContextTokens64K != null) AgentContextTokens64K.IsChecked = maxContextTokens > 16_384 && maxContextTokens <= 65_536;
if (AgentContextTokens32K != null) AgentContextTokens32K.IsChecked = maxContextTokens > 16_384 && maxContextTokens <= 32_768;
if (AgentContextTokens64K != null) AgentContextTokens64K.IsChecked = maxContextTokens > 32_768 && maxContextTokens <= 65_536;
if (AgentContextTokens128K != null) AgentContextTokens128K.IsChecked = maxContextTokens > 65_536 && maxContextTokens <= 131_072;
if (AgentContextTokens256K != null) AgentContextTokens256K.IsChecked = maxContextTokens > 131_072 && maxContextTokens <= 262_144;
if (AgentContextTokens1M != null) AgentContextTokens1M.IsChecked = maxContextTokens > 262_144;
@@ -2296,6 +2297,7 @@ public partial class SettingsWindow : Window
_vm.LlmMaxContextTokens = rb.Name switch
{
"AgentContextTokens16K" => 16_384,
"AgentContextTokens32K" => 32_768,
"AgentContextTokens64K" => 65_536,
"AgentContextTokens128K" => 131_072,
"AgentContextTokens256K" => 262_144,