Skip to content

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

chore: reorder imports and reformat long expressions

Steven Enamakel226640b8759a
diff --git a/app/src/components/assistant-ui/elements/task-card.aui.tsx b/app/src/components/assistant-ui/elements/task-card.aui.tsx
index eb1c2f4c5d..57bee4fb3e 100644
--- a/app/src/components/assistant-ui/elements/task-card.aui.tsx
+++ b/app/src/components/assistant-ui/elements/task-card.aui.tsx
@@ -114,7 +114,9 @@ export const TaskTranscript: FC<{
roleLabels?: TaskTranscriptRoleLabels;
}> = ({ messages, roleLabels = DEFAULT_ROLE_LABELS }) => (
<ReadonlyThreadProvider messages={messages}>
- <ThreadPrimitive.Messages>{() => <NestedMessage roleLabels={roleLabels} />}</ThreadPrimitive.Messages>
+ <ThreadPrimitive.Messages>
+ {() => <NestedMessage roleLabels={roleLabels} />}
+ </ThreadPrimitive.Messages>
</ReadonlyThreadProvider>
);
diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsx
index 5a9f5703fc..55eb92b78c 100644
--- a/app/src/features/conversations/Conversations.tsx
+++ b/app/src/features/conversations/Conversations.tsx
@@ -7,11 +7,11 @@ import { checkPromptInjection, promptGuardMessage } from '../../chat/promptInjec
import { trackAnalyticsEvent } from '../../components/analytics';
import { AgentStatus } from '../../components/assistant-ui/elements/agent-status';
import { TodoList } from '../../components/assistant-ui/elements/todo-list';
-import { ArtifactCardAdapter } from '../../features/conversations/aui/ArtifactCardAdapter';
import ChatFilesChip from '../../components/chat/ChatFilesChip';
import WorkflowProposalCard from '../../components/chat/WorkflowProposalCard';
import { ConfirmationModal } from '../../components/intelligence/ConfirmationModal';
import { SidebarContent } from '../../components/layout/shell/SidebarSlot';
+import { ArtifactCardAdapter } from '../../features/conversations/aui/ArtifactCardAdapter';
import { ContextUsage } from '../../features/conversations/aui/ContextUsage';
import { PlanReviewCardCore } from '../../features/conversations/aui/PlanReviewPart';
import { RunModeToggle } from '../../features/conversations/aui/RunModeToggle';
@@ -28,13 +28,13 @@ import {
} from '../../features/conversations/aui/useThreadTodos';
import { AssistantUiChat } from '../../features/conversations/components/AssistantUiChat';
import { TranscriptOverlays } from '../../features/conversations/components/aui/TranscriptOverlays';
-import { selectBackgroundProcesses } from '../../features/conversations/selectors/backgroundProcesses';
import {
evaluateComposerSend,
getComposerBlockedSendFeedback,
handleComposerSlashCommand,
} from '../../features/conversations/composerSendDecision';
import { useMemorySyncActive } from '../../features/conversations/hooks/useBackgroundActivity';
+import { selectBackgroundProcesses } from '../../features/conversations/selectors/backgroundProcesses';
import {
GENERAL_TAB_VALUE,
isThreadVisibleInTab,
diff --git a/app/src/features/conversations/aui/ArtifactCardAdapter.tsx b/app/src/features/conversations/aui/ArtifactCardAdapter.tsx
index bb6a19e489..bdb9dcd6d3 100644
--- a/app/src/features/conversations/aui/ArtifactCardAdapter.tsx
+++ b/app/src/features/conversations/aui/ArtifactCardAdapter.tsx
@@ -20,10 +20,10 @@ import { FileTextIcon, ImageIcon, PresentationIcon } from 'lucide-react';
import type { ElementType } from 'react';
import { ArtifactCard } from '../../../components/assistant-ui/elements/artifact-card';
+import { Button } from '../../../components/ui';
import { formatFileSize } from '../../../lib/attachments';
import { useT } from '../../../lib/i18n/I18nContext';
import type { ArtifactSnapshot } from '../../../store/chatRuntimeSlice';
-import { Button } from '../../../components/ui';
const KIND_ICONS: Record<ArtifactSnapshot['kind'], ElementType> = {
presentation: PresentationIcon,
diff --git a/app/src/features/conversations/aui/BackgroundInboxCard.tsx b/app/src/features/conversations/aui/BackgroundInboxCard.tsx
index ce5fb53959..3d7b8d0b8d 100644
--- a/app/src/features/conversations/aui/BackgroundInboxCard.tsx
+++ b/app/src/features/conversations/aui/BackgroundInboxCard.tsx
@@ -18,21 +18,21 @@
* `BackgroundProcessesPanel`'s `onOpenProcess` used, now threaded through
* `TranscriptOverlays`.
*/
-import { JobProgress, type JobStage } from '../../../components/assistant-ui/elements/job-progress';
-import { Timeline, type TimelineEvent } from '../../../components/assistant-ui/elements/timeline';
import {
BackgroundInbox,
type BackgroundRun,
type BackgroundState,
} from '../../../components/assistant-ui/elements/background-inbox';
+import { JobProgress, type JobStage } from '../../../components/assistant-ui/elements/job-progress';
+import { Timeline, type TimelineEvent } from '../../../components/assistant-ui/elements/timeline';
import { formatElapsed } from '../../../components/assistant-ui/utils/task';
import Button from '../../../components/ui/Button';
import { SheetContent, SheetRoot, SheetTitle } from '../../../components/ui/Sheet';
import { useT } from '../../../lib/i18n/I18nContext';
+import type { CoreCronJob } from '../../../utils/tauriCommands/cron';
import { type MemorySyncSummary, useBackgroundActivity } from '../hooks/useBackgroundActivity';
import type { BackgroundProcess } from '../selectors/backgroundProcesses';
import { formatRelativeTime, formatResetTime } from '../utils/format';
-import type { CoreCronJob } from '../../../utils/tauriCommands/cron';
function stateOf(status: BackgroundProcess['status']): BackgroundState {
if (status === 'running' || status === 'awaiting_user') return 'running';
diff --git a/app/src/features/conversations/aui/MediaAndDocumentCalls.tsx b/app/src/features/conversations/aui/MediaAndDocumentCalls.tsx
index 94a2b1a20d..aebd399802 100644
--- a/app/src/features/conversations/aui/MediaAndDocumentCalls.tsx
+++ b/app/src/features/conversations/aui/MediaAndDocumentCalls.tsx
@@ -140,7 +140,12 @@ export const DocumentArtifactCall: ToolCallMessagePartComponent = ({
if (failedArtifact) {
return (
<div className="flex flex-col items-start gap-1.5">
- <ArtifactCard title={title} meta={t('chat.artifact.failed')} generating={false} icon={Icon} />
+ <ArtifactCard
+ title={title}
+ meta={t('chat.artifact.failed')}
+ generating={false}
+ icon={Icon}
+ />
{threadId ? (
<Button
variant="secondary"
diff --git a/app/src/features/conversations/aui/ParallelAgentsCard.tsx b/app/src/features/conversations/aui/ParallelAgentsCard.tsx
index 0a81cdfddd..38f26c0899 100644
--- a/app/src/features/conversations/aui/ParallelAgentsCard.tsx
+++ b/app/src/features/conversations/aui/ParallelAgentsCard.tsx
@@ -17,10 +17,16 @@
*/
import type { ToolCallMessagePartComponent } from '@assistant-ui/react';
-import { type SubagentItem, SubagentList } from '../../../components/assistant-ui/elements/subagent-list';
+import {
+ type SubagentItem,
+ SubagentList,
+} from '../../../components/assistant-ui/elements/subagent-list';
import { useT } from '../../../lib/i18n/I18nContext';
import { useAuiThreadId } from '../../../providers/AssistantUiRuntimeProvider';
-import { isActiveTimelineStatus, selectSubagentChildrenByParentCallId } from '../../../store/chatRuntimeSlice';
+import {
+ isActiveTimelineStatus,
+ selectSubagentChildrenByParentCallId,
+} from '../../../store/chatRuntimeSlice';
import { useAppSelector } from '../../../store/hooks';
import { SubagentActivityCard } from './SubagentActivityCard';
@@ -28,15 +34,26 @@ const EMPTY_TIMELINE: never[] = [];
function childName(entry: ReturnType<typeof selectSubagentChildrenByParentCallId>[number]): string {
const sub = entry.subagent;
- return (sub?.displayName && sub.displayName.trim()) || sub?.agentId || entry.displayName || 'sub-agent';
+ return (
+ (sub?.displayName && sub.displayName.trim()) || sub?.agentId || entry.displayName || 'sub-agent'
+ );
}
-function childProgressPct(entry: ReturnType<typeof selectSubagentChildrenByParentCallId>[number]): number {
+function childProgressPct(
+ entry: ReturnType<typeof selectSubagentChildrenByParentCallId>[number]
+): number {
const sub = entry.subagent;
if (!sub) return entry.status === 'running' ? 50 : 100;
if (!isActiveTimelineStatus(sub.status ?? entry.status)) return 100;
- if (typeof sub.childIteration === 'number' && typeof sub.childMaxIterations === 'number' && sub.childMaxIterations > 0) {
- return Math.max(0, Math.min(100, Math.round((sub.childIteration / sub.childMaxIterations) * 100)));
+ if (
+ typeof sub.childIteration === 'number' &&
+ typeof sub.childMaxIterations === 'number' &&
+ sub.childMaxIterations > 0
+ ) {
+ return Math.max(
+ 0,
+ Math.min(100, Math.round((sub.childIteration / sub.childMaxIterations) * 100))
+ );
}
return 50;
}
diff --git a/app/src/features/conversations/aui/__tests__/BackgroundInboxCard.test.tsx b/app/src/features/conversations/aui/__tests__/BackgroundInboxCard.test.tsx
index fa1535c6de..36996d272f 100644
--- a/app/src/features/conversations/aui/__tests__/BackgroundInboxCard.test.tsx
+++ b/app/src/features/conversations/aui/__tests__/BackgroundInboxCard.test.tsx
@@ -6,14 +6,25 @@ import type { BackgroundProcess } from '../../selectors/backgroundProcesses';
import { BackgroundInboxCard } from '../BackgroundInboxCard';
const procs: BackgroundProcess[] = [
- { taskId: 'sub-1', name: 'Researcher', goal: 'research the Eiffel Tower', status: 'running', toolCount: 16 },
+ {
+ taskId: 'sub-1',
+ name: 'Researcher',
+ goal: 'research the Eiffel Tower',
+ status: 'running',
+ toolCount: 16,
+ },
{ taskId: 'sub-2', name: 'Archivist', goal: 'summarize notes', status: 'success', toolCount: 4 },
];
describe('BackgroundInboxCard', () => {
it('renders nothing when closed', () => {
render(
- <BackgroundInboxCard open={false} processes={procs} onClose={vi.fn()} onOpenProcess={vi.fn()} />
+ <BackgroundInboxCard
+ open={false}
+ processes={procs}
+ onClose={vi.fn()}
+ onOpenProcess={vi.fn()}
+ />
);
expect(document.body.querySelector('[data-testid="background-processes-panel"]')).toBeNull();
});
diff --git a/app/src/features/conversations/aui/__tests__/MediaAndDocumentCalls.test.tsx b/app/src/features/conversations/aui/__tests__/MediaAndDocumentCalls.test.tsx
index dd23e4fa03..0e821a8798 100644
--- a/app/src/features/conversations/aui/__tests__/MediaAndDocumentCalls.test.tsx
+++ b/app/src/features/conversations/aui/__tests__/MediaAndDocumentCalls.test.tsx
@@ -1,8 +1,8 @@
import { configureStore } from '@reduxjs/toolkit';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { Provider } from 'react-redux';
import type React from 'react';
+import { Provider } from 'react-redux';
import { describe, expect, it, vi } from 'vitest';
import type { ArtifactSnapshot } from '../../../../store/chatRuntimeSlice';
@@ -22,9 +22,7 @@ vi.mock('../../../../services/chatService', () => ({
function buildStore(artifacts: ArtifactSnapshot[]) {
return configureStore({
- reducer: {
- chatRuntime: () => ({ artifactsByThread: { [THREAD_ID]: artifacts } }),
- },
+ reducer: { chatRuntime: () => ({ artifactsByThread: { [THREAD_ID]: artifacts } }) },
});
}
diff --git a/app/src/features/conversations/aui/__tests__/ParallelAgentsCard.test.tsx b/app/src/features/conversations/aui/__tests__/ParallelAgentsCard.test.tsx
index f18e2bf61f..8f5011357b 100644
--- a/app/src/features/conversations/aui/__tests__/ParallelAgentsCard.test.tsx
+++ b/app/src/features/conversations/aui/__tests__/ParallelAgentsCard.test.tsx
@@ -1,6 +1,6 @@
import { configureStore } from '@reduxjs/toolkit';
-import type React from 'react';
import { render, screen } from '@testing-library/react';
+import type React from 'react';
import { Provider } from 'react-redux';
import { describe, expect, it, vi } from 'vitest';
@@ -18,15 +18,17 @@ function sub(partial: Partial<SubagentActivity> & { taskId: string }): SubagentA
return { agentId: 'researcher', toolCalls: [], parentCallId: PARENT_CALL_ID, ...partial };
}
-function entry(id: string, status: ToolTimelineEntry['status'], subagent: SubagentActivity): ToolTimelineEntry {
+function entry(
+ id: string,
+ status: ToolTimelineEntry['status'],
+ subagent: SubagentActivity
+): ToolTimelineEntry {
return { id, name: 'subagent:x', round: 0, seq: 0, status, subagent };
}
function buildStore(timeline: ToolTimelineEntry[]) {
return configureStore({
- reducer: {
- chatRuntime: () => ({ toolTimelineByThread: { [THREAD_ID]: timeline } }),
- },
+ reducer: { chatRuntime: () => ({ toolTimelineByThread: { [THREAD_ID]: timeline } }) },
});
}
@@ -59,9 +61,21 @@ describe('ParallelAgentsCard', () => {
it('renders the SubagentList + a TaskCard row per worker sharing parentCallId', () => {
renderCard([
- entry('e1', 'running', sub({ taskId: 'sub-1', displayName: 'Researcher', status: 'running' })),
- entry('e2', 'success', sub({ taskId: 'sub-2', displayName: 'Archivist', status: 'completed' })),
- entry('e3', 'running', sub({ taskId: 'sub-3', parentCallId: 'other-call', displayName: 'Unrelated' })),
+ entry(
+ 'e1',
+ 'running',
+ sub({ taskId: 'sub-1', displayName: 'Researcher', status: 'running' })
+ ),
+ entry(
+ 'e2',
+ 'success',
+ sub({ taskId: 'sub-2', displayName: 'Archivist', status: 'completed' })
+ ),
+ entry(
+ 'e3',
+ 'running',
+ sub({ taskId: 'sub-3', parentCallId: 'other-call', displayName: 'Unrelated' })
+ ),
]);
expect(screen.getAllByText('Researcher').length).toBeGreaterThan(0);
diff --git a/app/src/features/conversations/selectors/backgroundProcesses.ts b/app/src/features/conversations/selectors/backgroundProcesses.ts
index f86f6df07d..e92438e38c 100644
--- a/app/src/features/conversations/selectors/backgroundProcesses.ts
+++ b/app/src/features/conversations/selectors/backgroundProcesses.ts
@@ -1,4 +1,8 @@
-import type { SubagentActivity, ToolTimelineEntry, ToolTimelineEntryStatus } from '../../../store/chatRuntimeSlice';
+import type {
+ SubagentActivity,
+ ToolTimelineEntry,
+ ToolTimelineEntryStatus,
+} from '../../../store/chatRuntimeSlice';
/**
* A background process = a *detached* sub-agent spawned with