fix(web): align brief response viewer formatting

This commit is contained in:
codeman-local
2026-08-06 10:16:15 +08:00
parent 12a5f5919e
commit b982c5d0e0
3 changed files with 52 additions and 19 deletions
+9
View File
@@ -20,6 +20,15 @@ describe('frontend public asset tooling', () => {
expect(appJs.includes(0)).toBe(false);
});
it('uses the same message wrapper for brief and full response views', () => {
const appJs = readFileSync(resolve(repoRoot, 'src/web/public/app.js'), 'utf8');
expect(appJs).toContain("body.appendChild(this._buildResponseViewerMessage(lastResponse, 'assistant'");
expect(appJs).toContain('body.appendChild(this._buildResponseViewerMessage(msg.text, msg.role, agentLabel));');
expect(appJs).toContain("div.className = 'rv-message ' + (isUser ? 'rv-msg-user' : 'rv-msg-assistant');");
expect(appJs).toContain("renderedText.className = 'rv-text';");
});
it('runs the public asset check script', () => {
expect(() => {
execFileSync('npm', ['run', 'check:public-assets', '--silent'], {