mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(ai): polish plan generation block
This commit is contained in:
1 parent
77d0f5b407
commit
f578c3597a
6 files changed
+25
-5
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { describe, it } from 'node:test'
|
||||
|
||||
describe('ChatMessage plan validation rendering', () => {
|
||||
it('does not render a manual step number inside the ordered validation list', () => {
|
||||
const source = readFileSync(new URL('./ChatMessage.vue', import.meta.url), 'utf8')
|
||||
const validationSection = source.slice(
|
||||
source.indexOf("block.tag === 'plan_validation'"),
|
||||
source.indexOf('<!-- 技能块 -->')
|
||||
)
|
||||
|
||||
assert.ok(validationSection.includes('<ol'), 'expected plan validation steps to render in an ordered list')
|
||||
assert.equal(
|
||||
validationSection.includes('{{ stepIndex + 1 }}.'),
|
||||
false,
|
||||
'ordered lists already render step numbers, so the template must not add another number'
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -576,7 +576,7 @@ async function handleCopyMarkdown() {
|
||||
class="text-gray-600 dark:text-gray-300"
|
||||
>
|
||||
<div class="font-medium text-gray-800 dark:text-gray-200">
|
||||
{{ stepIndex + 1 }}. {{ step.goal }}
|
||||
{{ step.goal }}
|
||||
</div>
|
||||
<div v-if="step.evidenceNeeded" class="mt-1 text-gray-500 dark:text-gray-400">
|
||||
{{ t('ai.chat.message.plan.evidenceNeeded') }}: {{ step.evidenceNeeded }}
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
"analysis": "Analysis",
|
||||
"reasoning": "Reasoning",
|
||||
"reflection": "Reflection",
|
||||
"planValidation": "Generate and validate steps",
|
||||
"planValidation": "Generate plan",
|
||||
"other": "Thinking ({tag})"
|
||||
},
|
||||
"loading": "Thinking",
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
"analysis": "分析",
|
||||
"reasoning": "推論",
|
||||
"reflection": "振り返り",
|
||||
"planValidation": "手順の生成・検証",
|
||||
"planValidation": "計画を生成",
|
||||
"other": "思考({tag})"
|
||||
},
|
||||
"loading": "思考中...",
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
"analysis": "分析",
|
||||
"reasoning": "推理",
|
||||
"reflection": "反思",
|
||||
"planValidation": "生成并校验步骤",
|
||||
"planValidation": "生成计划",
|
||||
"other": "思考({tag})"
|
||||
},
|
||||
"loading": "思考中",
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
"analysis": "分析",
|
||||
"reasoning": "推理",
|
||||
"reflection": "反思",
|
||||
"planValidation": "產生並校驗步驟",
|
||||
"planValidation": "產生計畫",
|
||||
"other": "思考({tag})"
|
||||
},
|
||||
"loading": "思考中",
|
||||
|
||||
Reference in new issue
Block a user