lobehub/package.json

550 lines
21 KiB
JSON
Raw Normal View History

{
2025-10-30 13:19:01 +00:00
"name": "@lobehub/lobehub",
"version": "2.1.46",
2025-10-30 13:19:01 +00:00
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
"keywords": [
2023-12-13 09:42:26 +00:00
"framework",
"chatbot",
2023-12-13 09:42:26 +00:00
"chatgpt",
"nextjs",
"vercel-ai",
"openai",
"azure-openai",
"visual-model",
"tts",
"stt"
],
"homepage": "https://github.com/lobehub/lobehub",
"bugs": {
"url": "https://github.com/lobehub/lobehub/issues/new/choose"
},
"repository": {
"type": "git",
"url": "https://github.com/lobehub/lobehub.git"
},
"license": "MIT",
"author": "LobeHub <i@lobehub.com>",
🐛 fix: add unsaved changes guard to prevent data loss on navigation (#12332) * 🐛 fix: add unsaved changes guard to prevent data loss on navigation Migrate from BrowserRouter to createBrowserRouter (data router API) to enable route-level navigation blocking. Add UnsavedChangesGuard component that uses useBlocker to prevent leaving editor pages with unsaved changes, auto-saving before navigation. Remove legacy renderRoutes/RouteConfig dead code. Fixes LOBE-4973 * 🔧 chore: remove unused ESLint suppressions for welcome.ts Cleaned up eslint-suppressions.json by removing suppressions related to sort-keys-fix and typescript-sort-keys for welcome.ts, as they are no longer needed. Signed-off-by: Innei <tukon479@gmail.com> * ⚡ perf: skip JSON snapshot on selection-only Lexical updates Reintroduce dirtyElements/dirtyLeaves guard before editor.getDocument('json') and deep-equality check, avoiding O(document-size) work on caret/selection updates that do not mutate content. * 🔧 test: update UnsavedChangesGuard tests to use message.destroy instead of message.success Signed-off-by: Innei <tukon479@gmail.com> * fix: dayjs init - Moved dayjs plugin extensions (relativeTime, utc, isToday, isYesterday) to src/initialize.ts for centralized initialization. - Removed redundant extensions from individual components to prevent duplicate calls. - Updated locale loading logic in Locale.tsx to ensure correct dayjs locale handling. This change improves performance by ensuring dayjs plugins are only extended once during application initialization. Signed-off-by: Innei <tukon479@gmail.com> * refactor: update router configuration to use RouteObject type - Changed the type of desktopRoutes from RouteConfig[] to RouteObject[] for better compatibility with react-router-dom. - Removed the RouteConfig interface from the router utility file to streamline the codebase. This refactor enhances the router's integration with the latest routing library standards. Signed-off-by: Innei <tukon479@gmail.com> * feat: enhance Vite configuration and chunk management - Added a function to suppress Vite's default URL print in the server configuration. - Updated chunk file naming strategy in sharedRollupOutput to organize output files into specific directories based on chunk type (i18n, vendor, assets). - Removed redundant dayjs chunk handling logic to streamline the manualChunks function. These changes improve the clarity of the build output and enhance the server's configuration options. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add collapsible error stack with __CI__ default expand - Add Collapse + Highlighter for error stack in Error component - Define __CI__ in Vite (sharedRendererDefine) based on process.env.CI - Add __CI__ to global.d.ts - Add error.stack i18n to all 18 locales Made-with: Cursor * chore: update build:spa:copy script to handle multiple asset directories - Modified the build:spa:copy script in package.json to iterate over multiple directories (assets, i18n, vendor) for both desktop and mobile builds, improving the asset copying process. This change enhances the build process by ensuring all relevant directories are copied correctly. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: mark initialize.ts as sideEffects to prevent tree-shaking sideEffects: false caused Rollup to drop the side-effect-only import of initialize.ts, removing dayjs.extend(relativeTime) and enableMapSet() from the production bundle. --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-03-03 10:50:57 +00:00
"sideEffects": [
"./src/initialize.ts"
],
"workspaces": [
"packages/*",
"packages/business/*",
"e2e",
"apps/desktop/src/main"
],
"scripts": {
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"build": "bun run build:spa && bun run build:spa:copy && bun run build:next",
"build:analyze": "cross-env NODE_OPTIONS=--max-old-space-size=81920 next experimental-analyze",
"build:docker": "pnpm run build:spa && pnpm run build:spa:mobile && pnpm run build:spa:copy && cross-env NODE_OPTIONS=--max-old-space-size=8192 DOCKER=true next build && pnpm run build-sitemap",
"build:next": "cross-env NODE_OPTIONS=--max-old-space-size=7168 bun run build:next:raw",
"build:next:raw": "next build",
"build:raw": "bun run build:spa:raw && bun run build:spa:copy && bun run build:next:raw",
"build:spa": "cross-env NODE_OPTIONS=--max-old-space-size=7168 pnpm run build:spa:raw",
"build:spa:copy": "tsx scripts/copySpaBuild.mts && tsx scripts/generateSpaTemplates.mts",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"build:spa:mobile": "cross-env NODE_OPTIONS=--max-old-space-size=8192 MOBILE=true vite build",
"build:spa:raw": "rm -rf public/_spa && vite build",
"build:vercel": "cross-env-shell NODE_OPTIONS=--max-old-space-size=6144 \"bun run build:raw && bun run db:migrate\"",
📝 docs: improve development guides to reflect current architecture (#12174) * 🔧 chore(vscode): add typescript.tsdk and disable mdx server Fix MDX extension crash caused by Cursor's bundled TypeScript version * 🔧 chore(claude): add skills symlink to .claude directory * 📝 docs: update development guides with current tech stack and architecture - Update tech stack: Next.js 16 + React 19, hybrid routing (App Router + React Router DOM), tRPC, Drizzle ORM + PostgreSQL, react-i18next - Update directory structure to reflect monorepo layout (apps/, packages/, e2e/, locales/) - Expand src/server/ with detailed subdirectory descriptions - Add complete SPA routing architecture with desktop and mobile route tables - Add tRPC router grouping details (lambda, async, tools, mobile) - Add data flow diagram - Simplify dev setup section to link to setup-development guide - Fix i18n default language description (English, not Chinese) - Sync all changes between zh-CN and English versions * 📝 docs: expand data flow diagram in folder structure guide Replace the single-line data flow with a detailed layer-by-layer flow diagram showing each layer's location and responsibility. * 📝 docs: modernize feature development guide - Remove outdated clientDB/pglite/indexDB references - Update schema path to packages/database/src/schemas/ - Update types path to packages/types/src/ - Replace inline migration steps with link to db-migrations guide - Add complete layered architecture table (Client Service, WebAPI, tRPC Router, Server Service, Server Module, Repository, DB Model) - Clarify Client Service as frontend code - Add i18n handling section with workflow and key naming convention - Remove verbose CSS style code, keep core business logic only - Expand testing section with commands, skill refs, and CI tip * 🔥 docs: remove outdated frontend feature development guide Content is superseded by the comprehensive feature-development guide which covers the full chain from schema to testing. * 📝 docs: add LobeHub ecosystem and community resources Add official ecosystem packages (LobeUI, LobeIcons, LobeCharts, LobeEditor, LobeTTS, LobeLint, Lobe i18n, MCP Mark) and community platforms (Agent Market, MCP Market, YouTube, X, Discord). * 📝 docs: improve contributing guidelines and resources - Clarify semantic release triggers (feat/fix vs style/chore) - Add testing section with Vitest/E2E/CI requirements - Update contribution steps to include CI check - Add LobeHub ecosystem packages and community platforms to resources * 📝 docs: rewrite architecture guide to reflect current platform design * 📝 docs: add code quality tools to architecture guide * 📝 docs: rewrite chat-api guide to reflect current architecture - Update sequence diagram with Agent Runtime loop as core execution engine - Replace PluginGateway with ToolExecution layer (Builtin/MCP/Plugin) - Update all path references (model-runtime, agent-runtime, fetch-sse packages) - Split old AgentRuntime section into Model Runtime + Agent Runtime - Add tool calling taxonomy: Builtin, MCP, and Plugin (deprecated) - Add client-side vs server-side execution section - Remove outdated adapter pseudo-code examples * 📝 docs: update file paths in add-new-image-model guide - src/libs/standard-parameters/ → packages/model-bank/src/standard-parameters/ - src/config/aiModels/ → packages/model-bank/src/aiModels/ - src/libs/model-runtime/ → packages/model-runtime/src/providers/ * 📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides The S3_PUBLIC_DOMAIN env var was incorrectly removed from all documentation in commit 4a87b31. This variable is still required by the code (src/server/services/file/impls/s3.ts) to generate public URLs for uploaded files. Without it, image URLs sent to vision models are just S3 keys instead of full URLs. Closes #12161 * 📦 chore: pin @lobehub/ui to 4.33.4 to fix SortableList type errors @lobehub/ui 4.34.0 introduced breaking type changes in SortableList where SortableListItem became strict, causing type incompatibility in onChange and renderItem callbacks across 6 files. Pin to 4.33.4 via pnpm overrides to enforce consistent version across monorepo. * 🐛 fix: correct ReadableStream type annotations and add dom.asynciterable - Add dom.asynciterable to tsconfig lib for ReadableStream async iteration - Fix createCallbacksTransformer return type: TransformStream<string, Uint8Array> - Update stream function return types from ReadableStream<string> to ReadableStream<Uint8Array> (llama.ts, ollama.ts, claude.ts) - Remove @ts-ignore from for-await loops in test files - Add explicit string[] type for chunks arrays * Revert "📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides" This reverts commit 24073f83d3d5e9a89c29e9a96a6689d2baa0edde.
2026-02-07 14:29:14 +00:00
"build-migrate-db": "bun run db:migrate",
"build-sitemap": "tsx ./scripts/buildSitemapIndex/index.ts",
"clean:node_modules": "bash -lc 'set -e; echo \"Removing all node_modules...\"; rm -rf node_modules; pnpm -r exec rm -rf node_modules; rm -rf apps/desktop/node_modules; echo \"All node_modules removed.\"'",
"db:generate": "drizzle-kit generate && npm run workflow:dbml",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"db:migrate": "cross-env MIGRATION_DB=1 tsx ./scripts/migrateServerDB/index.ts",
"db:studio": "drizzle-kit studio",
"db:visualize": "dbdocs build docs/development/database-schema.dbml --project lobe-chat",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"desktop:build:all": "npm run desktop:build:main",
"desktop:build:main": "npm run build:main --prefix=./apps/desktop",
🐛 fix(desktop): add auth required modal and improve error handling (#11574) * 🐛 fix(desktop): add auth required modal and improve error handling - Add AuthRequiredModal component to handle authentication expiration - Improve backend proxy protocol error handling for auth errors - Add updater manager authentication header support - Add i18n strings for auth error messages * 🔧 fix(desktop): update UpdaterManager to leave channel unset for GitHub prerelease matching - Modify UpdaterManager to leave the channel unset, allowing GitHub to use version tags for prerelease matching. - Update logging to reflect the new behavior when the channel is unset or kept as is. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix(desktop): clarify UpdaterManager behavior for GitHub provider - Update comments and logging in UpdaterManager to clarify that the channel is left unset for beta/nightly, allowing GitHub to use version tags for prerelease matching. - Ensure logging accurately reflects the new behavior when the channel is unset. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(desktop): add desktop build channel script and update documentation - Introduced a new script for building desktop applications for specific release channels (stable, beta, nightly). - Updated package.json to include a new npm command for the build channel. - Enhanced README documentation to guide users on simulating CI channel builds and retaining changes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix(desktop): streamline NODE_ENV usage in logger and config - Removed redundant process.env.NODE_ENV definition from electron.vite.config.ts. - Simplified logger implementation by directly using process.env.NODE_ENV for environment checks. - Improved readability and maintainability of logging behavior based on the environment. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix(desktop): enhance logging configuration to support debug mode - Updated logger configuration to allow for debug level logging when DEBUG environment variable is set. - Simplified the logic for console logging levels based on the environment, improving clarity and maintainability. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix(desktop): enhance version generation and logging in UpdaterManager - Updated version generation logic in manual-build-desktop.yml to handle channel suffixes more effectively. - Added inferredChannel logging in UpdaterManager to improve clarity on the current update channel being used. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix(desktop): update localization files and set default entry locale to English - Changed default entry locale from Chinese (zh-CN) to English (en) in .i18nrc.js. - Added full disk access messages in multiple languages (Arabic, Bulgarian, German, Spanish, French, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Turkish, Vietnamese, Traditional Chinese). - Enhanced menu localization with new settings and permissions options across various languages. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-18 10:55:18 +00:00
"desktop:build-channel": "tsx scripts/electronWorkflow/buildDesktopChannel.ts",
"desktop:main:build": "npm run desktop:main:build --prefix=./apps/desktop",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"desktop:package:app": "npm run desktop:build:all && npm run desktop:package:app:platform",
"desktop:package:app:platform": "tsx scripts/electronWorkflow/buildElectron.ts",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"desktop:package:local": "npm run desktop:build:all && npm run package:local --prefix=./apps/desktop",
"desktop:package:local:reuse": "npm run package:local:reuse --prefix=./apps/desktop",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"dev": "tsx scripts/devStartupSequence.mts",
2025-12-20 12:23:40 +00:00
"dev:bun": "bun --bun next dev -p 3010",
"dev:desktop": "cd apps/desktop && pnpm run dev",
♻️ refactor(docker-compose): restructure dev environment (#12132) * 🔥 chore(docker-compose): remove Casdoor SSO dependency Casdoor is no longer needed since BetterAuth now supports email/password registration natively. LOBE-3907 * ♻️ refactor(docker-compose): restructure directories - Rename local/ to dev/ for development dependencies - Remove logto/ and zitadel/ from production/ - Restore Casdoor config in production/grafana/ - Simplify dev/ to core services only (postgresql, redis, rustfs, searxng) - Update docker-compose.development.yml to use dev/ - Remove minio-bucket.config.json (switched to rustfs) * ♻️ refactor(docker-compose): simplify dev environment setup - Remove docker-compose.development.yml, use dev/docker-compose.yml directly - Add npm scripts: dev:docker, dev:docker:down, dev:docker:reset - Simplify .env.example.development (remove variable refs, redundant vars) - Update docker-compose/dev/.env.example (consistent passwords) - Add docker-compose/dev/data/ to .gitignore - Update setup docs: use npm scripts, remove image generation section * 🔧 chore: add SSRF_ALLOW_PRIVATE_IP_ADDRESS to dev env example * 🔒 security: auto-generate KEY_VAULTS_SECRET and AUTH_SECRET in setup.sh - Remove hardcoded secrets from docker-compose.yml - Add placeholders to .env.example files - Generate secrets dynamically in setup.sh using openssl rand -base64 32 * 🔧 chore(docker-compose): expose SearXNG port and improve dev scripts - Add SearXNG port mapping (8180:8080) for host access - Use --wait flag in dev:docker to ensure services are healthy - Include db:migrate in dev:docker:reset for one-command reset - Update MinIO reference to RustFS in zh-CN docs - Add SearXNG to service URLs and port conflict docs
2026-02-06 04:21:30 +00:00
"dev:docker": "docker compose -f docker-compose/dev/docker-compose.yml up -d --wait postgresql redis rustfs searxng",
"dev:docker:down": "docker compose -f docker-compose/dev/docker-compose.yml down",
"dev:docker:reset": "docker compose -f docker-compose/dev/docker-compose.yml down -v && rm -rf docker-compose/dev/data && npm run dev:docker && pnpm db:migrate",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"dev:next": "next dev -p 3010",
"dev:spa": "vite --port 9876",
"dev:spa:mobile": "cross-env MOBILE=true vite --port 3012",
feat: Update user guide & changelog (#11518) * feat: Redesign doc * chore: uopdate site * chore: uopdate site * chore: uopdate site * chore: uopdate site * chore: uopdate site * feat: Uopdate content * chore: New doc * chore: Update content * chore: Update content * chore: add images * chore: add images * chore: add images * chore: add images * feat: Add more images * feat: Add more images * fix: Cannot reach end * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * Revise README content and structure Updated README to reflect changes in project description and removed outdated notes. * Revise 'Getting Started' and TOC in README Updated the 'Getting Started' section and modified the table of contents. * chore: Update content * Revise README structure and content Updated the Getting Started section and removed the Table of Contents. Adjusted the Local Development instructions. * Remove custom themes section from README Removed section about custom themes from README. * Update README.md * Refine introduction and highlight cloud version Updated wording for clarity and added recommendation for cloud version. * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * fix: add missing translation * 🔀 chore: Move README changes to feat/readme branch Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: add missing translation * chore: update cdn * docs: add migration guide from v1.x local database to v2.x and update help sections Signed-off-by: Innei <tukon479@gmail.com> * fix: add missing translation * fix: add missing images * fix: add missing changelogs * fix: add missing changelogs * fix: add missing changelogs * fix: add missing changelogs * fix: add missing changelogs * style: update cdn --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: canisminor1990 <i@canisminor.cc> Co-authored-by: Innei <tukon479@gmail.com>
2026-01-26 07:28:33 +00:00
"docs:cdn": "npm run workflow:docs-cdn && npm run lint:mdx",
"docs:i18n": "lobe-i18n md && npm run lint:mdx",
"docs:seo": "lobe-seo && npm run lint:mdx",
"e2e": "cd e2e && npm run test",
"e2e:install": "playwright install",
"e2e:ui": "playwright test --ui",
Sync main branch to canary branch (#12267) * 🔧 chore(release): bump version to v2.1.27 [skip ci] * chore: update sync main to canary workflow * 🐛 fix: update @lobehub/ui version and refactor dynamic import handling (#12260) * ✨ feat: add hotfix workflow and script for automated hotfix management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: refactor PR creation command to use execFileSync for improved reliability Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @lobehub/ui version and refactor dynamic import handling - Bump @lobehub/ui dependency from ^4.35.0 to ^4.36.2 in package.json. - Refactor settingsContentToStatic.mts to simplify dynamic import processing by removing business feature checks. - Add initialize.ts to enable immer's map set functionality. - Correct import path in layout.tsx from 'initiallize' to 'initialize'. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @types/react version in package.json - Bump @types/react dependency from ^19.2.9 to 19.2.14. - Add @types/react version to overrides section for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance auto-tag-release workflow for strict semver validation - Updated regex to match strict semantic versioning format, allowing for optional prerelease and build metadata. - Added validation step to ensure the version is a valid semver before proceeding with the release process. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove defaultSecurityBlacklist test file - Deleted the test file for DEFAULT_SECURITY_BLACKLIST as it is no longer needed. - This cleanup helps maintain a more streamlined test suite. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update localization files for multiple languages - Improved translations in Arabic, Bulgarian, German, English, and Spanish for chat and tool-related strings. - Enhanced descriptions for various parameters and added new keys for file handling and security warnings. - Adjusted phrasing for clarity and consistency across languages. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update PR comment script to include Actions Artifacts link - Modified the PR comment generation script to accept an additional artifactsUrl parameter. - Updated the comment format to include both Release download and Actions Artifacts links for better accessibility. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com> * 🐛 chore(hotfix): bump version to v2.1.28 [skip ci] * chore: update secrets token --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: rdmclin2 <rdmclin2@gmail.com> Co-authored-by: Arvin Xu <arvinx@foxmail.com> Co-authored-by: Innei <i@innei.in>
2026-02-11 15:51:35 +00:00
"hotfix:branch": "tsx ./scripts/hotfixWorkflow/index.ts",
"i18n": "npm run workflow:i18n && lobe-i18n && prettier -c --write \"locales/**\"",
💄 style: Update i18n microcopy (#10905) * chore: update i18n * chore: update i18n * chore: update i18n * chore: update i18n * chore: update i18n * chore: update i18n * chore: update i18n * chore: update i18n translations and placeholders across multiple components Signed-off-by: Innei <tukon479@gmail.com> * chore: update i18n translations for consistency in terminology across chat, onboarding, and settings components Signed-off-by: Innei <tukon479@gmail.com> * chore: update i18n translations to replace 'assistant' with 'agent' and ensure consistency across all components Signed-off-by: Innei <tukon479@gmail.com> * chore: update model descriptions in locales for clarity and accuracy Signed-off-by: Innei <tukon479@gmail.com> * feat: extract hard code string Signed-off-by: Innei <tukon479@gmail.com> * feat: enhance Chinese localization with new proxy and sync settings, update dialog messages for version checks and OAuth authorization Signed-off-by: Innei <tukon479@gmail.com> * chore: flatten * chore: standardize localization keys by flattening nested structures across multiple languages Signed-off-by: Innei <tukon479@gmail.com> * chore: refine i18n documentation by consolidating key naming conventions and workflow guidelines for translation management Signed-off-by: Innei <tukon479@gmail.com> * chore: update i18n * feat: add chat title localization for improved user experience in Chinese Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Innei <tukon479@gmail.com>
2025-12-23 15:23:00 +00:00
"i18n:unused": "tsx ./scripts/i18nWorkflow/analyzeUnusedKeys.ts",
"i18n:unused-clean": "tsx ./scripts/i18nWorkflow/cleanUnusedKeys.ts",
"lint": "npm run lint:ts && npm run lint:style && npm run type-check && npm run lint:circular",
"lint:circular": "npm run lint:circular:main && npm run lint:circular:packages",
"lint:circular:main": "dpdm src/**/*.ts --no-warning --no-tree --exit-code circular:1 --no-progress -T true --skip-dynamic-imports circular",
"lint:circular:packages": "dpdm packages/**/src/**/*.ts --no-warning --no-tree --exit-code circular:1 --no-progress -T true --skip-dynamic-imports circular",
"lint:console": "tsx scripts/checkConsoleLog.mts",
"lint:md": "remark . --silent --output",
"lint:mdx": "npm run workflow:mdx && remark \"docs/**/*.mdx\" -r ./.remarkrc.mdx.mjs --silent --output && eslint \"docs/**/*.mdx\" --quiet --fix",
"lint:style": "stylelint \"{src,tests}/**/*.{js,jsx,ts,tsx}\" --fix",
"lint:ts": "eslint src/ tests/ --concurrency=auto",
2025-12-20 12:23:40 +00:00
"lint:unused": "knip --include files,exports,types,enumMembers,duplicates",
"prepare": "husky",
2023-05-21 07:42:20 +00:00
"prettier": "prettier -c --write \"**/**\"",
"pull": "git pull",
2025-12-20 12:23:40 +00:00
"qstash": "pnpx @upstash/qstash-cli@latest dev",
2025-12-24 06:09:01 +00:00
"reinstall": "rm -rf .next && rm -rf node_modules && rm -rf ./packages/*/node_modules && pnpm -r exec rm -rf node_modules && pnpm install",
"reinstall:desktop": "rm -rf pnpm-lock.yaml && rm -rf node_modules && pnpm -r exec rm -rf node_modules && pnpm install --node-linker=hoisted",
2023-05-21 07:34:04 +00:00
"release": "semantic-release",
"release:branch": "tsx ./scripts/releaseWorkflow/index.ts",
2025-10-30 13:02:42 +00:00
"self-hosting:docker": "docker build -t lobehub:local .",
"self-hosting:docker-cn": "docker build -t lobehub-local --build-arg USE_CN_MIRROR=true .",
"start": "next start -p 3210",
2023-05-21 07:42:20 +00:00
"stylelint": "stylelint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
"test": "npm run test-app && npm run test-server",
"test:e2e": "pnpm --filter @lobechat/e2e-tests test",
"test:e2e:smoke": "pnpm --filter @lobechat/e2e-tests test:smoke",
"test:update": "vitest -u",
📝 docs: improve development guides to reflect current architecture (#12174) * 🔧 chore(vscode): add typescript.tsdk and disable mdx server Fix MDX extension crash caused by Cursor's bundled TypeScript version * 🔧 chore(claude): add skills symlink to .claude directory * 📝 docs: update development guides with current tech stack and architecture - Update tech stack: Next.js 16 + React 19, hybrid routing (App Router + React Router DOM), tRPC, Drizzle ORM + PostgreSQL, react-i18next - Update directory structure to reflect monorepo layout (apps/, packages/, e2e/, locales/) - Expand src/server/ with detailed subdirectory descriptions - Add complete SPA routing architecture with desktop and mobile route tables - Add tRPC router grouping details (lambda, async, tools, mobile) - Add data flow diagram - Simplify dev setup section to link to setup-development guide - Fix i18n default language description (English, not Chinese) - Sync all changes between zh-CN and English versions * 📝 docs: expand data flow diagram in folder structure guide Replace the single-line data flow with a detailed layer-by-layer flow diagram showing each layer's location and responsibility. * 📝 docs: modernize feature development guide - Remove outdated clientDB/pglite/indexDB references - Update schema path to packages/database/src/schemas/ - Update types path to packages/types/src/ - Replace inline migration steps with link to db-migrations guide - Add complete layered architecture table (Client Service, WebAPI, tRPC Router, Server Service, Server Module, Repository, DB Model) - Clarify Client Service as frontend code - Add i18n handling section with workflow and key naming convention - Remove verbose CSS style code, keep core business logic only - Expand testing section with commands, skill refs, and CI tip * 🔥 docs: remove outdated frontend feature development guide Content is superseded by the comprehensive feature-development guide which covers the full chain from schema to testing. * 📝 docs: add LobeHub ecosystem and community resources Add official ecosystem packages (LobeUI, LobeIcons, LobeCharts, LobeEditor, LobeTTS, LobeLint, Lobe i18n, MCP Mark) and community platforms (Agent Market, MCP Market, YouTube, X, Discord). * 📝 docs: improve contributing guidelines and resources - Clarify semantic release triggers (feat/fix vs style/chore) - Add testing section with Vitest/E2E/CI requirements - Update contribution steps to include CI check - Add LobeHub ecosystem packages and community platforms to resources * 📝 docs: rewrite architecture guide to reflect current platform design * 📝 docs: add code quality tools to architecture guide * 📝 docs: rewrite chat-api guide to reflect current architecture - Update sequence diagram with Agent Runtime loop as core execution engine - Replace PluginGateway with ToolExecution layer (Builtin/MCP/Plugin) - Update all path references (model-runtime, agent-runtime, fetch-sse packages) - Split old AgentRuntime section into Model Runtime + Agent Runtime - Add tool calling taxonomy: Builtin, MCP, and Plugin (deprecated) - Add client-side vs server-side execution section - Remove outdated adapter pseudo-code examples * 📝 docs: update file paths in add-new-image-model guide - src/libs/standard-parameters/ → packages/model-bank/src/standard-parameters/ - src/config/aiModels/ → packages/model-bank/src/aiModels/ - src/libs/model-runtime/ → packages/model-runtime/src/providers/ * 📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides The S3_PUBLIC_DOMAIN env var was incorrectly removed from all documentation in commit 4a87b31. This variable is still required by the code (src/server/services/file/impls/s3.ts) to generate public URLs for uploaded files. Without it, image URLs sent to vision models are just S3 keys instead of full URLs. Closes #12161 * 📦 chore: pin @lobehub/ui to 4.33.4 to fix SortableList type errors @lobehub/ui 4.34.0 introduced breaking type changes in SortableList where SortableListItem became strict, causing type incompatibility in onChange and renderItem callbacks across 6 files. Pin to 4.33.4 via pnpm overrides to enforce consistent version across monorepo. * 🐛 fix: correct ReadableStream type annotations and add dom.asynciterable - Add dom.asynciterable to tsconfig lib for ReadableStream async iteration - Fix createCallbacksTransformer return type: TransformStream<string, Uint8Array> - Update stream function return types from ReadableStream<string> to ReadableStream<Uint8Array> (llama.ts, ollama.ts, claude.ts) - Remove @ts-ignore from for-await loops in test files - Add explicit string[] type for chunks arrays * Revert "📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides" This reverts commit 24073f83d3d5e9a89c29e9a96a6689d2baa0edde.
2026-02-07 14:29:14 +00:00
"test-app": "vitest run",
"test-app:coverage": "vitest --coverage --silent='passed-only'",
2025-12-20 12:23:40 +00:00
"tunnel:cloudflare": "cloudflared tunnel --url http://localhost:3010",
"tunnel:ngrok": "ngrok http http://localhost:3011",
"type-check": "tsgo --noEmit",
"type-check:tsc": "tsc --noEmit",
"workflow:cdn": "tsx ./scripts/cdnWorkflow/index.ts",
"workflow:changelog": "tsx ./scripts/changelogWorkflow/index.ts",
"workflow:changelog:gen": "tsx ./scripts/changelogWorkflow/generateChangelog.ts",
"workflow:countCharters": "tsx scripts/countEnWord.ts",
"workflow:dbml": "tsx ./scripts/dbmlWorkflow/index.ts",
"workflow:docs": "tsx ./scripts/docsWorkflow/index.ts",
feat: Update user guide & changelog (#11518) * feat: Redesign doc * chore: uopdate site * chore: uopdate site * chore: uopdate site * chore: uopdate site * chore: uopdate site * feat: Uopdate content * chore: New doc * chore: Update content * chore: Update content * chore: add images * chore: add images * chore: add images * chore: add images * feat: Add more images * feat: Add more images * fix: Cannot reach end * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * Revise README content and structure Updated README to reflect changes in project description and removed outdated notes. * Revise 'Getting Started' and TOC in README Updated the 'Getting Started' section and modified the table of contents. * chore: Update content * Revise README structure and content Updated the Getting Started section and removed the Table of Contents. Adjusted the Local Development instructions. * Remove custom themes section from README Removed section about custom themes from README. * Update README.md * Refine introduction and highlight cloud version Updated wording for clarity and added recommendation for cloud version. * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * chore: Update content * fix: add missing translation * 🔀 chore: Move README changes to feat/readme branch Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: add missing translation * chore: update cdn * docs: add migration guide from v1.x local database to v2.x and update help sections Signed-off-by: Innei <tukon479@gmail.com> * fix: add missing translation * fix: add missing images * fix: add missing changelogs * fix: add missing changelogs * fix: add missing changelogs * fix: add missing changelogs * fix: add missing changelogs * style: update cdn --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: canisminor1990 <i@canisminor.cc> Co-authored-by: Innei <tukon479@gmail.com>
2026-01-26 07:28:33 +00:00
"workflow:docs-cdn": "tsx ./scripts/docsWorkflow/autoCDN.ts",
"workflow:i18n": "tsx ./scripts/i18nWorkflow/index.ts",
"workflow:mdx": "tsx ./scripts/mdxWorkflow/index.ts",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"workflow:mobile-spa": "tsx scripts/mobileSpaWorkflow/index.ts",
"workflow:readme": "tsx ./scripts/readmeWorkflow/index.ts",
"workflow:set-desktop-version": "tsx ./scripts/electronWorkflow/setDesktopVersion.ts"
},
"lint-staged": {
"*.md": [
"remark --silent --output --",
"prettier --write --no-error-on-unmatched-pattern"
],
"*.mdx": [
"remark -r ./.remarkrc.mdx.mjs --silent --output --",
"eslint --quiet --fix"
],
"*.json": [
"prettier --write --no-error-on-unmatched-pattern"
],
"*.{mjs,cjs}": [
"eslint --fix",
"prettier --write"
],
"*.{js,jsx}": [
"eslint --fix",
"stylelint --fix",
"prettier --write"
],
"*.{ts,tsx}": [
"stylelint --fix",
"eslint --fix",
"prettier --parser=typescript --write"
],
"*.{yml,yaml}": [
"eslint --fix"
]
},
"overrides": {
"@types/react": "19.2.13",
"better-auth": "1.4.6",
"better-call": "1.1.8",
"drizzle-orm": "^0.45.1",
"fast-xml-parser": "5.4.2",
"lexical": "0.42.0",
🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x (#11686) * 🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x Resolves: LOBE-2658 - Upgrade pdfjs-dist from 4.x to 5.4.530 - Upgrade react-pdf from 9.x to 10.3.0 - Fix PDF worker loading using import.meta.url pattern - Add @napi-rs/canvas dependency for react-pdf renderer - Fix typo: ResouceManagerMode → ResourceManagerMode - Clean up meaningless comments in ListItem component - Simplify next config by removing unused isDesktop logic * chore: update claude Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(pdf): update PDF version in snapshots to 5.4.530 - Updated pdfVersion in PDF loader snapshots to reflect the new version 5.4.530. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(file-loaders): implement lazy loading for file loaders - Refactored file loader imports to use dynamic loading, improving performance by preventing heavy dependencies from being loaded until needed. - Introduced `getFileLoader` function to manage loader retrieval based on file type. - Updated logging and fallback mechanisms for unsupported file types. This change enhances the efficiency of file loading operations. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(config): enhance next configuration for improved package handling - Updated `nextConfig` to include `@napi-rs/canvas` and `pdfjs-dist` in `serverExternalPackages` to address bundling issues with Turbopack. - Removed unused `isDesktop` logic and simplified the configuration structure. - Adjusted `transpilePackages` to exclude `pdfjs-dist`, reflecting recent upgrades. This change optimizes the configuration for better compatibility and performance. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use CDN pdfjs worker --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-23 07:20:34 +00:00
"pdfjs-dist": "5.4.530",
"stylelint-config-clean-order": "7.0.0"
},
"dependencies": {
2025-12-21 04:34:44 +00:00
"@ant-design/icons": "^6.1.0",
"@ant-design/pro-components": "^2.8.10",
"@anthropic-ai/sdk": "^0.73.0",
2025-12-20 12:23:40 +00:00
"@atlaskit/pragmatic-drag-and-drop": "^1.7.7",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"@aws-sdk/client-bedrock-runtime": "^3.941.0",
"@aws-sdk/client-s3": "~3.932.0",
"@aws-sdk/s3-request-presigner": "~3.932.0",
"@azure-rest/ai-inference": "1.0.0-beta.5",
"@azure/core-auth": "^1.10.1",
"@better-auth/expo": "1.4.6",
"@better-auth/passkey": "1.4.6",
"@cfworker/json-schema": "^4.1.1",
"@chat-adapter/discord": "^4.23.0",
"@chat-adapter/slack": "^4.23.0",
"@chat-adapter/state-ioredis": "^4.23.0",
"@chat-adapter/telegram": "^4.23.0",
"@codesandbox/sandpack-react": "^2.20.0",
"@discordjs/rest": "^2.6.0",
2025-12-20 12:23:40 +00:00
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/utilities": "^3.2.2",
"@emoji-mart/data": "^1.2.1",
"@emoji-mart/react": "^1.1.1",
"@emotion/react": "^11.14.0",
"@fal-ai/client": "^1.8.4",
"@floating-ui/react": "^0.27.19",
"@formkit/auto-animate": "^0.9.0",
"@google/genai": "^1.38.0",
2025-12-20 12:23:40 +00:00
"@henrygd/queue": "^1.2.0",
"@huggingface/inference": "^4.13.10",
"@icons-pack/react-simple-icons": "^13.8.0",
"@khmyznikov/pwa-install": "0.3.9",
"@lexical/utils": "^0.42.0",
"@lobechat/agent-runtime": "workspace:*",
♻️ refactor: implement SkillResolver, BaseSystemRoleProvider, and agent document injection pipeline (#13315) * ♻️ refactor: implement SkillResolver to replace ad-hoc skill assembly Introduces a two-layer skill resolution architecture mirroring ToolsEngine + ToolResolver: - SkillEngine (assembly layer): accepts raw skills + enableChecker, outputs OperationSkillSet - SkillResolver (resolution layer): merges operation + step delta + accumulated activations Key changes: - Add SkillResolver, OperationSkillSet, StepSkillDelta, ActivatedStepSkill types - Enhance SkillEngine with enableChecker and generate() method - Wire SkillResolver into RuntimeExecutors call_llm - Replace manual skillMetas assembly in aiAgent with SkillEngine.generate() - Update client-side skillEngineering to use SkillEngine + enableChecker - Add activatedStepSkills to AgentState for step-level skill accumulation Fixes: agent-browser content injected into non-desktop scenarios (Discord bot) due to missing filterBuiltinSkills call in aiAgent LOBE-6410 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: extract agent-templates to standalone package and inject documents server-side - Create @lobechat/agent-templates package with types, templates, and registry - Move DocumentLoadPosition, DocumentLoadFormat, DocumentLoadRule, etc. to new package - Move claw templates (AGENTS, BOOTSTRAP, IDENTITY, SOUL) with .md file imports - Add BOOTSTRAP.md as new onboarding template (priority 1, system-append) - Fix template positions: AGENTS→before-system, IDENTITY/SOUL→system-append - Update database package to re-export from @lobechat/agent-templates - Migrate all consumers to import directly from @lobechat/agent-templates - Add agent documents injection in server-side RuntimeExecutors (was missing) - Support -p CLI flag in devStartupSequence for port configuration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: correct import statement for non-type exports from agent-templates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 📦 build: add @lobechat/agent-templates to root dependencies Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: remove template proxy files from database package Stop re-exporting template/templates from database — consumers import directly from @lobechat/agent-templates. Keep types.ts re-exports for internal database code only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: create BaseSystemRoleProvider to unify system message append pattern All providers that append to the system message now inherit from BaseSystemRoleProvider and only implement buildSystemRoleContent(). The base class handles find-or-create and join logic. Migrated providers: - EvalContextSystemInjector - BotPlatformContextInjector - SystemDateProvider - ToolSystemRoleProvider - HistorySummaryProvider - SkillContextProvider Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: restore metadata tracking in BaseSystemRoleProvider via onInjected hook Add onInjected() callback to BaseSystemRoleProvider so subclasses can update pipeline metadata after successful injection. Also add raw-md plugin to context-engine vitest config for .md imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add enabled field to AgentDocumentInjector config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: add enabled field to all providers, remove spread conditionals in MessagesEngine All providers now accept an `enabled` config field. MessagesEngine pipeline is a flat array with no spread conditionals — each provider is always instantiated and uses `enabled` to skip internally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 💄 style: clean up MessagesEngine pipeline comments Remove numbered prefixes, keep descriptive comments for each provider. Only phase headers use separator blocks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: reorganize MessagesEngine pipeline phases by injection target Phase 1: History Truncation Phase 2: System Message Assembly (all BaseSystemRoleProvider) Phase 3: Context Injection (before first user message, BaseFirstUserContentProvider) Phase 4: User Message Augmentation (last user message injections) Phase 5: Message Transformation (flatten, template, variables) Phase 6: Content Processing & Cleanup (multimodal, tool calls, cleanup) Moved SkillContext, ToolSystemRole, HistorySummary from Phase 3 to Phase 2 since they append to system message, not user context. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 💄 style: split Phase 6 into Content Processing (6) and Cleanup (7) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: split AgentDocumentInjector into three position-based injectors - AgentDocumentSystemInjector (Phase 2): before-system, system-append, system-replace - AgentDocumentContextInjector (Phase 3): before-first-user - AgentDocumentMessageInjector (Phase 4): after-first-user, context-end Shared utilities (filterByRules, formatDocument, sortByPriority) extracted to AgentDocumentInjector/shared.ts. Old monolithic injector removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: split AgentDocumentSystemInjector into three separate injectors - AgentDocumentBeforeSystemInjector: prepends as separate system message (before-system) - AgentDocumentSystemAppendInjector: appends to system message (system-append) - AgentDocumentSystemReplaceInjector: replaces entire system message (system-replace) Each has distinct semantics and correct pipeline placement: - BeforeSystem → before SystemRoleInjector - SystemAppend → after HistorySummary (end of Phase 2) - SystemReplace → last in Phase 2 (destructive) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: auto-enable agent-documents tool when agent has documents - Add AgentDocumentsManifest to defaultToolIds - Add hasAgentDocuments rule in server createServerAgentToolsEngine - Query agent documents in AiAgentService.execAgent to determine flag - Pattern matches KnowledgeBase auto-enable via enableChecker rules Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🔨 chore: add agent documents status to execAgent operation log Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * update content * fix tests * 🐛 fix: add raw-md plugin to database vitest configs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 02:10:06 +00:00
"@lobechat/agent-templates": "workspace:*",
✨ feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) * ✨ feat(onboarding): add agent-guided web onboarding flow Made-with: Cursor * Update onboarding prompts Co-authored-by: Codex <noreply@openai.com> * 🐛 fix web onboarding builtin tool flow * ✨ feat(onboarding): enhance agent onboarding flow with new dimensions and refined rules - Updated onboarding structure to include new nodes: agentIdentity, userIdentity, workStyle, workContext, and painPoints. - Revised system role instructions to emphasize a conversational approach and concise interactions. - Adjusted manifest and type definitions to reflect the new onboarding schema. - Implemented tests to ensure proper functionality of the onboarding context and flow. This update aims to improve user experience during onboarding by making it more engaging and structured. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance onboarding experience with localized welcome messages and interaction hints - Added localized welcome messages for onboarding in English and Chinese. - Refactored system role handling to support dynamic interaction hints based on user locale. - Updated onboarding context to include interaction hints for improved user engagement. - Implemented tests to validate the new interaction hint functionality. This update aims to create a more personalized and engaging onboarding experience for users across different languages. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): overhaul onboarding flow with new question structure and refined interaction rules - Replaced existing interaction hints with a focused question structure to enhance user engagement. - Updated system role instructions to clarify onboarding protocols and improve conversational flow. - Refactored type definitions and manifest to align with the new onboarding schema. - Removed deprecated interaction hint components and tests to streamline the codebase. This update aims to create a more structured and engaging onboarding experience for users, ensuring clarity and efficiency in interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): introduce builtin agent onboarding package with structured roles and prompts - Added a new package for agent onboarding, including a package.json configuration and initial TypeScript files. - Implemented system role templates and tool prompts to guide the onboarding process. - Established a client interface for rendering questions and handling user interactions. - Updated dependencies in related packages to integrate the new onboarding functionality. This update aims to enhance the onboarding experience by providing a structured approach for agents, ensuring clarity and efficiency in user interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance agent onboarding with new question renderer and refined interaction logic - Introduced a new `QuestionRendererView` component to streamline the rendering of onboarding questions. - Refactored the `QuestionRenderer` to utilize a runtime hook for improved state management and separation of concerns. - Updated the onboarding context to fallback to stored questions when the current question is empty, enhancing user experience. - Simplified the onboarding API by removing unnecessary read token requirements from various endpoints. - Added tests to validate the new question rendering logic and ensure proper functionality. This update aims to create a more efficient and user-friendly onboarding experience by improving the question handling and rendering process. Signed-off-by: Innei <tukon479@gmail.com> * Add dev history view for onboarding * remove: prosetting Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): inline response language step in agent conversation - Add ResponseLanguageInlineStep and wire into Conversation flow - Extend agent onboarding context and update ResponseLanguageStep route - Add tests and onboarding agent document design spec Made-with: Cursor * ✨ feat(onboarding): enhance onboarding flow with inbox integration and schema refactor - Updated onboarding process to migrate conversation topics to the inbox upon completion, ensuring users can revisit their onboarding discussions. - Introduced a new schema-driven normalizer and node handler registry to streamline onboarding data handling, reducing code duplication and improving maintainability. - Added comprehensive tests for new document builders and onboarding service methods to ensure functionality and reliability. - Refactored existing components to support the new onboarding structure and improve user experience. This update aims to create a more cohesive onboarding experience by integrating user identity data into the inbox and simplifying the underlying code structure. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(agent-documents): add listDocuments, readDocumentByFilename, upsertDocumentByFilename APIs * ✨ feat(onboarding): add generic user interaction builtin tool * ✨ feat(onboarding): wire generic tool interaction semantics Register user-interaction tool in builtin-tools registry with manifest, intervention components, client executor, and server runtime. Extend BuiltinInterventionProps with interactionMode and onInteractionAction to support custom (non-approval) interaction UIs. Add submit/skip/cancel actions to conversation store with full operation lifecycle management. * 🔧 fix: add builtin-tool-user-interaction to root workspace dependencies * ♻️ refactor(onboarding): remove onboarding-owned question persistence Drop askUserQuestion from the web-onboarding tool and remove questionSurface from persisted state. Question presentation is now delegated to the generic lobe-user-interaction tool. * ♻️ refactor(onboarding): switch UI to generic interaction tool Enable UserInteraction and AgentDocuments tools in web-onboarding and inbox agent configs. Remove obsolete inline question renderers (QuestionRenderer, QuestionRendererView, questionRendererRuntime, questionRendererSchema, ResponseLanguageInlineStep) and simplify Conversation component to only render summary CTA. * 🔥 refactor(onboarding): remove identity doc and rewrite soul sync * 🐛 fix(user-interaction): add humanIntervention to manifest and implement form UI * 🐛 fix(onboarding): create user message on interaction submit instead of re-executing tool * ♻️ refactor(onboarding): rebuild generic interaction flow Align agent/tool roles and onboarding UI/runtime around the generic interaction rebuild. Made-with: Cursor * ✨ feat(onboarding): implement onboarding document and persona management Introduce a new onboarding document structure that separates agent identity and user persona data. Replace existing `readSoulDocument` and `updateSoulDocument` APIs with `readDocument` and `updateDocument` to handle both SOUL.md and user persona documents. Update related services, client executors, and localization keys to reflect these changes. Ensure document updates are driven by the agent, allowing for incremental updates and improved content management. Signed-off-by: Innei <tukon479@gmail.com> * refactor Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(workflow): introduce unified tool call collapse UI and supporting components Add a new workflow collapse feature that groups tool calls and reasoning into a single collapsible unit, enhancing the user interface for tool call progress. This includes the creation of several components: `WorkflowCollapse`, `WorkflowSummary`, `WorkflowExpandedList`, `WorkflowToolLine`, and `WorkflowReasoningLine`. Update the design specifications and implementation plans to reflect this new structure, aiming for a more cohesive and user-friendly experience. Signed-off-by: Innei <tukon479@gmail.com> * feat(types): add discovery pacing types and constant * feat(onboarding): add countTopicUserMessages and pacing gate to derivePhase * feat(onboarding): capture discovery baseline and return pacing data in getState * ✨ feat(onboarding): add pacing hints to discovery phase tool result * test(onboarding): add discovery pacing gate tests * ♻️ refactor(onboarding): soften discovery pacing gate and add early exit exception - MIN_DISCOVERY_USER_MESSAGES lowered from 4 to 2 (hard floor) - RECOMMENDED_DISCOVERY_USER_MESSAGES = 4 (advisory hint) - Tool protocol rule 2 now has explicit early exit exception - Pacing hint text changed from imperative to advisory * ✨ feat(onboarding): update .gitignore and remove outdated onboarding plans - Added `docs/superpowers` to .gitignore to exclude documentation files from version control. - Deleted several outdated onboarding implementation plans, including those for onboarding inbox integration, generic interaction rebuild, and user question simplification, to streamline project documentation. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): refine agent onboarding, streaming, and AskUserQuestion Made-with: Cursor * ✨ feat(store): add pending interventions selector * 🐛 fix(store): handle standalone tool messages and structural children traversal in pending interventions selector * ✨ feat(conversation): create InterventionBar component Add InterventionBar UI component with tab bar for multiple pending interventions, reusing the existing Intervention detail component. * 🐛 fix(conversation): use stable toolCallId for active tab state and add min-height: 0 Track active intervention by toolCallId instead of array index to prevent stale selection when interventions are resolved. Add min-height: 0 to scrollable content for correct overflow in flex column layout. * feat(chatinput): show InterventionBar when pending interventions exist * feat(tool): collapse inline intervention to one-line summary with scroll-to-bottom * feat(i18n): add intervention bar translation keys * 🐛 fix(chatinput): prevent infinite render loop from pendingInterventions selector * 🐛 fix(chatinput): use equality function for pendingInterventions to break render loop * refactor(tool): remove CollapsedIntervention, return null for pending inline * feat(i18n): add form.other translation key * feat(tool): add styles for select field with Other option * feat(tool): add SelectFieldInput with Other option row * feat(tool): wire SelectFieldInput and update validation in AskUserQuestion * fix(tool): add keyboard handler to Other row, fix label flex * refactor(tool): restore Select dropdown, add Other toggle row below * refactor(tool): change Other to form-level escape hatch, restore antd Select * refactor(tool): replace checkbox toggle with minimal text link escape hatch * feat(tool): use lucide icons, auto-focus on escape toggle, createStaticStyles * refactor(onboarding): update onboarding model references and improve styling in ModeSwitch component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): add greeting entry animation keyframes and card styles * ✨ feat(onboarding): add LogoThree and entry animations to greeting card * ✨ feat(onboarding): add View Transition morph from greeting to conversation * refactor(onboarding): simplify ModeSwitch component by removing segmentedGlass styling Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): increase maximum onboarding steps to 5 and add ProSettingsStep component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance user interaction question handling with validation schema - Introduced Zod validation for askUserQuestion arguments to ensure correct structure. - Updated test to reflect new question format with fields. - Added error handling in AskUserQuestion component to log submission errors. This improves the robustness of user interactions by enforcing schema validation and enhancing error reporting. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance agent metadata handling and onboarding synchronization - Updated `useAgentMeta` to prioritize custom titles from the database, falling back to the default Lobe AI title if none exists. - Integrated `refreshBuiltinAgent` into the onboarding process to ensure the latest agent data is reflected during user interactions. - Adjusted the `InboxItem` component to display the correct agent title and avatar based on the updated metadata. - Refactored optimistic update actions to improve message handling and synchronization across components. This improves the user experience by ensuring that the most relevant agent information is displayed and updated in real-time during onboarding and conversation flows. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance conversation lifecycle and onboarding agent synchronization - Updated `ConversationLifecycleActionImpl` to include additional context parameters (agentId, groupId, threadId, topicId) when updating message plugins for aborted interactions. - Integrated `refreshBuiltinAgent` for the inbox during the onboarding process to ensure the latest agent data is synchronized. These changes improve the handling of conversation lifecycle events and ensure that onboarding reflects the most current agent information, enhancing user experience during interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: implement agent onboarding feature toggle and enhance ModeSwitch component - Introduced `AGENT_ONBOARDING_ENABLED` configuration to control the visibility of the agent onboarding options. - Updated `ModeSwitch` component to conditionally render onboarding options based on the feature toggle. - Enhanced tests for `ModeSwitch` to cover scenarios for both enabled and disabled states of agent onboarding. - Refactored `AgentOnboardingRoute` to navigate to the classic onboarding if the agent onboarding feature is disabled. These changes improve the onboarding experience by allowing dynamic control over the agent onboarding feature, ensuring that users only see relevant options based on the configuration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: update agent onboarding feature toggle to include development mode - Modified `AGENT_ONBOARDING_ENABLED` to also activate in development mode using `isDev`. - This change allows for easier testing and development of the agent onboarding feature without needing to alter production configurations. Signed-off-by: Innei <tukon479@gmail.com> * Prevent welcome message when onboard * 🐛 fix: satisfy ToolExecutionContext and updateMessageTools typings Made-with: Cursor * 🐛 fix: update tests for custom builtin agent title and discovery phase constants * 🐛 fix: use custom inbox agent title and avatar in InboxWelcome * 🧹 chore(onboarding): remove HistoryPanel unit test Made-with: Cursor * 🐛 fix: add missing onboarding/agent and onboarding/classic routes to desktop config * ✅ test: fix failing tests for onboarding container, document helpers, and executor * ✅ test: mock LogoThree to prevent Spline runtime fetch errors in CI --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Codex <noreply@openai.com>
2026-03-30 12:28:54 +00:00
"@lobechat/builtin-agent-onboarding": "workspace:*",
2025-12-20 12:23:40 +00:00
"@lobechat/builtin-agents": "workspace:*",
"@lobechat/builtin-skills": "workspace:*",
"@lobechat/builtin-tool-activator": "workspace:*",
2025-12-20 12:23:40 +00:00
"@lobechat/builtin-tool-agent-builder": "workspace:*",
"@lobechat/builtin-tool-agent-documents": "workspace:*",
"@lobechat/builtin-tool-agent-management": "workspace:*",
✨ feat: support agent tasks system (#13289) * ✨ feat: agent task system — CLI, review rubrics, workspace, comments, brief tool split support import md Major changes: - Split task CLI into modular files (task/, lifecycle, topic, doc, review, checkpoint, dep) - Split builtin-tool-task into task + brief tools (conditional injection) - Task review uses EvalBenchmarkRubric from @lobechat/eval-rubric - Task workspace: documents auto-pin via Notebook, tree view with folders - Task comments system (task_comments table) - Task topics: dedicated TaskTopicModel with userId, handoff fields, review results - Heartbeat timeout auto-detection in detail API - Run idempotency (reject duplicate runs) + error rollback - Topic cancel/delete by topicId only (no taskId needed) - Integration tests for task router (13 tests) - interruptOperation fix (string param, not object) - Global TRPC error handler in CLI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> task document workflow task handoff loop 🗃️ chore: consolidate task system migrations into single 0095 Merged 7 separate migrations (0095-0101) into one: - tasks, briefs, task_comments, task_dependencies, task_documents, task_topics tables - All fields including sort_order, resolved_action/comment, review fields - Idempotent CREATE TABLE IF NOT EXISTS, DROP/ADD CONSTRAINT, CREATE INDEX IF NOT EXISTS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> fix interruptOperation topic auto review workflow topic handoff workflow finish run topic and brief workflow support task tool improve task schema update ✨ feat: add onComplete hook to task.run for completion callbacks When agent execution completes, the hook: - Updates task heartbeat - Creates a result Brief (on success) with assistant content summary - Creates an error Brief (on failure) with error message - Supports both local (handler) and production (webhook) modes Uses the new Agent Runtime Hooks system instead of raw stepCallbacks. LOBE-6160 LOBE-6208 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Review system — LLM-as-Judge automated review Task review uses an independent LLM call to evaluate topic output quality against configurable criteria with pass/fail thresholds. - TaskReviewService: structured LLM review via generateObject, auto-resolves model/provider from user's system agent defaults - Model: getReviewConfig, updateReviewConfig on TaskModel - Router: getReview, updateReview, runReview procedures - CLI: `task review set/view/run` commands - Auto-creates Brief with review results LOBE-6165 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add TaskScheduler, multi-topic execution, and handoff context - TaskScheduler: interface + Local implementation (setTimeout-based), following QueueService dual-mode pattern - Multi-topic execution: `task run --topics N --delay S` runs N topics in sequence with optional delay between them - Handoff context: buildTaskPrompt() queries previous topics by metadata.taskId and injects handoff summaries into the next topic's prompt (sliding window: latest full, older summaries only) - Heartbeat auto-update between topics LOBE-6161 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Heartbeat watchdog + heartbeat CLI Watchdog scans running tasks with expired heartbeats, marks them as failed, and creates urgent error Briefs. Heartbeat CLI allows manual heartbeat reporting for testing. - Model: refactored to use Drizzle operators (isNull, isNotNull, ne) instead of raw SQL where possible; fixed findStuckTasks to skip tasks without heartbeat data - Router: heartbeat (manual report), watchdog (scan + fail + brief) - Router: updateSchema now includes heartbeatInterval, heartbeatTimeout - CLI: `task heartbeat <id>`, `task watchdog`, `task edit` with --heartbeat-timeout, --heartbeat-interval, --description LOBE-6161 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ♻️ refactor: move CheckpointConfig to @lobechat/types Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add task run — trigger agent execution for tasks Task.run creates a topic, triggers AiAgentService.execAgent with task context, and streams results via SSE. Supports both agentId and slug. - Service: added taskId to ExecAgentParams, included in topic metadata - Router: task.run procedure — resolves agent, builds prompt, calls execAgent, updates topic count and heartbeat - CLI: `task run <id>` command with SSE streaming, --prompt, --verbose LOBE-6160 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Checkpoint system for task review gates Checkpoint allows configuring pause points in task execution flow. Supports beforeIds (pause before subtask starts) and afterIds (pause after subtask completes) on parent tasks. - Model: CheckpointConfig type, getCheckpointConfig, updateCheckpointConfig, shouldPauseBeforeStart, shouldPauseAfterComplete - Router: getCheckpoint, updateCheckpoint procedures; integrated with updateStatus for automatic checkpoint triggering - CLI: `task checkpoint view/set` commands with --before, --after, --topic-before, --topic-after, --on-agent-request options - Tests: 3 new checkpoint tests (37 total) LOBE-6162 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add dependency unlocking on task completion When a task completes, automatically check and unlock blocked tasks whose dependencies are all satisfied (backlog → running). Also notify when all subtasks of a parent are completed. - Model: getUnlockedTasks, areAllSubtasksCompleted (Drizzle, no raw SQL) - Router: updateStatus hook triggers unlocking on completion - CLI: shows unlocked tasks and parent completion notification - Tests: 3 new tests (34 total) LOBE-6164 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Brief system — schema, model, router, CLI Brief is a universal Agent-to-User reporting mechanism, not limited to Tasks. CronJobs, Agents, and future systems can all produce Briefs. - Schema: briefs table with polymorphic source (taskId, cronJobId, agentId) - Model: BriefModel with CRUD, listUnresolved (Daily Brief), markRead, resolve - Router: TRPC brief router with taskId identifier resolution - CLI: `lh brief` command (list/view/read/resolve) - Tests: 11 model tests - Migration: 0096_add_briefs_table.sql LOBE-6163 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Task system — schema, model, router, CLI Implement the foundational Task system for managing long-running, multi-topic agent tasks with subtask trees and dependency chains. - Schema: tasks, task_dependencies, task_documents tables - Model: TaskModel with CRUD, tree queries, heartbeat, dependencies, document pinning - Router: TRPC task router with identifier/id resolution - CLI: `lh task` command (list/view/create/edit/delete/start/pause/resume/complete/cancel/tree/dep) - Tests: 31 model tests - Migration: 0095_add_task_tables.sql LOBE-6036 LOBE-6054 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * update * 🐛 fix: update brief model import path and add raw-md vitest plugin Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: eslint import sort in vitest config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: brief ID validation, auto-review retry, and continueTopicId operationId Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: task integration tests — create test agent for FK, fix children spread Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: task integration tests — correct identifier prefix and agent ID Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: remove unused toolsActivatorRuntime import Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: create real topic in task integration tests to satisfy FK constraint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: type errors in task prompt tests, handoff schema, and activity mapping Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: create real agent/topic/brief records in database model tests for FK constraints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:43:51 +00:00
"@lobechat/builtin-tool-brief": "workspace:*",
"@lobechat/builtin-tool-calculator": "workspace:*",
"@lobechat/builtin-tool-cloud-sandbox": "workspace:*",
"@lobechat/builtin-tool-creds": "workspace:*",
2025-12-20 12:23:40 +00:00
"@lobechat/builtin-tool-group-agent-builder": "workspace:*",
"@lobechat/builtin-tool-group-management": "workspace:*",
"@lobechat/builtin-tool-gtd": "workspace:*",
"@lobechat/builtin-tool-knowledge-base": "workspace:*",
"@lobechat/builtin-tool-local-system": "workspace:*",
"@lobechat/builtin-tool-memory": "workspace:*",
feat: add unified messaging tool for cross-platform communication (#13296) * ✨ feat: add cross-platform message tool for AI bot channel operations Implement a unified message tool (`lobe-message`) that provides AI with messaging capabilities across Discord, Telegram, Slack, Google Chat, and IRC through a single interface with platform-specific extensions. Core APIs: sendMessage, readMessages, editMessage, deleteMessage, searchMessages, reactToMessage, getReactions, pin/unpin management, channel/member info, thread operations, and polls. Architecture follows the established builtin-tool pattern: - Package: @lobechat/builtin-tool-message (manifest, types, executor, ExecutionRuntime, client components) - Registry: registered in builtin-tools (renders, inspectors, interventions, streamings) - Server runtime: stub service ready for platform adapter integration https://claude.ai/code/session_011sHc6R7V4cSYKere9RY1QM * feat: implement platform specific message service * chore: add wechat platform * chore: update wechat api service * chore: update protocol implementation * chore: optimize platform api test * fix: lark domain error * feat: support bot message cli * chore: refactor adapter to service * chore: optimize bot status fetch * fix: bot status * fix: channel nav ignore * feat: message tool support bot manage * feat: add lobe-message runtime * feat: support direct message * feat: add history limit * chore: update const limit * feat: optimize server id message history limit * chore: optimize system role & inject platform environment info * chore: update readMessages vibe * fix: form body width 50% * chore: optimize tool prompt * chore: update i18n files * chore: optimize read message system role and update bot message lh * updage readMessage api rate limit * chore: comatible for readMessages * fix: feishu readMessage implementation error * fix: test case * chore: update i18n files * fix: lint error * chore: add timeout for conversaction case * fix: message test case * fix: vite gzip error --------- Co-authored-by: Claude <noreply@anthropic.com>
2026-03-30 16:26:32 +00:00
"@lobechat/builtin-tool-message": "workspace:*",
"@lobechat/builtin-tool-notebook": "workspace:*",
"@lobechat/builtin-tool-page-agent": "workspace:*",
"@lobechat/builtin-tool-remote-device": "workspace:*",
"@lobechat/builtin-tool-skill-store": "workspace:*",
"@lobechat/builtin-tool-skills": "workspace:*",
✨ feat: support agent tasks system (#13289) * ✨ feat: agent task system — CLI, review rubrics, workspace, comments, brief tool split support import md Major changes: - Split task CLI into modular files (task/, lifecycle, topic, doc, review, checkpoint, dep) - Split builtin-tool-task into task + brief tools (conditional injection) - Task review uses EvalBenchmarkRubric from @lobechat/eval-rubric - Task workspace: documents auto-pin via Notebook, tree view with folders - Task comments system (task_comments table) - Task topics: dedicated TaskTopicModel with userId, handoff fields, review results - Heartbeat timeout auto-detection in detail API - Run idempotency (reject duplicate runs) + error rollback - Topic cancel/delete by topicId only (no taskId needed) - Integration tests for task router (13 tests) - interruptOperation fix (string param, not object) - Global TRPC error handler in CLI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> task document workflow task handoff loop 🗃️ chore: consolidate task system migrations into single 0095 Merged 7 separate migrations (0095-0101) into one: - tasks, briefs, task_comments, task_dependencies, task_documents, task_topics tables - All fields including sort_order, resolved_action/comment, review fields - Idempotent CREATE TABLE IF NOT EXISTS, DROP/ADD CONSTRAINT, CREATE INDEX IF NOT EXISTS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> fix interruptOperation topic auto review workflow topic handoff workflow finish run topic and brief workflow support task tool improve task schema update ✨ feat: add onComplete hook to task.run for completion callbacks When agent execution completes, the hook: - Updates task heartbeat - Creates a result Brief (on success) with assistant content summary - Creates an error Brief (on failure) with error message - Supports both local (handler) and production (webhook) modes Uses the new Agent Runtime Hooks system instead of raw stepCallbacks. LOBE-6160 LOBE-6208 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Review system — LLM-as-Judge automated review Task review uses an independent LLM call to evaluate topic output quality against configurable criteria with pass/fail thresholds. - TaskReviewService: structured LLM review via generateObject, auto-resolves model/provider from user's system agent defaults - Model: getReviewConfig, updateReviewConfig on TaskModel - Router: getReview, updateReview, runReview procedures - CLI: `task review set/view/run` commands - Auto-creates Brief with review results LOBE-6165 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add TaskScheduler, multi-topic execution, and handoff context - TaskScheduler: interface + Local implementation (setTimeout-based), following QueueService dual-mode pattern - Multi-topic execution: `task run --topics N --delay S` runs N topics in sequence with optional delay between them - Handoff context: buildTaskPrompt() queries previous topics by metadata.taskId and injects handoff summaries into the next topic's prompt (sliding window: latest full, older summaries only) - Heartbeat auto-update between topics LOBE-6161 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Heartbeat watchdog + heartbeat CLI Watchdog scans running tasks with expired heartbeats, marks them as failed, and creates urgent error Briefs. Heartbeat CLI allows manual heartbeat reporting for testing. - Model: refactored to use Drizzle operators (isNull, isNotNull, ne) instead of raw SQL where possible; fixed findStuckTasks to skip tasks without heartbeat data - Router: heartbeat (manual report), watchdog (scan + fail + brief) - Router: updateSchema now includes heartbeatInterval, heartbeatTimeout - CLI: `task heartbeat <id>`, `task watchdog`, `task edit` with --heartbeat-timeout, --heartbeat-interval, --description LOBE-6161 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ♻️ refactor: move CheckpointConfig to @lobechat/types Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add task run — trigger agent execution for tasks Task.run creates a topic, triggers AiAgentService.execAgent with task context, and streams results via SSE. Supports both agentId and slug. - Service: added taskId to ExecAgentParams, included in topic metadata - Router: task.run procedure — resolves agent, builds prompt, calls execAgent, updates topic count and heartbeat - CLI: `task run <id>` command with SSE streaming, --prompt, --verbose LOBE-6160 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Checkpoint system for task review gates Checkpoint allows configuring pause points in task execution flow. Supports beforeIds (pause before subtask starts) and afterIds (pause after subtask completes) on parent tasks. - Model: CheckpointConfig type, getCheckpointConfig, updateCheckpointConfig, shouldPauseBeforeStart, shouldPauseAfterComplete - Router: getCheckpoint, updateCheckpoint procedures; integrated with updateStatus for automatic checkpoint triggering - CLI: `task checkpoint view/set` commands with --before, --after, --topic-before, --topic-after, --on-agent-request options - Tests: 3 new checkpoint tests (37 total) LOBE-6162 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add dependency unlocking on task completion When a task completes, automatically check and unlock blocked tasks whose dependencies are all satisfied (backlog → running). Also notify when all subtasks of a parent are completed. - Model: getUnlockedTasks, areAllSubtasksCompleted (Drizzle, no raw SQL) - Router: updateStatus hook triggers unlocking on completion - CLI: shows unlocked tasks and parent completion notification - Tests: 3 new tests (34 total) LOBE-6164 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Brief system — schema, model, router, CLI Brief is a universal Agent-to-User reporting mechanism, not limited to Tasks. CronJobs, Agents, and future systems can all produce Briefs. - Schema: briefs table with polymorphic source (taskId, cronJobId, agentId) - Model: BriefModel with CRUD, listUnresolved (Daily Brief), markRead, resolve - Router: TRPC brief router with taskId identifier resolution - CLI: `lh brief` command (list/view/read/resolve) - Tests: 11 model tests - Migration: 0096_add_briefs_table.sql LOBE-6163 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Task system — schema, model, router, CLI Implement the foundational Task system for managing long-running, multi-topic agent tasks with subtask trees and dependency chains. - Schema: tasks, task_dependencies, task_documents tables - Model: TaskModel with CRUD, tree queries, heartbeat, dependencies, document pinning - Router: TRPC task router with identifier/id resolution - CLI: `lh task` command (list/view/create/edit/delete/start/pause/resume/complete/cancel/tree/dep) - Tests: 31 model tests - Migration: 0095_add_task_tables.sql LOBE-6036 LOBE-6054 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * update * 🐛 fix: update brief model import path and add raw-md vitest plugin Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: eslint import sort in vitest config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: brief ID validation, auto-review retry, and continueTopicId operationId Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: task integration tests — create test agent for FK, fix children spread Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: task integration tests — correct identifier prefix and agent ID Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: remove unused toolsActivatorRuntime import Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: create real topic in task integration tests to satisfy FK constraint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: type errors in task prompt tests, handoff schema, and activity mapping Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: create real agent/topic/brief records in database model tests for FK constraints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:43:51 +00:00
"@lobechat/builtin-tool-task": "workspace:*",
✨ feat: add slash action tags, topic reference tool, and command bus system (#12860) * ✨ feat: add slash action tags in chat input Made-with: Cursor * ✨ feat: enhance editor with new slash actions and localization updates - Added new slash actions: change tone, condense, expand, polish, rewrite, summarize, and translate. - Updated localization files for English and Chinese to include new action tags and slash commands. - Removed deprecated useSlashItems component and integrated its functionality directly into InputEditor. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add slash placement configuration to chat input components - Introduced `slashPlacement` prop to `ChatInputProvider`, `StoreUpdater`, and `InputEditor` for customizable slash menu positioning. - Updated initial state to include `slashPlacement` with default value 'top'. - Adjusted `ChatInput` and `InputArea` components to utilize the new `slashPlacement` prop. This enhancement allows for better control over the user interface in chat input interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: implement command bus for slash action tags processing Add command bus system to parse and execute slash commands (compact context, new topic). Refactor action tag categories from ai/prompt to command/skill. Add useEnabledSkills hook for dynamic skill registration. * feat: compress command Signed-off-by: Innei <tukon479@gmail.com> * refactor: compress Signed-off-by: Innei <tukon479@gmail.com> * fix: skill inject * ✨ feat: slash action tags with context engine integration Made-with: Cursor * ✨ feat: add topic reference builtin tool and server runtime Made-with: Cursor * ✨ feat: add topic mention items and update ReferTopic integration Made-with: Cursor * 🐛 fix: preserve editorData through assistant-group edit flow and update RichTextMessage reactively - EditState now forwards editorData from EditorModal to modifyMessageContent - modifyMessageContent accepts and passes editorData to updateMessageContent - RichTextMessage uses useEditor + effect to update document on content change instead of key-based remount - Refactored RichTextMessage plugins to use shared createChatInputRichPlugins() * ✨ feat(context-engine): add metadata types and update processors/providers Made-with: Cursor * ✨ feat(chat-input): add slash action tags and restore failed input state * 🔧 chore: update package dependencies and enhance Vite configuration - Changed @lobehub/ui dependency to a specific package URL. - Added multiple SPA entry points and layout files to the Vite warmup configuration. - Removed unused monorepo packages from sharedOptimizeDeps and added various dayjs locales for better localization support. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @lobehub/ui dependency to version 5.4.0 in package.json Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: correct SkillsApiName.runSkill to activateSkill and update trimmed content assertions * 🐛 fix: resolve type errors in context-engine tests and InputEditor slashPlacement * 🐛 fix: update runSkill to activateSkill in conversationLifecycle test * 🐛 fix: avoid regex backtracking in placeholder parser * ✨ feat(localization): add action tags and tooltips for slash commands across multiple languages Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: preserve file attachments when /newTopic has no text content * cleanup Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-03-13 14:17:36 +00:00
"@lobechat/builtin-tool-topic-reference": "workspace:*",
✨ feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) * ✨ feat(onboarding): add agent-guided web onboarding flow Made-with: Cursor * Update onboarding prompts Co-authored-by: Codex <noreply@openai.com> * 🐛 fix web onboarding builtin tool flow * ✨ feat(onboarding): enhance agent onboarding flow with new dimensions and refined rules - Updated onboarding structure to include new nodes: agentIdentity, userIdentity, workStyle, workContext, and painPoints. - Revised system role instructions to emphasize a conversational approach and concise interactions. - Adjusted manifest and type definitions to reflect the new onboarding schema. - Implemented tests to ensure proper functionality of the onboarding context and flow. This update aims to improve user experience during onboarding by making it more engaging and structured. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance onboarding experience with localized welcome messages and interaction hints - Added localized welcome messages for onboarding in English and Chinese. - Refactored system role handling to support dynamic interaction hints based on user locale. - Updated onboarding context to include interaction hints for improved user engagement. - Implemented tests to validate the new interaction hint functionality. This update aims to create a more personalized and engaging onboarding experience for users across different languages. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): overhaul onboarding flow with new question structure and refined interaction rules - Replaced existing interaction hints with a focused question structure to enhance user engagement. - Updated system role instructions to clarify onboarding protocols and improve conversational flow. - Refactored type definitions and manifest to align with the new onboarding schema. - Removed deprecated interaction hint components and tests to streamline the codebase. This update aims to create a more structured and engaging onboarding experience for users, ensuring clarity and efficiency in interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): introduce builtin agent onboarding package with structured roles and prompts - Added a new package for agent onboarding, including a package.json configuration and initial TypeScript files. - Implemented system role templates and tool prompts to guide the onboarding process. - Established a client interface for rendering questions and handling user interactions. - Updated dependencies in related packages to integrate the new onboarding functionality. This update aims to enhance the onboarding experience by providing a structured approach for agents, ensuring clarity and efficiency in user interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance agent onboarding with new question renderer and refined interaction logic - Introduced a new `QuestionRendererView` component to streamline the rendering of onboarding questions. - Refactored the `QuestionRenderer` to utilize a runtime hook for improved state management and separation of concerns. - Updated the onboarding context to fallback to stored questions when the current question is empty, enhancing user experience. - Simplified the onboarding API by removing unnecessary read token requirements from various endpoints. - Added tests to validate the new question rendering logic and ensure proper functionality. This update aims to create a more efficient and user-friendly onboarding experience by improving the question handling and rendering process. Signed-off-by: Innei <tukon479@gmail.com> * Add dev history view for onboarding * remove: prosetting Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): inline response language step in agent conversation - Add ResponseLanguageInlineStep and wire into Conversation flow - Extend agent onboarding context and update ResponseLanguageStep route - Add tests and onboarding agent document design spec Made-with: Cursor * ✨ feat(onboarding): enhance onboarding flow with inbox integration and schema refactor - Updated onboarding process to migrate conversation topics to the inbox upon completion, ensuring users can revisit their onboarding discussions. - Introduced a new schema-driven normalizer and node handler registry to streamline onboarding data handling, reducing code duplication and improving maintainability. - Added comprehensive tests for new document builders and onboarding service methods to ensure functionality and reliability. - Refactored existing components to support the new onboarding structure and improve user experience. This update aims to create a more cohesive onboarding experience by integrating user identity data into the inbox and simplifying the underlying code structure. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(agent-documents): add listDocuments, readDocumentByFilename, upsertDocumentByFilename APIs * ✨ feat(onboarding): add generic user interaction builtin tool * ✨ feat(onboarding): wire generic tool interaction semantics Register user-interaction tool in builtin-tools registry with manifest, intervention components, client executor, and server runtime. Extend BuiltinInterventionProps with interactionMode and onInteractionAction to support custom (non-approval) interaction UIs. Add submit/skip/cancel actions to conversation store with full operation lifecycle management. * 🔧 fix: add builtin-tool-user-interaction to root workspace dependencies * ♻️ refactor(onboarding): remove onboarding-owned question persistence Drop askUserQuestion from the web-onboarding tool and remove questionSurface from persisted state. Question presentation is now delegated to the generic lobe-user-interaction tool. * ♻️ refactor(onboarding): switch UI to generic interaction tool Enable UserInteraction and AgentDocuments tools in web-onboarding and inbox agent configs. Remove obsolete inline question renderers (QuestionRenderer, QuestionRendererView, questionRendererRuntime, questionRendererSchema, ResponseLanguageInlineStep) and simplify Conversation component to only render summary CTA. * 🔥 refactor(onboarding): remove identity doc and rewrite soul sync * 🐛 fix(user-interaction): add humanIntervention to manifest and implement form UI * 🐛 fix(onboarding): create user message on interaction submit instead of re-executing tool * ♻️ refactor(onboarding): rebuild generic interaction flow Align agent/tool roles and onboarding UI/runtime around the generic interaction rebuild. Made-with: Cursor * ✨ feat(onboarding): implement onboarding document and persona management Introduce a new onboarding document structure that separates agent identity and user persona data. Replace existing `readSoulDocument` and `updateSoulDocument` APIs with `readDocument` and `updateDocument` to handle both SOUL.md and user persona documents. Update related services, client executors, and localization keys to reflect these changes. Ensure document updates are driven by the agent, allowing for incremental updates and improved content management. Signed-off-by: Innei <tukon479@gmail.com> * refactor Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(workflow): introduce unified tool call collapse UI and supporting components Add a new workflow collapse feature that groups tool calls and reasoning into a single collapsible unit, enhancing the user interface for tool call progress. This includes the creation of several components: `WorkflowCollapse`, `WorkflowSummary`, `WorkflowExpandedList`, `WorkflowToolLine`, and `WorkflowReasoningLine`. Update the design specifications and implementation plans to reflect this new structure, aiming for a more cohesive and user-friendly experience. Signed-off-by: Innei <tukon479@gmail.com> * feat(types): add discovery pacing types and constant * feat(onboarding): add countTopicUserMessages and pacing gate to derivePhase * feat(onboarding): capture discovery baseline and return pacing data in getState * ✨ feat(onboarding): add pacing hints to discovery phase tool result * test(onboarding): add discovery pacing gate tests * ♻️ refactor(onboarding): soften discovery pacing gate and add early exit exception - MIN_DISCOVERY_USER_MESSAGES lowered from 4 to 2 (hard floor) - RECOMMENDED_DISCOVERY_USER_MESSAGES = 4 (advisory hint) - Tool protocol rule 2 now has explicit early exit exception - Pacing hint text changed from imperative to advisory * ✨ feat(onboarding): update .gitignore and remove outdated onboarding plans - Added `docs/superpowers` to .gitignore to exclude documentation files from version control. - Deleted several outdated onboarding implementation plans, including those for onboarding inbox integration, generic interaction rebuild, and user question simplification, to streamline project documentation. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): refine agent onboarding, streaming, and AskUserQuestion Made-with: Cursor * ✨ feat(store): add pending interventions selector * 🐛 fix(store): handle standalone tool messages and structural children traversal in pending interventions selector * ✨ feat(conversation): create InterventionBar component Add InterventionBar UI component with tab bar for multiple pending interventions, reusing the existing Intervention detail component. * 🐛 fix(conversation): use stable toolCallId for active tab state and add min-height: 0 Track active intervention by toolCallId instead of array index to prevent stale selection when interventions are resolved. Add min-height: 0 to scrollable content for correct overflow in flex column layout. * feat(chatinput): show InterventionBar when pending interventions exist * feat(tool): collapse inline intervention to one-line summary with scroll-to-bottom * feat(i18n): add intervention bar translation keys * 🐛 fix(chatinput): prevent infinite render loop from pendingInterventions selector * 🐛 fix(chatinput): use equality function for pendingInterventions to break render loop * refactor(tool): remove CollapsedIntervention, return null for pending inline * feat(i18n): add form.other translation key * feat(tool): add styles for select field with Other option * feat(tool): add SelectFieldInput with Other option row * feat(tool): wire SelectFieldInput and update validation in AskUserQuestion * fix(tool): add keyboard handler to Other row, fix label flex * refactor(tool): restore Select dropdown, add Other toggle row below * refactor(tool): change Other to form-level escape hatch, restore antd Select * refactor(tool): replace checkbox toggle with minimal text link escape hatch * feat(tool): use lucide icons, auto-focus on escape toggle, createStaticStyles * refactor(onboarding): update onboarding model references and improve styling in ModeSwitch component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): add greeting entry animation keyframes and card styles * ✨ feat(onboarding): add LogoThree and entry animations to greeting card * ✨ feat(onboarding): add View Transition morph from greeting to conversation * refactor(onboarding): simplify ModeSwitch component by removing segmentedGlass styling Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): increase maximum onboarding steps to 5 and add ProSettingsStep component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance user interaction question handling with validation schema - Introduced Zod validation for askUserQuestion arguments to ensure correct structure. - Updated test to reflect new question format with fields. - Added error handling in AskUserQuestion component to log submission errors. This improves the robustness of user interactions by enforcing schema validation and enhancing error reporting. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance agent metadata handling and onboarding synchronization - Updated `useAgentMeta` to prioritize custom titles from the database, falling back to the default Lobe AI title if none exists. - Integrated `refreshBuiltinAgent` into the onboarding process to ensure the latest agent data is reflected during user interactions. - Adjusted the `InboxItem` component to display the correct agent title and avatar based on the updated metadata. - Refactored optimistic update actions to improve message handling and synchronization across components. This improves the user experience by ensuring that the most relevant agent information is displayed and updated in real-time during onboarding and conversation flows. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance conversation lifecycle and onboarding agent synchronization - Updated `ConversationLifecycleActionImpl` to include additional context parameters (agentId, groupId, threadId, topicId) when updating message plugins for aborted interactions. - Integrated `refreshBuiltinAgent` for the inbox during the onboarding process to ensure the latest agent data is synchronized. These changes improve the handling of conversation lifecycle events and ensure that onboarding reflects the most current agent information, enhancing user experience during interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: implement agent onboarding feature toggle and enhance ModeSwitch component - Introduced `AGENT_ONBOARDING_ENABLED` configuration to control the visibility of the agent onboarding options. - Updated `ModeSwitch` component to conditionally render onboarding options based on the feature toggle. - Enhanced tests for `ModeSwitch` to cover scenarios for both enabled and disabled states of agent onboarding. - Refactored `AgentOnboardingRoute` to navigate to the classic onboarding if the agent onboarding feature is disabled. These changes improve the onboarding experience by allowing dynamic control over the agent onboarding feature, ensuring that users only see relevant options based on the configuration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: update agent onboarding feature toggle to include development mode - Modified `AGENT_ONBOARDING_ENABLED` to also activate in development mode using `isDev`. - This change allows for easier testing and development of the agent onboarding feature without needing to alter production configurations. Signed-off-by: Innei <tukon479@gmail.com> * Prevent welcome message when onboard * 🐛 fix: satisfy ToolExecutionContext and updateMessageTools typings Made-with: Cursor * 🐛 fix: update tests for custom builtin agent title and discovery phase constants * 🐛 fix: use custom inbox agent title and avatar in InboxWelcome * 🧹 chore(onboarding): remove HistoryPanel unit test Made-with: Cursor * 🐛 fix: add missing onboarding/agent and onboarding/classic routes to desktop config * ✅ test: fix failing tests for onboarding container, document helpers, and executor * ✅ test: mock LogoThree to prevent Spline runtime fetch errors in CI --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Codex <noreply@openai.com>
2026-03-30 12:28:54 +00:00
"@lobechat/builtin-tool-user-interaction": "workspace:*",
2025-12-29 16:47:54 +00:00
"@lobechat/builtin-tool-web-browsing": "workspace:*",
✨ feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) * ✨ feat(onboarding): add agent-guided web onboarding flow Made-with: Cursor * Update onboarding prompts Co-authored-by: Codex <noreply@openai.com> * 🐛 fix web onboarding builtin tool flow * ✨ feat(onboarding): enhance agent onboarding flow with new dimensions and refined rules - Updated onboarding structure to include new nodes: agentIdentity, userIdentity, workStyle, workContext, and painPoints. - Revised system role instructions to emphasize a conversational approach and concise interactions. - Adjusted manifest and type definitions to reflect the new onboarding schema. - Implemented tests to ensure proper functionality of the onboarding context and flow. This update aims to improve user experience during onboarding by making it more engaging and structured. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance onboarding experience with localized welcome messages and interaction hints - Added localized welcome messages for onboarding in English and Chinese. - Refactored system role handling to support dynamic interaction hints based on user locale. - Updated onboarding context to include interaction hints for improved user engagement. - Implemented tests to validate the new interaction hint functionality. This update aims to create a more personalized and engaging onboarding experience for users across different languages. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): overhaul onboarding flow with new question structure and refined interaction rules - Replaced existing interaction hints with a focused question structure to enhance user engagement. - Updated system role instructions to clarify onboarding protocols and improve conversational flow. - Refactored type definitions and manifest to align with the new onboarding schema. - Removed deprecated interaction hint components and tests to streamline the codebase. This update aims to create a more structured and engaging onboarding experience for users, ensuring clarity and efficiency in interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): introduce builtin agent onboarding package with structured roles and prompts - Added a new package for agent onboarding, including a package.json configuration and initial TypeScript files. - Implemented system role templates and tool prompts to guide the onboarding process. - Established a client interface for rendering questions and handling user interactions. - Updated dependencies in related packages to integrate the new onboarding functionality. This update aims to enhance the onboarding experience by providing a structured approach for agents, ensuring clarity and efficiency in user interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance agent onboarding with new question renderer and refined interaction logic - Introduced a new `QuestionRendererView` component to streamline the rendering of onboarding questions. - Refactored the `QuestionRenderer` to utilize a runtime hook for improved state management and separation of concerns. - Updated the onboarding context to fallback to stored questions when the current question is empty, enhancing user experience. - Simplified the onboarding API by removing unnecessary read token requirements from various endpoints. - Added tests to validate the new question rendering logic and ensure proper functionality. This update aims to create a more efficient and user-friendly onboarding experience by improving the question handling and rendering process. Signed-off-by: Innei <tukon479@gmail.com> * Add dev history view for onboarding * remove: prosetting Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): inline response language step in agent conversation - Add ResponseLanguageInlineStep and wire into Conversation flow - Extend agent onboarding context and update ResponseLanguageStep route - Add tests and onboarding agent document design spec Made-with: Cursor * ✨ feat(onboarding): enhance onboarding flow with inbox integration and schema refactor - Updated onboarding process to migrate conversation topics to the inbox upon completion, ensuring users can revisit their onboarding discussions. - Introduced a new schema-driven normalizer and node handler registry to streamline onboarding data handling, reducing code duplication and improving maintainability. - Added comprehensive tests for new document builders and onboarding service methods to ensure functionality and reliability. - Refactored existing components to support the new onboarding structure and improve user experience. This update aims to create a more cohesive onboarding experience by integrating user identity data into the inbox and simplifying the underlying code structure. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(agent-documents): add listDocuments, readDocumentByFilename, upsertDocumentByFilename APIs * ✨ feat(onboarding): add generic user interaction builtin tool * ✨ feat(onboarding): wire generic tool interaction semantics Register user-interaction tool in builtin-tools registry with manifest, intervention components, client executor, and server runtime. Extend BuiltinInterventionProps with interactionMode and onInteractionAction to support custom (non-approval) interaction UIs. Add submit/skip/cancel actions to conversation store with full operation lifecycle management. * 🔧 fix: add builtin-tool-user-interaction to root workspace dependencies * ♻️ refactor(onboarding): remove onboarding-owned question persistence Drop askUserQuestion from the web-onboarding tool and remove questionSurface from persisted state. Question presentation is now delegated to the generic lobe-user-interaction tool. * ♻️ refactor(onboarding): switch UI to generic interaction tool Enable UserInteraction and AgentDocuments tools in web-onboarding and inbox agent configs. Remove obsolete inline question renderers (QuestionRenderer, QuestionRendererView, questionRendererRuntime, questionRendererSchema, ResponseLanguageInlineStep) and simplify Conversation component to only render summary CTA. * 🔥 refactor(onboarding): remove identity doc and rewrite soul sync * 🐛 fix(user-interaction): add humanIntervention to manifest and implement form UI * 🐛 fix(onboarding): create user message on interaction submit instead of re-executing tool * ♻️ refactor(onboarding): rebuild generic interaction flow Align agent/tool roles and onboarding UI/runtime around the generic interaction rebuild. Made-with: Cursor * ✨ feat(onboarding): implement onboarding document and persona management Introduce a new onboarding document structure that separates agent identity and user persona data. Replace existing `readSoulDocument` and `updateSoulDocument` APIs with `readDocument` and `updateDocument` to handle both SOUL.md and user persona documents. Update related services, client executors, and localization keys to reflect these changes. Ensure document updates are driven by the agent, allowing for incremental updates and improved content management. Signed-off-by: Innei <tukon479@gmail.com> * refactor Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(workflow): introduce unified tool call collapse UI and supporting components Add a new workflow collapse feature that groups tool calls and reasoning into a single collapsible unit, enhancing the user interface for tool call progress. This includes the creation of several components: `WorkflowCollapse`, `WorkflowSummary`, `WorkflowExpandedList`, `WorkflowToolLine`, and `WorkflowReasoningLine`. Update the design specifications and implementation plans to reflect this new structure, aiming for a more cohesive and user-friendly experience. Signed-off-by: Innei <tukon479@gmail.com> * feat(types): add discovery pacing types and constant * feat(onboarding): add countTopicUserMessages and pacing gate to derivePhase * feat(onboarding): capture discovery baseline and return pacing data in getState * ✨ feat(onboarding): add pacing hints to discovery phase tool result * test(onboarding): add discovery pacing gate tests * ♻️ refactor(onboarding): soften discovery pacing gate and add early exit exception - MIN_DISCOVERY_USER_MESSAGES lowered from 4 to 2 (hard floor) - RECOMMENDED_DISCOVERY_USER_MESSAGES = 4 (advisory hint) - Tool protocol rule 2 now has explicit early exit exception - Pacing hint text changed from imperative to advisory * ✨ feat(onboarding): update .gitignore and remove outdated onboarding plans - Added `docs/superpowers` to .gitignore to exclude documentation files from version control. - Deleted several outdated onboarding implementation plans, including those for onboarding inbox integration, generic interaction rebuild, and user question simplification, to streamline project documentation. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): refine agent onboarding, streaming, and AskUserQuestion Made-with: Cursor * ✨ feat(store): add pending interventions selector * 🐛 fix(store): handle standalone tool messages and structural children traversal in pending interventions selector * ✨ feat(conversation): create InterventionBar component Add InterventionBar UI component with tab bar for multiple pending interventions, reusing the existing Intervention detail component. * 🐛 fix(conversation): use stable toolCallId for active tab state and add min-height: 0 Track active intervention by toolCallId instead of array index to prevent stale selection when interventions are resolved. Add min-height: 0 to scrollable content for correct overflow in flex column layout. * feat(chatinput): show InterventionBar when pending interventions exist * feat(tool): collapse inline intervention to one-line summary with scroll-to-bottom * feat(i18n): add intervention bar translation keys * 🐛 fix(chatinput): prevent infinite render loop from pendingInterventions selector * 🐛 fix(chatinput): use equality function for pendingInterventions to break render loop * refactor(tool): remove CollapsedIntervention, return null for pending inline * feat(i18n): add form.other translation key * feat(tool): add styles for select field with Other option * feat(tool): add SelectFieldInput with Other option row * feat(tool): wire SelectFieldInput and update validation in AskUserQuestion * fix(tool): add keyboard handler to Other row, fix label flex * refactor(tool): restore Select dropdown, add Other toggle row below * refactor(tool): change Other to form-level escape hatch, restore antd Select * refactor(tool): replace checkbox toggle with minimal text link escape hatch * feat(tool): use lucide icons, auto-focus on escape toggle, createStaticStyles * refactor(onboarding): update onboarding model references and improve styling in ModeSwitch component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): add greeting entry animation keyframes and card styles * ✨ feat(onboarding): add LogoThree and entry animations to greeting card * ✨ feat(onboarding): add View Transition morph from greeting to conversation * refactor(onboarding): simplify ModeSwitch component by removing segmentedGlass styling Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): increase maximum onboarding steps to 5 and add ProSettingsStep component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance user interaction question handling with validation schema - Introduced Zod validation for askUserQuestion arguments to ensure correct structure. - Updated test to reflect new question format with fields. - Added error handling in AskUserQuestion component to log submission errors. This improves the robustness of user interactions by enforcing schema validation and enhancing error reporting. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance agent metadata handling and onboarding synchronization - Updated `useAgentMeta` to prioritize custom titles from the database, falling back to the default Lobe AI title if none exists. - Integrated `refreshBuiltinAgent` into the onboarding process to ensure the latest agent data is reflected during user interactions. - Adjusted the `InboxItem` component to display the correct agent title and avatar based on the updated metadata. - Refactored optimistic update actions to improve message handling and synchronization across components. This improves the user experience by ensuring that the most relevant agent information is displayed and updated in real-time during onboarding and conversation flows. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance conversation lifecycle and onboarding agent synchronization - Updated `ConversationLifecycleActionImpl` to include additional context parameters (agentId, groupId, threadId, topicId) when updating message plugins for aborted interactions. - Integrated `refreshBuiltinAgent` for the inbox during the onboarding process to ensure the latest agent data is synchronized. These changes improve the handling of conversation lifecycle events and ensure that onboarding reflects the most current agent information, enhancing user experience during interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: implement agent onboarding feature toggle and enhance ModeSwitch component - Introduced `AGENT_ONBOARDING_ENABLED` configuration to control the visibility of the agent onboarding options. - Updated `ModeSwitch` component to conditionally render onboarding options based on the feature toggle. - Enhanced tests for `ModeSwitch` to cover scenarios for both enabled and disabled states of agent onboarding. - Refactored `AgentOnboardingRoute` to navigate to the classic onboarding if the agent onboarding feature is disabled. These changes improve the onboarding experience by allowing dynamic control over the agent onboarding feature, ensuring that users only see relevant options based on the configuration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: update agent onboarding feature toggle to include development mode - Modified `AGENT_ONBOARDING_ENABLED` to also activate in development mode using `isDev`. - This change allows for easier testing and development of the agent onboarding feature without needing to alter production configurations. Signed-off-by: Innei <tukon479@gmail.com> * Prevent welcome message when onboard * 🐛 fix: satisfy ToolExecutionContext and updateMessageTools typings Made-with: Cursor * 🐛 fix: update tests for custom builtin agent title and discovery phase constants * 🐛 fix: use custom inbox agent title and avatar in InboxWelcome * 🧹 chore(onboarding): remove HistoryPanel unit test Made-with: Cursor * 🐛 fix: add missing onboarding/agent and onboarding/classic routes to desktop config * ✅ test: fix failing tests for onboarding container, document helpers, and executor * ✅ test: mock LogoThree to prevent Spline runtime fetch errors in CI --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Codex <noreply@openai.com>
2026-03-30 12:28:54 +00:00
"@lobechat/builtin-tool-web-onboarding": "workspace:*",
"@lobechat/builtin-tools": "workspace:*",
"@lobechat/business-config": "workspace:*",
"@lobechat/business-const": "workspace:*",
"@lobechat/chat-adapter-feishu": "workspace:*",
"@lobechat/chat-adapter-qq": "workspace:*",
"@lobechat/chat-adapter-wechat": "workspace:*",
"@lobechat/config": "workspace:*",
"@lobechat/const": "workspace:*",
"@lobechat/context-engine": "workspace:*",
"@lobechat/conversation-flow": "workspace:*",
"@lobechat/database": "workspace:*",
2025-12-20 12:23:40 +00:00
"@lobechat/desktop-bridge": "workspace:*",
"@lobechat/device-gateway-client": "workspace:*",
"@lobechat/edge-config": "workspace:*",
"@lobechat/editor-runtime": "workspace:*",
"@lobechat/electron-client-ipc": "workspace:*",
"@lobechat/electron-server-ipc": "workspace:*",
"@lobechat/eval-dataset-parser": "workspace:*",
"@lobechat/eval-rubric": "workspace:*",
2025-11-11 11:39:36 +00:00
"@lobechat/fetch-sse": "workspace:*",
"@lobechat/file-loaders": "workspace:*",
"@lobechat/local-file-shell": "workspace:*",
2025-12-20 12:23:40 +00:00
"@lobechat/memory-user-memory": "workspace:*",
"@lobechat/model-runtime": "workspace:*",
"@lobechat/observability-otel": "workspace:*",
✨ feat: add v1 api (#12758) * ✨ feat(openapi): add API key hash support for secure storage * ✨ feat(openapi): enhance message translation and knowledge base functionality - Added MessageTranslationController and associated routes for managing message translations, including fetching, creating, updating, and deleting translations. - Introduced KnowledgeBaseController with routes for CRUD operations on knowledge bases, including file management and access control. - Updated existing message and translation routes to improve structure and naming consistency. - Refactored related services and types to support new features and ensure type safety. This update enhances the API's capabilities for handling message translations and knowledge base management, improving overall functionality and user experience. * fix: allow OWNER scope to list agents in agents route - Add OWNER scope to AGENT_READ permission check - Aligns list behavior with AgentService.queryAgents ownership filter - Allows owner-scoped users to list their own agents * 🔧 refactor(rbac): improve import structure in rbac.ts - Changed import statements to separate type imports from regular imports for better clarity and organization. - This refactor enhances code readability and maintains consistency in the import structure. * fix: 修复 chunk 服务与 async router 的循环依赖 - 将 createAsyncCaller 的静态导入改为动态导入 (await import) - 打破 file.ts -> chunk/index.ts -> async/index.ts 的循环依赖链 - 使用 --skip-dynamic-imports 参数的 dpdm 验证循环依赖已解决 * 🐛 fix: resolve CI failures * test: 补充 apiKey、KeyVaultsEncrypt、ChunkService 单测至 100% 覆盖率 - test(database): 补充 apiKey.ts query() 解密失败分支测试 - test(server): 补充 KeyVaultsEncrypt 非法密钥/密文格式 getUserKeyVaults 测试 - test(server): 新增 ChunkService 完整测试覆盖异步任务创建/触发/失败回写 所有新增测试通过 (46/46),目标文件覆盖率均达 100%
2026-03-09 17:00:36 +00:00
"@lobechat/openapi": "workspace:*",
"@lobechat/prompts": "workspace:*",
"@lobechat/python-interpreter": "workspace:*",
"@lobechat/ssrf-safe-fetch": "workspace:*",
"@lobechat/utils": "workspace:*",
"@lobechat/web-crawler": "workspace:*",
"@lobehub/analytics": "^1.6.0",
"@lobehub/charts": "^5.0.0",
2024-07-07 06:01:50 +00:00
"@lobehub/chat-plugin-sdk": "^1.32.4",
"@lobehub/chat-plugins-gateway": "^1.9.0",
♻️ refactor(electron-main): client ipc decorate (#10679) * refactor: client ipc * refactor: server ipc refactor: update IPC method names for consistency Signed-off-by: Innei <tukon479@gmail.com> fix: cast IPC return type to DesktopIpcServices for type safety Signed-off-by: Innei <tukon479@gmail.com> chore: add new workspace for desktop application in package.json Signed-off-by: Innei <tukon479@gmail.com> fix: export FileMetadata interface for improved accessibility Signed-off-by: Innei <tukon479@gmail.com> refactor: unify IPC mocking across test files for consistency Signed-off-by: Innei <tukon479@gmail.com> feat: enhance type-safe IPC flow with context propagation and service registry - Introduced `getIpcContext()` and `runWithIpcContext()` for improved context management in IPC handlers. - Updated `BrowserWindowsCtr` methods to utilize the new context handling. - Added `McpInstallCtr` to the IPC constructors registry. - Enhanced README with details on the new type-safe IPC features. Signed-off-by: Innei <tukon479@gmail.com> refactor: enhance IPC method registration for improved type safety - Updated `registerMethod` in `IpcHandler` and `IpcService` to accept variable argument types, enhancing flexibility in method signatures. - Simplified the `ExtractMethodSignature` type to support multiple arguments. Signed-off-by: Innei <tukon479@gmail.com> chore: add global type definitions and refactor import statements - Introduced a new global type definition file to support Vite client imports. - Refactored import statements in `App.ts` and `App.test.ts` to remove unnecessary type casting for `import.meta.glob`, improving code clarity. Signed-off-by: Innei <tukon479@gmail.com> * refactor: make groupName in BrowserWindowsCtr readonly for better encapsulation Signed-off-by: Innei <tukon479@gmail.com> * refactor: update IPC method registration and usage for improved type safety and consistency - Replaced `@ipcClientEvent` with `@IpcMethod()` in various controllers to standardize IPC method definitions. - Enhanced the usage of `ensureElectronIpc()` for type-safe IPC calls in service layers. - Updated `BrowserWindowsCtr` and `NotificationCtr` to utilize the new IPC method structure, improving encapsulation and clarity. - Refactored service methods to eliminate manual string concatenation for IPC event names, ensuring better maintainability. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
2025-12-09 07:01:18 +00:00
"@lobehub/desktop-ipc-typings": "workspace:*",
✨ feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) * ✨ feat(onboarding): add agent-guided web onboarding flow Made-with: Cursor * Update onboarding prompts Co-authored-by: Codex <noreply@openai.com> * 🐛 fix web onboarding builtin tool flow * ✨ feat(onboarding): enhance agent onboarding flow with new dimensions and refined rules - Updated onboarding structure to include new nodes: agentIdentity, userIdentity, workStyle, workContext, and painPoints. - Revised system role instructions to emphasize a conversational approach and concise interactions. - Adjusted manifest and type definitions to reflect the new onboarding schema. - Implemented tests to ensure proper functionality of the onboarding context and flow. This update aims to improve user experience during onboarding by making it more engaging and structured. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance onboarding experience with localized welcome messages and interaction hints - Added localized welcome messages for onboarding in English and Chinese. - Refactored system role handling to support dynamic interaction hints based on user locale. - Updated onboarding context to include interaction hints for improved user engagement. - Implemented tests to validate the new interaction hint functionality. This update aims to create a more personalized and engaging onboarding experience for users across different languages. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): overhaul onboarding flow with new question structure and refined interaction rules - Replaced existing interaction hints with a focused question structure to enhance user engagement. - Updated system role instructions to clarify onboarding protocols and improve conversational flow. - Refactored type definitions and manifest to align with the new onboarding schema. - Removed deprecated interaction hint components and tests to streamline the codebase. This update aims to create a more structured and engaging onboarding experience for users, ensuring clarity and efficiency in interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): introduce builtin agent onboarding package with structured roles and prompts - Added a new package for agent onboarding, including a package.json configuration and initial TypeScript files. - Implemented system role templates and tool prompts to guide the onboarding process. - Established a client interface for rendering questions and handling user interactions. - Updated dependencies in related packages to integrate the new onboarding functionality. This update aims to enhance the onboarding experience by providing a structured approach for agents, ensuring clarity and efficiency in user interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance agent onboarding with new question renderer and refined interaction logic - Introduced a new `QuestionRendererView` component to streamline the rendering of onboarding questions. - Refactored the `QuestionRenderer` to utilize a runtime hook for improved state management and separation of concerns. - Updated the onboarding context to fallback to stored questions when the current question is empty, enhancing user experience. - Simplified the onboarding API by removing unnecessary read token requirements from various endpoints. - Added tests to validate the new question rendering logic and ensure proper functionality. This update aims to create a more efficient and user-friendly onboarding experience by improving the question handling and rendering process. Signed-off-by: Innei <tukon479@gmail.com> * Add dev history view for onboarding * remove: prosetting Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): inline response language step in agent conversation - Add ResponseLanguageInlineStep and wire into Conversation flow - Extend agent onboarding context and update ResponseLanguageStep route - Add tests and onboarding agent document design spec Made-with: Cursor * ✨ feat(onboarding): enhance onboarding flow with inbox integration and schema refactor - Updated onboarding process to migrate conversation topics to the inbox upon completion, ensuring users can revisit their onboarding discussions. - Introduced a new schema-driven normalizer and node handler registry to streamline onboarding data handling, reducing code duplication and improving maintainability. - Added comprehensive tests for new document builders and onboarding service methods to ensure functionality and reliability. - Refactored existing components to support the new onboarding structure and improve user experience. This update aims to create a more cohesive onboarding experience by integrating user identity data into the inbox and simplifying the underlying code structure. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(agent-documents): add listDocuments, readDocumentByFilename, upsertDocumentByFilename APIs * ✨ feat(onboarding): add generic user interaction builtin tool * ✨ feat(onboarding): wire generic tool interaction semantics Register user-interaction tool in builtin-tools registry with manifest, intervention components, client executor, and server runtime. Extend BuiltinInterventionProps with interactionMode and onInteractionAction to support custom (non-approval) interaction UIs. Add submit/skip/cancel actions to conversation store with full operation lifecycle management. * 🔧 fix: add builtin-tool-user-interaction to root workspace dependencies * ♻️ refactor(onboarding): remove onboarding-owned question persistence Drop askUserQuestion from the web-onboarding tool and remove questionSurface from persisted state. Question presentation is now delegated to the generic lobe-user-interaction tool. * ♻️ refactor(onboarding): switch UI to generic interaction tool Enable UserInteraction and AgentDocuments tools in web-onboarding and inbox agent configs. Remove obsolete inline question renderers (QuestionRenderer, QuestionRendererView, questionRendererRuntime, questionRendererSchema, ResponseLanguageInlineStep) and simplify Conversation component to only render summary CTA. * 🔥 refactor(onboarding): remove identity doc and rewrite soul sync * 🐛 fix(user-interaction): add humanIntervention to manifest and implement form UI * 🐛 fix(onboarding): create user message on interaction submit instead of re-executing tool * ♻️ refactor(onboarding): rebuild generic interaction flow Align agent/tool roles and onboarding UI/runtime around the generic interaction rebuild. Made-with: Cursor * ✨ feat(onboarding): implement onboarding document and persona management Introduce a new onboarding document structure that separates agent identity and user persona data. Replace existing `readSoulDocument` and `updateSoulDocument` APIs with `readDocument` and `updateDocument` to handle both SOUL.md and user persona documents. Update related services, client executors, and localization keys to reflect these changes. Ensure document updates are driven by the agent, allowing for incremental updates and improved content management. Signed-off-by: Innei <tukon479@gmail.com> * refactor Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(workflow): introduce unified tool call collapse UI and supporting components Add a new workflow collapse feature that groups tool calls and reasoning into a single collapsible unit, enhancing the user interface for tool call progress. This includes the creation of several components: `WorkflowCollapse`, `WorkflowSummary`, `WorkflowExpandedList`, `WorkflowToolLine`, and `WorkflowReasoningLine`. Update the design specifications and implementation plans to reflect this new structure, aiming for a more cohesive and user-friendly experience. Signed-off-by: Innei <tukon479@gmail.com> * feat(types): add discovery pacing types and constant * feat(onboarding): add countTopicUserMessages and pacing gate to derivePhase * feat(onboarding): capture discovery baseline and return pacing data in getState * ✨ feat(onboarding): add pacing hints to discovery phase tool result * test(onboarding): add discovery pacing gate tests * ♻️ refactor(onboarding): soften discovery pacing gate and add early exit exception - MIN_DISCOVERY_USER_MESSAGES lowered from 4 to 2 (hard floor) - RECOMMENDED_DISCOVERY_USER_MESSAGES = 4 (advisory hint) - Tool protocol rule 2 now has explicit early exit exception - Pacing hint text changed from imperative to advisory * ✨ feat(onboarding): update .gitignore and remove outdated onboarding plans - Added `docs/superpowers` to .gitignore to exclude documentation files from version control. - Deleted several outdated onboarding implementation plans, including those for onboarding inbox integration, generic interaction rebuild, and user question simplification, to streamline project documentation. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): refine agent onboarding, streaming, and AskUserQuestion Made-with: Cursor * ✨ feat(store): add pending interventions selector * 🐛 fix(store): handle standalone tool messages and structural children traversal in pending interventions selector * ✨ feat(conversation): create InterventionBar component Add InterventionBar UI component with tab bar for multiple pending interventions, reusing the existing Intervention detail component. * 🐛 fix(conversation): use stable toolCallId for active tab state and add min-height: 0 Track active intervention by toolCallId instead of array index to prevent stale selection when interventions are resolved. Add min-height: 0 to scrollable content for correct overflow in flex column layout. * feat(chatinput): show InterventionBar when pending interventions exist * feat(tool): collapse inline intervention to one-line summary with scroll-to-bottom * feat(i18n): add intervention bar translation keys * 🐛 fix(chatinput): prevent infinite render loop from pendingInterventions selector * 🐛 fix(chatinput): use equality function for pendingInterventions to break render loop * refactor(tool): remove CollapsedIntervention, return null for pending inline * feat(i18n): add form.other translation key * feat(tool): add styles for select field with Other option * feat(tool): add SelectFieldInput with Other option row * feat(tool): wire SelectFieldInput and update validation in AskUserQuestion * fix(tool): add keyboard handler to Other row, fix label flex * refactor(tool): restore Select dropdown, add Other toggle row below * refactor(tool): change Other to form-level escape hatch, restore antd Select * refactor(tool): replace checkbox toggle with minimal text link escape hatch * feat(tool): use lucide icons, auto-focus on escape toggle, createStaticStyles * refactor(onboarding): update onboarding model references and improve styling in ModeSwitch component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): add greeting entry animation keyframes and card styles * ✨ feat(onboarding): add LogoThree and entry animations to greeting card * ✨ feat(onboarding): add View Transition morph from greeting to conversation * refactor(onboarding): simplify ModeSwitch component by removing segmentedGlass styling Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): increase maximum onboarding steps to 5 and add ProSettingsStep component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance user interaction question handling with validation schema - Introduced Zod validation for askUserQuestion arguments to ensure correct structure. - Updated test to reflect new question format with fields. - Added error handling in AskUserQuestion component to log submission errors. This improves the robustness of user interactions by enforcing schema validation and enhancing error reporting. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance agent metadata handling and onboarding synchronization - Updated `useAgentMeta` to prioritize custom titles from the database, falling back to the default Lobe AI title if none exists. - Integrated `refreshBuiltinAgent` into the onboarding process to ensure the latest agent data is reflected during user interactions. - Adjusted the `InboxItem` component to display the correct agent title and avatar based on the updated metadata. - Refactored optimistic update actions to improve message handling and synchronization across components. This improves the user experience by ensuring that the most relevant agent information is displayed and updated in real-time during onboarding and conversation flows. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance conversation lifecycle and onboarding agent synchronization - Updated `ConversationLifecycleActionImpl` to include additional context parameters (agentId, groupId, threadId, topicId) when updating message plugins for aborted interactions. - Integrated `refreshBuiltinAgent` for the inbox during the onboarding process to ensure the latest agent data is synchronized. These changes improve the handling of conversation lifecycle events and ensure that onboarding reflects the most current agent information, enhancing user experience during interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: implement agent onboarding feature toggle and enhance ModeSwitch component - Introduced `AGENT_ONBOARDING_ENABLED` configuration to control the visibility of the agent onboarding options. - Updated `ModeSwitch` component to conditionally render onboarding options based on the feature toggle. - Enhanced tests for `ModeSwitch` to cover scenarios for both enabled and disabled states of agent onboarding. - Refactored `AgentOnboardingRoute` to navigate to the classic onboarding if the agent onboarding feature is disabled. These changes improve the onboarding experience by allowing dynamic control over the agent onboarding feature, ensuring that users only see relevant options based on the configuration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: update agent onboarding feature toggle to include development mode - Modified `AGENT_ONBOARDING_ENABLED` to also activate in development mode using `isDev`. - This change allows for easier testing and development of the agent onboarding feature without needing to alter production configurations. Signed-off-by: Innei <tukon479@gmail.com> * Prevent welcome message when onboard * 🐛 fix: satisfy ToolExecutionContext and updateMessageTools typings Made-with: Cursor * 🐛 fix: update tests for custom builtin agent title and discovery phase constants * 🐛 fix: use custom inbox agent title and avatar in InboxWelcome * 🧹 chore(onboarding): remove HistoryPanel unit test Made-with: Cursor * 🐛 fix: add missing onboarding/agent and onboarding/classic routes to desktop config * ✅ test: fix failing tests for onboarding container, document helpers, and executor * ✅ test: mock LogoThree to prevent Spline runtime fetch errors in CI --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Codex <noreply@openai.com>
2026-03-30 12:28:54 +00:00
"@lobehub/editor": "^4.5.0",
"@lobehub/icons": "^5.0.0",
"@lobehub/market-sdk": "0.31.11",
"@lobehub/tts": "^5.1.2",
✨ feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) * ✨ feat(onboarding): add agent-guided web onboarding flow Made-with: Cursor * Update onboarding prompts Co-authored-by: Codex <noreply@openai.com> * 🐛 fix web onboarding builtin tool flow * ✨ feat(onboarding): enhance agent onboarding flow with new dimensions and refined rules - Updated onboarding structure to include new nodes: agentIdentity, userIdentity, workStyle, workContext, and painPoints. - Revised system role instructions to emphasize a conversational approach and concise interactions. - Adjusted manifest and type definitions to reflect the new onboarding schema. - Implemented tests to ensure proper functionality of the onboarding context and flow. This update aims to improve user experience during onboarding by making it more engaging and structured. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance onboarding experience with localized welcome messages and interaction hints - Added localized welcome messages for onboarding in English and Chinese. - Refactored system role handling to support dynamic interaction hints based on user locale. - Updated onboarding context to include interaction hints for improved user engagement. - Implemented tests to validate the new interaction hint functionality. This update aims to create a more personalized and engaging onboarding experience for users across different languages. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): overhaul onboarding flow with new question structure and refined interaction rules - Replaced existing interaction hints with a focused question structure to enhance user engagement. - Updated system role instructions to clarify onboarding protocols and improve conversational flow. - Refactored type definitions and manifest to align with the new onboarding schema. - Removed deprecated interaction hint components and tests to streamline the codebase. This update aims to create a more structured and engaging onboarding experience for users, ensuring clarity and efficiency in interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): introduce builtin agent onboarding package with structured roles and prompts - Added a new package for agent onboarding, including a package.json configuration and initial TypeScript files. - Implemented system role templates and tool prompts to guide the onboarding process. - Established a client interface for rendering questions and handling user interactions. - Updated dependencies in related packages to integrate the new onboarding functionality. This update aims to enhance the onboarding experience by providing a structured approach for agents, ensuring clarity and efficiency in user interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): enhance agent onboarding with new question renderer and refined interaction logic - Introduced a new `QuestionRendererView` component to streamline the rendering of onboarding questions. - Refactored the `QuestionRenderer` to utilize a runtime hook for improved state management and separation of concerns. - Updated the onboarding context to fallback to stored questions when the current question is empty, enhancing user experience. - Simplified the onboarding API by removing unnecessary read token requirements from various endpoints. - Added tests to validate the new question rendering logic and ensure proper functionality. This update aims to create a more efficient and user-friendly onboarding experience by improving the question handling and rendering process. Signed-off-by: Innei <tukon479@gmail.com> * Add dev history view for onboarding * remove: prosetting Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): inline response language step in agent conversation - Add ResponseLanguageInlineStep and wire into Conversation flow - Extend agent onboarding context and update ResponseLanguageStep route - Add tests and onboarding agent document design spec Made-with: Cursor * ✨ feat(onboarding): enhance onboarding flow with inbox integration and schema refactor - Updated onboarding process to migrate conversation topics to the inbox upon completion, ensuring users can revisit their onboarding discussions. - Introduced a new schema-driven normalizer and node handler registry to streamline onboarding data handling, reducing code duplication and improving maintainability. - Added comprehensive tests for new document builders and onboarding service methods to ensure functionality and reliability. - Refactored existing components to support the new onboarding structure and improve user experience. This update aims to create a more cohesive onboarding experience by integrating user identity data into the inbox and simplifying the underlying code structure. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(agent-documents): add listDocuments, readDocumentByFilename, upsertDocumentByFilename APIs * ✨ feat(onboarding): add generic user interaction builtin tool * ✨ feat(onboarding): wire generic tool interaction semantics Register user-interaction tool in builtin-tools registry with manifest, intervention components, client executor, and server runtime. Extend BuiltinInterventionProps with interactionMode and onInteractionAction to support custom (non-approval) interaction UIs. Add submit/skip/cancel actions to conversation store with full operation lifecycle management. * 🔧 fix: add builtin-tool-user-interaction to root workspace dependencies * ♻️ refactor(onboarding): remove onboarding-owned question persistence Drop askUserQuestion from the web-onboarding tool and remove questionSurface from persisted state. Question presentation is now delegated to the generic lobe-user-interaction tool. * ♻️ refactor(onboarding): switch UI to generic interaction tool Enable UserInteraction and AgentDocuments tools in web-onboarding and inbox agent configs. Remove obsolete inline question renderers (QuestionRenderer, QuestionRendererView, questionRendererRuntime, questionRendererSchema, ResponseLanguageInlineStep) and simplify Conversation component to only render summary CTA. * 🔥 refactor(onboarding): remove identity doc and rewrite soul sync * 🐛 fix(user-interaction): add humanIntervention to manifest and implement form UI * 🐛 fix(onboarding): create user message on interaction submit instead of re-executing tool * ♻️ refactor(onboarding): rebuild generic interaction flow Align agent/tool roles and onboarding UI/runtime around the generic interaction rebuild. Made-with: Cursor * ✨ feat(onboarding): implement onboarding document and persona management Introduce a new onboarding document structure that separates agent identity and user persona data. Replace existing `readSoulDocument` and `updateSoulDocument` APIs with `readDocument` and `updateDocument` to handle both SOUL.md and user persona documents. Update related services, client executors, and localization keys to reflect these changes. Ensure document updates are driven by the agent, allowing for incremental updates and improved content management. Signed-off-by: Innei <tukon479@gmail.com> * refactor Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(workflow): introduce unified tool call collapse UI and supporting components Add a new workflow collapse feature that groups tool calls and reasoning into a single collapsible unit, enhancing the user interface for tool call progress. This includes the creation of several components: `WorkflowCollapse`, `WorkflowSummary`, `WorkflowExpandedList`, `WorkflowToolLine`, and `WorkflowReasoningLine`. Update the design specifications and implementation plans to reflect this new structure, aiming for a more cohesive and user-friendly experience. Signed-off-by: Innei <tukon479@gmail.com> * feat(types): add discovery pacing types and constant * feat(onboarding): add countTopicUserMessages and pacing gate to derivePhase * feat(onboarding): capture discovery baseline and return pacing data in getState * ✨ feat(onboarding): add pacing hints to discovery phase tool result * test(onboarding): add discovery pacing gate tests * ♻️ refactor(onboarding): soften discovery pacing gate and add early exit exception - MIN_DISCOVERY_USER_MESSAGES lowered from 4 to 2 (hard floor) - RECOMMENDED_DISCOVERY_USER_MESSAGES = 4 (advisory hint) - Tool protocol rule 2 now has explicit early exit exception - Pacing hint text changed from imperative to advisory * ✨ feat(onboarding): update .gitignore and remove outdated onboarding plans - Added `docs/superpowers` to .gitignore to exclude documentation files from version control. - Deleted several outdated onboarding implementation plans, including those for onboarding inbox integration, generic interaction rebuild, and user question simplification, to streamline project documentation. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): refine agent onboarding, streaming, and AskUserQuestion Made-with: Cursor * ✨ feat(store): add pending interventions selector * 🐛 fix(store): handle standalone tool messages and structural children traversal in pending interventions selector * ✨ feat(conversation): create InterventionBar component Add InterventionBar UI component with tab bar for multiple pending interventions, reusing the existing Intervention detail component. * 🐛 fix(conversation): use stable toolCallId for active tab state and add min-height: 0 Track active intervention by toolCallId instead of array index to prevent stale selection when interventions are resolved. Add min-height: 0 to scrollable content for correct overflow in flex column layout. * feat(chatinput): show InterventionBar when pending interventions exist * feat(tool): collapse inline intervention to one-line summary with scroll-to-bottom * feat(i18n): add intervention bar translation keys * 🐛 fix(chatinput): prevent infinite render loop from pendingInterventions selector * 🐛 fix(chatinput): use equality function for pendingInterventions to break render loop * refactor(tool): remove CollapsedIntervention, return null for pending inline * feat(i18n): add form.other translation key * feat(tool): add styles for select field with Other option * feat(tool): add SelectFieldInput with Other option row * feat(tool): wire SelectFieldInput and update validation in AskUserQuestion * fix(tool): add keyboard handler to Other row, fix label flex * refactor(tool): restore Select dropdown, add Other toggle row below * refactor(tool): change Other to form-level escape hatch, restore antd Select * refactor(tool): replace checkbox toggle with minimal text link escape hatch * feat(tool): use lucide icons, auto-focus on escape toggle, createStaticStyles * refactor(onboarding): update onboarding model references and improve styling in ModeSwitch component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): add greeting entry animation keyframes and card styles * ✨ feat(onboarding): add LogoThree and entry animations to greeting card * ✨ feat(onboarding): add View Transition morph from greeting to conversation * refactor(onboarding): simplify ModeSwitch component by removing segmentedGlass styling Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(onboarding): increase maximum onboarding steps to 5 and add ProSettingsStep component Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance user interaction question handling with validation schema - Introduced Zod validation for askUserQuestion arguments to ensure correct structure. - Updated test to reflect new question format with fields. - Added error handling in AskUserQuestion component to log submission errors. This improves the robustness of user interactions by enforcing schema validation and enhancing error reporting. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance agent metadata handling and onboarding synchronization - Updated `useAgentMeta` to prioritize custom titles from the database, falling back to the default Lobe AI title if none exists. - Integrated `refreshBuiltinAgent` into the onboarding process to ensure the latest agent data is reflected during user interactions. - Adjusted the `InboxItem` component to display the correct agent title and avatar based on the updated metadata. - Refactored optimistic update actions to improve message handling and synchronization across components. This improves the user experience by ensuring that the most relevant agent information is displayed and updated in real-time during onboarding and conversation flows. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance conversation lifecycle and onboarding agent synchronization - Updated `ConversationLifecycleActionImpl` to include additional context parameters (agentId, groupId, threadId, topicId) when updating message plugins for aborted interactions. - Integrated `refreshBuiltinAgent` for the inbox during the onboarding process to ensure the latest agent data is synchronized. These changes improve the handling of conversation lifecycle events and ensure that onboarding reflects the most current agent information, enhancing user experience during interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: implement agent onboarding feature toggle and enhance ModeSwitch component - Introduced `AGENT_ONBOARDING_ENABLED` configuration to control the visibility of the agent onboarding options. - Updated `ModeSwitch` component to conditionally render onboarding options based on the feature toggle. - Enhanced tests for `ModeSwitch` to cover scenarios for both enabled and disabled states of agent onboarding. - Refactored `AgentOnboardingRoute` to navigate to the classic onboarding if the agent onboarding feature is disabled. These changes improve the onboarding experience by allowing dynamic control over the agent onboarding feature, ensuring that users only see relevant options based on the configuration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: update agent onboarding feature toggle to include development mode - Modified `AGENT_ONBOARDING_ENABLED` to also activate in development mode using `isDev`. - This change allows for easier testing and development of the agent onboarding feature without needing to alter production configurations. Signed-off-by: Innei <tukon479@gmail.com> * Prevent welcome message when onboard * 🐛 fix: satisfy ToolExecutionContext and updateMessageTools typings Made-with: Cursor * 🐛 fix: update tests for custom builtin agent title and discovery phase constants * 🐛 fix: use custom inbox agent title and avatar in InboxWelcome * 🧹 chore(onboarding): remove HistoryPanel unit test Made-with: Cursor * 🐛 fix: add missing onboarding/agent and onboarding/classic routes to desktop config * ✅ test: fix failing tests for onboarding container, document helpers, and executor * ✅ test: mock LogoThree to prevent Spline runtime fetch errors in CI --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Codex <noreply@openai.com>
2026-03-30 12:28:54 +00:00
"@lobehub/ui": "^5.6.1",
"@modelcontextprotocol/sdk": "^1.26.0",
🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x (#11686) * 🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x Resolves: LOBE-2658 - Upgrade pdfjs-dist from 4.x to 5.4.530 - Upgrade react-pdf from 9.x to 10.3.0 - Fix PDF worker loading using import.meta.url pattern - Add @napi-rs/canvas dependency for react-pdf renderer - Fix typo: ResouceManagerMode → ResourceManagerMode - Clean up meaningless comments in ListItem component - Simplify next config by removing unused isDesktop logic * chore: update claude Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(pdf): update PDF version in snapshots to 5.4.530 - Updated pdfVersion in PDF loader snapshots to reflect the new version 5.4.530. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(file-loaders): implement lazy loading for file loaders - Refactored file loader imports to use dynamic loading, improving performance by preventing heavy dependencies from being loaded until needed. - Introduced `getFileLoader` function to manage loader retrieval based on file type. - Updated logging and fallback mechanisms for unsupported file types. This change enhances the efficiency of file loading operations. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(config): enhance next configuration for improved package handling - Updated `nextConfig` to include `@napi-rs/canvas` and `pdfjs-dist` in `serverExternalPackages` to address bundling issues with Turbopack. - Removed unused `isDesktop` logic and simplified the configuration structure. - Adjusted `transpilePackages` to exclude `pdfjs-dist`, reflecting recent upgrades. This change optimizes the configuration for better compatibility and performance. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use CDN pdfjs worker --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-23 07:20:34 +00:00
"@napi-rs/canvas": "^0.1.88",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"@neondatabase/serverless": "^1.0.2",
"@next/third-parties": "^16.1.5",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"@opentelemetry/auto-instrumentations-node": "^0.67.0",
"@opentelemetry/exporter-jaeger": "^2.5.0",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"@opentelemetry/resources": "^2.2.0",
"@opentelemetry/sdk-metrics": "^2.2.0",
"@opentelemetry/winston-transport": "^0.19.0",
🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x (#11686) * 🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x Resolves: LOBE-2658 - Upgrade pdfjs-dist from 4.x to 5.4.530 - Upgrade react-pdf from 9.x to 10.3.0 - Fix PDF worker loading using import.meta.url pattern - Add @napi-rs/canvas dependency for react-pdf renderer - Fix typo: ResouceManagerMode → ResourceManagerMode - Clean up meaningless comments in ListItem component - Simplify next config by removing unused isDesktop logic * chore: update claude Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(pdf): update PDF version in snapshots to 5.4.530 - Updated pdfVersion in PDF loader snapshots to reflect the new version 5.4.530. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(file-loaders): implement lazy loading for file loaders - Refactored file loader imports to use dynamic loading, improving performance by preventing heavy dependencies from being loaded until needed. - Introduced `getFileLoader` function to manage loader retrieval based on file type. - Updated logging and fallback mechanisms for unsupported file types. This change enhances the efficiency of file loading operations. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(config): enhance next configuration for improved package handling - Updated `nextConfig` to include `@napi-rs/canvas` and `pdfjs-dist` in `serverExternalPackages` to address bundling issues with Turbopack. - Removed unused `isDesktop` logic and simplified the configuration structure. - Adjusted `transpilePackages` to exclude `pdfjs-dist`, reflecting recent upgrades. This change optimizes the configuration for better compatibility and performance. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use CDN pdfjs worker --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-23 07:20:34 +00:00
"@react-pdf/renderer": "^4.3.2",
2025-12-20 12:23:40 +00:00
"@react-three/drei": "^10.7.7",
"@react-three/fiber": "^9.5.0",
"@saintno/comfyui-sdk": "^0.2.49",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"@t3-oss/env-core": "^0.13.10",
2025-12-21 04:34:44 +00:00
"@t3-oss/env-nextjs": "^0.13.10",
"@tanstack/react-query": "^5.90.20",
2025-12-21 04:34:44 +00:00
"@trpc/client": "^11.8.1",
"@trpc/next": "^11.8.1",
"@trpc/react-query": "^11.8.1",
"@trpc/server": "^11.8.1",
2025-12-20 12:23:40 +00:00
"@upstash/qstash": "^2.8.4",
"@upstash/workflow": "^0.2.23",
"@vercel/analytics": "^1.6.1",
"@vercel/edge-config": "^1.4.3",
"@vercel/functions": "^3.3.6",
"@vercel/speed-insights": "^1.3.1",
"@virtuoso.dev/masonry": "^1.4.0",
"@xterm/xterm": "^5.5.0",
"@zumer/snapdom": "^1.9.14",
"ahooks": "^3.9.6",
"antd": "^6.2.1",
refactor: migrate theme management to next-themes (#11112) * refactor: migrate theme management to `next-themes` and remove theme from route variants and global store. Signed-off-by: Innei <tukon479@gmail.com> * refactor: Unify theme mode to 'system' instead of 'auto' and streamline Electron theme synchronization. Signed-off-by: Innei <tukon479@gmail.com> * refactor: Remove LOBE_THEME_APPEARANCE constant and simplify desktop theme source assignment. Signed-off-by: Innei <tukon479@gmail.com> * chore: Update antd-style dependency from npm alias to specific alpha version. Signed-off-by: Innei <tukon479@gmail.com> * chore: update pnpm lockfile Signed-off-by: Innei <tukon479@gmail.com> * feat: Default theme to system and update Next.js RSC payload path example. Signed-off-by: Innei <tukon479@gmail.com> * feat: add `dev:static` script for static renderer development Signed-off-by: Innei <tukon479@gmail.com> * refactor: replace useThemeMode with custom useIsDark hook for theme detection and add ClientOnly component Signed-off-by: Innei <tukon479@gmail.com> * refactor: Remove `extractStaticStyle` import and cache prop from `StyleRegistry`. Signed-off-by: Innei <tukon479@gmail.com> * chore: Remove debug console log for current appearance. Signed-off-by: Innei <tukon479@gmail.com> * fix: Migrate legacy 'auto' theme mode to 'system' and refine theme background CSS selectors. Signed-off-by: Innei <tukon479@gmail.com> * feat: Add window dragging to desktop onboarding layout and update antd-style dependency. * refactor: Refine global background styling to target body elements, remove token-based background, and clean up debugging script. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-05 05:23:43 +00:00
"antd-style": "4.1.0",
"async-retry": "^1.3.3",
"bcryptjs": "^3.0.3",
"better-auth": "1.4.6",
"better-auth-harmony": "^1.2.5",
"better-call": "1.1.8",
"brotli-wasm": "^3.0.1",
"chat": "^4.23.0",
"chroma-js": "^3.2.0",
"class-variance-authority": "^0.7.1",
"cmdk": "^1.1.1",
"cookie": "^1.1.1",
"countries-and-timezones": "^3.8.0",
"d3-dsv": "^3.0.1",
"dayjs": "^1.11.19",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"debug": "^4.4.3",
"dexie": "^3.2.7",
"diff": "^8.0.3",
"discord-api-types": "^0.38.40",
"drizzle-orm": "^0.45.1",
"drizzle-zod": "^0.5.1",
"epub2": "^3.0.2",
"es-toolkit": "^1.44.0",
"fast-deep-equal": "^3.1.3",
"fflate": "^0.8.2",
2026-02-13 15:38:01 +00:00
"ffmpeg-static": "^5.3.0",
"file-type": "^21.3.0",
✨ feat: add slash action tags, topic reference tool, and command bus system (#12860) * ✨ feat: add slash action tags in chat input Made-with: Cursor * ✨ feat: enhance editor with new slash actions and localization updates - Added new slash actions: change tone, condense, expand, polish, rewrite, summarize, and translate. - Updated localization files for English and Chinese to include new action tags and slash commands. - Removed deprecated useSlashItems component and integrated its functionality directly into InputEditor. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add slash placement configuration to chat input components - Introduced `slashPlacement` prop to `ChatInputProvider`, `StoreUpdater`, and `InputEditor` for customizable slash menu positioning. - Updated initial state to include `slashPlacement` with default value 'top'. - Adjusted `ChatInput` and `InputArea` components to utilize the new `slashPlacement` prop. This enhancement allows for better control over the user interface in chat input interactions. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: implement command bus for slash action tags processing Add command bus system to parse and execute slash commands (compact context, new topic). Refactor action tag categories from ai/prompt to command/skill. Add useEnabledSkills hook for dynamic skill registration. * feat: compress command Signed-off-by: Innei <tukon479@gmail.com> * refactor: compress Signed-off-by: Innei <tukon479@gmail.com> * fix: skill inject * ✨ feat: slash action tags with context engine integration Made-with: Cursor * ✨ feat: add topic reference builtin tool and server runtime Made-with: Cursor * ✨ feat: add topic mention items and update ReferTopic integration Made-with: Cursor * 🐛 fix: preserve editorData through assistant-group edit flow and update RichTextMessage reactively - EditState now forwards editorData from EditorModal to modifyMessageContent - modifyMessageContent accepts and passes editorData to updateMessageContent - RichTextMessage uses useEditor + effect to update document on content change instead of key-based remount - Refactored RichTextMessage plugins to use shared createChatInputRichPlugins() * ✨ feat(context-engine): add metadata types and update processors/providers Made-with: Cursor * ✨ feat(chat-input): add slash action tags and restore failed input state * 🔧 chore: update package dependencies and enhance Vite configuration - Changed @lobehub/ui dependency to a specific package URL. - Added multiple SPA entry points and layout files to the Vite warmup configuration. - Removed unused monorepo packages from sharedOptimizeDeps and added various dayjs locales for better localization support. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @lobehub/ui dependency to version 5.4.0 in package.json Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: correct SkillsApiName.runSkill to activateSkill and update trimmed content assertions * 🐛 fix: resolve type errors in context-engine tests and InputEditor slashPlacement * 🐛 fix: update runSkill to activateSkill in conversationLifecycle test * 🐛 fix: avoid regex backtracking in placeholder parser * ✨ feat(localization): add action tags and tooltips for slash commands across multiple languages Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: preserve file attachments when /newTopic has no text content * cleanup Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-03-13 14:17:36 +00:00
"fuse.js": "^7.0.0",
"gray-matter": "^4.0.3",
"html-to-text": "^9.0.5",
"i18next": "^25.8.0",
"i18next-browser-languagedetector": "^8.2.0",
"i18next-resources-to-backend": "^1.2.1",
"immer": "^11.1.3",
"ioredis": "^5.9.2",
2025-12-20 12:23:40 +00:00
"jose": "^6.1.3",
"js-sha256": "^0.11.1",
"jsonl-parse-stringify": "^1.0.3",
"klavis": "^2.15.0",
"langfuse": "^3.38.6",
"langfuse-core": "^3.38.6",
"lexical": "^0.42.0",
2025-12-21 04:34:44 +00:00
"lucide-react": "^0.562.0",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"mammoth": "^1.11.0",
2025-12-21 04:34:44 +00:00
"marked": "^17.0.1",
"mdast-util-to-markdown": "^2.1.2",
"model-bank": "workspace:*",
"motion": "^12.29.0",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"nanoid": "^5.1.6",
"next": "^16.1.5",
"next-mdx-remote": "^6.0.0",
refactor: migrate theme management to next-themes (#11112) * refactor: migrate theme management to `next-themes` and remove theme from route variants and global store. Signed-off-by: Innei <tukon479@gmail.com> * refactor: Unify theme mode to 'system' instead of 'auto' and streamline Electron theme synchronization. Signed-off-by: Innei <tukon479@gmail.com> * refactor: Remove LOBE_THEME_APPEARANCE constant and simplify desktop theme source assignment. Signed-off-by: Innei <tukon479@gmail.com> * chore: Update antd-style dependency from npm alias to specific alpha version. Signed-off-by: Innei <tukon479@gmail.com> * chore: update pnpm lockfile Signed-off-by: Innei <tukon479@gmail.com> * feat: Default theme to system and update Next.js RSC payload path example. Signed-off-by: Innei <tukon479@gmail.com> * feat: add `dev:static` script for static renderer development Signed-off-by: Innei <tukon479@gmail.com> * refactor: replace useThemeMode with custom useIsDark hook for theme detection and add ClientOnly component Signed-off-by: Innei <tukon479@gmail.com> * refactor: Remove `extractStaticStyle` import and cache prop from `StyleRegistry`. Signed-off-by: Innei <tukon479@gmail.com> * chore: Remove debug console log for current appearance. Signed-off-by: Innei <tukon479@gmail.com> * fix: Migrate legacy 'auto' theme mode to 'system' and refine theme background CSS selectors. Signed-off-by: Innei <tukon479@gmail.com> * feat: Add window dragging to desktop onboarding layout and update antd-style dependency. * refactor: Refine global background styling to target body elements, remove token-based background, and clean up debugging script. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-05 05:23:43 +00:00
"next-themes": "^0.4.6",
"nextjs-toploader": "^3.9.17",
✨ feat: Add MCP marketplace and mcp plugin one-click installation in desktop (#8334) * move plugin Component * ✨ feat(wip): Add MCP Discover Market * ✅ test: Fix test * ✅ test: Fix test * 🐛 fix: Fix build * 🐛 fix: Fix build * 💄 style: update plugin store * 💄 style: Update plugin store * ✨ feat: Update cache control headers and optimize Next.js config for performance * 💄 style: Update discover markdown * 💄 style: Update scroes step * 优化 list 细节 * 优化 list 细节 * 优化 list 细节 * 完成基础 mcp 安装实现 * 完成安装上报 * 新增安装过程 * fix * 优化插件设置页面配置 * 💄 style: update official icon * 完善安装错误状态 * 支持取消安装 * fix types * fix types * 完成系统依赖检查流程 * 完成系统依赖安装流程上报 * try to fix suspense * try to fix suspense * try to fix suspense * try to fix tests * upgrade electron * fix suspense * fix tool name issue * fix test * add i18n * fix tool call * ✅ test: fix tests * move * fix tests * refactor plugin install store * improve old plugin install * fix * fix header link * fix plugin detail * fix oldPlugin detail * fix tests * update i18n * fix i18n * 💄 style: improve style * add debug log * fix link * improve * fix link * 🚚 refactor: refactor the market runtime to nodejs * 移除 props.searchParams 调用 * ✅ test: fix tests * 尝试静态化 discover page * ♻️ refactor: refactor config to nodejs runtime * fix min width * 修正自定义插件的编辑展示区域 * fix i18n * 调整部分组件目录结构 * 完善 MCP 市场安装流程 * 完善安装上报事件 * test: fix test * ✨ feat: 实现 m2m oauth 请求 * ✨ feat: 完善 m2m 注册链路 * ✨ feat: 完善 m2m 注册链路 * 🐛 fix: 优化 debug 日志输出问题 * ✨ feat: 支持 call 上报 * 💄 style: 使用更大的版本 * 🐛 fix: tools calling report * 🐛 fix: try to fix call report * 🐛 fix: try to use expires cookies * 🐛 fix: fix cookies expires issue * test: fix customPluginInfo report * 🐛 fix: fix connection issue * 🐛 fix: fix platform report * 🐛 fix: fix version issue --------- Co-authored-by: canisminor1990 <i@canisminor.cc>
2025-07-08 11:51:22 +00:00
"node-machine-id": "^1.1.12",
"nodemailer": "^7.0.13",
"numeral": "^2.0.6",
"nuqs": "^2.8.6",
"officeparser": "5.1.1",
2025-12-20 12:23:40 +00:00
"ogl": "^1.0.11",
"oidc-provider": "^9.6.0",
"ollama": "^0.6.3",
"openai": "^4.104.0",
"openapi-fetch": "^0.14.1",
"partial-json": "^0.1.7",
"path-browserify-esm": "^1.0.6",
2025-12-20 12:23:40 +00:00
"pathe": "^2.0.3",
"pdf-parse": "^1.1.4",
🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x (#11686) * 🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x Resolves: LOBE-2658 - Upgrade pdfjs-dist from 4.x to 5.4.530 - Upgrade react-pdf from 9.x to 10.3.0 - Fix PDF worker loading using import.meta.url pattern - Add @napi-rs/canvas dependency for react-pdf renderer - Fix typo: ResouceManagerMode → ResourceManagerMode - Clean up meaningless comments in ListItem component - Simplify next config by removing unused isDesktop logic * chore: update claude Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(pdf): update PDF version in snapshots to 5.4.530 - Updated pdfVersion in PDF loader snapshots to reflect the new version 5.4.530. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(file-loaders): implement lazy loading for file loaders - Refactored file loader imports to use dynamic loading, improving performance by preventing heavy dependencies from being loaded until needed. - Introduced `getFileLoader` function to manage loader retrieval based on file type. - Updated logging and fallback mechanisms for unsupported file types. This change enhances the efficiency of file loading operations. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(config): enhance next configuration for improved package handling - Updated `nextConfig` to include `@napi-rs/canvas` and `pdfjs-dist` in `serverExternalPackages` to address bundling issues with Turbopack. - Removed unused `isDesktop` logic and simplified the configuration structure. - Adjusted `transpilePackages` to exclude `pdfjs-dist`, reflecting recent upgrades. This change optimizes the configuration for better compatibility and performance. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use CDN pdfjs worker --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-23 07:20:34 +00:00
"pdfjs-dist": "5.4.530",
✨ feat: add PDF export functionality to share modal (#9300) * feat: add PDF export functionality to share modal - Create usePdfExport hook with jsPDF and html2canvas - Add "Export as PDF" button to screenshot tab in share modal - Support multi-page PDFs for long conversations - Add required dependencies: jspdf@^2.5.2 and html2canvas@^1.4.1 - Add localization support for PDF export button Fixes #9299 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: LobeHub Bot <lobehubbot@users.noreply.github.com> * ♻️ refactor: convert PDF export to separate tab with backend generation - Create new SharePdf tab component with PDF.js preview - Move PDF generation from frontend to backend via tRPC - Add server-side PDF generation using jsPDF - Remove old PDF export button from ShareImage component - Add proper loading states and error handling - Update localization for PDF tab Co-authored-by: Shinji-Li <ONLY-yours@users.noreply.github.com> * 🐛 fix: resolve unicorn/no-await-expression-member lint error in PDF exporter Split await expression member access to avoid linting error in exporter.ts Co-authored-by: Shinji-Li <ONLY-yours@users.noreply.github.com> * feat: add i18n * feat: use pdfkit to export a pdf * feat: add fullscreen preview * feat: update pdf preview styles * feat: add i18n locales * feat: add single pdf share modal * feat: update css & client mode cant use pdf genertate * fix: mobile style fixed * fix: delete console.log & useless packagejson * feat: use online otf link --------- Co-authored-by: Shinji-Li <ONLY-yours@users.noreply.github.com>
2025-10-21 08:32:17 +00:00
"pdfkit": "^0.17.2",
"pg": "^8.17.2",
"plaiceholder": "^3.0.0",
"polished": "^4.3.1",
"posthog-js": "~1.278.0",
"pure-rand": "^7.0.1",
"pwa-install-handler": "^2.6.3",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"query-string": "^9.3.1",
"random-words": "^2.0.1",
"rc-util": "^5.44.4",
"react": "^19.2.3",
"react-confetti": "^6.4.0",
"react-dom": "^19.2.3",
"react-fast-marquee": "^1.6.5",
"react-hotkeys-hook": "^5.2.3",
"react-i18next": "^16.5.3",
"react-lazy-load": "^4.0.1",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"react-markdown": "^10.1.0",
🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x (#11686) * 🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x Resolves: LOBE-2658 - Upgrade pdfjs-dist from 4.x to 5.4.530 - Upgrade react-pdf from 9.x to 10.3.0 - Fix PDF worker loading using import.meta.url pattern - Add @napi-rs/canvas dependency for react-pdf renderer - Fix typo: ResouceManagerMode → ResourceManagerMode - Clean up meaningless comments in ListItem component - Simplify next config by removing unused isDesktop logic * chore: update claude Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(pdf): update PDF version in snapshots to 5.4.530 - Updated pdfVersion in PDF loader snapshots to reflect the new version 5.4.530. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(file-loaders): implement lazy loading for file loaders - Refactored file loader imports to use dynamic loading, improving performance by preventing heavy dependencies from being loaded until needed. - Introduced `getFileLoader` function to manage loader retrieval based on file type. - Updated logging and fallback mechanisms for unsupported file types. This change enhances the efficiency of file loading operations. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(config): enhance next configuration for improved package handling - Updated `nextConfig` to include `@napi-rs/canvas` and `pdfjs-dist` in `serverExternalPackages` to address bundling issues with Turbopack. - Removed unused `isDesktop` logic and simplified the configuration structure. - Adjusted `transpilePackages` to exclude `pdfjs-dist`, reflecting recent upgrades. This change optimizes the configuration for better compatibility and performance. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use CDN pdfjs worker --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-01-23 07:20:34 +00:00
"react-pdf": "^10.3.0",
"react-responsive": "^10.0.1",
"react-rnd": "^10.5.2",
"react-router-dom": "^7.13.0",
✨ feat(agent-browser): add browser automation skill and tool detection (#12858) * ✨ feat(tool-detectors): add browser automation support and refactor tool detector categories - Introduced browser automation detectors to the tool detector manager. - Updated tool categories to include 'browser-automation'. - Refactored imports to use type imports where applicable for better clarity. - Cleaned up unnecessary comments in tool filters. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: add browser automation tool detection UI * 🔧 chore: update react-scan version and enhance agent-browser documentation - Updated `react-scan` dependency from version 0.4.3 to 0.5.3 in package.json. - Improved documentation in `content.ts` for the agent-browser, clarifying command usage and workflows. - Added development mode flag `__DEV__` in sharedRendererConfig for better environment handling. - Integrated `scan` functionality in `initialize.ts` to enable scanning in development mode. - Updated global type definitions to include `__DEV__` constant for clarity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore(builtin-skills): add dependency and refactor skill filtering logic - Added `@lobechat/const` as a dependency in package.json. - Introduced a new function `shouldEnableBuiltinSkill` to determine if a skill should be enabled based on the environment. - Refactored the `builtinSkills` export to filter skills using the new logic. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore(builtin-skills): refactor skill management and add filtering logic - Removed unnecessary dependency from package.json. - Simplified skill filtering logic by introducing `filterBuiltinSkills` and `shouldEnableBuiltinSkill` functions. - Updated various components to utilize the new filtering logic for managing builtin skills based on the environment. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(builtin-skills): introduce new skill APIs and refactor manifest structure - Added new APIs for skill management: `runSkillApi`, `readReferenceApi`, and `exportFileApi` to enhance functionality. - Created a base manifest file (`manifest.base.ts`) to centralize API definitions. - Updated the desktop manifest (`manifest.desktop.ts`) to utilize the new base APIs. - Refactored existing manifest to streamline API integration and improve maintainability. - Introduced a detailed system prompt for better user guidance on skill usage. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: desktop skill runtime, skill store inspectors, and tool UI updates Made-with: Cursor * ✨ feat: enhance skill import functionality and testing - Updated `importFromUrl` method in `SkillImporter` to accept additional options for identifier and source. - Modified `importFromMarket` in `agentSkillsRouter` to utilize the new options for better tracking of skill imports. - Added integration tests to ensure stable behavior when re-importing skills from the market, verifying that identifiers remain consistent across imports. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update .gitignore and package.json dependencies - Added 'bin' to .gitignore to exclude binary files from version control. - Included 'fflate' as a new dependency in package.json to support file compression in the application. - Updated writeFile method in LocalFileCtr to handle file content as Uint8Array for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update package.json dependencies - Removed 'fflate' from dependencies and added it to devDependencies for better organization. - Ensured proper formatting by adding a newline at the end of the file. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add agent-browser download script and integrate binary handling - Introduced a new script to download the `agent-browser` binary, ensuring it is available for the application. - Updated `electron-builder.mjs` to include the binary in the build process. - Modified `dir.ts` to define the binary directory path based on the packaging state. - Enhanced the `App` class to set environment variables for the agent-browser integration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add DevTools toggle to Linux and Windows menus - Introduced a new menu item for toggling DevTools with the F12 accelerator key in both Linux and Windows menu implementations. - Added a separator for better organization of the view submenu items. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: integrate agent-browser binary download into build process - Added functionality to download the `agent-browser` binary during the build process in `electron-builder.mjs`. - Enhanced the download script with detailed logging for better visibility of the download status and errors. - Updated the `App` class to log the binary directory path for improved debugging. - Reintroduced the `AuthRequiredModal` in the layout for desktop users. Signed-off-by: Innei <tukon479@gmail.com> * fix: mock binary directory path in tests - Added a mock for the binary directory path in the App tests to facilitate testing of the agent-browser integration. - This change enhances the test environment by providing a consistent path for the binary during test execution. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: improve authorization notification handling - Updated the `notifyAuthorizationRequired` method to implement trailing-edge debounce, ensuring that rapid 401 responses are coalesced and the IPC event is sent after the burst settles. - Refactored the notification logic to enhance clarity and maintainability. ✨ feat: add desktop onboarding redirect - Introduced a `useEffect` hook in `StoreInitialization` to redirect users to the `/desktop-onboarding` page if onboarding is not completed, ensuring a smoother user experience on fresh installs. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(desktop): hide Agent Browser skill on Windows Made-with: Cursor * 🔧 chore: update memory limits for build processes - Increased the `NODE_OPTIONS` memory limit for both `build:next` and `build:spa` scripts from 6144 to 7168, optimizing build performance and resource management. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
2026-03-10 08:13:33 +00:00
"react-scan": "^0.5.3",
"react-virtuoso": "^4.18.1",
2024-05-26 10:37:19 +00:00
"react-wrap-balancer": "^1.1.1",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
"remark-html": "^16.0.1",
"remove-markdown": "^0.6.3",
"resend": "6.8.0",
"resolve-accept-language": "^3.1.15",
"rtl-detect": "^1.1.2",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"semver": "^7.7.3",
"sharp": "^0.34.5",
"shiki": "^3.21.0",
"stripe": "^17.7.0",
"superjson": "^2.2.6",
"svix": "^1.84.1",
2025-12-21 04:34:44 +00:00
"swr": "^2.3.8",
2025-12-20 12:23:40 +00:00
"three": "^0.181.2",
"tokenx": "^1.3.0",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"ts-md5": "^2.0.1",
"ua-parser-js": "^1.0.41",
"undici": "^7.19.1",
2025-12-20 12:23:40 +00:00
"unist-builder": "^4.0.0",
"url-join": "^5.0.0",
"use-merge-value": "^1.2.0",
"uuid": "^13.0.0",
"virtua": "^0.48.3",
"word-extractor": "^1.0.4",
"ws": "^8.19.0",
2025-12-20 12:23:40 +00:00
"xast-util-to-xml": "^4.0.0",
"xastscript": "^4.0.0",
"yaml": "^2.8.2",
"zod": "^3.25.76",
"zod-to-json-schema": "^3.25.1",
"zustand": "5.0.4",
"zustand-utils": "^2.1.1"
2023-05-21 07:34:04 +00:00
},
"devDependencies": {
"@commitlint/cli": "^19.8.1",
"@edge-runtime/vm": "^5.0.0",
"@huggingface/tasks": "^0.19.80",
"@inquirer/prompts": "^8.2.0",
"@lobechat/agent-tracing": "workspace:*",
"@lobechat/types": "workspace:*",
"@lobehub/i18n-cli": "^1.26.0",
"@lobehub/lint": "2.1.5",
"@lobehub/market-types": "^1.12.3",
"@lobehub/seo-cli": "^1.7.0",
"@peculiar/webcrypto": "^1.5.0",
"@playwright/test": "^1.58.0",
"@prettier/sync": "^0.6.1",
"@semantic-release/exec": "^6.0.3",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/async-retry": "^1.4.9",
"@types/chroma-js": "^3.1.2",
"@types/crypto-js": "^4.2.2",
"@types/d3-dsv": "^3.0.7",
"@types/debug": "^4.1.12",
"@types/fs-extra": "^11.0.4",
"@types/html-to-text": "^9.0.4",
"@types/ip": "^1.1.3",
"@types/json-schema": "^7.0.15",
"@types/node": "^24.10.9",
"@types/nodemailer": "^7.0.5",
"@types/numeral": "^2.0.5",
"@types/oidc-provider": "^9.5.0",
"@types/pdf-parse": "^1.1.4",
"@types/pdfkit": "^0.17.4",
"@types/pg": "^8.16.0",
Sync main branch to canary branch (#12267) * 🔧 chore(release): bump version to v2.1.27 [skip ci] * chore: update sync main to canary workflow * 🐛 fix: update @lobehub/ui version and refactor dynamic import handling (#12260) * ✨ feat: add hotfix workflow and script for automated hotfix management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: refactor PR creation command to use execFileSync for improved reliability Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @lobehub/ui version and refactor dynamic import handling - Bump @lobehub/ui dependency from ^4.35.0 to ^4.36.2 in package.json. - Refactor settingsContentToStatic.mts to simplify dynamic import processing by removing business feature checks. - Add initialize.ts to enable immer's map set functionality. - Correct import path in layout.tsx from 'initiallize' to 'initialize'. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @types/react version in package.json - Bump @types/react dependency from ^19.2.9 to 19.2.14. - Add @types/react version to overrides section for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance auto-tag-release workflow for strict semver validation - Updated regex to match strict semantic versioning format, allowing for optional prerelease and build metadata. - Added validation step to ensure the version is a valid semver before proceeding with the release process. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove defaultSecurityBlacklist test file - Deleted the test file for DEFAULT_SECURITY_BLACKLIST as it is no longer needed. - This cleanup helps maintain a more streamlined test suite. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update localization files for multiple languages - Improved translations in Arabic, Bulgarian, German, English, and Spanish for chat and tool-related strings. - Enhanced descriptions for various parameters and added new keys for file handling and security warnings. - Adjusted phrasing for clarity and consistency across languages. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update PR comment script to include Actions Artifacts link - Modified the PR comment generation script to accept an additional artifactsUrl parameter. - Updated the comment format to include both Release download and Actions Artifacts links for better accessibility. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com> * 🐛 chore(hotfix): bump version to v2.1.28 [skip ci] * chore: update secrets token --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: rdmclin2 <rdmclin2@gmail.com> Co-authored-by: Arvin Xu <arvinx@foxmail.com> Co-authored-by: Innei <i@innei.in>
2026-02-11 15:51:35 +00:00
"@types/react": "19.2.13",
2025-12-30 16:08:49 +00:00
"@types/react-dom": "^19.2.3",
"@types/rtl-detect": "^1.0.3",
"@types/semver": "^7.7.1",
2025-12-20 12:23:40 +00:00
"@types/three": "^0.181.0",
"@types/ua-parser-js": "^0.7.39",
"@types/unist": "^3.0.3",
"@types/ws": "^8.18.1",
2025-12-20 12:23:40 +00:00
"@types/xast": "^2.0.4",
📝 docs: improve development guides to reflect current architecture (#12174) * 🔧 chore(vscode): add typescript.tsdk and disable mdx server Fix MDX extension crash caused by Cursor's bundled TypeScript version * 🔧 chore(claude): add skills symlink to .claude directory * 📝 docs: update development guides with current tech stack and architecture - Update tech stack: Next.js 16 + React 19, hybrid routing (App Router + React Router DOM), tRPC, Drizzle ORM + PostgreSQL, react-i18next - Update directory structure to reflect monorepo layout (apps/, packages/, e2e/, locales/) - Expand src/server/ with detailed subdirectory descriptions - Add complete SPA routing architecture with desktop and mobile route tables - Add tRPC router grouping details (lambda, async, tools, mobile) - Add data flow diagram - Simplify dev setup section to link to setup-development guide - Fix i18n default language description (English, not Chinese) - Sync all changes between zh-CN and English versions * 📝 docs: expand data flow diagram in folder structure guide Replace the single-line data flow with a detailed layer-by-layer flow diagram showing each layer's location and responsibility. * 📝 docs: modernize feature development guide - Remove outdated clientDB/pglite/indexDB references - Update schema path to packages/database/src/schemas/ - Update types path to packages/types/src/ - Replace inline migration steps with link to db-migrations guide - Add complete layered architecture table (Client Service, WebAPI, tRPC Router, Server Service, Server Module, Repository, DB Model) - Clarify Client Service as frontend code - Add i18n handling section with workflow and key naming convention - Remove verbose CSS style code, keep core business logic only - Expand testing section with commands, skill refs, and CI tip * 🔥 docs: remove outdated frontend feature development guide Content is superseded by the comprehensive feature-development guide which covers the full chain from schema to testing. * 📝 docs: add LobeHub ecosystem and community resources Add official ecosystem packages (LobeUI, LobeIcons, LobeCharts, LobeEditor, LobeTTS, LobeLint, Lobe i18n, MCP Mark) and community platforms (Agent Market, MCP Market, YouTube, X, Discord). * 📝 docs: improve contributing guidelines and resources - Clarify semantic release triggers (feat/fix vs style/chore) - Add testing section with Vitest/E2E/CI requirements - Update contribution steps to include CI check - Add LobeHub ecosystem packages and community platforms to resources * 📝 docs: rewrite architecture guide to reflect current platform design * 📝 docs: add code quality tools to architecture guide * 📝 docs: rewrite chat-api guide to reflect current architecture - Update sequence diagram with Agent Runtime loop as core execution engine - Replace PluginGateway with ToolExecution layer (Builtin/MCP/Plugin) - Update all path references (model-runtime, agent-runtime, fetch-sse packages) - Split old AgentRuntime section into Model Runtime + Agent Runtime - Add tool calling taxonomy: Builtin, MCP, and Plugin (deprecated) - Add client-side vs server-side execution section - Remove outdated adapter pseudo-code examples * 📝 docs: update file paths in add-new-image-model guide - src/libs/standard-parameters/ → packages/model-bank/src/standard-parameters/ - src/config/aiModels/ → packages/model-bank/src/aiModels/ - src/libs/model-runtime/ → packages/model-runtime/src/providers/ * 📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides The S3_PUBLIC_DOMAIN env var was incorrectly removed from all documentation in commit 4a87b31. This variable is still required by the code (src/server/services/file/impls/s3.ts) to generate public URLs for uploaded files. Without it, image URLs sent to vision models are just S3 keys instead of full URLs. Closes #12161 * 📦 chore: pin @lobehub/ui to 4.33.4 to fix SortableList type errors @lobehub/ui 4.34.0 introduced breaking type changes in SortableList where SortableListItem became strict, causing type incompatibility in onChange and renderItem callbacks across 6 files. Pin to 4.33.4 via pnpm overrides to enforce consistent version across monorepo. * 🐛 fix: correct ReadableStream type annotations and add dom.asynciterable - Add dom.asynciterable to tsconfig lib for ReadableStream async iteration - Fix createCallbacksTransformer return type: TransformStream<string, Uint8Array> - Update stream function return types from ReadableStream<string> to ReadableStream<Uint8Array> (llama.ts, ollama.ts, claude.ts) - Remove @ts-ignore from for-await loops in test files - Add explicit string[] type for chunks arrays * Revert "📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides" This reverts commit 24073f83d3d5e9a89c29e9a96a6689d2baa0edde.
2026-02-07 14:29:14 +00:00
"@typescript/native-preview": "7.0.0-dev.20260207.1",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"@vitejs/plugin-react": "^5.1.4",
"@vitest/coverage-v8": "^3.2.4",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"ajv": "^8.17.1",
"ajv-keywords": "^5.1.0",
"code-inspector-plugin": "1.3.3",
"commitlint": "^19.8.1",
"consola": "^3.4.2",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"cross-env": "^10.1.0",
"crypto-js": "^4.2.0",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"dbdocs": "^0.16.2",
"dotenv": "^17.2.3",
"dotenv-expand": "^12.0.3",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"dpdm-fast": "^1.0.14",
"drizzle-dbml-generator": "^0.10.0",
"drizzle-kit": "^0.31.8",
"eslint": "10.0.2",
"eslint-plugin-mdx": "^3.7.0",
"fake-indexeddb": "^6.2.5",
2025-12-21 04:34:44 +00:00
"fs-extra": "^11.3.3",
"glob": "^13.0.0",
"happy-dom": "^20.3.7",
"husky": "^9.1.7",
"import-in-the-middle": "^2.0.5",
"just-diff": "^6.0.2",
"knip": "^5.82.1",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"linkedom": "^0.18.12",
"lint-staged": "^16.2.7",
"markdown-table": "^3.0.4",
"mcp-hello-world": "^1.1.2",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"mime": "^4.1.0",
"node-fetch": "^3.3.2",
"node-gyp": "^11.5.0",
"openapi-typescript": "^7.10.1",
"p-map": "^7.0.4",
"prettier": "^3.8.1",
✨ feat: support agent tasks system (#13289) * ✨ feat: agent task system — CLI, review rubrics, workspace, comments, brief tool split support import md Major changes: - Split task CLI into modular files (task/, lifecycle, topic, doc, review, checkpoint, dep) - Split builtin-tool-task into task + brief tools (conditional injection) - Task review uses EvalBenchmarkRubric from @lobechat/eval-rubric - Task workspace: documents auto-pin via Notebook, tree view with folders - Task comments system (task_comments table) - Task topics: dedicated TaskTopicModel with userId, handoff fields, review results - Heartbeat timeout auto-detection in detail API - Run idempotency (reject duplicate runs) + error rollback - Topic cancel/delete by topicId only (no taskId needed) - Integration tests for task router (13 tests) - interruptOperation fix (string param, not object) - Global TRPC error handler in CLI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> task document workflow task handoff loop 🗃️ chore: consolidate task system migrations into single 0095 Merged 7 separate migrations (0095-0101) into one: - tasks, briefs, task_comments, task_dependencies, task_documents, task_topics tables - All fields including sort_order, resolved_action/comment, review fields - Idempotent CREATE TABLE IF NOT EXISTS, DROP/ADD CONSTRAINT, CREATE INDEX IF NOT EXISTS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> fix interruptOperation topic auto review workflow topic handoff workflow finish run topic and brief workflow support task tool improve task schema update ✨ feat: add onComplete hook to task.run for completion callbacks When agent execution completes, the hook: - Updates task heartbeat - Creates a result Brief (on success) with assistant content summary - Creates an error Brief (on failure) with error message - Supports both local (handler) and production (webhook) modes Uses the new Agent Runtime Hooks system instead of raw stepCallbacks. LOBE-6160 LOBE-6208 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Review system — LLM-as-Judge automated review Task review uses an independent LLM call to evaluate topic output quality against configurable criteria with pass/fail thresholds. - TaskReviewService: structured LLM review via generateObject, auto-resolves model/provider from user's system agent defaults - Model: getReviewConfig, updateReviewConfig on TaskModel - Router: getReview, updateReview, runReview procedures - CLI: `task review set/view/run` commands - Auto-creates Brief with review results LOBE-6165 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add TaskScheduler, multi-topic execution, and handoff context - TaskScheduler: interface + Local implementation (setTimeout-based), following QueueService dual-mode pattern - Multi-topic execution: `task run --topics N --delay S` runs N topics in sequence with optional delay between them - Handoff context: buildTaskPrompt() queries previous topics by metadata.taskId and injects handoff summaries into the next topic's prompt (sliding window: latest full, older summaries only) - Heartbeat auto-update between topics LOBE-6161 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Heartbeat watchdog + heartbeat CLI Watchdog scans running tasks with expired heartbeats, marks them as failed, and creates urgent error Briefs. Heartbeat CLI allows manual heartbeat reporting for testing. - Model: refactored to use Drizzle operators (isNull, isNotNull, ne) instead of raw SQL where possible; fixed findStuckTasks to skip tasks without heartbeat data - Router: heartbeat (manual report), watchdog (scan + fail + brief) - Router: updateSchema now includes heartbeatInterval, heartbeatTimeout - CLI: `task heartbeat <id>`, `task watchdog`, `task edit` with --heartbeat-timeout, --heartbeat-interval, --description LOBE-6161 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ♻️ refactor: move CheckpointConfig to @lobechat/types Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add task run — trigger agent execution for tasks Task.run creates a topic, triggers AiAgentService.execAgent with task context, and streams results via SSE. Supports both agentId and slug. - Service: added taskId to ExecAgentParams, included in topic metadata - Router: task.run procedure — resolves agent, builds prompt, calls execAgent, updates topic count and heartbeat - CLI: `task run <id>` command with SSE streaming, --prompt, --verbose LOBE-6160 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Checkpoint system for task review gates Checkpoint allows configuring pause points in task execution flow. Supports beforeIds (pause before subtask starts) and afterIds (pause after subtask completes) on parent tasks. - Model: CheckpointConfig type, getCheckpointConfig, updateCheckpointConfig, shouldPauseBeforeStart, shouldPauseAfterComplete - Router: getCheckpoint, updateCheckpoint procedures; integrated with updateStatus for automatic checkpoint triggering - CLI: `task checkpoint view/set` commands with --before, --after, --topic-before, --topic-after, --on-agent-request options - Tests: 3 new checkpoint tests (37 total) LOBE-6162 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add dependency unlocking on task completion When a task completes, automatically check and unlock blocked tasks whose dependencies are all satisfied (backlog → running). Also notify when all subtasks of a parent are completed. - Model: getUnlockedTasks, areAllSubtasksCompleted (Drizzle, no raw SQL) - Router: updateStatus hook triggers unlocking on completion - CLI: shows unlocked tasks and parent completion notification - Tests: 3 new tests (34 total) LOBE-6164 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Brief system — schema, model, router, CLI Brief is a universal Agent-to-User reporting mechanism, not limited to Tasks. CronJobs, Agents, and future systems can all produce Briefs. - Schema: briefs table with polymorphic source (taskId, cronJobId, agentId) - Model: BriefModel with CRUD, listUnresolved (Daily Brief), markRead, resolve - Router: TRPC brief router with taskId identifier resolution - CLI: `lh brief` command (list/view/read/resolve) - Tests: 11 model tests - Migration: 0096_add_briefs_table.sql LOBE-6163 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> ✨ feat: add Task system — schema, model, router, CLI Implement the foundational Task system for managing long-running, multi-topic agent tasks with subtask trees and dependency chains. - Schema: tasks, task_dependencies, task_documents tables - Model: TaskModel with CRUD, tree queries, heartbeat, dependencies, document pinning - Router: TRPC task router with identifier/id resolution - CLI: `lh task` command (list/view/create/edit/delete/start/pause/resume/complete/cancel/tree/dep) - Tests: 31 model tests - Migration: 0095_add_task_tables.sql LOBE-6036 LOBE-6054 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * update * 🐛 fix: update brief model import path and add raw-md vitest plugin Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: eslint import sort in vitest config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: brief ID validation, auto-review retry, and continueTopicId operationId Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: task integration tests — create test agent for FK, fix children spread Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: task integration tests — correct identifier prefix and agent ID Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: remove unused toolsActivatorRuntime import Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: create real topic in task integration tests to satisfy FK constraint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: type errors in task prompt tests, handoff schema, and activity mapping Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: create real agent/topic/brief records in database model tests for FK constraints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:43:51 +00:00
"raw-loader": "^4.0.2",
"remark-cli": "^12.0.1",
"remark-frontmatter": "^5.0.0",
"remark-mdx": "^3.1.1",
"remark-parse": "^11.0.0",
"require-in-the-middle": "^8.0.1",
"semantic-release": "^21.1.2",
"stylelint": "^16.12.0",
"tsx": "^4.21.0",
"type-fest": "^5.4.1",
🐛 fix(bedrock): add parameter conflict handling for Claude 4+ models (#9627) * fix(bedrock): add parameter conflict handling for Claude 4+ models - Add logic to prevent sending both temperature and top_p for Claude 4+ models - Matches existing implementation in Anthropic provider - Fixes ValidationException error for Claude 4.5 models via Bedrock - Includes support for both standard and Bedrock-specific model IDs Fixes #9523 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🧪 test(bedrock): add parameter conflict handling tests Add comprehensive tests for Claude 4+ models parameter conflict detection: - Test temperature preference over top_p when both provided - Test top_p usage when temperature not provided - Test both parameters allowed for non-Claude-4+ models - Test standard and Bedrock-specific model ID formats - Test US region model IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: make temperature optional in ChatStreamPayload interface The temperature property should be optional to support test cases and scenarios where only top_p is provided. This resolves TypeScript error TS2741 in Bedrock provider tests. Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: correct test assertions to handle JSON.stringify undefined omission - Remove undefined properties from test expectations since JSON.stringify omits them - Fix temperature/top_p conflict test assertions for Claude 4+ models - Ensure tests match actual JSON serialization behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * 🔧 fix: add null safety checks for optional temperature parameter - Added proper undefined checks before temperature arithmetic operations in anthropic and bedrock providers - Added null checks before temperature comparisons in groq, perplexity, and search1api providers - Resolves TS18048 errors where temperature is possibly undefined - Maintains existing logic while satisfying TypeScript strict null checks Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com> * refactor with parameterResolver * upgrade * upgrade swr * refactor context-builder --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-11 07:08:26 +00:00
"typescript": "^5.9.3",
"unified": "^11.0.5",
"unist-util-visit": "^5.1.0",
"vite": "^7.3.1",
♻️ refactor: migrate frontend from Next.js App Router to Vite SPA (#12404) * init plan * 📝 docs: update SPA plan for dev mode Worker cross-origin handling - Clarified the handling of Worker cross-origin issues in dev mode, emphasizing the need for `workerPatch` to wrap cross-origin URLs as blob URLs. - Enhanced the explanation of the dev mode's resource URL rewriting process for better understanding. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: Phase 1 - 环境变量整治 - Fix Pyodide env var mismatch (NEXT_PUBLIC_PYPI_INDEX_URL → pythonEnv.NEXT_PUBLIC_PYODIDE_PIP_INDEX_URL) - Consolidate python.ts to use pythonEnv instead of direct process.env - Remove NEXT_PUBLIC_ prefix from server-side MARKET_BASE_URL (5 files) * 🏗️ chore: Phase 2 - Vite 工程搭建 - Add vite.config.ts with dual build (desktop/mobile via MOBILE env) - Add index.html SPA template with __SERVER_CONFIG__ placeholder - Add entry.desktop.tsx and entry.mobile.tsx SPA entry points - Add dev:spa, dev:spa:mobile, build:spa, build:spa:copy scripts - Install @vitejs/plugin-react and linkedom * ♻️ refactor: Phase 3 - 第一方包 Next.js 解耦 - Replace next/link with <a> in builtin-tool-web-browsing (4 files, external links) - Replace next/image with <img> in builtin-tool-agent-builder/InstallPlugin.tsx - Add Vite import.meta.env compat for isDesktop in const/version.ts, builtin-tool-gtd, builtin-tool-group-management * ♻️ refactor: Phase 4a - Auth 页面改用直接 next/navigation 和 next/link - 9 auth files: @/libs/next/navigation → next/navigation - 5 auth files: @/libs/next/Link → next/link - Auth pages remain in Next.js App Router, need direct Next.js imports * ♻️ refactor: Phase 4b - Next.js 抽象层替换为 react-router-dom/vanilla React - navigation.ts: useRouter/usePathname/useSearchParams/useParams → react-router-dom - navigation.ts: redirect/notFound → custom error throws - navigation.ts: useServerInsertedHTML → no-op for SPA - Link.tsx: next/link → react-router-dom Link adapter (href→to, external→<a>) - Image.tsx: next/image → <img> wrapper with fill/style support - dynamic.tsx: next/dynamic → React.lazy + Suspense wrapper * ✨ feat: Phase 5 - 新建 SPAGlobalProvider - Create SPAServerConfig type (analyticsConfig, clientEnv, theme, featureFlags, locale) - Add window.__SERVER_CONFIG__ and __MOBILE__ to global.d.ts - Create SPAGlobalProvider (client-only Provider tree mirroring GlobalProvider) - Includes AuthProvider for user session support - Update entry.desktop.tsx and entry.mobile.tsx to wrap with SPAGlobalProvider * ♻️ refactor: add SPA catch-all route handler with Vite dev proxy - Create (spa)/[[...path]]/route.ts for serving SPA HTML - Dev mode: proxy Vite dev server, rewrite asset URLs, inject Worker patch - Prod mode: read pre-built HTML templates - Build SPAServerConfig with analytics, theme, clientEnv, featureFlags - Update middleware to pass SPA routes through to catch-all * ♻️ refactor: skip auth checks for SPA routes in middleware SPA pages are all public (no sensitive data in HTML). Auth is handled client-side by SPAGlobalProvider's AuthProvider. Only Next.js auth routes and API endpoints go through session checks. * ♻️ refactor: replace Next.js-specific analytics with vanilla JS - Google.tsx: replace @next/third-parties/google with direct gtag script - ReactScan.tsx: replace react-scan/monitoring/next with generic script - Desktop.tsx: replace next/script with native script injection * ♻️ refactor: migrate @t3-oss/env-nextjs to @t3-oss/env-core Replace framework-specific env validation with framework-agnostic version. Add clientPrefix where client schemas exist. * ♻️ refactor: replace next-mdx-remote/rsc with react-markdown Use client-side react-markdown for MDX rendering instead of Next.js RSC-dependent next-mdx-remote. * 🔧 chore: update build scripts and Dockerfile for SPA integration - build:docker now includes SPA build + copy steps - dev defaults to Vite SPA, dev:next for Next.js backend - Dockerfile copies public/spa/ assets for production - Add public/spa/ to .gitignore (build artifact) * 🗑️ chore: remove old Next.js route segment files and serwist PWA - Delete [variants] page.tsx, error.tsx, not-found.tsx, loading.tsx - Delete root loading.tsx and empty [[...path]] directory - Delete unused loaders directory - Remove @serwist/next PWA wrapper from Next.js config * plan2 * ✨ feat: add locale detection script to index.html for SPA dev mode * ♻️ refactor: remove locale and theme from SPAServerConfig * ✨ feat: add [locale] segment with force-static and SEO meta generation * ♻️ refactor: remove theme/locale reads from SPAGlobalProvider * ✨ feat: set vite base to /spa/ for production builds * ✨ feat: auto-generate spaHtmlTemplates from vite build output * 🔧 chore: register dev:next task in turbo.json for parallel dev startup * ♻️ refactor: rename (spa) route group to spa segment, rewrite SPA routes via middleware * ✨ feat: add Vite-compatible i18n/locale modules with import.meta.glob and resolve aliases * 🔧 fix: use custom Vite plugin for module redirects instead of resolve.alias * very important * build * 🔧 chore: update build scripts and clean up Vite configuration by removing unused plugin and code Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ refactor: remove all electron modifier scripts Modifiers are no longer needed with Vite SPA renderer build. * ✨ feat: add Vite renderer entry to electron-vite config Add renderer build configuration to electron-vite, replacing the old Next.js shadow workspace build flow. Delete buildNextApp.mts and moveNextExports.ts, update package.json scripts accordingly. * ✨ feat: add .desktop suffix files for eager i18n loading Create 4 .desktop files that use import.meta.glob({ eager: true }) for synchronous locale access in Electron desktop builds, replacing the async lazy-loading used in web SPA builds. * 🔧 refactor: adapt Electron main process for Vite renderer Replace nextExportDir with rendererDir, update protocol from app://next to app://renderer, simplify file resolution to SPA fallback pattern, update _next/ asset paths to /assets/. * 🔧 chore: update electron-builder files config for Vite renderer Replace dist/next references with dist/renderer, remove Next.js specific exclusion rules no longer applicable to Vite output. * 🗑️ chore: remove @ast-grep/napi dependency No longer needed after removing electron modifier scripts. * 🔧 refactor: unify isDesktop to __ELECTRON__ compile-time constant Remove NEXT_PUBLIC_IS_DESKTOP_APP and VITE_IS_DESKTOP_APP env vars. Unify isDesktop in @lobechat/const using __ELECTRON__ defined by Vite. Re-export from builtin-tool packages. Scripts use DESKTOP_BUILD. * update Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: use electron-vite ELECTRON_RENDERER_URL instead of hardcoded port 3015 Replace hardcoded http://localhost:3015 with process.env.ELECTRON_RENDERER_URL injected by electron-vite dev server. Clean up stale Next.js references. * 🐛 fix: use local renderer-entry shim to resolve Vite root path issue HTML entry ../../src/entry.desktop.tsx resolves to /src/entry.desktop.tsx in URL space, which Vite cannot find within apps/desktop/ root. Add a local shim that imports across root via module resolver instead. * 🔧 refactor: extract shared renderer Vite config into sharedRendererConfig Deduplicate plugins (nodeModuleStub, platformResolve, tsconfigPaths) and define (__MOBILE__, __ELECTRON__, process.env) between root vite.config.ts and electron.vite.config.ts renderer section. * 🔧 refactor: move all renderer plugins and optimizeDeps into shared config sharedRendererPlugins now includes react, codeInspectorPlugin alongside nodeModuleStub, platformResolve, tsconfigPaths. Add sharedOptimizeDeps for pre-bundling list. Both root and electron configs consume shared only. * 🐛 fix: set electron renderer root to monorepo root for correct glob resolution import.meta.glob with absolute paths (e.g. /node_modules/antd/...) resolved within apps/desktop/ instead of monorepo root. Change renderer root to ROOT_DIR, add electronDesktopHtmlPlugin middleware to rewrite / to /apps/desktop/index.html, and remove the now-unnecessary renderer-entry.ts shim. * desktop vite !! Signed-off-by: Innei <tukon479@gmail.com> * sync import !! Signed-off-by: Innei <tukon479@gmail.com> * clean ci!! Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: update SPA path structure and clean up dependencies - Changed the path in .gitignore and related files from [locale] to [variants] for SPA templates. - Updated index.html to set body height to 100%. - Cleaned up package.json by removing unused dependencies and reorganizing devDependencies. - Refactored RendererUrlManager to use a constant for SPA entry HTML path. - Removed obsolete route.ts file from the SPA structure. - Adjusted proxy configuration to reflect the new SPA path structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build script to include mobile SPA build - Modified the build script in package.json to add the mobile SPA build step. - Ensured the build process accommodates both desktop and mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update build scripts and improve file encoding consistency - Modified the build script in package.json to ensure the SPA copy step runs after the build. - Updated file encoding in generateSpaTemplates.mts from 'utf-8' to 'utf8' for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: correct Blob import syntax and update global server config type - Fixed the Blob import syntax in route.ts to ensure proper module loading. - Updated the global server configuration type in global.d.ts for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 test: update RendererUrlManager test to reflect new file path - Modified the mock implementation in RendererUrlManager.test.ts to check for the updated file path '/mock/export/out/apps/desktop/index.html'. - Adjusted the expected resolved path in the test to match the new structure. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove catch-all example file and update imports - Deleted the catch-all example file `catch-all.eg.ts` to streamline the codebase. - Updated import paths in `ClientResponsiveLayout.tsx` and `ClientResponsiveContent/index.tsx` to use the new dynamic import location. - Added type declarations for HTML templates in `spaHtmlTemplates.d.ts`. - Adjusted `tsconfig.json` to include the updated file structure. - Enhanced type definitions in `global.d.ts` and fixed locale loading in `locale.vite.ts`. Signed-off-by: Innei <tukon479@gmail.com> * e2e Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: remove unused build script for Vercel deployment - Deleted the `build:vercel` script from package.json to streamline the build process. - Ensured the remaining build scripts are organized and relevant. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: update Vite build input for mobile support - Changed the build input path in vite.config.ts to conditionally use 'index.mobile.html' for mobile builds, enhancing support for mobile SPA versions. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: add compatibility checks for import maps and cascade layers - Implemented functions to check for browser support of import maps and CSS cascade layers. - Redirected users to a compatibility page if their browser does not support the required features. - Updated the build script in package.json to use the experimental analyze command for better performance. Signed-off-by: Innei <tukon479@gmail.com> * chore: rename Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: refactor authentication layout and introduce global providers - Created a new `RootLayout` component to streamline the layout structure. - Removed the old layout file for variants and integrated necessary features into the new layout. - Added `AuthGlobalProvider` to manage authentication context and server configurations. - Introduced language and theme selection components for enhanced user experience. - Updated various components to utilize the new context and improve modularity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: exclude build artifacts from serverless functions - Updated the `next.config.ts` to exclude SPA, desktop, and mobile build artifacts from serverless functions. - Added paths for `public/spa/**`, `dist/**`, `apps/desktop/build/**`, and `packages/database/migrations/**` to the exclusion list. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 config: refine exclusion of build artifacts from serverless functions - Updated `next.config.ts` to specify exclusion paths for desktop and mobile build artifacts. - Changed exclusions from `dist/**` and `apps/desktop/build/**` to `dist/desktop/**`, `dist/mobile/**`, and `apps/desktop/**` for better clarity and organization. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: update BrowserRouter basename for local development - Modified the `ClientRouter` component to conditionally set the `basename` of `BrowserRouter` based on the `__DEBUG_PROXY__` variable, improving local development experience. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: implement mobile SPA workflow and S3 asset management - Added a new workflow for building and uploading mobile SPA assets to S3, including environment variable configurations in `.env.example`. - Updated `package.json` to include a new script for the mobile SPA workflow. - Enhanced the Vite configuration to support dynamic CDN base paths. - Refactored the template generation script to handle mobile HTML templates more effectively. - Introduced new modules for uploading assets to S3 and generating mobile HTML templates. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: extract origin from MOBILE_S3_PUBLIC_DOMAIN to prevent double key prefix * 🔧 fix: update mobile HTML template to use the latest asset versions - Modified the mobile HTML template to reference the updated JavaScript asset version for improved functionality. - Ensured consistency in the template structure while maintaining existing styles and scripts. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update dependencies and refine service worker integration - Removed outdated dependencies related to Serwist from package.json and tsconfig.json. - Added vite-plugin-pwa to enhance PWA capabilities in the Vite configuration. - Updated service worker registration logic in the PWA installation component. - Introduced a new local development proxy route for debugging purposes. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: refactor development scripts and remove Turbo configuration - Updated the `dev` script in `package.json` to use a new startup sequence script for improved development workflow. - Removed the outdated `turbo.json` configuration file as it is no longer needed. - Introduced `devStartupSequence.mts` to manage the startup of Next.js and Vite processes concurrently. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 feat: update entry points and introduce debug proxy for local development - Changed the main entry point in `index.html` from `entry.desktop.tsx` to `entry.web.tsx` for improved web compatibility. - Added an `initialize.ts` file to enable `immer`'s `enableMapSet` functionality. - Introduced a new `__DEBUG_PROXY__` variable in global types to support local development proxy features. - Implemented a debug proxy route to facilitate local development with dynamic HTML injection and script handling. - Removed outdated mobile routing components to streamline the codebase. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: replace BrowserRouter with RouterProvider for improved routing - Updated entry points for desktop, mobile, and web to utilize RouterProvider and createAppRouter for better routing management. - Removed the deprecated renderRoutes function in favor of a more streamlined router configuration. - Enhanced router setup to support error boundaries and dynamic routing. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: remove direct access handling for SPA routes in proxy configuration - Eliminated the handling of direct access to pre-rendered SPA pages in the proxy configuration. - Simplified the request processing logic by removing checks for SPA routes, streamlining the middleware response flow. Signed-off-by: Innei <tukon479@gmail.com> * update * 🔧 refactor: enhance Worker instantiation logic in mobile HTML template * 🐛 fix: remove duplicate waitForPageWorkspaceReady calls in page CRUD e2e steps * 🔧 refactor: simplify createTracePayload function by using btoa for base64 encoding * 🔧 refactor: specify locales in import.meta.glob for dayjs and antd * 🔧 refactor: replace Node.js Buffer with web-compatible btoa for base64 encoding in file upload * 🐛 fix: disable consistent-type-imports rule for mdx files to prevent eslint crash * 🔧 refactor: add height style to root div for consistent layout * 🔧 refactor: replace btoa with Buffer for base64 encoding in trace and file upload handling * 🔧 refactor: extract nextjsOnlyRoutes to a separate file for better organization * 🔧 refactor: enable Immer MapSet plugin in tests for better state management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 refactor: integrate sharedRollupOutput configuration and increase cache size for better performance Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove obsolete desktop.routes.test.ts file as it is no longer needed Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use cross-env for env vars in npm scripts (Windows CI) Co-authored-by: Cursor <cursoragent@cursor.com> * 🔧 chore: update Dockerfile for web-only build and adjust npm scripts to use pnpm Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Dockerfile prebuild process with environment checks and add new dependencies - Updated Dockerfile to include environment checks before removing desktop-only code. - Added new dependencies in package.json: @aws-sdk/client-bedrock-runtime, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/sdk-metrics, and ajv. - Configured Rollup to exclude @aws-sdk/client-bedrock-runtime from the SPA bundle. - Introduced dockerPrebuild.mts script for environment variable validation and information logging. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance Vite and Electron configurations with environment loading and trace encoding improvements - Updated Vite and Electron configurations to load environment variables using loadEnv. - Modified trace encoding in utils to use TextEncoder for better compatibility. - Adjusted sharedRendererConfig to expose only necessary public environment variables. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove plans directory (migrated to discussion) * ♻️ refactor: inject NEXT_PUBLIC_* env per key in Vite define Co-authored-by: Cursor <cursoragent@cursor.com> * ✨ feat: add loading screen with animation to enhance user experience - Introduced a loading screen with a brand logo and animations for better visual feedback during loading times. - Implemented CSS styles for the loading screen and animations in index.html. - Removed the loading screen from the DOM once the layout is ready using useLayoutEffect in SPAGlobalProvider. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove unnecessary external dependency from Vite configuration - Eliminated the external dependency '@aws-sdk/client-bedrock-runtime' from the Vite configuration to streamline the build process for the SPA bundle. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add web app manifest link in index.html and enable PWA support in Vite configuration - Added a link to the web app manifest in index.html to enhance PWA capabilities. - Enabled manifest support in Vite configuration for improved service worker functionality. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update link rel attributes for improved SEO and consistency - Modified link rel attributes in multiple components to remove 'noreferrer' and standardize to 'nofollow'. - Adjusted imports in PageContent components for better organization. Signed-off-by: Innei <tukon479@gmail.com> * update provider * ✨ feat: enhance loading experience and update package dependencies - Added a loading screen with animations and a brand logo in index.html for improved user feedback during loading times. - Introduced CSS styles for the loading screen and animations. - Updated package.json files across multiple packages to include "@lobechat/const" as a dependency. Signed-off-by: Innei <tukon479@gmail.com> * fix: update proxy Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove GlobalLayout and Locale components - Deleted GlobalLayout and Locale components from the GlobalProvider directory to streamline the codebase. - This removal is part of a refactor to simplify the layout structure and improve maintainability. Signed-off-by: Innei <tukon479@gmail.com> * chore: clean up console logs and improve component structure - Removed unnecessary console log statements from AgentForkTag components in both agent and community directories to enhance code cleanliness. - Refactored UserAgentList component for better readability by restructuring the useUserDetailContext hook and adjusting the layout of Flexbox components. Signed-off-by: Innei <tukon479@gmail.com> * chore: remove console log from MemoryAnalysis component * chore: update mobile HTML template with new asset links - Replaced the previous asset links in the mobile HTML template with updated versions to ensure the latest resources are utilized. - Adjusted the link rel attributes for module preloading to enhance performance and loading efficiency. Signed-off-by: Innei <tukon479@gmail.com> * fix: correct variable assignment in createClientTaskThread integration test - Updated the assignment of the second parent message in the createClientTaskThread integration test to improve clarity and ensure proper data handling. - Changed the variable name from 'secondParentMsg' to 'inserted' for better context before extracting the first message from the inserted results. Signed-off-by: Innei <tukon479@gmail.com> * refactor: simplify authentication check in define-config - Removed the dependency on the isDesktop variable in the authentication check to streamline the logic. - Enhanced the clarity of the redirection process for protected routes by focusing solely on the isLoggedIn status. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(dev): enhance local development setup with debug proxy instructions - Added detailed instructions for starting the development environment in CLAUDE.md, including commands for SPA and full-stack modes. - Updated README.md and README.zh-CN.md to reflect new commands and the debug proxy URL for local development. - Introduced a Vite plugin to print the debug proxy URL upon server start, facilitating easier local development against the production backend. - Corrected the debug proxy route in entry.web.tsx and define-config.ts for consistency. This improves the developer experience by providing clear guidance and tools for local development. Signed-off-by: Innei <tukon479@gmail.com> * optimize perf * optimize perf * optimize perf * remove speedy plugin * add dayjs vendor * Revert "remove speedy plugin" This reverts commit bf986afeb114939c2bddfa41ff24827ea8559183. --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 16:01:01 +00:00
"vite-plugin-node-polyfills": "^0.25.0",
"vite-plugin-pwa": "^1.2.0",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^3.2.4"
},
"packageManager": "pnpm@10.20.0",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"pnpm": {
2026-02-13 15:38:01 +00:00
"onlyBuiltDependencies": [
"@lobehub/editor",
2026-02-13 15:38:01 +00:00
"ffmpeg-static"
],
"overrides": {
Sync main branch to canary branch (#12267) * 🔧 chore(release): bump version to v2.1.27 [skip ci] * chore: update sync main to canary workflow * 🐛 fix: update @lobehub/ui version and refactor dynamic import handling (#12260) * ✨ feat: add hotfix workflow and script for automated hotfix management Signed-off-by: Innei <tukon479@gmail.com> * 🔧 fix: refactor PR creation command to use execFileSync for improved reliability Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @lobehub/ui version and refactor dynamic import handling - Bump @lobehub/ui dependency from ^4.35.0 to ^4.36.2 in package.json. - Refactor settingsContentToStatic.mts to simplify dynamic import processing by removing business feature checks. - Add initialize.ts to enable immer's map set functionality. - Correct import path in layout.tsx from 'initiallize' to 'initialize'. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update @types/react version in package.json - Bump @types/react dependency from ^19.2.9 to 19.2.14. - Add @types/react version to overrides section for consistency. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: enhance auto-tag-release workflow for strict semver validation - Updated regex to match strict semantic versioning format, allowing for optional prerelease and build metadata. - Added validation step to ensure the version is a valid semver before proceeding with the release process. Signed-off-by: Innei <tukon479@gmail.com> * 🗑️ chore: remove defaultSecurityBlacklist test file - Deleted the test file for DEFAULT_SECURITY_BLACKLIST as it is no longer needed. - This cleanup helps maintain a more streamlined test suite. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update localization files for multiple languages - Improved translations in Arabic, Bulgarian, German, English, and Spanish for chat and tool-related strings. - Enhanced descriptions for various parameters and added new keys for file handling and security warnings. - Adjusted phrasing for clarity and consistency across languages. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update PR comment script to include Actions Artifacts link - Modified the PR comment generation script to accept an additional artifactsUrl parameter. - Updated the comment format to include both Release download and Actions Artifacts links for better accessibility. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com> * 🐛 chore(hotfix): bump version to v2.1.28 [skip ci] * chore: update secrets token --------- Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: rdmclin2 <rdmclin2@gmail.com> Co-authored-by: Arvin Xu <arvinx@foxmail.com> Co-authored-by: Innei <i@innei.in>
2026-02-11 15:51:35 +00:00
"@types/react": "19.2.13",
"better-auth": "1.4.6",
"better-call": "1.1.8",
"drizzle-orm": "^0.45.1",
"fast-xml-parser": "5.4.2",
"lexical": "0.42.0",
"pdfjs-dist": "5.4.530",
"stylelint-config-clean-order": "7.0.0"
}
2023-07-27 02:53:42 +00:00
}
}