mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2026-01-06 15:14:21 +01:00
feat: improve continue chat experience
This commit is contained in:
@@ -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.
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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 ? (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user