Skip to content

Commit d071248

Browse files
committed
Fix lint
1 parent 77a4f2f commit d071248

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use client'
22

3-
import type { ContentBlock, OptionItem, SubagentName, ToolCallData } from '../../types'
4-
import { SUBAGENT_LABELS, TOOL_UI_METADATA } from '../../types'
53
import { resolveToolDisplay } from '@/lib/copilot/store-utils'
64
import { ClientToolCallState } from '@/lib/copilot/tools/client/tool-display-registry'
5+
import type { ContentBlock, OptionItem, SubagentName, ToolCallData } from '../../types'
6+
import { SUBAGENT_LABELS, TOOL_UI_METADATA } from '../../types'
77
import type { AgentGroupItem } from './components'
88
import { AgentGroup, ChatContent, CircleStop, Options, PendingTagIndicator } from './components'
99

@@ -55,7 +55,9 @@ function resolveAgentLabel(key: string): string {
5555
return SUBAGENT_LABELS[key as SubagentName] ?? formatToolName(key)
5656
}
5757

58-
function mapToolStatusToClientState(status: ContentBlock['toolCall'] extends { status: infer T } ? T : string) {
58+
function mapToolStatusToClientState(
59+
status: ContentBlock['toolCall'] extends { status: infer T } ? T : string
60+
) {
5961
switch (status) {
6062
case 'success':
6163
return ClientToolCallState.success
@@ -70,7 +72,8 @@ function mapToolStatusToClientState(status: ContentBlock['toolCall'] extends { s
7072

7173
function getOverrideDisplayTitle(tc: NonNullable<ContentBlock['toolCall']>): string | undefined {
7274
if (tc.name === 'read' || tc.name.endsWith('_respond')) {
73-
return resolveToolDisplay(tc.name, mapToolStatusToClientState(tc.status), tc.id, tc.params)?.text
75+
return resolveToolDisplay(tc.name, mapToolStatusToClientState(tc.status), tc.id, tc.params)
76+
?.text
7477
}
7578
return undefined
7679
}

apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -738,20 +738,14 @@ export function useChat(
738738
const isPartial = data?.partial === true
739739
if (!id) break
740740

741-
if (
742-
name === 'tool_search_tool_regex' ||
743-
name === 'grep' ||
744-
name === 'glob'
745-
) {
741+
if (name === 'tool_search_tool_regex' || name === 'grep' || name === 'glob') {
746742
break
747743
}
748744
const ui = parsed.ui || data?.ui
749745
if (ui?.hidden) break
750746
const displayTitle = ui?.title || ui?.phaseLabel
751747
const phaseLabel = ui?.phaseLabel
752-
const args = (data?.arguments ?? data?.input) as
753-
| Record<string, unknown>
754-
| undefined
748+
const args = (data?.arguments ?? data?.input) as Record<string, unknown> | undefined
755749
if (!toolMap.has(id)) {
756750
toolMap.set(id, blocks.length)
757751
blocks.push({

apps/sim/lib/copilot/store-utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import {
2323
Wrench,
2424
Zap,
2525
} from 'lucide-react'
26+
import { VFS_DIR_TO_RESOURCE } from '@/lib/copilot/resource-types'
2627
import {
2728
ClientToolCallState,
2829
type ClientToolDisplay,
2930
TOOL_DISPLAY_REGISTRY,
3031
} from '@/lib/copilot/tools/client/tool-display-registry'
31-
import { VFS_DIR_TO_RESOURCE } from '@/lib/copilot/resource-types'
3232

3333
const logger = createLogger('CopilotStoreUtils')
3434

@@ -134,7 +134,9 @@ function specialToolDisplay(
134134
}
135135

136136
const searchQuery =
137-
readStringParam(params, 'pattern') || readStringParam(params, 'query') || readStringParam(params, 'glob')
137+
readStringParam(params, 'pattern') ||
138+
readStringParam(params, 'query') ||
139+
readStringParam(params, 'glob')
138140

139141
if ((toolName === 'grep' || toolName === 'glob') && searchQuery) {
140142
return {

apps/sim/lib/copilot/tools/server/files/download-to-workspace-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import {
55
type BaseServerTool,
66
type ServerToolContext,
77
} from '@/lib/copilot/tools/server/base-tool'
8+
import { uploadWorkspaceFile } from '@/lib/uploads/contexts/workspace/workspace-file-manager'
89
import {
910
getExtensionFromMimeType,
1011
getFileExtension,
1112
getMimeTypeFromExtension,
1213
} from '@/lib/uploads/utils/file-utils'
13-
import { uploadWorkspaceFile } from '@/lib/uploads/contexts/workspace/workspace-file-manager'
1414

1515
const logger = createLogger('DownloadToWorkspaceFileTool')
1616

apps/sim/lib/copilot/tools/server/router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {
44
type BaseServerTool,
55
type ServerToolContext,
66
} from '@/lib/copilot/tools/server/base-tool'
7-
import { downloadToWorkspaceFileServerTool } from '@/lib/copilot/tools/server/files/download-to-workspace-file'
87
import { getBlocksMetadataServerTool } from '@/lib/copilot/tools/server/blocks/get-blocks-metadata-tool'
98
import { getTriggerBlocksServerTool } from '@/lib/copilot/tools/server/blocks/get-trigger-blocks'
109
import { searchDocumentationServerTool } from '@/lib/copilot/tools/server/docs/search-documentation'
10+
import { downloadToWorkspaceFileServerTool } from '@/lib/copilot/tools/server/files/download-to-workspace-file'
1111
import { workspaceFileServerTool } from '@/lib/copilot/tools/server/files/workspace-file'
1212
import { generateImageServerTool } from '@/lib/copilot/tools/server/image/generate-image'
1313
import { getJobLogsServerTool } from '@/lib/copilot/tools/server/jobs/get-job-logs'

0 commit comments

Comments
 (0)