Repository navigation
feat(chat): display elapsed time in minutes hours and days - #213
Open
3316891527 wants to merge 1 commit into
Open
3316891527 wants to merge 1 commit into
3316891527 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明 / Description
背景与动机 / Context and motivation
聊天统计和消息信息把长耗时显示为累计秒数,例如
111.32 s;工具执行标题也只显示秒或毫秒。统一使用紧凑的ms/s/m/h/d表示,让同一耗时在消息详情、生成统计和执行标题中保持一致,例如1m51.32s。改动范围 / Changes
60.00s;整数运算避免超长耗时溢出。兼容性与风险 / Compatibility and risks
仅调整显示格式,计时来源、历史记录、数据库、时间戳、Token 数量和 tokens/s 计算保持原值。消息信息继续显示括号内原始毫秒数,例如
1m51.32s (111,315 ms)。运行中的工具沿用现有刷新频率。独立于目录整理 PR #212,目标分支为 dev。关联 Issue / Related issue
N/A:维护者根据聊天界面截图提出的耗时显示改进。
验证方式 / Verification
Android 设备上的 Ubuntu 工作树,仅执行静态检查:
git diff --check origin/dev HEAD:通过。python -B ci/script/check_repo_hygiene.py --base origin/dev --candidate HEAD:errors=0、warnings=0,覆盖 21 个变更文件。python -B ci/script/check_localizations.py --base origin/dev --candidate HEAD:同一源码树的本地化检查无新增错误或警告。MessageStatsFormattingTest,新增DurationFormattingTest,覆盖示例、分钟/小时/天的舍入进位、设备区域设置和 Long 上限。证据 / Evidence
预期显示规则:
999ms10.24s1m51.32s1h1m1.32s1d1h1m1.32s1m0.00s实施记录:
docs/TODO/feat/chat-duration-units/index.md。检查清单 / Checklist