Skip to content

Conversation

@cy948
Copy link
Contributor

@cy948 cy948 commented Mar 14, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

  • src/features/Conversation/Extras/Usage/UsageDetail/index.tsx: 添加 tps, ttft 信息显示
  • src/features/Conversation/Extras/Usage/index.tsx: 将 extra 信息传递到 UsageDetail 中
  • src/libs/agent-runtime/utils/openaiCompatibleFactory/index.ts: 将发起请求的时间戳传递到流处理function中
  • src/libs/agent-runtime/utils/streams/openai.ts: 使流经过 性能计算中间件
  • src/libs/agent-runtime/utils/streams/protocol.ts: 性能计算中间件实现
  • src/utils/fetch/fetchSSE.ts: 接收并处理 agentRuntime的性能计算结果
  • src/store/chat/slices/aiChat/actions/generateAIChat.ts: 将性能计算信息和usage信息合并为metadata回传前端

📝 补充信息 | Additional Information

image

@vercel
Copy link

vercel bot commented Mar 14, 2025

@cy948 is attempting to deploy a commit to the LobeChat Desktop Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @cy948

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@cy948 cy948 force-pushed the style/output-speed branch 2 times, most recently from 432c724 to bfd9a10 Compare March 15, 2025 02:39
@codecov
Copy link

codecov bot commented Mar 15, 2025

Codecov Report

Attention: Patch coverage is 72.27723% with 28 lines in your changes missing coverage. Please review.

Project coverage is 89.43%. Comparing base (28d92e6) to head (ad1d032).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...es/Conversation/Extras/Usage/UsageDetail/index.tsx 8.00% 23 Missing ⚠️
src/utils/fetch/fetchSSE.ts 42.85% 4 Missing ⚠️
src/features/Conversation/Extras/Usage/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6959      +/-   ##
==========================================
- Coverage   89.47%   89.43%   -0.05%     
==========================================
  Files         782      783       +1     
  Lines       56711    56807      +96     
  Branches     3788     3800      +12     
==========================================
+ Hits        50744    50804      +60     
- Misses       5967     6003      +36     
Flag Coverage Δ
app 89.43% <72.27%> (-0.05%) ⬇️
server 95.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cy948 cy948 force-pushed the style/output-speed branch 2 times, most recently from dfb7536 to b635872 Compare April 10, 2025 01:16
@cy948 cy948 force-pushed the style/output-speed branch 4 times, most recently from a74de6e to ec9c222 Compare April 12, 2025 06:59
@cy948 cy948 force-pushed the style/output-speed branch from 794fb53 to 2cacc2b Compare April 18, 2025 02:09
@cy948 cy948 marked this pull request as ready for review April 18, 2025 08:48
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💄 Design Design and style issues labels Apr 18, 2025
@vercel
Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 3:24am

@arvinxx arvinxx merged commit 33c3fe7 into lobehub:main Apr 21, 2025
16 of 19 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @cy948 ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Apr 21, 2025
### [Version&nbsp;1.81.8](v1.81.7...v1.81.8)
<sup>Released on **2025-04-21**</sup>

#### 💄 Styles

- **misc**: Show token generate performance.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Styles

* **misc**: Show token generate performance, closes [#6959](#6959) ([33c3fe7](33c3fe7))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.81.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

bbbugg pushed a commit to bbbugg/lobe-chat that referenced this pull request Aug 14, 2025
* 💄 style: show token generate performance

* ✅ test: createTokenSpeedCalculator

* ✨ feat: add token speed for anthropic

* ✅ test: remove speed chunk in pplx

* ♻️ refactor: rename params

* 🎨 refactor: format codes

* ♻️ refactor: del log print

* 💄 style: add tooltips

* 🌐 i18n: tps, ttft

---------

Co-authored-by: Arvin Xu <[email protected]>
bbbugg pushed a commit to bbbugg/lobe-chat that referenced this pull request Aug 14, 2025
### [Version&nbsp;1.81.8](lobehub/lobe-chat@v1.81.7...v1.81.8)
<sup>Released on **2025-04-21**</sup>

#### 💄 Styles

- **misc**: Show token generate performance.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Styles

* **misc**: Show token generate performance, closes [lobehub#6959](lobehub#6959) ([4bd600a](lobehub@4bd600a))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💄 Design Design and style issues released size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants