mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
fix(ui): handle optional metrics in Composer component
This commit is contained in:
parent
03e59256c4
commit
617874f152
2 changed files with 5 additions and 13 deletions
|
|
@ -313,11 +313,7 @@ describe('<LoadingIndicator />', () => {
|
|||
describe('token display', () => {
|
||||
it('should display output tokens inline with arrow notation', () => {
|
||||
const { lastFrame } = renderWithContext(
|
||||
<LoadingIndicator
|
||||
{...defaultProps}
|
||||
promptTokens={1500}
|
||||
candidatesTokens={847}
|
||||
/>,
|
||||
<LoadingIndicator {...defaultProps} candidatesTokens={847} />,
|
||||
StreamingState.Responding,
|
||||
);
|
||||
const output = lastFrame();
|
||||
|
|
@ -329,11 +325,7 @@ describe('<LoadingIndicator />', () => {
|
|||
|
||||
it('should not display tokens when output tokens is 0', () => {
|
||||
const { lastFrame } = renderWithContext(
|
||||
<LoadingIndicator
|
||||
{...defaultProps}
|
||||
promptTokens={1500}
|
||||
candidatesTokens={0}
|
||||
/>,
|
||||
<LoadingIndicator {...defaultProps} candidatesTokens={0} />,
|
||||
StreamingState.Responding,
|
||||
);
|
||||
const output = lastFrame();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue