Skip to content

The agent that grows with you

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

hermes-seaeye[bot]eb8421ba9864
diff --git a/apps/desktop/src/app/chat/sidebar/order.test.ts b/apps/desktop/src/app/chat/sidebar/order.test.ts
index 911d451fc68..6a12d8e0868 100644
--- a/apps/desktop/src/app/chat/sidebar/order.test.ts
+++ b/apps/desktop/src/app/chat/sidebar/order.test.ts
@@ -111,13 +111,7 @@ describe('orderRowsWithinGroups', () => {
it('reorders within a group without moving the dividers', () => {
const rows = [session('a'), session('b'), divider('yesterday'), session('c'), session('d')]
- expect(ids(orderRowsWithinGroups(rows, ['b', 'a', 'd', 'c']))).toEqual([
- 'b',
- 'a',
- '--yesterday--',
- 'd',
- 'c'
- ])
+ expect(ids(orderRowsWithinGroups(rows, ['b', 'a', 'd', 'c']))).toEqual(['b', 'a', '--yesterday--', 'd', 'c'])
})
it('never moves a row across a date divider', () => {
@@ -125,13 +119,7 @@ describe('orderRowsWithinGroups', () => {
// stay there — chronology owns the groups, the drag only ranks inside one.
const rows = [session('a'), session('b'), divider('lastWeek'), session('c'), session('d')]
- expect(ids(orderRowsWithinGroups(rows, ['d', 'c', 'b', 'a']))).toEqual([
- 'b',
- 'a',
- '--lastWeek--',
- 'd',
- 'c'
- ])
+ expect(ids(orderRowsWithinGroups(rows, ['d', 'c', 'b', 'a']))).toEqual(['b', 'a', '--lastWeek--', 'd', 'c'])
})
it('leaves rows the order does not name in their recency slot', () => {
diff --git a/apps/desktop/src/app/chat/sidebar/sessions-section.tsx b/apps/desktop/src/app/chat/sidebar/sessions-section.tsx
index 12ba16134f6..c5bb1ad2b4b 100644
--- a/apps/desktop/src/app/chat/sidebar/sessions-section.tsx
+++ b/apps/desktop/src/app/chat/sidebar/sessions-section.tsx
@@ -221,6 +221,7 @@ export function SidebarSessionsSection({
// The flat recents/pinned list is the only place sessions reorder by hand;
// grouped/tree views always sort by creation date and never drag.
const sessionsDraggable = sortable && !!onReorderSessions
+
// Only Pinned arrives pre-ordered as a flat sequence. Recents keeps its
// recency sort — the drag order is layered on per date group below, so the
// buckets stay truthful and a reorder never costs the list its dividers.
diff --git a/apps/desktop/src/components/assistant-ui/thread/list.tsx b/apps/desktop/src/components/assistant-ui/thread/list.tsx
index 691f8f9323a..a2409ad8094 100644
--- a/apps/desktop/src/components/assistant-ui/thread/list.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/list.tsx
@@ -145,11 +145,7 @@ export function buildGroups(signature: string): MessageGroup[] {
// Walk turns newest-first, summing their render weights until the budget is met;
// everything before the first kept turn is hidden. `minVisible` turns are kept
// regardless of weight. Returns the index of that first visible group.
-export function firstVisibleGroupIndex(
- groups: readonly MessageGroup[],
- budget: number,
- minVisible = 0
-): number {
+export function firstVisibleGroupIndex(groups: readonly MessageGroup[], budget: number, minVisible = 0): number {
let firstVisible = groups.length
for (let i = groups.length - 1, weight = 0; i >= 0; i--) {
@@ -381,6 +377,7 @@ const ThreadMessageListInner: FC<ThreadMessageListProps> = ({
renderBudget,
renderBudget >= RENDER_BUDGET ? MIN_VISIBLE_GROUPS : 0
)
+
const visibleGroups = hiddenCount > 0 ? groups.slice(hiddenCount) : groups
// Where the always-rendered live tail begins. Derived from the WEIGHTED
diff --git a/apps/desktop/src/components/chat/disclosure-row.tsx b/apps/desktop/src/components/chat/disclosure-row.tsx
index 7180d2610d0..f07faa4bcf5 100644
--- a/apps/desktop/src/components/chat/disclosure-row.tsx
+++ b/apps/desktop/src/components/chat/disclosure-row.tsx
@@ -66,9 +66,7 @@ export function DisclosureRow({
{action}
</span>
)}
- {trailing && (
- <span className="flex h-(--conversation-line-height) shrink-0 items-center pl-1.5">{trailing}</span>
- )}
+ {trailing && <span className="flex h-(--conversation-line-height) shrink-0 items-center pl-1.5">{trailing}</span>}
</div>
)
}
diff --git a/apps/desktop/src/lib/render-weight.test.ts b/apps/desktop/src/lib/render-weight.test.ts
index 096c7212a3d..4ae73a6fc83 100644
--- a/apps/desktop/src/lib/render-weight.test.ts
+++ b/apps/desktop/src/lib/render-weight.test.ts
@@ -72,7 +72,12 @@ describe('messagePaintWeight', () => {
it('prices an image card flat, however long its data URL', () => {
const card = (chars: number) => [
- { type: 'tool-call', toolName: 'image_generate', args: {}, result: { image: `data:image/png;base64,${'A'.repeat(chars)}` } }
+ {
+ type: 'tool-call',
+ toolName: 'image_generate',
+ args: {},
+ result: { image: `data:image/png;base64,${'A'.repeat(chars)}` }
+ }
]
expect(messagePaintWeight(card(10_000_000))).toBe(messagePaintWeight(card(80)))
@@ -80,7 +85,11 @@ describe('messagePaintWeight', () => {
it('charges nothing for a row that renders nothing', () => {
const hoisted = [
- { type: 'tool-call', toolName: 'todo', args: { todos: Array.from({ length: 40 }, (_, i) => ({ content: `t${i}` })) } },
+ {
+ type: 'tool-call',
+ toolName: 'todo',
+ args: { todos: Array.from({ length: 40 }, (_, i) => ({ content: `t${i}` })) }
+ },
{ type: 'tool-call', toolName: 'react_to_message', args: { emoji: '❤️' } }
]