?? ? ? ?? ?? ?? ??? ???? 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:
@@ -202,7 +202,12 @@ public partial class AgentLoopService
|
||||
{
|
||||
// 문서 생성 의도가 감지되면 탐색 없이 바로 문서 계획/생성 도구 사용
|
||||
if (state.Scope == ExplorationScope.DirectCreation)
|
||||
{
|
||||
if (string.Equals(activeTab, "Code", StringComparison.OrdinalIgnoreCase))
|
||||
return "file_write -> file_edit -> build_run/test_loop as needed";
|
||||
|
||||
return "document_plan -> docx_create/html_create/excel_create -> self-review";
|
||||
}
|
||||
|
||||
if (HasExplicitFolderIntent(userQuery))
|
||||
return "folder_map -> glob/grep -> targeted read";
|
||||
@@ -236,6 +241,10 @@ public partial class AgentLoopService
|
||||
&& HasDocumentCreationIntent(lower))
|
||||
return ExplorationScope.DirectCreation;
|
||||
|
||||
if (string.Equals(activeTab, "Code", StringComparison.OrdinalIgnoreCase)
|
||||
&& HasCodeArtifactCreationIntent(lower))
|
||||
return ExplorationScope.DirectCreation;
|
||||
|
||||
if (lower.Contains("전체") || lower.Contains("전반") || lower.Contains("코드베이스 전체") ||
|
||||
lower.Contains("repo-wide") || lower.Contains("repository-wide") || lower.Contains("전체 구조") ||
|
||||
lower.Contains("아키텍처") || lower.Contains("전체 점검"))
|
||||
@@ -283,6 +292,24 @@ public partial class AgentLoopService
|
||||
"정리해", "정리 해");
|
||||
}
|
||||
|
||||
private static bool HasCodeArtifactCreationIntent(string lowerQuery)
|
||||
{
|
||||
var hasCreationVerb = ContainsAny(
|
||||
lowerQuery,
|
||||
"만들", "생성", "작성", "create", "generate", "build", "write", "scaffold", "draft");
|
||||
|
||||
if (!hasCreationVerb)
|
||||
return false;
|
||||
|
||||
return ContainsAny(
|
||||
lowerQuery,
|
||||
"html", "css", "javascript", "js", "typescript", "ts",
|
||||
"web page", "webpage", "website", "landing page",
|
||||
"웹페이지", "웹 페이지", "웹사이트", "페이지",
|
||||
"file", "파일", "script", "스크립트", "component", "컴포넌트",
|
||||
"template", "템플릿", "index.html", "app.js", "style.css");
|
||||
}
|
||||
|
||||
private static void InjectExplorationScopeGuidance(List<ChatMessage> messages, ExplorationScope scope)
|
||||
{
|
||||
var guidance = scope switch
|
||||
@@ -303,6 +330,16 @@ public partial class AgentLoopService
|
||||
"Exploration scope = open-ended. Expand gradually. Prefer selective discovery before broad scans."
|
||||
};
|
||||
|
||||
if (scope == ExplorationScope.DirectCreation)
|
||||
{
|
||||
guidance =
|
||||
"Exploration scope = direct-creation. The user wants to CREATE a new file or document. " +
|
||||
"Do NOT search for existing files with glob/grep/folder_map unless the user explicitly asked to inspect the workspace. " +
|
||||
"If you are in the Code tab, call file_write immediately with a relative path inside the current work folder, then use file_edit/build_run/test_loop only if needed. " +
|
||||
"If you are in Cowork, call document_plan first and then the appropriate creation tool. " +
|
||||
"The output MUST be a real file on disk, not a text response.";
|
||||
}
|
||||
|
||||
messages.Add(new ChatMessage
|
||||
{
|
||||
Role = "system",
|
||||
|
||||
Reference in New Issue
Block a user