fix: keep streamed reasoning expanded
This commit is contained in:
@@ -1399,6 +1399,11 @@ describe('App', () => {
|
||||
(_, element) => element?.textContent === rawToolOutput
|
||||
)
|
||||
).toBeVisible()
|
||||
const activeReasoning = screen.getAllByText('正在推理')
|
||||
expect(activeReasoning).toHaveLength(2)
|
||||
for (const reasoning of activeReasoning) {
|
||||
expect(reasoning.closest('details')).toHaveAttribute('open')
|
||||
}
|
||||
|
||||
act(() => {
|
||||
if (!request) {
|
||||
|
||||
@@ -5446,11 +5446,7 @@ function App(): React.JSX.Element {
|
||||
<details
|
||||
className="message-reasoning"
|
||||
key={item.block.id}
|
||||
open={
|
||||
message.state === 'streaming' &&
|
||||
message.blocks?.at(-1)?.id ===
|
||||
item.block.id
|
||||
}
|
||||
open={message.state === 'streaming'}
|
||||
>
|
||||
<summary>
|
||||
{message.state === 'streaming'
|
||||
|
||||
Reference in New Issue
Block a user