Skip to content

Commit 9cbff55

Browse files
committed
chore: run format
1 parent 476bccd commit 9cbff55

File tree

20 files changed

+448
-413
lines changed

20 files changed

+448
-413
lines changed

sim/app/api/function/execute/route.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,15 @@ export async function POST(req: NextRequest) {
6767
environmentVariables: envVars, // Make environment variables available in the context
6868
console: {
6969
log: (...args: any[]) => {
70-
const logMessage =
71-
args
72-
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
73-
.join(' ')
70+
const logMessage = args
71+
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
72+
.join(' ')
7473
stdout += logMessage
7574
},
7675
error: (...args: any[]) => {
77-
const errorMessage =
78-
args
79-
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
80-
.join(' ')
76+
const errorMessage = args
77+
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
78+
.join(' ')
8179
logger.error(`[${requestId}] Code Console Error:`, errorMessage)
8280
stdout += 'ERROR: ' + errorMessage
8381
},

sim/app/api/proxy-image/route.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function GET(request: Request) {
1515
// Add appropriate headers for fetching images
1616
const response = await fetch(imageUrl, {
1717
headers: {
18-
'Accept': 'image/*, */*',
18+
Accept: 'image/*, */*',
1919
'User-Agent': 'Mozilla/5.0 (compatible; ImageProxyBot/1.0)',
2020
},
2121
// Set a reasonable timeout
@@ -24,17 +24,17 @@ export async function GET(request: Request) {
2424

2525
if (!response.ok) {
2626
console.error(`Failed to fetch image from ${imageUrl}:`, response.status, response.statusText)
27-
return new NextResponse(`Failed to fetch image: ${response.status} ${response.statusText}`, {
28-
status: response.status
27+
return new NextResponse(`Failed to fetch image: ${response.status} ${response.statusText}`, {
28+
status: response.status,
2929
})
3030
}
3131

3232
const contentType = response.headers.get('content-type')
3333
console.log('Image content-type:', contentType)
34-
34+
3535
const blob = await response.blob()
3636
console.log('Image size:', blob.size, 'bytes')
37-
37+
3838
if (blob.size === 0) {
3939
console.error('Empty image received from source URL')
4040
return new NextResponse('Empty image received from source', { status: 422 })
@@ -52,11 +52,11 @@ export async function GET(request: Request) {
5252
} catch (error) {
5353
// Log the full error for debugging
5454
console.error('Error proxying image:', error)
55-
55+
5656
// Return a helpful error response
5757
return new NextResponse(
58-
`Internal Server Error: ${error instanceof Error ? error.message : 'Unknown error'}`,
58+
`Internal Server Error: ${error instanceof Error ? error.message : 'Unknown error'}`,
5959
{ status: 500 }
6060
)
6161
}
62-
}
62+
}

sim/app/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
z-index: 30 !important;
1616
}
1717

18-
.workflow-container .react-flow__edge [data-testid="workflow-edge"] {
18+
.workflow-container .react-flow__edge [data-testid='workflow-edge'] {
1919
z-index: 0 !important;
2020
}
2121

sim/app/w/[id]/components/workflow-block/components/sub-block/components/dropdown.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import {
99
import { useSubBlockValue } from '../hooks/use-sub-block-value'
1010

1111
interface DropdownProps {
12-
options: Array<string | { label: string; id: string }> | (() => Array<string | { label: string; id: string }>)
12+
options:
13+
| Array<string | { label: string; id: string }>
14+
| (() => Array<string | { label: string; id: string }>)
1315
defaultValue?: string
1416
blockId: string
1517
subBlockId: string

sim/blocks/blocks/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { AgentIcon } from '@/components/icons'
2+
import { useOllamaStore } from '@/stores/ollama/store'
23
import { MODELS_TEMP_RANGE_0_1, MODELS_TEMP_RANGE_0_2 } from '@/providers/model-capabilities'
34
import { getAllModelProviders, getBaseModelProviders } from '@/providers/utils'
45
import { ToolResponse } from '@/tools/types'
56
import { BlockConfig } from '../types'
6-
import { useOllamaStore } from '@/stores/ollama/store'
77

88
interface AgentResponse extends ToolResponse {
99
output: {

sim/blocks/blocks/evaluator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { ChartBarIcon } from '@/components/icons'
22
import { createLogger } from '@/lib/logs/console-logger'
3+
import { useOllamaStore } from '@/stores/ollama/store'
34
import { ProviderId } from '@/providers/types'
4-
import { getBaseModelProviders, getAllModelProviders } from '@/providers/utils'
5+
import { getAllModelProviders, getBaseModelProviders } from '@/providers/utils'
56
import { ToolResponse } from '@/tools/types'
67
import { BlockConfig, ParamType } from '../types'
7-
import { useOllamaStore } from '@/stores/ollama/store'
88

99
const logger = createLogger('EvaluatorBlock')
1010

sim/blocks/blocks/image-generator.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export const ImageGeneratorBlock: BlockConfig<DalleResponse> = {
1717
title: 'Provider',
1818
type: 'dropdown',
1919
layout: 'full',
20-
options: [
21-
{ label: 'DALL-E', id: 'dalle' },
22-
],
20+
options: [{ label: 'DALL-E', id: 'dalle' }],
2321
value: () => 'dalle',
2422
},
2523
{
@@ -121,8 +119,8 @@ export const ImageGeneratorBlock: BlockConfig<DalleResponse> = {
121119
type: {
122120
content: 'string', // URL of the generated image
123121
image: 'string', // Base64 image data
124-
metadata: 'json' // Contains only model information
125-
}
122+
metadata: 'json', // Contains only model information
123+
},
126124
},
127125
},
128-
}
126+
}

sim/blocks/blocks/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { ConnectIcon } from '@/components/icons'
2+
import { useOllamaStore } from '@/stores/ollama/store'
23
import { ProviderId } from '@/providers/types'
3-
import { getBaseModelProviders, getAllModelProviders } from '@/providers/utils'
4+
import { getAllModelProviders, getBaseModelProviders } from '@/providers/utils'
45
import { ToolResponse } from '@/tools/types'
56
import { BlockConfig } from '../types'
6-
import { useOllamaStore } from '@/stores/ollama/store'
77

88
interface RouterResponse extends ToolResponse {
99
output: {

sim/components/icons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,4 +1755,4 @@ export function ImageIcon(props: SVGProps<SVGSVGElement>) {
17551755
<path d="M3 21L10 14L14 18L21 11L25 15V21" />
17561756
</svg>
17571757
)
1758-
}
1758+
}

sim/components/ui/command.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ import { cn } from '@/lib/utils'
4848
// This file is not typed correctly from shadcn, so we're disabling the type checker
4949
// @ts-nocheck
5050

51+
// This file is not typed correctly from shadcn, so we're disabling the type checker
52+
// @ts-nocheck
53+
54+
// This file is not typed correctly from shadcn, so we're disabling the type checker
55+
// @ts-nocheck
56+
5157
const Command = React.forwardRef<
5258
React.ElementRef<typeof CommandPrimitive>,
5359
React.ComponentPropsWithoutRef<typeof CommandPrimitive> & {

0 commit comments

Comments
 (0)