Merge remote-tracking branch 'origin/main' into feat/model-plugins-implementing

This commit is contained in:
yyh
2026-03-12 23:12:06 +08:00
10 changed files with 24 additions and 26 deletions

View File

@ -125,7 +125,7 @@ def test_get_credentials_and_config_selects_plugin_id_and_key_firecrawl(monkeypa
@pytest.mark.parametrize(
("provider", "plugin_id"),
[
("watercrawl", "langgenius/watercrawl_datasource"),
("watercrawl", "watercrawl/watercrawl_datasource"),
("jinareader", "langgenius/jina_datasource"),
],
)

View File

@ -1,5 +1,6 @@
'use client'
import type { InitialConfigType } from '@lexical/react/LexicalComposer'
import type {
EditorState,
LexicalCommand,
@ -153,7 +154,10 @@ const PromptEditor: FC<PromptEditorProps> = ({
shortcutPopups = [],
}) => {
const { eventEmitter } = useEventEmitterContextContext()
const initialConfig = {
const initialConfig: InitialConfigType = {
theme: {
paragraph: 'group-[.clamp]:line-clamp-5 group-focus/editable:!line-clamp-none',
},
namespace: 'prompt-editor',
nodes: [
CodeNode,
@ -214,7 +218,7 @@ const PromptEditor: FC<PromptEditorProps> = ({
contentEditable={(
<ContentEditable
className={cn(
'text-text-secondary outline-none',
'group/editable text-text-secondary outline-none group-[.clamp]:max-h-24 group-[.clamp]:overflow-y-auto',
compact ? 'text-[13px] leading-5' : 'text-sm leading-6',
className,
)}

View File

@ -61,11 +61,11 @@ const Editor: FC<Props> = ({
const setShowInputFieldPanel = useStore(s => s.setShowInputFieldPanel)
return (
<div className={cn(className, 'relative')}>
<div className={cn(className, 'relative min-h-8')}>
<>
<PromptEditor
instanceId={instanceId}
className={cn(promptMinHeightClassName, '!leading-[18px]')}
className={cn(promptMinHeightClassName, 'leading-[18px]')}
placeholder={placeholder}
placeholderClassName={placeholderClassName}
value={value}
@ -118,7 +118,7 @@ const Editor: FC<Props> = ({
{/* to patch Editor not support dynamic change editable status */}
{readOnly && <div className="absolute inset-0 z-10"></div>}
{isFocus && (
<div className={cn('absolute z-10', insertVarTipToLeft ? 'left-[-12px] top-1.5' : ' right-1 top-[-9px]')}>
<div className={cn('absolute z-10', insertVarTipToLeft ? 'left-[-12px] top-1.5' : 'right-1 top-[-9px]')}>
<Tooltip
popupContent={`${t('common.insertVarTip', { ns: 'workflow' })}`}
>

View File

@ -59,12 +59,12 @@ const InputItem: FC<Props> = ({
}, [onRemove])
return (
<div className={cn(className, 'hover:cursor-text hover:bg-state-base-hover', 'relative flex !h-[30px] items-center')}>
<div className={cn(className, 'hover:cursor-text hover:bg-state-base-hover', 'relative flex')}>
{(!readOnly)
? (
<Input
instanceId={instanceId}
className={cn(isFocus ? 'bg-components-input-bg-active' : 'bg-width', 'h-full w-0 grow px-3 py-1')}
className={cn(isFocus ? 'bg-components-input-bg-active' : '', 'clamp group w-0 grow px-3 py-1')}
value={value}
onChange={onChange}
readOnly={readOnly}
@ -73,7 +73,6 @@ const InputItem: FC<Props> = ({
onFocusChange={setIsFocus}
placeholder={t('nodes.http.insertVarPlaceholder', { ns: 'workflow' })!}
placeholderClassName="!leading-[21px]"
promptMinHeightClassName="h-full"
insertVarTipToLeft={insertVarTipToLeft}
/>
)
@ -85,7 +84,7 @@ const InputItem: FC<Props> = ({
{hasValue && (
<Input
instanceId={instanceId}
className={cn(isFocus ? 'border-components-input-border-active bg-components-input-bg-active shadow-xs' : 'border-components-input-border-hover bg-components-input-bg-normal', 'h-full w-0 grow rounded-lg border px-3 py-[6px]')}
className={cn(isFocus ? 'border-components-input-border-active bg-components-input-bg-active shadow-xs' : 'border-components-input-border-hover bg-components-input-bg-normal', 'clamp group h-full w-0 grow rounded-lg border px-3 py-[6px]')}
value={value}
onChange={onChange}
readOnly={readOnly}

View File

@ -1,6 +1,6 @@
import type { Viewport } from 'next'
import { Agentation } from 'agentation'
import { Provider as JotaiProvider } from 'jotai'
import { Provider as JotaiProvider } from 'jotai/react'
import { ThemeProvider } from 'next-themes'
import { Instrument_Serif } from 'next/font/google'
import { NuqsAdapter } from 'nuqs/adapters/next/app'

View File

@ -6521,9 +6521,6 @@
"no-restricted-imports": {
"count": 1
},
"tailwindcss/no-unnecessary-whitespace": {
"count": 1
},
"ts/no-explicit-any": {
"count": 1
}

View File

@ -6,6 +6,7 @@ export function getInitOptions(): InitOptions {
// We do not have en for fallback
load: 'currentOnly',
fallbackLng: 'en-US',
showSupportNotice: false,
partialBundledLanguages: true,
keySeparator: false,
ns: namespaces,

View File

@ -237,7 +237,7 @@
"tsx": "4.21.0",
"typescript": "5.9.3",
"uglify-js": "3.19.3",
"vinext": "https://pkg.pr.new/hyoban/vinext/vinext@fe9a72c",
"vinext": "0.0.29",
"vite": "8.0.0-beta.18",
"vite-plugin-inspect": "11.3.3",
"vite-tsconfig-paths": "6.1.1",

13
web/pnpm-lock.yaml generated
View File

@ -589,8 +589,8 @@ importers:
specifier: 3.19.3
version: 3.19.3
vinext:
specifier: https://pkg.pr.new/hyoban/vinext/vinext@fe9a72c
version: https://pkg.pr.new/hyoban/vinext/vinext@fe9a72c(@mdx-js/rollup@3.1.1(rollup@4.59.0))(@vitejs/plugin-rsc@0.5.21(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)))(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3))(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(typescript@5.9.3)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2))
specifier: 0.0.29
version: 0.0.29(@mdx-js/rollup@3.1.1(rollup@4.59.0))(@vitejs/plugin-rsc@0.5.21(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)))(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3))(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(typescript@5.9.3)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2))
vite:
specifier: 8.0.0-beta.18
version: 8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)
@ -7286,9 +7286,8 @@ packages:
vfile@6.0.3:
resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==}
vinext@https://pkg.pr.new/hyoban/vinext/vinext@fe9a72c:
resolution: {integrity: sha512-Nh4JoTECpSqnXMeFh7QG/zzWwPxQ2dP10e5pZ8nqJ10rQr9Z5MQdsGKYqmH9IE6/aEW/9CVS1O9cquLpM3zFQw==, tarball: https://pkg.pr.new/hyoban/vinext/vinext@fe9a72c}
version: 0.0.5
vinext@0.0.29:
resolution: {integrity: sha512-T7kzhgX2TbM+unIHaehiz5H7D2i0TLWhUUqvdnu5PgiBzCSMiH8G2rzE7dA8Tc1oEhywuzYP+pt5bfXkk9lk+w==}
engines: {node: '>=22'}
hasBin: true
peerDependencies:
@ -7297,7 +7296,7 @@ packages:
react: '>=19.2.0'
react-dom: '>=19.2.0'
react-server-dom-webpack: ^19.2.4
vite: ^7.0.0
vite: ^7.0.0 || ^8.0.0-beta.0
peerDependenciesMeta:
'@mdx-js/rollup':
optional: true
@ -15327,7 +15326,7 @@ snapshots:
'@types/unist': 3.0.3
vfile-message: 4.0.3
vinext@https://pkg.pr.new/hyoban/vinext/vinext@fe9a72c(@mdx-js/rollup@3.1.1(rollup@4.59.0))(@vitejs/plugin-rsc@0.5.21(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)))(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3))(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(typescript@5.9.3)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)):
vinext@0.0.29(@mdx-js/rollup@3.1.1(rollup@4.59.0))(@vitejs/plugin-rsc@0.5.21(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)))(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3))(react-dom@19.2.4(react@19.2.4))(react-server-dom-webpack@19.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(webpack@5.105.4(esbuild@0.27.2)(uglify-js@3.19.3)))(react@19.2.4)(typescript@5.9.3)(vite@8.0.0-beta.18(@types/node@25.4.0)(esbuild@0.27.2)(jiti@1.21.7)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)):
dependencies:
'@unpic/react': 1.0.2(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(sass@1.97.3))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
'@vercel/og': 0.8.6

View File

@ -20,6 +20,7 @@ export default defineConfig(({ mode }) => {
return {
plugins: isTest
? [
// TODO: remove tsconfigPaths from test config after vitest supports it natively
tsconfigPaths(),
react(),
{
@ -34,7 +35,6 @@ export default defineConfig(({ mode }) => {
]
: isStorybook
? [
tsconfigPaths(),
react(),
]
: [
@ -54,9 +54,7 @@ export default defineConfig(({ mode }) => {
// }),
],
resolve: {
alias: {
'~@': projectRoot,
},
tsconfigPaths: true,
},
// vinext related config