Skip to content

Commit 0176838

Browse files
committed
Remove leading semicolon patterns
1 parent 53a2778 commit 0176838

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

cli/src/__tests__/unit/agent-mode-toggle.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ describe('useHoverToggle timing (controller)', () => {
4848
let originalSetTimeout: typeof setTimeout
4949
let originalClearTimeout: typeof clearTimeout
5050
let originalNow: typeof Date.now
51+
let setNow: (ms: number) => void
5152

5253
let timers: { id: number; ms: number; fn: Function; active: boolean }[]
5354
let nextId: number
@@ -67,10 +68,13 @@ describe('useHoverToggle timing (controller)', () => {
6768
originalNow = Date.now
6869

6970
let now = 1_000
70-
Date.now = () => now
71-
;(Date.now as any).set = (v: number) => {
72-
now = v
73-
}
71+
const nowFn = Object.assign(() => now, {
72+
set(v: number) {
73+
now = v
74+
},
75+
})
76+
Date.now = nowFn as any
77+
setNow = nowFn.set
7478

7579
globalThis.setTimeout = ((fn: Function, ms?: number) => {
7680
const id = nextId++
@@ -116,7 +120,7 @@ describe('useHoverToggle timing (controller)', () => {
116120
ctl.closeNow(true)
117121
ctl.scheduleOpen()
118122
expect(timers.length).toBe(0)
119-
;(Date.now as any).set(1_000 + REOPEN_SUPPRESS_MS + 1)
123+
setNow(1_000 + REOPEN_SUPPRESS_MS + 1)
120124
ctl.scheduleOpen()
121125
expect(timers.length).toBe(1)
122126
expect(timers[0].ms).toBe(OPEN_DELAY_MS)

cli/src/commands/publish.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ export async function handlePublish(agentIds: string[]): Promise<PublishResult>
152152

153153
// Convert handleSteps function to string if present
154154
if (typeof (matchingTemplate as any).handleSteps === 'function') {
155-
;(processedTemplate as any).handleSteps = (
156-
matchingTemplate as any
157-
).handleSteps.toString()
155+
const handleSteps = (matchingTemplate as any).handleSteps.toString()
156+
(processedTemplate as any).handleSteps = handleSteps
158157
}
159158

160159
matchingTemplates[matchingTemplate.id] = processedTemplate

cli/src/components/multiline-input.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ export const MultilineInput = forwardRef<
205205
focus: () => {
206206
const node = scrollBoxRef.current
207207
if (node && typeof (node as any).focus === 'function') {
208-
;(node as any).focus()
208+
const focusable = node as any
209+
focusable.focus()
209210
}
210211
},
211212
}),
@@ -255,7 +256,8 @@ export const MultilineInput = forwardRef<
255256
// Helper to clear the current selection
256257
const clearSelection = useCallback(() => {
257258
// Use renderer's clearSelection for proper visual clearing
258-
;(renderer as any)?.clearSelection?.()
259+
const rendererWithSelection = renderer as any
260+
rendererWithSelection?.clearSelection?.()
259261
}, [renderer])
260262

261263
// Helper to delete selected text and return new value and cursor position

0 commit comments

Comments
 (0)