diff --git a/apps/desktop/src/app/chat/composer/hooks/use-at-completions.test.ts b/apps/desktop/src/app/chat/composer/hooks/use-at-completions.test.ts index b133a7060ff..cc1818f43b2 100644 --- a/apps/desktop/src/app/chat/composer/hooks/use-at-completions.test.ts +++ b/apps/desktop/src/app/chat/composer/hooks/use-at-completions.test.ts @@ -23,15 +23,17 @@ function gatewayStub(latencyMs = 40) { function setup(latencyMs = 40) { const { calls, gateway } = gatewayStub(latencyMs) - const { result } = renderHook(() => - useAtCompletions({ gateway: gateway as never, sessionId: 's1', cwd: '/repo' }) - ) + const { result } = renderHook(() => useAtCompletions({ gateway: gateway as never, sessionId: 's1', cwd: '/repo' })) return { calls, result } } /** Type a burst of keystrokes `gapMs` apart, like a person. */ -async function type(result: { current: { adapter: { search?: (q: string) => unknown } } }, queries: string[], gapMs: number) { +async function type( + result: { current: { adapter: { search?: (q: string) => unknown } } }, + queries: string[], + gapMs: number +) { for (const q of queries) { act(() => { result.current.adapter.search?.(q) diff --git a/apps/desktop/src/app/chat/composer/hooks/use-at-completions.ts b/apps/desktop/src/app/chat/composer/hooks/use-at-completions.ts index 5a53f46e9ea..1f8a12df336 100644 --- a/apps/desktop/src/app/chat/composer/hooks/use-at-completions.ts +++ b/apps/desktop/src/app/chat/composer/hooks/use-at-completions.ts @@ -124,6 +124,7 @@ export function useAtCompletions(options: { const result = await cachedPathCompletion(cacheKey(query), () => gateway.request<{ items?: CompletionEntry[] }>('complete.path', params) ) + const items = result.items ?? [] return { items: items.length > 0 ? items : starters, query } diff --git a/apps/desktop/src/app/chat/composer/hooks/use-composer-trigger.ts b/apps/desktop/src/app/chat/composer/hooks/use-composer-trigger.ts index 51c57a7679e..fae1d03a313 100644 --- a/apps/desktop/src/app/chat/composer/hooks/use-composer-trigger.ts +++ b/apps/desktop/src/app/chat/composer/hooks/use-composer-trigger.ts @@ -282,8 +282,7 @@ export function useComposerTrigger({ // and a pick must be exactly one undo step. recordUndoPoint?.() - const rebuildAround = (insert: DocumentFragment | string) => - rebuildAroundCaret(editor, trigger.tokenLength, insert) + const rebuildAround = (insert: DocumentFragment | string) => rebuildAroundCaret(editor, trigger.tokenLength, insert) // Action items (e.g. "Browse all sessions…") run a side effect instead of // inserting a chip: strip the typed trigger token, then fire the action. diff --git a/apps/desktop/src/components/assistant-ui/clarify-tool.tsx b/apps/desktop/src/components/assistant-ui/clarify-tool.tsx index d66e1a4abb0..57e86104207 100644 --- a/apps/desktop/src/components/assistant-ui/clarify-tool.tsx +++ b/apps/desktop/src/components/assistant-ui/clarify-tool.tsx @@ -93,8 +93,7 @@ const OPTION_ROW_CLASS = // field-sizing on top of Textarea's shared chrome; kill min-h-16 for one-liners. const CLARIFY_TEXTAREA_CLASS = 'field-sizing-content max-h-40 min-h-0 resize-none' -const CLARIFY_SHELL_CLASS = - `${WIDGET_SHELL_CLASS} text-[length:var(--conversation-text-font-size)] text-(--ui-text-primary)` +const CLARIFY_SHELL_CLASS = `${WIDGET_SHELL_CLASS} text-[length:var(--conversation-text-font-size)] text-(--ui-text-primary)` const CLARIFY_ICON_CLASS = 'mt-px size-4 shrink-0 text-(--ui-text-tertiary)' @@ -522,11 +521,7 @@ function ClarifyToolPending({ args }: ToolCallMessagePartProps) { if (loading) { return ( - + ) diff --git a/apps/desktop/src/components/assistant-ui/directive-text.tsx b/apps/desktop/src/components/assistant-ui/directive-text.tsx index 2be6d56e500..3846b4fc5df 100644 --- a/apps/desktop/src/components/assistant-ui/directive-text.tsx +++ b/apps/desktop/src/components/assistant-ui/directive-text.tsx @@ -45,7 +45,6 @@ export function refAttrsHtml(kind?: string): string { return kind ? `class="ref" data-ref="${referenceKind(kind)}"` : 'class="ref"' } - /** SVG markup string for embedding directly in HTML (composer contenteditable). */ export function directiveIconSvg(type: string) { const inner = iconPathsFor(type) diff --git a/apps/desktop/src/components/assistant-ui/markdown-text.tsx b/apps/desktop/src/components/assistant-ui/markdown-text.tsx index a5b579f645a..c243b2d2d16 100644 --- a/apps/desktop/src/components/assistant-ui/markdown-text.tsx +++ b/apps/desktop/src/components/assistant-ui/markdown-text.tsx @@ -369,11 +369,7 @@ function MarkdownImageContent({ className, src, alt, ...props }: ComponentProps< return ( Couldn't load {name}.{' '} - {openFailed && }