feat: improve continue chat experience

This commit is contained in:
d-kimsuon
2025-09-03 04:26:47 +09:00
parent 31da82377d
commit e689dd5b34
6 changed files with 81 additions and 34 deletions

View File

@@ -120,7 +120,7 @@ export const NewChat: FC<{
{startNewChat.isPending ? (
<>
<LoaderIcon className="w-4 h-4 animate-spin" />
Starting... This may take a while.
Sending... This may take a while.
</>
) : (
<>

View File

@@ -45,7 +45,10 @@ export const SessionPageContent: FC<{
// 自動スクロール処理
useEffect(() => {
if (isRunningTask && conversations.length !== previousConversationLength) {
if (
(isRunningTask || isPausedTask) &&
conversations.length !== previousConversationLength
) {
setPreviousConversationLength(conversations.length);
const scrollContainer = scrollContainerRef.current;
if (scrollContainer) {
@@ -55,7 +58,7 @@ export const SessionPageContent: FC<{
});
}
}
}, [conversations, isRunningTask, previousConversationLength]);
}, [conversations, isRunningTask, isPausedTask, previousConversationLength]);
return (
<div className="flex h-screen">
@@ -134,7 +137,7 @@ export const SessionPageContent: FC<{
</div>
</header>
<main className="w-full px-20 pb-20 relative z-5">
<main className="w-full px-20 pb-10 relative z-5">
<ConversationList
conversations={conversations}
getToolResult={getToolResult}

View File

@@ -36,12 +36,13 @@ export const ResumeChat: FC<{
return response.json();
},
onSuccess: async (response) => {
setMessage("");
if (sessionId !== response.sessionId) {
router.push(
`/projects/${projectId}/sessions/${response.sessionId}#message-${response.userMessageId}`,
);
}
setMessage("");
},
});
@@ -122,7 +123,7 @@ export const ResumeChat: FC<{
{resumeChat.isPending ? (
<>
<LoaderIcon className="w-4 h-4 animate-spin" />
Starting... This may take a while.
Sending... This may take a while.
</>
) : isPausedTask || isRunningTask ? (
<>