mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
lint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { ReactElement } from 'react'
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { Wand2, AlertTriangle } from 'lucide-react'
|
||||
import { Wand2 } from 'lucide-react'
|
||||
import { highlight, languages } from 'prismjs'
|
||||
import 'prismjs/components/prism-javascript'
|
||||
import 'prismjs/themes/prism.css'
|
||||
@@ -365,7 +365,7 @@ export function Code({
|
||||
className={cn(
|
||||
'group relative min-h-[100px] rounded-md border bg-background font-mono text-sm transition-colors',
|
||||
isConnecting && 'ring-2 ring-blue-500 ring-offset-2',
|
||||
!isValidJson && 'border-destructive border-2 bg-destructive/10'
|
||||
!isValidJson && 'border-2 border-destructive bg-destructive/10'
|
||||
)}
|
||||
title={!isValidJson ? 'Invalid JSON' : undefined}
|
||||
onDragOver={(e) => e.preventDefault()}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState } from 'react'
|
||||
import { Info, AlertTriangle } from 'lucide-react'
|
||||
import { AlertTriangle, Info } from 'lucide-react'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { getBlock } from '@/blocks/index'
|
||||
|
||||
@@ -718,13 +718,14 @@ export class AgentBlockHandler implements BlockHandler {
|
||||
// All parsing attempts failed
|
||||
logger.error('Failed to parse response content as JSON:', {
|
||||
content: content.substring(0, 200) + (content.length > 200 ? '...' : ''),
|
||||
responseFormat: responseFormat
|
||||
responseFormat: responseFormat,
|
||||
})
|
||||
|
||||
// Return standard response but include a warning
|
||||
const standardResponse = this.processStandardResponse(result)
|
||||
return Object.assign(standardResponse, {
|
||||
_responseFormatWarning: 'Response format was specified but content could not be parsed as JSON. Falling back to standard format.',
|
||||
_responseFormatWarning:
|
||||
'Response format was specified but content could not be parsed as JSON. Falling back to standard format.',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user