Files

50 lines
1.9 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 仅供离线 UI 验证;不进入产品数据,不请求模型。
const output = Array.from({ length: 90 }, (_, i) => `src/example-${i + 1}.ts`).join('\n') + '\nOUTPUT_END_完整输出'
const before = '我先检查工作目录中的文件,再给出结果。\n'
const after = [
'# 检查结果',
'',
'已读取 **90 个文件**。下面是正文、表格和代码块的渲染样本。',
'这一行用于检查普通换行。',
'',
'## 状态清单',
'',
'- [x] 列出工作目录',
'- [ ] 核对变更',
'- 保留嵌套列表',
' - 第二层内容',
'',
'| 模块 | 状态 | 说明 |',
'| :--- | :---: | ---: |',
'| 对话渲染 | 已完成 | 支持 Markdown |',
'| 工具过程 | 已完成 | 保留完整输出 |',
'',
'```typescript',
'',
'const message: string = "你好,YCode"',
'console.log(message)',
'',
'```',
'',
'> 工具发生在这段正文之前,重开会话后也应保持这个顺序。',
'',
'访问 https://example.com/docs;~~旧的内容~~,以及行内 `code`。',
'',
'<script>window.__unsafeExecuted = true</script>',
'',
'未标注语言的代码:',
'',
'```',
'plain text',
'```'
].join('\n')
const now = Date.now()
const tool = { id: 'fixture-read', name: 'read', args: { path: 'src' }, argsRaw: '{"path":"src"}', status: 'ok', summary: output.slice(0, 600), output, durationMs: 123 }
export const chatParityFixture = {
sessions: [{ id: 'parity', title: '对话渲染与工具过程验证', createdAt: now, updatedAt: now }],
messages: { parity: [
{ id: 'user-fixture', role: 'user', content: '检查文件并用表格、代码块汇报。', createdAt: now, status: 'done' },
{ id: 'assistant-fixture', role: 'assistant', content: before + after, tools: [tool], parts: [{ type: 'text', text: before }, { type: 'tool', toolId: tool.id }, { type: 'text', text: after }], createdAt: now, status: 'done' }
] }
}