enh: optimize time display

This commit is contained in:
EntropyYue 2025-02-07 07:43:39 +08:00
parent 14398ab628
commit 3a2d964d39
3 changed files with 12 additions and 4 deletions

View File

@ -74,9 +74,15 @@
<div class="">
{#if attributes?.type === 'reasoning'}
{#if attributes?.done === 'true' && attributes?.duration}
{$i18n.t('Thought for {{DURATION}}', {
DURATION: dayjs.duration(attributes.duration, 'seconds').humanize()
})}
{#if attributes.duration < 60}
{$i18n.t('Thought for {{DURATION}} seconds', {
DURATION: attributes.duration
})}
{:else}
{$i18n.t('Thought for {{DURATION}}', {
DURATION: dayjs.duration(attributes.duration, 'seconds').humanize()
})}
{/if}
{:else}
{$i18n.t('Thinking...')}
{/if}

View File

@ -944,6 +944,7 @@
"This will reset the knowledge base and sync all files. Do you wish to continue?": "",
"Thorough explanation": "",
"Thought for {{DURATION}}": "",
"Thought for {{DURATION}} seconds": "",
"Tika": "",
"Tika Server URL required.": "",
"Tiktoken": "",

View File

@ -943,7 +943,8 @@
"This will delete all models including custom models and cannot be undone.": "这将删除所有模型,包括自定义模型,且无法撤销。",
"This will reset the knowledge base and sync all files. Do you wish to continue?": "这将重置知识库并替换所有文件为目录下文件。确认继续?",
"Thorough explanation": "解释较为详细",
"Thought for {{DURATION}}": "思考时间 {{DURATION}}",
"Thought for {{DURATION}}": "已推理 持续 {{DURATION}}",
"Thought for {{DURATION}} seconds": "已推理 持续 {{DURATION}} 秒",
"Tika": "Tika",
"Tika Server URL required.": "请输入 Tika 服务器地址。",
"Tiktoken": "Tiktoken",