채팅·코워크·코드 하단 안내 문구를 현재 구현된 기능 기준으로 다시 정리했습니다. 입력 워터마크는 탭 종류와 작업 폴더 선택 여부를 보고 실제 가능한 작업을 안내하도록 공통 helper로 통일했고, 선택된 프리셋 안내는 placeholder 대신 설명 중심으로 정리해 역할을 분리했습니다. README와 docs/DEVELOPMENT.md에 2026-04-06 15:26 (KST) 기준 변경 이력을 반영했습니다. 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ (경고 0 / 오류 0)
This commit is contained in:
@@ -4,11 +4,48 @@ using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using AxCopilot.Models;
|
||||
using AxCopilot.Services;
|
||||
|
||||
namespace AxCopilot.Views;
|
||||
|
||||
public partial class ChatWindow
|
||||
{
|
||||
private string BuildDefaultInputWatermark()
|
||||
{
|
||||
var hasFolder = !string.IsNullOrWhiteSpace(GetCurrentWorkFolder());
|
||||
return _activeTab switch
|
||||
{
|
||||
"Cowork" => hasFolder
|
||||
? "문서 작성, 데이터 분석, 파일 작업을 요청하세요. 필요하면 작업 폴더 파일도 함께 참고합니다."
|
||||
: "문서 작성, 데이터 분석, 파일 작업을 요청하세요. 작업 폴더를 선택하면 관련 파일도 함께 참고합니다.",
|
||||
"Code" => hasFolder
|
||||
? "코드 수정, 원인 분석, 빌드·테스트를 요청하세요. 작업 폴더의 코드와 문서를 함께 검토합니다."
|
||||
: "작업 폴더를 선택한 뒤 코드 수정, 원인 분석, 빌드·테스트를 요청하세요.",
|
||||
_ => "질문, 요약, 초안 작성, 아이디어 정리를 요청하세요.",
|
||||
};
|
||||
}
|
||||
|
||||
private void RefreshInputWatermarkText()
|
||||
{
|
||||
if (InputWatermark == null)
|
||||
return;
|
||||
|
||||
InputWatermark.Text = string.IsNullOrWhiteSpace(_promptCardPlaceholder)
|
||||
? BuildDefaultInputWatermark()
|
||||
: _promptCardPlaceholder;
|
||||
}
|
||||
|
||||
private string BuildSelectedPresetGuideDescription(TopicPreset preset)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(preset.Description))
|
||||
return preset.Description.Trim();
|
||||
|
||||
if (string.Equals(_activeTab, "Cowork", StringComparison.OrdinalIgnoreCase))
|
||||
return "이 작업 유형에 맞는 문서/데이터/파일 작업 흐름으로 이어집니다.";
|
||||
|
||||
return "이 주제에 맞는 답변 톤과 초안 방향으로 대화를 이어갑니다.";
|
||||
}
|
||||
|
||||
private void UpdateFolderBar()
|
||||
{
|
||||
if (FolderBar == null)
|
||||
@@ -84,9 +121,7 @@ public partial class ChatWindow
|
||||
SelectedPresetGuideTitle.Text = string.Equals(_activeTab, "Cowork", StringComparison.OrdinalIgnoreCase)
|
||||
? $"선택된 작업 유형 · {preset.Label}"
|
||||
: $"선택된 대화 주제 · {preset.Label}";
|
||||
SelectedPresetGuideDesc.Text = string.IsNullOrWhiteSpace(preset.Description)
|
||||
? (preset.Placeholder ?? "")
|
||||
: preset.Description;
|
||||
SelectedPresetGuideDesc.Text = BuildSelectedPresetGuideDescription(preset);
|
||||
SelectedPresetGuide.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1217,15 +1217,7 @@ public partial class ChatWindow : Window
|
||||
FolderBar.Visibility = _activeTab != "Chat" ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
// 탭별 입력 안내 문구
|
||||
if (InputWatermark != null)
|
||||
{
|
||||
InputWatermark.Text = _activeTab switch
|
||||
{
|
||||
"Cowork" => "에이전트에게 작업을 요청하세요 (파일 읽기/쓰기, 문서 생성...)",
|
||||
"Code" => "코드 관련 작업을 요청하세요...",
|
||||
_ => _promptCardPlaceholder,
|
||||
};
|
||||
}
|
||||
RefreshInputWatermarkText();
|
||||
|
||||
// 권한 기본값 적용 (Cowork/Code 탭은 설정의 기본값 사용)
|
||||
ApplyTabDefaultPermission();
|
||||
@@ -9250,8 +9242,7 @@ public partial class ChatWindow : Window
|
||||
|
||||
private void ShowPlaceholder()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_promptCardPlaceholder)) return;
|
||||
InputWatermark.Text = _promptCardPlaceholder;
|
||||
RefreshInputWatermarkText();
|
||||
InputWatermark.Visibility = Visibility.Visible;
|
||||
InputBox.Text = "";
|
||||
InputBox.Focus();
|
||||
@@ -9266,7 +9257,9 @@ public partial class ChatWindow : Window
|
||||
return;
|
||||
}
|
||||
|
||||
if (_promptCardPlaceholder != null && string.IsNullOrEmpty(InputBox.Text))
|
||||
RefreshInputWatermarkText();
|
||||
|
||||
if (string.IsNullOrEmpty(InputBox.Text))
|
||||
InputWatermark.Visibility = Visibility.Visible;
|
||||
else
|
||||
InputWatermark.Visibility = Visibility.Collapsed;
|
||||
@@ -9275,7 +9268,8 @@ public partial class ChatWindow : Window
|
||||
private void ClearPromptCardPlaceholder()
|
||||
{
|
||||
_promptCardPlaceholder = null;
|
||||
InputWatermark.Visibility = Visibility.Collapsed;
|
||||
RefreshInputWatermarkText();
|
||||
UpdateWatermarkVisibility();
|
||||
}
|
||||
|
||||
private void BtnSettings_Click(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user