Skip to content

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

chore: files changed app/src/components/assistant-ui/elements/agent-plan.tsx,app/src/components/assi

Steven Enamakele85edbde217d
diff --git a/app/src/components/assistant-ui/elements/agent-plan.tsx b/app/src/components/assistant-ui/elements/agent-plan.tsx
index c69bdcac69..7dd78b23a1 100644
--- a/app/src/components/assistant-ui/elements/agent-plan.tsx
+++ b/app/src/components/assistant-ui/elements/agent-plan.tsx
@@ -17,8 +17,8 @@ import { cn } from '@/components/assistant-ui/lib/utils';
import { CheckIcon, Loader2Icon } from 'lucide-react';
import type { ComponentProps } from 'react';
-import { mono } from './surfaces';
import { pct, progressOf } from '../utils/range';
+import { mono } from './surfaces';
export function AgentPlan({
steps,
diff --git a/app/src/components/assistant-ui/elements/agent-status.tsx b/app/src/components/assistant-ui/elements/agent-status.tsx
index a477e5ddf0..864245ba92 100644
--- a/app/src/components/assistant-ui/elements/agent-status.tsx
+++ b/app/src/components/assistant-ui/elements/agent-status.tsx
@@ -41,7 +41,11 @@ export function AgentStatus({
return (
<span
data-slot="agent-status"
- className={cn(paper, 'flex items-center gap-2.5 rounded-full py-1.5 ps-3.5 pe-1.5', className)}
+ className={cn(
+ paper,
+ 'flex items-center gap-2.5 rounded-full py-1.5 ps-3.5 pe-1.5',
+ className
+ )}
{...props}>
{state === 'done' ? (
<CheckIcon aria-hidden className="size-3 shrink-0 text-emerald-500" />
diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsx
index 34f51cbe7c..5c350db81c 100644
--- a/app/src/features/conversations/Conversations.tsx
+++ b/app/src/features/conversations/Conversations.tsx
@@ -15,8 +15,8 @@ import { ConfirmationModal } from '../../components/intelligence/ConfirmationMod
import { SidebarContent } from '../../components/layout/shell/SidebarSlot';
import { PlanReviewCardCore } from '../../features/conversations/aui/PlanReviewPart';
import { RunModeToggle } from '../../features/conversations/aui/RunModeToggle';
-import { useRunMode } from '../../features/conversations/aui/useRunMode';
import { toAuiTodoItems } from '../../features/conversations/aui/TodoListPart';
+import { useRunMode } from '../../features/conversations/aui/useRunMode';
import {
formatTokens,
useLoadThreadGoal,
diff --git a/app/src/features/conversations/aui/GoalToolLine.tsx b/app/src/features/conversations/aui/GoalToolLine.tsx
index 2999f50539..a337a68f40 100644
--- a/app/src/features/conversations/aui/GoalToolLine.tsx
+++ b/app/src/features/conversations/aui/GoalToolLine.tsx
@@ -15,10 +15,7 @@ import { useT } from '../../../lib/i18n/I18nContext';
* single text row — the closest approximation available.
*/
interface GoalToolPayload {
- goal?: {
- objective?: string;
- status?: string;
- } | null;
+ goal?: { objective?: string; status?: string } | null;
}
export const GoalToolLine: ToolCallMessagePartComponent = ({ args, result }) => {
diff --git a/app/src/features/conversations/aui/PlanReviewPart.tsx b/app/src/features/conversations/aui/PlanReviewPart.tsx
index f39f14a707..54904a87d5 100644
--- a/app/src/features/conversations/aui/PlanReviewPart.tsx
+++ b/app/src/features/conversations/aui/PlanReviewPart.tsx
@@ -8,7 +8,10 @@ import { field } from '../../../components/assistant-ui/elements/surfaces';
import { useT } from '../../../lib/i18n/I18nContext';
import { useAuiThreadId } from '../../../providers/AssistantUiRuntimeProvider';
import { callCoreRpc } from '../../../services/coreRpcClient';
-import { clearPendingPlanReviewForThread, type PendingPlanReview } from '../../../store/chatRuntimeSlice';
+import {
+ clearPendingPlanReviewForThread,
+ type PendingPlanReview,
+} from '../../../store/chatRuntimeSlice';
import { useAppDispatch, useAppSelector } from '../../../store/hooks';
import { useThreadTodos } from './useThreadTodos';
@@ -91,7 +94,11 @@ export function PlanReviewCardCore({
return (
<div className="flex w-full max-w-sm flex-col gap-3" data-testid="plan-review-card">
- <AgentPlan steps={review.steps} activeIndex={activeIndex} title={t('conversations.planReview.title')} />
+ <AgentPlan
+ steps={review.steps}
+ activeIndex={activeIndex}
+ title={t('conversations.planReview.title')}
+ />
{errorMsg && <p className="text-xs text-red-600 dark:text-red-400">{errorMsg}</p>}
@@ -141,7 +148,9 @@ export function PlanReviewCardCore({
onClick={submitFeedback}
disabled={deciding !== null || feedback.trim().length === 0}
className="text-foreground/70 hover:bg-foreground/[0.06] hover:text-foreground/95 h-7 rounded-full px-2.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96] disabled:pointer-events-none disabled:opacity-30">
- {deciding === 'revise' ? t('chat.approval.deciding') : t('conversations.planReview.sendFeedback')}
+ {deciding === 'revise'
+ ? t('chat.approval.deciding')
+ : t('conversations.planReview.sendFeedback')}
</button>
</div>
</div>
@@ -165,10 +174,12 @@ export const PlanReviewPart: ToolCallMessagePartComponent = ({ args, toolCallId
const { t } = useT();
const threadId = useAuiThreadId();
const steps = Array.isArray((args as { steps?: unknown } | undefined)?.steps)
- ? ((args as { steps: unknown[] }).steps.filter((s): s is string => typeof s === 'string') as string[])
+ ? ((args as { steps: unknown[] }).steps.filter(
+ (s): s is string => typeof s === 'string'
+ ) as string[])
: [];
const pending = useAppSelector(state =>
- threadId ? state.chatRuntime.pendingPlanReviewByThread[threadId] ?? null : null
+ threadId ? (state.chatRuntime.pendingPlanReviewByThread[threadId] ?? null) : null
);
const isForThisCall =
pending != null && (pending.toolCallId ? pending.toolCallId === toolCallId : true);
@@ -179,5 +190,11 @@ export const PlanReviewPart: ToolCallMessagePartComponent = ({ args, toolCallId
return <PlanReviewCardCore threadId={threadId} review={pending} />;
}
- return <AgentPlan steps={steps} activeIndex={steps.length} title={t('conversations.planReview.title')} />;
+ return (
+ <AgentPlan
+ steps={steps}
+ activeIndex={steps.length}
+ title={t('conversations.planReview.title')}
+ />
+ );
};
diff --git a/app/src/features/conversations/aui/RunModeToggle.tsx b/app/src/features/conversations/aui/RunModeToggle.tsx
index 9dfbaade4e..40910afb97 100644
--- a/app/src/features/conversations/aui/RunModeToggle.tsx
+++ b/app/src/features/conversations/aui/RunModeToggle.tsx
@@ -21,7 +21,8 @@ export function RunModeToggle({ threadId }: { threadId: string }) {
const { t } = useT();
const { mode, setMode } = useRunMode(threadId);
const nextMode = mode === 'plan' ? 'build' : 'plan';
- const label = mode === 'plan' ? t('conversations.runMode.plan') : t('conversations.runMode.build');
+ const label =
+ mode === 'plan' ? t('conversations.runMode.plan') : t('conversations.runMode.build');
return (
<button
diff --git a/app/src/features/conversations/aui/TodoListPart.test.tsx b/app/src/features/conversations/aui/TodoListPart.test.tsx
index 0e3d2befa5..da15f8c697 100644
--- a/app/src/features/conversations/aui/TodoListPart.test.tsx
+++ b/app/src/features/conversations/aui/TodoListPart.test.tsx
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
-import { mapCoreTodoStatus, TodoListPart, toAuiTodoItems } from './TodoListPart';
+import { mapCoreTodoStatus, toAuiTodoItems, TodoListPart } from './TodoListPart';
describe('mapCoreTodoStatus', () => {
it('maps in_progress to active', () => {
diff --git a/app/src/features/conversations/aui/TodoListPart.tsx b/app/src/features/conversations/aui/TodoListPart.tsx
index 2650dfc581..c57361d46a 100644
--- a/app/src/features/conversations/aui/TodoListPart.tsx
+++ b/app/src/features/conversations/aui/TodoListPart.tsx
@@ -1,6 +1,10 @@
import type { ToolCallMessagePartComponent } from '@assistant-ui/react';
-import { TodoList, type TodoItem, type TodoStatus } from '../../../components/assistant-ui/elements/todo-list';
+import {
+ type TodoItem,
+ TodoList,
+ type TodoStatus,
+} from '../../../components/assistant-ui/elements/todo-list';
import { useT } from '../../../lib/i18n/I18nContext';
import type { CoreTodoStatus } from '../../../store/threadTodosSlice';
diff --git a/app/src/features/conversations/aui/useRunMode.ts b/app/src/features/conversations/aui/useRunMode.ts
index 3e04945280..f53606af6d 100644
--- a/app/src/features/conversations/aui/useRunMode.ts
+++ b/app/src/features/conversations/aui/useRunMode.ts
@@ -31,7 +31,7 @@ export interface UseRunModeResult {
export function useRunMode(threadId: string | null): UseRunModeResult {
const dispatch = useAppDispatch();
const mode = useAppSelector(state =>
- threadId ? state.runMode.byThread[threadId] ?? DEFAULT_MODE : DEFAULT_MODE
+ threadId ? (state.runMode.byThread[threadId] ?? DEFAULT_MODE) : DEFAULT_MODE
);
// Presence (not the defaulted `mode` above) — needed so the load-on-open
// effect can tell "no entry yet" apart from "explicitly build".
diff --git a/app/src/features/conversations/aui/useThreadGoal.test.tsx b/app/src/features/conversations/aui/useThreadGoal.test.tsx
index 6ac06af41f..6fbc587f42 100644
--- a/app/src/features/conversations/aui/useThreadGoal.test.tsx
+++ b/app/src/features/conversations/aui/useThreadGoal.test.tsx
@@ -8,9 +8,7 @@ import { threadApi } from '../../../services/api/threadApi';
import threadGoalReducer from '../../../store/threadGoalSlice';
import { formatTokens, useLoadThreadGoal, useThreadGoal } from './useThreadGoal';
-vi.mock('../../../services/api/threadApi', () => ({
- threadApi: { getGoal: vi.fn() },
-}));
+vi.mock('../../../services/api/threadApi', () => ({ threadApi: { getGoal: vi.fn() } }));
function setup() {
const store = configureStore({ reducer: combineReducers({ threadGoal: threadGoalReducer }) });
diff --git a/app/src/features/conversations/aui/useThreadGoal.ts b/app/src/features/conversations/aui/useThreadGoal.ts
index e6734f6bb7..2f5a805442 100644
--- a/app/src/features/conversations/aui/useThreadGoal.ts
+++ b/app/src/features/conversations/aui/useThreadGoal.ts
@@ -19,9 +19,7 @@ export function formatTokens(count: number): string {
/** `null` when the thread has no goal (or none loaded yet). */
export function useThreadGoal(threadId: string | null): ThreadGoalView | null {
- return useAppSelector(state =>
- threadId ? state.threadGoal.byThread[threadId] ?? null : null
- );
+ return useAppSelector(state => (threadId ? (state.threadGoal.byThread[threadId] ?? null) : null));
}
/**
diff --git a/app/src/features/conversations/aui/useThreadTodos.test.tsx b/app/src/features/conversations/aui/useThreadTodos.test.tsx
index b8bfc74893..50b928f924 100644
--- a/app/src/features/conversations/aui/useThreadTodos.test.tsx
+++ b/app/src/features/conversations/aui/useThreadTodos.test.tsx
@@ -8,9 +8,7 @@ import { threadApi } from '../../../services/api/threadApi';
import threadTodosReducer from '../../../store/threadTodosSlice';
import { useLoadThreadTodos, useThreadTodos } from './useThreadTodos';
-vi.mock('../../../services/api/threadApi', () => ({
- threadApi: { getTodos: vi.fn() },
-}));
+vi.mock('../../../services/api/threadApi', () => ({ threadApi: { getTodos: vi.fn() } }));
function setup() {
const store = configureStore({ reducer: combineReducers({ threadTodos: threadTodosReducer }) });
@@ -40,7 +38,9 @@ describe('useLoadThreadTodos', () => {
beforeEach(() => vi.mocked(threadApi.getTodos).mockReset());
it('primes the slice from the RPC on thread open', async () => {
- vi.mocked(threadApi.getTodos).mockResolvedValue([{ content: 'Write tests', status: 'pending' }]);
+ vi.mocked(threadApi.getTodos).mockResolvedValue([
+ { content: 'Write tests', status: 'pending' },
+ ]);
const { store, wrapper } = setup();
renderHook(() => useLoadThreadTodos('t1'), { wrapper });
diff --git a/app/src/features/conversations/aui/useThreadTodos.ts b/app/src/features/conversations/aui/useThreadTodos.ts
index ab0ce77b72..d6145ff999 100644
--- a/app/src/features/conversations/aui/useThreadTodos.ts
+++ b/app/src/features/conversations/aui/useThreadTodos.ts
@@ -11,7 +11,9 @@ import { setThreadTodos, type ThreadTodoItemView } from '../../../store/threadTo
/** `null` when the thread has no live entry yet (not "empty list"). */
export function useThreadTodos(threadId: string | null): ThreadTodoItemView[] | null {
- return useAppSelector(state => (threadId ? state.threadTodos.byThread[threadId] ?? null : null));
+ return useAppSelector(state =>
+ threadId ? (state.threadTodos.byThread[threadId] ?? null) : null
+ );
}
/**
diff --git a/app/src/services/api/threadApi.ts b/app/src/services/api/threadApi.ts
index 199fb06dfe..a32838e217 100644
--- a/app/src/services/api/threadApi.ts
+++ b/app/src/services/api/threadApi.ts
@@ -1,6 +1,5 @@
import debug from 'debug';
-import type { ChatThreadTodoItem, ThreadGoal } from '../chatService';
import type {
DerivedTranscriptGetOptions,
DerivedTranscriptPage,
@@ -24,6 +23,7 @@ import type {
RunEvent,
RunEventListResponse,
} from '../../types/turnState';
+import type { ChatThreadTodoItem, ThreadGoal } from '../chatService';
import { callCoreRpc } from '../coreRpcClient';
interface Envelope<T> {
diff --git a/app/src/store/runModeSlice.test.ts b/app/src/store/runModeSlice.test.ts
index 83559e1d8b..291bec1c47 100644
--- a/app/src/store/runModeSlice.test.ts
+++ b/app/src/store/runModeSlice.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
-import reducer, { setRunMode, type RunModeState } from './runModeSlice';
+import reducer, { type RunModeState, setRunMode } from './runModeSlice';
const initial: RunModeState = { byThread: {} };
diff --git a/app/src/store/runModeSlice.ts b/app/src/store/runModeSlice.ts
index 5b73ec98d4..c7010f6e93 100644
--- a/app/src/store/runModeSlice.ts
+++ b/app/src/store/runModeSlice.ts
@@ -12,9 +12,7 @@ export interface RunModeState {
byThread: Record<string, RunMode>;
}
-const initialState: RunModeState = {
- byThread: {},
-};
+const initialState: RunModeState = { byThread: {} };
const runModeSlice = createSlice({
name: 'runMode',
diff --git a/app/src/store/threadGoalSlice.ts b/app/src/store/threadGoalSlice.ts
index f84f5a47f6..6bce4a3fc4 100644
--- a/app/src/store/threadGoalSlice.ts
+++ b/app/src/store/threadGoalSlice.ts
@@ -22,9 +22,7 @@ export interface ThreadGoalState {
byThread: Record<string, ThreadGoalView | null>;
}
-const initialState: ThreadGoalState = {
- byThread: {},
-};
+const initialState: ThreadGoalState = { byThread: {} };
const threadGoalSlice = createSlice({
name: 'threadGoal',
diff --git a/app/src/store/threadTodosSlice.ts b/app/src/store/threadTodosSlice.ts
index c55218e710..f964a79399 100644
--- a/app/src/store/threadTodosSlice.ts
+++ b/app/src/store/threadTodosSlice.ts
@@ -24,9 +24,7 @@ export interface ThreadTodosState {
byThread: Record<string, ThreadTodoItemView[]>;
}
-const initialState: ThreadTodosState = {
- byThread: {},
-};
+const initialState: ThreadTodosState = { byThread: {} };
const threadTodosSlice = createSlice({
name: 'threadTodos',