Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.3.0" />
<Sdk Name="Aspire.AppHost.Sdk" Version="9.4.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand Down
7 changes: 4 additions & 3 deletions src/InterviewAssistant.Web/Components/Pages/Home.razor
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
StateHasChanged();

var assistantMessage = new ChatMessage
{
{
Role = MessageRoleType.Assistant,
Message = string.Empty
};
Expand Down Expand Up @@ -207,7 +207,8 @@
// 키 입력 처리 (엔터키로 메시지 전송)
private async Task HandleKeyDown(KeyboardEventArgs e)
{
if (e.Repeat || isSend) return;
var isSendJs = await JSRuntime.InvokeAsync<bool>("isMessageSendInProgress");
if (e.Repeat || isSend || isSendJs) return;

isSend = true;

Expand Down Expand Up @@ -273,7 +274,7 @@

bool first = true;
await foreach (var response in responses)
{
{
if (first)
{
isLoading = false;
Expand Down
4 changes: 4 additions & 0 deletions src/InterviewAssistant.Web/wwwroot/js/chatFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,8 @@ window.resetTextAreaHeight = function (elementId) {
textarea.style.height = "";
textarea.style.overflowY = "hidden";
}
};

window.isMessageSendInProgress = function () {
return window.isSend || false;
};
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,18 @@ public async Task Home_HandleKeyDown_PreventsDuplicateWithIsSendFlag()
Timeout = 5000
});

// 초기 AI 응답 및 UI 준비 대기
await Page.WaitForSelectorAsync(".welcome-message", new PageWaitForSelectorOptions
{
State = WaitForSelectorState.Detached,
Timeout = 15000
});
await Page.WaitForSelectorAsync(".response-status", new PageWaitForSelectorOptions
{
State = WaitForSelectorState.Detached,
Timeout = 40000
});

var textarea = Page.Locator("textarea#messageInput");

// 초기 메시지 개수 확인
Expand Down