Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
chore: follow-up fixes for storybook vite migration (#31545)
yyhf561656a899f
diff --git a/web/app/components/base/icons/icon-gallery.stories.tsx b/web/app/components/base/icons/icon-gallery.stories.tsxindex 15206f2735a..8d49f70ce20 100644--- a/web/app/components/base/icons/icon-gallery.stories.tsx+++ b/web/app/components/base/icons/icon-gallery.stories.tsx@@ -1,9 +1,9 @@+/// <reference types="vite/client" />import type { Meta, StoryObj } from '@storybook/nextjs-vite'import * as React from 'react'-declare const require: any-type IconComponent = React.ComponentType<Record<string, unknown>>+type IconModule = { default: IconComponent }type IconEntry = {name: string@@ -12,18 +12,16 @@ type IconEntry = {Component: IconComponent}-const iconContext = require.context('./src', true, /\.tsx$/)+const iconModules: Record<string, IconModule> = import.meta.glob('./src/**/*.tsx', { eager: true })-const iconEntries: IconEntry[] = iconContext- .keys()- .filter((key: string) => !key.endsWith('.stories.tsx') && !key.endsWith('.spec.tsx'))- .map((key: string) => {- const mod = iconContext(key)- const Component = mod.default as IconComponent | undefined+const iconEntries: IconEntry[] = Object.entries(iconModules)+ .filter(([key]) => !key.endsWith('.stories.tsx') && !key.endsWith('.spec.tsx'))+ .map(([key, mod]) => {+ const Component = mod.defaultif (!Component)return null- const relativePath = key.replace(/^\.\//, '')+ const relativePath = key.replace(/^\.\/src\//, '')const path = `app/components/base/icons/src/${relativePath}`const parts = relativePath.split('/')const fileName = parts.pop() || ''diff --git a/web/eslint-suppressions.json b/web/eslint-suppressions.jsonindex 9f4d2da5d4b..2c06b37115f 100644--- a/web/eslint-suppressions.json+++ b/web/eslint-suppressions.json@@ -1085,11 +1085,6 @@"count": 2}},- "app/components/base/icons/icon-gallery.stories.tsx": {- "ts/no-explicit-any": {- "count": 1- }- },"app/components/base/icons/utils.ts": {"ts/no-explicit-any": {"count": 3diff --git a/web/package.json b/web/package.jsonindex 85fce3a08a5..5d8003d6d60 100644--- a/web/package.json+++ b/web/package.json@@ -48,7 +48,7 @@"analyze-component": "node ./scripts/analyze-component.js","refactor-component": "node ./scripts/refactor-component.js","storybook": "storybook dev -p 6006",- "build-storybook": "storybook build",+ "storybook:build": "storybook build","preinstall": "npx only-allow pnpm","analyze": "ANALYZE=true pnpm build","knip": "knip"diff --git a/web/vite.config.ts b/web/vite.config.tsnew file mode 100644index 00000000000..23fe36bce4f--- /dev/null+++ b/web/vite.config.ts@@ -0,0 +1,16 @@+import path from 'node:path'+import { fileURLToPath } from 'node:url'+import react from '@vitejs/plugin-react'+import { defineConfig } from 'vite'+import tsconfigPaths from 'vite-tsconfig-paths'++const __dirname = path.dirname(fileURLToPath(import.meta.url))++export default defineConfig({+ plugins: [tsconfigPaths(), react()],+ resolve: {+ alias: {+ '~@': __dirname,+ },+ },+})diff --git a/web/vitest.config.ts b/web/vitest.config.tsindex f6e8424e441..c58a92f217a 100644--- a/web/vitest.config.ts+++ b/web/vitest.config.ts@@ -1,9 +1,7 @@-import react from '@vitejs/plugin-react'-import tsconfigPaths from 'vite-tsconfig-paths'-import { defineConfig } from 'vitest/config'+import { defineConfig, mergeConfig } from 'vitest/config'+import viteConfig from './vite.config'-export default defineConfig({- plugins: [tsconfigPaths(), react()],+export default mergeConfig(viteConfig, defineConfig({test: {environment: 'jsdom',globals: true,@@ -13,4 +11,4 @@ export default defineConfig({reporter: ['text', 'json', 'json-summary'],},},-})+}))