mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix: isolate thought bubble collapse state
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
IconDownload,
|
||||
IconFileText,
|
||||
} from "@tabler/icons-react"
|
||||
import { useAtom } from "jotai"
|
||||
import { useState } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import ReactMarkdown from "react-markdown"
|
||||
@@ -18,7 +17,7 @@ import remarkGfm from "remark-gfm"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { formatMessageTime } from "@/hooks/use-pico-chat"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { type ChatAttachment, showThoughtsAtom } from "@/store/chat"
|
||||
import { type ChatAttachment } from "@/store/chat"
|
||||
|
||||
interface AssistantMessageProps {
|
||||
content: string
|
||||
@@ -42,7 +41,7 @@ export function AssistantMessage({
|
||||
const fileAttachments = attachments.filter(
|
||||
(attachment) => attachment.type !== "image",
|
||||
)
|
||||
const [isExpanded, setIsExpanded] = useAtom(showThoughtsAtom)
|
||||
const [isExpanded, setIsExpanded] = useState(true)
|
||||
const formattedTimestamp =
|
||||
timestamp !== "" ? formatMessageTime(timestamp) : ""
|
||||
|
||||
|
||||
@@ -57,8 +57,6 @@ const DEFAULT_CHAT_STATE: ChatStoreState = {
|
||||
|
||||
export const chatAtom = atom<ChatStoreState>(DEFAULT_CHAT_STATE)
|
||||
|
||||
export const showThoughtsAtom = atom<boolean>(true)
|
||||
|
||||
const store = getDefaultStore()
|
||||
|
||||
export function getChatState() {
|
||||
|
||||
Reference in New Issue
Block a user