Skip to content

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

chore: fix formatting and import order in multiple files

Steven Enamakelf76d40787362
diff --git a/app/src/components/assistant-ui/thread.tsx b/app/src/components/assistant-ui/thread.tsx
index 5986a2bc41..996fadf439 100644
--- a/app/src/components/assistant-ui/thread.tsx
+++ b/app/src/components/assistant-ui/thread.tsx
@@ -460,18 +460,18 @@ const ComposerAction: FC<{
<ArrowUpIcon className="aui-composer-send-icon size-4" />
</TooltipIconButton>
) : (
- <ComposerPrimitive.Send asChild>
- <TooltipIconButton
- tooltip="Send message"
- side="bottom"
- type="button"
- variant="default"
- size="icon"
- className="aui-composer-send size-7 rounded-full"
- aria-label="Send message">
- <ArrowUpIcon className="aui-composer-send-icon size-4" />
- </TooltipIconButton>
- </ComposerPrimitive.Send>
+ <ComposerPrimitive.Send asChild>
+ <TooltipIconButton
+ tooltip="Send message"
+ side="bottom"
+ type="button"
+ variant="default"
+ size="icon"
+ className="aui-composer-send size-7 rounded-full"
+ aria-label="Send message">
+ <ArrowUpIcon className="aui-composer-send-icon size-4" />
+ </TooltipIconButton>
+ </ComposerPrimitive.Send>
)}
</AuiIf>
<AuiIf condition={s => s.thread.isRunning}>
diff --git a/app/src/features/conversations/components/AssistantUiChat.tsx b/app/src/features/conversations/components/AssistantUiChat.tsx
index 0ace0ecd66..9a0c11f99f 100644
--- a/app/src/features/conversations/components/AssistantUiChat.tsx
+++ b/app/src/features/conversations/components/AssistantUiChat.tsx
@@ -3,6 +3,8 @@ import { type AssistantState, useAui, useAuiState } from '@assistant-ui/react';
import { PlusIcon } from 'lucide-react';
import { type ReactNode, useCallback, useEffect, useMemo, useRef } from 'react';
+import AttachmentPreview from '../../../components/chat/AttachmentPreview';
+import { Button } from '../../../components/ui';
import type { Attachment } from '../../../lib/attachments';
import { useRegisterAction } from '../../../lib/commands/useRegisterAction';
import { useSlashCommands } from '../../../lib/commands/useSlashCommands';
@@ -10,8 +12,6 @@ import { useT } from '../../../lib/i18n/I18nContext';
import { AssistantUiRuntimeProvider } from '../../../providers/AssistantUiRuntimeProvider';
import { emptySessionTokenUsage } from '../../../store/chatRuntimeSlice';
import { useAppSelector } from '../../../store/hooks';
-import AttachmentPreview from '../../../components/chat/AttachmentPreview';
-import { Button } from '../../../components/ui';
import { ChatToolFallback, ChatToolGroup } from './ChatToolParts';
import { contextUsageFromTokenUsage, ContextWindowPill } from './composer/ContextWindowPill';
import {
diff --git a/app/src/lib/cn.test.ts b/app/src/lib/cn.test.ts
index ddaa8e8aaf..2d91367ce8 100644
--- a/app/src/lib/cn.test.ts
+++ b/app/src/lib/cn.test.ts
@@ -9,9 +9,10 @@ import { cn } from './cn';
const themeSource = readFileSync(resolve(process.cwd(), 'src/index.css'), 'utf8');
const themeKeys = (prefix: string): string[] =>
- Array.from(themeSource.matchAll(new RegExp(`--${prefix}-([\\w-]+):`, 'g')), match => match[1]).filter(
- key => !key.includes('--')
- );
+ Array.from(
+ themeSource.matchAll(new RegExp(`--${prefix}-([\\w-]+):`, 'g')),
+ match => match[1]
+ ).filter(key => !key.includes('--'));
describe('cn', () => {
it('flattens conditionals like clsx', () => {
diff --git a/app/src/providers/assistantUiMessages.ts b/app/src/providers/assistantUiMessages.ts
index 9f84622d4a..1fc482a995 100644
--- a/app/src/providers/assistantUiMessages.ts
+++ b/app/src/providers/assistantUiMessages.ts
@@ -4,8 +4,8 @@ import type {
ThreadUserMessagePart,
} from '@assistant-ui/react';
-import { unwrapToolCallEnvelope } from '../lib/chat/toolCallEnvelope';
import { parseMessageImages } from '../lib/attachments';
+import { unwrapToolCallEnvelope } from '../lib/chat/toolCallEnvelope';
import type {
ProcessingTranscriptItem,
StreamingAssistantState,
@@ -137,7 +137,9 @@ function assistantParts(
}
function stringArray(value: unknown): string[] {
- return Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : [];
+ return Array.isArray(value)
+ ? value.filter((item): item is string => typeof item === 'string')
+ : [];
}
function mimeTypeFromDataUri(dataUri: string): string {
@@ -177,12 +179,7 @@ function userParts(msg: ThreadMessage): ThreadUserMessagePart[] {
continue;
}
const data = dataUris[index] ?? '';
- parts.push({
- type: 'file',
- filename,
- data,
- mimeType: mimeTypeFromDataUri(data),
- });
+ parts.push({ type: 'file', filename, data, mimeType: mimeTypeFromDataUri(data) });
}
return parts;
}
@@ -201,10 +198,7 @@ export function toThreadMessageLike(
const converted: ThreadMessageLike = {
id: msg.id,
role: msg.sender === 'agent' ? 'assistant' : 'user',
- content:
- msg.sender === 'agent'
- ? assistantParts(text, timeline, transcript)
- : userParts(msg),
+ content: msg.sender === 'agent' ? assistantParts(text, timeline, transcript) : userParts(msg),
createdAt: new Date(msg.createdAt),
...(msg.sender === 'agent' && msg.extraMetadata?.stopped === true
? { status: { type: 'incomplete' as const, reason: 'cancelled' as const } }