Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#74677)

hermes-seaeye[bot]fed48cf5b032
diff --git a/apps/desktop/src/app/chat/composer/index.tsx b/apps/desktop/src/app/chat/composer/index.tsx
index dbcef7bfe28..19b71ed6543 100644
--- a/apps/desktop/src/app/chat/composer/index.tsx
+++ b/apps/desktop/src/app/chat/composer/index.tsx
@@ -1043,9 +1043,7 @@ export function ChatBar({
<div
className={cn(
'z-30 flex flex-col',
- poppedOut
- ? 'fixed max-w-[calc(100vw-1.5rem)]'
- : 'absolute bottom-0 left-1/2 max-w-full -translate-x-1/2'
+ poppedOut ? 'fixed max-w-[calc(100vw-1.5rem)]' : 'absolute bottom-0 left-1/2 max-w-full -translate-x-1/2'
)}
data-popped-out={poppedOut ? '' : undefined}
data-slot="composer-dock"
@@ -1131,126 +1129,126 @@ export function ChatBar({
}}
ref={composerRef}
>
- {isHelpHint && <HelpHint />}
- {trigger && !argStageEmpty && (
- <ComposerTriggerPopover
- activeIndex={triggerActive}
- items={triggerItems}
- kind={trigger.kind}
- loading={triggerLoading}
- onHover={setTriggerActive}
- onPick={replaceTriggerWithChip}
- />
- )}
- {!poppedOut && (
- <div
- className="pointer-events-none absolute inset-0 rounded-[inherit]"
- style={{ background: COMPOSER_FADE_BACKGROUND }}
- />
- )}
- {/* Drag region: covers the transparent grab margin around the surface.
+ {isHelpHint && <HelpHint />}
+ {trigger && !argStageEmpty && (
+ <ComposerTriggerPopover
+ activeIndex={triggerActive}
+ items={triggerItems}
+ kind={trigger.kind}
+ loading={triggerLoading}
+ onHover={setTriggerActive}
+ onPick={replaceTriggerWithChip}
+ />
+ )}
+ {!poppedOut && (
+ <div
+ className="pointer-events-none absolute inset-0 rounded-[inherit]"
+ style={{ background: COMPOSER_FADE_BACKGROUND }}
+ />
+ )}
+ {/* Drag region: covers the transparent grab margin around the surface.
The surface sits on top (z-4) so only the exposed ring receives this
element's hover/cursor — grab cursor + a diagonal hatch (/////)
appear when you hover the draggable margin, never over the input.
The hatch pattern + opacity ladder live in styles.css. */}
- {popoutAllowed && (
- <div
- aria-hidden
- className={cn('pointer-events-auto absolute inset-0', dragging ? 'cursor-grabbing' : 'cursor-grab')}
- data-dragging={dragging ? '' : undefined}
- data-slot="composer-drag-region"
- onDoubleClick={handleComposerToggle}
- />
- )}
- <div className="relative w-full rounded-[inherit]">
- <div
- className={cn(
- 'group/composer-surface relative z-4 isolate grid grid-rows-[auto_1fr] overflow-hidden rounded-[inherit] border border-[color-mix(in_srgb,var(--dt-composer-ring)_calc(18%*var(--composer-ring-strength)),var(--dt-input))]',
- COMPOSER_DROP_FADE_CLASS,
- dragActive && COMPOSER_DROP_ACTIVE_CLASS
- )}
- data-slot="composer-surface"
- ref={composerSurfaceRef}
- >
+ {popoutAllowed && (
<div
aria-hidden
- className={cn(
- 'pointer-events-none absolute inset-0 -z-10 rounded-[inherit]',
- composerFill,
- composerSurfaceGlass
- )}
- />
- <CodingStatusRow
- onBranchOff={handleBranchOff}
- onConvertBranch={handleConvertBranch}
- onListBranches={handleListBranches}
- onOpen={toggleReview}
- onOpenWorktree={openInWorktree}
- onSwitchBranch={handleSwitchBranch}
- repoPath={cwd}
+ className={cn('pointer-events-auto absolute inset-0', dragging ? 'cursor-grabbing' : 'cursor-grab')}
+ data-dragging={dragging ? '' : undefined}
+ data-slot="composer-drag-region"
+ onDoubleClick={handleComposerToggle}
/>
+ )}
+ <div className="relative w-full rounded-[inherit]">
<div
className={cn(
- 'relative z-1 flex min-h-0 w-full flex-col gap-(--composer-row-gap) overflow-hidden rounded-[inherit] px-(--composer-surface-pad-x) py-(--composer-surface-pad-y) transition-opacity duration-200 ease-out',
- scrolledUp
- ? 'opacity-30 group-hover/composer:opacity-100 group-focus-within/composer-surface:opacity-100'
- : 'opacity-100'
+ 'group/composer-surface relative z-4 isolate grid grid-rows-[auto_1fr] overflow-hidden rounded-[inherit] border border-[color-mix(in_srgb,var(--dt-composer-ring)_calc(18%*var(--composer-ring-strength)),var(--dt-input))]',
+ COMPOSER_DROP_FADE_CLASS,
+ dragActive && COMPOSER_DROP_ACTIVE_CLASS
)}
- data-slot="composer-fade"
+ data-slot="composer-surface"
+ ref={composerSurfaceRef}
>
- {/* Contribution seams: banners above, a row below, inline
- additions beside the "+" menu and before the controls.
- All four render nothing until something contributes. */}
- <ContribSlot area={COMPOSER_AREAS.top} />
- <VoiceActivity state={voiceActivityState} />
- <VoicePlaybackActivity />
- {queueEdit && editingQueuedPrompt && (
- <div className="flex items-center justify-between gap-2 rounded-lg border border-[color-mix(in_srgb,var(--dt-composer-ring)_32%,transparent)] bg-accent/18 px-2 py-1">
- <div className="min-w-0 text-[0.7rem] text-muted-foreground/88">
- {t.composer.editingQueuedInComposer}
- </div>
- <div className="flex shrink-0 items-center gap-1">
- <Button
- className="h-6 rounded-md px-2 text-[0.68rem]"
- onClick={() => exitQueuedEdit('cancel')}
- type="button"
- variant="ghost"
- >
- {t.common.cancel}
- </Button>
- <Button
- className="h-6 rounded-md px-2 text-[0.68rem]"
- onClick={() => exitQueuedEdit('save')}
- type="button"
- >
- {t.common.save}
- </Button>
- </div>
- </div>
- )}
- {attachments.length > 0 && <AttachmentList attachments={attachments} onRemove={onRemoveAttachment} />}
+ <div
+ aria-hidden
+ className={cn(
+ 'pointer-events-none absolute inset-0 -z-10 rounded-[inherit]',
+ composerFill,
+ composerSurfaceGlass
+ )}
+ />
+ <CodingStatusRow
+ onBranchOff={handleBranchOff}
+ onConvertBranch={handleConvertBranch}
+ onListBranches={handleListBranches}
+ onOpen={toggleReview}
+ onOpenWorktree={openInWorktree}
+ onSwitchBranch={handleSwitchBranch}
+ repoPath={cwd}
+ />
<div
className={cn(
- 'grid w-full',
- stacked
- ? 'grid-cols-[auto_1fr] gap-(--composer-row-gap) [grid-template-areas:"input_input"_"menu_controls"]'
- : 'grid-cols-[auto_1fr_auto] items-center gap-(--composer-control-gap) [grid-template-areas:"menu_input_controls"]'
+ 'relative z-1 flex min-h-0 w-full flex-col gap-(--composer-row-gap) overflow-hidden rounded-[inherit] px-(--composer-surface-pad-x) py-(--composer-surface-pad-y) transition-opacity duration-200 ease-out',
+ scrolledUp
+ ? 'opacity-30 group-hover/composer:opacity-100 group-focus-within/composer-surface:opacity-100'
+ : 'opacity-100'
)}
+ data-slot="composer-fade"
>
- <div className="flex translate-y-[3px] items-start gap-(--composer-control-gap) self-start [grid-area:menu]">
- {contextMenu}
- <ContribSlot area={COMPOSER_AREAS.leading} />
- </div>
- <div className="min-w-0 [grid-area:input]">{input}</div>
- <div className="flex items-center justify-end gap-(--composer-control-gap) [grid-area:controls]">
- <ContribSlot area={COMPOSER_AREAS.actions} />
- {controls}
+ {/* Contribution seams: banners above, a row below, inline
+ additions beside the "+" menu and before the controls.
+ All four render nothing until something contributes. */}
+ <ContribSlot area={COMPOSER_AREAS.top} />
+ <VoiceActivity state={voiceActivityState} />
+ <VoicePlaybackActivity />
+ {queueEdit && editingQueuedPrompt && (
+ <div className="flex items-center justify-between gap-2 rounded-lg border border-[color-mix(in_srgb,var(--dt-composer-ring)_32%,transparent)] bg-accent/18 px-2 py-1">
+ <div className="min-w-0 text-[0.7rem] text-muted-foreground/88">
+ {t.composer.editingQueuedInComposer}
+ </div>
+ <div className="flex shrink-0 items-center gap-1">
+ <Button
+ className="h-6 rounded-md px-2 text-[0.68rem]"
+ onClick={() => exitQueuedEdit('cancel')}
+ type="button"
+ variant="ghost"
+ >
+ {t.common.cancel}
+ </Button>
+ <Button
+ className="h-6 rounded-md px-2 text-[0.68rem]"
+ onClick={() => exitQueuedEdit('save')}
+ type="button"
+ >
+ {t.common.save}
+ </Button>
+ </div>
+ </div>
+ )}
+ {attachments.length > 0 && <AttachmentList attachments={attachments} onRemove={onRemoveAttachment} />}
+ <div
+ className={cn(
+ 'grid w-full',
+ stacked
+ ? 'grid-cols-[auto_1fr] gap-(--composer-row-gap) [grid-template-areas:"input_input"_"menu_controls"]'
+ : 'grid-cols-[auto_1fr_auto] items-center gap-(--composer-control-gap) [grid-template-areas:"menu_input_controls"]'
+ )}
+ >
+ <div className="flex translate-y-[3px] items-start gap-(--composer-control-gap) self-start [grid-area:menu]">
+ {contextMenu}
+ <ContribSlot area={COMPOSER_AREAS.leading} />
+ </div>
+ <div className="min-w-0 [grid-area:input]">{input}</div>
+ <div className="flex items-center justify-end gap-(--composer-control-gap) [grid-area:controls]">
+ <ContribSlot area={COMPOSER_AREAS.actions} />
+ {controls}
+ </div>
</div>
+ <ContribSlot area={COMPOSER_AREAS.bottom} />
</div>
- <ContribSlot area={COMPOSER_AREAS.bottom} />
</div>
</div>
- </div>
</ComposerPrimitive.Root>
{/* Underside: chrome-free strip BELOW the composer. Outside the root
for the same reason as the micro actions — it must not fall inside
diff --git a/apps/desktop/src/app/command-palette/index.tsx b/apps/desktop/src/app/command-palette/index.tsx
index ff7af6b5c91..ce82571d7d2 100644
--- a/apps/desktop/src/app/command-palette/index.tsx
+++ b/apps/desktop/src/app/command-palette/index.tsx
@@ -277,7 +277,9 @@ const PaletteRow = memo(function PaletteRow({
)}
</span>
{item.detail && <span className="truncate text-muted-foreground/80">{item.detail}</span>}
- {combo && <KbdCombo className={cn('ml-auto', modPreview ? 'opacity-90' : 'opacity-55')} combo={combo} size="sm" />}
+ {combo && (
+ <KbdCombo className={cn('ml-auto', modPreview ? 'opacity-90' : 'opacity-55')} combo={combo} size="sm" />
+ )}
{item.to && <ChevronRight className={cn('size-3.5 shrink-0 text-muted-foreground/70', !combo && 'ml-auto')} />}
{item.active && <Check className={cn('size-3.5 shrink-0 text-primary', !combo && !item.to && 'ml-auto')} />}
</CommandItem>
diff --git a/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts b/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts
index 019328d21c5..2c0913fb6dc 100644
--- a/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts
+++ b/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts
@@ -100,16 +100,8 @@ const _chatMessageFieldsExhaustive: {
[K in Exclude<keyof ChatMessage, (typeof COMPARED_FIELDS)[number] | (typeof IGNORED_FIELDS)[number]>]: never
} = {}
-const COMPARED_FIELDS = [
- 'id',
- 'role',
- 'pending',
- 'error',
- 'hidden',
- 'branchGroupId',
- 'interim',
- 'reactions'
-] as const
+const COMPARED_FIELDS = ['id', 'role', 'pending', 'error', 'hidden', 'branchGroupId', 'interim', 'reactions'] as const
+
const IGNORED_FIELDS = ['timestamp', 'attachmentRefs', 'parts', 'rowId'] as const
// Compile-time check: every ChatMessagePart discriminant must be handled by
@@ -193,10 +185,7 @@ export function chatReactionsEquivalent(a: ChatMessage['reactions'], b: ChatMess
return (
aList.length === bList.length &&
- aList.every(
- (reaction, index) =>
- reaction.emoji === bList[index].emoji && reaction.author === bList[index].author
- )
+ aList.every((reaction, index) => reaction.emoji === bList[index].emoji && reaction.author === bList[index].author)
)
}
diff --git a/apps/desktop/src/components/assistant-ui/thread/message-reactions.tsx b/apps/desktop/src/components/assistant-ui/thread/message-reactions.tsx
index 749335b1c38..05d07a5b12f 100644
--- a/apps/desktop/src/components/assistant-ui/thread/message-reactions.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/message-reactions.tsx
@@ -117,10 +117,7 @@ export const ReactionPicker: FC<{
// Opt this one surface out of the shared popover glass: emoji hover
// tints at 15% alpha are unreadable over blurred transcript text.
// Overriding the local surface var keeps the arrow matched for free.
- className={cn(
- 'w-auto p-1 [--popover-surface:var(--ui-bg-elevated)]',
- !expanded && 'flex gap-0.5'
- )}
+ className={cn('w-auto p-1 [--popover-surface:var(--ui-bg-elevated)]', !expanded && 'flex gap-0.5')}
onCloseAutoFocus={event => event.preventDefault()}
side="top"
>
diff --git a/apps/desktop/src/store/projects.ts b/apps/desktop/src/store/projects.ts
index 22e9ce2af81..ca4511e6186 100644
--- a/apps/desktop/src/store/projects.ts
+++ b/apps/desktop/src/store/projects.ts
@@ -1128,7 +1128,11 @@ export async function openFolderAsProject(dir?: string): Promise<void> {
setSidebarAgentsGrouped(true)
enterProject(existing)
} else {
- const name = target.replace(/[/\\]+$/, '').split(/[/\\]/).pop() || target
+ const name =
+ target
+ .replace(/[/\\]+$/, '')
+ .split(/[/\\]/)
+ .pop() || target
try {
const created = await createProject({ name, folders: [target], primaryPath: target, use: true })
diff --git a/apps/desktop/src/store/reactions.ts b/apps/desktop/src/store/reactions.ts
index c8c2b414a8a..c75af2b81f1 100644
--- a/apps/desktop/src/store/reactions.ts
+++ b/apps/desktop/src/store/reactions.ts
@@ -62,10 +62,7 @@ export async function toggleMessageReaction(
const gateway = activeGateway()
if (!sessionId || !gateway) {
- notifyError(
- new Error(!sessionId ? 'No active session' : 'Gateway not connected'),
- 'Could not react'
- )
+ notifyError(new Error(!sessionId ? 'No active session' : 'Gateway not connected'), 'Could not react')
return
}