Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ jobs:
uses: dtinth/setup-github-actions-caching-for-turbo@v1
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- name: TypeScript type-check
run: pnpm --filter web tsc --noEmit
4 changes: 2 additions & 2 deletions apps/web/app/(Main UI)/(Chat UI)/chat/[chatId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function getMessages(chat: Partial<ChatType>, user: User) {
}

// The chatflowId is required in the URL path - get it from the chat object
const chatflowId = chat?.chatflowId || chat?.sidekickId
const chatflowId = (chat as any)?.chatflowId || (chat as any)?.sidekickId
if (!chatflowId) {
console.error('[getMessages] No chatflowId found in chat object:', chat)
return []
Expand Down Expand Up @@ -182,7 +182,7 @@ const ChatDetailPage = async ({ params }: { params: { chatId: string } }) => {
} catch (error) {
console.error('Error loading chat:', error)
// Even if there's an error, still pass the sidekicks if we have them
return <Chat {...params} />
return <Chat />
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const JourneyDetailPage = async ({ params }: any) => {
}
})
const [journey, sidekicks] = await Promise.all([journeyPromise, sidekicksPromise])
// @ts-expect-error Async Server Component
return <Chat {...params} journey={journey} sidekicks={sidekicks} />
}

Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(Main UI)/(Chat UI)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default async function ChatUILayout({ children }: { children: React.React
// AppLayout already wraps with AppProvider, no need to double-wrap
return (
<AppLayout apiHost={apiHost} accessToken={session?.accessToken}>
<ChatLayout>{children}</ChatLayout>
{(<ChatLayout>{children as any}</ChatLayout>) as any}
</AppLayout>
)
}
2 changes: 1 addition & 1 deletion apps/web/app/(Main UI)/(Studio Layout)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const StudioLayout = async ({ children }: { children: React.ReactElement }) => {
return (
<AAIAuthProvider user={session.user}>
<AppLayout apiHost={apiHost} accessToken={session.accessToken}>
{children}
{children as any}
</AppLayout>
</AAIAuthProvider>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import MainLayout from 'flowise-ui/src/layout/MainLayout'

const StudioLayout = ({ children }) => {
return <MainLayout>{children}</MainLayout>
const StudioLayout = ({ children }: { children: React.ReactNode }) => {
return <MainLayout>{children as any}</MainLayout>
}

export default StudioLayout
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'

import dynamic from 'next/dynamic'
const View = dynamic(() => import('@/views/canvas/index'), { ssr: false })
const View = dynamic(() => import('@/views/canvas/index') as any, { ssr: false })

const Page = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import dynamic from 'next/dynamic'
import getCachedSession from '@ui/getCachedSession'

const View = dynamic(() => import('@/views/canvas/index'), { ssr: false })
const View = dynamic(() => import('@/views/canvas/index') as any, { ssr: false })

const Page = async () => {
const session = await getCachedSession()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import MinimalLayout from 'flowise-ui/src/layout/MinimalLayout'

const StudioLayout = ({ children }) => {
return <MinimalLayout>{children}</MinimalLayout>
const StudioLayout = ({ children }: { children: React.ReactNode }) => {
return <MinimalLayout>{children as any}</MinimalLayout>
}

export default StudioLayout
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react'
import dynamic from 'next/dynamic'

const View = dynamic(() => import('@/views/marketplaces/MarketplaceCanvas'), { ssr: false })
const View = dynamic(() => import('@/views/marketplaces/MarketplaceCanvas') as any, { ssr: false }) as React.ComponentType<any>

interface PageProps {
params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from 'react'
import dynamic from 'next/dynamic'

const View = dynamic(() => import('@/views/agentflowsv2/Canvas'), { ssr: false })
const View = dynamic(() => import('@/views/agentflowsv2/Canvas') as any, { ssr: false })

const Page = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import dynamic from 'next/dynamic'

const View = dynamic(() => import('@/views/agentflowsv2/MarketplaceCanvas'), { ssr: false })
const View = dynamic(() => import('@/views/agentflowsv2/MarketplaceCanvas') as any, { ssr: false }) as React.ComponentType<any>

interface PageProps {
params: {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(Main UI)/pricing/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PurchaseSubscription from '@ui/billing/PurchaseSubscription'

const PricingOverview = dynamic(() => import('@ui/billing/PricingOverview'), { ssr: true })
// const PurchaseCredits = dynamic(() => import('@ui/billing/PurchaseCredits'), { ssr: true })
const UsageStats = dynamic(() => import('@ui/billing/UsageStats'), { ssr: true })
const UsageStats = dynamic(() => import('@ui/billing/UsageStats') as any, { ssr: true })
const CostCalculator = dynamic(() => import('@ui/billing/CostCalculator'), { ssr: true })

const Page = () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/auth/[auth0]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const GET = Auth0.handleAuth({
} catch (error: any) {
console.error('[auth/me] Error:', error.message)
// Fallback to default profile handler
return Auth0.handleProfile()(req)
return (Auth0.handleProfile() as any)(req)
}
},
onError(req: Request, error: Error) {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/api/chats/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { Chat } from 'types'
const DEFAULT_PAGE_SIZE = 20
const MAX_PAGE_SIZE = 100

export async function GET(req: Request): Promise<NextResponse<Chat[]>> {
export async function GET(req: Request): Promise<NextResponse> {
const session = await getCachedSession()
if (!session?.user?.email) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
Expand All @@ -19,7 +19,7 @@ export async function GET(req: Request): Promise<NextResponse<Chat[]>> {
const limit = Math.min(Math.max(1, requestedLimit), MAX_PAGE_SIZE)
const cursor = searchParams.get('cursor') || undefined

const mergedChats = await getChats(session.user, { limit, cursor })
const mergedChats = await getChats(session.user as any, { limit, cursor })
return NextResponse.json(mergedChats)
}

Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/workspaces/switch/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function POST(request: NextRequest) {
}

// Verify user has access to this workspace
const assignedWorkspaces = session.user.assignedWorkspaces || []
const assignedWorkspaces = (session.user as any).assignedWorkspaces || []
const hasAccess = assignedWorkspaces.some((ws: { id: string }) => ws.id === workspaceId)

if (!hasAccess) {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/org/[encodedDomain]/(minimal-layout)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import MinimalLayout from 'flowise-ui/src/layout/MinimalLayout'

const StudioLayout = ({ children }) => {
return <MinimalLayout>{children}</MinimalLayout>
const StudioLayout = ({ children }: { children: React.ReactNode }) => {
return <MinimalLayout>{children as any}</MinimalLayout>
}

export default StudioLayout
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from 'react'
import dynamic from 'next/dynamic'
import { useRouter } from 'next/navigation'
const View = dynamic(() => import('@/views/marketplaces/MarketplaceCanvas'), { ssr: false })
const View = dynamic(() => import('@/views/marketplaces/MarketplaceCanvas') as any, { ssr: false }) as React.ComponentType<any>

interface PageProps {
params: {
Expand All @@ -25,7 +25,7 @@ const Page: React.FC<PageProps> = ({ params }) => {
templateId={chatflowid}
isDialog={false}
onClose={handleClose}
onUse={(template) => {
onUse={(template: any) => {
// Handle use case if needed
// console.log('Template used:', template)
}}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/org/[encodedDomain]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const StudioLayout = async ({ children, params }: { children: React.ReactElement
appSettings={session?.user?.appSettings!}
// providers={providers}
session={JSON.parse(JSON.stringify(session))}
params={params}
params={{ slug: params.encodedDomain }}
>
<FlowiseAppLayout apiHost={apiHost} accessToken={session?.accessToken}>
<MinimalLayout>{children}</MinimalLayout>
{(<MinimalLayout>{children as any}</MinimalLayout>) as any}
</FlowiseAppLayout>
</AppLayout>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let nextConfig = withBundleAnalyzer({
serverComponentsExternalPackages: ['canvas', '@aws-sdk/client-s3', '@aws-sdk/signature-v4-crt', '@aws-sdk/s3-request-presigner']
},
typescript: {
ignoreBuildErrors: true
ignoreBuildErrors: false
},

reactStrictMode: true,
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"typecheck": "tsc --noEmit",
"test:e2e:setup": "npx playwright install --with-deps",
"test:e2e:check": "node scripts/check-playwright.js",
"test:e2e": "pnpm test:e2e:check && npx playwright test",
Expand Down
20 changes: 20 additions & 0 deletions apps/web/react-markdown.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
declare module 'react-markdown' {
import { ReactNode, ComponentType } from 'react'

interface ReactMarkdownProps {
children: string
remarkPlugins?: any[]
rehypePlugins?: any[]
components?: Record<string, ComponentType<any>>
className?: string
[key: string]: any
}

const ReactMarkdown: ComponentType<ReactMarkdownProps>
export default ReactMarkdown
}

declare module 'react-markdown/lib/complex-types' {
const _default: any
export = _default
}
32 changes: 16 additions & 16 deletions packages-answers/ui/src/Admin/Chatflows/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@
// Category filter
if (selectedCategories.length > 0) {
const categories = (chatflow.category || 'Uncategorized').split(';').map((cat: string) => cat.trim())
const hasMatchingCategory = selectedCategories.some((selectedCat) =>
categories.some((cat) => cat.toLowerCase().includes(selectedCat.toLowerCase()))
const hasMatchingCategory = selectedCategories.some((selectedCat: any) =>
categories.some((cat: any) => cat.toLowerCase().includes(selectedCat.toLowerCase()))
)
if (!hasMatchingCategory) return false
}
Expand Down Expand Up @@ -240,9 +240,9 @@
if (!chatflowsData) return []

const categories = new Set<string>()
chatflowsData.forEach((chatflow) => {
chatflowsData.forEach((chatflow: any) => {
const chatflowCategories = (chatflow.category || 'Uncategorized').split(';').map((cat: string) => cat.trim())
chatflowCategories.forEach((cat) => categories.add(cat))
chatflowCategories.forEach((cat: any) => categories.add(cat))
})

return Array.from(categories).sort((a, b) => a.localeCompare(b))
Expand All @@ -252,7 +252,7 @@
if (!chatflowsData) return []

const ownersMap = new Map<string, string>()
chatflowsData.forEach((chatflow) => {
chatflowsData.forEach((chatflow: any) => {
if (chatflow.isOwner) {
ownersMap.set('me', 'Me')
} else if (chatflow.user?.name) {
Expand Down Expand Up @@ -334,7 +334,7 @@

useEffect(() => {
refreshChatflows()
}, [flowType, agentflowVersion])

Check warning on line 337 in packages-answers/ui/src/Admin/Chatflows/index.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useEffect has a missing dependency: 'refreshChatflows'. Either include it or remove the dependency array

if (error) {
return (
Expand Down Expand Up @@ -979,7 +979,7 @@
</Box>

{/* Bulk Update Actions */}
{chatflowsData && chatflowsData.some((chatflow) => chatflow.templateStatus === 'outdated') && (
{chatflowsData && chatflowsData.some((chatflow: any) => chatflow.templateStatus === 'outdated') && (
<Box
sx={{
mb: 2,
Expand All @@ -995,7 +995,7 @@
Template Updates Available
</Typography>
<Typography variant='body2' sx={{ color: theme.palette.text.secondary, fontSize: '0.875rem' }}>
{chatflowsData.filter((chatflow) => chatflow.templateStatus === 'outdated').length} chatflows are
{chatflowsData.filter((chatflow: any) => chatflow.templateStatus === 'outdated').length} chatflows are
outdated and can be updated to the latest template
</Typography>
</Box>
Expand All @@ -1005,8 +1005,8 @@
size='small'
onClick={() => {
const outdatedIds = chatflowsData
.filter((chatflow) => chatflow.templateStatus === 'outdated')
.map((chatflow) => chatflow.id)
.filter((chatflow: any) => chatflow.templateStatus === 'outdated')
.map((chatflow: any) => chatflow.id)
setSelectedForUpdate(selectedForUpdate.length === outdatedIds.length ? [] : outdatedIds)
}}
sx={{
Expand All @@ -1019,7 +1019,7 @@
}}
>
{selectedForUpdate.length ===
chatflowsData.filter((chatflow) => chatflow.templateStatus === 'outdated').length
chatflowsData.filter((chatflow: any) => chatflow.templateStatus === 'outdated').length
? 'Deselect All'
: 'Select All Outdated'}
</Button>
Expand All @@ -1032,7 +1032,7 @@
const response = await chatflowsApi.bulkUpdateChatflows(selectedForUpdate)

// Show success message and refresh data
if (response.updated > 0) {
if ((response as any).updated > 0) {
// Refresh the chatflows data
window.location.reload() // Simple refresh for now
}
Expand Down Expand Up @@ -1097,20 +1097,20 @@
checked={
chatflowsData &&
selectedForUpdate.length ===
chatflowsData.filter((chatflow) => chatflow.templateStatus === 'outdated').length &&
chatflowsData.filter((chatflow) => chatflow.templateStatus === 'outdated').length > 0
chatflowsData.filter((chatflow: any) => chatflow.templateStatus === 'outdated').length &&
chatflowsData.filter((chatflow: any) => chatflow.templateStatus === 'outdated').length > 0
}
indeterminate={
selectedForUpdate.length > 0 &&
chatflowsData &&
selectedForUpdate.length <
chatflowsData.filter((chatflow) => chatflow.templateStatus === 'outdated').length
chatflowsData.filter((chatflow: any) => chatflow.templateStatus === 'outdated').length
}
onChange={(e) => {
if (!chatflowsData) return
const outdatedIds = chatflowsData
.filter((chatflow) => chatflow.templateStatus === 'outdated')
.map((chatflow) => chatflow.id)
.filter((chatflow: any) => chatflow.templateStatus === 'outdated')
.map((chatflow: any) => chatflow.id)
setSelectedForUpdate(e.target.checked ? outdatedIds : [])
}}
sx={{
Expand Down
2 changes: 1 addition & 1 deletion packages-answers/ui/src/Admin/Chatflows/metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
const [endDate, setEndDate] = useState(new Date())
const [_leadEmail, setLeadEmail] = useState('')
const [selectedChat, setSelectedChat] = useState<ChatLog | null>(null)
const [_isFilterExpanded, setIsFilterExpanded] = useState(true) // Default expanded for metrics
const [isFilterExpanded, setIsFilterExpanded] = useState(true) // Default expanded for metrics

Check warning on line 43 in packages-answers/ui/src/Admin/Chatflows/metrics.tsx

View workflow job for this annotation

GitHub Actions / build

'setIsFilterExpanded' is assigned a value but never used. Allowed unused vars must match /^_/u

// API hooks
const {
Expand Down
Loading
Loading