?? ? ? ?? ?? ?? ??? ???? file_write ?? ??? ??
? ?? ???? folder_map, grep, file_read, env_tool, skill_manager, mcp_list_resources ?? ?? ???? ??? ??? AgentLoopCodeRuntimeGuards? ????, ?? ??(C:\ ?) fallback? ?? ? file_write ?? ?? ??? ????? ????. Code ??? ?? ?? ???? meta tool? ????, direct-creation ????? ?? ??? ?? ??? ?? ???? file_write ?? ???? ????? AgentLoopService? SystemPromptBuilder? ????. ???? ?? <tool_call>? AgentLoopResponseClassificationService?? ??? file_write ??? ???. AgentLoopE2ETests? AgentLoopResponseClassificationServiceTests? ??? ? ?? ?? ?? fallback ??, skill_manager detour ??, text-embedded file_write ??? ??? ???? README.md? docs/DEVELOPMENT.md? 2026-04-15 14:00 (KST) ?? ??? ????. ??: - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_empty_workspace_fix2\\ -p:IntermediateOutputPath=obj\\verify_empty_workspace_fix2\\ (?? 0 / ?? 0) - dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "FullyQualifiedName~RunAsync_EmptyWorkspace_BlocksExternalFallbackAndRecoversToFileWrite|FullyQualifiedName~RunAsync_EmptyWorkspace_DisallowsSkillManagerAndRecoversToFileWrite|FullyQualifiedName~RunAsync_TextEmbeddedToolCall_RecoversAndExecutesFileWrite|FullyQualifiedName~Classify_ShouldRecoverToolCallEmbeddedInText" -p:OutputPath=bin\\verify_empty_workspace_fix2_tests\\ -p:IntermediateOutputPath=obj\\verify_empty_workspace_fix2_tests\\ (?? 4)
This commit is contained in:
@@ -1298,3 +1298,41 @@ UI ?붿옄???洹쒕え 由ы뙥?좊쭅 ???꾪뿕 ?묒뾽 ??湲곕줉???덉쟾
|
||||
### 검증
|
||||
- `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_loop_sql_finalize\\ -p:IntermediateOutputPath=obj\\verify_loop_sql_finalize\\` 경고 0 / 오류 0
|
||||
- `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "AgentLoopResponseClassificationServiceTests|AgentLoopLlmRequestPreparationServiceTests|AgentLoopIterationPreparationServiceTests|SqlAnalysisServiceTests|SqlReviewServiceTests|CodeLanguageCatalogTests|WorkspaceContextGeneratorTests" -p:OutputPath=bin\\verify_loop_sql_finalize_tests\\ -p:IntermediateOutputPath=obj\\verify_loop_sql_finalize_tests\\` 통과 48
|
||||
|
||||
업데이트: 2026-04-15 14:00 (KST)
|
||||
|
||||
### Code 탭 빈 작업 폴더 생성 버그 보강
|
||||
- 새 `AgentLoopCodeRuntimeGuards.cs`
|
||||
- `skill_manager`, `mcp_list_resources`, `mcp_read_resource`를 Code 기본 런타임 도구 노출에서 제외하는 `ApplyCodeDefaultMetaToolFilter()`를 추가했습니다.
|
||||
- 빈 작업 폴더에서 `folder_map`, `glob`, `grep`, `code_search`, `file_read`, `env_tool`, `skill_manager`, `mcp_*` 도구로 우회 탐색을 시도하면 `TryHandleEmptyWorkspaceFallbackTransition()`이 차단하고, `file_write` 직접 생성 복구 프롬프트를 주입하도록 만들었습니다.
|
||||
- 상대 경로 `.`도 작업 폴더 기준으로 해석해 외부 루트 탐색과 detour를 구분하도록 `IsExternalWorkspaceEscalationTarget()`를 보정했습니다.
|
||||
- direct-creation 요청이면서 작업 폴더가 비어 있으면 시작 시점에 곧바로 `file_write` 생성 우선 가이드를 주입하는 `InjectInitialEmptyWorkspaceCreationGuidance()`를 추가했습니다.
|
||||
|
||||
### AgentLoop / Code 프롬프트 연동
|
||||
- `AgentLoopService.cs`
|
||||
- `BuildContext()` 직후 `DetectEmptyWorkspace(context.WorkFolder)`로 빈 작업 폴더를 감지해 `runState.WorkspaceAppearsEmpty`에 반영합니다.
|
||||
- `GetRuntimeActiveTools()`에서 `ApplyCodeDefaultMetaToolFilter()`를 실제 런타임 도구 목록에 적용합니다.
|
||||
- 도구 실행 직전 `TryHandleEmptyWorkspaceFallbackTransition()`을 호출해 외부 루트 fallback과 메타 도구 detour를 막습니다.
|
||||
- direct-creation 상태 메시지는 Code 탭에서 `즉시 생성 모드 · 바로 파일을 만드는 중`으로 분리해 사용자에게 현재 의도를 더 정확히 보이도록 정리했습니다.
|
||||
- `ChatWindow.SystemPromptBuilder.cs`
|
||||
- Code/Cowork 프롬프트에 `빈 작업 폴더 + 새 파일/웹페이지/scaffold 생성 요청`이면 broad exploration 없이 `file_write`를 바로 호출하라는 규칙을 추가했습니다.
|
||||
- Code 일반 작업에서 `skill_manager`, `mcp_list_resources`, `mcp_read_resource`를 쓰지 말라는 규칙도 함께 추가했습니다.
|
||||
|
||||
### Tool-call 정합성 복구
|
||||
- `AgentLoopResponseClassificationService.cs`
|
||||
- 텍스트 블록 안에 `<tool_call>{...}</tool_call>` 형태로 섞여 들어온 호출을 `LlmService.TryExtractToolCallsFromText()`로 복구하도록 확장했습니다.
|
||||
- `LlmService.StripToolCallTokens()`로 남은 텍스트는 thinking/assistant 요약에만 남기고 실제 도구 호출은 실행 경로로 넘깁니다.
|
||||
- 이 보강으로 `file_write`가 스트리밍 중 텍스트에 묻혀 유실되는 케이스를 줄였습니다.
|
||||
|
||||
### 테스트
|
||||
- `AgentLoopE2ETests.cs`
|
||||
- `RunAsync_EmptyWorkspace_BlocksExternalFallbackAndRecoversToFileWrite()`
|
||||
- `RunAsync_EmptyWorkspace_DisallowsSkillManagerAndRecoversToFileWrite()`
|
||||
- `RunAsync_TextEmbeddedToolCall_RecoversAndExecutesFileWrite()`
|
||||
- E2E helper `BuildLoopSettings()`는 ambient project/plugin/MCP skill discovery를 꺼서 현재 저장소 스킬 상태에 영향받지 않도록 격리했습니다.
|
||||
- `AgentLoopResponseClassificationServiceTests.cs`
|
||||
- `Classify_ShouldRecoverToolCallEmbeddedInText()` 추가
|
||||
|
||||
### 검증
|
||||
- `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_empty_workspace_fix2\\ -p:IntermediateOutputPath=obj\\verify_empty_workspace_fix2\\` 경고 0 / 오류 0
|
||||
- `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "FullyQualifiedName~RunAsync_EmptyWorkspace_BlocksExternalFallbackAndRecoversToFileWrite|FullyQualifiedName~RunAsync_EmptyWorkspace_DisallowsSkillManagerAndRecoversToFileWrite|FullyQualifiedName~RunAsync_TextEmbeddedToolCall_RecoversAndExecutesFileWrite|FullyQualifiedName~Classify_ShouldRecoverToolCallEmbeddedInText" -p:OutputPath=bin\\verify_empty_workspace_fix2_tests\\ -p:IntermediateOutputPath=obj\\verify_empty_workspace_fix2_tests\\` 통과 4
|
||||
|
||||
Reference in New Issue
Block a user