refactor(pipelines): soften chat session selection

This commit is contained in:
RockChinQ
2026-08-26 00:22:22 +08:00
parent a936734efa
commit 8380bfc7d4
2 changed files with 18 additions and 2 deletions
@@ -861,9 +861,14 @@ export default function DebugDialog({
</span>
<Button
type="button"
variant={sessionType === 'person' ? 'secondary' : 'ghost'}
variant="ghost"
size="sm"
aria-pressed={sessionType === 'person'}
className={cn(
'shadow-none',
sessionType === 'person' &&
'bg-primary/15 text-primary hover:bg-primary/20 hover:text-primary',
)}
onClick={() => setSessionType('person')}
>
<User className="size-4" />
@@ -871,9 +876,14 @@ export default function DebugDialog({
</Button>
<Button
type="button"
variant={sessionType === 'group' ? 'secondary' : 'ghost'}
variant="ghost"
size="sm"
aria-pressed={sessionType === 'group'}
className={cn(
'shadow-none',
sessionType === 'group' &&
'bg-primary/15 text-primary hover:bg-primary/20 hover:text-primary',
)}
onClick={() => setSessionType('group')}
>
<Users className="size-4" />
@@ -265,8 +265,14 @@ test.describe('processor detail workbench', () => {
name: 'Group Chat',
});
await expect(privateChatButton).toHaveAttribute('aria-pressed', 'true');
await expect(privateChatButton).toHaveClass(/bg-primary\/15/);
await expect(privateChatButton).toHaveClass(/text-primary/);
await expect(groupChatButton).not.toHaveClass(/bg-primary\/15/);
await groupChatButton.click();
await expect(groupChatButton).toHaveAttribute('aria-pressed', 'true');
await expect(groupChatButton).toHaveClass(/bg-primary\/15/);
await expect(groupChatButton).toHaveClass(/text-primary/);
await expect(privateChatButton).not.toHaveClass(/bg-primary\/15/);
await privateChatButton.click();
const composer = debugPanel.locator('[data-debug-composer="true"]');