Skip to content

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

chore(assistant-ui): reorder imports and format JSX attributes

Steven Enamakelf82a652ea3d3
diff --git a/app/src/components/assistant-ui/elements/conversation-search.tsx b/app/src/components/assistant-ui/elements/conversation-search.tsx
index 4f78b12aca..9eadabec47 100644
--- a/app/src/components/assistant-ui/elements/conversation-search.tsx
+++ b/app/src/components/assistant-ui/elements/conversation-search.tsx
@@ -9,10 +9,9 @@
* aria-labels are props with English defaults, for `useT()` — see
* `features/conversations/aui/ChatConversationSearch.tsx`.
*/
-import type { ComponentProps } from 'react';
-import { ChevronDownIcon, ChevronUpIcon, SearchIcon } from 'lucide-react';
-
import { cn } from '@/components/assistant-ui/lib/utils';
+import { ChevronDownIcon, ChevronUpIcon, SearchIcon } from 'lucide-react';
+import type { ComponentProps } from 'react';
import { field, ghostButton, mono, paper } from './surfaces';
@@ -52,7 +51,10 @@ export function ConversationSearch({
const active = index === -1 ? undefined : hits[index];
return (
- <div data-slot="conversation-search" className={cn('flex w-full max-w-sm gap-2', className)} {...props}>
+ <div
+ data-slot="conversation-search"
+ className={cn('flex w-full max-w-sm gap-2', className)}
+ {...props}>
<div className="flex min-w-0 flex-1 flex-col gap-2">
<div className={cn(paper, 'flex items-center gap-2 rounded-full py-1.5 pr-1.5 pl-3')}>
<SearchIcon className="text-foreground/30 size-3.5 shrink-0" />
@@ -87,9 +89,15 @@ export function ConversationSearch({
</div>
{active && (
- <div className={cn(field, 'fade-in animate-in rounded-xl px-3 py-2 text-xs leading-relaxed duration-200')}>
+ <div
+ className={cn(
+ field,
+ 'fade-in animate-in rounded-xl px-3 py-2 text-xs leading-relaxed duration-200'
+ )}>
<span className="text-foreground/45">{active.before}</span>
- <span className="text-foreground/95 rounded bg-amber-400/35 px-0.5">{active.match}</span>
+ <span className="text-foreground/95 rounded bg-amber-400/35 px-0.5">
+ {active.match}
+ </span>
<span className="text-foreground/45">{active.after}</span>
</div>
)}
diff --git a/app/src/components/assistant-ui/elements/inline-citation.tsx b/app/src/components/assistant-ui/elements/inline-citation.tsx
index 099a82843b..136e118811 100644
--- a/app/src/components/assistant-ui/elements/inline-citation.tsx
+++ b/app/src/components/assistant-ui/elements/inline-citation.tsx
@@ -23,11 +23,10 @@
* dropped; `Source` (renamed `CitationSource` to avoid a name clash with
* `sources.aui.tsx`'s `Source`) and `CitationMarker` are the public API.
*/
+import { cn } from '@/components/assistant-ui/lib/utils';
import { PreviewCard } from '@base-ui/react/preview-card';
import type { ComponentProps } from 'react';
-import { cn } from '@/components/assistant-ui/lib/utils';
-
import { floating, mono } from './surfaces';
export interface CitationSource {
@@ -36,7 +35,10 @@ export interface CitationSource {
snippet: string;
}
-export interface CitationMarkerProps extends Omit<ComponentProps<'button'>, 'children' | 'onOpenChange'> {
+export interface CitationMarkerProps extends Omit<
+ ComponentProps<'button'>,
+ 'children' | 'onOpenChange'
+> {
/** 0-based position, rendered as `index + 1`. */
index: number;
source: CitationSource;
diff --git a/app/src/components/assistant-ui/elements/memory-chips.tsx b/app/src/components/assistant-ui/elements/memory-chips.tsx
index 631fbc9496..1490820cf5 100644
--- a/app/src/components/assistant-ui/elements/memory-chips.tsx
+++ b/app/src/components/assistant-ui/elements/memory-chips.tsx
@@ -10,10 +10,9 @@
* `forgetAriaLabel` props with English defaults, for `useT()` — see
* `features/conversations/aui/ChatMemoryChips.tsx`, the caller.
*/
-import type { ComponentProps } from 'react';
-import { BrainIcon, XIcon } from 'lucide-react';
-
import { cn } from '@/components/assistant-ui/lib/utils';
+import { BrainIcon, XIcon } from 'lucide-react';
+import type { ComponentProps } from 'react';
import { field, ghostButton, mono } from './surfaces';
@@ -33,10 +32,7 @@ export function MemoryChips({
forgetAriaLabel = (text: string) => `Forget "${text}"`,
className,
...props
-}: Omit<
- ComponentProps<'div'>,
- 'children' | 'chips' | 'onForget'
-> & {
+}: Omit<ComponentProps<'div'>, 'children' | 'chips' | 'onForget'> & {
chips: readonly MemoryChip[];
onForget?: (id: string) => void;
headingRememberedLabel?: (n: number) => string;
@@ -46,7 +42,10 @@ export function MemoryChips({
const fresh = chips.filter(chip => chip.change !== 'existing').length;
return (
- <div data-slot="memory-chips" className={cn('flex w-full max-w-sm flex-col gap-2', className)} {...props}>
+ <div
+ data-slot="memory-chips"
+ className={cn('flex w-full max-w-sm flex-col gap-2', className)}
+ {...props}>
<div className="flex items-center gap-1.5">
<BrainIcon className="text-foreground/30 size-3.5" />
<span className={cn(mono, 'text-foreground/35')}>
diff --git a/app/src/components/assistant-ui/elements/schedule-card.tsx b/app/src/components/assistant-ui/elements/schedule-card.tsx
index 69707bb630..f1439a8d1b 100644
--- a/app/src/components/assistant-ui/elements/schedule-card.tsx
+++ b/app/src/components/assistant-ui/elements/schedule-card.tsx
@@ -9,10 +9,9 @@
* `Pause {name}` / `Resume {name}` toggle aria-label are props with English
* defaults, for `useT()` — see `features/conversations/aui/ChatScheduleCard.tsx`.
*/
-import type { ComponentProps } from 'react';
-import { CheckIcon, ClockIcon, XIcon } from 'lucide-react';
-
import { cn } from '@/components/assistant-ui/lib/utils';
+import { CheckIcon, ClockIcon, XIcon } from 'lucide-react';
+import type { ComponentProps } from 'react';
import { field, mono, paper } from './surfaces';
@@ -88,7 +87,11 @@ export function ScheduleCard({
</div>
<div
- className={cn(field, 'flex items-baseline gap-2 rounded-xl px-3 py-2', !enabled && 'opacity-45')}>
+ className={cn(
+ field,
+ 'flex items-baseline gap-2 rounded-xl px-3 py-2',
+ !enabled && 'opacity-45'
+ )}>
<span className={cn(mono, 'text-foreground/30')}>{nextLabel}</span>
<span className="text-foreground/80 text-[13px]">{enabled ? nextRun : pausedLabel}</span>
</div>
@@ -103,7 +106,9 @@ export function ScheduleCard({
<XIcon className="size-3 shrink-0 translate-y-0.5 text-red-500" />
)}
<span className="text-foreground/60 min-w-0 flex-1 truncate text-xs">{run.at}</span>
- <span className={cn(mono, 'text-foreground/25 shrink-0')}>{run.ok ? okLabel : failedLabel}</span>
+ <span className={cn(mono, 'text-foreground/25 shrink-0')}>
+ {run.ok ? okLabel : failedLabel}
+ </span>
</div>
))}
</div>
diff --git a/app/src/components/assistant-ui/elements/sources.aui.tsx b/app/src/components/assistant-ui/elements/sources.aui.tsx
index 7a0bdd857e..ac13b0ff03 100644
--- a/app/src/components/assistant-ui/elements/sources.aui.tsx
+++ b/app/src/components/assistant-ui/elements/sources.aui.tsx
@@ -17,7 +17,7 @@ import { cn } from '@/components/assistant-ui/lib/utils';
import type { SourceMessagePartComponent } from '@assistant-ui/react';
import { cva, type VariantProps } from 'class-variance-authority';
import { FileTextIcon } from 'lucide-react';
-import { memo, useState, type ComponentProps } from 'react';
+import { type ComponentProps, memo, useState } from 'react';
import { Badge } from '../badge';
@@ -40,16 +40,9 @@ const sourceVariants = cva(
destructive:
'bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300 [a&]:hover:bg-red-100/80',
},
- size: {
- sm: 'px-1.5 py-0.5',
- default: 'px-2 py-1',
- lg: 'px-2.5 py-1.5 text-sm',
- },
- },
- defaultVariants: {
- variant: 'outline',
- size: 'default',
+ size: { sm: 'px-1.5 py-0.5', default: 'px-2 py-1', lg: 'px-2.5 py-1.5 text-sm' },
},
+ defaultVariants: { variant: 'outline', size: 'default' },
}
);
@@ -68,10 +61,7 @@ function SourceIcon({
className,
faviconUrl = defaultFaviconUrl,
...props
-}: ComponentProps<'span'> & {
- url: string;
- faviconUrl?: (domain: string) => string;
-}) {
+}: ComponentProps<'span'> & { url: string; faviconUrl?: (domain: string) => string }) {
const domain = extractDomain(url);
const src = faviconUrl(domain);
const [errorSrc, setErrorSrc] = useState<string | undefined>(undefined);
@@ -108,14 +98,19 @@ function SourceIcon({
}
function SourceTitle({ className, ...props }: ComponentProps<'span'>) {
- return <span data-slot="source-title" className={cn('max-w-37.5 truncate', className)} {...props} />;
+ return (
+ <span data-slot="source-title" className={cn('max-w-37.5 truncate', className)} {...props} />
+ );
}
function DocumentSourceIcon({ className, ...props }: ComponentProps<'span'>) {
return (
<span
data-slot="source-document-icon"
- className={cn('text-muted-foreground flex size-3 shrink-0 items-center justify-center', className)}
+ className={cn(
+ 'text-muted-foreground flex size-3 shrink-0 items-center justify-center',
+ className
+ )}
{...props}>
<FileTextIcon className="size-3" />
</span>
diff --git a/app/src/components/assistant-ui/elements/timeline.tsx b/app/src/components/assistant-ui/elements/timeline.tsx
index 19b05f6d67..841eb52042 100644
--- a/app/src/components/assistant-ui/elements/timeline.tsx
+++ b/app/src/components/assistant-ui/elements/timeline.tsx
@@ -13,10 +13,9 @@
* surfaces (the conversation-map outline here, a sub-agent activity feed
* there) can share it.
*/
-import type { ComponentProps } from 'react';
-
import { cn } from '@/components/assistant-ui/lib/utils';
import { take } from '@/components/assistant-ui/utils/range';
+import type { ComponentProps } from 'react';
import { mono, paper } from './surfaces';
@@ -86,7 +85,9 @@ export function Timeline({
{event.title}
</span>
{event.detail && (
- <span className="text-foreground/45 text-xs leading-relaxed break-words">{event.detail}</span>
+ <span className="text-foreground/45 text-xs leading-relaxed break-words">
+ {event.detail}
+ </span>
)}
</div>
</div>
diff --git a/app/src/components/assistant-ui/markdown-text.tsx b/app/src/components/assistant-ui/markdown-text.tsx
index 81a36e94ef..e87fa238d6 100644
--- a/app/src/components/assistant-ui/markdown-text.tsx
+++ b/app/src/components/assistant-ui/markdown-text.tsx
@@ -26,9 +26,9 @@ import rehypeKatex from 'rehype-katex';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';
-import { CitationMarker, type CitationSource } from './elements/inline-citation';
import { hasLatexContent, normalizeLatexDelimiters } from '../../utils/latex';
import { extractLanguage, extractTextContent } from '../markdown/CodeBlock';
+import { CitationMarker, type CitationSource } from './elements/inline-citation';
/**
* This message's `source` parts (`SourceGroupSlot` in `thread.tsx` reads the
diff --git a/app/src/features/conversations/aui/ChatConversationMap.test.tsx b/app/src/features/conversations/aui/ChatConversationMap.test.tsx
index eb4e42cd88..3f066ffadb 100644
--- a/app/src/features/conversations/aui/ChatConversationMap.test.tsx
+++ b/app/src/features/conversations/aui/ChatConversationMap.test.tsx
@@ -29,7 +29,11 @@ function agentMessage(id: string, content: string, createdAt: string): ThreadMes
function buildStore(messages: ThreadMessage[]) {
return configureStore({
- reducer: combineReducers({ thread: threadReducer, chatRuntime: chatRuntimeReducer, mascot: mascotReducer }),
+ reducer: combineReducers({
+ thread: threadReducer,
+ chatRuntime: chatRuntimeReducer,
+ mascot: mascotReducer,
+ }),
preloadedState: {
thread: {
threads: [
@@ -97,7 +101,7 @@ describe('ChatConversationMap', () => {
expect(screen.getByText('It runs nightly at 2am UTC.')).toBeTruthy();
});
- it('opens the timeline outline and lists the thread\'s user turns', async () => {
+ it("opens the timeline outline and lists the thread's user turns", async () => {
renderChat([
userMessage('u1', 'First question', '2026-01-01T00:00:00.000Z'),
agentMessage('a1', 'First answer', '2026-01-01T00:00:05.000Z'),
diff --git a/app/src/features/conversations/aui/ChatConversationMap.tsx b/app/src/features/conversations/aui/ChatConversationMap.tsx
index 26cacd379d..b5289f51db 100644
--- a/app/src/features/conversations/aui/ChatConversationMap.tsx
+++ b/app/src/features/conversations/aui/ChatConversationMap.tsx
@@ -12,9 +12,12 @@
* itself needs to know about.
*/
import { type AssistantState, useAuiState } from '@assistant-ui/react';
-import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from 'react';
+import { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';
-import { ConversationSearch, type SearchHit } from '../../../components/assistant-ui/elements/conversation-search';
+import {
+ ConversationSearch,
+ type SearchHit,
+} from '../../../components/assistant-ui/elements/conversation-search';
import { Timeline, type TimelineEvent } from '../../../components/assistant-ui/elements/timeline';
import { useT } from '../../../lib/i18n/I18nContext';
@@ -23,9 +26,7 @@ const CONTEXT_CHARS = 24;
const MAX_TIMELINE_EVENTS = 50;
function messageText(message: AssistantState['thread']['messages'][number]): string {
- return message.content
- .flatMap(part => (part.type === 'text' ? [part.text] : []))
- .join('\n');
+ return message.content.flatMap(part => (part.type === 'text' ? [part.text] : [])).join('\n');
}
function buildHits(
@@ -47,8 +48,7 @@ function buildHits(
const at = haystack.indexOf(needle, from);
if (at === -1) break;
const element = viewport?.querySelector<HTMLElement>(`[data-message-id="${message.id}"]`);
- const position =
- element && scrollHeight > 0 ? (element.offsetTop / scrollHeight) * 100 : 0;
+ const position = element && scrollHeight > 0 ? (element.offsetTop / scrollHeight) * 100 : 0;
hits.push({
id: `${message.id}:${occurrence}`,
before: text.slice(Math.max(0, at - CONTEXT_CHARS), at),
@@ -74,10 +74,13 @@ function formatTime(iso: string): string {
return date.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' });
}
-function buildTimelineEvents(
- messages: readonly AssistantState['thread']['messages'][number][]
-): { events: TimelineEvent[]; messageIdByEventId: Map<string, string> } {
- const userMessages = messages.filter(message => message.role === 'user').slice(-MAX_TIMELINE_EVENTS);
+function buildTimelineEvents(messages: readonly AssistantState['thread']['messages'][number][]): {
+ events: TimelineEvent[];
+ messageIdByEventId: Map<string, string>;
+} {
+ const userMessages = messages
+ .filter(message => message.role === 'user')
+ .slice(-MAX_TIMELINE_EVENTS);
const messageIdByEventId = new Map<string, string>();
const events = userMessages.map((message, index): TimelineEvent => {
const eventId = `turn:${message.id}`;
diff --git a/app/src/features/conversations/aui/ChatMemoryChips.test.tsx b/app/src/features/conversations/aui/ChatMemoryChips.test.tsx
index 57897c3f8a..9194b9db60 100644
--- a/app/src/features/conversations/aui/ChatMemoryChips.test.tsx
+++ b/app/src/features/conversations/aui/ChatMemoryChips.test.tsx
@@ -10,11 +10,7 @@ import {
} from './ChatMemoryChips';
/** The prop fields every `ToolCallMessagePartComponent` requires, beyond `args`/`result`. */
-function toolCallProps(
- toolName: string,
- args: unknown,
- result: unknown
-): ToolCallMessagePartProps {
+function toolCallProps(toolName: string, args: unknown, result: unknown): ToolCallMessagePartProps {
return {
type: 'tool-call',
toolName,
@@ -31,8 +27,14 @@ function toolCallProps(
describe('memoryToolChips', () => {
it('builds one "added" chip for a memory_store call, keyed by its key', () => {
- const chips = memoryToolChips('memory_store', { key: 'favorite_color', content: 'blue' }, undefined);
- expect(chips).toEqual([{ id: 'store:favorite_color', text: 'favorite_color', change: 'added' }]);
+ const chips = memoryToolChips(
+ 'memory_store',
+ { key: 'favorite_color', content: 'blue' },
+ undefined
+ );
+ expect(chips).toEqual([
+ { id: 'store:favorite_color', text: 'favorite_color', change: 'added' },
+ ]);
});
it('builds one "existing" chip per hit for memory_recall / memory_hybrid_search', () => {
@@ -51,7 +53,9 @@ describe('memoryToolChips', () => {
describe('memory tool call renders', () => {
it('MemoryStoreCall renders the vendored memory-chips element', () => {
- render(<MemoryStoreCall {...toolCallProps('memory_store', { key: 'favorite_color' }, undefined)} />);
+ render(
+ <MemoryStoreCall {...toolCallProps('memory_store', { key: 'favorite_color' }, undefined)} />
+ );
expect(screen.getByText('favorite_color')).toBeTruthy();
});
@@ -65,7 +69,9 @@ describe('memory tool call renders', () => {
it('MemoryHybridSearchCall renders one chip per hit', () => {
render(
<MemoryHybridSearchCall
- {...toolCallProps('memory_hybrid_search', undefined, { results: [{ key: 'k1' }, { key: 'k2' }] })}
+ {...toolCallProps('memory_hybrid_search', undefined, {
+ results: [{ key: 'k1' }, { key: 'k2' }],
+ })}
/>
);
expect(screen.getByText('k1')).toBeTruthy();
diff --git a/app/src/features/conversations/aui/ChatMemoryChips.tsx b/app/src/features/conversations/aui/ChatMemoryChips.tsx
index 295a1ce198..77172d1bdc 100644
--- a/app/src/features/conversations/aui/ChatMemoryChips.tsx
+++ b/app/src/features/conversations/aui/ChatMemoryChips.tsx
@@ -20,7 +20,10 @@
*/
import type { ToolCallMessagePartComponent } from '@assistant-ui/react';
-import { MemoryChips, type MemoryChip } from '../../../components/assistant-ui/elements/memory-chips';
+import {
+ type MemoryChip,
+ MemoryChips,
+} from '../../../components/assistant-ui/elements/memory-chips';
import { useT } from '../../../lib/i18n/I18nContext';
function asRecord(value: unknown): Record<string, unknown> | undefined {
@@ -53,14 +56,15 @@ function chipsForRecall(result: unknown): MemoryChip[] {
: [];
return items.flatMap((item, index): MemoryChip[] => {
const entry = asRecord(item);
- const text = stringField(entry, 'key') ?? stringField(entry, 'text') ?? stringField(entry, 'snippet');
+ const text =
+ stringField(entry, 'key') ?? stringField(entry, 'text') ?? stringField(entry, 'snippet');
if (!text) return [];
return [{ id: `recall:${index}:${text}`, text: text.slice(0, 60), change: 'existing' }];
});
}
const CHIP_BUILDERS: Record<string, (args: unknown, result: unknown) => MemoryChip[]> = {
- memory_store: (args) => chipsForStore(args),
+ memory_store: args => chipsForStore(args),
memory_recall: (_args, result) => chipsForRecall(result),
memory_hybrid_search: (_args, result) => chipsForRecall(result),
};
@@ -81,7 +85,9 @@ function createMemoryToolCall(toolName: string): ToolCallMessagePartComponent {
t('conversations.memoryChips.remembered').replace('{n}', String(n))
}
headingIdleLabel={t('conversations.memoryChips.idle')}
- forgetAriaLabel={text => t('conversations.memoryChips.forgetAriaLabel').replace('{text}', text)}
+ forgetAriaLabel={text =>
+ t('conversations.memoryChips.forgetAriaLabel').replace('{text}', text)
+ }
/>
);
};
diff --git a/app/src/features/conversations/aui/ChatScheduleCard.test.tsx b/app/src/features/conversations/aui/ChatScheduleCard.test.tsx
index 9b02cbf9f0..fbfbc21f6a 100644
--- a/app/src/features/conversations/aui/ChatScheduleCard.test.tsx
+++ b/app/src/features/conversations/aui/ChatScheduleCard.test.tsx
@@ -2,8 +2,8 @@ import type { ToolCallMessagePartProps } from '@assistant-ui/react';
import { render, screen, waitFor } from '@testing-library/react';
import { describe, expect, it, vi } from 'vitest';
-import type { CoreCronJob } from '../../../utils/tauriCommands/cron';
import * as cron from '../../../utils/tauriCommands/cron';
+import type { CoreCronJob } from '../../../utils/tauriCommands/cron';
import { CronAddOrUpdateCall, CronListCall, CronRunsCall } from './ChatScheduleCard';
function toolCallProps(toolName: string, args: unknown, result: unknown): ToolCallMessagePartProps {
@@ -54,7 +54,11 @@ describe('cron tool call renders', () => {
});
it('CronListCall renders one card per job', () => {
- render(<CronListCall {...toolCallProps('cron_list', {}, [job(), job({ id: 'job-2', name: 'Weekly digest' })])} />);
+ render(
+ <CronListCall
+ {...toolCallProps('cron_list', {}, [job(), job({ id: 'job-2', name: 'Weekly digest' })])}
+ />
+ );
expect(screen.getByText('Daily report')).toBeTruthy();
expect(screen.getByText('Weekly digest')).toBeTruthy();
});
@@ -63,7 +67,13 @@ describe('cron tool call renders', () => {
render(
<CronRunsCall
{...toolCallProps('cron_runs', { job_id: 'job-1' }, [
- { id: 1, job_id: 'job-1', started_at: '2026-01-01T09:00:00.000Z', finished_at: '', status: 'ok' },
+ {
+ id: 1,
+ job_id: 'job-1',
+ started_at: '2026-01-01T09:00:00.000Z',
+ finished_at: '',
+ status: 'ok',
+ },
])}
/>
);
diff --git a/app/src/features/conversations/aui/ChatScheduleCard.tsx b/app/src/features/conversations/aui/ChatScheduleCard.tsx
index e293ae5b7a..47c4dba987 100644
--- a/app/src/features/conversations/aui/ChatScheduleCard.tsx
+++ b/app/src/features/conversations/aui/ChatScheduleCard.tsx
@@ -16,9 +16,16 @@
import type { ToolCallMessagePartComponent } from '@assistant-ui/react';
import { useCallback, useState } from 'react';
-import { ScheduleCard, type ScheduleRun } from '../../../components/assistant-ui/elements/schedule-card';
+import {
+ ScheduleCard,
+ type ScheduleRun,
+} from '../../../components/assistant-ui/elements/schedule-card';
import { useT } from '../../../lib/i18n/I18nContext';
-import { openhumanCronUpdate, type CoreCronJob, type CoreCronRun } from '../../../utils/tauriCommands/cron';
+import {
+ type CoreCronJob,
+ type CoreCronRun,
+ openhumanCronUpdate,
+} from '../../../utils/tauriCommands/cron';
function cadenceOf(job: CoreCronJob): string {
if (job.schedule.kind === 'cron') return job.schedule.expr;
@@ -95,8 +102,11 @@ export const CronListCall: ToolCallMessagePartComponent = ({ result }) => {
/** `cron_runs`: one job's run history, read from `args.job_id` + the result list. */
export const CronRunsCall: ToolCallMessagePartComponent = ({ args, result }) => {
- const jobId = args && typeof args === 'object' ? (args as { job_id?: unknown }).job_id : undefined;
- const runs = Array.isArray(result) ? result.filter((r): r is CoreCronRun => !!r && typeof r === 'object') : [];
+ const jobId =
+ args && typeof args === 'object' ? (args as { job_id?: unknown }).job_id : undefined;
+ const runs = Array.isArray(result)
+ ? result.filter((r): r is CoreCronRun => !!r && typeof r === 'object')
+ : [];
if (typeof jobId !== 'string' || runs.length === 0) return null;
return (
<OneScheduleCard
diff --git a/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx b/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx
index 5dc4d53c82..ece302181e 100644
--- a/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx
+++ b/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx
@@ -47,7 +47,11 @@ function agentMessage(content: string): ThreadMessage {
function buildStore(message: ThreadMessage) {
return configureStore({
- reducer: combineReducers({ thread: threadReducer, chatRuntime: chatRuntimeReducer, mascot: mascotReducer }),
+ reducer: combineReducers({
+ thread: threadReducer,
+ chatRuntime: chatRuntimeReducer,
+ mascot: mascotReducer,
+ }),
preloadedState: {
thread: {
threads: [
diff --git a/app/src/features/conversations/components/aui/auiThreadState.test.tsx b/app/src/features/conversations/components/aui/auiThreadState.test.tsx
index 34ae182728..2228ea1740 100644
--- a/app/src/features/conversations/components/aui/auiThreadState.test.tsx
+++ b/app/src/features/conversations/components/aui/auiThreadState.test.tsx
@@ -39,10 +39,10 @@ describe('auiThreadState', () => {
expect(result.current).toEqual({ canEdit: false, canSwitchToBranch: false });
});
- it('reports the external-store adapter as supporting neither edit nor branching', () => {
+ it('reports the external-store adapter as supporting both edit and branching', () => {
const { result } = renderHook(() => useAuiEditCapabilities(), {
wrapper: withRuntime('t-caps'),
});
- expect(result.current).toEqual({ canEdit: false, canSwitchToBranch: false });
+ expect(result.current).toEqual({ canEdit: true, canSwitchToBranch: true });
});
});
diff --git a/app/src/pages/dev/ToolCallGallery.tsx b/app/src/pages/dev/ToolCallGallery.tsx
index d5e991408a..03a6268628 100644
--- a/app/src/pages/dev/ToolCallGallery.tsx
+++ b/app/src/pages/dev/ToolCallGallery.tsx
@@ -8,12 +8,19 @@
*/
import { useState } from 'react';
-import { ConversationSearch, type SearchHit } from '../../components/assistant-ui/elements/conversation-search';
+import {
+ ConversationSearch,
+ type SearchHit,
+} from '../../components/assistant-ui/elements/conversation-search';
import { CitationMarker } from '../../components/assistant-ui/elements/inline-citation';
-import { MessageQueue } from '../../components/assistant-ui/elements/message-queue';
import { MemoryChips } from '../../components/assistant-ui/elements/memory-chips';
+import { MessageQueue } from '../../components/assistant-ui/elements/message-queue';
import { ScheduleCard } from '../../components/assistant-ui/elements/schedule-card';
-import { Source, SourceIcon, SourceTitle } from '../../components/assistant-ui/elements/sources.aui';
+import {
+ Source,
+ SourceIcon,
+ SourceTitle,
+} from '../../components/assistant-ui/elements/sources.aui';
import { Timeline, type TimelineEvent } from '../../components/assistant-ui/elements/timeline';
import { ToolTimeline } from '../../components/assistant-ui/elements/tool-timeline';
import { ApprovalCardAdapter } from '../../features/conversations/aui/ApprovalCardAdapter';
@@ -65,8 +72,20 @@ const SEARCH_RESULT = [
/** Fixtures for WS-G's rich-content elements (sources/citations, memory, schedule, conversation map). */
const MEMORY_SEARCH_HITS: SearchHit[] = [
- { id: 'hit-1', before: 'The deploy runs ', match: 'nightly', after: ' at 2am UTC.', position: 12 },
- { id: 'hit-2', before: 'Config lives in ', match: 'deploy/', after: 'config.yaml.', position: 68 },
+ {
+ id: 'hit-1',
+ before: 'The deploy runs ',
+ match: 'nightly',
+ after: ' at 2am UTC.',
+ position: 12,
+ },
+ {
+ id: 'hit-2',
+ before: 'Config lives in ',
+ match: 'deploy/',
+ after: 'config.yaml.',
+ position: 68,
+ },
];
const MEMORY_TIMELINE_EVENTS: TimelineEvent[] = [
@@ -320,7 +339,9 @@ export default function ToolCallGallery() {
</Source>
</div>
- <p className="text-foreground/40 text-xs">Inline citation marker (hover for the source)</p>
+ <p className="text-foreground/40 text-xs">
+ Inline citation marker (hover for the source)
+ </p>
<p className="text-foreground/80 text-sm">
The deploy runs nightly
<CitationMarker