Download desktop/src/lib/sessionTitle.test.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/lib/sessionTitle.test.ts
- Command line
-
hf download hf://chenbhao/codev@e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/lib/sessionTitle.test.ts
-
curl -L -o sessionTitle.test.ts https://huggingface.co/chenbhao/codev/resolve/e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/lib/sessionTitle.test.ts
525 Bytes
| import { describe, expect, it } from 'vitest' | |
| import { deriveSessionTitle } from './sessionTitle' | |
| describe('deriveSessionTitle', () => { | |
| it('uses slash command metadata without showing raw XML tags', () => { | |
| const raw = [ | |
| '<command-message>frontend-design</command-message>', | |
| '<command-name>/frontend-design</command-name>', | |
| '<command-args>@website 重新设计首页</command-args>', | |
| ].join('\n') | |
| expect(deriveSessionTitle(raw)).toBe('/frontend-design @website 重新设计首页') | |
| }) | |
| }) | |