- Skills: per-project know-how the platform proposes from each succeeded run (in the background, or on request from a run), people confirm, edit, disable, delete or write; active ones enter later prompts - Export one skill as SKILL.md, or all as a zip with a directory per skill, as .claude/skills/ expects - A wish's report: every run, its stage timeline, the agent's plan, replies, commands, changed files and model usage, the change, the checks, failures, reviews and releases, and the full event log, as Markdown, or laid out for printing to PDF Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.0 KiB
TypeScript
21 lines
1.0 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
||
import { fenced, nested, reportTime } from '../apps/api/src/domain/wish-report.js';
|
||
|
||
describe('a wish report', () => {
|
||
it('places the agent’s own Markdown under the report’s heading, leaving its code alone', () => {
|
||
const summary = ['## 定位到的问题', '正文', '### 细节', '```md', '## 代码里的标题', '```'].join('\n');
|
||
expect(nested(summary)).toBe(
|
||
['#### 定位到的问题', '正文', '##### 细节', '```md', '## 代码里的标题', '```'].join('\n'),
|
||
);
|
||
expect(nested('没有标题')).toBe('没有标题');
|
||
expect(nested('###### 最深\n#### 较浅')).toBe('###### 最深\n#### 较浅');
|
||
});
|
||
it('fences text so its own backticks cannot close the block', () => {
|
||
expect(fenced('a ``` b', 'text')).toBe('````text\na ``` b\n````');
|
||
});
|
||
it('writes times in Beijing time', () => {
|
||
expect(reportTime('2026-11-01T19:20:00.000Z')).toBe('2026-11-02 03:20:00');
|
||
expect(reportTime(undefined)).toBe('—');
|
||
});
|
||
});
|