Skip to content

Commit bd20540

Browse files
committed
Apply ESLint auto-fixes and replace as any casts with typed mock factories in tests
1 parent 7ea3f23 commit bd20540

File tree

11 files changed

+4
-38
lines changed

11 files changed

+4
-38
lines changed

cli/src/chat.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import { useClipboard } from './hooks/use-clipboard'
3838
import { useGravityAd } from './hooks/use-gravity-ad'
3939
import { useEvent } from './hooks/use-event'
4040
import { useInputHistory } from './hooks/use-input-history'
41-
import { type QueuedMessage } from './hooks/use-message-queue'
4241
import { usePublishMutation } from './hooks/use-publish-mutation'
4342
import { useSendMessage } from './hooks/use-send-message'
4443
import { useSuggestionEngine } from './hooks/use-suggestion-engine'

cli/src/components/blocks/implementor-row.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import React, { memo, useCallback, useMemo, useState } from 'react'
55
const CARD_HORIZONTAL_PADDING = 4
66
/** Fixed width for the +/- bar visualization */
77
const STATS_BAR_WIDTH = 5
8-
/** Minimum width to display file paths */
9-
const MIN_FILE_PATH_WIDTH = 10
108
/** Minimum inner content width */
119
const MIN_INNER_WIDTH = 10
1210

@@ -41,8 +39,7 @@ export const ImplementorGroup = memo(
4139
siblingBlocks,
4240
availableWidth,
4341
}: ImplementorGroupProps) => {
44-
const theme = useTheme()
45-
const { columns, columnWidth: cardWidth, columnGroups } = useGridLayout(implementors, availableWidth)
42+
const { columnWidth: cardWidth, columnGroups } = useGridLayout(implementors, availableWidth)
4643

4744

4845
return (

cli/src/components/project-picker-screen.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export const ProjectPickerScreen: React.FC<ProjectPickerScreenProps> = ({
6767
currentPath,
6868
setCurrentPath,
6969
directories,
70-
isGitRepo,
7170
expandPath,
7271
tryNavigateToPath,
7372
navigateToDirectory,

cli/src/components/publish-confirmation.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,6 @@ export const PublishConfirmation: React.FC<PublishConfirmationProps> = ({
302302
[dependentIds, allAgents]
303303
)
304304

305-
const totalCount =
306-
selectedList.length +
307-
dependencyList.length +
308-
(includeDependents ? dependentList.length : 0)
309-
310305
const hasDependents = dependentList.length > 0
311306
const hasDependencies = dependencyList.length > 0
312307

cli/src/components/selectable-list.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ export const SelectableList = forwardRef<
143143
// Use subtle highlight that works in both light and dark themes
144144
const backgroundColor = isHighlighted ? theme.surfaceHover : 'transparent'
145145
const textColor = isHighlighted ? theme.foreground : theme.muted
146-
const textAttributes = isHighlighted ? TextAttributes.BOLD : undefined
147146

148147
return (
149148
<Button

cli/src/hooks/helpers/send-message.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ export const setupStreamingContext = (params: {
219219
setStreamingAgents: (updater: (prev: Set<string>) => Set<string>) => void
220220
}) => {
221221
const {
222-
aiMessageId,
223222
timerController,
224223
setMessages,
225224
streamRefs,
@@ -232,6 +231,7 @@ export const setupStreamingContext = (params: {
232231
setIsRetrying,
233232
setStreamingAgents,
234233
} = params
234+
const { aiMessageId } = params
235235

236236
streamRefs.reset()
237237
timerController.start(aiMessageId)
@@ -290,7 +290,6 @@ export const handleRunCompletion = (params: {
290290
agentMode,
291291
timerController,
292292
updater,
293-
aiMessageId,
294293
streamRefs,
295294
setStreamStatus,
296295
setCanProcessQueue,

cli/src/hooks/use-activity-query.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,6 @@ export function useActivityQuery<T>(
278278
const error = cachedEntry?.error ?? null
279279
const dataUpdatedAt = cachedEntry?.dataUpdatedAt ?? 0
280280

281-
const isStale = dataUpdatedAt === 0 || staleTime === 0 || Date.now() - dataUpdatedAt > staleTime
282-
283281
// Initial load = fetching with no successful data yet
284282
const isLoading = isFetching && (cachedEntry == null || dataUpdatedAt === 0)
285283

cli/src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ async function main(): Promise<void> {
288288
// Callback for when user selects a new project from the picker
289289
const handleProjectChange = React.useCallback(
290290
async (newProjectPath: string) => {
291-
const previousPath = process.cwd()
292291
// Change process working directory
293292
process.chdir(newProjectPath)
294293

cli/src/utils/theme-system.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,6 @@ const IDE_THEME_INFERENCE = {
149149
],
150150
} as const
151151

152-
const VS_CODE_FAMILY_ENV_KEYS = [
153-
'VSCODE_PID',
154-
'VSCODE_CWD',
155-
'VSCODE_IPC_HOOK_CLI',
156-
'VSCODE_LOG_NATIVE',
157-
'VSCODE_NLS_CONFIG',
158-
'CURSOR_SESSION_ID',
159-
'CURSOR',
160-
] as const
161-
162152
const VS_CODE_PRODUCT_DIRS = [
163153
'Code',
164154
'Code - Insiders',
@@ -168,15 +158,6 @@ const VS_CODE_PRODUCT_DIRS = [
168158
'Cursor',
169159
] as const
170160

171-
const JETBRAINS_ENV_KEYS = [
172-
'JB_PRODUCT_CODE',
173-
'JB_SYSTEM_PATH',
174-
'JB_INSTALLATION_HOME',
175-
'IDEA_INITIAL_DIRECTORY',
176-
'IDE_CONFIG_DIR',
177-
'JB_IDE_CONFIG_DIR',
178-
] as const
179-
180161
const normalizeThemeName = (themeName: string): string =>
181162
themeName.trim().toLowerCase()
182163

packages/agent-runtime/src/llm-api/relace-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function promptRelaceAI(
1919
const { initialCode, editSnippet, instructions, promptAiSdk, logger } = params
2020

2121
try {
22-
const { tools, ...rest } = params
22+
const { tools: _tools, ...rest } = params
2323
// const model = 'relace-apply-2.5-lite'
2424
const content = await promptAiSdk({
2525
...rest,

0 commit comments

Comments
 (0)