Skip to content

Commit 9076ada

Browse files
fmt(js): npm run fix on merge (NousResearch#78271)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent be54f28 commit 9076ada

17 files changed

Lines changed: 51 additions & 41 deletions

File tree

apps/desktop/src/app/chat/perf-probe.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,13 @@ if (typeof window !== 'undefined' && !window.__PERF_DRIVE__) {
119119
let baseline: ReturnType<typeof $messages.get> | null = null
120120
let activeHandle: SyntheticDriverHandle | null = null
121121

122-
let rightPaneBaseline:
123-
| null
124-
| {
125-
activeTerminalId: null | string
126-
cwd: string
127-
repoStatusByCwd: ReturnType<typeof $repoStatusByCwd.get>
128-
takeover: boolean
129-
terminals: readonly TerminalEntry[]
130-
} = null
122+
let rightPaneBaseline: null | {
123+
activeTerminalId: null | string
124+
cwd: string
125+
repoStatusByCwd: ReturnType<typeof $repoStatusByCwd.get>
126+
takeover: boolean
127+
terminals: readonly TerminalEntry[]
128+
} = null
131129

132130
const stop = () => {
133131
activeHandle = null

apps/desktop/src/app/chat/session-tile.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,12 @@ function TileChat({
162162
(url: string) => addContextRefAttachment(`@url:${formatRefValue(url)}`, url),
163163
[addContextRefAttachment]
164164
)
165+
165166
const onPasteClipboardImage = useCallback(
166167
(opts?: { silent?: boolean }) => pasteClipboardImage(opts),
167168
[pasteClipboardImage]
168169
)
170+
169171
const onPickFiles = useCallback(() => void pickContextPaths('file'), [pickContextPaths])
170172
const onPickFolders = useCallback(() => void pickContextPaths('folder'), [pickContextPaths])
171173
const onPickImages = useCallback(() => void pickImages(), [pickImages])

apps/desktop/src/app/chat/sidebar/sessions-section.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ export function SidebarSessionsSection({
286286
(items: SessionInfo[]) => {
287287
const entries = flattenSessionsWithBranches(items)
288288

289-
return (dateGrouped ? groupEntriesByRecency(entries) : toSessionRows(entries)).map(row => renderListRow(row, false))
289+
return (dateGrouped ? groupEntriesByRecency(entries) : toSessionRows(entries)).map(row =>
290+
renderListRow(row, false)
291+
)
290292
},
291293
[dateGrouped, renderListRow]
292294
)

apps/desktop/src/app/session/hooks/use-message-stream/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ export function useMessageStream({
287287
// stays as the fallback.
288288
const writeCost = performance.now() - startedAt
289289
lastFlushCostRef.current = writeCost
290+
290291
// At most one measurement rAF may be pending: only the newest flush's
291292
// measurement matters (the guard below discards stale frames), and a
292293
// hidden renderer parks rAF callbacks — without cancellation a long
@@ -295,8 +296,10 @@ export function useMessageStream({
295296
if (measureRafRef.current !== null) {
296297
window.cancelAnimationFrame(measureRafRef.current)
297298
}
299+
298300
measureRafRef.current = window.requestAnimationFrame(frameStart => {
299301
measureRafRef.current = null
302+
300303
// A newer flush already started; its own measurement wins.
301304
if (lastFlushAtRef.current !== startedAt) {
302305
return

apps/desktop/src/app/session/hooks/use-session-actions/resume-structural-parts.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ describe('reconcileResumeMessages — structural parts on a mid-turn switch', ()
103103

104104
expect(assistant.parts.some(part => part.type === 'reasoning')).toBe(true)
105105
expect(assistant.parts.some(part => part.type === 'tool-call')).toBe(true)
106-
expect(assistant.parts.filter(part => part.type === 'text').map(part => ('text' in part ? part.text : ''))).toEqual([
107-
'partial'
108-
])
106+
expect(assistant.parts.filter(part => part.type === 'text').map(part => ('text' in part ? part.text : ''))).toEqual(
107+
['partial']
108+
)
109109
})
110110

111111
it('does not graft historical structure onto a live text-only row after compression rewrote ordinals', () => {

apps/desktop/src/app/session/hooks/use-session-actions/utils.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ describe('preserveLocalPendingTurnMessages', () => {
733733
'does not duplicate the optimistic %s turn when the persisted turn carries its directive',
734734
kind => {
735735
const ref = `@${kind}:X`
736+
736737
const previous = [
737738
msg('1-user', 'user', 'first'),
738739
msg('2-assistant', 'assistant', 'first answer'),
@@ -771,6 +772,7 @@ describe('preserveLocalPendingTurnMessages', () => {
771772

772773
it('does not duplicate a turn with multiple CRLF directives and Unicode payloads', () => {
773774
const refs = ['@file:`資料/über notes.md`', '@url:`https://example.com/café?q=✓`']
775+
774776
const previous = [
775777
msg('1-user', 'user', 'first'),
776778
msg('2-assistant', 'assistant', 'first answer'),
@@ -1153,9 +1155,9 @@ describe('appendLiveSessionProjection', () => {
11531155
expect(assistants[0].parts.some(part => part.type === 'reasoning')).toBe(true)
11541156
expect(assistants[0].parts.some(part => part.type === 'tool-call')).toBe(true)
11551157
// Answer text stays the structured row's text, not the dump.
1156-
expect(assistants[0].parts.filter(part => part.type === 'text').map(part => ('text' in part ? part.text : ''))).toEqual([
1157-
'partial'
1158-
])
1158+
expect(
1159+
assistants[0].parts.filter(part => part.type === 'text').map(part => ('text' in part ? part.text : ''))
1160+
).toEqual(['partial'])
11591161
})
11601162

11611163
it('still projects inflight when only a completed historical tool reply has structure', () => {

apps/desktop/src/components/pet/floating-pet.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export function FloatingPet() {
172172

173173
if (hasPetSpriteForMeta(current, meta)) {
174174
const merged = mergePetInfoMeta(current, meta)
175+
175176
if (merged !== current) {
176177
setPetInfo(merged)
177178
}
@@ -214,11 +215,14 @@ export function FloatingPet() {
214215
// so no timer. Legacy backend: the historical poll.
215216
const timer = changeEventsAvailable
216217
? null
217-
: window.setInterval(() => {
218-
if (document.visibilityState === 'visible') {
219-
void pull()
220-
}
221-
}, active ? PET_ACTIVE_REFRESH_MS : PET_POLL_MS)
218+
: window.setInterval(
219+
() => {
220+
if (document.visibilityState === 'visible') {
221+
void pull()
222+
}
223+
},
224+
active ? PET_ACTIVE_REFRESH_MS : PET_POLL_MS
225+
)
222226

223227
return () => {
224228
cancelled = true

apps/desktop/src/components/ui/glyph-spinner.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ describe('GlyphSpinner', () => {
145145
expect(vi.getTimerCount()).toBe(1)
146146

147147
Object.defineProperty(document, 'visibilityState', { configurable: true, value: 'hidden' })
148+
148149
try {
149150
act(() => document.dispatchEvent(new Event('visibilitychange')))
150151
expect(vi.getTimerCount()).toBe(0)

apps/desktop/src/components/ui/status-pulse.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const beat = () => {
3434
for (const subscriber of pulseSubscribers) {
3535
subscriber.play()
3636
}
37+
3738
sharedTimer = window.setTimeout(beat, PULSE_PERIOD_MS)
3839
}
3940

@@ -46,6 +47,7 @@ const handleSharedPauseChange = () => {
4647
for (const subscriber of pulseSubscribers) {
4748
subscriber.cancel()
4849
}
50+
4951
return
5052
}
5153

apps/desktop/src/debug/right-pane-events.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
export type RightPanePerfEvent =
2-
| 'project-tree-render'
3-
| 'project-tree-row-render'
4-
| 'terminal-fit-active'
5-
| 'terminal-fit-hidden'
6-
| 'terminal-measure'
2+
'project-tree-render' | 'project-tree-row-render' | 'terminal-fit-active' | 'terminal-fit-hidden' | 'terminal-measure'
73

84
export interface RightPanePerfSnapshot {
95
counts: Record<RightPanePerfEvent, number>

0 commit comments

Comments
 (0)