Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

style(assistant-ui): apply prettier formatting to chat elements

Steven Enamakel6fe7ab893a2a
diff --git a/app/src/components/assistant-ui/elements/agent-plan.tsx b/app/src/components/assistant-ui/elements/agent-plan.tsx
index c17be7cd83..8c500da40a 100644
--- a/app/src/components/assistant-ui/elements/agent-plan.tsx
+++ b/app/src/components/assistant-ui/elements/agent-plan.tsx
@@ -1,11 +1,12 @@
-"use client";
+'use client';
-import type { ComponentProps } from "react";
-import { CheckIcon, Loader2Icon, XIcon } from "lucide-react";
-import { cn } from "@/components/assistant-ui/lib/utils";
-import { useT } from "@/lib/i18n/I18nContext";
-import { mono } from "./surfaces";
-import { announced, pct, progressOf } from "../utils/range";
+import { cn } from '@/components/assistant-ui/lib/utils';
+import { useT } from '@/lib/i18n/I18nContext';
+import { CheckIcon, Loader2Icon, XIcon } from 'lucide-react';
+import type { ComponentProps } from 'react';
+
+import { announced, pct, progressOf } from '../utils/range';
+import { mono } from './surfaces';
export type AgentPlanStep = {
id?: string | undefined;
@@ -16,12 +17,12 @@ export type AgentPlanStep = {
export function AgentPlan({
steps,
activeIndex,
- title = "Plan",
+ title = 'Plan',
className,
statuses,
stepTestId,
...props
-}: Omit<ComponentProps<"div">, "children" | "steps" | "activeIndex"> & {
+}: Omit<ComponentProps<'div'>, 'children' | 'steps' | 'activeIndex'> & {
steps: readonly (string | AgentPlanStep)[];
activeIndex: number;
title?: string | undefined;
@@ -31,23 +32,23 @@ export function AgentPlan({
}) {
const { t } = useT();
const total = steps.length;
- const completed = statuses ? statuses.filter(status => status === 'done').length : progressOf(activeIndex, total);
- const countLabel = t('chat.todos.ofTotal').replace('{done}', String(completed)).replace('{total}', String(total));
+ const completed = statuses
+ ? statuses.filter(status => status === 'done').length
+ : progressOf(activeIndex, total);
+ const countLabel = t('chat.todos.ofTotal')
+ .replace('{done}', String(completed))
+ .replace('{total}', String(total));
const allDone = completed >= total;
const progress = pct(completed, total);
return (
<div
data-slot="agent-plan"
- className={cn("flex w-full max-w-sm flex-col gap-3", className)}
-
- {...props}
- >
+ className={cn('flex w-full max-w-sm flex-col gap-3', className)}
+ {...props}>
<div className="flex items-center justify-between">
<span className="text-[13.5px] font-medium">{title}</span>
- <span className={cn(mono, "text-muted-foreground tabular-nums")}>
- {countLabel}
- </span>
+ <span className={cn(mono, 'text-muted-foreground tabular-nums')}>{countLabel}</span>
</div>
<div
role="progressbar"
@@ -56,8 +57,7 @@ export function AgentPlan({
aria-valuemax={100}
aria-valuenow={announced(progress)}
aria-valuetext={countLabel}
- className="bg-foreground/[0.06] inset-ring-border h-[3px] w-full overflow-hidden rounded-full inset-ring forced-colors:outline"
- >
+ className="bg-foreground/[0.06] inset-ring-border h-[3px] w-full overflow-hidden rounded-full inset-ring forced-colors:outline">
<span
aria-hidden
className="bg-foreground/80 block h-full rounded-full transition-[width] duration-500 forced-color-adjust-none motion-reduce:transition-none"
@@ -66,28 +66,34 @@ export function AgentPlan({
</div>
<ul className="flex flex-col gap-2.5">
{steps.map((step, i) => {
- const item = typeof step === "string" ? { label: step } : step;
- const status = statuses?.[i] ?? (allDone || i < completed ? 'done' : i === completed ? 'active' : 'pending');
+ const item = typeof step === 'string' ? { label: step } : step;
+ const status =
+ statuses?.[i] ??
+ (allDone || i < completed ? 'done' : i === completed ? 'active' : 'pending');
const done = status === 'done';
const active = status === 'active';
const failed = status === 'failed';
- const statusText = t(status === 'done' ? 'conversations.taskCard.state.done' : status === 'failed' ? 'conversations.taskCard.state.failed' : status === 'active' ? 'conversations.backgroundTasks.statusRunning' : 'orchestration.runStatus.pending');
+ const statusText = t(
+ status === 'done'
+ ? 'conversations.taskCard.state.done'
+ : status === 'failed'
+ ? 'conversations.taskCard.state.failed'
+ : status === 'active'
+ ? 'conversations.backgroundTasks.statusRunning'
+ : 'orchestration.runStatus.pending'
+ );
return (
<li
- key={typeof step === "string" ? i : (step.id ?? i)}
+ key={typeof step === 'string' ? i : (step.id ?? i)}
data-testid={stepTestId}
data-status={status}
className={cn(
- "flex gap-2.5 text-[13.5px]",
- active && item.description ? "items-start" : "items-center",
- )}
- >
+ 'flex gap-2.5 text-[13.5px]',
+ active && item.description ? 'items-start' : 'items-center'
+ )}>
<span className="flex size-4 shrink-0 items-center justify-center">
{done ? (
- <CheckIcon
- aria-hidden
- className="text-muted-foreground size-3.5"
- />
+ <CheckIcon aria-hidden className="text-muted-foreground size-3.5" />
) : failed ? (
<XIcon aria-hidden className="text-destructive size-3.5" />
) : active ? (
@@ -105,12 +111,11 @@ export function AgentPlan({
<span className="min-w-0">
<span
className={cn(
- done && "text-muted-foreground",
- active && "text-foreground/90",
- failed && "text-destructive",
- !done && !active && !failed && "text-muted-foreground",
- )}
- >
+ done && 'text-muted-foreground',
+ active && 'text-foreground/90',
+ failed && 'text-destructive',
+ !done && !active && !failed && 'text-muted-foreground'
+ )}>
{item.label}
</span>
<span className="sr-only">{` ${statusText}`}</span>
diff --git a/app/src/components/assistant-ui/elements/agent-status.aui.tsx b/app/src/components/assistant-ui/elements/agent-status.aui.tsx
index 6fe37d0592..2c2e15a998 100644
--- a/app/src/components/assistant-ui/elements/agent-status.aui.tsx
+++ b/app/src/components/assistant-ui/elements/agent-status.aui.tsx
@@ -134,10 +134,10 @@ const TaskTrayItem: FC<{ task: TaskState }> = ({ task }) => {
<span className="sr-only">{state}</span>
<span className="min-w-0 flex-1 truncate">{taskLabel(task.toolName, task.args)}</span>
{meta !== undefined && (
- <span className={cn(mono, "text-muted-foreground max-w-24 shrink-0 truncate")}>{meta}</span>
+ <span className={cn(mono, 'text-muted-foreground max-w-24 shrink-0 truncate')}>{meta}</span>
)}
{elapsedMs !== undefined && (
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{formatElapsed(elapsedMs)}
</span>
)}
diff --git a/app/src/components/assistant-ui/elements/approval-card.tsx b/app/src/components/assistant-ui/elements/approval-card.tsx
index 8b1aee0ccb..4395503640 100644
--- a/app/src/components/assistant-ui/elements/approval-card.tsx
+++ b/app/src/components/assistant-ui/elements/approval-card.tsx
@@ -106,7 +106,8 @@ export function ApprovalCard({
</div>
</div>
- <div className={cn(field, 'text-muted-foreground rounded-xl px-3.5 py-2.5 font-mono text-xs')}>
+ <div
+ className={cn(field, 'text-muted-foreground rounded-xl px-3.5 py-2.5 font-mono text-xs')}>
{command}
</div>
@@ -144,7 +145,7 @@ export function ApprovalCard({
{...allowOnceProps}
className={cn(
inkButton,
- "h-8 px-3.5 text-xs font-medium whitespace-nowrap",
+ 'h-8 px-3.5 text-xs font-medium whitespace-nowrap',
allowOnceProps?.className
)}>
{allowOnceLabel}
diff --git a/app/src/components/assistant-ui/elements/background-inbox.tsx b/app/src/components/assistant-ui/elements/background-inbox.tsx
index 1eb30460b0..46a329e5c5 100644
--- a/app/src/components/assistant-ui/elements/background-inbox.tsx
+++ b/app/src/components/assistant-ui/elements/background-inbox.tsx
@@ -63,7 +63,7 @@ export function BackgroundInbox({
className={cn(
mono,
'tabular-nums',
- ready > 0 ? 'text-blue-600 dark:text-blue-400' : "text-muted-foreground"
+ ready > 0 ? 'text-blue-600 dark:text-blue-400' : 'text-muted-foreground'
)}>
{ready > 0 ? strings.ready(ready) : strings.inFlight(running)}
</span>
@@ -94,7 +94,7 @@ export function BackgroundInbox({
<span
className={cn(
'truncate text-[13px]',
- run.state === 'running' ? "text-muted-foreground" : 'text-foreground/90'
+ run.state === 'running' ? 'text-muted-foreground' : 'text-foreground/90'
)}>
{run.title}
</span>
@@ -103,7 +103,7 @@ export function BackgroundInbox({
)}
</span>
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{run.elapsed}
</span>
</>
diff --git a/app/src/components/assistant-ui/elements/code-diff.tsx b/app/src/components/assistant-ui/elements/code-diff.tsx
index a861629aae..8d56056585 100644
--- a/app/src/components/assistant-ui/elements/code-diff.tsx
+++ b/app/src/components/assistant-ui/elements/code-diff.tsx
@@ -61,7 +61,7 @@ export function CodeDiff({
key={`${cycle}-${i}-${line.text}`}
className={cn(
'fade-in animate-in fill-mode-both flex px-4 py-0.5 leading-relaxed whitespace-pre duration-300',
- line.kind === 'context' && "text-muted-foreground",
+ line.kind === 'context' && 'text-muted-foreground',
line.kind === 'added' &&
'bg-emerald-500/10 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300',
line.kind === 'removed' && 'bg-red-500/10 text-red-700 dark:text-red-300'
diff --git a/app/src/components/assistant-ui/elements/connection-state.tsx b/app/src/components/assistant-ui/elements/connection-state.tsx
index 69667259ca..a91e488c43 100644
--- a/app/src/components/assistant-ui/elements/connection-state.tsx
+++ b/app/src/components/assistant-ui/elements/connection-state.tsx
@@ -75,7 +75,7 @@ export function ConnectionState({
<Loader2Icon className="text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
<span className="min-w-0 flex-1 text-[13px]">{reconnectingLabel}</span>
{attempt !== undefined && (
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{attemptLabel(attempt)}
</span>
)}
@@ -87,7 +87,7 @@ export function ConnectionState({
<CheckIcon className="size-3.5 shrink-0 text-emerald-500" />
<span className="min-w-0 flex-1 text-[13px]">{resumedLabel}</span>
{resumedTokens !== undefined && (
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{resumedTokensLabel(resumedTokens)}
</span>
)}
diff --git a/app/src/components/assistant-ui/elements/context-breakdown.tsx b/app/src/components/assistant-ui/elements/context-breakdown.tsx
index 14dcdb92e0..d17577b1d8 100644
--- a/app/src/components/assistant-ui/elements/context-breakdown.tsx
+++ b/app/src/components/assistant-ui/elements/context-breakdown.tsx
@@ -68,7 +68,7 @@ export function ContextBreakdown({
className={cn(
mono,
'tabular-nums',
- pressure > 0.85 ? 'text-amber-600 dark:text-amber-400' : "text-muted-foreground"
+ pressure > 0.85 ? 'text-amber-600 dark:text-amber-400' : 'text-muted-foreground'
)}>
{formatTokenCount(used)} / {formatTokenCount(limit)}
</span>
@@ -88,7 +88,7 @@ export function ContextBreakdown({
aria-valuenow={announced(width)}
aria-valuetext={meterValueText(fmt(segment.tokens), fmt(limit))}
className={cn(
- "h-full transition-[width] duration-500 ease-out forced-color-adjust-none motion-reduce:transition-none",
+ 'h-full transition-[width] duration-500 ease-out forced-color-adjust-none motion-reduce:transition-none',
segment.tint
)}
style={{ width: `${width}%` }}
@@ -100,21 +100,27 @@ export function ContextBreakdown({
<div className="flex flex-col gap-1.5">
{segments.map(segment => (
<div key={segment.label} className="flex items-center gap-2">
- <span aria-hidden className={cn("size-2 shrink-0 rounded-full forced-color-adjust-none", segment.tint)} />
+ <span
+ aria-hidden
+ className={cn('size-2 shrink-0 rounded-full forced-color-adjust-none', segment.tint)}
+ />
<span className="text-muted-foreground min-w-0 flex-1 truncate text-[13px]">
{segment.label}
</span>
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{fmt(segment.tokens)}
</span>
</div>
))}
<div className="flex items-center gap-2">
- <span aria-hidden className="bg-foreground/[0.08] inset-ring-border size-2 shrink-0 rounded-full inset-ring forced-colors:border" />
+ <span
+ aria-hidden
+ className="bg-foreground/[0.08] inset-ring-border size-2 shrink-0 rounded-full inset-ring forced-colors:border"
+ />
<span className="text-muted-foreground min-w-0 flex-1 truncate text-[13px]">
{headroomLabel}
</span>
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{fmt(Math.max(0, limit - used))}
</span>
</div>
diff --git a/app/src/components/assistant-ui/elements/context-display.tsx b/app/src/components/assistant-ui/elements/context-display.tsx
index e053cfbc6d..d06d34a3b6 100644
--- a/app/src/components/assistant-ui/elements/context-display.tsx
+++ b/app/src/components/assistant-ui/elements/context-display.tsx
@@ -260,7 +260,7 @@ function ContextDisplayContent({
<div className="bg-muted inset-ring-border mt-2.5 h-1 overflow-hidden rounded-full inset-ring forced-colors:border">
<div
className={cn(
- "h-full w-(--usage-width) rounded-full transition-[width] duration-300 forced-color-adjust-none",
+ 'h-full w-(--usage-width) rounded-full transition-[width] duration-300 forced-color-adjust-none',
totalTokens > 0 && 'min-w-1',
getBarColor(percent)
)}
diff --git a/app/src/components/assistant-ui/elements/conversation-search.tsx b/app/src/components/assistant-ui/elements/conversation-search.tsx
index a6cad5a795..bd57af8e88 100644
--- a/app/src/components/assistant-ui/elements/conversation-search.tsx
+++ b/app/src/components/assistant-ui/elements/conversation-search.tsx
@@ -65,7 +65,7 @@ export function ConversationSearch({
aria-label={placeholder}
className="text-foreground/85 placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-[13px] outline-none"
/>
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{hits.length === 0 ? '0' : `${index + 1}/${hits.length}`}
</span>
{onStep && (
@@ -109,8 +109,10 @@ export function ConversationSearch({
key={hit.id}
aria-hidden
className={cn(
- "absolute inset-x-0 h-1 rounded-full transition-colors duration-200 forced-color-adjust-none",
- i === index ? "bg-amber-500 forced-colors:bg-[Highlight]" : "bg-amber-500/35 forced-colors:bg-[CanvasText]"
+ 'absolute inset-x-0 h-1 rounded-full transition-colors duration-200 forced-color-adjust-none',
+ i === index
+ ? 'bg-amber-500 forced-colors:bg-[Highlight]'
+ : 'bg-amber-500/35 forced-colors:bg-[CanvasText]'
)}
style={{ top: `${hit.position}%` }}
/>
diff --git a/app/src/components/assistant-ui/elements/data-table.tsx b/app/src/components/assistant-ui/elements/data-table.tsx
index 449ad3e972..6bdeebc7ff 100644
--- a/app/src/components/assistant-ui/elements/data-table.tsx
+++ b/app/src/components/assistant-ui/elements/data-table.tsx
@@ -57,7 +57,7 @@ export function DataTable<TRow>({
return (
<div
data-slot="data-table"
- className={cn(paper, "@container w-full overflow-hidden rounded-2xl", className)}
+ className={cn(paper, '@container w-full overflow-hidden rounded-2xl', className)}
{...props}>
<div className="flex items-center px-4 pt-3 pb-2">
{columns.map(column => (
diff --git a/app/src/components/assistant-ui/elements/elicitation-form.tsx b/app/src/components/assistant-ui/elements/elicitation-form.tsx
index 878f128161..eef61d745b 100644
--- a/app/src/components/assistant-ui/elements/elicitation-form.tsx
+++ b/app/src/components/assistant-ui/elements/elicitation-form.tsx
@@ -113,7 +113,7 @@ export function ElicitationForm({
'rounded-full px-2.5 py-1 text-xs transition-colors',
option === item.value
? 'bg-foreground text-background'
- : cn(field, "text-muted-foreground")
+ : cn(field, 'text-muted-foreground')
)}>
{option}
</span>
@@ -147,7 +147,7 @@ export function ElicitationForm({
}
className={cn(
field,
- "text-foreground/80 focus-visible:ring-foreground/20 rounded-lg px-2.5 py-1.5 text-xs outline-none focus-visible:ring-1"
+ 'text-foreground/80 focus-visible:ring-foreground/20 rounded-lg px-2.5 py-1.5 text-xs outline-none focus-visible:ring-1'
)}
/>
) : (
@@ -167,7 +167,7 @@ export function ElicitationForm({
onClick={onDecline}
{...declineProps}
className={cn(
- "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
+ 'text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]',
declineProps?.className
)}>
{declineLabel}
@@ -178,7 +178,7 @@ export function ElicitationForm({
{...acceptProps}
className={cn(
inkButton,
- "flex h-8 items-center rounded-full px-3.5 text-xs font-medium disabled:pointer-events-none disabled:opacity-40",
+ 'flex h-8 items-center rounded-full px-3.5 text-xs font-medium disabled:pointer-events-none disabled:opacity-40',
acceptProps?.className
)}>
{sendLabel}
diff --git a/app/src/components/assistant-ui/elements/image-generation.tsx b/app/src/components/assistant-ui/elements/image-generation.tsx
index 624d39317d..cf394125cf 100644
--- a/app/src/components/assistant-ui/elements/image-generation.tsx
+++ b/app/src/components/assistant-ui/elements/image-generation.tsx
@@ -88,7 +88,7 @@ export function ImageGeneration({
className={cn(
mono,
'absolute end-2.5 top-2.5 tabular-nums',
- generating ? "text-muted-foreground" : 'text-white/70'
+ generating ? 'text-muted-foreground' : 'text-white/70'
)}>
{dimensions}
</span>
diff --git a/app/src/components/assistant-ui/elements/job-progress.tsx b/app/src/components/assistant-ui/elements/job-progress.tsx
index bf3137af16..3a3291fa78 100644
--- a/app/src/components/assistant-ui/elements/job-progress.tsx
+++ b/app/src/components/assistant-ui/elements/job-progress.tsx
@@ -65,7 +65,7 @@ export function JobProgress({
<Loader2Icon className="text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
)}
<span className="min-w-0 flex-1 truncate text-[13.5px] font-medium">{title}</span>
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{finished ? 'done' : eta}
</span>
{!finished && (
@@ -88,7 +88,7 @@ export function JobProgress({
className="bg-foreground/[0.06] inset-ring-border h-1 w-full overflow-hidden rounded-full inset-ring forced-colors:border">
<span
className={cn(
- "block h-full rounded-full transition-[width] duration-500 ease-out forced-color-adjust-none motion-reduce:transition-none",
+ 'block h-full rounded-full transition-[width] duration-500 ease-out forced-color-adjust-none motion-reduce:transition-none',
finished ? 'bg-emerald-500' : 'bg-blue-500 dark:bg-blue-400'
)}
style={{ width: `${overall}%` }}
diff --git a/app/src/components/assistant-ui/elements/memory-chips.tsx b/app/src/components/assistant-ui/elements/memory-chips.tsx
index c6b1f9d3c1..accf9c7e49 100644
--- a/app/src/components/assistant-ui/elements/memory-chips.tsx
+++ b/app/src/components/assistant-ui/elements/memory-chips.tsx
@@ -60,7 +60,7 @@ export function MemoryChips({
className={cn(
'fade-in zoom-in-95 animate-in fill-mode-both group flex items-center gap-1 rounded-full py-1 pr-1 pl-2.5 text-xs duration-300',
chip.change === 'existing'
- ? cn(field, "text-muted-foreground")
+ ? cn(field, 'text-muted-foreground')
: 'bg-blue-500/12 text-blue-700 dark:bg-blue-400/15 dark:text-blue-300'
)}>
{chip.text}
diff --git a/app/src/components/assistant-ui/elements/message-queue.tsx b/app/src/components/assistant-ui/elements/message-queue.tsx
index bb39257c32..23f0ebe186 100644
--- a/app/src/components/assistant-ui/elements/message-queue.tsx
+++ b/app/src/components/assistant-ui/elements/message-queue.tsx
@@ -109,7 +109,9 @@ export function MessageQueueItem({
field,
'fade-in slide-in-from-bottom-1 animate-in fill-mode-both flex items-center gap-2.5 rounded-2xl py-2 pr-2 pl-3 duration-300'
)}>
- <span className={cn(mono, 'text-muted-foreground w-3 shrink-0 tabular-nums')}>{position}</span>
+ <span className={cn(mono, 'text-muted-foreground w-3 shrink-0 tabular-nums')}>
+ {position}
+ </span>
<span className="text-muted-foreground min-w-0 flex-1 truncate text-[13.5px]">{text}</span>
<ArrowUpIcon aria-hidden className="text-muted-foreground size-3 shrink-0" />
{action}
diff --git a/app/src/components/assistant-ui/elements/permission-grant.tsx b/app/src/components/assistant-ui/elements/permission-grant.tsx
index d1553cb5a9..e05f7cf876 100644
--- a/app/src/components/assistant-ui/elements/permission-grant.tsx
+++ b/app/src/components/assistant-ui/elements/permission-grant.tsx
@@ -116,7 +116,7 @@ export function PermissionGrant({
onClick={() => onGrant('denied')}
{...denyProps}
className={cn(
- "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
+ 'text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]',
denyProps?.className
)}>
{denyLabel}
@@ -126,7 +126,7 @@ export function PermissionGrant({
onClick={() => onGrant('session')}
{...sessionProps}
className={cn(
- "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
+ 'text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]',
sessionProps?.className
)}>
{sessionLabel}
@@ -149,7 +149,7 @@ export function PermissionGrant({
className={cn(
field,
mono,
- "fade-in animate-in text-muted-foreground rounded-full px-2.5 py-1.5 duration-300"
+ 'fade-in animate-in text-muted-foreground rounded-full px-2.5 py-1.5 duration-300'
)}>
{pendingLabel}
</span>
@@ -160,7 +160,7 @@ export function PermissionGrant({
className={cn(
field,
mono,
- "fade-in animate-in text-muted-foreground rounded-full px-2.5 py-1.5 duration-300"
+ 'fade-in animate-in text-muted-foreground rounded-full px-2.5 py-1.5 duration-300'
)}>
{scope === 'denied' ? deniedLabel : grantedLabel(scope)}
</span>
diff --git a/app/src/components/assistant-ui/elements/reasoning-panel.tsx b/app/src/components/assistant-ui/elements/reasoning-panel.tsx
index 4e47bc55da..e6d019ca89 100644
--- a/app/src/components/assistant-ui/elements/reasoning-panel.tsx
+++ b/app/src/components/assistant-ui/elements/reasoning-panel.tsx
@@ -260,7 +260,7 @@ export function ReasoningPanel({
data-testid={testId}
open={isOpen}
onOpenChange={handleOpenChange}
- className={cn("w-full max-w-sm", className)}>
+ className={cn('w-full max-w-sm', className)}>
<CollapsibleTrigger
disabled={shown.length === 0}
className="group/trigger text-muted-foreground hover:text-foreground/90 flex items-center gap-1.5 py-1 text-[13.5px] transition-[color,scale] outline-none active:scale-[0.98]">
diff --git a/app/src/components/assistant-ui/elements/stopped-run.tsx b/app/src/components/assistant-ui/elements/stopped-run.tsx
index 5f4af3d5e9..947891746f 100644
--- a/app/src/components/assistant-ui/elements/stopped-run.tsx
+++ b/app/src/components/assistant-ui/elements/stopped-run.tsx
@@ -49,7 +49,7 @@ export function StoppedRun({
className={cn(
field,
mono,
- "text-muted-foreground inline-flex items-center gap-1.5 rounded-full px-2.5 py-1"
+ 'text-muted-foreground inline-flex items-center gap-1.5 rounded-full px-2.5 py-1'
)}>
<SquareIcon className="size-2.5 fill-current" />
{reason}
diff --git a/app/src/components/assistant-ui/elements/subagent-list.tsx b/app/src/components/assistant-ui/elements/subagent-list.tsx
index 80c097df91..d957260cfc 100644
--- a/app/src/components/assistant-ui/elements/subagent-list.tsx
+++ b/app/src/components/assistant-ui/elements/subagent-list.tsx
@@ -47,7 +47,7 @@ export function SubagentList({
return (
<div
data-slot="subagent-list"
- className={cn("flex w-full max-w-xs flex-col gap-2", className)}
+ className={cn('flex w-full max-w-xs flex-col gap-2', className)}
{...props}>
{agents.map((agent, index) => {
const done = agent.done ?? index < completedCount;
@@ -76,7 +76,7 @@ export function SubagentList({
className="bg-foreground/[0.06] inset-ring-border h-[3px] w-full overflow-hidden rounded-full inset-ring forced-colors:outline">
<span
className={cn(
- "block h-full rounded-full transition-[width] duration-700 forced-color-adjust-none",
+ 'block h-full rounded-full transition-[width] duration-700 forced-color-adjust-none',
done ? 'bg-emerald-500/70' : 'bg-foreground/60'
)}
style={{ width: `${percentage}%` }}
diff --git a/app/src/components/assistant-ui/elements/task-card.tsx b/app/src/components/assistant-ui/elements/task-card.tsx
index 242ab0f081..d746dd4c8f 100644
--- a/app/src/components/assistant-ui/elements/task-card.tsx
+++ b/app/src/components/assistant-ui/elements/task-card.tsx
@@ -47,14 +47,14 @@ export function TaskStateIcon({ state, className }: { state: TaskCardState; clas
);
}
if (state === 'cancelled') {
- return <Ban aria-hidden className={cn("text-muted-foreground size-3.5 shrink-0", className)} />;
+ return <Ban aria-hidden className={cn('text-muted-foreground size-3.5 shrink-0', className)} />;
}
if (state === 'working') {
return (
<Loader2Icon
aria-hidden
className={cn(
- "text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none",
+ 'text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none',
className
)}
/>
@@ -121,16 +121,18 @@ export function TaskCard({
<span className="sr-only">{t(`conversations.taskCard.state.${state}`)}</span>
<span className="min-w-0 flex-1 truncate text-[13.5px]">{label}</span>
{meta !== undefined && (
- <span className={cn(mono, "text-muted-foreground max-w-24 shrink-0 truncate")}>{meta}</span>
+ <span className={cn(mono, 'text-muted-foreground max-w-24 shrink-0 truncate')}>
+ {meta}
+ </span>
)}
{elapsed !== undefined && (
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>{elapsed}</span>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>{elapsed}</span>
)}
{hasTranscript && (
<ChevronRightIcon
aria-hidden
className={cn(
- "text-muted-foreground size-3 shrink-0 transition-transform duration-200 motion-reduce:transition-none",
+ 'text-muted-foreground size-3 shrink-0 transition-transform duration-200 motion-reduce:transition-none',
isOpen && 'rotate-90'
)}
/>
diff --git a/app/src/components/assistant-ui/elements/terminal-block.tsx b/app/src/components/assistant-ui/elements/terminal-block.tsx
index df191ceca4..b9c1d46cf3 100644
--- a/app/src/components/assistant-ui/elements/terminal-block.tsx
+++ b/app/src/components/assistant-ui/elements/terminal-block.tsx
@@ -54,7 +54,7 @@ export function TerminalBlock({
<div className="flex items-center justify-between gap-3 px-4 pt-3 pb-1.5">
<span
className={cn(
- "min-w-0 break-words",
+ 'min-w-0 break-words',
ink ? 'text-background/90 dark:text-foreground/90' : 'text-foreground/90'
)}>
{command}
@@ -77,8 +77,8 @@ export function TerminalBlock({
) : (
<Loader2Icon
className={cn(
- "size-3 animate-spin motion-reduce:animate-none",
- ink ? "text-background/35 dark:text-muted-foreground" : "text-muted-foreground"
+ 'size-3 animate-spin motion-reduce:animate-none',
+ ink ? 'text-background/35 dark:text-muted-foreground' : 'text-muted-foreground'
)}
/>
)}
diff --git a/app/src/components/assistant-ui/elements/timeline.tsx b/app/src/components/assistant-ui/elements/timeline.tsx
index f785501da4..1f5500cddf 100644
--- a/app/src/components/assistant-ui/elements/timeline.tsx
+++ b/app/src/components/assistant-ui/elements/timeline.tsx
@@ -60,9 +60,10 @@ export function Timeline({
<span
className={cn(
'mt-1 size-2 shrink-0 rounded-full',
- event.when === 'now' && "bg-blue-500 ring-4 ring-blue-500/15 dark:bg-blue-400 forced-colors:bg-[Highlight]",
- event.when === 'past' && "bg-muted-foreground forced-colors:bg-[CanvasText]",
- event.when === 'future' && "border-muted-foreground border bg-transparent"
+ event.when === 'now' &&
+ 'bg-blue-500 ring-4 ring-blue-500/15 dark:bg-blue-400 forced-colors:bg-[Highlight]',
+ event.when === 'past' && 'bg-muted-foreground forced-colors:bg-[CanvasText]',
+ event.when === 'future' && 'border-muted-foreground border bg-transparent'
)}
/>
{i < shown.length - 1 && (
@@ -79,7 +80,7 @@ export function Timeline({
<span
className={cn(
'text-[13px] break-words',
- event.when === 'future' ? "text-muted-foreground" : 'text-foreground/90',
+ event.when === 'future' ? 'text-muted-foreground' : 'text-foreground/90',
event.when === 'now' && 'font-medium'
)}>
{event.title}
diff --git a/app/src/components/assistant-ui/elements/tool-call.tsx b/app/src/components/assistant-ui/elements/tool-call.tsx
index 15766bf330..9e9d798731 100644
--- a/app/src/components/assistant-ui/elements/tool-call.tsx
+++ b/app/src/components/assistant-ui/elements/tool-call.tsx
@@ -81,7 +81,7 @@ export function ToolCall({
open={open}
defaultOpen={defaultOpen}
onOpenChange={onOpenChange}
- className={cn("w-full max-w-sm", className)}
+ className={cn('w-full max-w-sm', className)}
{...props}>
<CollapsibleTrigger
disabled={!hasPanel}
diff --git a/app/src/components/assistant-ui/elements/tool-error.tsx b/app/src/components/assistant-ui/elements/tool-error.tsx
index faabee94d2..98b5fb2d5d 100644
--- a/app/src/components/assistant-ui/elements/tool-error.tsx
+++ b/app/src/components/assistant-ui/elements/tool-error.tsx
@@ -64,7 +64,7 @@ export function ToolError({
<AlertCircleIcon className="size-3.5 shrink-0 text-red-500" />
<span className={cn(mono, 'text-muted-foreground shrink-0')}>{name}</span>
<span className="text-foreground/80 min-w-0 flex-1 truncate text-[13px]">{target}</span>
- <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
+ <span className={cn(mono, 'text-muted-foreground shrink-0 tabular-nums')}>
{attempt}/{maxAttempts}
</span>
</div>
@@ -72,7 +72,7 @@ export function ToolError({
<div
className={cn(
field,
- "rounded-xl px-3 py-2 font-mono text-[11px] leading-relaxed break-words text-red-700 dark:text-red-300"
+ 'rounded-xl px-3 py-2 font-mono text-[11px] leading-relaxed break-words text-red-700 dark:text-red-300'
)}>
{message}
</div>
diff --git a/app/src/components/assistant-ui/elements/tool-fallback.tsx b/app/src/components/assistant-ui/elements/tool-fallback.tsx
index 35dd29862c..80e94a3072 100644
--- a/app/src/components/assistant-ui/elements/tool-fallback.tsx
+++ b/app/src/components/assistant-ui/elements/tool-fallback.tsx
@@ -167,7 +167,7 @@ function ToolFallbackTrigger({
<CollapsibleTrigger
data-slot="tool-fallback-trigger"
className={cn(
- "aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit max-w-full origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]",
+ 'aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit max-w-full origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]',
className
)}
{...props}>
@@ -221,12 +221,12 @@ function ToolFallbackContent({
<CollapsibleContent
data-slot="tool-fallback-content"
className={cn(
- "aui-tool-fallback-content relative overflow-hidden text-sm outline-none",
+ 'aui-tool-fallback-content relative overflow-hidden text-sm outline-none',
'group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none',
- "data-[state=closed]:animate-collapsible-up",
- "data-[state=open]:animate-collapsible-down",
- "data-[state=closed]:fill-mode-forwards",
- "data-[state=closed]:pointer-events-none",
+ 'data-[state=closed]:animate-collapsible-up',
+ 'data-[state=open]:animate-collapsible-down',
+ 'data-[state=closed]:fill-mode-forwards',
+ 'data-[state=closed]:pointer-events-none',
'[--tw-duration:var(--animation-duration)]',
className
)}
diff --git a/app/src/components/assistant-ui/elements/web-preview.tsx b/app/src/components/assistant-ui/elements/web-preview.tsx
index 6586d57932..b8e9228bd4 100644
--- a/app/src/components/assistant-ui/elements/web-preview.tsx
+++ b/app/src/components/assistant-ui/elements/web-preview.tsx
@@ -67,7 +67,7 @@ export function WebPreview({
field,
'flex min-w-0 flex-1 items-center gap-1.5 rounded-full px-2.5 py-1'
)}>
- <span className={cn(mono, "text-muted-foreground min-w-0 truncate")}>{origin}</span>
+ <span className={cn(mono, 'text-muted-foreground min-w-0 truncate')}>{origin}</span>
</span>
<button
diff --git a/app/src/components/assistant-ui/elements/web-search.tsx b/app/src/components/assistant-ui/elements/web-search.tsx
index 1f2d686be9..eb095060ae 100644
--- a/app/src/components/assistant-ui/elements/web-search.tsx
+++ b/app/src/components/assistant-ui/elements/web-search.tsx
@@ -71,7 +71,7 @@ export function WebSearch({
data-slot="web-search-query"
className={cn(
field,
- "text-muted-foreground inline-flex w-fit items-center gap-1.5 rounded-full px-3.5 py-2 text-xs"
+ 'text-muted-foreground inline-flex w-fit items-center gap-1.5 rounded-full px-3.5 py-2 text-xs'
)}>
<SearchIcon className="text-muted-foreground size-3 shrink-0" />
<span className="truncate">{query}</span>
diff --git a/app/src/components/assistant-ui/markdown-text.tsx b/app/src/components/assistant-ui/markdown-text.tsx
index e48ded6bf2..d8d651beff 100644
--- a/app/src/components/assistant-ui/markdown-text.tsx
+++ b/app/src/components/assistant-ui/markdown-text.tsx
@@ -300,7 +300,10 @@ const defaultComponents = memoizeMarkdownComponents({
if (source) return <CitationMarker index={citationIndex} source={source} />;
return (
<a
- className={cn("aui-md-a text-primary hover:text-primary/80 underline underline-offset-2", className)}
+ className={cn(
+ 'aui-md-a text-primary hover:text-primary/80 underline underline-offset-2',
+ className
+ )}
href={href}
{...props}>
{children}
@@ -340,10 +343,7 @@ const defaultComponents = memoizeMarkdownComponents({
),
table: ({ className, ...props }) => (
<table
- className={cn(
- "aui-md-table w-full border-separate border-spacing-0",
- className
- )}
+ className={cn('aui-md-table w-full border-separate border-spacing-0', className)}
{...props}
/>
),
diff --git a/app/src/components/assistant-ui/model-selector.tsx b/app/src/components/assistant-ui/model-selector.tsx
index 79aedbc774..3b3ca0e931 100644
--- a/app/src/components/assistant-ui/model-selector.tsx
+++ b/app/src/components/assistant-ui/model-selector.tsx
@@ -425,7 +425,7 @@ function ModelSelectorList({ className, children, ...props }: ModelSelectorListP
<CommandList
data-slot="model-selector-list"
className={cn(
- "[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
+ '[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden',
className
)}
{...props}>
@@ -582,7 +582,7 @@ function ModelSelectorEffort({
key={option.id}
value={option.id}
className={cn(
- "focus-visible:ring-ring/50 text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer rounded-md px-2 py-1 text-xs transition-colors outline-none focus-visible:ring-1",
+ 'focus-visible:ring-ring/50 text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer rounded-md px-2 py-1 text-xs transition-colors outline-none focus-visible:ring-1',
'data-checked:bg-accent data-checked:text-accent-foreground data-checked:font-medium'
)}>
{option.name}
diff --git a/app/src/components/assistant-ui/thread.tsx b/app/src/components/assistant-ui/thread.tsx
index 6db50468b0..d919a5de8a 100644
--- a/app/src/components/assistant-ui/thread.tsx
+++ b/app/src/components/assistant-ui/thread.tsx
@@ -477,7 +477,7 @@ const ThreadRoot: FC<{
<ThreadPrimitive.ViewportFooter
className={cn(
- "aui-thread-viewport-footer bg-background flex flex-col gap-4 overflow-visible pb-4 md:pb-6",
+ 'aui-thread-viewport-footer bg-background flex flex-col gap-4 overflow-visible pb-4 md:pb-6',
!isEmpty && 'sticky bottom-0 mt-auto rounded-t-(--composer-radius)'
)}>
<ThreadScrollToBottom />
@@ -1505,7 +1505,9 @@ const EditComposer: FC = () => {
const { t } = useT();
const discardedReplies = useAuiState(selectDiscardedReplies);
return (
- <MessagePrimitive.Root data-slot="aui_edit-composer-wrapper" className="flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]">
+ <MessagePrimitive.Root
+ data-slot="aui_edit-composer-wrapper"
+ className="flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]">
<ComposerPrimitive.Root
data-slot="edit-message"
className="bg-background border-border/60 ms-auto flex w-full flex-col gap-3 rounded-2xl border p-3.5">
diff --git a/app/src/features/conversations/aui/PinnedTodoCard.test.tsx b/app/src/features/conversations/aui/PinnedTodoCard.test.tsx
index c9a9295461..acdf0844fb 100644
--- a/app/src/features/conversations/aui/PinnedTodoCard.test.tsx
+++ b/app/src/features/conversations/aui/PinnedTodoCard.test.tsx
@@ -11,7 +11,6 @@ const active: TodoItem[] = [
{ id: '2', text: 'Step two', status: 'active' },
];
describe('PinnedTodoCard', () => {
-
it('renders the live progress using the assistant-ui agent plan', () => {
const { container } = render(<PinnedTodoCard threadId="t1" items={active} />);
expect(container.querySelector('[data-slot="agent-plan"]')).toBeInTheDocument();
diff --git a/app/src/features/conversations/aui/PinnedTodoCard.tsx b/app/src/features/conversations/aui/PinnedTodoCard.tsx
index 42f1b62658..bad80a14b9 100644
--- a/app/src/features/conversations/aui/PinnedTodoCard.tsx
+++ b/app/src/features/conversations/aui/PinnedTodoCard.tsx
@@ -3,7 +3,15 @@ import { AgentPlan } from '../../../components/assistant-ui/elements/agent-plan'
import { type TodoItem, todoProgress } from '../../../components/assistant-ui/elements/todo-list';
import { useT } from '../../../lib/i18n/I18nContext';
-export function PinnedTodoCard({ threadId, items, className }: { threadId: string; items: readonly TodoItem[]; className?: string }) {
+export function PinnedTodoCard({
+ threadId,
+ items,
+ className,
+}: {
+ threadId: string;
+ items: readonly TodoItem[];
+ className?: string;
+}) {
const { t } = useT();
const progress = todoProgress(items);
return (
@@ -13,7 +21,11 @@ export function PinnedTodoCard({ threadId, items, className }: { threadId: strin
data-todo-completed={progress.done}
data-todo-total={progress.total}
title={t('conversations.runMode.plan')}
- steps={items.map(item => ({ id: item.id, label: item.reason && item.status === 'failed' ? `${item.text} — ${item.reason}` : item.text }))}
+ steps={items.map(item => ({
+ id: item.id,
+ label:
+ item.reason && item.status === 'failed' ? `${item.text} — ${item.reason}` : item.text,
+ }))}
statuses={items.map(item => item.status)}
activeIndex={progress.done}
stepTestId="todo-item"
diff --git a/app/src/index.css b/app/src/index.css
index 12e8b0ef71..489eabee95 100644
--- a/app/src/index.css
+++ b/app/src/index.css
@@ -902,4 +902,3 @@
--cmd-overlay: rgb(var(--surface-overlay) / 0.7);
--cmd-shadow-palette: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.25);
}
-