mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-26 12:17:14 +00:00
refactor(pipelines): soften chat session selection
This commit is contained in:
@@ -861,9 +861,14 @@ export default function DebugDialog({
|
|||||||
</span>
|
</span>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
variant={sessionType === 'person' ? 'secondary' : 'ghost'}
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
aria-pressed={sessionType === 'person'}
|
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')}
|
onClick={() => setSessionType('person')}
|
||||||
>
|
>
|
||||||
<User className="size-4" />
|
<User className="size-4" />
|
||||||
@@ -871,9 +876,14 @@ export default function DebugDialog({
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
variant={sessionType === 'group' ? 'secondary' : 'ghost'}
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
aria-pressed={sessionType === 'group'}
|
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')}
|
onClick={() => setSessionType('group')}
|
||||||
>
|
>
|
||||||
<Users className="size-4" />
|
<Users className="size-4" />
|
||||||
|
|||||||
@@ -265,8 +265,14 @@ test.describe('processor detail workbench', () => {
|
|||||||
name: 'Group Chat',
|
name: 'Group Chat',
|
||||||
});
|
});
|
||||||
await expect(privateChatButton).toHaveAttribute('aria-pressed', 'true');
|
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 groupChatButton.click();
|
||||||
await expect(groupChatButton).toHaveAttribute('aria-pressed', 'true');
|
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();
|
await privateChatButton.click();
|
||||||
|
|
||||||
const composer = debugPanel.locator('[data-debug-composer="true"]');
|
const composer = debugPanel.locator('[data-debug-composer="true"]');
|
||||||
|
|||||||
Reference in New Issue
Block a user