Skip to content

Commit

Permalink
Modify think component default collapsed state based on pending status
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Feb 7, 2025
1 parent e1f1ec9 commit 7935659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/xgen/components/chat/think/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface IProps extends Component.PropsChatComponent {
const Index = (props: IProps) => {
const { chat_id, pending, text, children } = props
const is_cn = getLocale() === 'zh-CN'
const [isCollapsed, setIsCollapsed] = useState(false)
const [isCollapsed, setIsCollapsed] = useState(pending ? false : true)

const toggleCollapse = () => {
setIsCollapsed(!isCollapsed)
Expand Down

0 comments on commit 7935659

Please sign in to comment.