chore: remove debug logging from AssistantChatPage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -102,9 +102,7 @@ export default function AssistantChatPage() {
|
|||||||
|
|
||||||
// Restore session from sessionStorage on mount (when URL has no session ID)
|
// Restore session from sessionStorage on mount (when URL has no session ID)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('[AssistantChat] Mount restore check — urlSessionId:', urlSessionId, 'activeChatId:', activeChatId)
|
|
||||||
if (!urlSessionId && activeChatId) {
|
if (!urlSessionId && activeChatId) {
|
||||||
console.log('[AssistantChat] Calling selectChat to restore:', activeChatId)
|
|
||||||
selectChat(activeChatId)
|
selectChat(activeChatId)
|
||||||
}
|
}
|
||||||
}, []) // eslint-disable-line react-hooks/exhaustive-deps
|
}, []) // eslint-disable-line react-hooks/exhaustive-deps
|
||||||
@@ -209,7 +207,6 @@ export default function AssistantChatPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const selectChat = useCallback(async (chatId: string) => {
|
const selectChat = useCallback(async (chatId: string) => {
|
||||||
console.log('[AssistantChat] selectChat called with:', chatId)
|
|
||||||
setActiveChatId(chatId)
|
setActiveChatId(chatId)
|
||||||
// Clear TaskLane when switching chats — will restore from backend if available
|
// Clear TaskLane when switching chats — will restore from backend if available
|
||||||
setShowTaskLane(false)
|
setShowTaskLane(false)
|
||||||
@@ -217,7 +214,6 @@ export default function AssistantChatPage() {
|
|||||||
setActiveActions([])
|
setActiveActions([])
|
||||||
try {
|
try {
|
||||||
const detail = await aiSessionsApi.getSession(chatId)
|
const detail = await aiSessionsApi.getSession(chatId)
|
||||||
console.log('[AssistantChat] getSession response — messages:', detail.conversation_messages?.length, 'pending_task_lane:', !!detail.pending_task_lane)
|
|
||||||
setMessages(
|
setMessages(
|
||||||
(detail.conversation_messages || []).map(m => ({
|
(detail.conversation_messages || []).map(m => ({
|
||||||
role: m.role as 'user' | 'assistant',
|
role: m.role as 'user' | 'assistant',
|
||||||
@@ -241,8 +237,7 @@ export default function AssistantChatPage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch {
|
||||||
console.error('[AssistantChat] Failed to load chat session:', err)
|
|
||||||
setMessages([])
|
setMessages([])
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|||||||
Reference in New Issue
Block a user