From 2b51fc23d9231f7aa96cc97fe2d7934d84da613f Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Fri, 26 Sep 2025 10:43:34 +0800 Subject: [PATCH 01/48] add credit pool sys --- .../feature/hosted_service/__init__.py | 122 ++++++++++++++++-- .../console/workspace/workspace.py | 2 + api/core/hosting_configuration.py | 90 ++++++++++++- api/core/provider_manager.py | 40 ++++-- .../update_provider_when_message_created.py | 36 ++++-- ...1520-58a70d22fdbd_add_table_credit_pool.py | 96 ++++++++++++++ api/models/__init__.py | 2 + api/models/model.py | 28 +++- api/services/account_service.py | 5 + api/services/credit_pool_service.py | 107 +++++++++++++++ api/services/workspace_service.py | 6 + 11 files changed, 493 insertions(+), 41 deletions(-) create mode 100644 api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py create mode 100644 api/services/credit_pool_service.py diff --git a/api/configs/feature/hosted_service/__init__.py b/api/configs/feature/hosted_service/__init__.py index 4ad30014c7..538c55d931 100644 --- a/api/configs/feature/hosted_service/__init__.py +++ b/api/configs/feature/hosted_service/__init__.py @@ -8,6 +8,11 @@ class HostedCreditConfig(BaseSettings): default="", ) + HOSTED_POOL_CREDITS: int = Field( + description="Pool credits for hosted service", + default=200, + ) + def get_model_credits(self, model_name: str) -> int: """ Get credit value for a specific model name. @@ -70,11 +75,6 @@ class HostedOpenAiConfig(BaseSettings): "text-davinci-003", ) - HOSTED_OPENAI_QUOTA_LIMIT: NonNegativeInt = Field( - description="Quota limit for hosted OpenAI service usage", - default=200, - ) - HOSTED_OPENAI_PAID_ENABLED: bool = Field( description="Enable paid access to hosted OpenAI service", default=False, @@ -98,6 +98,99 @@ class HostedOpenAiConfig(BaseSettings): ) +class HostedGeminiConfig(BaseSettings): + """ + Configuration for fetching Gemini service + """ + + HOSTED_GEMINI_API_KEY: str | None = Field( + description="API key for hosted Gemini service", + default=None, + ) + + HOSTED_GEMINI_API_BASE: str | None = Field( + description="Base URL for hosted Gemini API", + default=None, + ) + + HOSTED_GEMINI_API_ORGANIZATION: str | None = Field( + description="Organization ID for hosted Gemini service", + default=None, + ) + + HOSTED_GEMINI_TRIAL_ENABLED: bool = Field( + description="Enable trial access to hosted Gemini service", + default=False, + ) + + HOSTED_GEMINI_TRIAL_MODELS: str = Field( + description="Comma-separated list of available models for trial access", + default="gemini-2.5-flash,gemini-2.0-flash,gemini-2.0-flash-lite,", + ) + + +class HostedXAIConfig(BaseSettings): + """ + Configuration for fetching XAI service + """ + + HOSTED_XAI_API_KEY: str | None = Field( + description="API key for hosted XAI service", + default=None, + ) + + HOSTED_XAI_API_BASE: str | None = Field( + description="Base URL for hosted XAI API", + default=None, + ) + + HOSTED_XAI_API_ORGANIZATION: str | None = Field( + description="Organization ID for hosted XAI service", + default=None, + ) + + HOSTED_XAI_TRIAL_ENABLED: bool = Field( + description="Enable trial access to hosted XAI service", + default=False, + ) + + HOSTED_XAI_TRIAL_MODELS: str = Field( + description="Comma-separated list of available models for trial access", + default="grok-3,grok-3-mini,grok-3-mini-fast", + ) + + +class HostedDeepseekConfig(BaseSettings): + """ + Configuration for fetching Deepseek service + """ + + HOSTED_DEEPSEEK_API_KEY: str | None = Field( + description="API key for hosted Deepseek service", + default=None, + ) + + HOSTED_DEEPSEEK_API_BASE: str | None = Field( + description="Base URL for hosted Deepseek API", + default=None, + ) + + HOSTED_DEEPSEEK_API_ORGANIZATION: str | None = Field( + description="Organization ID for hosted Deepseek service", + default=None, + ) + + HOSTED_DEEPSEEK_TRIAL_ENABLED: bool = Field( + description="Enable trial access to hosted Deepseek service", + default=False, + ) + + HOSTED_DEEPSEEK_TRIAL_MODELS: str = Field( + description="Comma-separated list of available models for trial access", + default="deepseek-chat,deepseek-reasoner", + ) + + class HostedAzureOpenAiConfig(BaseSettings): """ Configuration for hosted Azure OpenAI service @@ -144,16 +237,22 @@ class HostedAnthropicConfig(BaseSettings): default=False, ) - HOSTED_ANTHROPIC_QUOTA_LIMIT: NonNegativeInt = Field( - description="Quota limit for hosted Anthropic service usage", - default=600000, - ) - HOSTED_ANTHROPIC_PAID_ENABLED: bool = Field( description="Enable paid access to hosted Anthropic service", default=False, ) + HOSTED_ANTHROPIC_TRIAL_MODELS: str = Field( + description="Comma-separated list of available models for paid access", + default="claude-opus-4-20250514," + "claude-opus-4-20250514," + "claude-sonnet-4-20250514," + "claude-3-5-haiku-20241022," + "claude-3-opus-20240229," + "claude-3-7-sonnet-20250219," + "claude-3-haiku-20240307", + ) + class HostedMinmaxConfig(BaseSettings): """ @@ -250,5 +349,8 @@ class HostedServiceConfig( HostedModerationConfig, # credit config HostedCreditConfig, + HostedGeminiConfig, + HostedXAIConfig, + HostedDeepseekConfig, ): pass diff --git a/api/controllers/console/workspace/workspace.py b/api/controllers/console/workspace/workspace.py index 6bec70b5da..5242e6e04c 100644 --- a/api/controllers/console/workspace/workspace.py +++ b/api/controllers/console/workspace/workspace.py @@ -51,6 +51,8 @@ tenant_fields = { "in_trial": fields.Boolean, "trial_end_reason": fields.String, "custom_config": fields.Raw(attribute="custom_config"), + "trial_credits": fields.Integer, + "trial_credits_used": fields.Integer, } tenants_fields = { diff --git a/api/core/hosting_configuration.py b/api/core/hosting_configuration.py index af860a1070..7aafa4bc80 100644 --- a/api/core/hosting_configuration.py +++ b/api/core/hosting_configuration.py @@ -56,6 +56,9 @@ class HostingConfiguration: self.provider_map[f"{DEFAULT_PLUGIN_ID}/minimax/minimax"] = self.init_minimax() self.provider_map[f"{DEFAULT_PLUGIN_ID}/spark/spark"] = self.init_spark() self.provider_map[f"{DEFAULT_PLUGIN_ID}/zhipuai/zhipuai"] = self.init_zhipuai() + self.provider_map[f"{DEFAULT_PLUGIN_ID}/gemini/google"] = self.init_gemini() + self.provider_map[f"{DEFAULT_PLUGIN_ID}/x/x"] = self.init_xai() + self.provider_map[f"{DEFAULT_PLUGIN_ID}/deepseek/deepseek"] = self.init_deepseek() self.moderation_config = self.init_moderation_config() @@ -128,7 +131,7 @@ class HostingConfiguration: quotas: list[HostingQuota] = [] if dify_config.HOSTED_OPENAI_TRIAL_ENABLED: - hosted_quota_limit = dify_config.HOSTED_OPENAI_QUOTA_LIMIT + hosted_quota_limit = 0 trial_models = self.parse_restrict_models_from_env("HOSTED_OPENAI_TRIAL_MODELS") trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trial_models) quotas.append(trial_quota) @@ -156,14 +159,39 @@ class HostingConfiguration: quota_unit=quota_unit, ) - @staticmethod - def init_anthropic() -> HostingProvider: - quota_unit = QuotaUnit.TOKENS + def init_gemini(self) -> HostingProvider: + quota_unit = QuotaUnit.CREDITS + quotas: list[HostingQuota] = [] + + if dify_config.HOSTED_GEMINI_TRIAL_ENABLED: + hosted_quota_limit = 0 + trial_models = self.parse_restrict_models_from_env("HOSTED_GEMINI_TRIAL_MODELS") + trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trial_models) + quotas.append(trial_quota) + + if len(quotas) > 0: + credentials = { + "google_api_key": dify_config.HOSTED_GEMINI_API_KEY, + } + + if dify_config.HOSTED_GEMINI_API_BASE: + credentials["google_base_url"] = dify_config.HOSTED_GEMINI_API_BASE + + return HostingProvider(enabled=True, credentials=credentials, quota_unit=quota_unit, quotas=quotas) + + return HostingProvider( + enabled=False, + quota_unit=quota_unit, + ) + + def init_anthropic(self) -> HostingProvider: + quota_unit = QuotaUnit.CREDITS quotas: list[HostingQuota] = [] if dify_config.HOSTED_ANTHROPIC_TRIAL_ENABLED: - hosted_quota_limit = dify_config.HOSTED_ANTHROPIC_QUOTA_LIMIT - trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit) + hosted_quota_limit = 0 + trail_models = self.parse_restrict_models_from_env("HOSTED_ANTHROPIC_TRIAL_MODELS") + trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trail_models) quotas.append(trial_quota) if dify_config.HOSTED_ANTHROPIC_PAID_ENABLED: @@ -185,6 +213,56 @@ class HostingConfiguration: quota_unit=quota_unit, ) + def init_xai(self) -> HostingProvider: + quota_unit = QuotaUnit.CREDITS + quotas: list[HostingQuota] = [] + + if dify_config.HOSTED_XAI_TRIAL_ENABLED: + hosted_quota_limit = 0 + trail_models = self.parse_restrict_models_from_env("HOSTED_XAI_TRIAL_MODELS") + trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trail_models) + quotas.append(trial_quota) + + if len(quotas) > 0: + credentials = { + "api_key": dify_config.HOSTED_XAI_API_KEY, + } + + if dify_config.HOSTED_XAI_API_BASE: + credentials["endpoint_url"] = dify_config.HOSTED_XAI_API_BASE + + return HostingProvider(enabled=True, credentials=credentials, quota_unit=quota_unit, quotas=quotas) + + return HostingProvider( + enabled=False, + quota_unit=quota_unit, + ) + + def init_deepseek(self) -> HostingProvider: + quota_unit = QuotaUnit.CREDITS + quotas: list[HostingQuota] = [] + + if dify_config.HOSTED_DEEPSEEK_TRIAL_ENABLED: + hosted_quota_limit = 0 + trail_models = self.parse_restrict_models_from_env("HOSTED_DEEPSEEK_TRIAL_MODELS") + trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trail_models) + quotas.append(trial_quota) + + if len(quotas) > 0: + credentials = { + "api_key": dify_config.HOSTED_DEEPSEEK_API_KEY, + } + + if dify_config.HOSTED_DEEPSEEK_API_BASE: + credentials["endpoint_url"] = dify_config.HOSTED_DEEPSEEK_API_BASE + + return HostingProvider(enabled=True, credentials=credentials, quota_unit=quota_unit, quotas=quotas) + + return HostingProvider( + enabled=False, + quota_unit=quota_unit, + ) + @staticmethod def init_minimax() -> HostingProvider: quota_unit = QuotaUnit.TOKENS diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index 499d39bd5d..1ac02d9b6a 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -629,7 +629,7 @@ class ProviderManager: provider_name=ModelProviderID(provider_name).provider_name, provider_type=ProviderType.SYSTEM.value, quota_type=ProviderQuotaType.TRIAL.value, - quota_limit=quota.quota_limit, # type: ignore + quota_limit=0, # type: ignore quota_used=0, is_valid=True, ) @@ -912,6 +912,16 @@ class ProviderManager: provider_record ) quota_configurations = [] + + if dify_config.EDITION == "CLOUD": + from services.credit_pool_service import CreditPoolService + + pool = CreditPoolService.get_or_create_pool( + tenant_id=tenant_id, + ) + else: + pool = None + for provider_quota in provider_hosting_configuration.quotas: if provider_quota.quota_type not in quota_type_to_provider_records_dict: if provider_quota.quota_type == ProviderQuotaType.FREE: @@ -932,16 +942,26 @@ class ProviderManager: raise ValueError("quota_used is None") if provider_record.quota_limit is None: raise ValueError("quota_limit is None") + if provider_quota.quota_type == ProviderQuotaType.TRIAL and pool is not None: + quota_configuration = QuotaConfiguration( + quota_type=provider_quota.quota_type, + quota_unit=provider_hosting_configuration.quota_unit or QuotaUnit.TOKENS, + quota_used=pool.quota_used, + quota_limit=pool.quota_limit, + is_valid=pool.quota_limit > pool.quota_used or pool.quota_limit == -1, + restrict_models=provider_quota.restrict_models, + ) - quota_configuration = QuotaConfiguration( - quota_type=provider_quota.quota_type, - quota_unit=provider_hosting_configuration.quota_unit or QuotaUnit.TOKENS, - quota_used=provider_record.quota_used, - quota_limit=provider_record.quota_limit, - is_valid=provider_record.quota_limit > provider_record.quota_used - or provider_record.quota_limit == -1, - restrict_models=provider_quota.restrict_models, - ) + else: + quota_configuration = QuotaConfiguration( + quota_type=provider_quota.quota_type, + quota_unit=provider_hosting_configuration.quota_unit or QuotaUnit.TOKENS, + quota_used=provider_record.quota_used, + quota_limit=provider_record.quota_limit, + is_valid=provider_record.quota_limit > provider_record.quota_used + or provider_record.quota_limit == -1, + restrict_models=provider_quota.restrict_models, + ) quota_configurations.append(quota_configuration) diff --git a/api/events/event_handlers/update_provider_when_message_created.py b/api/events/event_handlers/update_provider_when_message_created.py index 27efa539dc..d787b23fac 100644 --- a/api/events/event_handlers/update_provider_when_message_created.py +++ b/api/events/event_handlers/update_provider_when_message_created.py @@ -9,7 +9,7 @@ from sqlalchemy.orm import Session from configs import dify_config from core.app.entities.app_invoke_entities import AgentChatAppGenerateEntity, ChatAppGenerateEntity -from core.entities.provider_entities import QuotaUnit, SystemConfiguration +from core.entities.provider_entities import ProviderQuotaType, QuotaUnit, SystemConfiguration from events.message_event import message_was_created from extensions.ext_database import db from extensions.ext_redis import redis_client, redis_fallback @@ -135,20 +135,28 @@ def handle(sender: Message, **kwargs): ) if used_quota is not None: - quota_update = _ProviderUpdateOperation( - filters=_ProviderUpdateFilters( + if provider_configuration.system_configuration.current_quota_type == ProviderQuotaType.TRIAL: + from services.credit_pool_service import CreditPoolService + + CreditPoolService.check_and_deduct_credits( tenant_id=tenant_id, - provider_name=ModelProviderID(model_config.provider).provider_name, - provider_type=ProviderType.SYSTEM.value, - quota_type=provider_configuration.system_configuration.current_quota_type.value, - ), - values=_ProviderUpdateValues(quota_used=Provider.quota_used + used_quota, last_used=current_time), - additional_filters=_ProviderUpdateAdditionalFilters( - quota_limit_check=True # Provider.quota_limit > Provider.quota_used - ), - description="quota_deduction_update", - ) - updates_to_perform.append(quota_update) + credits_required=used_quota, + ) + else: + quota_update = _ProviderUpdateOperation( + filters=_ProviderUpdateFilters( + tenant_id=tenant_id, + provider_name=ModelProviderID(model_config.provider).provider_name, + provider_type=ProviderType.SYSTEM.value, + quota_type=provider_configuration.system_configuration.current_quota_type.value, + ), + values=_ProviderUpdateValues(quota_used=Provider.quota_used + used_quota, last_used=current_time), + additional_filters=_ProviderUpdateAdditionalFilters( + quota_limit_check=True # Provider.quota_limit > Provider.quota_used + ), + description="quota_deduction_update", + ) + updates_to_perform.append(quota_update) # Execute all updates start_time = time_module.perf_counter() diff --git a/api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py b/api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py new file mode 100644 index 0000000000..d298d885f4 --- /dev/null +++ b/api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py @@ -0,0 +1,96 @@ +"""add table credit pool + +Revision ID: 58a70d22fdbd +Revises: 68519ad5cd18 +Create Date: 2025-09-25 15:20:40.367078 + +""" +from alembic import op +import models as models +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '58a70d22fdbd' +down_revision = '68519ad5cd18' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('tenant_credit_pools', + sa.Column('id', models.types.StringUUID(), server_default=sa.text('uuid_generate_v4()'), nullable=False), + sa.Column('tenant_id', models.types.StringUUID(), nullable=False), + sa.Column('pool_type', sa.String(length=40), nullable=False), + sa.Column('quota_limit', sa.BigInteger(), nullable=False), + sa.Column('quota_used', sa.BigInteger(), nullable=False), + sa.Column('created_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), + sa.Column('updated_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False), + sa.PrimaryKeyConstraint('id', name='tenant_credit_pool_pkey') + ) + with op.batch_alter_table('tenant_credit_pools', schema=None) as batch_op: + batch_op.create_index('tenant_credit_pool_pool_type_idx', ['pool_type'], unique=False) + batch_op.create_index('tenant_credit_pool_tenant_id_idx', ['tenant_id'], unique=False) + # Data migration: Move trial quota data from providers to tenant_credit_pools + migrate_trial_quota_data() + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('tenant_credit_pools', schema=None) as batch_op: + batch_op.drop_index('tenant_credit_pool_tenant_id_idx') + batch_op.drop_index('tenant_credit_pool_pool_type_idx') + + op.drop_table('tenant_credit_pools') + # ### end Alembic commands ### + + +def migrate_trial_quota_data(): + """ + Migrate quota data from providers table to tenant_credit_pools table + for providers with quota_type='trial', provider_name='openai', provider_type='system' + """ + # Create connection + bind = op.get_bind() + + # Query providers that match the criteria + select_sql = sa.text(""" + SELECT tenant_id, quota_limit, quota_used + FROM providers + WHERE quota_type = 'trial' + AND provider_name = 'openai' + AND provider_type = 'system' + AND quota_limit IS NOT NULL + """) + + result = bind.execute(select_sql) + providers_data = result.fetchall() + + # Insert data into tenant_credit_pools + for provider_data in providers_data: + tenant_id, quota_limit, quota_used = provider_data + + # Check if credit pool already exists for this tenant + check_sql = sa.text(""" + SELECT COUNT(*) + FROM tenant_credit_pools + WHERE tenant_id = :tenant_id AND pool_type = 'trial' + """) + + existing_count = bind.execute(check_sql, {"tenant_id": tenant_id}).scalar() + + if existing_count == 0: + # Insert new credit pool record + insert_sql = sa.text(""" + INSERT INTO tenant_credit_pools (tenant_id, pool_type, quota_limit, quota_used, created_at, updated_at) + VALUES (:tenant_id, 'trial', :quota_limit, :quota_used, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) + """) + + bind.execute(insert_sql, { + "tenant_id": tenant_id, + "quota_limit": quota_limit or 0, + "quota_used": quota_used or 0 + }) diff --git a/api/models/__init__.py b/api/models/__init__.py index 779484283f..6cdb7529e3 100644 --- a/api/models/__init__.py +++ b/api/models/__init__.py @@ -53,6 +53,7 @@ from .model import ( Site, Tag, TagBinding, + TenantCreditPool, TraceAppConfig, UploadFile, ) @@ -159,6 +160,7 @@ __all__ = [ "Tenant", "TenantAccountJoin", "TenantAccountRole", + "TenantCreditPool", "TenantDefaultModel", "TenantPreferredModelProvider", "TenantStatus", diff --git a/api/models/model.py b/api/models/model.py index a8218c3a4e..30ec03de97 100644 --- a/api/models/model.py +++ b/api/models/model.py @@ -9,7 +9,7 @@ from typing import TYPE_CHECKING, Any, Literal, Optional, cast import sqlalchemy as sa from flask import request from flask_login import UserMixin # type: ignore[import-untyped] -from sqlalchemy import Float, Index, PrimaryKeyConstraint, String, exists, func, select, text +from sqlalchemy import BigInteger, Float, Index, PrimaryKeyConstraint, String, exists, func, select, text from sqlalchemy.orm import Mapped, Session, mapped_column from configs import dify_config @@ -1944,3 +1944,29 @@ class TraceAppConfig(Base): "created_at": str(self.created_at) if self.created_at else None, "updated_at": str(self.updated_at) if self.updated_at else None, } + + +class TenantCreditPool(Base): + __tablename__ = "tenant_credit_pools" + __table_args__ = ( + sa.PrimaryKeyConstraint("id", name="tenant_credit_pool_pkey"), + sa.Index("tenant_credit_pool_tenant_id_idx", "tenant_id"), + sa.Index("tenant_credit_pool_pool_type_idx", "pool_type"), + ) + + id = mapped_column(StringUUID, primary_key=True, server_default=text("uuid_generate_v4()")) + tenant_id = mapped_column(StringUUID, nullable=False) + pool_type = mapped_column(String(40), nullable=False, default="trial", server_default="trial") + quota_limit = mapped_column(BigInteger, nullable=False, default=0) + quota_used = mapped_column(BigInteger, nullable=False, default=0) + created_at = mapped_column(sa.DateTime, nullable=False, server_default=text("CURRENT_TIMESTAMP")) + updated_at = mapped_column( + sa.DateTime, nullable=False, server_default=func.current_timestamp(), onupdate=func.current_timestamp() + ) + + @property + def remaining_credits(self) -> int: + return max(0, self.quota_limit - self.quota_used) + + def has_sufficient_credits(self, required_credits: int) -> bool: + return self.remaining_credits >= required_credits diff --git a/api/services/account_service.py b/api/services/account_service.py index 0e699d16da..21637a69e5 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -993,6 +993,11 @@ class TenantService: tenant.encrypt_public_key = generate_key_pair(tenant.id) db.session.commit() + + from services.credit_pool_service import CreditPoolService + + CreditPoolService.create_default_pool(tenant.id) + return tenant @staticmethod diff --git a/api/services/credit_pool_service.py b/api/services/credit_pool_service.py new file mode 100644 index 0000000000..2bf9f4118f --- /dev/null +++ b/api/services/credit_pool_service.py @@ -0,0 +1,107 @@ +from typing import Optional + +from sqlalchemy import update + +from configs import dify_config +from core.errors.error import QuotaExceededError +from extensions.ext_database import db +from models import TenantCreditPool + + +class CreditPoolService: + @classmethod + def create_default_pool(cls, tenant_id: str) -> TenantCreditPool: + """create default credit pool for new tenant""" + credit_pool = TenantCreditPool( + tenant_id=tenant_id, quota_limit=dify_config.HOSTED_POOL_CREDITS, quota_used=0, pool_type="trial" + ) + db.session.add(credit_pool) + db.session.commit() + return credit_pool + + @classmethod + def get_pool(cls, tenant_id: str) -> Optional[TenantCreditPool]: + """get tenant credit pool""" + return ( + db.session.query(TenantCreditPool) + .filter_by( + tenant_id=tenant_id, + ) + .first() + ) + + @classmethod + def get_or_create_pool(cls, tenant_id: str) -> TenantCreditPool: + """get or create credit pool""" + # First try to get existing pool + pool = cls.get_pool(tenant_id) + if pool: + return pool + + # Create new pool if not exists, handle race condition + try: + # Double-check in case another thread created it + pool = ( + db.session.query(TenantCreditPool) + .filter_by( + tenant_id=tenant_id, + ) + .first() + ) + if pool: + return pool + + # Create new pool + pool = TenantCreditPool( + tenant_id=tenant_id, quota_limit=dify_config.HOSTED_POOL_CREDITS, quota_used=0, pool_type="trial" + ) + db.session.add(pool) + db.session.commit() + + except Exception: + # If creation fails (e.g., due to race condition), rollback and try to get existing one + db.session.rollback() + pool = cls.get_pool(tenant_id) + if not pool: + raise + + return pool + + @classmethod + def check_and_deduct_credits( + cls, + tenant_id: str, + credits_required: int, + ) -> bool: + """check and deduct credits""" + pool = cls.get_pool(tenant_id) + if not pool: + raise QuotaExceededError("Credit pool not found") + + if pool.remaining_credits < credits_required: + raise QuotaExceededError( + f"Insufficient credits. Required: {credits_required}, Available: {pool.remaining_credits}" + ) + + with db.session.begin(): + update_values = {"quota_used": pool.quota_used + credits_required} + + where_conditions = [ + TenantCreditPool.tenant_id == tenant_id, + TenantCreditPool.quota_used + credits_required <= TenantCreditPool.quota_limit, + ] + stmt = update(TenantCreditPool).where(*where_conditions).values(**update_values) + db.session.execute(stmt) + + return True + + @classmethod + def check_deduct_credits(cls, tenant_id: str, credits_required: int) -> bool: + """check and deduct credits""" + pool = cls.get_pool(tenant_id) + if not pool: + return False + + if pool.remaining_credits < credits_required: + return False + return True diff --git a/api/services/workspace_service.py b/api/services/workspace_service.py index 292ac6e008..a21aac1984 100644 --- a/api/services/workspace_service.py +++ b/api/services/workspace_service.py @@ -46,5 +46,11 @@ class WorkspaceService: "remove_webapp_brand": remove_webapp_brand, "replace_webapp_logo": replace_webapp_logo, } + if dify_config.EDITION == "CLOUD": + from services.credit_pool_service import CreditPoolService + + pool = CreditPoolService.get_or_create_pool(tenant_id=tenant.id) + tenant_info["trial_credits"] = pool.quota_limit + tenant_info["trial_credits_used"] = pool.quota_used return tenant_info From db0780cfa8390498197d7bc71ed38edcd513fbfd Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Fri, 26 Sep 2025 11:18:28 +0800 Subject: [PATCH 02/48] add:log --- .../update_provider_when_message_created.py | 4 +++- api/services/credit_pool_service.py | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/events/event_handlers/update_provider_when_message_created.py b/api/events/event_handlers/update_provider_when_message_created.py index d787b23fac..9efe9a79af 100644 --- a/api/events/event_handlers/update_provider_when_message_created.py +++ b/api/events/event_handlers/update_provider_when_message_created.py @@ -133,9 +133,10 @@ def handle(sender: Message, **kwargs): system_configuration=system_configuration, model_name=model_config.model, ) - + logger.info("used_quota: %s", used_quota) if used_quota is not None: if provider_configuration.system_configuration.current_quota_type == ProviderQuotaType.TRIAL: + logger.info("deduct credits") from services.credit_pool_service import CreditPoolService CreditPoolService.check_and_deduct_credits( @@ -143,6 +144,7 @@ def handle(sender: Message, **kwargs): credits_required=used_quota, ) else: + logger.info("update provider quota") quota_update = _ProviderUpdateOperation( filters=_ProviderUpdateFilters( tenant_id=tenant_id, diff --git a/api/services/credit_pool_service.py b/api/services/credit_pool_service.py index 2bf9f4118f..f72686b9ff 100644 --- a/api/services/credit_pool_service.py +++ b/api/services/credit_pool_service.py @@ -1,3 +1,4 @@ +import logging from typing import Optional from sqlalchemy import update @@ -7,6 +8,8 @@ from core.errors.error import QuotaExceededError from extensions.ext_database import db from models import TenantCreditPool +logger = logging.getLogger(__name__) + class CreditPoolService: @classmethod @@ -72,8 +75,9 @@ class CreditPoolService: cls, tenant_id: str, credits_required: int, - ) -> bool: + ): """check and deduct credits""" + logger.info("check and deduct credits") pool = cls.get_pool(tenant_id) if not pool: raise QuotaExceededError("Credit pool not found") @@ -93,8 +97,6 @@ class CreditPoolService: stmt = update(TenantCreditPool).where(*where_conditions).values(**update_values) db.session.execute(stmt) - return True - @classmethod def check_deduct_credits(cls, tenant_id: str, credits_required: int) -> bool: """check and deduct credits""" From ab34cea714d32b49cb8278ed59c8e6e6e930f4cf Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Fri, 26 Sep 2025 12:49:26 +0800 Subject: [PATCH 03/48] add paid credit --- .../feature/hosted_service/__init__.py | 40 ++++++++++ api/core/hosting_configuration.py | 18 ++++- api/core/provider_manager.py | 28 +++++-- api/core/workflow/nodes/llm/llm_utils.py | 51 +++++++----- .../update_provider_when_message_created.py | 12 ++- ...1520-58a70d22fdbd_add_table_credit_pool.py | 78 ++++++++++-------- api/services/credit_pool_service.py | 79 +++++-------------- api/services/workspace_service.py | 12 ++- 8 files changed, 192 insertions(+), 126 deletions(-) diff --git a/api/configs/feature/hosted_service/__init__.py b/api/configs/feature/hosted_service/__init__.py index 538c55d931..6415bd239d 100644 --- a/api/configs/feature/hosted_service/__init__.py +++ b/api/configs/feature/hosted_service/__init__.py @@ -128,6 +128,16 @@ class HostedGeminiConfig(BaseSettings): default="gemini-2.5-flash,gemini-2.0-flash,gemini-2.0-flash-lite,", ) + HOSTED_GEMINI_PAID_ENABLED: bool = Field( + description="Enable paid access to hosted gemini service", + default=False, + ) + + HOSTED_GEMINI_PAID_MODELS: str = Field( + description="Comma-separated list of available models for paid access", + default="gemini-2.5-flash,gemini-2.0-flash,gemini-2.0-flash-lite,", + ) + class HostedXAIConfig(BaseSettings): """ @@ -159,6 +169,16 @@ class HostedXAIConfig(BaseSettings): default="grok-3,grok-3-mini,grok-3-mini-fast", ) + HOSTED_XAI_PAID_ENABLED: bool = Field( + description="Enable paid access to hosted XAI service", + default=False, + ) + + HOSTED_XAI_PAID_MODELS: str = Field( + description="Comma-separated list of available models for paid access", + default="grok-3,grok-3-mini,grok-3-mini-fast", + ) + class HostedDeepseekConfig(BaseSettings): """ @@ -190,6 +210,16 @@ class HostedDeepseekConfig(BaseSettings): default="deepseek-chat,deepseek-reasoner", ) + HOSTED_DEEPSEEK_PAID_ENABLED: bool = Field( + description="Enable paid access to hosted XAI service", + default=False, + ) + + HOSTED_DEEPSEEK_PAID_MODELS: str = Field( + description="Comma-separated list of available models for paid access", + default="grok-3,grok-3-mini,grok-3-mini-fast", + ) + class HostedAzureOpenAiConfig(BaseSettings): """ @@ -252,6 +282,16 @@ class HostedAnthropicConfig(BaseSettings): "claude-3-7-sonnet-20250219," "claude-3-haiku-20240307", ) + HOSTED_ANTHROPIC_PAID_MODELS: str = Field( + description="Comma-separated list of available models for paid access", + default="claude-opus-4-20250514," + "claude-opus-4-20250514," + "claude-sonnet-4-20250514," + "claude-3-5-haiku-20241022," + "claude-3-opus-20240229," + "claude-3-7-sonnet-20250219," + "claude-3-haiku-20240307", + ) class HostedMinmaxConfig(BaseSettings): diff --git a/api/core/hosting_configuration.py b/api/core/hosting_configuration.py index 7aafa4bc80..ed08ecf57b 100644 --- a/api/core/hosting_configuration.py +++ b/api/core/hosting_configuration.py @@ -169,6 +169,11 @@ class HostingConfiguration: trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trial_models) quotas.append(trial_quota) + if dify_config.HOSTED_GEMINI_PAID_ENABLED: + paid_models = self.parse_restrict_models_from_env("HOSTED_GEMINI_PAID_MODELS") + paid_quota = PaidHostingQuota(restrict_models=paid_models) + quotas.append(paid_quota) + if len(quotas) > 0: credentials = { "google_api_key": dify_config.HOSTED_GEMINI_API_KEY, @@ -196,7 +201,8 @@ class HostingConfiguration: if dify_config.HOSTED_ANTHROPIC_PAID_ENABLED: paid_quota = PaidHostingQuota() - quotas.append(paid_quota) + paid_models = self.parse_restrict_models_from_env("HOSTED_ANTHROPIC_PAID_MODELS") + quotas.append(paid_quota,restrict_models=paid_models) if len(quotas) > 0: credentials = { @@ -223,6 +229,11 @@ class HostingConfiguration: trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trail_models) quotas.append(trial_quota) + if dify_config.HOSTED_XAI_PAID_ENABLED: + paid_models = self.parse_restrict_models_from_env("HOSTED_XAI_PAID_MODELS") + paid_quota = PaidHostingQuota(restrict_models=paid_models) + quotas.append(paid_quota) + if len(quotas) > 0: credentials = { "api_key": dify_config.HOSTED_XAI_API_KEY, @@ -248,6 +259,11 @@ class HostingConfiguration: trial_quota = TrialHostingQuota(quota_limit=hosted_quota_limit, restrict_models=trail_models) quotas.append(trial_quota) + if dify_config.HOSTED_DEEPSEEK_PAID_ENABLED: + paid_models = self.parse_restrict_models_from_env("HOSTED_DEEPSEEK_PAID_MODELS") + paid_quota = PaidHostingQuota(restrict_models=paid_models) + quotas.append(paid_quota) + if len(quotas) > 0: credentials = { "api_key": dify_config.HOSTED_DEEPSEEK_API_KEY, diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index 1ac02d9b6a..2772048d26 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -916,11 +916,17 @@ class ProviderManager: if dify_config.EDITION == "CLOUD": from services.credit_pool_service import CreditPoolService - pool = CreditPoolService.get_or_create_pool( + trail_pool = CreditPoolService.get_pool( tenant_id=tenant_id, + pool_type="trial", + ) + paid_pool = CreditPoolService.get_pool( + tenant_id=tenant_id, + pool_type="paid", ) else: - pool = None + trail_pool = None + paid_pool = None for provider_quota in provider_hosting_configuration.quotas: if provider_quota.quota_type not in quota_type_to_provider_records_dict: @@ -942,13 +948,23 @@ class ProviderManager: raise ValueError("quota_used is None") if provider_record.quota_limit is None: raise ValueError("quota_limit is None") - if provider_quota.quota_type == ProviderQuotaType.TRIAL and pool is not None: + if provider_quota.quota_type == ProviderQuotaType.TRIAL and trail_pool is not None: quota_configuration = QuotaConfiguration( quota_type=provider_quota.quota_type, quota_unit=provider_hosting_configuration.quota_unit or QuotaUnit.TOKENS, - quota_used=pool.quota_used, - quota_limit=pool.quota_limit, - is_valid=pool.quota_limit > pool.quota_used or pool.quota_limit == -1, + quota_used=trail_pool.quota_used, + quota_limit=trail_pool.quota_limit, + is_valid=trail_pool.quota_limit > trail_pool.quota_used or trail_pool.quota_limit == -1, + restrict_models=provider_quota.restrict_models, + ) + + elif provider_quota.quota_type == ProviderQuotaType.PAID and paid_pool is not None: + quota_configuration = QuotaConfiguration( + quota_type=provider_quota.quota_type, + quota_unit=provider_hosting_configuration.quota_unit or QuotaUnit.TOKENS, + quota_used=paid_pool.quota_used, + quota_limit=paid_pool.quota_limit, + is_valid=paid_pool.quota_limit > paid_pool.quota_used or paid_pool.quota_limit == -1, restrict_models=provider_quota.restrict_models, ) diff --git a/api/core/workflow/nodes/llm/llm_utils.py b/api/core/workflow/nodes/llm/llm_utils.py index ad969cdad1..054fbe033d 100644 --- a/api/core/workflow/nodes/llm/llm_utils.py +++ b/api/core/workflow/nodes/llm/llm_utils.py @@ -23,7 +23,7 @@ from libs.datetime_utils import naive_utc_now from models.model import Conversation from models.provider import Provider, ProviderType from models.provider_ids import ModelProviderID - +from core.entities.provider_entities import ProviderQuotaType from .exc import InvalidVariableTypeError, LLMModeRequiredError, ModelNotExistError @@ -136,21 +136,36 @@ def deduct_llm_quota(tenant_id: str, model_instance: ModelInstance, usage: LLMUs used_quota = 1 if used_quota is not None and system_configuration.current_quota_type is not None: - with Session(db.engine) as session: - stmt = ( - update(Provider) - .where( - Provider.tenant_id == tenant_id, - # TODO: Use provider name with prefix after the data migration. - Provider.provider_name == ModelProviderID(model_instance.provider).provider_name, - Provider.provider_type == ProviderType.SYSTEM.value, - Provider.quota_type == system_configuration.current_quota_type.value, - Provider.quota_limit > Provider.quota_used, - ) - .values( - quota_used=Provider.quota_used + used_quota, - last_used=naive_utc_now(), - ) + + if system_configuration.current_quota_type == ProviderQuotaType.TRIAL: + from services.credit_pool_service import CreditPoolService + CreditPoolService.check_and_deduct_credits( + tenant_id=tenant_id, + credits_required=used_quota, ) - session.execute(stmt) - session.commit() + elif system_configuration.current_quota_type == ProviderQuotaType.PAID: + from services.credit_pool_service import CreditPoolService + CreditPoolService.check_and_deduct_credits( + tenant_id=tenant_id, + credits_required=used_quota, + pool_type="paid", + ) + else: + with Session(db.engine) as session: + stmt = ( + update(Provider) + .where( + Provider.tenant_id == tenant_id, + # TODO: Use provider name with prefix after the data migration. + Provider.provider_name == ModelProviderID(model_instance.provider).provider_name, + Provider.provider_type == ProviderType.SYSTEM.value, + Provider.quota_type == system_configuration.current_quota_type.value, + Provider.quota_limit > Provider.quota_used, + ) + .values( + quota_used=Provider.quota_used + used_quota, + last_used=naive_utc_now(), + ) + ) + session.execute(stmt) + session.commit() diff --git a/api/events/event_handlers/update_provider_when_message_created.py b/api/events/event_handlers/update_provider_when_message_created.py index 9efe9a79af..12e0961bcc 100644 --- a/api/events/event_handlers/update_provider_when_message_created.py +++ b/api/events/event_handlers/update_provider_when_message_created.py @@ -133,18 +133,24 @@ def handle(sender: Message, **kwargs): system_configuration=system_configuration, model_name=model_config.model, ) - logger.info("used_quota: %s", used_quota) if used_quota is not None: if provider_configuration.system_configuration.current_quota_type == ProviderQuotaType.TRIAL: - logger.info("deduct credits") from services.credit_pool_service import CreditPoolService CreditPoolService.check_and_deduct_credits( tenant_id=tenant_id, credits_required=used_quota, + pool_type="trial", + ) + elif provider_configuration.system_configuration.current_quota_type == ProviderQuotaType.PAID: + from services.credit_pool_service import CreditPoolService + + CreditPoolService.check_and_deduct_credits( + tenant_id=tenant_id, + credits_required=used_quota, + pool_type="paid", ) else: - logger.info("update provider quota") quota_update = _ProviderUpdateOperation( filters=_ProviderUpdateFilters( tenant_id=tenant_id, diff --git a/api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py b/api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py index d298d885f4..b050008fc2 100644 --- a/api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py +++ b/api/migrations/versions/2025_09_25_1520-58a70d22fdbd_add_table_credit_pool.py @@ -32,8 +32,8 @@ def upgrade(): with op.batch_alter_table('tenant_credit_pools', schema=None) as batch_op: batch_op.create_index('tenant_credit_pool_pool_type_idx', ['pool_type'], unique=False) batch_op.create_index('tenant_credit_pool_tenant_id_idx', ['tenant_id'], unique=False) - # Data migration: Move trial quota data from providers to tenant_credit_pools - migrate_trial_quota_data() + # Data migration: Move quota data from providers to tenant_credit_pools + migrate_quota_data() # ### end Alembic commands ### @@ -48,49 +48,57 @@ def downgrade(): # ### end Alembic commands ### -def migrate_trial_quota_data(): +def migrate_quota_data(): """ Migrate quota data from providers table to tenant_credit_pools table - for providers with quota_type='trial', provider_name='openai', provider_type='system' + for providers with quota_type='trial' or 'paid', provider_name='openai', provider_type='system' """ # Create connection bind = op.get_bind() - # Query providers that match the criteria - select_sql = sa.text(""" - SELECT tenant_id, quota_limit, quota_used - FROM providers - WHERE quota_type = 'trial' - AND provider_name = 'openai' - AND provider_type = 'system' - AND quota_limit IS NOT NULL - """) + # Define quota type mappings + quota_type_mappings = ['trial', 'paid'] - result = bind.execute(select_sql) - providers_data = result.fetchall() - - # Insert data into tenant_credit_pools - for provider_data in providers_data: - tenant_id, quota_limit, quota_used = provider_data - - # Check if credit pool already exists for this tenant - check_sql = sa.text(""" - SELECT COUNT(*) - FROM tenant_credit_pools - WHERE tenant_id = :tenant_id AND pool_type = 'trial' + for quota_type in quota_type_mappings: + # Query providers that match the criteria + select_sql = sa.text(""" + SELECT tenant_id, quota_limit, quota_used + FROM providers + WHERE quota_type = :quota_type + AND provider_name = 'openai' + AND provider_type = 'system' + AND quota_limit IS NOT NULL """) - existing_count = bind.execute(check_sql, {"tenant_id": tenant_id}).scalar() + result = bind.execute(select_sql, {"quota_type": quota_type}) + providers_data = result.fetchall() - if existing_count == 0: - # Insert new credit pool record - insert_sql = sa.text(""" - INSERT INTO tenant_credit_pools (tenant_id, pool_type, quota_limit, quota_used, created_at, updated_at) - VALUES (:tenant_id, 'trial', :quota_limit, :quota_used, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) + # Insert data into tenant_credit_pools + for provider_data in providers_data: + tenant_id, quota_limit, quota_used = provider_data + + # Check if credit pool already exists for this tenant and pool type + check_sql = sa.text(""" + SELECT COUNT(*) + FROM tenant_credit_pools + WHERE tenant_id = :tenant_id AND pool_type = :pool_type """) - bind.execute(insert_sql, { + existing_count = bind.execute(check_sql, { "tenant_id": tenant_id, - "quota_limit": quota_limit or 0, - "quota_used": quota_used or 0 - }) + "pool_type": quota_type + }).scalar() + + if existing_count == 0: + # Insert new credit pool record + insert_sql = sa.text(""" + INSERT INTO tenant_credit_pools (tenant_id, pool_type, quota_limit, quota_used, created_at, updated_at) + VALUES (:tenant_id, :pool_type, :quota_limit, :quota_used, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) + """) + + bind.execute(insert_sql, { + "tenant_id": tenant_id, + "pool_type": quota_type, + "quota_limit": quota_limit or 0, + "quota_used": quota_used or 0 + }) diff --git a/api/services/credit_pool_service.py b/api/services/credit_pool_service.py index f72686b9ff..fc2d875bd0 100644 --- a/api/services/credit_pool_service.py +++ b/api/services/credit_pool_service.py @@ -7,6 +7,7 @@ from configs import dify_config from core.errors.error import QuotaExceededError from extensions.ext_database import db from models import TenantCreditPool +from sqlalchemy.orm import Session logger = logging.getLogger(__name__) @@ -23,62 +24,27 @@ class CreditPoolService: return credit_pool @classmethod - def get_pool(cls, tenant_id: str) -> Optional[TenantCreditPool]: + def get_pool(cls, tenant_id: str, pool_type: str = "trial") -> Optional[TenantCreditPool]: """get tenant credit pool""" return ( db.session.query(TenantCreditPool) .filter_by( tenant_id=tenant_id, + pool_type=pool_type, ) .first() ) - @classmethod - def get_or_create_pool(cls, tenant_id: str) -> TenantCreditPool: - """get or create credit pool""" - # First try to get existing pool - pool = cls.get_pool(tenant_id) - if pool: - return pool - - # Create new pool if not exists, handle race condition - try: - # Double-check in case another thread created it - pool = ( - db.session.query(TenantCreditPool) - .filter_by( - tenant_id=tenant_id, - ) - .first() - ) - if pool: - return pool - - # Create new pool - pool = TenantCreditPool( - tenant_id=tenant_id, quota_limit=dify_config.HOSTED_POOL_CREDITS, quota_used=0, pool_type="trial" - ) - db.session.add(pool) - db.session.commit() - - except Exception: - # If creation fails (e.g., due to race condition), rollback and try to get existing one - db.session.rollback() - pool = cls.get_pool(tenant_id) - if not pool: - raise - - return pool - @classmethod def check_and_deduct_credits( cls, tenant_id: str, credits_required: int, + pool_type: str = "trial", ): """check and deduct credits""" - logger.info("check and deduct credits") - pool = cls.get_pool(tenant_id) + + pool = cls.get_pool(tenant_id, pool_type) if not pool: raise QuotaExceededError("Credit pool not found") @@ -86,24 +52,17 @@ class CreditPoolService: raise QuotaExceededError( f"Insufficient credits. Required: {credits_required}, Available: {pool.remaining_credits}" ) + try: + with Session(db.engine) as session: + update_values = {"quota_used": pool.quota_used + credits_required} - with db.session.begin(): - update_values = {"quota_used": pool.quota_used + credits_required} - - where_conditions = [ - TenantCreditPool.tenant_id == tenant_id, - TenantCreditPool.quota_used + credits_required <= TenantCreditPool.quota_limit, - ] - stmt = update(TenantCreditPool).where(*where_conditions).values(**update_values) - db.session.execute(stmt) - - @classmethod - def check_deduct_credits(cls, tenant_id: str, credits_required: int) -> bool: - """check and deduct credits""" - pool = cls.get_pool(tenant_id) - if not pool: - return False - - if pool.remaining_credits < credits_required: - return False - return True + where_conditions = [ + TenantCreditPool.pool_type == pool_type, + TenantCreditPool.tenant_id == tenant_id, + TenantCreditPool.quota_used + credits_required <= TenantCreditPool.quota_limit, + ] + stmt = update(TenantCreditPool).where(*where_conditions).values(**update_values) + session.execute(stmt) + session.commit() + except Exception: + raise QuotaExceededError("Failed to deduct credits") diff --git a/api/services/workspace_service.py b/api/services/workspace_service.py index a21aac1984..c71a19636d 100644 --- a/api/services/workspace_service.py +++ b/api/services/workspace_service.py @@ -49,8 +49,14 @@ class WorkspaceService: if dify_config.EDITION == "CLOUD": from services.credit_pool_service import CreditPoolService - pool = CreditPoolService.get_or_create_pool(tenant_id=tenant.id) - tenant_info["trial_credits"] = pool.quota_limit - tenant_info["trial_credits_used"] = pool.quota_used + paid_pool = CreditPoolService.get_pool(tenant_id=tenant.id, pool_type="paid") + if paid_pool: + tenant_info["trial_credits"] = paid_pool.quota_limit + tenant_info["trial_credits_used"] = paid_pool.quota_used + else: + trial_pool = CreditPoolService.get_pool(tenant_id=tenant.id, pool_type="trial") + if trial_pool: + tenant_info["trial_credits"] = trial_pool.quota_limit + tenant_info["trial_credits_used"] = trial_pool.quota_used return tenant_info From c3e3a18ab465411e21bb54fe8bc8be56541976e1 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Fri, 26 Sep 2025 12:49:35 +0800 Subject: [PATCH 04/48] add paid credit --- api/core/hosting_configuration.py | 2 +- api/core/provider_manager.py | 4 ++-- api/core/workflow/nodes/llm/llm_utils.py | 4 ++-- api/services/credit_pool_service.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/core/hosting_configuration.py b/api/core/hosting_configuration.py index ed08ecf57b..92babd5056 100644 --- a/api/core/hosting_configuration.py +++ b/api/core/hosting_configuration.py @@ -202,7 +202,7 @@ class HostingConfiguration: if dify_config.HOSTED_ANTHROPIC_PAID_ENABLED: paid_quota = PaidHostingQuota() paid_models = self.parse_restrict_models_from_env("HOSTED_ANTHROPIC_PAID_MODELS") - quotas.append(paid_quota,restrict_models=paid_models) + quotas.append(paid_quota, restrict_models=paid_models) if len(quotas) > 0: credentials = { diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index 2772048d26..a2c9dde63c 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -948,7 +948,7 @@ class ProviderManager: raise ValueError("quota_used is None") if provider_record.quota_limit is None: raise ValueError("quota_limit is None") - if provider_quota.quota_type == ProviderQuotaType.TRIAL and trail_pool is not None: + if provider_quota.quota_type == ProviderQuotaType.TRIAL and trail_pool is not None: quota_configuration = QuotaConfiguration( quota_type=provider_quota.quota_type, quota_unit=provider_hosting_configuration.quota_unit or QuotaUnit.TOKENS, @@ -958,7 +958,7 @@ class ProviderManager: restrict_models=provider_quota.restrict_models, ) - elif provider_quota.quota_type == ProviderQuotaType.PAID and paid_pool is not None: + elif provider_quota.quota_type == ProviderQuotaType.PAID and paid_pool is not None: quota_configuration = QuotaConfiguration( quota_type=provider_quota.quota_type, quota_unit=provider_hosting_configuration.quota_unit or QuotaUnit.TOKENS, diff --git a/api/core/workflow/nodes/llm/llm_utils.py b/api/core/workflow/nodes/llm/llm_utils.py index 054fbe033d..194ad43151 100644 --- a/api/core/workflow/nodes/llm/llm_utils.py +++ b/api/core/workflow/nodes/llm/llm_utils.py @@ -6,7 +6,7 @@ from sqlalchemy.orm import Session from configs import dify_config from core.app.entities.app_invoke_entities import ModelConfigWithCredentialsEntity -from core.entities.provider_entities import QuotaUnit +from core.entities.provider_entities import ProviderQuotaType, QuotaUnit from core.file.models import File from core.memory.token_buffer_memory import TokenBufferMemory from core.model_manager import ModelInstance, ModelManager @@ -23,7 +23,7 @@ from libs.datetime_utils import naive_utc_now from models.model import Conversation from models.provider import Provider, ProviderType from models.provider_ids import ModelProviderID -from core.entities.provider_entities import ProviderQuotaType + from .exc import InvalidVariableTypeError, LLMModeRequiredError, ModelNotExistError diff --git a/api/services/credit_pool_service.py b/api/services/credit_pool_service.py index fc2d875bd0..108ee05e45 100644 --- a/api/services/credit_pool_service.py +++ b/api/services/credit_pool_service.py @@ -2,12 +2,12 @@ import logging from typing import Optional from sqlalchemy import update +from sqlalchemy.orm import Session from configs import dify_config from core.errors.error import QuotaExceededError from extensions.ext_database import db from models import TenantCreditPool -from sqlalchemy.orm import Session logger = logging.getLogger(__name__) From da27d261b09830f969fe52bc80e28f7dc0af20d5 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Fri, 26 Sep 2025 13:11:14 +0800 Subject: [PATCH 05/48] fix: add paid quota error for init_anthropic --- api/core/hosting_configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/hosting_configuration.py b/api/core/hosting_configuration.py index 92babd5056..29642d8c7a 100644 --- a/api/core/hosting_configuration.py +++ b/api/core/hosting_configuration.py @@ -200,9 +200,9 @@ class HostingConfiguration: quotas.append(trial_quota) if dify_config.HOSTED_ANTHROPIC_PAID_ENABLED: - paid_quota = PaidHostingQuota() paid_models = self.parse_restrict_models_from_env("HOSTED_ANTHROPIC_PAID_MODELS") - quotas.append(paid_quota, restrict_models=paid_models) + paid_quota = PaidHostingQuota(restrict_models=paid_models) + quotas.append(paid_quota) if len(quotas) > 0: credentials = { From 560fe8a0f6b67c9397f6c9898454fdb46fa97a99 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Fri, 26 Sep 2025 13:33:32 +0800 Subject: [PATCH 06/48] fix: format --- api/core/provider_manager.py | 2 +- api/core/workflow/nodes/llm/llm_utils.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index a2c9dde63c..489af29460 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -957,7 +957,7 @@ class ProviderManager: is_valid=trail_pool.quota_limit > trail_pool.quota_used or trail_pool.quota_limit == -1, restrict_models=provider_quota.restrict_models, ) - + elif provider_quota.quota_type == ProviderQuotaType.PAID and paid_pool is not None: quota_configuration = QuotaConfiguration( quota_type=provider_quota.quota_type, diff --git a/api/core/workflow/nodes/llm/llm_utils.py b/api/core/workflow/nodes/llm/llm_utils.py index 194ad43151..0af4024d3e 100644 --- a/api/core/workflow/nodes/llm/llm_utils.py +++ b/api/core/workflow/nodes/llm/llm_utils.py @@ -136,15 +136,16 @@ def deduct_llm_quota(tenant_id: str, model_instance: ModelInstance, usage: LLMUs used_quota = 1 if used_quota is not None and system_configuration.current_quota_type is not None: - if system_configuration.current_quota_type == ProviderQuotaType.TRIAL: from services.credit_pool_service import CreditPoolService + CreditPoolService.check_and_deduct_credits( tenant_id=tenant_id, credits_required=used_quota, ) elif system_configuration.current_quota_type == ProviderQuotaType.PAID: from services.credit_pool_service import CreditPoolService + CreditPoolService.check_and_deduct_credits( tenant_id=tenant_id, credits_required=used_quota, From 0360f0b33bd5f04abd63f6fd189485dcaad9402d Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Fri, 26 Sep 2025 14:31:26 +0800 Subject: [PATCH 07/48] fix: create paid provider auto --- api/core/provider_manager.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index 489af29460..3ecd646862 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -618,9 +618,9 @@ class ProviderManager: ) for quota in configuration.quotas: - if quota.quota_type == ProviderQuotaType.TRIAL: + if quota.quota_type in (ProviderQuotaType.TRIAL, ProviderQuotaType.PAID): # Init trial provider records if not exists - if ProviderQuotaType.TRIAL not in provider_quota_to_provider_record_dict: + if quota.quota_type not in provider_quota_to_provider_record_dict: try: # FIXME ignore the type error, only TrialHostingQuota has limit need to change the logic new_provider_record = Provider( @@ -628,7 +628,7 @@ class ProviderManager: # TODO: Use provider name with prefix after the data migration. provider_name=ModelProviderID(provider_name).provider_name, provider_type=ProviderType.SYSTEM.value, - quota_type=ProviderQuotaType.TRIAL.value, + quota_type=quota.quota_type, quota_limit=0, # type: ignore quota_used=0, is_valid=True, @@ -642,7 +642,7 @@ class ProviderManager: Provider.tenant_id == tenant_id, Provider.provider_name == ModelProviderID(provider_name).provider_name, Provider.provider_type == ProviderType.SYSTEM.value, - Provider.quota_type == ProviderQuotaType.TRIAL.value, + Provider.quota_type == quota.quota_type, ) existed_provider_record = db.session.scalar(stmt) if not existed_provider_record: @@ -652,7 +652,7 @@ class ProviderManager: existed_provider_record.is_valid = True db.session.commit() - provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) + provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) return provider_name_to_provider_records_dict @@ -918,11 +918,11 @@ class ProviderManager: trail_pool = CreditPoolService.get_pool( tenant_id=tenant_id, - pool_type="trial", + pool_type=ProviderQuotaType.TRIAL.value, ) paid_pool = CreditPoolService.get_pool( tenant_id=tenant_id, - pool_type="paid", + pool_type=ProviderQuotaType.PAID.value, ) else: trail_pool = None From e1819fb7e574532c2dcd6a5ce7c572f8acb1e794 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 02:50:01 +0000 Subject: [PATCH 08/48] [autofix.ci] apply automated fixes --- api/core/provider_manager.py | 4 ++-- api/services/credit_pool_service.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index 3ecd646862..522dc6c372 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -620,7 +620,7 @@ class ProviderManager: for quota in configuration.quotas: if quota.quota_type in (ProviderQuotaType.TRIAL, ProviderQuotaType.PAID): # Init trial provider records if not exists - if quota.quota_type not in provider_quota_to_provider_record_dict: + if quota.quota_type not in provider_quota_to_provider_record_dict: try: # FIXME ignore the type error, only TrialHostingQuota has limit need to change the logic new_provider_record = Provider( @@ -652,7 +652,7 @@ class ProviderManager: existed_provider_record.is_valid = True db.session.commit() - provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) + provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) return provider_name_to_provider_records_dict diff --git a/api/services/credit_pool_service.py b/api/services/credit_pool_service.py index 108ee05e45..5f14735d1f 100644 --- a/api/services/credit_pool_service.py +++ b/api/services/credit_pool_service.py @@ -24,7 +24,7 @@ class CreditPoolService: return credit_pool @classmethod - def get_pool(cls, tenant_id: str, pool_type: str = "trial") -> Optional[TenantCreditPool]: + def get_pool(cls, tenant_id: str, pool_type: str = "trial") -> TenantCreditPool | None: """get tenant credit pool""" return ( db.session.query(TenantCreditPool) From e056e0835aec0670ea073c804bdb580f3ac52d4e Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 02:51:51 +0000 Subject: [PATCH 09/48] [autofix.ci] apply automated fixes (attempt 2/3) --- api/services/credit_pool_service.py | 1 - 1 file changed, 1 deletion(-) diff --git a/api/services/credit_pool_service.py b/api/services/credit_pool_service.py index 5f14735d1f..8ae409809a 100644 --- a/api/services/credit_pool_service.py +++ b/api/services/credit_pool_service.py @@ -1,5 +1,4 @@ import logging -from typing import Optional from sqlalchemy import update from sqlalchemy.orm import Session From 5b813970548cb66d3c3a69752c31a54cf9dadd0e Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Thu, 9 Oct 2025 11:08:24 +0800 Subject: [PATCH 10/48] fix test case --- api/tests/unit_tests/services/test_account_service.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/tests/unit_tests/services/test_account_service.py b/api/tests/unit_tests/services/test_account_service.py index 737202f8de..aec8efd880 100644 --- a/api/tests/unit_tests/services/test_account_service.py +++ b/api/tests/unit_tests/services/test_account_service.py @@ -619,8 +619,13 @@ class TestTenantService: mock_tenant_instance.name = "Test User's Workspace" mock_tenant_class.return_value = mock_tenant_instance - # Execute test - TenantService.create_owner_tenant_if_not_exist(mock_account) + # Mock the db import in CreditPoolService to avoid database connection + with patch("services.credit_pool_service.db") as mock_credit_pool_db: + mock_credit_pool_db.session.add = MagicMock() + mock_credit_pool_db.session.commit = MagicMock() + + # Execute test + TenantService.create_owner_tenant_if_not_exist(mock_account) # Verify tenant was created with correct parameters mock_db_dependencies["db"].session.add.assert_called() From f71ad55d58bba2a7ef40268846239e3f2539f9c3 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Thu, 9 Oct 2025 11:08:52 +0800 Subject: [PATCH 11/48] fix test case --- api/core/provider_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index 3ecd646862..522dc6c372 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -620,7 +620,7 @@ class ProviderManager: for quota in configuration.quotas: if quota.quota_type in (ProviderQuotaType.TRIAL, ProviderQuotaType.PAID): # Init trial provider records if not exists - if quota.quota_type not in provider_quota_to_provider_record_dict: + if quota.quota_type not in provider_quota_to_provider_record_dict: try: # FIXME ignore the type error, only TrialHostingQuota has limit need to change the logic new_provider_record = Provider( @@ -652,7 +652,7 @@ class ProviderManager: existed_provider_record.is_valid = True db.session.commit() - provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) + provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) return provider_name_to_provider_records_dict From c0ed353c105201161d27bdbfdc8ed646d2d14ed2 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Sat, 11 Oct 2025 11:45:18 +0800 Subject: [PATCH 12/48] add credit next_credit_reset_date --- api/services/feature_service.py | 4 ++++ api/services/workspace_service.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/api/services/feature_service.py b/api/services/feature_service.py index 19d96cb972..b2b7df181a 100644 --- a/api/services/feature_service.py +++ b/api/services/feature_service.py @@ -131,6 +131,7 @@ class FeatureModel(BaseModel): # pydantic configs model_config = ConfigDict(protected_namespaces=()) knowledge_pipeline: KnowledgePipeline = KnowledgePipeline() + next_credit_reset_date: int = 0 class KnowledgeRateLimitModel(BaseModel): @@ -278,6 +279,9 @@ class FeatureService: if "knowledge_pipeline_publish_enabled" in billing_info: features.knowledge_pipeline.publish_enabled = billing_info["knowledge_pipeline_publish_enabled"] + + if "next_credit_reset_date" in billing_info: + features.next_credit_reset_date = billing_info["next_credit_reset_date"] @classmethod def _fulfill_params_from_enterprise(cls, features: SystemFeatureModel): diff --git a/api/services/workspace_service.py b/api/services/workspace_service.py index c71a19636d..f33489c7bc 100644 --- a/api/services/workspace_service.py +++ b/api/services/workspace_service.py @@ -1,3 +1,4 @@ +from dify.api.configs import feature from flask_login import current_user from configs import dify_config @@ -31,7 +32,8 @@ class WorkspaceService: assert tenant_account_join is not None, "TenantAccountJoin not found" tenant_info["role"] = tenant_account_join.role - can_replace_logo = FeatureService.get_features(tenant.id).can_replace_logo + feature = FeatureService.get_features(tenant.id) + can_replace_logo = feature.can_replace_logo if can_replace_logo and TenantService.has_roles(tenant, [TenantAccountRole.OWNER, TenantAccountRole.ADMIN]): base_url = dify_config.FILES_URL @@ -47,6 +49,9 @@ class WorkspaceService: "replace_webapp_logo": replace_webapp_logo, } if dify_config.EDITION == "CLOUD": + + tenant_info["next_credit_reset_date"] = feature.next_credit_reset_date + from services.credit_pool_service import CreditPoolService paid_pool = CreditPoolService.get_pool(tenant_id=tenant.id, pool_type="paid") From 1d16528dff5588257cf8b8bedcd0e81348b3d23e Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Sat, 11 Oct 2025 11:45:24 +0800 Subject: [PATCH 13/48] add credit next_credit_reset_date --- api/services/workspace_service.py | 1 - 1 file changed, 1 deletion(-) diff --git a/api/services/workspace_service.py b/api/services/workspace_service.py index f33489c7bc..cf2c6cea1c 100644 --- a/api/services/workspace_service.py +++ b/api/services/workspace_service.py @@ -1,4 +1,3 @@ -from dify.api.configs import feature from flask_login import current_user from configs import dify_config From 1ddd4bc549df0f8bc148343efb0d24be1dccf93a Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Sat, 11 Oct 2025 12:03:53 +0800 Subject: [PATCH 14/48] mr credit pool --- api/controllers/console/workspace/workspace.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/controllers/console/workspace/workspace.py b/api/controllers/console/workspace/workspace.py index 5242e6e04c..8cf17bbfb9 100644 --- a/api/controllers/console/workspace/workspace.py +++ b/api/controllers/console/workspace/workspace.py @@ -53,6 +53,7 @@ tenant_fields = { "custom_config": fields.Raw(attribute="custom_config"), "trial_credits": fields.Integer, "trial_credits_used": fields.Integer, + "next_credit_reset_date": fields.Integer, } tenants_fields = { From db5c51ffc5144955abc9d9ff9556b35afebbf1a9 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Wed, 15 Oct 2025 10:50:46 +0800 Subject: [PATCH 15/48] add default trial models --- .../feature/hosted_service/__init__.py | 73 +++++++++++++++++-- 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/api/configs/feature/hosted_service/__init__.py b/api/configs/feature/hosted_service/__init__.py index 6415bd239d..ffbea931da 100644 --- a/api/configs/feature/hosted_service/__init__.py +++ b/api/configs/feature/hosted_service/__init__.py @@ -65,14 +65,46 @@ class HostedOpenAiConfig(BaseSettings): HOSTED_OPENAI_TRIAL_MODELS: str = Field( description="Comma-separated list of available models for trial access", - default="gpt-3.5-turbo," - "gpt-3.5-turbo-1106," - "gpt-3.5-turbo-instruct," + default="gpt-4," + "gpt-4-turbo-preview," + "gpt-4-turbo-2024-04-09," + "gpt-4-1106-preview," + "gpt-4-0125-preview," + "gpt-4-turbo," + "gpt-4.1," + "gpt-4.1-2025-04-14," + "gpt-4.1-mini," + "gpt-4.1-mini-2025-04-14," + "gpt-4.1-nano," + "gpt-4.1-nano-2025-04-14," + "gpt-3.5-turbo," "gpt-3.5-turbo-16k," "gpt-3.5-turbo-16k-0613," + "gpt-3.5-turbo-1106," "gpt-3.5-turbo-0613," "gpt-3.5-turbo-0125," - "text-davinci-003", + "gpt-3.5-turbo-instruct," + "text-davinci-003," + "chatgpt-4o-latest," + "gpt-4o," + "gpt-4o-2024-05-13," + "gpt-4o-2024-08-06," + "gpt-4o-2024-11-20," + "gpt-4o-audio-preview," + "gpt-4o-audio-preview-2025-06-03," + "gpt-4o-mini," + "gpt-4o-mini-2024-07-18," + "o3-mini," + "o3-mini-2025-01-31," + "gpt-5-mini-2025-08-07," + "gpt-5-mini," + "o4-mini," + "o4-mini-2025-04-16," + "gpt-5-chat-latest," + "gpt-5," + "gpt-5-2025-08-07," + "gpt-5-nano," + "gpt-5-nano-2025-08-07", ) HOSTED_OPENAI_PAID_ENABLED: bool = Field( @@ -87,6 +119,13 @@ class HostedOpenAiConfig(BaseSettings): "gpt-4-turbo-2024-04-09," "gpt-4-1106-preview," "gpt-4-0125-preview," + "gpt-4-turbo," + "gpt-4.1," + "gpt-4.1-2025-04-14," + "gpt-4.1-mini," + "gpt-4.1-mini-2025-04-14," + "gpt-4.1-nano," + "gpt-4.1-nano-2025-04-14," "gpt-3.5-turbo," "gpt-3.5-turbo-16k," "gpt-3.5-turbo-16k-0613," @@ -94,7 +133,27 @@ class HostedOpenAiConfig(BaseSettings): "gpt-3.5-turbo-0613," "gpt-3.5-turbo-0125," "gpt-3.5-turbo-instruct," - "text-davinci-003", + "text-davinci-003," + "chatgpt-4o-latest," + "gpt-4o," + "gpt-4o-2024-05-13," + "gpt-4o-2024-08-06," + "gpt-4o-2024-11-20," + "gpt-4o-audio-preview," + "gpt-4o-audio-preview-2025-06-03," + "gpt-4o-mini," + "gpt-4o-mini-2024-07-18," + "o3-mini," + "o3-mini-2025-01-31," + "gpt-5-mini-2025-08-07," + "gpt-5-mini," + "o4-mini," + "o4-mini-2025-04-16," + "gpt-5-chat-latest," + "gpt-5," + "gpt-5-2025-08-07," + "gpt-5-nano," + "gpt-5-nano-2025-08-07", ) @@ -217,7 +276,7 @@ class HostedDeepseekConfig(BaseSettings): HOSTED_DEEPSEEK_PAID_MODELS: str = Field( description="Comma-separated list of available models for paid access", - default="grok-3,grok-3-mini,grok-3-mini-fast", + default="deepseek-chat,deepseek-reasoner", ) @@ -275,7 +334,6 @@ class HostedAnthropicConfig(BaseSettings): HOSTED_ANTHROPIC_TRIAL_MODELS: str = Field( description="Comma-separated list of available models for paid access", default="claude-opus-4-20250514," - "claude-opus-4-20250514," "claude-sonnet-4-20250514," "claude-3-5-haiku-20241022," "claude-3-opus-20240229," @@ -285,7 +343,6 @@ class HostedAnthropicConfig(BaseSettings): HOSTED_ANTHROPIC_PAID_MODELS: str = Field( description="Comma-separated list of available models for paid access", default="claude-opus-4-20250514," - "claude-opus-4-20250514," "claude-sonnet-4-20250514," "claude-3-5-haiku-20241022," "claude-3-opus-20240229," From 7d7cce04eb35fb2b384318fa04bf420c269a5c8b Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 03:53:44 +0000 Subject: [PATCH 16/48] [autofix.ci] apply automated fixes --- api/services/feature_service.py | 2 +- api/services/workspace_service.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/api/services/feature_service.py b/api/services/feature_service.py index 13061f5a7c..9b853b8337 100644 --- a/api/services/feature_service.py +++ b/api/services/feature_service.py @@ -301,7 +301,7 @@ class FeatureService: if "knowledge_pipeline_publish_enabled" in billing_info: features.knowledge_pipeline.publish_enabled = billing_info["knowledge_pipeline_publish_enabled"] - + if "next_credit_reset_date" in billing_info: features.next_credit_reset_date = billing_info["next_credit_reset_date"] diff --git a/api/services/workspace_service.py b/api/services/workspace_service.py index cf2c6cea1c..3ee41c2e8d 100644 --- a/api/services/workspace_service.py +++ b/api/services/workspace_service.py @@ -48,7 +48,6 @@ class WorkspaceService: "replace_webapp_logo": replace_webapp_logo, } if dify_config.EDITION == "CLOUD": - tenant_info["next_credit_reset_date"] = feature.next_credit_reset_date from services.credit_pool_service import CreditPoolService From f2842da3972043e804d5426595c35883c8484b1a Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 23 Dec 2025 16:58:55 +0800 Subject: [PATCH 17/48] chore(web): new lint setup (#30020) Co-authored-by: yyh --- .github/workflows/autofix.yml | 21 - .gitignore | 11 - web/.gitignore | 10 + web/.oxlintrc.json | 144 - web/.storybook/preview.tsx | 2 +- web/.storybook/utils/form-story-wrapper.tsx | 9 +- web/.vscode/launch.json | 28 +- web/.vscode/settings.example.json | 66 +- web/__mocks__/provider-context.ts | 4 +- web/__tests__/check-i18n.test.ts | 8 +- web/__tests__/description-validation.test.tsx | 12 +- .../document-detail-navigation-fix.test.tsx | 29 +- web/__tests__/document-list-sorting.test.tsx | 12 +- web/__tests__/embedded-user-id-auth.test.tsx | 4 +- web/__tests__/embedded-user-id-store.test.tsx | 6 +- .../goto-anything/command-selector.test.tsx | 6 +- .../goto-anything/match-action.test.ts | 8 +- .../goto-anything/scope-command-tags.test.tsx | 17 +- .../search-error-handling.test.ts | 2 +- .../slash-command-modes.test.tsx | 8 +- web/__tests__/i18n-upload-features.test.ts | 28 +- web/__tests__/navigation-utils.test.ts | 56 +- web/__tests__/real-browser-flicker.test.tsx | 71 +- web/__tests__/unified-tags-logic.test.ts | 12 +- .../workflow-onboarding-integration.test.tsx | 32 +- .../workflow-parallel-limit.test.tsx | 15 +- web/__tests__/xss-prevention.test.tsx | 2 +- .../[appId]/develop/page.tsx | 4 +- .../(appDetailLayout)/[appId]/layout-main.tsx | 55 +- .../[appId]/overview/card-view.tsx | 44 +- .../[appId]/overview/chart-view.tsx | 62 +- .../overview/long-time-range-picker.tsx | 15 +- .../[appId]/overview/page.tsx | 2 +- .../time-range-picker/date-picker.tsx | 20 +- .../overview/time-range-picker/index.tsx | 27 +- .../time-range-picker/range-selector.tsx | 24 +- .../svg-attribute-error-reproduction.spec.tsx | 4 +- .../overview/tracing/config-button.tsx | 12 +- .../[appId]/overview/tracing/config-popup.tsx | 102 +- .../[appId]/overview/tracing/field.tsx | 13 +- .../[appId]/overview/tracing/panel.tsx | 60 +- .../tracing/provider-config-modal.tsx | 806 +++--- .../overview/tracing/provider-panel.tsx | 30 +- .../[appId]/overview/tracing/tracing-icon.tsx | 4 +- .../[appId]/workflow/page.tsx | 2 +- .../app/(appDetailLayout)/layout.tsx | 2 +- .../documents/[documentId]/page.tsx | 2 +- .../documents/[documentId]/settings/page.tsx | 2 +- .../[datasetId]/layout-main.tsx | 29 +- .../[datasetId]/pipeline/page.tsx | 2 +- .../[datasetId]/settings/page.tsx | 10 +- web/app/(commonLayout)/datasets/layout.tsx | 6 +- .../(commonLayout)/education-apply/page.tsx | 8 +- web/app/(commonLayout)/layout.tsx | 18 +- web/app/(commonLayout)/plugins/page.tsx | 4 +- web/app/(commonLayout)/tools/page.tsx | 1 + .../components/authenticated-layout.tsx | 56 +- web/app/(shareLayout)/components/splash.tsx | 35 +- .../webapp-reset-password/check-code/page.tsx | 72 +- .../webapp-reset-password/layout.tsx | 47 +- .../webapp-reset-password/page.tsx | 74 +- .../set-password/page.tsx | 61 +- .../webapp-signin/check-code/page.tsx | 91 +- .../components/external-member-sso-auth.tsx | 18 +- .../components/mail-and-code-auth.tsx | 33 +- .../components/mail-and-password-auth.tsx | 138 +- .../webapp-signin/components/sso-auth.tsx | 11 +- .../(shareLayout)/webapp-signin/layout.tsx | 38 +- .../webapp-signin/normalForm.tsx | 243 +- web/app/(shareLayout)/webapp-signin/page.tsx | 44 +- .../account-page/AvatarWithEdit.tsx | 54 +- .../account-page/email-change-modal.tsx | 118 +- .../(commonLayout)/account-page/index.tsx | 143 +- web/app/account/(commonLayout)/avatar.tsx | 38 +- .../delete-account/components/check-email.tsx | 49 +- .../delete-account/components/feed-back.tsx | 47 +- .../components/verify-email.tsx | 53 +- .../(commonLayout)/delete-account/index.tsx | 39 +- web/app/account/(commonLayout)/header.tsx | 36 +- web/app/account/(commonLayout)/layout.tsx | 14 +- web/app/account/(commonLayout)/page.tsx | 10 +- web/app/account/oauth/authorize/layout.tsx | 53 +- web/app/account/oauth/authorize/page.tsx | 80 +- web/app/activate/activateForm.tsx | 11 +- web/app/activate/page.tsx | 16 +- web/app/components/app-sidebar/app-info.tsx | 150 +- .../components/app-sidebar/app-operations.tsx | 43 +- .../app-sidebar/app-sidebar-dropdown.tsx | 54 +- web/app/components/app-sidebar/basic.tsx | 123 +- .../app-sidebar/dataset-info/dropdown.tsx | 40 +- .../app-sidebar/dataset-info/index.spec.tsx | 16 +- .../app-sidebar/dataset-info/index.tsx | 30 +- .../app-sidebar/dataset-info/menu-item.tsx | 8 +- .../app-sidebar/dataset-info/menu.tsx | 14 +- .../app-sidebar/dataset-sidebar-dropdown.tsx | 64 +- web/app/components/app-sidebar/index.tsx | 30 +- .../components/app-sidebar/navLink.spec.tsx | 6 +- web/app/components/app-sidebar/navLink.tsx | 33 +- .../sidebar-animation-issues.spec.tsx | 25 +- .../text-squeeze-fix-verification.spec.tsx | 11 +- .../components/app-sidebar/toggle-button.tsx | 26 +- .../edit-item/index.spec.tsx | 8 +- .../add-annotation-modal/edit-item/index.tsx | 12 +- .../add-annotation-modal/index.spec.tsx | 24 +- .../annotation/add-annotation-modal/index.tsx | 27 +- .../app/annotation/batch-action.spec.tsx | 4 +- .../app/annotation/batch-action.tsx | 27 +- .../csv-downloader.spec.tsx | 6 +- .../csv-downloader.tsx | 46 +- .../csv-uploader.spec.tsx | 5 +- .../csv-uploader.tsx | 34 +- .../batch-add-annotation-modal/index.spec.tsx | 12 +- .../batch-add-annotation-modal/index.tsx | 26 +- .../index.spec.tsx | 10 +- .../index.tsx | 2 +- .../edit-annotation-modal/edit-item/index.tsx | 131 +- .../edit-annotation-modal/index.spec.tsx | 3 +- .../edit-annotation-modal/index.tsx | 44 +- .../app/annotation/empty-element.spec.tsx | 2 +- .../app/annotation/empty-element.tsx | 19 +- .../components/app/annotation/filter.spec.tsx | 5 +- web/app/components/app/annotation/filter.tsx | 4 +- .../app/annotation/header-opts/index.spec.tsx | 35 +- .../app/annotation/header-opts/index.tsx | 80 +- .../components/app/annotation/index.spec.tsx | 15 +- web/app/components/app/annotation/index.tsx | 119 +- .../components/app/annotation/list.spec.tsx | 6 +- web/app/components/app/annotation/list.tsx | 58 +- .../index.spec.tsx | 10 +- .../hit-history-no-data.tsx | 8 +- .../view-annotation-modal/index.spec.tsx | 13 +- .../view-annotation-modal/index.tsx | 164 +- .../access-control-dialog.tsx | 6 +- .../access-control-item.tsx | 26 +- .../access-control.spec.tsx | 18 +- .../add-member-or-group-pop.tsx | 209 +- .../app/app-access-control/index.tsx | 94 +- .../specific-groups-or-members.tsx | 134 +- .../app/app-publisher/features-wrapper.tsx | 17 +- .../components/app/app-publisher/index.tsx | 434 +-- .../publish-with-multiple-model.tsx | 39 +- .../app/app-publisher/suggested-action.tsx | 14 +- .../app/app-publisher/version-info-modal.tsx | 87 +- .../base/feature-panel/index.tsx | 10 +- .../configuration/base/group-name/index.tsx | 10 +- .../base/operation-btn/index.spec.tsx | 12 +- .../base/operation-btn/index.tsx | 15 +- .../base/var-highlight/index.tsx | 4 +- .../cannot-query-dataset.spec.tsx | 6 +- .../warning-mask/cannot-query-dataset.tsx | 12 +- .../warning-mask/formatting-changed.spec.tsx | 6 +- .../base/warning-mask/formatting-changed.tsx | 10 +- .../warning-mask/has-not-set-api.spec.tsx | 8 +- .../base/warning-mask/has-not-set-api.tsx | 9 +- .../base/warning-mask/index.spec.tsx | 4 +- .../configuration/base/warning-mask/index.tsx | 11 +- .../config-prompt/advanced-prompt-input.tsx | 136 +- .../confirm-add-var/index.spec.tsx | 2 +- .../config-prompt/confirm-add-var/index.tsx | 28 +- .../conversation-history/edit-modal.spec.tsx | 6 +- .../conversation-history/edit-modal.tsx | 21 +- .../history-panel.spec.tsx | 2 +- .../conversation-history/history-panel.tsx | 45 +- .../config-prompt/index.spec.tsx | 10 +- .../app/configuration/config-prompt/index.tsx | 80 +- .../message-type-selector.spec.tsx | 4 +- .../config-prompt/message-type-selector.tsx | 30 +- .../prompt-editor-height-resize-wrap.spec.tsx | 2 +- .../prompt-editor-height-resize-wrap.tsx | 14 +- .../config-prompt/simple-prompt-input.tsx | 62 +- .../config-var/config-modal/config.ts | 4 +- .../config-var/config-modal/field.tsx | 12 +- .../config-var/config-modal/index.tsx | 102 +- .../config-var/config-modal/type-select.tsx | 26 +- .../config-var/config-select/index.spec.tsx | 6 +- .../config-var/config-select/index.tsx | 25 +- .../config-var/config-string/index.spec.tsx | 3 +- .../app/configuration/config-var/index.tsx | 65 +- .../config-var/input-type-icon.tsx | 2 +- .../configuration/config-var/modal-foot.tsx | 4 +- .../select-type-item/index.spec.tsx | 8 +- .../config-var/select-type-item/index.tsx | 12 +- .../config-var/select-var-type.tsx | 32 +- .../app/configuration/config-var/var-item.tsx | 36 +- .../config-vision/index.spec.tsx | 10 +- .../app/configuration/config-vision/index.tsx | 36 +- .../config-vision/param-config-content.tsx | 44 +- .../config-vision/param-config.tsx | 14 +- .../config/agent-setting-button.spec.tsx | 6 +- .../config/agent-setting-button.tsx | 10 +- .../config/agent/agent-setting/index.spec.tsx | 22 +- .../config/agent/agent-setting/index.tsx | 70 +- .../agent/agent-setting/item-panel.spec.tsx | 4 +- .../config/agent/agent-setting/item-panel.tsx | 13 +- .../config/agent/agent-tools/index.spec.tsx | 51 +- .../config/agent/agent-tools/index.tsx | 170 +- .../setting-built-in-tool.spec.tsx | 23 +- .../agent-tools/setting-built-in-tool.tsx | 120 +- .../config/agent/prompt-editor.tsx | 37 +- .../assistant-type-picker/index.spec.tsx | 6 +- .../config/assistant-type-picker/index.tsx | 60 +- .../config/automatic/automatic-btn.tsx | 10 +- .../config/automatic/get-automatic-res.tsx | 147 +- .../config/automatic/idea-output.tsx | 20 +- .../instruction-editor-in-workflow.tsx | 8 +- .../config/automatic/instruction-editor.tsx | 54 +- .../automatic/prompt-res-in-workflow.tsx | 6 +- .../config/automatic/prompt-res.tsx | 6 +- .../config/automatic/prompt-toast.tsx | 12 +- .../config/automatic/res-placeholder.tsx | 8 +- .../configuration/config/automatic/result.tsx | 89 +- .../config/automatic/version-selector.tsx | 36 +- .../code-generator/get-code-generator-res.tsx | 87 +- .../config/config-audio.spec.tsx | 6 +- .../app/configuration/config/config-audio.tsx | 34 +- .../config/config-document.spec.tsx | 6 +- .../configuration/config/config-document.tsx | 34 +- .../app/configuration/config/index.spec.tsx | 8 +- .../app/configuration/config/index.tsx | 20 +- .../configuration/ctrl-btn-group/index.tsx | 4 +- .../dataset-config/card-item/index.spec.tsx | 14 +- .../dataset-config/card-item/index.tsx | 63 +- .../dataset-config/context-var/index.spec.tsx | 9 +- .../dataset-config/context-var/index.tsx | 20 +- .../context-var/var-picker.spec.tsx | 10 +- .../dataset-config/context-var/var-picker.tsx | 78 +- .../dataset-config/index.spec.tsx | 29 +- .../configuration/dataset-config/index.tsx | 105 +- .../params-config/config-content.spec.tsx | 20 +- .../params-config/config-content.tsx | 108 +- .../params-config/index.spec.tsx | 28 +- .../dataset-config/params-config/index.tsx | 48 +- .../params-config/weighted-score.tsx | 18 +- .../dataset-config/select-dataset/index.tsx | 55 +- .../settings-modal/index.spec.tsx | 17 +- .../dataset-config/settings-modal/index.tsx | 139 +- .../settings-modal/retrieval-section.spec.tsx | 11 +- .../settings-modal/retrieval-section.tsx | 88 +- .../configuration/debug/chat-user-input.tsx | 26 +- .../debug-with-multiple-model/chat-item.tsx | 36 +- .../debug-with-multiple-model/context.tsx | 5 +- .../debug-with-multiple-model/debug-item.tsx | 55 +- .../debug-with-multiple-model/index.spec.tsx | 37 +- .../debug/debug-with-multiple-model/index.tsx | 26 +- .../model-parameter-trigger.tsx | 37 +- .../text-generation-item.tsx | 18 +- .../debug-with-single-model/index.spec.tsx | 18 +- .../debug/debug-with-single-model/index.tsx | 38 +- .../app/configuration/debug/hooks.tsx | 20 +- .../app/configuration/debug/index.tsx | 125 +- .../hooks/use-advanced-prompt-config.ts | 18 +- .../components/app/configuration/index.tsx | 235 +- .../prompt-value-panel/index.tsx | 75 +- .../tools/external-data-tool-modal.tsx | 87 +- .../app/configuration/tools/index.tsx | 77 +- .../create-app-dialog/app-card/index.spec.tsx | 6 +- .../app/create-app-dialog/app-card/index.tsx | 37 +- .../app/create-app-dialog/app-list/index.tsx | 149 +- .../create-app-dialog/app-list/sidebar.tsx | 55 +- .../app/create-app-dialog/index.spec.tsx | 76 +- .../app/create-app-dialog/index.tsx | 15 +- .../components/app/create-app-modal/index.tsx | 432 +-- .../dsl-confirm-modal.tsx | 26 +- .../app/create-from-dsl-modal/index.tsx | 90 +- .../app/create-from-dsl-modal/uploader.tsx | 38 +- .../app/duplicate-modal/index.spec.tsx | 8 +- .../components/app/duplicate-modal/index.tsx | 68 +- .../components/app/log-annotation/index.tsx | 20 +- web/app/components/app/log/empty-element.tsx | 47 +- web/app/components/app/log/filter.tsx | 27 +- web/app/components/app/log/index.tsx | 74 +- web/app/components/app/log/list.tsx | 369 +-- web/app/components/app/log/model-info.tsx | 41 +- web/app/components/app/log/var-panel.tsx | 36 +- .../overview/__tests__/toggle-logic.test.ts | 2 +- .../apikey-info-panel.test-utils.tsx | 22 +- .../app/overview/apikey-info-panel/index.tsx | 50 +- web/app/components/app/overview/app-card.tsx | 263 +- web/app/components/app/overview/app-chart.tsx | 258 +- .../app/overview/customize/index.spec.tsx | 2 +- .../app/overview/customize/index.tsx | 152 +- .../app/overview/embedded/index.tsx | 31 +- .../app/overview/settings/index.tsx | 157 +- .../components/app/overview/trigger-card.tsx | 23 +- web/app/components/app/store.ts | 4 +- .../app/switch-app-modal/index.spec.tsx | 15 +- .../components/app/switch-app-modal/index.tsx | 100 +- .../app/text-generate/item/index.tsx | 166 +- .../app/text-generate/item/result-tab.tsx | 14 +- .../app/text-generate/saved-items/index.tsx | 85 +- .../saved-items/no-data/index.tsx | 23 +- .../app/type-selector/index.spec.tsx | 4 +- .../components/app/type-selector/index.tsx | 137 +- .../app/workflow-log/detail.spec.tsx | 6 +- .../components/app/workflow-log/detail.tsx | 29 +- .../app/workflow-log/filter.spec.tsx | 8 +- .../components/app/workflow-log/filter.tsx | 30 +- .../app/workflow-log/index.spec.tsx | 20 +- web/app/components/app/workflow-log/index.tsx | 65 +- .../components/app/workflow-log/list.spec.tsx | 10 +- web/app/components/app/workflow-log/list.tsx | 139 +- .../workflow-log/trigger-by-display.spec.tsx | 8 +- .../app/workflow-log/trigger-by-display.tsx | 24 +- web/app/components/apps/app-card.spec.tsx | 124 +- web/app/components/apps/app-card.tsx | 205 +- web/app/components/apps/empty.spec.tsx | 2 +- web/app/components/apps/empty.tsx | 6 +- web/app/components/apps/footer.spec.tsx | 2 +- web/app/components/apps/footer.tsx | 30 +- .../apps/hooks/use-apps-query-state.spec.ts | 6 +- .../apps/hooks/use-apps-query-state.ts | 3 +- web/app/components/apps/index.spec.tsx | 8 +- web/app/components/apps/index.tsx | 10 +- web/app/components/apps/list.spec.tsx | 18 +- web/app/components/apps/list.tsx | 100 +- web/app/components/apps/new-app-card.spec.tsx | 34 +- web/app/components/apps/new-app-card.tsx | 23 +- .../base/action-button/index.spec.tsx | 26 +- .../components/base/action-button/index.tsx | 8 +- .../base/agent-log-modal/detail.tsx | 34 +- .../base/agent-log-modal/index.stories.tsx | 8 +- .../components/base/agent-log-modal/index.tsx | 18 +- .../base/agent-log-modal/iteration.tsx | 14 +- .../base/agent-log-modal/result.tsx | 70 +- .../base/agent-log-modal/tool-call.tsx | 29 +- .../base/agent-log-modal/tracing.tsx | 4 +- .../base/amplitude/AmplitudeProvider.tsx | 2 +- web/app/components/base/answer-icon/index.tsx | 35 +- .../base/app-icon-picker/ImageInput.tsx | 49 +- .../base/app-icon-picker/index.stories.tsx | 3 +- .../components/base/app-icon-picker/index.tsx | 108 +- .../components/base/app-icon-picker/utils.ts | 2 +- .../components/base/app-icon/index.spec.tsx | 32 +- web/app/components/base/app-icon/index.tsx | 27 +- web/app/components/base/app-unavailable.tsx | 12 +- .../base/audio-btn/audio.player.manager.ts | 1 + .../base/audio-btn/index.stories.tsx | 2 +- web/app/components/base/audio-btn/index.tsx | 27 +- .../base/audio-gallery/AudioPlayer.tsx | 26 +- .../components/base/audio-gallery/index.tsx | 3 +- .../base/auto-height-textarea/index.tsx | 51 +- .../components/base/avatar/index.stories.tsx | 5 +- web/app/components/base/avatar/index.tsx | 2 +- web/app/components/base/badge.tsx | 2 +- web/app/components/base/badge/index.tsx | 16 +- web/app/components/base/block-input/index.tsx | 45 +- web/app/components/base/button/add-button.tsx | 4 +- web/app/components/base/button/index.spec.tsx | 56 +- web/app/components/base/button/index.tsx | 10 +- .../components/base/button/sync-button.tsx | 10 +- .../base/chat/__tests__/utils.spec.ts | 4 +- .../chat/chat-with-history/chat-wrapper.tsx | 93 +- .../base/chat/chat-with-history/context.tsx | 12 +- .../chat-with-history/header-in-mobile.tsx | 52 +- .../chat/chat-with-history/header/index.tsx | 44 +- .../header/mobile-operation-dropdown.tsx | 22 +- .../chat-with-history/header/operation.tsx | 18 +- .../base/chat/chat-with-history/hooks.tsx | 44 +- .../base/chat/chat-with-history/index.tsx | 27 +- .../chat-with-history/inputs-form/content.tsx | 30 +- .../chat-with-history/inputs-form/index.tsx | 38 +- .../inputs-form/view-form-dropdown.tsx | 24 +- .../chat/chat-with-history/sidebar/index.tsx | 67 +- .../chat/chat-with-history/sidebar/item.tsx | 8 +- .../chat/chat-with-history/sidebar/list.tsx | 6 +- .../chat-with-history/sidebar/operation.tsx | 26 +- .../sidebar/rename-modal.tsx | 13 +- .../base/chat/chat/answer/agent-content.tsx | 6 +- .../base/chat/chat/answer/basic-content.tsx | 2 +- .../base/chat/chat/answer/index.stories.tsx | 36 +- .../base/chat/chat/answer/index.tsx | 44 +- .../components/base/chat/chat/answer/more.tsx | 14 +- .../base/chat/chat/answer/operation.tsx | 217 +- .../chat/chat/answer/suggested-questions.tsx | 9 +- .../base/chat/chat/answer/tool-detail.tsx | 28 +- .../chat/chat/answer/workflow-process.tsx | 37 +- .../base/chat/chat/chat-input-area/index.tsx | 45 +- .../chat/chat/chat-input-area/operation.tsx | 36 +- .../base/chat/chat/check-input-forms-hooks.ts | 2 +- .../base/chat/chat/citation/index.tsx | 22 +- .../base/chat/chat/citation/popup.tsx | 79 +- .../chat/chat/citation/progress-tooltip.tsx | 16 +- .../base/chat/chat/citation/tooltip.tsx | 12 +- .../base/chat/chat/content-switch.tsx | 11 +- web/app/components/base/chat/chat/context.tsx | 8 +- web/app/components/base/chat/chat/hooks.ts | 62 +- web/app/components/base/chat/chat/index.tsx | 59 +- .../base/chat/chat/loading-anim/index.tsx | 2 +- .../components/base/chat/chat/log/index.tsx | 6 +- .../base/chat/chat/question.stories.tsx | 10 +- .../components/base/chat/chat/question.tsx | 104 +- .../base/chat/chat/thought/index.tsx | 4 +- .../components/base/chat/chat/try-to-ask.tsx | 16 +- web/app/components/base/chat/chat/type.ts | 6 +- web/app/components/base/chat/chat/utils.ts | 4 +- .../chat/embedded-chatbot/chat-wrapper.tsx | 83 +- .../base/chat/embedded-chatbot/context.tsx | 8 +- .../chat/embedded-chatbot/header/index.tsx | 65 +- .../base/chat/embedded-chatbot/hooks.tsx | 43 +- .../base/chat/embedded-chatbot/index.tsx | 114 +- .../embedded-chatbot/inputs-form/content.tsx | 32 +- .../embedded-chatbot/inputs-form/index.tsx | 38 +- .../inputs-form/view-form-dropdown.tsx | 22 +- web/app/components/base/chat/types.ts | 12 +- web/app/components/base/chat/utils.ts | 16 +- .../components/base/checkbox-list/index.tsx | 145 +- .../checkbox/assets/indeterminate-icon.tsx | 4 +- .../base/checkbox/index.stories.tsx | 9 +- web/app/components/base/checkbox/index.tsx | 2 +- .../components/base/chip/index.stories.tsx | 15 +- web/app/components/base/chip/index.tsx | 42 +- web/app/components/base/confirm/index.tsx | 27 +- .../components/base/content-dialog/index.tsx | 15 +- .../components/base/copy-feedback/index.tsx | 17 +- web/app/components/base/copy-icon/index.tsx | 15 +- .../components/base/corner-label/index.tsx | 6 +- .../calendar/days-of-week.tsx | 4 +- .../date-and-time-picker/calendar/index.tsx | 30 +- .../date-and-time-picker/calendar/item.tsx | 8 +- .../common/option-list-item.tsx | 3 +- .../date-picker/footer.tsx | 35 +- .../date-picker/header.tsx | 30 +- .../date-picker/index.tsx | 192 +- .../base/date-and-time-picker/hooks.ts | 4 +- .../date-and-time-picker/index.stories.tsx | 16 +- .../time-picker/footer.tsx | 19 +- .../time-picker/header.tsx | 4 +- .../time-picker/index.spec.tsx | 35 +- .../time-picker/index.tsx | 107 +- .../time-picker/options.tsx | 13 +- .../base/date-and-time-picker/types.ts | 2 +- .../date-and-time-picker/utils/dayjs.spec.ts | 31 +- .../base/date-and-time-picker/utils/dayjs.ts | 20 +- .../year-and-month-picker/footer.tsx | 10 +- .../year-and-month-picker/header.tsx | 14 +- .../year-and-month-picker/options.tsx | 11 +- web/app/components/base/dialog/index.tsx | 15 +- web/app/components/base/divider/index.tsx | 31 +- .../base/drawer-plus/index.stories.tsx | 6 +- web/app/components/base/drawer-plus/index.tsx | 20 +- web/app/components/base/drawer/index.spec.tsx | 8 +- .../components/base/drawer/index.stories.tsx | 6 +- web/app/components/base/drawer/index.tsx | 76 +- .../base/dropdown/index.stories.tsx | 9 +- web/app/components/base/dropdown/index.tsx | 38 +- .../base/emoji-picker/Inner.stories.tsx | 2 +- .../components/base/emoji-picker/Inner.tsx | 218 +- .../base/emoji-picker/index.stories.tsx | 2 +- .../components/base/emoji-picker/index.tsx | 71 +- .../base/encrypted-bottom/index.tsx | 11 +- .../components/base/error-boundary/index.tsx | 56 +- web/app/components/base/features/context.tsx | 8 +- web/app/components/base/features/hooks.ts | 2 +- .../base/features/index.stories.tsx | 2 +- .../annotation-ctrl-button.tsx | 14 +- .../annotation-reply/config-param-modal.tsx | 50 +- .../annotation-reply/config-param.tsx | 8 +- .../annotation-reply/index.tsx | 59 +- .../score-slider/base-slider/index.tsx | 40 +- .../annotation-reply/score-slider/index.tsx | 8 +- .../annotation-reply/use-annotation-config.ts | 10 +- .../features/new-feature-panel/citation.tsx | 16 +- .../conversation-opener/index.tsx | 30 +- .../conversation-opener/modal.tsx | 79 +- .../new-feature-panel/dialog-wrapper.tsx | 10 +- .../new-feature-panel/feature-bar.tsx | 64 +- .../new-feature-panel/feature-card.tsx | 14 +- .../new-feature-panel/file-upload/index.tsx | 42 +- .../file-upload/setting-content.tsx | 28 +- .../file-upload/setting-modal.tsx | 13 +- .../features/new-feature-panel/follow-up.tsx | 16 +- .../new-feature-panel/image-upload/index.tsx | 50 +- .../base/features/new-feature-panel/index.tsx | 61 +- .../moderation/form-generation.tsx | 18 +- .../new-feature-panel/moderation/index.tsx | 42 +- .../moderation/moderation-content.tsx | 32 +- .../moderation/moderation-setting-modal.tsx | 117 +- .../new-feature-panel/more-like-this.tsx | 16 +- .../new-feature-panel/speech-to-text.tsx | 16 +- .../text-to-speech/index.tsx | 50 +- .../text-to-speech/param-config-content.tsx | 90 +- .../text-to-speech/voice-settings.tsx | 8 +- web/app/components/base/features/store.ts | 2 +- web/app/components/base/features/types.ts | 2 +- .../base/file-icon/index.stories.tsx | 5 +- web/app/components/base/file-icon/index.tsx | 2 +- .../base/file-thumb/image-render.tsx | 4 +- web/app/components/base/file-thumb/index.tsx | 34 +- .../base/file-uploader/audio-preview.tsx | 10 +- .../file-from-link-or-local/index.tsx | 45 +- .../base/file-uploader/file-input.tsx | 8 +- .../base/file-uploader/file-list-in-log.tsx | 38 +- .../base/file-uploader/file-list.stories.tsx | 4 +- .../base/file-uploader/file-type-icon.tsx | 6 +- .../file-uploader-in-attachment/file-item.tsx | 82 +- .../index.stories.tsx | 8 +- .../file-uploader-in-attachment/index.tsx | 32 +- .../file-image-item.tsx | 38 +- .../file-uploader-in-chat-input/file-item.tsx | 48 +- .../file-uploader-in-chat-input/file-list.tsx | 8 +- .../index.stories.tsx | 8 +- .../file-uploader-in-chat-input/index.tsx | 16 +- .../components/base/file-uploader/hooks.ts | 32 +- .../components/base/file-uploader/index.ts | 4 +- .../base/file-uploader/pdf-preview.tsx | 49 +- .../components/base/file-uploader/store.tsx | 8 +- .../base/file-uploader/utils.spec.ts | 8 +- .../components/base/file-uploader/utils.ts | 11 +- .../base/file-uploader/video-preview.tsx | 10 +- .../float-right-container/index.stories.tsx | 2 +- .../base/float-right-container/index.tsx | 2 +- .../base/form/components/base/base-field.tsx | 58 +- .../base/form/components/base/base-form.tsx | 43 +- .../base/form/components/base/index.tsx | 2 +- .../base/form/components/field/checkbox.tsx | 8 +- .../form/components/field/custom-select.tsx | 4 +- .../base/form/components/field/file-types.tsx | 10 +- .../form/components/field/file-uploader.tsx | 12 +- .../field/input-type-select/hooks.tsx | 6 +- .../field/input-type-select/index.tsx | 10 +- .../field/input-type-select/option.tsx | 6 +- .../field/input-type-select/trigger.tsx | 30 +- .../field/mixed-variable-text-input/index.tsx | 2 +- .../mixed-variable-text-input/placeholder.tsx | 19 +- .../form/components/field/number-input.tsx | 10 +- .../form/components/field/number-slider.tsx | 8 +- .../base/form/components/field/options.tsx | 10 +- .../base/form/components/field/select.tsx | 4 +- .../base/form/components/field/text-area.tsx | 10 +- .../base/form/components/field/text.tsx | 9 +- .../form/components/field/upload-method.tsx | 12 +- .../field/variable-or-constant-input.tsx | 20 +- .../components/field/variable-selector.tsx | 12 +- .../base/form/components/form/actions.tsx | 6 +- .../components/base/form/components/label.tsx | 14 +- .../base/form/form-scenarios/auth/index.tsx | 6 +- .../base/form/form-scenarios/base/field.tsx | 10 +- .../base/form/form-scenarios/base/index.tsx | 6 +- .../base/form/form-scenarios/base/types.ts | 6 +- .../base/form/form-scenarios/base/utils.ts | 3 +- .../form-scenarios/demo/contact-fields.tsx | 18 +- .../base/form/form-scenarios/demo/index.tsx | 14 +- .../form/form-scenarios/input-field/field.tsx | 7 +- .../form/form-scenarios/input-field/types.ts | 4 +- .../form/form-scenarios/input-field/utils.ts | 3 +- .../form/form-scenarios/node-panel/field.tsx | 7 +- .../base/form/hooks/use-check-validated.ts | 4 +- .../base/form/hooks/use-get-form-values.ts | 4 +- .../base/form/hooks/use-get-validators.ts | 4 +- .../components/base/form/index.stories.tsx | 15 +- web/app/components/base/form/index.tsx | 20 +- web/app/components/base/form/types.ts | 8 +- .../base/fullscreen-modal/index.tsx | 35 +- web/app/components/base/ga/index.tsx | 12 +- web/app/components/base/grid-mask/index.tsx | 4 +- .../components/base/icons/IconBase.spec.tsx | 2 +- web/app/components/base/icons/IconBase.tsx | 4 +- .../base/icons/icon-gallery.stories.tsx | 17 +- web/app/components/base/icons/script.mjs | 6 +- .../icons/src/image/llm/BaichuanTextCn.tsx | 2 +- .../base/icons/src/image/llm/Minimax.tsx | 2 +- .../base/icons/src/image/llm/MinimaxText.tsx | 2 +- .../base/icons/src/image/llm/Tongyi.tsx | 2 +- .../base/icons/src/image/llm/TongyiText.tsx | 2 +- .../base/icons/src/image/llm/TongyiTextCn.tsx | 2 +- .../base/icons/src/image/llm/Wxyy.tsx | 2 +- .../base/icons/src/image/llm/WxyyText.tsx | 2 +- .../base/icons/src/image/llm/WxyyTextCn.tsx | 2 +- .../base/icons/src/image/llm/index.ts | 10 +- .../base/icons/src/public/avatar/Robot.json | 180 +- .../base/icons/src/public/avatar/Robot.tsx | 8 +- .../base/icons/src/public/avatar/User.json | 174 +- .../base/icons/src/public/avatar/User.tsx | 8 +- .../icons/src/public/billing/ArCube1.json | 54 +- .../base/icons/src/public/billing/ArCube1.tsx | 8 +- .../icons/src/public/billing/Asterisk.json | 72 +- .../icons/src/public/billing/Asterisk.tsx | 8 +- .../public/billing/AwsMarketplaceDark.json | 354 +-- .../src/public/billing/AwsMarketplaceDark.tsx | 8 +- .../public/billing/AwsMarketplaceLight.json | 354 +-- .../public/billing/AwsMarketplaceLight.tsx | 8 +- .../base/icons/src/public/billing/Azure.json | 382 +-- .../base/icons/src/public/billing/Azure.tsx | 8 +- .../icons/src/public/billing/Buildings.json | 74 +- .../icons/src/public/billing/Buildings.tsx | 8 +- .../icons/src/public/billing/Diamond.json | 74 +- .../base/icons/src/public/billing/Diamond.tsx | 8 +- .../icons/src/public/billing/GoogleCloud.json | 128 +- .../icons/src/public/billing/GoogleCloud.tsx | 8 +- .../base/icons/src/public/billing/Group2.json | 54 +- .../base/icons/src/public/billing/Group2.tsx | 8 +- .../icons/src/public/billing/Keyframe.json | 52 +- .../icons/src/public/billing/Keyframe.tsx | 8 +- .../icons/src/public/billing/Sparkles.json | 186 +- .../icons/src/public/billing/Sparkles.tsx | 8 +- .../src/public/billing/SparklesSoft.json | 68 +- .../icons/src/public/billing/SparklesSoft.tsx | 8 +- .../base/icons/src/public/billing/index.ts | 2 +- .../base/icons/src/public/common/D.json | 246 +- .../base/icons/src/public/common/D.tsx | 8 +- .../public/common/DiagonalDividingLine.json | 52 +- .../public/common/DiagonalDividingLine.tsx | 8 +- .../base/icons/src/public/common/Dify.json | 120 +- .../base/icons/src/public/common/Dify.tsx | 8 +- .../base/icons/src/public/common/Gdpr.json | 676 ++--- .../base/icons/src/public/common/Gdpr.tsx | 8 +- .../base/icons/src/public/common/Github.json | 68 +- .../base/icons/src/public/common/Github.tsx | 8 +- .../icons/src/public/common/Highlight.json | 130 +- .../icons/src/public/common/Highlight.tsx | 8 +- .../base/icons/src/public/common/Iso.json | 238 +- .../base/icons/src/public/common/Iso.tsx | 8 +- .../base/icons/src/public/common/Line3.json | 52 +- .../base/icons/src/public/common/Line3.tsx | 8 +- .../base/icons/src/public/common/Lock.json | 72 +- .../base/icons/src/public/common/Lock.tsx | 8 +- .../src/public/common/MessageChatSquare.json | 70 +- .../src/public/common/MessageChatSquare.tsx | 8 +- .../src/public/common/MultiPathRetrieval.json | 302 +- .../src/public/common/MultiPathRetrieval.tsx | 8 +- .../src/public/common/NTo1Retrieval.json | 288 +- .../icons/src/public/common/NTo1Retrieval.tsx | 8 +- .../base/icons/src/public/common/Notion.json | 162 +- .../base/icons/src/public/common/Notion.tsx | 8 +- .../base/icons/src/public/common/Soc2.json | 1872 ++++++------ .../base/icons/src/public/common/Soc2.tsx | 8 +- .../icons/src/public/common/SparklesSoft.json | 90 +- .../icons/src/public/common/SparklesSoft.tsx | 8 +- .../src/public/common/SparklesSoftAccent.json | 68 +- .../src/public/common/SparklesSoftAccent.tsx | 8 +- .../base/icons/src/public/common/index.ts | 4 +- .../icons/src/public/education/Triangle.json | 50 +- .../icons/src/public/education/Triangle.tsx | 8 +- .../base/icons/src/public/files/Csv.json | 358 +-- .../base/icons/src/public/files/Csv.tsx | 8 +- .../base/icons/src/public/files/Doc.json | 334 +-- .../base/icons/src/public/files/Doc.tsx | 8 +- .../base/icons/src/public/files/Docx.json | 352 +-- .../base/icons/src/public/files/Docx.tsx | 8 +- .../base/icons/src/public/files/Html.json | 352 +-- .../base/icons/src/public/files/Html.tsx | 8 +- .../base/icons/src/public/files/Json.json | 352 +-- .../base/icons/src/public/files/Json.tsx | 8 +- .../base/icons/src/public/files/Md.json | 284 +- .../base/icons/src/public/files/Md.tsx | 8 +- .../base/icons/src/public/files/Pdf.json | 334 +-- .../base/icons/src/public/files/Pdf.tsx | 8 +- .../base/icons/src/public/files/Txt.json | 356 +-- .../base/icons/src/public/files/Txt.tsx | 8 +- .../base/icons/src/public/files/Unknown.json | 394 +-- .../base/icons/src/public/files/Unknown.tsx | 8 +- .../base/icons/src/public/files/Xlsx.json | 286 +- .../base/icons/src/public/files/Xlsx.tsx | 8 +- .../base/icons/src/public/files/Yaml.json | 358 +-- .../base/icons/src/public/files/Yaml.tsx | 8 +- .../base/icons/src/public/knowledge/File.json | 70 +- .../base/icons/src/public/knowledge/File.tsx | 8 +- .../knowledge/OptionCardEffectBlue.json | 176 +- .../public/knowledge/OptionCardEffectBlue.tsx | 8 +- .../knowledge/OptionCardEffectBlueLight.json | 176 +- .../knowledge/OptionCardEffectBlueLight.tsx | 8 +- .../knowledge/OptionCardEffectOrange.json | 176 +- .../knowledge/OptionCardEffectOrange.tsx | 8 +- .../knowledge/OptionCardEffectPurple.json | 176 +- .../knowledge/OptionCardEffectPurple.tsx | 8 +- .../knowledge/OptionCardEffectTeal.json | 174 +- .../public/knowledge/OptionCardEffectTeal.tsx | 8 +- .../src/public/knowledge/SelectionMod.json | 228 +- .../src/public/knowledge/SelectionMod.tsx | 8 +- .../src/public/knowledge/Watercrawl.json | 372 +-- .../icons/src/public/knowledge/Watercrawl.tsx | 8 +- .../dataset-card/ExternalKnowledgeBase.json | 470 +-- .../dataset-card/ExternalKnowledgeBase.tsx | 8 +- .../knowledge/dataset-card/General.json | 910 +++--- .../public/knowledge/dataset-card/General.tsx | 8 +- .../public/knowledge/dataset-card/Graph.json | 2112 +++++++------- .../public/knowledge/dataset-card/Graph.tsx | 8 +- .../knowledge/dataset-card/ParentChild.json | 692 ++--- .../knowledge/dataset-card/ParentChild.tsx | 8 +- .../src/public/knowledge/dataset-card/Qa.json | 470 +-- .../src/public/knowledge/dataset-card/Qa.tsx | 8 +- .../base/icons/src/public/knowledge/index.ts | 2 +- .../knowledge/online-drive/BucketsBlue.json | 1178 ++++---- .../knowledge/online-drive/BucketsBlue.tsx | 8 +- .../knowledge/online-drive/BucketsGray.json | 1178 ++++---- .../knowledge/online-drive/BucketsGray.tsx | 8 +- .../public/knowledge/online-drive/Folder.json | 2176 +++++++------- .../public/knowledge/online-drive/Folder.tsx | 8 +- .../base/icons/src/public/llm/Anthropic.json | 70 +- .../base/icons/src/public/llm/Anthropic.tsx | 8 +- .../icons/src/public/llm/AnthropicDark.json | 2088 +++++++------- .../icons/src/public/llm/AnthropicDark.tsx | 8 +- .../icons/src/public/llm/AnthropicLight.json | 2088 +++++++------- .../icons/src/public/llm/AnthropicLight.tsx | 8 +- .../icons/src/public/llm/AnthropicText.json | 1074 +++---- .../icons/src/public/llm/AnthropicText.tsx | 8 +- .../src/public/llm/AzureOpenaiService.json | 144 +- .../src/public/llm/AzureOpenaiService.tsx | 8 +- .../public/llm/AzureOpenaiServiceText.json | 468 +-- .../src/public/llm/AzureOpenaiServiceText.tsx | 8 +- .../base/icons/src/public/llm/Azureai.json | 356 +-- .../base/icons/src/public/llm/Azureai.tsx | 8 +- .../icons/src/public/llm/AzureaiText.json | 482 ++-- .../base/icons/src/public/llm/AzureaiText.tsx | 8 +- .../base/icons/src/public/llm/Baichuan.json | 148 +- .../base/icons/src/public/llm/Baichuan.tsx | 8 +- .../icons/src/public/llm/BaichuanText.json | 308 +- .../icons/src/public/llm/BaichuanText.tsx | 8 +- .../base/icons/src/public/llm/Chatglm.json | 140 +- .../base/icons/src/public/llm/Chatglm.tsx | 8 +- .../icons/src/public/llm/ChatglmText.json | 266 +- .../base/icons/src/public/llm/ChatglmText.tsx | 8 +- .../base/icons/src/public/llm/Cohere.json | 220 +- .../base/icons/src/public/llm/Cohere.tsx | 8 +- .../base/icons/src/public/llm/CohereText.json | 176 +- .../base/icons/src/public/llm/CohereText.tsx | 8 +- .../base/icons/src/public/llm/Gpt3.json | 98 +- .../base/icons/src/public/llm/Gpt3.tsx | 8 +- .../base/icons/src/public/llm/Gpt4.json | 98 +- .../base/icons/src/public/llm/Gpt4.tsx | 8 +- .../icons/src/public/llm/Huggingface.json | 312 +- .../base/icons/src/public/llm/Huggingface.tsx | 8 +- .../icons/src/public/llm/HuggingfaceText.json | 640 ++--- .../icons/src/public/llm/HuggingfaceText.tsx | 8 +- .../src/public/llm/HuggingfaceTextHub.json | 696 ++--- .../src/public/llm/HuggingfaceTextHub.tsx | 8 +- .../icons/src/public/llm/IflytekSpark.json | 84 +- .../icons/src/public/llm/IflytekSpark.tsx | 8 +- .../src/public/llm/IflytekSparkText.json | 370 +-- .../icons/src/public/llm/IflytekSparkText.tsx | 8 +- .../src/public/llm/IflytekSparkTextCn.json | 192 +- .../src/public/llm/IflytekSparkTextCn.tsx | 8 +- .../base/icons/src/public/llm/Jina.json | 66 +- .../base/icons/src/public/llm/Jina.tsx | 8 +- .../base/icons/src/public/llm/JinaText.json | 160 +- .../base/icons/src/public/llm/JinaText.tsx | 8 +- .../base/icons/src/public/llm/Localai.json | 210 +- .../base/icons/src/public/llm/Localai.tsx | 8 +- .../icons/src/public/llm/LocalaiText.json | 336 +-- .../base/icons/src/public/llm/LocalaiText.tsx | 8 +- .../base/icons/src/public/llm/Microsoft.json | 148 +- .../base/icons/src/public/llm/Microsoft.tsx | 8 +- .../icons/src/public/llm/OpenaiBlack.json | 70 +- .../base/icons/src/public/llm/OpenaiBlack.tsx | 8 +- .../base/icons/src/public/llm/OpenaiBlue.json | 70 +- .../base/icons/src/public/llm/OpenaiBlue.tsx | 8 +- .../icons/src/public/llm/OpenaiGreen.json | 70 +- .../base/icons/src/public/llm/OpenaiGreen.tsx | 8 +- .../base/icons/src/public/llm/OpenaiTeal.json | 70 +- .../base/icons/src/public/llm/OpenaiTeal.tsx | 8 +- .../base/icons/src/public/llm/OpenaiText.json | 150 +- .../base/icons/src/public/llm/OpenaiText.tsx | 8 +- .../src/public/llm/OpenaiTransparent.json | 48 +- .../src/public/llm/OpenaiTransparent.tsx | 8 +- .../icons/src/public/llm/OpenaiViolet.json | 70 +- .../icons/src/public/llm/OpenaiViolet.tsx | 8 +- .../icons/src/public/llm/OpenaiYellow.json | 70 +- .../icons/src/public/llm/OpenaiYellow.tsx | 8 +- .../base/icons/src/public/llm/Openllm.json | 162 +- .../base/icons/src/public/llm/Openllm.tsx | 8 +- .../icons/src/public/llm/OpenllmText.json | 282 +- .../base/icons/src/public/llm/OpenllmText.tsx | 8 +- .../base/icons/src/public/llm/Replicate.json | 74 +- .../base/icons/src/public/llm/Replicate.tsx | 8 +- .../icons/src/public/llm/ReplicateText.json | 228 +- .../icons/src/public/llm/ReplicateText.tsx | 8 +- .../src/public/llm/XorbitsInference.json | 348 +-- .../icons/src/public/llm/XorbitsInference.tsx | 8 +- .../src/public/llm/XorbitsInferenceText.json | 654 ++--- .../src/public/llm/XorbitsInferenceText.tsx | 8 +- .../base/icons/src/public/llm/Zhipuai.json | 102 +- .../base/icons/src/public/llm/Zhipuai.tsx | 8 +- .../icons/src/public/llm/ZhipuaiText.json | 84 +- .../base/icons/src/public/llm/ZhipuaiText.tsx | 8 +- .../icons/src/public/llm/ZhipuaiTextCn.json | 120 +- .../icons/src/public/llm/ZhipuaiTextCn.tsx | 8 +- .../base/icons/src/public/llm/index.ts | 36 +- .../base/icons/src/public/model/Checked.json | 54 +- .../base/icons/src/public/model/Checked.tsx | 8 +- .../src/public/other/DefaultToolIcon.json | 158 +- .../src/public/other/DefaultToolIcon.tsx | 8 +- .../icons/src/public/other/Icon3Dots.json | 54 +- .../base/icons/src/public/other/Icon3Dots.tsx | 8 +- .../icons/src/public/other/Message3Fill.json | 342 +-- .../icons/src/public/other/Message3Fill.tsx | 8 +- .../icons/src/public/other/RowStruct.json | 108 +- .../base/icons/src/public/other/RowStruct.tsx | 8 +- .../base/icons/src/public/other/index.ts | 2 +- .../base/icons/src/public/plugins/Google.json | 102 +- .../base/icons/src/public/plugins/Google.tsx | 8 +- .../icons/src/public/plugins/PartnerDark.json | 890 +++--- .../icons/src/public/plugins/PartnerDark.tsx | 8 +- .../src/public/plugins/PartnerLight.json | 888 +++--- .../icons/src/public/plugins/PartnerLight.tsx | 8 +- .../src/public/plugins/VerifiedDark.json | 910 +++--- .../icons/src/public/plugins/VerifiedDark.tsx | 8 +- .../src/public/plugins/VerifiedLight.json | 908 +++--- .../src/public/plugins/VerifiedLight.tsx | 8 +- .../icons/src/public/plugins/WebReader.json | 74 +- .../icons/src/public/plugins/WebReader.tsx | 8 +- .../icons/src/public/plugins/Wikipedia.json | 48 +- .../icons/src/public/plugins/Wikipedia.tsx | 8 +- .../icons/src/public/thought/DataSet.json | 124 +- .../base/icons/src/public/thought/DataSet.tsx | 8 +- .../icons/src/public/thought/Loading.json | 124 +- .../base/icons/src/public/thought/Loading.tsx | 8 +- .../base/icons/src/public/thought/Search.json | 124 +- .../base/icons/src/public/thought/Search.tsx | 8 +- .../icons/src/public/thought/ThoughtList.json | 162 +- .../icons/src/public/thought/ThoughtList.tsx | 8 +- .../icons/src/public/thought/WebReader.json | 124 +- .../icons/src/public/thought/WebReader.tsx | 8 +- .../icons/src/public/tracing/AliyunIcon.json | 254 +- .../icons/src/public/tracing/AliyunIcon.tsx | 8 +- .../src/public/tracing/AliyunIconBig.json | 152 +- .../src/public/tracing/AliyunIconBig.tsx | 8 +- .../icons/src/public/tracing/ArizeIcon.json | 240 +- .../icons/src/public/tracing/ArizeIcon.tsx | 8 +- .../src/public/tracing/ArizeIconBig.json | 240 +- .../icons/src/public/tracing/ArizeIconBig.tsx | 8 +- .../src/public/tracing/DatabricksIcon.json | 266 +- .../src/public/tracing/DatabricksIcon.tsx | 8 +- .../src/public/tracing/DatabricksIconBig.json | 266 +- .../src/public/tracing/DatabricksIconBig.tsx | 8 +- .../src/public/tracing/LangfuseIcon.json | 468 +-- .../icons/src/public/tracing/LangfuseIcon.tsx | 8 +- .../src/public/tracing/LangfuseIconBig.json | 468 +-- .../src/public/tracing/LangfuseIconBig.tsx | 8 +- .../src/public/tracing/LangsmithIcon.json | 372 +-- .../src/public/tracing/LangsmithIcon.tsx | 8 +- .../src/public/tracing/LangsmithIconBig.json | 372 +-- .../src/public/tracing/LangsmithIconBig.tsx | 8 +- .../icons/src/public/tracing/MlflowIcon.json | 212 +- .../icons/src/public/tracing/MlflowIcon.tsx | 8 +- .../src/public/tracing/MlflowIconBig.json | 212 +- .../src/public/tracing/MlflowIconBig.tsx | 8 +- .../icons/src/public/tracing/OpikIcon.json | 322 +-- .../icons/src/public/tracing/OpikIcon.tsx | 8 +- .../icons/src/public/tracing/OpikIconBig.json | 320 +-- .../icons/src/public/tracing/OpikIconBig.tsx | 8 +- .../icons/src/public/tracing/PhoenixIcon.json | 1702 +++++------ .../icons/src/public/tracing/PhoenixIcon.tsx | 8 +- .../src/public/tracing/PhoenixIconBig.json | 1702 +++++------ .../src/public/tracing/PhoenixIconBig.tsx | 8 +- .../icons/src/public/tracing/TencentIcon.tsx | 8 +- .../src/public/tracing/TencentIconBig.tsx | 8 +- .../icons/src/public/tracing/TracingIcon.json | 90 +- .../icons/src/public/tracing/TracingIcon.tsx | 8 +- .../icons/src/public/tracing/WeaveIcon.json | 554 ++-- .../icons/src/public/tracing/WeaveIcon.tsx | 8 +- .../src/public/tracing/WeaveIconBig.json | 554 ++-- .../icons/src/public/tracing/WeaveIconBig.tsx | 8 +- .../base/icons/src/public/tracing/index.ts | 22 +- .../icons/src/vender/features/Citations.json | 48 +- .../icons/src/vender/features/Citations.tsx | 8 +- .../vender/features/ContentModeration.json | 52 +- .../src/vender/features/ContentModeration.tsx | 8 +- .../icons/src/vender/features/Document.json | 42 +- .../icons/src/vender/features/Document.tsx | 8 +- .../src/vender/features/FolderUpload.json | 48 +- .../src/vender/features/FolderUpload.tsx | 8 +- .../src/vender/features/LoveMessage.json | 48 +- .../icons/src/vender/features/LoveMessage.tsx | 8 +- .../src/vender/features/MessageFast.json | 52 +- .../icons/src/vender/features/MessageFast.tsx | 8 +- .../src/vender/features/Microphone01.json | 70 +- .../src/vender/features/Microphone01.tsx | 8 +- .../src/vender/features/TextToAudio.json | 150 +- .../icons/src/vender/features/TextToAudio.tsx | 8 +- .../src/vender/features/VirtualAssistant.json | 66 +- .../src/vender/features/VirtualAssistant.tsx | 8 +- .../icons/src/vender/features/Vision.json | 52 +- .../base/icons/src/vender/features/Vision.tsx | 8 +- .../icons/src/vender/knowledge/AddChunks.json | 138 +- .../icons/src/vender/knowledge/AddChunks.tsx | 8 +- .../src/vender/knowledge/ApiAggregate.json | 48 +- .../src/vender/knowledge/ApiAggregate.tsx | 8 +- .../src/vender/knowledge/ArrowShape.json | 50 +- .../icons/src/vender/knowledge/ArrowShape.tsx | 8 +- .../icons/src/vender/knowledge/Chunk.json | 228 +- .../base/icons/src/vender/knowledge/Chunk.tsx | 8 +- .../icons/src/vender/knowledge/Collapse.json | 120 +- .../icons/src/vender/knowledge/Collapse.tsx | 8 +- .../icons/src/vender/knowledge/Divider.json | 54 +- .../icons/src/vender/knowledge/Divider.tsx | 8 +- .../icons/src/vender/knowledge/Economic.json | 106 +- .../icons/src/vender/knowledge/Economic.tsx | 8 +- .../src/vender/knowledge/FullTextSearch.json | 108 +- .../src/vender/knowledge/FullTextSearch.tsx | 8 +- .../src/vender/knowledge/GeneralChunk.json | 198 +- .../src/vender/knowledge/GeneralChunk.tsx | 8 +- .../src/vender/knowledge/HighQuality.json | 68 +- .../src/vender/knowledge/HighQuality.tsx | 8 +- .../src/vender/knowledge/HybridSearch.json | 228 +- .../src/vender/knowledge/HybridSearch.tsx | 8 +- .../vender/knowledge/ParentChildChunk.json | 120 +- .../src/vender/knowledge/ParentChildChunk.tsx | 8 +- .../vender/knowledge/QuestionAndAnswer.json | 72 +- .../vender/knowledge/QuestionAndAnswer.tsx | 8 +- .../src/vender/knowledge/SearchMenu.json | 150 +- .../icons/src/vender/knowledge/SearchMenu.tsx | 8 +- .../src/vender/knowledge/VectorSearch.json | 228 +- .../src/vender/knowledge/VectorSearch.tsx | 8 +- .../line/alertsAndFeedback/AlertTriangle.json | 74 +- .../line/alertsAndFeedback/AlertTriangle.tsx | 8 +- .../line/alertsAndFeedback/ThumbsDown.json | 128 +- .../line/alertsAndFeedback/ThumbsDown.tsx | 8 +- .../line/alertsAndFeedback/ThumbsUp.json | 128 +- .../line/alertsAndFeedback/ThumbsUp.tsx | 8 +- .../line/alertsAndFeedback/Warning.json | 48 +- .../vender/line/alertsAndFeedback/Warning.tsx | 8 +- .../vender/line/arrows/ArrowNarrowLeft.json | 54 +- .../vender/line/arrows/ArrowNarrowLeft.tsx | 8 +- .../src/vender/line/arrows/ArrowUpRight.json | 74 +- .../src/vender/line/arrows/ArrowUpRight.tsx | 8 +- .../vender/line/arrows/ChevronDownDouble.json | 74 +- .../vender/line/arrows/ChevronDownDouble.tsx | 8 +- .../src/vender/line/arrows/ChevronRight.json | 74 +- .../src/vender/line/arrows/ChevronRight.tsx | 8 +- .../line/arrows/ChevronSelectorVertical.json | 54 +- .../line/arrows/ChevronSelectorVertical.tsx | 8 +- .../icons/src/vender/line/arrows/IconR.json | 48 +- .../icons/src/vender/line/arrows/IconR.tsx | 8 +- .../src/vender/line/arrows/RefreshCcw01.json | 54 +- .../src/vender/line/arrows/RefreshCcw01.tsx | 8 +- .../src/vender/line/arrows/RefreshCw05.json | 54 +- .../src/vender/line/arrows/RefreshCw05.tsx | 8 +- .../src/vender/line/arrows/ReverseLeft.json | 74 +- .../src/vender/line/arrows/ReverseLeft.tsx | 8 +- .../icons/src/vender/line/arrows/index.ts | 2 +- .../src/vender/line/communication/AiText.json | 74 +- .../src/vender/line/communication/AiText.tsx | 8 +- .../vender/line/communication/ChatBot.json | 182 +- .../src/vender/line/communication/ChatBot.tsx | 8 +- .../line/communication/ChatBotSlim.json | 132 +- .../vender/line/communication/ChatBotSlim.tsx | 8 +- .../vender/line/communication/CuteRobot.json | 74 +- .../vender/line/communication/CuteRobot.tsx | 8 +- .../communication/MessageCheckRemove.json | 74 +- .../line/communication/MessageCheckRemove.tsx | 8 +- .../line/communication/MessageFastPlus.json | 54 +- .../line/communication/MessageFastPlus.tsx | 8 +- .../src/vender/line/communication/index.ts | 2 +- .../line/development/ArtificialBrain.json | 54 +- .../line/development/ArtificialBrain.tsx | 8 +- .../line/development/BarChartSquare02.json | 74 +- .../line/development/BarChartSquare02.tsx | 8 +- .../vender/line/development/BracketsX.json | 54 +- .../src/vender/line/development/BracketsX.tsx | 8 +- .../vender/line/development/CodeBrowser.json | 74 +- .../vender/line/development/CodeBrowser.tsx | 8 +- .../vender/line/development/Container.json | 54 +- .../src/vender/line/development/Container.tsx | 8 +- .../vender/line/development/Database01.json | 54 +- .../vender/line/development/Database01.tsx | 8 +- .../vender/line/development/Database03.json | 54 +- .../vender/line/development/Database03.tsx | 8 +- .../vender/line/development/FileHeart02.json | 100 +- .../vender/line/development/FileHeart02.tsx | 8 +- .../vender/line/development/GitBranch01.json | 74 +- .../vender/line/development/GitBranch01.tsx | 8 +- .../line/development/PromptEngineering.json | 126 +- .../line/development/PromptEngineering.tsx | 8 +- .../line/development/PuzzlePiece01.json | 128 +- .../vender/line/development/PuzzlePiece01.tsx | 8 +- .../line/development/TerminalSquare.json | 74 +- .../line/development/TerminalSquare.tsx | 8 +- .../src/vender/line/development/Variable.json | 120 +- .../src/vender/line/development/Variable.tsx | 8 +- .../src/vender/line/development/Webhooks.json | 174 +- .../src/vender/line/development/Webhooks.tsx | 8 +- .../src/vender/line/editor/AlignLeft.json | 74 +- .../src/vender/line/editor/AlignLeft.tsx | 8 +- .../src/vender/line/editor/BezierCurve03.json | 72 +- .../src/vender/line/editor/BezierCurve03.tsx | 8 +- .../src/vender/line/editor/Collapse.json | 120 +- .../icons/src/vender/line/editor/Collapse.tsx | 8 +- .../icons/src/vender/line/editor/Colors.json | 74 +- .../icons/src/vender/line/editor/Colors.tsx | 8 +- .../vender/line/editor/ImageIndentLeft.json | 74 +- .../vender/line/editor/ImageIndentLeft.tsx | 8 +- .../src/vender/line/editor/LeftIndent02.json | 54 +- .../src/vender/line/editor/LeftIndent02.tsx | 8 +- .../vender/line/editor/LetterSpacing01.json | 74 +- .../vender/line/editor/LetterSpacing01.tsx | 8 +- .../src/vender/line/editor/TypeSquare.json | 72 +- .../src/vender/line/editor/TypeSquare.tsx | 8 +- .../src/vender/line/education/BookOpen01.json | 94 +- .../src/vender/line/education/BookOpen01.tsx | 8 +- .../icons/src/vender/line/files/Copy.json | 54 +- .../base/icons/src/vender/line/files/Copy.tsx | 8 +- .../src/vender/line/files/CopyCheck.json | 54 +- .../icons/src/vender/line/files/CopyCheck.tsx | 8 +- .../icons/src/vender/line/files/File02.json | 74 +- .../icons/src/vender/line/files/File02.tsx | 8 +- .../src/vender/line/files/FileArrow01.json | 74 +- .../src/vender/line/files/FileArrow01.tsx | 8 +- .../src/vender/line/files/FileCheck02.json | 74 +- .../src/vender/line/files/FileCheck02.tsx | 8 +- .../src/vender/line/files/FileDownload02.json | 54 +- .../src/vender/line/files/FileDownload02.tsx | 8 +- .../src/vender/line/files/FilePlus01.json | 74 +- .../src/vender/line/files/FilePlus01.tsx | 8 +- .../src/vender/line/files/FilePlus02.json | 54 +- .../src/vender/line/files/FilePlus02.tsx | 8 +- .../icons/src/vender/line/files/FileText.json | 74 +- .../icons/src/vender/line/files/FileText.tsx | 8 +- .../src/vender/line/files/FileUpload.json | 100 +- .../src/vender/line/files/FileUpload.tsx | 8 +- .../icons/src/vender/line/files/Folder.json | 74 +- .../icons/src/vender/line/files/Folder.tsx | 8 +- .../base/icons/src/vender/line/files/index.ts | 2 +- .../line/financeAndECommerce/Balance.json | 54 +- .../line/financeAndECommerce/Balance.tsx | 8 +- .../financeAndECommerce/CoinsStacked01.json | 74 +- .../financeAndECommerce/CoinsStacked01.tsx | 8 +- .../line/financeAndECommerce/GoldCoin.json | 236 +- .../line/financeAndECommerce/GoldCoin.tsx | 8 +- .../line/financeAndECommerce/ReceiptList.json | 54 +- .../line/financeAndECommerce/ReceiptList.tsx | 8 +- .../line/financeAndECommerce/Tag01.json | 128 +- .../vender/line/financeAndECommerce/Tag01.tsx | 8 +- .../line/financeAndECommerce/Tag03.json | 74 +- .../vender/line/financeAndECommerce/Tag03.tsx | 8 +- .../icons/src/vender/line/general/AtSign.json | 128 +- .../icons/src/vender/line/general/AtSign.tsx | 8 +- .../src/vender/line/general/Bookmark.json | 54 +- .../src/vender/line/general/Bookmark.tsx | 8 +- .../icons/src/vender/line/general/Check.json | 74 +- .../icons/src/vender/line/general/Check.tsx | 8 +- .../src/vender/line/general/CheckDone01.json | 74 +- .../src/vender/line/general/CheckDone01.tsx | 8 +- .../vender/line/general/ChecklistSquare.json | 68 +- .../vender/line/general/ChecklistSquare.tsx | 8 +- .../vender/line/general/CodeAssistant.json | 102 +- .../src/vender/line/general/CodeAssistant.tsx | 8 +- .../src/vender/line/general/DotsGrid.json | 264 +- .../src/vender/line/general/DotsGrid.tsx | 8 +- .../icons/src/vender/line/general/Edit02.json | 128 +- .../icons/src/vender/line/general/Edit02.tsx | 8 +- .../icons/src/vender/line/general/Edit04.json | 54 +- .../icons/src/vender/line/general/Edit04.tsx | 8 +- .../icons/src/vender/line/general/Edit05.json | 128 +- .../icons/src/vender/line/general/Edit05.tsx | 8 +- .../icons/src/vender/line/general/Hash02.json | 72 +- .../icons/src/vender/line/general/Hash02.tsx | 8 +- .../src/vender/line/general/InfoCircle.json | 128 +- .../src/vender/line/general/InfoCircle.tsx | 8 +- .../icons/src/vender/line/general/Link03.json | 110 +- .../icons/src/vender/line/general/Link03.tsx | 8 +- .../vender/line/general/LinkExternal02.json | 72 +- .../vender/line/general/LinkExternal02.tsx | 8 +- .../src/vender/line/general/LogIn04.json | 102 +- .../icons/src/vender/line/general/LogIn04.tsx | 8 +- .../src/vender/line/general/LogOut01.json | 74 +- .../src/vender/line/general/LogOut01.tsx | 8 +- .../src/vender/line/general/LogOut04.json | 102 +- .../src/vender/line/general/LogOut04.tsx | 8 +- .../src/vender/line/general/MagicEdit.json | 106 +- .../src/vender/line/general/MagicEdit.tsx | 8 +- .../icons/src/vender/line/general/Menu01.json | 74 +- .../icons/src/vender/line/general/Menu01.tsx | 8 +- .../icons/src/vender/line/general/Pin01.json | 74 +- .../icons/src/vender/line/general/Pin01.tsx | 8 +- .../icons/src/vender/line/general/Pin02.json | 54 +- .../icons/src/vender/line/general/Pin02.tsx | 8 +- .../icons/src/vender/line/general/Plus02.json | 74 +- .../icons/src/vender/line/general/Plus02.tsx | 8 +- .../src/vender/line/general/Refresh.json | 42 +- .../icons/src/vender/line/general/Refresh.tsx | 8 +- .../src/vender/line/general/SearchMenu.json | 150 +- .../src/vender/line/general/SearchMenu.tsx | 8 +- .../src/vender/line/general/Settings01.json | 168 +- .../src/vender/line/general/Settings01.tsx | 8 +- .../src/vender/line/general/Settings04.json | 74 +- .../src/vender/line/general/Settings04.tsx | 8 +- .../src/vender/line/general/Target04.json | 126 +- .../src/vender/line/general/Target04.tsx | 8 +- .../src/vender/line/general/Upload03.json | 128 +- .../src/vender/line/general/Upload03.tsx | 8 +- .../vender/line/general/UploadCloud01.json | 80 +- .../src/vender/line/general/UploadCloud01.tsx | 8 +- .../base/icons/src/vender/line/general/X.json | 74 +- .../base/icons/src/vender/line/general/X.tsx | 8 +- .../icons/src/vender/line/general/index.ts | 2 +- .../src/vender/line/images/ImagePlus.json | 74 +- .../src/vender/line/images/ImagePlus.tsx | 8 +- .../src/vender/line/layout/AlignLeft01.json | 74 +- .../src/vender/line/layout/AlignLeft01.tsx | 8 +- .../src/vender/line/layout/AlignRight01.json | 74 +- .../src/vender/line/layout/AlignRight01.tsx | 8 +- .../icons/src/vender/line/layout/Grid01.json | 162 +- .../icons/src/vender/line/layout/Grid01.tsx | 8 +- .../src/vender/line/layout/LayoutGrid02.json | 54 +- .../src/vender/line/layout/LayoutGrid02.tsx | 8 +- .../line/mediaAndDevices/Microphone01.json | 74 +- .../line/mediaAndDevices/Microphone01.tsx | 8 +- .../line/mediaAndDevices/PlayCircle.json | 168 +- .../line/mediaAndDevices/PlayCircle.tsx | 8 +- .../vender/line/mediaAndDevices/SlidersH.json | 54 +- .../vender/line/mediaAndDevices/SlidersH.tsx | 8 +- .../vender/line/mediaAndDevices/Speaker.json | 220 +- .../vender/line/mediaAndDevices/Speaker.tsx | 8 +- .../src/vender/line/mediaAndDevices/Stop.json | 128 +- .../src/vender/line/mediaAndDevices/Stop.tsx | 8 +- .../line/mediaAndDevices/StopCircle.json | 114 +- .../line/mediaAndDevices/StopCircle.tsx | 8 +- .../src/vender/line/mediaAndDevices/index.ts | 2 +- .../icons/src/vender/line/others/BubbleX.json | 110 +- .../icons/src/vender/line/others/BubbleX.tsx | 8 +- .../icons/src/vender/line/others/Colors.json | 128 +- .../icons/src/vender/line/others/Colors.tsx | 8 +- .../src/vender/line/others/DragHandle.json | 72 +- .../src/vender/line/others/DragHandle.tsx | 8 +- .../icons/src/vender/line/others/Env.json | 176 +- .../base/icons/src/vender/line/others/Env.tsx | 8 +- .../vender/line/others/GlobalVariable.json | 52 +- .../src/vender/line/others/GlobalVariable.tsx | 8 +- .../src/vender/line/others/Icon3Dots.json | 74 +- .../src/vender/line/others/Icon3Dots.tsx | 8 +- .../src/vender/line/others/LongArrowLeft.json | 50 +- .../src/vender/line/others/LongArrowLeft.tsx | 8 +- .../vender/line/others/LongArrowRight.json | 50 +- .../src/vender/line/others/LongArrowRight.tsx | 8 +- .../src/vender/line/others/SearchMenu.json | 150 +- .../src/vender/line/others/SearchMenu.tsx | 8 +- .../icons/src/vender/line/others/Tools.json | 234 +- .../icons/src/vender/line/others/Tools.tsx | 8 +- .../src/vender/line/shapes/CubeOutline.json | 192 +- .../src/vender/line/shapes/CubeOutline.tsx | 8 +- .../vender/line/time/ClockFastForward.json | 54 +- .../src/vender/line/time/ClockFastForward.tsx | 8 +- .../icons/src/vender/line/time/ClockPlay.json | 128 +- .../icons/src/vender/line/time/ClockPlay.tsx | 8 +- .../src/vender/line/time/ClockPlaySlim.json | 74 +- .../src/vender/line/time/ClockPlaySlim.tsx | 8 +- .../src/vender/line/time/ClockRefresh.json | 120 +- .../src/vender/line/time/ClockRefresh.tsx | 8 +- .../base/icons/src/vender/line/time/index.ts | 2 +- .../icons/src/vender/line/users/User01.json | 74 +- .../icons/src/vender/line/users/User01.tsx | 8 +- .../icons/src/vender/line/users/Users01.json | 74 +- .../icons/src/vender/line/users/Users01.tsx | 8 +- .../src/vender/line/weather/Stars02.json | 54 +- .../icons/src/vender/line/weather/Stars02.tsx | 8 +- .../icons/src/vender/other/AnthropicText.json | 1074 +++---- .../icons/src/vender/other/AnthropicText.tsx | 8 +- .../icons/src/vender/other/Generator.json | 70 +- .../base/icons/src/vender/other/Generator.tsx | 8 +- .../base/icons/src/vender/other/Group.json | 128 +- .../base/icons/src/vender/other/Group.tsx | 8 +- .../src/vender/other/HourglassShape.json | 50 +- .../icons/src/vender/other/HourglassShape.tsx | 8 +- .../base/icons/src/vender/other/Mcp.json | 66 +- .../base/icons/src/vender/other/Mcp.tsx | 8 +- .../src/vender/other/NoToolPlaceholder.json | 554 ++-- .../src/vender/other/NoToolPlaceholder.tsx | 8 +- .../base/icons/src/vender/other/Openai.json | 156 +- .../base/icons/src/vender/other/Openai.tsx | 8 +- .../icons/src/vender/other/ReplayLine.json | 68 +- .../icons/src/vender/other/ReplayLine.tsx | 8 +- .../src/vender/other/SquareChecklist.json | 48 +- .../src/vender/other/SquareChecklist.tsx | 8 +- .../icons/src/vender/pipeline/InputField.json | 124 +- .../icons/src/vender/pipeline/InputField.tsx | 8 +- .../src/vender/pipeline/PipelineFill.json | 156 +- .../src/vender/pipeline/PipelineFill.tsx | 8 +- .../src/vender/pipeline/PipelineLine.json | 68 +- .../src/vender/pipeline/PipelineLine.tsx | 8 +- .../src/vender/plugin/BoxSparkleFill.json | 128 +- .../src/vender/plugin/BoxSparkleFill.tsx | 8 +- .../icons/src/vender/plugin/LeftCorner.json | 50 +- .../icons/src/vender/plugin/LeftCorner.tsx | 8 +- .../base/icons/src/vender/plugin/Trigger.json | 142 +- .../base/icons/src/vender/plugin/Trigger.tsx | 8 +- .../solid/FinanceAndECommerce/GoldCoin.json | 48 +- .../solid/FinanceAndECommerce/GoldCoin.tsx | 8 +- .../solid/FinanceAndECommerce/Scales02.json | 92 +- .../solid/FinanceAndECommerce/Scales02.tsx | 8 +- .../alertsAndFeedback/AlertTriangle.json | 72 +- .../solid/alertsAndFeedback/AlertTriangle.tsx | 8 +- .../solid/arrows/ArrowDownDoubleLine.json | 48 +- .../solid/arrows/ArrowDownDoubleLine.tsx | 8 +- .../solid/arrows/ArrowDownRoundFill.json | 50 +- .../solid/arrows/ArrowDownRoundFill.tsx | 8 +- .../solid/arrows/ArrowUpDoubleLine.json | 48 +- .../vender/solid/arrows/ArrowUpDoubleLine.tsx | 8 +- .../src/vender/solid/arrows/ChevronDown.json | 74 +- .../src/vender/solid/arrows/ChevronDown.tsx | 8 +- .../src/vender/solid/arrows/HighPriority.json | 102 +- .../src/vender/solid/arrows/HighPriority.tsx | 8 +- .../vender/solid/communication/AiText.json | 102 +- .../src/vender/solid/communication/AiText.tsx | 8 +- .../solid/communication/BubbleTextMod.json | 52 +- .../solid/communication/BubbleTextMod.tsx | 8 +- .../vender/solid/communication/ChatBot.json | 112 +- .../vender/solid/communication/ChatBot.tsx | 8 +- .../vender/solid/communication/CuteRobot.json | 72 +- .../vender/solid/communication/CuteRobot.tsx | 8 +- .../vender/solid/communication/EditList.json | 102 +- .../vender/solid/communication/EditList.tsx | 8 +- .../solid/communication/ListSparkle.json | 102 +- .../solid/communication/ListSparkle.tsx | 8 +- .../src/vender/solid/communication/Logic.json | 102 +- .../src/vender/solid/communication/Logic.tsx | 8 +- .../communication/MessageDotsCircle.json | 72 +- .../solid/communication/MessageDotsCircle.tsx | 8 +- .../solid/communication/MessageFast.json | 52 +- .../solid/communication/MessageFast.tsx | 8 +- .../communication/MessageHeartCircle.json | 72 +- .../communication/MessageHeartCircle.tsx | 8 +- .../communication/MessageSmileSquare.json | 72 +- .../communication/MessageSmileSquare.tsx | 8 +- .../vender/solid/communication/Send03.json | 68 +- .../src/vender/solid/communication/Send03.tsx | 8 +- .../solid/development/ApiConnection.json | 102 +- .../solid/development/ApiConnection.tsx | 8 +- .../solid/development/ApiConnectionMod.json | 72 +- .../solid/development/ApiConnectionMod.tsx | 8 +- .../solid/development/BarChartSquare02.json | 72 +- .../solid/development/BarChartSquare02.tsx | 8 +- .../vender/solid/development/Container.json | 84 +- .../vender/solid/development/Container.tsx | 8 +- .../vender/solid/development/Database02.json | 88 +- .../vender/solid/development/Database02.tsx | 8 +- .../vender/solid/development/Database03.json | 52 +- .../vender/solid/development/Database03.tsx | 8 +- .../vender/solid/development/FileHeart02.json | 96 +- .../vender/solid/development/FileHeart02.tsx | 8 +- .../solid/development/PatternRecognition.json | 192 +- .../solid/development/PatternRecognition.tsx | 8 +- .../solid/development/PromptEngineering.json | 102 +- .../solid/development/PromptEngineering.tsx | 8 +- .../solid/development/PuzzlePiece01.json | 72 +- .../solid/development/PuzzlePiece01.tsx | 8 +- .../vender/solid/development/Semantic.json | 102 +- .../src/vender/solid/development/Semantic.tsx | 8 +- .../solid/development/TerminalSquare.json | 72 +- .../solid/development/TerminalSquare.tsx | 8 +- .../vender/solid/development/Variable02.json | 120 +- .../vender/solid/development/Variable02.tsx | 8 +- .../src/vender/solid/development/index.ts | 2 +- .../src/vender/solid/editor/Brush01.json | 66 +- .../icons/src/vender/solid/editor/Brush01.tsx | 8 +- .../src/vender/solid/editor/Citations.json | 68 +- .../src/vender/solid/editor/Citations.tsx | 8 +- .../icons/src/vender/solid/editor/Colors.json | 120 +- .../icons/src/vender/solid/editor/Colors.tsx | 8 +- .../src/vender/solid/editor/Paragraph.json | 84 +- .../src/vender/solid/editor/Paragraph.tsx | 8 +- .../src/vender/solid/editor/TypeSquare.json | 52 +- .../src/vender/solid/editor/TypeSquare.tsx | 8 +- .../src/vender/solid/education/Beaker02.json | 72 +- .../src/vender/solid/education/Beaker02.tsx | 8 +- .../vender/solid/education/BubbleText.json | 72 +- .../src/vender/solid/education/BubbleText.tsx | 8 +- .../src/vender/solid/education/Heart02.json | 48 +- .../src/vender/solid/education/Heart02.tsx | 8 +- .../src/vender/solid/education/Unblur.json | 300 +- .../src/vender/solid/education/Unblur.tsx | 8 +- .../icons/src/vender/solid/files/File05.json | 106 +- .../icons/src/vender/solid/files/File05.tsx | 8 +- .../src/vender/solid/files/FileSearch02.json | 110 +- .../src/vender/solid/files/FileSearch02.tsx | 8 +- .../icons/src/vender/solid/files/FileZip.json | 90 +- .../icons/src/vender/solid/files/FileZip.tsx | 8 +- .../icons/src/vender/solid/files/Folder.json | 72 +- .../icons/src/vender/solid/files/Folder.tsx | 8 +- .../vender/solid/general/AnswerTriangle.json | 50 +- .../vender/solid/general/AnswerTriangle.tsx | 8 +- .../solid/general/ArrowDownRoundFill.json | 68 +- .../solid/general/ArrowDownRoundFill.tsx | 8 +- .../src/vender/solid/general/CheckCircle.json | 72 +- .../src/vender/solid/general/CheckCircle.tsx | 8 +- .../src/vender/solid/general/CheckDone01.json | 70 +- .../src/vender/solid/general/CheckDone01.tsx | 8 +- .../src/vender/solid/general/Download02.json | 54 +- .../src/vender/solid/general/Download02.tsx | 8 +- .../src/vender/solid/general/Edit03.json | 110 +- .../icons/src/vender/solid/general/Edit03.tsx | 8 +- .../src/vender/solid/general/Edit04.json | 74 +- .../icons/src/vender/solid/general/Edit04.tsx | 8 +- .../icons/src/vender/solid/general/Eye.json | 70 +- .../icons/src/vender/solid/general/Eye.tsx | 8 +- .../src/vender/solid/general/Github.json | 68 +- .../icons/src/vender/solid/general/Github.tsx | 8 +- .../solid/general/MessageClockCircle.json | 68 +- .../solid/general/MessageClockCircle.tsx | 8 +- .../src/vender/solid/general/PlusCircle.json | 72 +- .../src/vender/solid/general/PlusCircle.tsx | 8 +- .../solid/general/QuestionTriangle.json | 86 +- .../vender/solid/general/QuestionTriangle.tsx | 8 +- .../src/vender/solid/general/SearchMd.json | 72 +- .../src/vender/solid/general/SearchMd.tsx | 8 +- .../src/vender/solid/general/Target04.json | 88 +- .../src/vender/solid/general/Target04.tsx | 8 +- .../src/vender/solid/general/Tool03.json | 120 +- .../icons/src/vender/solid/general/Tool03.tsx | 8 +- .../src/vender/solid/general/XCircle.json | 54 +- .../src/vender/solid/general/XCircle.tsx | 8 +- .../src/vender/solid/general/ZapFast.json | 154 +- .../src/vender/solid/general/ZapFast.tsx | 8 +- .../src/vender/solid/general/ZapNarrow.json | 72 +- .../src/vender/solid/general/ZapNarrow.tsx | 8 +- .../icons/src/vender/solid/layout/Grid01.json | 154 +- .../icons/src/vender/solid/layout/Grid01.tsx | 8 +- .../mediaAndDevices/AudioSupportIcon.json | 48 +- .../mediaAndDevices/AudioSupportIcon.tsx | 8 +- .../mediaAndDevices/DocumentSupportIcon.json | 48 +- .../mediaAndDevices/DocumentSupportIcon.tsx | 8 +- .../solid/mediaAndDevices/MagicBox.json | 124 +- .../vender/solid/mediaAndDevices/MagicBox.tsx | 8 +- .../solid/mediaAndDevices/MagicEyes.json | 72 +- .../solid/mediaAndDevices/MagicEyes.tsx | 8 +- .../solid/mediaAndDevices/MagicWand.json | 142 +- .../solid/mediaAndDevices/MagicWand.tsx | 8 +- .../solid/mediaAndDevices/Microphone01.json | 106 +- .../solid/mediaAndDevices/Microphone01.tsx | 8 +- .../vender/solid/mediaAndDevices/Play.json | 72 +- .../src/vender/solid/mediaAndDevices/Play.tsx | 8 +- .../vender/solid/mediaAndDevices/Robot.json | 72 +- .../vender/solid/mediaAndDevices/Robot.tsx | 8 +- .../solid/mediaAndDevices/Sliders02.json | 150 +- .../solid/mediaAndDevices/Sliders02.tsx | 8 +- .../vender/solid/mediaAndDevices/Speaker.json | 220 +- .../vender/solid/mediaAndDevices/Speaker.tsx | 8 +- .../solid/mediaAndDevices/StopCircle.json | 72 +- .../solid/mediaAndDevices/StopCircle.tsx | 8 +- .../mediaAndDevices/VideoSupportIcon.json | 48 +- .../mediaAndDevices/VideoSupportIcon.tsx | 8 +- .../src/vender/solid/security/Lock01.json | 72 +- .../src/vender/solid/security/Lock01.tsx | 8 +- .../icons/src/vender/solid/shapes/Corner.json | 50 +- .../icons/src/vender/solid/shapes/Corner.tsx | 8 +- .../icons/src/vender/solid/shapes/Star04.json | 68 +- .../icons/src/vender/solid/shapes/Star04.tsx | 8 +- .../icons/src/vender/solid/shapes/Star06.json | 120 +- .../icons/src/vender/solid/shapes/Star06.tsx | 8 +- .../icons/src/vender/solid/users/User01.json | 110 +- .../icons/src/vender/solid/users/User01.tsx | 8 +- .../src/vender/solid/users/UserEdit02.json | 180 +- .../src/vender/solid/users/UserEdit02.tsx | 8 +- .../icons/src/vender/solid/users/Users01.json | 154 +- .../icons/src/vender/solid/users/Users01.tsx | 8 +- .../src/vender/solid/users/UsersPlus.json | 150 +- .../src/vender/solid/users/UsersPlus.tsx | 8 +- .../src/vender/system/AutoUpdateLine.json | 70 +- .../src/vender/system/AutoUpdateLine.tsx | 8 +- .../base/icons/src/vender/workflow/Agent.json | 102 +- .../base/icons/src/vender/workflow/Agent.tsx | 8 +- .../icons/src/vender/workflow/Answer.json | 72 +- .../base/icons/src/vender/workflow/Answer.tsx | 8 +- .../src/vender/workflow/ApiAggregate.json | 48 +- .../src/vender/workflow/ApiAggregate.tsx | 8 +- .../icons/src/vender/workflow/Assigner.json | 132 +- .../icons/src/vender/workflow/Assigner.tsx | 8 +- .../icons/src/vender/workflow/Asterisk.json | 48 +- .../icons/src/vender/workflow/Asterisk.tsx | 8 +- .../vender/workflow/CalendarCheckLine.json | 48 +- .../src/vender/workflow/CalendarCheckLine.tsx | 8 +- .../base/icons/src/vender/workflow/Code.json | 72 +- .../base/icons/src/vender/workflow/Code.tsx | 8 +- .../icons/src/vender/workflow/Datasource.json | 48 +- .../icons/src/vender/workflow/Datasource.tsx | 8 +- .../src/vender/workflow/DocsExtractor.json | 124 +- .../src/vender/workflow/DocsExtractor.tsx | 8 +- .../base/icons/src/vender/workflow/End.json | 72 +- .../base/icons/src/vender/workflow/End.tsx | 8 +- .../base/icons/src/vender/workflow/Home.json | 72 +- .../base/icons/src/vender/workflow/Home.tsx | 8 +- .../base/icons/src/vender/workflow/Http.json | 138 +- .../base/icons/src/vender/workflow/Http.tsx | 8 +- .../icons/src/vender/workflow/IfElse.json | 72 +- .../base/icons/src/vender/workflow/IfElse.tsx | 8 +- .../icons/src/vender/workflow/Iteration.json | 68 +- .../icons/src/vender/workflow/Iteration.tsx | 8 +- .../src/vender/workflow/IterationStart.json | 68 +- .../src/vender/workflow/IterationStart.tsx | 8 +- .../base/icons/src/vender/workflow/Jinja.json | 192 +- .../base/icons/src/vender/workflow/Jinja.tsx | 8 +- .../src/vender/workflow/KnowledgeBase.json | 68 +- .../src/vender/workflow/KnowledgeBase.tsx | 8 +- .../vender/workflow/KnowledgeRetrieval.json | 72 +- .../vender/workflow/KnowledgeRetrieval.tsx | 8 +- .../icons/src/vender/workflow/ListFilter.json | 72 +- .../icons/src/vender/workflow/ListFilter.tsx | 8 +- .../base/icons/src/vender/workflow/Llm.json | 72 +- .../base/icons/src/vender/workflow/Llm.tsx | 8 +- .../base/icons/src/vender/workflow/Loop.json | 72 +- .../base/icons/src/vender/workflow/Loop.tsx | 8 +- .../icons/src/vender/workflow/LoopEnd.json | 72 +- .../icons/src/vender/workflow/LoopEnd.tsx | 8 +- .../vender/workflow/ParameterExtractor.json | 528 ++-- .../vender/workflow/ParameterExtractor.tsx | 8 +- .../vender/workflow/QuestionClassifier.json | 72 +- .../vender/workflow/QuestionClassifier.tsx | 8 +- .../icons/src/vender/workflow/Schedule.json | 88 +- .../icons/src/vender/workflow/Schedule.tsx | 8 +- .../vender/workflow/TemplatingTransform.json | 304 +- .../vender/workflow/TemplatingTransform.tsx | 8 +- .../icons/src/vender/workflow/TriggerAll.json | 142 +- .../icons/src/vender/workflow/TriggerAll.tsx | 8 +- .../icons/src/vender/workflow/VariableX.json | 72 +- .../icons/src/vender/workflow/VariableX.tsx | 8 +- .../src/vender/workflow/WebhookLine.json | 48 +- .../icons/src/vender/workflow/WebhookLine.tsx | 8 +- .../src/vender/workflow/WindowCursor.json | 120 +- .../src/vender/workflow/WindowCursor.tsx | 8 +- .../base/icons/src/vender/workflow/index.ts | 4 +- web/app/components/base/icons/utils.spec.ts | 2 +- web/app/components/base/icons/utils.ts | 24 +- .../components/base/image-gallery/index.tsx | 32 +- .../base/image-uploader/audio-preview.tsx | 10 +- .../image-uploader/chat-image-uploader.tsx | 14 +- .../components/base/image-uploader/hooks.ts | 12 +- .../base/image-uploader/image-link-input.tsx | 10 +- .../image-uploader/image-list.stories.tsx | 6 +- .../base/image-uploader/image-list.tsx | 23 +- .../base/image-uploader/image-preview.tsx | 69 +- .../text-generation-image-uploader.tsx | 30 +- .../base/image-uploader/uploader.tsx | 10 +- .../base/image-uploader/video-preview.tsx | 10 +- .../base/inline-delete-confirm/index.spec.tsx | 20 +- .../inline-delete-confirm/index.stories.tsx | 2 +- .../base/input-number/index.stories.tsx | 44 +- .../components/base/input-number/index.tsx | 88 +- .../base/input-with-copy/index.spec.tsx | 2 +- .../components/base/input-with-copy/index.tsx | 24 +- web/app/components/base/input/index.spec.tsx | 2 +- .../components/base/input/index.stories.tsx | 7 +- web/app/components/base/input/index.tsx | 15 +- .../base/linked-apps-panel/index.stories.tsx | 2 +- .../base/linked-apps-panel/index.tsx | 20 +- .../base/list-empty/horizontal-line.tsx | 8 +- web/app/components/base/list-empty/index.tsx | 25 +- .../base/list-empty/vertical-line.tsx | 8 +- .../components/base/loading/index.spec.tsx | 4 +- web/app/components/base/loading/index.tsx | 7 +- web/app/components/base/logo/dify-logo.tsx | 5 +- .../components/base/logo/index.stories.tsx | 10 +- .../base/logo/logo-embedded-chat-avatar.tsx | 2 +- .../base/logo/logo-embedded-chat-header.tsx | 24 +- web/app/components/base/logo/logo-site.tsx | 4 +- .../base/markdown-blocks/button.tsx | 37 +- .../base/markdown-blocks/code-block.tsx | 79 +- .../components/base/markdown-blocks/form.tsx | 27 +- .../components/base/markdown-blocks/index.ts | 20 +- .../components/base/markdown-blocks/link.tsx | 2 +- .../base/markdown-blocks/plugin-img.tsx | 4 +- .../base/markdown-blocks/plugin-paragraph.tsx | 4 +- .../base/markdown-blocks/pre-code.tsx | 3 +- .../markdown-blocks/think-block.stories.tsx | 2 +- .../base/markdown-blocks/think-block.tsx | 5 +- .../components/base/markdown-blocks/utils.ts | 3 +- .../base/markdown/error-boundary.tsx | 11 +- web/app/components/base/markdown/index.tsx | 6 +- .../base/markdown/markdown-utils.ts | 3 +- .../base/markdown/react-markdown-wrapper.tsx | 6 +- web/app/components/base/mermaid/index.tsx | 28 +- web/app/components/base/mermaid/utils.ts | 18 +- .../base/message-log-modal/index.stories.tsx | 8 +- .../base/message-log-modal/index.tsx | 32 +- .../components/base/modal-like-wrap/index.tsx | 33 +- web/app/components/base/modal/index.tsx | 60 +- web/app/components/base/modal/modal.tsx | 30 +- .../base/new-audio-button/index.stories.tsx | 2 +- .../base/new-audio-button/index.tsx | 10 +- web/app/components/base/node-status/index.tsx | 14 +- .../base/notion-connector/index.tsx | 20 +- web/app/components/base/notion-icon/index.tsx | 6 +- .../base/notion-page-selector/base.tsx | 68 +- .../credential-selector/index.tsx | 34 +- .../notion-page-selector/index.stories.tsx | 9 +- .../page-selector/index.tsx | 47 +- .../search-input/index.tsx | 10 +- web/app/components/base/pagination/hook.ts | 2 +- web/app/components/base/pagination/index.tsx | 58 +- .../components/base/pagination/pagination.tsx | 10 +- web/app/components/base/pagination/type.ts | 4 +- .../base/param-item/index.stories.tsx | 4 +- web/app/components/base/param-item/index.tsx | 32 +- .../base/param-item/score-threshold-item.tsx | 2 +- .../components/base/param-item/top-k-item.tsx | 2 +- .../components/base/popover/index.stories.tsx | 4 +- web/app/components/base/popover/index.tsx | 36 +- .../base/portal-to-follow-elem/index.spec.tsx | 28 +- .../portal-to-follow-elem/index.stories.tsx | 2 +- .../base/portal-to-follow-elem/index.tsx | 9 +- .../components/base/premium-badge/index.tsx | 9 +- .../progress-bar/progress-circle.stories.tsx | 3 +- .../base/prompt-editor/constants.tsx | 5 +- .../components/base/prompt-editor/hooks.ts | 43 +- .../base/prompt-editor/index.stories.tsx | 24 +- .../components/base/prompt-editor/index.tsx | 134 +- .../plugins/component-picker-block/hooks.tsx | 77 +- .../plugins/component-picker-block/index.tsx | 62 +- .../component-picker-block/prompt-option.tsx | 5 +- .../variable-option.tsx | 9 +- .../plugins/context-block/component.tsx | 55 +- .../context-block-replacement-block.tsx | 12 +- .../plugins/context-block/index.tsx | 18 +- .../plugins/context-block/node.tsx | 4 +- .../plugins/current-block/component.tsx | 13 +- .../current-block-replacement-block.tsx | 12 +- .../plugins/current-block/index.tsx | 16 +- .../plugins/current-block/node.tsx | 4 +- .../plugins/error-message-block/component.tsx | 11 +- .../error-message-block-replacement-block.tsx | 12 +- .../plugins/error-message-block/index.tsx | 16 +- .../plugins/history-block/component.tsx | 46 +- .../history-block-replacement-block.tsx | 14 +- .../plugins/history-block/index.tsx | 18 +- .../plugins/history-block/node.tsx | 4 +- .../plugins/last-run-block/component.tsx | 11 +- .../plugins/last-run-block/index.tsx | 16 +- .../last-run-block-replacement-block.tsx | 12 +- .../plugins/on-blur-or-focus-block.tsx | 6 +- .../prompt-editor/plugins/placeholder.tsx | 5 +- .../plugins/query-block/component.tsx | 10 +- .../plugins/query-block/index.tsx | 14 +- .../query-block-replacement-block.tsx | 12 +- .../prompt-editor/plugins/update-block.tsx | 4 +- .../plugins/variable-block/index.tsx | 6 +- .../plugins/variable-value-block/index.tsx | 4 +- .../workflow-variable-block/component.tsx | 51 +- .../plugins/workflow-variable-block/index.tsx | 16 +- .../plugins/workflow-variable-block/node.tsx | 7 +- ...kflow-variable-block-replacement-block.tsx | 18 +- .../components/base/prompt-editor/types.ts | 4 +- .../components/base/prompt-editor/utils.ts | 6 +- .../components/base/prompt-log-modal/card.tsx | 16 +- .../base/prompt-log-modal/index.stories.tsx | 6 +- .../base/prompt-log-modal/index.tsx | 28 +- web/app/components/base/qrcode/index.tsx | 20 +- .../base/radio-card/index.stories.tsx | 79 +- web/app/components/base/radio-card/index.tsx | 20 +- .../base/radio-card/simple/index.tsx | 10 +- .../base/radio/component/group/index.tsx | 2 +- .../base/radio/component/radio/index.tsx | 27 +- .../components/base/radio/index.stories.tsx | 37 +- web/app/components/base/radio/index.tsx | 2 +- web/app/components/base/radio/ui.tsx | 3 +- .../base/search-input/index.stories.tsx | 188 +- .../components/base/search-input/index.tsx | 9 +- .../base/segmented-control/index.spec.tsx | 16 +- .../base/segmented-control/index.stories.tsx | 4 +- .../base/segmented-control/index.tsx | 19 +- web/app/components/base/select/custom.tsx | 77 +- .../components/base/select/index.stories.tsx | 45 +- web/app/components/base/select/index.tsx | 229 +- .../components/base/select/locale-signin.tsx | 29 +- web/app/components/base/select/locale.tsx | 29 +- web/app/components/base/select/pure.tsx | 36 +- .../base/simple-pie-chart/index.tsx | 8 +- .../components/base/slider/index.stories.tsx | 105 +- web/app/components/base/slider/index.tsx | 24 +- .../components/base/sort/index.stories.tsx | 4 +- web/app/components/base/sort/index.tsx | 39 +- .../components/base/spinner/index.spec.tsx | 2 +- .../components/base/spinner/index.stories.tsx | 4 +- web/app/components/base/spinner/index.tsx | 4 +- web/app/components/base/svg-gallery/index.tsx | 27 +- web/app/components/base/svg/index.stories.tsx | 4 +- web/app/components/base/svg/index.tsx | 4 +- .../components/base/switch/index.stories.tsx | 16 +- web/app/components/base/switch/index.tsx | 16 +- .../base/tab-header/index.stories.tsx | 6 +- web/app/components/base/tab-header/index.tsx | 6 +- .../base/tab-slider-new/index.stories.tsx | 2 +- .../base/tab-slider-plain/index.tsx | 2 +- web/app/components/base/tab-slider/index.tsx | 20 +- .../base/tag-input/index.stories.tsx | 30 +- web/app/components/base/tag-input/index.tsx | 14 +- .../components/base/tag-management/filter.tsx | 93 +- .../base/tag-management/index.stories.tsx | 10 +- .../components/base/tag-management/index.tsx | 22 +- .../components/base/tag-management/panel.tsx | 70 +- .../base/tag-management/selector.tsx | 21 +- .../components/base/tag-management/store.ts | 2 +- .../base/tag-management/tag-item-editor.tsx | 37 +- .../base/tag-management/tag-remove-modal.tsx | 30 +- .../base/tag-management/trigger.tsx | 56 +- web/app/components/base/tag/index.tsx | 8 +- .../components/base/text-generation/hooks.ts | 3 +- .../components/base/text-generation/types.ts | 3 +- .../base/textarea/index.stories.tsx | 22 +- web/app/components/base/textarea/index.tsx | 3 +- web/app/components/base/theme-selector.tsx | 73 +- web/app/components/base/theme-switcher.tsx | 14 +- .../timezone-label/__tests__/index.test.tsx | 5 +- web/app/components/base/toast/index.spec.tsx | 22 +- web/app/components/base/toast/index.tsx | 107 +- web/app/components/base/tooltip/content.tsx | 8 +- .../components/base/tooltip/index.spec.tsx | 34 +- web/app/components/base/tooltip/index.tsx | 32 +- .../base/video-gallery/VideoPlayer.tsx | 20 +- .../components/base/video-gallery/index.tsx | 3 +- .../base/voice-input/index.stories.tsx | 317 +- web/app/components/base/voice-input/index.tsx | 32 +- web/app/components/base/voice-input/utils.ts | 4 +- .../base/with-input-validation/index.spec.tsx | 14 +- .../with-input-validation/index.stories.tsx | 46 +- .../base/with-input-validation/index.tsx | 2 +- web/app/components/base/zendesk/index.tsx | 8 +- web/app/components/base/zendesk/utils.ts | 6 +- .../billing/annotation-full/index.spec.tsx | 4 +- .../billing/annotation-full/index.tsx | 20 +- .../billing/annotation-full/modal.spec.tsx | 10 +- .../billing/annotation-full/modal.tsx | 24 +- .../billing/annotation-full/usage.tsx | 2 +- .../billing/apps-full-in-dialog/index.tsx | 37 +- .../components/billing/billing-page/index.tsx | 26 +- web/app/components/billing/config.ts | 4 +- .../billing/header-billing-btn/index.tsx | 6 +- .../billing/partner-stack/index.tsx | 2 +- .../billing/partner-stack/use-ps-info.ts | 10 +- .../billing/plan-upgrade-modal/index.spec.tsx | 4 +- .../billing/plan-upgrade-modal/index.tsx | 26 +- .../billing/plan/assets/enterprise.tsx | 164 +- .../billing/plan/assets/index.spec.tsx | 6 +- .../components/billing/plan/assets/index.tsx | 6 +- .../billing/plan/assets/professional.tsx | 164 +- .../billing/plan/assets/sandbox.tsx | 164 +- .../components/billing/plan/assets/team.tsx | 164 +- web/app/components/billing/plan/index.tsx | 72 +- .../billing/pricing/assets/cloud.tsx | 26 +- .../billing/pricing/assets/community.tsx | 170 +- .../pricing/assets/enterprise-noise.tsx | 20 +- .../billing/pricing/assets/enterprise.tsx | 170 +- .../billing/pricing/assets/index.tsx | 16 +- .../billing/pricing/assets/noise-bottom.tsx | 20 +- .../billing/pricing/assets/noise-top.tsx | 20 +- .../billing/pricing/assets/premium-noise.tsx | 20 +- .../billing/pricing/assets/premium.tsx | 170 +- .../billing/pricing/assets/professional.tsx | 170 +- .../billing/pricing/assets/sandbox.tsx | 170 +- .../billing/pricing/assets/self-hosted.tsx | 26 +- .../billing/pricing/assets/team.tsx | 170 +- web/app/components/billing/pricing/footer.tsx | 27 +- web/app/components/billing/pricing/header.tsx | 24 +- web/app/components/billing/pricing/index.tsx | 24 +- .../billing/pricing/plan-switcher/index.tsx | 18 +- .../plan-switcher/plan-range-switcher.tsx | 6 +- .../billing/pricing/plan-switcher/tab.tsx | 2 +- .../plans/cloud-plan-item/button.spec.tsx | 8 +- .../pricing/plans/cloud-plan-item/button.tsx | 12 +- .../plans/cloud-plan-item/index.spec.tsx | 20 +- .../pricing/plans/cloud-plan-item/index.tsx | 52 +- .../plans/cloud-plan-item/list/index.spec.tsx | 10 +- .../plans/cloud-plan-item/list/index.tsx | 17 +- .../cloud-plan-item/list/item/index.spec.tsx | 2 +- .../plans/cloud-plan-item/list/item/index.tsx | 4 +- .../cloud-plan-item/list/item/tooltip.tsx | 10 +- .../billing/pricing/plans/index.spec.tsx | 21 +- .../billing/pricing/plans/index.tsx | 43 +- .../self-hosted-plan-item/button.spec.tsx | 10 +- .../plans/self-hosted-plan-item/button.tsx | 19 +- .../self-hosted-plan-item/index.spec.tsx | 20 +- .../plans/self-hosted-plan-item/index.tsx | 44 +- .../self-hosted-plan-item/list/index.spec.tsx | 6 +- .../self-hosted-plan-item/list/index.tsx | 13 +- .../self-hosted-plan-item/list/item.spec.tsx | 4 +- .../plans/self-hosted-plan-item/list/item.tsx | 10 +- .../billing/priority-label/index.tsx | 22 +- .../components/billing/progress-bar/index.tsx | 2 +- .../trigger-events-limit-modal/index.tsx | 4 +- web/app/components/billing/type.ts | 6 +- .../components/billing/upgrade-btn/index.tsx | 10 +- .../billing/usage-info/apps-info.tsx | 6 +- .../components/billing/usage-info/index.tsx | 38 +- .../billing/usage-info/vector-space-info.tsx | 8 +- web/app/components/billing/utils/index.ts | 2 +- .../billing/vector-space-full/index.tsx | 14 +- .../custom/custom-page/index.spec.tsx | 8 +- .../components/custom/custom-page/index.tsx | 22 +- .../custom/custom-web-app-brand/index.tsx | 180 +- web/app/components/datasets/chunk.tsx | 64 +- .../datasets/common/check-rerank-model.ts | 9 +- .../datasets/common/chunking-mode-label.tsx | 6 +- .../datasets/common/credential-icon.tsx | 6 +- .../datasets/common/document-file-icon.tsx | 4 +- .../common/document-picker/document-list.tsx | 12 +- .../common/document-picker/index.spec.tsx | 15 +- .../datasets/common/document-picker/index.tsx | 73 +- .../preview-document-picker.spec.tsx | 9 +- .../preview-document-picker.tsx | 51 +- .../auto-disabled-document.tsx | 7 +- .../index-failed.tsx | 10 +- .../status-with-action.tsx | 15 +- .../index.tsx | 14 +- .../datasets/common/image-list/index.tsx | 9 +- .../datasets/common/image-list/more.tsx | 10 +- .../datasets/common/image-previewer/index.tsx | 63 +- .../common/image-uploader/hooks/use-upload.ts | 23 +- .../image-uploader-in-chunk/image-input.tsx | 24 +- .../image-uploader-in-chunk/image-item.tsx | 36 +- .../image-uploader-in-chunk/index.tsx | 19 +- .../image-input.tsx | 28 +- .../image-item.tsx | 36 +- .../index.tsx | 26 +- .../datasets/common/image-uploader/store.tsx | 6 +- .../datasets/common/image-uploader/utils.ts | 2 +- .../retrieval-method-config/index.spec.tsx | 10 +- .../common/retrieval-method-config/index.tsx | 92 +- .../common/retrieval-method-info/index.tsx | 38 +- .../common/retrieval-param-config/index.tsx | 83 +- .../dsl-confirm-modal.tsx | 26 +- .../create-from-dsl-modal/header.tsx | 6 +- .../create-from-dsl-modal/index.tsx | 56 +- .../create-from-dsl-modal/tab/index.tsx | 4 +- .../create-from-dsl-modal/tab/item.tsx | 2 +- .../create-from-dsl-modal/uploader.tsx | 45 +- .../datasets/create-from-pipeline/footer.tsx | 18 +- .../datasets/create-from-pipeline/header.tsx | 18 +- .../datasets/create-from-pipeline/index.tsx | 8 +- .../list/built-in-pipeline-list.tsx | 14 +- .../create-from-pipeline/list/create-card.tsx | 20 +- .../list/customized-list.tsx | 10 +- .../create-from-pipeline/list/index.tsx | 2 +- .../list/template-card/actions.tsx | 38 +- .../list/template-card/content.tsx | 24 +- .../details/chunk-structure-card.tsx | 21 +- .../list/template-card/details/hooks.tsx | 11 +- .../list/template-card/details/index.tsx | 60 +- .../list/template-card/edit-pipeline-info.tsx | 47 +- .../list/template-card/index.tsx | 31 +- .../list/template-card/operations.tsx | 22 +- .../create/embedding-process/index.tsx | 202 +- .../index.spec.tsx | 4 +- .../empty-dataset-creation-modal/index.tsx | 20 +- .../create/file-preview/index.spec.tsx | 9 +- .../datasets/create/file-preview/index.tsx | 20 +- .../datasets/create/file-uploader/index.tsx | 70 +- web/app/components/datasets/create/icons.ts | 6 +- .../components/datasets/create/index.spec.tsx | 12 +- web/app/components/datasets/create/index.tsx | 27 +- .../create/notion-page-preview/index.spec.tsx | 7 +- .../create/notion-page-preview/index.tsx | 18 +- .../datasets/create/step-one/index.tsx | 78 +- .../datasets/create/step-one/upgrade-card.tsx | 18 +- .../datasets/create/step-three/index.spec.tsx | 2 +- .../datasets/create/step-three/index.tsx | 60 +- .../datasets/create/step-two/index.tsx | 887 +++--- .../datasets/create/step-two/inputs.tsx | 127 +- .../step-two/language-select/index.spec.tsx | 4 +- .../create/step-two/language-select/index.tsx | 32 +- .../datasets/create/step-two/option-card.tsx | 56 +- .../step-two/preview-item/index.spec.tsx | 2 +- .../create/step-two/preview-item/index.tsx | 24 +- .../datasets/create/stepper/index.spec.tsx | 6 +- .../datasets/create/stepper/index.tsx | 35 +- .../datasets/create/stepper/step.tsx | 36 +- .../create/stop-embedding-modal/index.tsx | 12 +- .../datasets/create/top-bar/index.spec.tsx | 5 +- .../datasets/create/top-bar/index.tsx | 42 +- .../datasets/create/website/base.spec.tsx | 6 +- .../website/base/checkbox-with-label.tsx | 6 +- .../website/base/crawled-result-item.tsx | 20 +- .../create/website/base/crawled-result.tsx | 14 +- .../datasets/create/website/base/crawling.tsx | 17 +- .../create/website/base/error-message.tsx | 10 +- .../datasets/create/website/base/field.tsx | 17 +- .../datasets/create/website/base/header.tsx | 35 +- .../datasets/create/website/base/input.tsx | 4 +- .../create/website/base/options-wrap.tsx | 17 +- .../create/website/base/url-input.tsx | 8 +- .../create/website/firecrawl/index.tsx | 61 +- .../create/website/firecrawl/options.tsx | 24 +- .../datasets/create/website/index.tsx | 110 +- .../website/jina-reader/base/url-input.tsx | 10 +- .../create/website/jina-reader/index.spec.tsx | 7 +- .../create/website/jina-reader/index.tsx | 61 +- .../create/website/jina-reader/options.tsx | 16 +- .../datasets/create/website/no-data.tsx | 60 +- .../datasets/create/website/preview.tsx | 14 +- .../create/website/watercrawl/index.spec.tsx | 13 +- .../create/website/watercrawl/index.tsx | 61 +- .../create/website/watercrawl/options.tsx | 28 +- .../actions/index.spec.tsx | 2 +- .../create-from-pipeline/actions/index.tsx | 42 +- .../data-source-options/datasource-icon.tsx | 5 +- .../data-source-options/hooks.tsx | 9 +- .../data-source-options/index.spec.tsx | 17 +- .../data-source-options/index.tsx | 8 +- .../data-source-options/option-card.tsx | 4 +- .../base/credential-selector/index.spec.tsx | 7 +- .../base/credential-selector/index.tsx | 12 +- .../base/credential-selector/item.tsx | 8 +- .../base/credential-selector/list.tsx | 2 +- .../base/credential-selector/trigger.tsx | 10 +- .../data-source/base/header.spec.tsx | 5 +- .../data-source/base/header.tsx | 36 +- .../data-source/local-file/index.tsx | 92 +- .../online-documents/index.spec.tsx | 10 +- .../data-source/online-documents/index.tsx | 81 +- .../page-selector/index.spec.tsx | 4 +- .../online-documents/page-selector/index.tsx | 8 +- .../online-documents/page-selector/item.tsx | 73 +- .../online-documents/page-selector/utils.ts | 2 +- .../data-source/online-documents/title.tsx | 2 +- .../online-drive/connect/index.spec.tsx | 2 +- .../online-drive/connect/index.tsx | 22 +- .../file-list/header/breadcrumbs/bucket.tsx | 12 +- .../file-list/header/breadcrumbs/drive.tsx | 6 +- .../breadcrumbs/dropdown/index.spec.tsx | 11 +- .../header/breadcrumbs/dropdown/index.tsx | 12 +- .../header/breadcrumbs/dropdown/item.tsx | 2 +- .../header/breadcrumbs/dropdown/menu.tsx | 2 +- .../file-list/header/breadcrumbs/index.tsx | 12 +- .../file-list/header/breadcrumbs/item.tsx | 4 +- .../online-drive/file-list/header/index.tsx | 8 +- .../online-drive/file-list/index.spec.tsx | 10 +- .../online-drive/file-list/index.tsx | 6 +- .../file-list/list/empty-folder.tsx | 4 +- .../file-list/list/empty-search-result.tsx | 18 +- .../online-drive/file-list/list/file-icon.tsx | 6 +- .../file-list/list/index.spec.tsx | 61 +- .../online-drive/file-list/list/index.tsx | 26 +- .../online-drive/file-list/list/item.tsx | 42 +- .../data-source/online-drive/header.tsx | 28 +- .../data-source/online-drive/index.spec.tsx | 16 +- .../data-source/online-drive/index.tsx | 43 +- .../data-source/online-drive/utils.ts | 10 +- .../data-source/store/index.ts | 12 +- .../base/checkbox-with-label.tsx | 6 +- .../base/crawled-result-item.tsx | 49 +- .../website-crawl/base/crawled-result.tsx | 16 +- .../website-crawl/base/crawling.tsx | 30 +- .../website-crawl/base/error-message.tsx | 15 +- .../website-crawl/base/index.spec.tsx | 7 +- .../website-crawl/base/options/index.spec.tsx | 16 +- .../website-crawl/base/options/index.tsx | 36 +- .../data-source/website-crawl/index.spec.tsx | 12 +- .../data-source/website-crawl/index.tsx | 52 +- .../documents/create-from-pipeline/hooks.ts | 11 +- .../documents/create-from-pipeline/index.tsx | 89 +- .../create-from-pipeline/left-header.tsx | 30 +- .../preview/chunk-preview.spec.tsx | 14 +- .../preview/chunk-preview.tsx | 242 +- .../preview/file-preview.spec.tsx | 2 +- .../preview/file-preview.tsx | 34 +- .../create-from-pipeline/preview/loading.tsx | 72 +- .../preview/online-document-preview.spec.tsx | 7 +- .../preview/online-document-preview.tsx | 36 +- .../preview/web-preview.spec.tsx | 2 +- .../preview/web-preview.tsx | 28 +- .../process-documents/actions.tsx | 18 +- .../process-documents/components.spec.tsx | 10 +- .../process-documents/form.tsx | 10 +- .../process-documents/header.tsx | 20 +- .../process-documents/hooks.ts | 2 +- .../process-documents/index.spec.tsx | 6 +- .../process-documents/index.tsx | 8 +- .../embedding-process/index.spec.tsx | 11 +- .../processing/embedding-process/index.tsx | 106 +- .../embedding-process/rule-detail.spec.tsx | 13 +- .../embedding-process/rule-detail.tsx | 31 +- .../processing/index.spec.tsx | 9 +- .../create-from-pipeline/processing/index.tsx | 32 +- .../create-from-pipeline/step-indicator.tsx | 4 +- .../detail/batch-modal/csv-downloader.tsx | 70 +- .../detail/batch-modal/csv-uploader.tsx | 44 +- .../documents/detail/batch-modal/index.tsx | 22 +- .../detail/completed/child-segment-detail.tsx | 43 +- .../detail/completed/child-segment-list.tsx | 145 +- .../completed/common/action-buttons.tsx | 51 +- .../detail/completed/common/add-another.tsx | 11 +- .../detail/completed/common/batch-action.tsx | 67 +- .../detail/completed/common/chunk-content.tsx | 40 +- .../documents/detail/completed/common/dot.tsx | 2 +- .../detail/completed/common/drawer.tsx | 42 +- .../detail/completed/common/empty.tsx | 43 +- .../completed/common/full-screen-drawer.tsx | 9 +- .../detail/completed/common/keywords.tsx | 26 +- .../completed/common/regeneration-modal.tsx | 45 +- .../completed/common/segment-index-tag.tsx | 3 +- .../documents/detail/completed/common/tag.tsx | 6 +- .../detail/completed/display-toggle.tsx | 19 +- .../documents/detail/completed/index.tsx | 211 +- .../detail/completed/new-child-segment.tsx | 86 +- .../completed/segment-card/chunk-content.tsx | 26 +- .../completed/segment-card/index.spec.tsx | 21 +- .../detail/completed/segment-card/index.tsx | 204 +- .../detail/completed/segment-detail.tsx | 65 +- .../detail/completed/segment-list.tsx | 35 +- .../skeleton/full-doc-list-skeleton.tsx | 12 +- .../skeleton/general-list-skeleton.tsx | 64 +- .../skeleton/paragraph-list-skeleton.tsx | 66 +- .../skeleton/parent-chunk-card-skeleton.tsx | 34 +- .../detail/completed/status-item.tsx | 11 +- .../documents/detail/document-title.tsx | 2 +- .../documents/detail/embedding/index.tsx | 147 +- .../detail/embedding/skeleton/index.tsx | 58 +- .../datasets/documents/detail/index.tsx | 111 +- .../documents/detail/metadata/index.tsx | 312 +- .../datasets/documents/detail/new-segment.tsx | 79 +- .../documents/detail/segment-add/index.tsx | 78 +- .../detail/settings/document-settings.tsx | 36 +- .../settings/pipeline-settings/index.spec.tsx | 14 +- .../settings/pipeline-settings/index.tsx | 34 +- .../pipeline-settings/left-header.tsx | 20 +- .../process-documents/actions.tsx | 6 +- .../process-documents/index.spec.tsx | 10 +- .../process-documents/index.tsx | 8 +- .../hooks/use-document-list-query-state.ts | 5 +- .../components/datasets/documents/index.tsx | 209 +- .../components/datasets/documents/list.tsx | 300 +- .../datasets/documents/operations.tsx | 290 +- .../datasets/documents/rename-modal.tsx | 16 +- .../documents/status-item/index.spec.tsx | 16 +- .../datasets/documents/status-item/index.tsx | 107 +- .../external-api/external-api-modal/Form.tsx | 18 +- .../external-api/external-api-modal/index.tsx | 95 +- .../external-api/external-api-panel/index.tsx | 57 +- .../external-knowledge-api-card/index.tsx | 34 +- .../connector/index.spec.tsx | 4 +- .../connector/index.tsx | 6 +- .../create/ExternalApiSelect.tsx | 36 +- .../create/ExternalApiSelection.tsx | 55 +- .../create/InfoPanel.tsx | 24 +- .../create/KnowledgeBaseInfo.tsx | 22 +- .../create/RetrievalSettings.tsx | 23 +- .../create/index.spec.tsx | 4 +- .../external-knowledge-base/create/index.tsx | 59 +- .../components/datasets/extra-info/index.tsx | 8 +- .../datasets/extra-info/service-api/card.tsx | 74 +- .../datasets/extra-info/service-api/index.tsx | 17 +- .../datasets/extra-info/statistics.tsx | 42 +- .../formatted-text/flavours/edit-slice.tsx | 72 +- .../formatted-text/flavours/preview-slice.tsx | 25 +- .../formatted-text/flavours/shared.tsx | 55 +- .../datasets/formatted-text/formatted.tsx | 12 +- .../components/child-chunks-item.tsx | 11 +- .../components/chunk-detail-modal.tsx | 61 +- .../hit-testing/components/empty-records.tsx | 12 +- .../datasets/hit-testing/components/mask.tsx | 3 +- .../components/query-input/index.tsx | 97 +- .../components/query-input/textarea.tsx | 42 +- .../hit-testing/components/records.tsx | 42 +- .../components/result-item-external.tsx | 24 +- .../components/result-item-footer.tsx | 4 +- .../components/result-item-meta.tsx | 10 +- .../hit-testing/components/result-item.tsx | 49 +- .../datasets/hit-testing/components/score.tsx | 7 +- .../components/datasets/hit-testing/index.tsx | 111 +- .../modify-external-retrieval-modal.tsx | 30 +- .../hit-testing/modify-retrieval-modal.tsx | 70 +- .../datasets/list/dataset-card/index.tsx | 121 +- .../list/dataset-card/operation-item.tsx | 8 +- .../datasets/list/dataset-card/operations.tsx | 12 +- .../datasets/list/dataset-footer/index.tsx | 15 +- web/app/components/datasets/list/datasets.tsx | 8 +- web/app/components/datasets/list/index.tsx | 46 +- .../datasets/list/new-dataset-card/index.tsx | 18 +- .../datasets/list/new-dataset-card/option.tsx | 8 +- .../datasets/metadata/add-metadata-button.tsx | 12 +- .../datasets/metadata/base/date-picker.tsx | 16 +- .../metadata/edit-metadata-batch/add-row.tsx | 10 +- .../metadata/edit-metadata-batch/edit-row.tsx | 44 +- .../edit-metadata-batch/edited-beacon.tsx | 32 +- .../edit-metadata-batch/input-combined.tsx | 10 +- .../input-has-set-multiple-value.tsx | 10 +- .../metadata/edit-metadata-batch/label.tsx | 7 +- .../metadata/edit-metadata-batch/modal.tsx | 83 +- .../hooks/use-batch-edit-document-metadata.ts | 11 +- .../hooks/use-edit-dataset-metadata.ts | 15 +- .../metadata/hooks/use-metadata-document.ts | 17 +- .../metadata-dataset/create-content.tsx | 30 +- .../create-metadata-modal.tsx | 10 +- .../dataset-metadata-drawer.tsx | 87 +- .../metadata/metadata-dataset/field.tsx | 4 +- .../select-metadata-modal.tsx | 54 +- .../metadata-dataset/select-metadata.tsx | 41 +- .../metadata/metadata-document/field.tsx | 6 +- .../metadata/metadata-document/index.tsx | 108 +- .../metadata/metadata-document/info-group.tsx | 61 +- .../metadata/metadata-document/no-data.tsx | 14 +- .../datasets/metadata/utils/get-icon.ts | 2 +- .../datasets/no-linked-apps-panel.tsx | 17 +- .../components/datasets/preview/container.tsx | 28 +- .../components/datasets/preview/header.tsx | 18 +- .../datasets/rename-modal/index.tsx | 44 +- .../settings/chunk-structure/hooks.tsx | 11 +- .../settings/chunk-structure/index.tsx | 6 +- .../datasets/settings/form/index.tsx | 313 +- .../datasets/settings/index-method/index.tsx | 26 +- .../settings/index-method/keyword-number.tsx | 22 +- .../datasets/settings/option-card.tsx | 32 +- .../settings/permission-selector/index.tsx | 83 +- .../permission-selector/member-item.tsx | 18 +- .../permission-selector/permission-item.tsx | 8 +- .../datasets/settings/utils/index.tsx | 3 +- web/app/components/develop/ApiServer.tsx | 17 +- web/app/components/develop/code.tsx | 40 +- web/app/components/develop/doc.tsx | 170 +- web/app/components/develop/index.tsx | 14 +- web/app/components/develop/md.tsx | 11 +- .../develop/secret-key/input-copy.tsx | 23 +- .../develop/secret-key/secret-key-button.tsx | 10 +- .../secret-key/secret-key-generate.tsx | 20 +- .../develop/secret-key/secret-key-modal.tsx | 62 +- web/app/components/develop/tag.tsx | 4 +- .../explore/app-card/index.spec.tsx | 7 +- web/app/components/explore/app-card/index.tsx | 50 +- web/app/components/explore/app-list/index.tsx | 48 +- web/app/components/explore/category.tsx | 8 +- .../explore/create-app-modal/index.spec.tsx | 66 +- .../explore/create-app-modal/index.tsx | 109 +- web/app/components/explore/index.tsx | 12 +- .../explore/installed-app/index.spec.tsx | 20 +- .../explore/installed-app/index.tsx | 73 +- .../explore/item-operation/index.tsx | 22 +- .../explore/sidebar/app-nav-item/index.tsx | 28 +- web/app/components/explore/sidebar/index.tsx | 28 +- .../components/goto-anything/actions/app.tsx | 15 +- .../actions/commands/account.tsx | 6 +- .../actions/commands/community.tsx | 6 +- .../goto-anything/actions/commands/docs.tsx | 10 +- .../goto-anything/actions/commands/forum.tsx | 6 +- .../goto-anything/actions/commands/index.ts | 18 +- .../actions/commands/language.tsx | 4 +- .../actions/commands/registry.ts | 2 +- .../goto-anything/actions/commands/slash.tsx | 23 +- .../goto-anything/actions/commands/theme.tsx | 16 +- .../goto-anything/actions/commands/zen.tsx | 8 +- .../components/goto-anything/actions/index.ts | 12 +- .../goto-anything/actions/knowledge.tsx | 7 +- .../goto-anything/actions/plugin.tsx | 4 +- .../components/goto-anything/actions/types.ts | 6 +- .../goto-anything/command-selector.spec.tsx | 16 +- .../goto-anything/command-selector.tsx | 70 +- .../components/goto-anything/context.spec.tsx | 10 +- web/app/components/goto-anything/context.tsx | 2 +- .../components/goto-anything/index.spec.tsx | 4 +- web/app/components/goto-anything/index.tsx | 307 +- .../components/header/account-about/index.tsx | 87 +- .../header/account-dropdown/compliance.tsx | 202 +- .../header/account-dropdown/index.tsx | 218 +- .../header/account-dropdown/support.tsx | 184 +- .../workplace-selector/index.tsx | 41 +- .../Integrations-page/index.tsx | 22 +- .../api-based-extension-page/empty.tsx | 17 +- .../api-based-extension-page/index.tsx | 12 +- .../api-based-extension-page/item.tsx | 28 +- .../api-based-extension-page/modal.tsx | 47 +- .../api-based-extension-page/selector.tsx | 72 +- .../header/account-setting/collapse/index.tsx | 10 +- .../data-source-page-new/card.tsx | 48 +- .../data-source-page-new/configure.tsx | 56 +- .../data-source-page-new/hooks/index.ts | 2 +- .../hooks/use-data-source-auth-update.ts | 3 +- .../data-source-page-new/index.tsx | 8 +- .../install-from-marketplace.tsx | 50 +- .../data-source-page-new/item.tsx | 36 +- .../data-source-page-new/operator.tsx | 84 +- .../data-source-notion/index.tsx | 17 +- .../data-source-notion/operate/index.tsx | 36 +- .../config-firecrawl-modal.tsx | 62 +- .../config-jina-reader-modal.tsx | 58 +- .../config-watercrawl-modal.tsx | 62 +- .../data-source-website/index.tsx | 39 +- .../data-source-page/panel/config-item.tsx | 34 +- .../data-source-page/panel/index.tsx | 86 +- .../header/account-setting/index.tsx | 76 +- .../key-validator/KeyInput.tsx | 13 +- .../account-setting/key-validator/Operate.tsx | 46 +- .../key-validator/ValidateStatus.tsx | 13 +- .../account-setting/key-validator/hooks.ts | 9 +- .../account-setting/key-validator/index.tsx | 23 +- .../account-setting/language-page/index.tsx | 12 +- .../edit-workspace-modal/index.tsx | 38 +- .../account-setting/members-page/index.tsx | 153 +- .../members-page/invite-modal/index.tsx | 71 +- .../invite-modal/role-selector.tsx | 102 +- .../members-page/invited-modal/index.tsx | 100 +- .../invited-modal/invitation-link.tsx | 14 +- .../members-page/operation/index.tsx | 41 +- .../operation/transfer-ownership.tsx | 10 +- .../transfer-ownership-modal/index.tsx | 88 +- .../member-selector.tsx | 44 +- .../header/account-setting/menu-dialog.tsx | 11 +- .../model-provider-page/declarations.ts | 10 +- .../model-provider-page/hooks.spec.ts | 2 +- .../model-provider-page/hooks.ts | 54 +- .../model-provider-page/index.tsx | 59 +- .../install-from-marketplace.tsx | 52 +- .../add-credential-in-load-balancing.tsx | 33 +- .../model-auth/add-custom-model.tsx | 63 +- .../model-auth/authorized/authorized-item.tsx | 18 +- .../model-auth/authorized/credential-item.tsx | 39 +- .../model-auth/authorized/index.tsx | 75 +- .../model-auth/config-model.tsx | 18 +- .../model-auth/config-provider.tsx | 28 +- .../model-auth/credential-selector.tsx | 38 +- .../model-auth/hooks/index.ts | 6 +- .../model-auth/hooks/use-auth-service.ts | 6 +- .../model-auth/hooks/use-auth.ts | 24 +- .../model-auth/hooks/use-credential-data.ts | 4 +- .../model-auth/hooks/use-credential-status.ts | 2 +- .../hooks/use-model-form-schemas.ts | 6 +- .../model-provider-page/model-auth/index.tsx | 8 +- .../manage-custom-model-credentials.tsx | 28 +- .../switch-credential-in-load-balancing.tsx | 52 +- .../model-provider-page/model-badge/index.tsx | 3 +- .../model-provider-page/model-icon/index.tsx | 21 +- .../model-provider-page/model-modal/Form.tsx | 141 +- .../model-modal/Input.test.tsx | 2 +- .../model-provider-page/model-modal/Input.tsx | 6 +- .../model-provider-page/model-modal/index.tsx | 144 +- .../model-provider-page/model-name/index.tsx | 14 +- .../agent-model-trigger.tsx | 155 +- .../configuration-button.tsx | 5 +- .../model-parameter-modal/index.tsx | 86 +- .../model-parameter-modal/parameter-item.tsx | 88 +- .../presets-parameter.tsx | 12 +- .../status-indicators.tsx | 76 +- .../model-parameter-modal/trigger.tsx | 52 +- .../deprecated-model-trigger.tsx | 12 +- .../model-selector/empty-trigger.tsx | 20 +- .../model-selector/feature-icon.tsx | 38 +- .../model-selector/index.tsx | 18 +- .../model-selector/model-trigger.tsx | 32 +- .../model-selector/popup-item.tsx | 63 +- .../model-selector/popup.tsx | 55 +- .../provider-added-card/add-model-button.tsx | 2 +- .../provider-added-card/cooldown-timer.tsx | 10 +- .../provider-added-card/credential-panel.tsx | 31 +- .../provider-added-card/index.tsx | 70 +- .../provider-added-card/model-list-item.tsx | 67 +- .../provider-added-card/model-list.tsx | 40 +- .../model-load-balancing-configs.tsx | 103 +- .../model-load-balancing-modal.tsx | 231 +- .../provider-added-card/priority-selector.tsx | 33 +- .../provider-added-card/priority-use-tip.tsx | 4 +- .../provider-added-card/quota-panel.tsx | 14 +- .../provider-icon/index.tsx | 22 +- .../system-model-selector/index.tsx | 106 +- .../model-provider-page/utils.ts | 14 +- .../plugin-page/SerpapiPlugin.tsx | 14 +- .../account-setting/plugin-page/index.tsx | 23 +- .../account-setting/plugin-page/utils.ts | 2 +- web/app/components/header/app-back/index.tsx | 8 +- web/app/components/header/app-nav/index.tsx | 24 +- .../components/header/app-selector/index.tsx | 79 +- .../components/header/dataset-nav/index.tsx | 25 +- web/app/components/header/env-nav/index.tsx | 15 +- .../components/header/explore-nav/index.tsx | 20 +- .../header/github-star/index.spec.tsx | 4 +- .../components/header/github-star/index.tsx | 4 +- web/app/components/header/header-wrapper.tsx | 10 +- web/app/components/header/index.tsx | 68 +- web/app/components/header/indicator/index.tsx | 6 +- .../components/header/license-env/index.tsx | 28 +- .../components/header/maintenance-notice.tsx | 12 +- web/app/components/header/nav/index.tsx | 23 +- .../header/nav/nav-selector/index.tsx | 90 +- .../components/header/plan-badge/index.tsx | 75 +- .../header/plugins-nav/downloading-icon.tsx | 6 +- .../components/header/plugins-nav/index.tsx | 34 +- web/app/components/header/tools-nav/index.tsx | 21 +- web/app/components/i18n-server.tsx | 4 +- web/app/components/i18n.tsx | 11 +- .../plugins/base/badges/icon-with-tooltip.tsx | 9 +- .../plugins/base/badges/partner.tsx | 2 +- .../plugins/base/badges/verified.tsx | 2 +- .../plugins/base/deprecation-notice.tsx | 29 +- .../plugins/base/key-value-item.tsx | 16 +- .../plugins/card/base/card-icon.tsx | 24 +- .../plugins/card/base/corner-mark.tsx | 2 +- .../plugins/card/base/download-count.tsx | 2 +- .../components/plugins/card/base/org-info.tsx | 5 +- .../plugins/card/base/placeholder.tsx | 25 +- .../components/plugins/card/base/title.tsx | 2 +- web/app/components/plugins/card/index.tsx | 34 +- .../install-plugin/base/check-task-status.ts | 4 +- .../plugins/install-plugin/base/installed.tsx | 24 +- .../install-plugin/base/loading-error.tsx | 29 +- .../plugins/install-plugin/base/loading.tsx | 10 +- .../plugins/install-plugin/base/version.tsx | 20 +- .../plugins/install-plugin/hooks.ts | 18 +- .../hooks/use-check-installed.tsx | 7 +- .../hooks/use-install-plugin-limit.tsx | 6 +- .../hooks/use-refresh-plugin-list.tsx | 16 +- .../install-plugin/install-bundle/index.tsx | 14 +- .../install-bundle/item/github-item.tsx | 9 +- .../install-bundle/item/loaded-item.tsx | 13 +- .../install-bundle/item/marketplace-item.tsx | 7 +- .../install-bundle/item/package-item.tsx | 7 +- .../install-bundle/ready-to-install.tsx | 4 +- .../install-bundle/steps/install-multi.tsx | 38 +- .../install-bundle/steps/install.tsx | 62 +- .../install-bundle/steps/installed.tsx | 22 +- .../install-from-github/index.tsx | 134 +- .../install-from-github/steps/loaded.tsx | 52 +- .../steps/selectPackage.tsx | 56 +- .../install-from-github/steps/setURL.tsx | 30 +- .../install-from-local-package/index.tsx | 64 +- .../ready-to-install.tsx | 14 +- .../steps/install.tsx | 62 +- .../steps/uploading.tsx | 29 +- .../install-from-marketplace/index.tsx | 90 +- .../steps/install.tsx | 62 +- .../plugins/marketplace/context.tsx | 20 +- .../plugins/marketplace/description/index.tsx | 8 +- .../plugins/marketplace/empty/index.tsx | 25 +- .../plugins/marketplace/empty/line.tsx | 24 +- .../components/plugins/marketplace/hooks.ts | 32 +- .../components/plugins/marketplace/index.tsx | 10 +- .../plugins/marketplace/list/card-wrapper.tsx | 64 +- .../plugins/marketplace/list/index.tsx | 9 +- .../marketplace/list/list-with-collection.tsx | 23 +- .../plugins/marketplace/list/list-wrapper.tsx | 22 +- .../marketplace/plugin-type-switch.tsx | 21 +- .../plugins/marketplace/search-box/index.tsx | 40 +- .../search-box/search-box-wrapper.tsx | 4 +- .../marketplace/search-box/tags-filter.tsx | 22 +- .../search-box/trigger/marketplace.tsx | 21 +- .../search-box/trigger/tool-selector.tsx | 17 +- .../marketplace/sort-dropdown/index.tsx | 20 +- .../sticky-search-and-switch-wrapper.tsx | 4 +- .../components/plugins/marketplace/utils.ts | 6 +- .../authorize/add-api-key-button.tsx | 8 +- .../authorize/add-oauth-button.tsx | 69 +- .../plugin-auth/authorize/api-key-modal.tsx | 28 +- .../plugins/plugin-auth/authorize/index.tsx | 20 +- .../authorize/oauth-client-settings.tsx | 40 +- .../authorized-in-data-source-node.tsx | 8 +- .../plugin-auth/authorized-in-node.tsx | 18 +- .../plugins/plugin-auth/authorized/index.tsx | 92 +- .../plugins/plugin-auth/authorized/item.tsx | 58 +- .../plugin-auth/hooks/use-credential.ts | 5 +- .../plugins/plugin-auth/hooks/use-get-api.ts | 6 +- .../hooks/use-plugin-auth-action.ts | 2 +- .../plugin-auth/hooks/use-plugin-auth.ts | 4 +- .../components/plugins/plugin-auth/index.tsx | 16 +- .../plugin-auth/plugin-auth-in-agent.tsx | 23 +- .../plugin-auth-in-datasource-node.tsx | 12 +- .../plugins/plugin-auth/plugin-auth.tsx | 4 +- .../plugin-detail-panel/action-list.tsx | 10 +- .../agent-strategy-list.tsx | 10 +- .../app-selector/app-inputs-form.tsx | 16 +- .../app-selector/app-inputs-panel.tsx | 24 +- .../app-selector/app-picker.tsx | 48 +- .../app-selector/app-trigger.tsx | 17 +- .../app-selector/index.tsx | 37 +- .../datasource-action-list.tsx | 12 +- .../plugin-detail-panel/detail-header.tsx | 192 +- .../plugin-detail-panel/endpoint-card.tsx | 64 +- .../plugin-detail-panel/endpoint-list.tsx | 54 +- .../plugin-detail-panel/endpoint-modal.tsx | 51 +- .../plugins/plugin-detail-panel/index.tsx | 37 +- .../plugin-detail-panel/model-list.tsx | 14 +- .../model-selector/index.tsx | 104 +- .../model-selector/llm-params-panel.tsx | 16 +- .../model-selector/tts-params-panel.tsx | 14 +- .../multiple-tool-selector/index.tsx | 55 +- .../operation-dropdown.tsx | 40 +- .../plugins/plugin-detail-panel/store.ts | 2 +- .../plugin-detail-panel/strategy-detail.tsx | 82 +- .../plugin-detail-panel/strategy-item.tsx | 8 +- .../subscription-list/create/common-modal.tsx | 225 +- .../subscription-list/create/index.tsx | 224 +- .../subscription-list/create/oauth-client.tsx | 88 +- .../subscription-list/delete-confirm.tsx | 49 +- .../subscription-list/index.tsx | 4 +- .../subscription-list/list-view.tsx | 12 +- .../subscription-list/log-viewer.tsx | 69 +- .../subscription-list/selector-entry.tsx | 68 +- .../subscription-list/selector-view.tsx | 57 +- .../subscription-list/subscription-card.tsx | 28 +- .../tool-selector/index.tsx | 134 +- .../tool-selector/reasoning-config-form.tsx | 129 +- .../tool-selector/schema-modal.tsx | 27 +- .../tool-selector/tool-credentials-form.tsx | 80 +- .../tool-selector/tool-item.tsx | 69 +- .../tool-selector/tool-trigger.tsx | 17 +- .../trigger/event-detail-drawer.tsx | 100 +- .../trigger/event-list.tsx | 21 +- .../components/plugins/plugin-item/action.tsx | 46 +- .../components/plugins/plugin-item/index.tsx | 147 +- .../plugins/plugin-mutation-model/index.tsx | 26 +- .../plugins/plugin-page/context.tsx | 8 +- .../plugins/plugin-page/debug-info.tsx | 45 +- .../plugins/plugin-page/empty/index.tsx | 79 +- .../filter-management/category-filter.tsx | 39 +- .../plugin-page/filter-management/index.tsx | 8 +- .../filter-management/search-box.tsx | 7 +- .../plugin-page/filter-management/store.ts | 2 +- .../filter-management/tag-filter.tsx | 39 +- .../components/plugins/plugin-page/index.tsx | 97 +- .../plugin-page/install-plugin-dropdown.tsx | 58 +- .../plugins/plugin-page/list/index.tsx | 6 +- .../plugins/plugin-page/plugin-info.tsx | 8 +- .../plugins/plugin-page/plugin-tasks/hooks.ts | 2 +- .../plugin-page/plugin-tasks/index.tsx | 130 +- .../plugins/plugin-page/plugins-panel.tsx | 52 +- .../plugin-page/use-reference-setting.ts | 10 +- .../plugins/plugin-page/use-uploader.ts | 16 +- web/app/components/plugins/provider-card.tsx | 48 +- .../plugins/readme-panel/entrance.tsx | 14 +- .../components/plugins/readme-panel/index.tsx | 61 +- .../components/plugins/readme-panel/store.ts | 12 +- .../auto-update-setting/config.ts | 1 + .../auto-update-setting/index.tsx | 60 +- .../no-data-placeholder.tsx | 12 +- .../no-plugin-selected.tsx | 4 +- .../auto-update-setting/plugins-picker.tsx | 42 +- .../auto-update-setting/plugins-selected.tsx | 13 +- .../auto-update-setting/strategy-picker.tsx | 34 +- .../auto-update-setting/tool-item.tsx | 24 +- .../auto-update-setting/tool-picker.tsx | 32 +- .../auto-update-setting/utils.ts | 5 +- .../plugins/reference-setting-modal/label.tsx | 4 +- .../plugins/reference-setting-modal/modal.tsx | 32 +- web/app/components/plugins/types.ts | 38 +- .../update-plugin/downgrade-warning.tsx | 14 +- .../plugins/update-plugin/from-github.tsx | 2 +- .../update-plugin/from-market-place.tsx | 38 +- .../plugins/update-plugin/index.tsx | 2 +- .../update-plugin/plugin-version-picker.tsx | 31 +- .../components/chunk-card-list/chunk-card.tsx | 25 +- .../components/chunk-card-list/index.tsx | 7 +- .../components/chunk-card-list/q-a-item.tsx | 6 +- .../rag-pipeline/components/conversion.tsx | 40 +- .../rag-pipeline/components/panel/index.tsx | 4 +- .../input-field/editor/form/hidden-fields.tsx | 2 +- .../panel/input-field/editor/form/hooks.ts | 22 +- .../panel/input-field/editor/form/index.tsx | 32 +- .../panel/input-field/editor/form/schema.ts | 8 +- .../editor/form/show-all-settings.tsx | 20 +- .../panel/input-field/editor/index.tsx | 22 +- .../panel/input-field/editor/utils.ts | 2 +- .../input-field/field-list/field-item.tsx | 75 +- .../field-list/field-list-container.tsx | 10 +- .../panel/input-field/field-list/hooks.ts | 24 +- .../panel/input-field/field-list/index.tsx | 18 +- .../panel/input-field/field-list/types.ts | 4 +- .../panel/input-field/footer-tip.tsx | 8 +- .../components/panel/input-field/hooks.ts | 5 +- .../components/panel/input-field/index.tsx | 66 +- .../label-right-content/datasource.tsx | 12 +- .../label-right-content/global-inputs.tsx | 8 +- .../panel/input-field/preview/data-source.tsx | 12 +- .../panel/input-field/preview/form.tsx | 6 +- .../panel/input-field/preview/index.tsx | 24 +- .../input-field/preview/process-documents.tsx | 4 +- .../components/panel/test-run/header.tsx | 14 +- .../components/panel/test-run/index.tsx | 22 +- .../test-run/preparation/actions/index.tsx | 8 +- .../preparation/data-source-options/index.tsx | 4 +- .../data-source-options/option-card.tsx | 10 +- .../document-processing/actions.tsx | 12 +- .../preparation/document-processing/index.tsx | 6 +- .../document-processing/options.tsx | 14 +- .../test-run/preparation/footer-tips.tsx | 2 +- .../panel/test-run/preparation/hooks.ts | 8 +- .../panel/test-run/preparation/index.tsx | 39 +- .../test-run/preparation/step-indicator.tsx | 14 +- .../panel/test-run/result/index.tsx | 14 +- .../test-run/result/result-preview/index.tsx | 24 +- .../test-run/result/result-preview/utils.ts | 5 +- .../panel/test-run/result/tabs/index.tsx | 10 +- .../panel/test-run/result/tabs/tab.tsx | 4 +- .../publish-as-knowledge-pipeline-modal.tsx | 52 +- .../rag-pipeline/components/publish-toast.tsx | 28 +- .../components/rag-pipeline-children.tsx | 14 +- .../components/rag-pipeline-header/index.tsx | 4 +- .../input-field-button.tsx | 12 +- .../rag-pipeline-header/publisher/index.tsx | 14 +- .../rag-pipeline-header/publisher/popup.tsx | 166 +- .../rag-pipeline-header/run-mode.tsx | 32 +- .../components/rag-pipeline-main.tsx | 8 +- .../rag-pipeline/components/screenshot.tsx | 8 +- .../components/update-dsl-modal.tsx | 108 +- .../components/rag-pipeline/hooks/index.ts | 10 +- .../components/rag-pipeline/hooks/use-DSL.ts | 8 +- .../hooks/use-available-nodes-meta-data.ts | 10 +- .../rag-pipeline/hooks/use-configs-map.ts | 2 +- .../hooks/use-input-field-panel.ts | 2 +- .../rag-pipeline/hooks/use-input-fields.ts | 5 +- .../hooks/use-nodes-sync-draft.ts | 10 +- .../rag-pipeline/hooks/use-pipeline-config.ts | 8 +- .../rag-pipeline/hooks/use-pipeline-init.ts | 6 +- .../hooks/use-pipeline-refresh-draft.ts | 4 +- .../rag-pipeline/hooks/use-pipeline-run.ts | 19 +- .../hooks/use-pipeline-start-run.tsx | 2 +- .../hooks/use-pipeline-template.ts | 4 +- .../rag-pipeline/hooks/use-pipeline.tsx | 7 +- .../hooks/use-rag-pipeline-search.tsx | 99 +- web/app/components/rag-pipeline/index.tsx | 12 +- .../components/rag-pipeline/store/index.ts | 8 +- .../components/rag-pipeline/utils/nodes.ts | 12 +- web/app/components/react-scan.tsx | 2 +- web/app/components/sentry-initializer.tsx | 2 +- .../share/text-generation/index.tsx | 202 +- .../share/text-generation/info-modal.tsx | 25 +- .../share/text-generation/menu-dropdown.tsx | 46 +- .../text-generation/no-data/index.spec.tsx | 2 +- .../share/text-generation/no-data/index.tsx | 8 +- .../share/text-generation/result/content.tsx | 11 +- .../share/text-generation/result/header.tsx | 32 +- .../share/text-generation/result/index.tsx | 79 +- .../run-batch/csv-download/index.spec.tsx | 6 +- .../run-batch/csv-download/index.tsx | 28 +- .../run-batch/csv-reader/index.spec.tsx | 8 +- .../run-batch/csv-reader/index.tsx | 32 +- .../text-generation/run-batch/index.spec.tsx | 8 +- .../share/text-generation/run-batch/index.tsx | 15 +- .../run-batch/res-download/index.spec.tsx | 2 +- .../run-batch/res-download/index.tsx | 10 +- .../text-generation/run-once/index.spec.tsx | 8 +- .../share/text-generation/run-once/index.tsx | 234 +- web/app/components/signin/countdown.tsx | 21 +- web/app/components/splash.tsx | 2 +- web/app/components/swr-initializer.tsx | 29 +- .../config-credentials.tsx | 85 +- .../get-schema.tsx | 48 +- .../edit-custom-collection-modal/index.tsx | 175 +- .../edit-custom-collection-modal/test-api.tsx | 73 +- web/app/components/tools/labels/filter.tsx | 70 +- web/app/components/tools/labels/selector.tsx | 49 +- web/app/components/tools/labels/store.ts | 2 +- web/app/components/tools/marketplace/hooks.ts | 4 +- .../tools/marketplace/index.spec.tsx | 17 +- .../components/tools/marketplace/index.tsx | 26 +- web/app/components/tools/mcp/create-card.tsx | 34 +- .../components/tools/mcp/detail/content.tsx | 112 +- .../tools/mcp/detail/list-loading.tsx | 40 +- .../tools/mcp/detail/operation-dropdown.tsx | 22 +- .../tools/mcp/detail/provider-detail.tsx | 6 +- .../components/tools/mcp/detail/tool-item.tsx | 41 +- .../components/tools/mcp/headers-input.tsx | 61 +- web/app/components/tools/mcp/index.tsx | 11 +- .../components/tools/mcp/mcp-server-modal.tsx | 51 +- .../tools/mcp/mcp-server-param-item.tsx | 17 +- .../components/tools/mcp/mcp-service-card.tsx | 117 +- web/app/components/tools/mcp/modal.tsx | 153 +- .../components/tools/mcp/provider-card.tsx | 48 +- web/app/components/tools/provider-list.tsx | 56 +- .../tools/provider/custom-create-card.tsx | 39 +- web/app/components/tools/provider/detail.tsx | 128 +- web/app/components/tools/provider/empty.tsx | 15 +- .../components/tools/provider/tool-item.tsx | 10 +- .../setting/build-in/config-credentials.tsx | 111 +- .../components/tools/utils/to-form-schema.ts | 12 +- .../tools/workflow-tool/configure-button.tsx | 107 +- .../confirm-modal/index.spec.tsx | 2 +- .../workflow-tool/confirm-modal/index.tsx | 28 +- .../components/tools/workflow-tool/index.tsx | 195 +- .../tools/workflow-tool/method-selector.tsx | 49 +- .../tools/workflow-tool/utils.test.ts | 2 +- .../components/workflow-children.tsx | 27 +- .../chat-variable-trigger.spec.tsx | 2 +- .../workflow-header/features-trigger.spec.tsx | 8 +- .../workflow-header/features-trigger.tsx | 54 +- .../components/workflow-header/index.spec.tsx | 10 +- .../components/workflow-header/index.tsx | 8 +- .../workflow-app/components/workflow-main.tsx | 6 +- .../workflow-onboarding-modal/index.spec.tsx | 4 +- .../workflow-onboarding-modal/index.tsx | 12 +- .../start-node-option.spec.tsx | 2 +- .../start-node-option.tsx | 5 +- .../start-node-selection-panel.spec.tsx | 4 +- .../start-node-selection-panel.tsx | 17 +- .../components/workflow-panel.tsx | 8 +- .../components/workflow-app/hooks/index.ts | 20 +- .../components/workflow-app/hooks/use-DSL.ts | 8 +- .../hooks/use-available-nodes-meta-data.ts | 28 +- .../workflow-app/hooks/use-configs-map.ts | 2 +- .../hooks/use-nodes-sync-draft.ts | 10 +- .../workflow-app/hooks/use-workflow-init.ts | 14 +- .../hooks/use-workflow-refresh-draft.ts | 4 +- .../workflow-app/hooks/use-workflow-run.ts | 44 +- .../hooks/use-workflow-start-run.tsx | 6 +- .../hooks/use-workflow-template.ts | 10 +- web/app/components/workflow-app/index.tsx | 46 +- .../__tests__/trigger-status-sync.test.tsx | 25 +- web/app/components/workflow/block-icon.tsx | 46 +- .../block-selector/all-start-blocks.tsx | 78 +- .../workflow/block-selector/all-tools.tsx | 83 +- .../workflow/block-selector/blocks.tsx | 43 +- .../workflow/block-selector/data-sources.tsx | 30 +- .../block-selector/featured-tools.tsx | 89 +- .../block-selector/featured-triggers.tsx | 86 +- .../workflow/block-selector/hooks.ts | 3 +- .../workflow/block-selector/index-bar.tsx | 4 +- .../workflow/block-selector/index.tsx | 4 +- .../workflow/block-selector/main.tsx | 64 +- .../market-place-plugin/action.tsx | 25 +- .../market-place-plugin/item.tsx | 26 +- .../market-place-plugin/list.tsx | 32 +- .../rag-tool-recommendations/index.tsx | 48 +- .../rag-tool-recommendations/list.tsx | 56 +- .../uninstalled-item.tsx | 24 +- .../workflow/block-selector/start-blocks.tsx | 51 +- .../workflow/block-selector/tabs.tsx | 34 +- .../workflow/block-selector/tool-picker.tsx | 44 +- .../block-selector/tool/action-item.tsx | 35 +- .../tool/tool-list-flat-view/list.tsx | 12 +- .../tool/tool-list-tree-view/item.tsx | 11 +- .../tool/tool-list-tree-view/list.tsx | 10 +- .../workflow/block-selector/tool/tool.tsx | 51 +- .../workflow/block-selector/tools.tsx | 67 +- .../trigger-plugin/action-item.tsx | 32 +- .../block-selector/trigger-plugin/item.tsx | 26 +- .../block-selector/trigger-plugin/list.tsx | 6 +- .../workflow/block-selector/types.ts | 10 +- .../use-check-vertical-scrollbar.ts | 3 +- .../block-selector/use-sticky-scroll.ts | 2 +- .../workflow/block-selector/utils.ts | 2 +- .../block-selector/view-type-select.tsx | 24 +- .../workflow/candidate-node-main.tsx | 18 +- .../components/workflow/candidate-node.tsx | 2 +- web/app/components/workflow/constants.ts | 61 +- web/app/components/workflow/constants/node.ts | 34 +- web/app/components/workflow/context.tsx | 4 +- .../workflow/custom-connection-line.tsx | 8 +- .../custom-edge-linear-gradient-render.tsx | 6 +- web/app/components/workflow/custom-edge.tsx | 27 +- .../datasets-detail-store/provider.tsx | 14 +- .../workflow/datasets-detail-store/store.ts | 4 +- .../workflow/dsl-export-confirm-modal.tsx | 50 +- web/app/components/workflow/features.tsx | 11 +- .../workflow/header/chat-variable-button.tsx | 4 +- .../components/workflow/header/checklist.tsx | 93 +- .../workflow/header/editing-title.tsx | 10 +- .../components/workflow/header/env-button.tsx | 6 +- .../header/global-variable-button.tsx | 6 +- .../workflow/header/header-in-normal.tsx | 30 +- .../workflow/header/header-in-restoring.tsx | 32 +- .../header/header-in-view-history.tsx | 22 +- web/app/components/workflow/header/index.tsx | 14 +- .../workflow/header/restoring-title.tsx | 12 +- .../workflow/header/run-and-history.tsx | 16 +- .../components/workflow/header/run-mode.tsx | 83 +- .../workflow/header/running-title.tsx | 10 +- .../header/scroll-to-selected-node-button.tsx | 11 +- .../workflow/header/test-run-menu.tsx | 23 +- .../components/workflow/header/undo-redo.tsx | 54 +- .../header/version-history-button.tsx | 49 +- .../workflow/header/view-history.tsx | 88 +- .../workflow/header/view-workflow-history.tsx | 226 +- .../components/workflow/help-line/index.tsx | 10 +- .../workflow/hooks-store/provider.tsx | 2 +- .../components/workflow/hooks-store/store.ts | 32 +- web/app/components/workflow/hooks/index.ts | 34 +- .../hooks/use-auto-generate-webhook-url.ts | 2 +- .../workflow/hooks/use-available-blocks.ts | 3 +- .../workflow/hooks/use-checklist.ts | 82 +- .../workflow/hooks/use-config-vision.ts | 6 +- .../hooks/use-dynamic-test-run-options.tsx | 53 +- .../use-edges-interactions-without-sync.ts | 2 +- .../workflow/hooks/use-edges-interactions.ts | 12 +- .../hooks/use-fetch-workflow-inspect-vars.ts | 27 +- .../components/workflow/hooks/use-helpline.ts | 4 +- .../hooks/use-inspect-vars-crud-common.ts | 21 +- .../workflow/hooks/use-inspect-vars-crud.ts | 10 +- .../workflow/hooks/use-node-data-update.ts | 6 +- .../hooks/use-node-plugin-installation.ts | 11 +- .../hooks/use-nodes-available-var-list.ts | 4 +- .../use-nodes-interactions-without-sync.ts | 4 +- .../workflow/hooks/use-nodes-interactions.ts | 300 +- .../workflow/hooks/use-nodes-layout.ts | 16 +- .../workflow/hooks/use-nodes-meta-data.ts | 8 +- .../workflow/hooks/use-nodes-sync-draft.ts | 2 +- .../hooks/use-selection-interactions.ts | 10 +- .../workflow/hooks/use-shortcuts.ts | 14 +- .../workflow/hooks/use-tool-icon.ts | 18 +- .../workflow/hooks/use-workflow-history.ts | 9 +- .../hooks/use-workflow-interactions.ts | 33 +- .../hooks/use-workflow-run-event/index.ts | 16 +- .../use-workflow-agent-log.ts | 4 +- .../use-workflow-failed.ts | 2 +- .../use-workflow-finished.ts | 6 +- .../use-workflow-node-finished.ts | 8 +- .../use-workflow-node-iteration-finished.ts | 6 +- .../use-workflow-node-iteration-next.ts | 4 +- .../use-workflow-node-iteration-started.ts | 12 +- .../use-workflow-node-loop-finished.ts | 4 +- .../use-workflow-node-loop-next.ts | 4 +- .../use-workflow-node-loop-started.ts | 8 +- .../use-workflow-node-retry.ts | 6 +- .../use-workflow-node-started.ts | 10 +- .../use-workflow-started.ts | 6 +- .../use-workflow-text-chunk.ts | 4 +- .../use-workflow-text-replace.ts | 4 +- .../workflow/hooks/use-workflow-search.tsx | 122 +- .../workflow/hooks/use-workflow-variables.ts | 18 +- .../components/workflow/hooks/use-workflow.ts | 48 +- web/app/components/workflow/index.tsx | 119 +- .../components/workflow/node-contextmenu.tsx | 10 +- .../nodes/_base/components/add-button.tsx | 10 +- .../add-variable-popup-with-position.tsx | 16 +- .../_base/components/add-variable-popup.tsx | 12 +- .../components/agent-strategy-selector.tsx | 293 +- .../nodes/_base/components/agent-strategy.tsx | 277 +- .../components/before-run-form/bool-input.tsx | 10 +- .../components/before-run-form/form-item.tsx | 161 +- .../_base/components/before-run-form/form.tsx | 14 +- .../components/before-run-form/index.tsx | 41 +- .../components/before-run-form/panel-wrap.tsx | 27 +- .../components/code-generator-button.tsx | 19 +- .../components/collapse/field-collapse.tsx | 6 +- .../nodes/_base/components/collapse/index.tsx | 6 +- .../nodes/_base/components/config-vision.tsx | 50 +- .../nodes/_base/components/editor/base.tsx | 54 +- .../code-editor/editor-support-vars.tsx | 14 +- .../components/editor/code-editor/index.tsx | 73 +- .../_base/components/editor/text-editor.tsx | 4 +- .../components/error-handle/default-value.tsx | 24 +- .../error-handle/error-handle-on-node.tsx | 20 +- .../error-handle/error-handle-on-panel.tsx | 33 +- .../error-handle/error-handle-tip.tsx | 13 +- .../error-handle-type-selector.tsx | 33 +- .../error-handle/fail-branch-card.tsx | 16 +- .../_base/components/error-handle/hooks.ts | 12 +- .../_base/components/error-handle/utils.ts | 2 +- .../workflow/nodes/_base/components/field.tsx | 21 +- .../nodes/_base/components/file-type-item.tsx | 54 +- .../_base/components/file-upload-setting.tsx | 44 +- .../_base/components/form-input-boolean.tsx | 10 +- .../_base/components/form-input-item.tsx | 138 +- .../components/form-input-type-switch.tsx | 8 +- .../workflow/nodes/_base/components/group.tsx | 22 +- .../nodes/_base/components/help-link.tsx | 12 +- .../nodes/_base/components/info-panel.tsx | 6 +- .../_base/components/input-field/add.tsx | 2 +- .../components/input-number-with-slider.tsx | 8 +- .../components/input-support-select-var.tsx | 24 +- .../_base/components/input-var-type-icon.tsx | 2 +- .../components/install-plugin-button.tsx | 34 +- .../components/layout/box-group-field.tsx | 2 +- .../_base/components/layout/box-group.tsx | 8 +- .../nodes/_base/components/layout/box.tsx | 3 +- .../_base/components/layout/field-title.tsx | 6 +- .../nodes/_base/components/layout/field.tsx | 2 +- .../_base/components/layout/group-field.tsx | 2 +- .../nodes/_base/components/layout/group.tsx | 3 +- .../nodes/_base/components/layout/index.tsx | 8 +- .../components/list-no-data-placeholder.tsx | 2 +- .../mcp-tool-not-support-tooltip.tsx | 12 +- .../nodes/_base/components/memory-config.tsx | 53 +- .../mixed-variable-text-input/index.tsx | 12 +- .../mixed-variable-text-input/placeholder.tsx | 19 +- .../nodes/_base/components/next-step/add.tsx | 26 +- .../_base/components/next-step/container.tsx | 9 +- .../_base/components/next-step/index.tsx | 26 +- .../nodes/_base/components/next-step/item.tsx | 20 +- .../nodes/_base/components/next-step/line.tsx | 16 +- .../_base/components/next-step/operator.tsx | 38 +- .../nodes/_base/components/node-control.tsx | 39 +- .../nodes/_base/components/node-handle.tsx | 32 +- .../nodes/_base/components/node-resizer.tsx | 15 +- .../nodes/_base/components/option-card.tsx | 26 +- .../nodes/_base/components/output-vars.tsx | 16 +- .../panel-operator/change-block.tsx | 16 +- .../_base/components/panel-operator/index.tsx | 14 +- .../panel-operator/panel-operator-popup.tsx | 63 +- .../nodes/_base/components/prompt/editor.tsx | 243 +- .../readonly-input-with-select-var.tsx | 31 +- .../nodes/_base/components/remove-button.tsx | 6 +- .../nodes/_base/components/retry/hooks.ts | 4 +- .../_base/components/retry/retry-on-node.tsx | 23 +- .../_base/components/retry/retry-on-panel.tsx | 50 +- .../nodes/_base/components/selector.tsx | 42 +- .../nodes/_base/components/setting-item.tsx | 25 +- .../components/support-var-input/index.tsx | 24 +- .../components/switch-plugin-version.tsx | 157 +- .../components/title-description-input.tsx | 2 +- .../_base/components/toggle-expand-btn.tsx | 4 +- .../nodes/_base/components/variable-tag.tsx | 10 +- .../variable/assigned-var-reference-popup.tsx | 35 +- .../components/variable/constant-field.tsx | 14 +- .../variable/manage-input-field.tsx | 16 +- .../components/variable/match-schema-type.ts | 14 +- .../object-child-tree-panel/picker/field.tsx | 28 +- .../object-child-tree-panel/picker/index.tsx | 20 +- .../object-child-tree-panel/show/field.tsx | 30 +- .../object-child-tree-panel/show/index.tsx | 6 +- .../tree-indent-line.tsx | 4 +- .../components/variable/output-var-list.tsx | 26 +- .../variable/use-match-schema-type.ts | 5 +- .../nodes/_base/components/variable/utils.ts | 316 +- .../variable/var-full-path-panel.tsx | 18 +- .../_base/components/variable/var-list.tsx | 45 +- .../variable/var-reference-picker.tsx | 397 +-- .../variable/var-reference-popup.tsx | 93 +- .../variable/var-reference-vars.tsx | 187 +- .../components/variable/var-type-picker.tsx | 27 +- .../variable-label/base/variable-icon.tsx | 2 +- .../variable-label/base/variable-label.tsx | 22 +- .../variable-label/base/variable-name.tsx | 2 +- .../base/variable-node-label.tsx | 8 +- .../variable/variable-label/hooks.ts | 8 +- .../variable/variable-label/index.tsx | 4 +- .../variable-icon-with-color.tsx | 6 +- .../variable-label-in-editor.tsx | 4 +- .../variable-label/variable-label-in-node.tsx | 4 +- .../variable-label-in-select.tsx | 2 +- .../variable-label/variable-label-in-text.tsx | 4 +- .../_base/components/workflow-panel/index.tsx | 142 +- .../workflow-panel/last-run/index.tsx | 27 +- .../workflow-panel/last-run/no-data.tsx | 18 +- .../workflow-panel/last-run/use-last-run.ts | 58 +- .../_base/components/workflow-panel/tab.tsx | 6 +- .../workflow-panel/trigger-subscription.tsx | 22 +- .../_base/hooks/use-available-var-list.ts | 6 +- .../nodes/_base/hooks/use-node-crud.ts | 3 +- .../nodes/_base/hooks/use-node-help-link.ts | 2 +- .../nodes/_base/hooks/use-one-step-run.ts | 79 +- .../nodes/_base/hooks/use-output-var-list.ts | 22 +- .../nodes/_base/hooks/use-toggle-expend.ts | 7 +- .../nodes/_base/hooks/use-var-list.ts | 4 +- .../components/workflow/nodes/_base/node.tsx | 118 +- .../nodes/agent/components/model-bar.tsx | 78 +- .../nodes/agent/components/tool-icon.tsx | 104 +- .../workflow/nodes/agent/default.ts | 9 +- .../components/workflow/nodes/agent/node.tsx | 117 +- .../components/workflow/nodes/agent/panel.tsx | 183 +- .../components/workflow/nodes/agent/types.ts | 2 +- .../workflow/nodes/agent/use-config.ts | 24 +- .../nodes/agent/use-single-run-form-params.ts | 14 +- .../workflow/nodes/answer/default.ts | 2 +- .../components/workflow/nodes/answer/node.tsx | 22 +- .../workflow/nodes/answer/panel.tsx | 9 +- .../workflow/nodes/answer/use-config.ts | 10 +- .../components/operation-selector.tsx | 68 +- .../assigner/components/var-list/index.tsx | 75 +- .../components/var-list/use-var-list.ts | 4 +- .../workflow/nodes/assigner/default.ts | 8 +- .../workflow/nodes/assigner/hooks.ts | 10 +- .../workflow/nodes/assigner/node.tsx | 27 +- .../workflow/nodes/assigner/panel.tsx | 24 +- .../workflow/nodes/assigner/use-config.ts | 20 +- .../assigner/use-single-run-form-params.ts | 12 +- .../workflow/nodes/code/code-parser.spec.ts | 42 +- .../workflow/nodes/code/code-parser.ts | 4 +- .../components/workflow/nodes/code/default.ts | 7 +- .../workflow/nodes/code/dependency-picker.tsx | 42 +- .../components/workflow/nodes/code/node.tsx | 2 +- .../components/workflow/nodes/code/panel.tsx | 51 +- .../components/workflow/nodes/code/types.ts | 2 +- .../workflow/nodes/code/use-config.ts | 20 +- .../nodes/code/use-single-run-form-params.ts | 6 +- .../components/workflow/nodes/components.ts | 76 +- .../nodes/data-source-empty/default.ts | 2 +- .../workflow/nodes/data-source-empty/hooks.ts | 9 +- .../nodes/data-source-empty/index.tsx | 23 +- .../nodes/data-source/before-run-form.tsx | 18 +- .../workflow/nodes/data-source/default.ts | 22 +- .../data-source/hooks/use-before-run-form.ts | 21 +- .../nodes/data-source/hooks/use-config.ts | 14 +- .../workflow/nodes/data-source/node.tsx | 18 +- .../workflow/nodes/data-source/panel.tsx | 32 +- .../workflow/nodes/data-source/types.ts | 5 +- .../workflow/nodes/data-source/utils.ts | 2 +- .../nodes/document-extractor/default.ts | 5 +- .../nodes/document-extractor/node.tsx | 13 +- .../nodes/document-extractor/panel.tsx | 27 +- .../nodes/document-extractor/use-config.ts | 10 +- .../use-single-run-form-params.ts | 8 +- .../components/workflow/nodes/end/default.ts | 2 +- .../components/workflow/nodes/end/node.tsx | 6 +- .../components/workflow/nodes/end/panel.tsx | 14 +- .../workflow/nodes/end/use-config.ts | 5 +- .../nodes/http/components/api-input.tsx | 32 +- .../http/components/authorization/index.tsx | 38 +- .../components/authorization/radio-group.tsx | 2 +- .../nodes/http/components/curl-panel.tsx | 22 +- .../nodes/http/components/edit-body/index.tsx | 44 +- .../components/key-value/bulk-edit/index.tsx | 18 +- .../nodes/http/components/key-value/index.tsx | 22 +- .../key-value/key-value-edit/index.tsx | 12 +- .../key-value/key-value-edit/input-item.tsx | 63 +- .../key-value/key-value-edit/item.tsx | 101 +- .../nodes/http/components/timeout/index.tsx | 6 +- .../components/workflow/nodes/http/default.ts | 13 +- .../nodes/http/hooks/use-key-value-list.ts | 4 +- .../components/workflow/nodes/http/node.tsx | 15 +- .../components/workflow/nodes/http/panel.tsx | 71 +- .../workflow/nodes/http/use-config.ts | 21 +- .../nodes/http/use-single-run-form-params.ts | 6 +- .../components/workflow/nodes/http/utils.ts | 3 +- .../if-else/components/condition-add.tsx | 24 +- .../components/condition-files-list-value.tsx | 50 +- .../condition-list/condition-input.tsx | 8 +- .../condition-list/condition-item.tsx | 148 +- .../condition-list/condition-operator.tsx | 23 +- .../condition-list/condition-var-selector.tsx | 8 +- .../components/condition-list/index.tsx | 34 +- .../components/condition-number-input.tsx | 65 +- .../if-else/components/condition-value.tsx | 42 +- .../if-else/components/condition-wrap.tsx | 106 +- .../workflow/nodes/if-else/default.ts | 13 +- .../workflow/nodes/if-else/node.tsx | 74 +- .../workflow/nodes/if-else/panel.tsx | 30 +- .../workflow/nodes/if-else/use-config.ts | 24 +- .../if-else/use-is-var-file-attribute.ts | 6 +- .../if-else/use-single-run-form-params.ts | 10 +- .../workflow/nodes/if-else/utils.ts | 13 +- web/app/components/workflow/nodes/index.tsx | 8 +- .../workflow/nodes/iteration-start/default.ts | 2 +- .../workflow/nodes/iteration-start/index.tsx | 20 +- .../workflow/nodes/iteration/add-block.tsx | 39 +- .../workflow/nodes/iteration/default.ts | 5 +- .../workflow/nodes/iteration/node.tsx | 21 +- .../workflow/nodes/iteration/panel.tsx | 71 +- .../workflow/nodes/iteration/use-config.ts | 26 +- .../nodes/iteration/use-interactions.ts | 20 +- .../iteration/use-single-run-form-params.ts | 18 +- .../components/chunk-structure/hooks.tsx | 5 +- .../components/chunk-structure/index.tsx | 20 +- .../chunk-structure/instruction/index.tsx | 32 +- .../chunk-structure/instruction/line.tsx | 24 +- .../components/chunk-structure/selector.tsx | 23 +- .../components/embedding-model.tsx | 8 +- .../components/index-method.tsx | 43 +- .../knowledge-base/components/option-card.tsx | 27 +- .../components/retrieval-setting/hooks.tsx | 24 +- .../components/retrieval-setting/index.tsx | 27 +- .../reranking-model-selector.tsx | 8 +- .../search-method-option.tsx | 48 +- .../top-k-and-score-threshold.tsx | 26 +- .../components/retrieval-setting/type.ts | 2 +- .../workflow/nodes/knowledge-base/default.ts | 4 +- .../nodes/knowledge-base/hooks/use-config.ts | 26 +- .../workflow/nodes/knowledge-base/node.tsx | 18 +- .../workflow/nodes/knowledge-base/panel.tsx | 47 +- .../workflow/nodes/knowledge-base/types.ts | 12 +- .../use-single-run-form-params.ts | 12 +- .../components/add-dataset.tsx | 8 +- .../components/dataset-item.tsx | 71 +- .../components/dataset-list.tsx | 41 +- .../components/metadata/add-condition.tsx | 40 +- .../condition-common-variable-selector.tsx | 38 +- .../condition-list/condition-date.tsx | 14 +- .../condition-list/condition-item.tsx | 70 +- .../condition-list/condition-number.tsx | 22 +- .../condition-list/condition-operator.tsx | 32 +- .../condition-list/condition-string.tsx | 18 +- .../condition-list/condition-value-method.tsx | 20 +- .../condition-variable-selector.tsx | 26 +- .../metadata/condition-list/index.tsx | 17 +- .../metadata/condition-list/utils.ts | 13 +- .../metadata/metadata-filter/index.tsx | 32 +- .../metadata-filter-selector.tsx | 30 +- .../components/metadata/metadata-icon.tsx | 2 +- .../components/metadata/metadata-panel.tsx | 20 +- .../components/metadata/metadata-trigger.tsx | 18 +- .../components/retrieval-config.tsx | 52 +- .../nodes/knowledge-retrieval/default.ts | 7 +- .../nodes/knowledge-retrieval/hooks.ts | 4 +- .../nodes/knowledge-retrieval/node.tsx | 18 +- .../nodes/knowledge-retrieval/panel.tsx | 34 +- .../nodes/knowledge-retrieval/types.ts | 8 +- .../nodes/knowledge-retrieval/use-config.ts | 63 +- .../use-single-run-form-params.ts | 12 +- .../nodes/knowledge-retrieval/utils.ts | 12 +- .../components/extract-input.tsx | 14 +- .../components/filter-condition.tsx | 44 +- .../list-operator/components/limit-config.tsx | 30 +- .../components/sub-variable-picker.tsx | 46 +- .../workflow/nodes/list-operator/default.ts | 10 +- .../workflow/nodes/list-operator/node.tsx | 13 +- .../workflow/nodes/list-operator/panel.tsx | 131 +- .../nodes/list-operator/use-config.ts | 14 +- .../llm/components/config-prompt-item.tsx | 44 +- .../nodes/llm/components/config-prompt.tsx | 201 +- .../json-schema-config-modal/code-editor.tsx | 36 +- .../error-message.tsx | 9 +- .../json-schema-config-modal/index.tsx | 7 +- .../json-importer.tsx | 43 +- .../json-schema-config.tsx | 73 +- .../json-schema-generator/assets/index.tsx | 4 +- .../generated-result.tsx | 47 +- .../json-schema-generator/index.tsx | 39 +- .../json-schema-generator/prompt-editor.tsx | 46 +- .../schema-editor.tsx | 11 +- .../visual-editor/add-field.tsx | 18 +- .../visual-editor/card.tsx | 15 +- .../visual-editor/context.tsx | 4 +- .../visual-editor/edit-card/actions.tsx | 24 +- .../edit-card/advanced-actions.tsx | 25 +- .../edit-card/advanced-options.tsx | 25 +- .../edit-card/auto-width-input.tsx | 6 +- .../visual-editor/edit-card/index.tsx | 86 +- .../edit-card/required-switch.tsx | 10 +- .../visual-editor/edit-card/type-selector.tsx | 40 +- .../visual-editor/hooks.ts | 30 +- .../visual-editor/index.tsx | 4 +- .../visual-editor/schema-node.tsx | 92 +- .../visual-editor/store.ts | 2 +- .../llm/components/prompt-generator-btn.tsx | 23 +- .../components/reasoning-format-config.tsx | 8 +- .../llm/components/resolution-picker.tsx | 6 +- .../nodes/llm/components/structure-output.tsx | 50 +- .../components/workflow/nodes/llm/default.ts | 16 +- .../components/workflow/nodes/llm/node.tsx | 8 +- .../components/workflow/nodes/llm/panel.tsx | 130 +- .../workflow/nodes/llm/use-config.ts | 36 +- .../nodes/llm/use-single-run-form-params.ts | 28 +- .../components/workflow/nodes/llm/utils.ts | 32 +- .../workflow/nodes/loop-end/default.ts | 4 +- .../workflow/nodes/loop-start/default.ts | 2 +- .../workflow/nodes/loop-start/index.tsx | 20 +- .../workflow/nodes/loop/add-block.tsx | 41 +- .../nodes/loop/components/condition-add.tsx | 24 +- .../components/condition-files-list-value.tsx | 48 +- .../condition-list/condition-input.tsx | 8 +- .../condition-list/condition-item.tsx | 144 +- .../condition-list/condition-operator.tsx | 23 +- .../condition-list/condition-var-selector.tsx | 8 +- .../loop/components/condition-list/index.tsx | 34 +- .../components/condition-number-input.tsx | 65 +- .../nodes/loop/components/condition-value.tsx | 30 +- .../nodes/loop/components/condition-wrap.tsx | 71 +- .../loop/components/loop-variables/empty.tsx | 2 +- .../components/loop-variables/form-item.tsx | 40 +- .../loop/components/loop-variables/index.tsx | 4 +- .../loop/components/loop-variables/item.tsx | 32 +- .../components/workflow/nodes/loop/default.ts | 19 +- .../workflow/nodes/loop/insert-block.tsx | 10 +- .../components/workflow/nodes/loop/node.tsx | 17 +- .../components/workflow/nodes/loop/panel.tsx | 40 +- .../workflow/nodes/loop/use-config.ts | 34 +- .../workflow/nodes/loop/use-interactions.ts | 16 +- .../nodes/loop/use-is-var-file-attribute.ts | 2 +- .../nodes/loop/use-single-run-form-params.ts | 12 +- .../components/workflow/nodes/loop/utils.ts | 13 +- .../extract-parameter/import-from-tool.tsx | 27 +- .../components/extract-parameter/item.tsx | 33 +- .../components/extract-parameter/list.tsx | 12 +- .../components/extract-parameter/update.tsx | 51 +- .../components/reasoning-mode-picker.tsx | 8 +- .../nodes/parameter-extractor/default.ts | 8 +- .../nodes/parameter-extractor/node.tsx | 8 +- .../nodes/parameter-extractor/panel.tsx | 132 +- .../nodes/parameter-extractor/use-config.ts | 28 +- .../use-single-run-form-params.ts | 22 +- .../components/advanced-setting.tsx | 25 +- .../components/class-item.tsx | 8 +- .../components/class-list.tsx | 43 +- .../nodes/question-classifier/default.ts | 4 +- .../nodes/question-classifier/node.tsx | 53 +- .../nodes/question-classifier/panel.tsx | 34 +- .../nodes/question-classifier/use-config.ts | 29 +- .../use-single-run-form-params.ts | 22 +- .../nodes/start/components/var-item.tsx | 85 +- .../nodes/start/components/var-list.tsx | 38 +- .../workflow/nodes/start/default.ts | 2 +- .../components/workflow/nodes/start/node.tsx | 25 +- .../components/workflow/nodes/start/panel.tsx | 44 +- .../workflow/nodes/start/use-config.ts | 26 +- .../nodes/start/use-single-run-form-params.ts | 12 +- .../nodes/template-transform/default.ts | 5 +- .../nodes/template-transform/node.tsx | 2 +- .../nodes/template-transform/panel.tsx | 45 +- .../nodes/template-transform/use-config.ts | 12 +- .../use-single-run-form-params.ts | 6 +- .../nodes/tool/components/copy-id.tsx | 16 +- .../nodes/tool/components/input-var-list.tsx | 42 +- .../mixed-variable-text-input/index.tsx | 14 +- .../mixed-variable-text-input/placeholder.tsx | 19 +- .../nodes/tool/components/tool-form/index.tsx | 8 +- .../nodes/tool/components/tool-form/item.tsx | 46 +- .../components/workflow/nodes/tool/default.ts | 24 +- .../components/workflow/nodes/tool/node.tsx | 32 +- .../nodes/tool/output-schema-utils.ts | 7 +- .../components/workflow/nodes/tool/panel.tsx | 36 +- .../components/workflow/nodes/tool/types.ts | 2 +- .../workflow/nodes/tool/use-config.ts | 33 +- .../nodes/tool/use-get-data-for-check-more.ts | 2 +- .../nodes/tool/use-single-run-form-params.ts | 18 +- .../components/trigger-form/index.tsx | 6 +- .../components/trigger-form/item.tsx | 48 +- .../workflow/nodes/trigger-plugin/default.ts | 23 +- .../hooks/use-trigger-auth-flow.ts | 5 +- .../workflow/nodes/trigger-plugin/node.tsx | 10 +- .../workflow/nodes/trigger-plugin/panel.tsx | 46 +- .../workflow/nodes/trigger-plugin/types.ts | 4 +- .../nodes/trigger-plugin/use-check-params.ts | 6 +- .../nodes/trigger-plugin/use-config.ts | 26 +- .../trigger-plugin/utils/form-helpers.ts | 4 +- .../components/frequency-selector.tsx | 2 +- .../components/mode-switcher.tsx | 4 +- .../components/mode-toggle.tsx | 2 +- .../components/monthly-days-selector.tsx | 28 +- .../components/next-execution-times.tsx | 2 +- .../nodes/trigger-schedule/default.ts | 19 +- .../workflow/nodes/trigger-schedule/node.tsx | 4 +- .../workflow/nodes/trigger-schedule/panel.tsx | 86 +- .../nodes/trigger-schedule/use-config.ts | 4 +- .../utils/execution-time-calculator.ts | 32 +- .../utils/integration.spec.ts | 13 +- .../components/generic-table.tsx | 34 +- .../components/header-table.tsx | 4 +- .../components/parameter-table.tsx | 12 +- .../workflow/nodes/trigger-webhook/default.ts | 4 +- .../workflow/nodes/trigger-webhook/node.tsx | 2 +- .../workflow/nodes/trigger-webhook/panel.tsx | 32 +- .../workflow/nodes/trigger-webhook/types.ts | 2 +- .../nodes/trigger-webhook/use-config.ts | 19 +- .../trigger-webhook/utils/raw-variable.ts | 3 +- .../utils/render-output-vars.tsx | 17 +- .../components/add-variable/index.tsx | 35 +- .../components/node-group-item.tsx | 38 +- .../components/node-variable-item.tsx | 41 +- .../components/var-group-item.tsx | 129 +- .../components/var-list/index.tsx | 20 +- .../components/var-list/use-var-list.ts | 4 +- .../nodes/variable-assigner/default.ts | 7 +- .../workflow/nodes/variable-assigner/hooks.ts | 30 +- .../workflow/nodes/variable-assigner/node.tsx | 8 +- .../nodes/variable-assigner/panel.tsx | 104 +- .../nodes/variable-assigner/use-config.ts | 18 +- .../use-single-run-form-params.ts | 12 +- .../workflow/note-node/constants.ts | 2 +- .../components/workflow/note-node/hooks.ts | 4 +- .../components/workflow/note-node/index.tsx | 29 +- .../note-node/note-editor/context.tsx | 12 +- .../workflow/note-node/note-editor/editor.tsx | 30 +- .../plugins/format-detector-plugin/hooks.ts | 20 +- .../plugins/link-editor-plugin/component.tsx | 50 +- .../plugins/link-editor-plugin/hooks.ts | 26 +- .../plugins/link-editor-plugin/index.tsx | 2 +- .../note-editor/toolbar/color-picker.tsx | 24 +- .../note-node/note-editor/toolbar/command.tsx | 14 +- .../note-node/note-editor/toolbar/divider.tsx | 2 +- .../toolbar/font-size-selector.tsx | 21 +- .../note-node/note-editor/toolbar/hooks.ts | 30 +- .../note-node/note-editor/toolbar/index.tsx | 24 +- .../note-editor/toolbar/operator.tsx | 32 +- .../workflow/note-node/note-editor/utils.ts | 4 +- .../workflow/operator/add-block.tsx | 39 +- .../components/workflow/operator/control.tsx | 36 +- web/app/components/workflow/operator/hooks.ts | 8 +- .../components/workflow/operator/index.tsx | 22 +- .../workflow/operator/more-actions.tsx | 54 +- .../workflow/operator/tip-popup.tsx | 12 +- .../workflow/operator/zoom-in-out.tsx | 55 +- .../components/workflow/panel-contextmenu.tsx | 30 +- .../workflow/panel/chat-record/index.tsx | 42 +- .../workflow/panel/chat-record/user-input.tsx | 8 +- .../components/array-bool-list.tsx | 16 +- .../components/array-value-list.tsx | 16 +- .../components/bool-value.tsx | 12 +- .../components/object-value-item.tsx | 20 +- .../components/object-value-list.tsx | 10 +- .../components/variable-item.tsx | 33 +- .../components/variable-modal-trigger.tsx | 19 +- .../components/variable-modal.tsx | 100 +- .../components/variable-type-select.tsx | 34 +- .../panel/chat-variable-panel/index.tsx | 88 +- .../panel/debug-and-preview/chat-wrapper.tsx | 52 +- .../conversation-variable-modal.tsx | 93 +- .../panel/debug-and-preview/empty.tsx | 8 +- .../workflow/panel/debug-and-preview/hooks.ts | 38 +- .../panel/debug-and-preview/index.tsx | 53 +- .../panel/debug-and-preview/user-input.tsx | 10 +- .../workflow/panel/env-panel/env-item.tsx | 43 +- .../workflow/panel/env-panel/index.tsx | 36 +- .../panel/env-panel/variable-modal.tsx | 134 +- .../panel/env-panel/variable-trigger.tsx | 19 +- .../panel/global-variable-panel/index.tsx | 57 +- .../panel/global-variable-panel/item.tsx | 25 +- web/app/components/workflow/panel/index.tsx | 11 +- .../workflow/panel/inputs-panel.tsx | 38 +- web/app/components/workflow/panel/record.tsx | 10 +- .../context-menu/index.tsx | 29 +- .../context-menu/menu-item.tsx | 6 +- .../context-menu/use-context-menu.ts | 26 +- .../delete-confirm-modal.tsx | 41 +- .../panel/version-history-panel/empty.tsx | 31 +- .../filter/filter-item.tsx | 11 +- .../filter/filter-switch.tsx | 13 +- .../version-history-panel/filter/index.tsx | 23 +- .../panel/version-history-panel/index.tsx | 140 +- .../version-history-panel/loading/index.tsx | 10 +- .../version-history-panel/loading/item.tsx | 17 +- .../restore-confirm-modal.tsx | 41 +- .../version-history-item.tsx | 38 +- .../workflow/panel/workflow-preview.tsx | 71 +- .../workflow/plugin-dependency/hooks.ts | 4 +- .../workflow/plugin-dependency/index.tsx | 2 +- .../workflow/plugin-dependency/store.ts | 2 +- .../workflow/run/agent-log/agent-log-item.tsx | 51 +- .../run/agent-log/agent-log-nav-more.tsx | 18 +- .../workflow/run/agent-log/agent-log-nav.tsx | 48 +- .../run/agent-log/agent-log-trigger.tsx | 16 +- .../run/agent-log/agent-result-panel.tsx | 39 +- web/app/components/workflow/run/hooks.ts | 12 +- web/app/components/workflow/run/index.tsx | 38 +- .../iteration-log/iteration-log-trigger.tsx | 37 +- .../iteration-log/iteration-result-panel.tsx | 51 +- .../run/loop-log/loop-log-trigger.tsx | 30 +- .../run/loop-log/loop-result-panel.tsx | 55 +- .../workflow/run/loop-result-panel.tsx | 57 +- web/app/components/workflow/run/meta.tsx | 54 +- web/app/components/workflow/run/node.tsx | 82 +- .../components/workflow/run/output-panel.tsx | 28 +- .../components/workflow/run/result-panel.tsx | 38 +- .../components/workflow/run/result-text.tsx | 28 +- .../run/retry-log/retry-log-trigger.tsx | 14 +- .../run/retry-log/retry-result-panel.tsx | 14 +- .../workflow/run/special-result-panel.tsx | 11 +- .../workflow/run/status-container.tsx | 6 +- web/app/components/workflow/run/status.tsx | 57 +- .../components/workflow/run/tracing-panel.tsx | 24 +- .../run/utils/format-log/agent/index.spec.ts | 4 +- .../run/utils/format-log/agent/index.ts | 2 +- .../utils/format-log/graph-to-log-struct.ts | 50 +- .../workflow/run/utils/format-log/index.ts | 6 +- .../utils/format-log/iteration/index.spec.ts | 4 +- .../run/utils/format-log/iteration/index.ts | 5 +- .../run/utils/format-log/loop/index.spec.ts | 6 +- .../run/utils/format-log/loop/index.ts | 5 +- .../run/utils/format-log/parallel/index.ts | 12 +- .../run/utils/format-log/retry/index.spec.ts | 4 +- .../workflow/selection-contextmenu.tsx | 81 +- .../components/workflow/shortcuts-name.tsx | 5 +- .../components/workflow/simple-node/index.tsx | 49 +- .../store/__tests__/trigger-status.test.ts | 2 +- web/app/components/workflow/store/index.ts | 2 +- .../workflow/debug/inspect-vars-slice.ts | 16 +- .../workflow/store/workflow/index.ts | 86 +- .../workflow/store/workflow/node-slice.ts | 8 +- .../store/workflow/workflow-draft-slice.ts | 4 +- .../workflow/store/workflow/workflow-slice.ts | 8 +- .../workflow/syncing-data-modal.tsx | 2 +- web/app/components/workflow/types.ts | 25 +- .../components/workflow/update-dsl-modal.tsx | 142 +- .../components/workflow/utils/data-source.ts | 2 +- .../components/workflow/utils/elk-layout.ts | 14 +- .../workflow/utils/gen-node-meta-data.ts | 2 +- web/app/components/workflow/utils/index.ts | 16 +- .../workflow/utils/node-navigation.ts | 4 +- web/app/components/workflow/utils/node.ts | 16 +- web/app/components/workflow/utils/tool.ts | 6 +- web/app/components/workflow/utils/variable.ts | 6 +- .../workflow/utils/workflow-entry.ts | 6 +- .../workflow/utils/workflow-init.spec.ts | 4 +- .../workflow/utils/workflow-init.ts | 40 +- web/app/components/workflow/utils/workflow.ts | 16 +- .../variable-inspect/display-content.tsx | 95 +- .../workflow/variable-inspect/empty.tsx | 21 +- .../workflow/variable-inspect/group.tsx | 45 +- .../workflow/variable-inspect/index.tsx | 13 +- .../variable-inspect/large-data-alert.tsx | 12 +- .../workflow/variable-inspect/left.tsx | 28 +- .../workflow/variable-inspect/listening.tsx | 52 +- .../workflow/variable-inspect/panel.tsx | 62 +- .../workflow/variable-inspect/right.tsx | 144 +- .../workflow/variable-inspect/trigger.tsx | 41 +- .../variable-inspect/value-content.tsx | 112 +- .../workflow/workflow-history-store.tsx | 13 +- .../components/custom-edge.tsx | 11 +- .../components/error-handle-on-node.tsx | 16 +- .../components/node-handle.tsx | 12 +- .../components/nodes/base.tsx | 46 +- .../components/nodes/constants.ts | 2 +- .../components/nodes/if-else/node.tsx | 72 +- .../components/nodes/index.tsx | 2 +- .../nodes/iteration-start/index.tsx | 14 +- .../components/nodes/iteration/node.tsx | 11 +- .../components/nodes/loop-start/index.tsx | 14 +- .../components/nodes/loop/hooks.ts | 6 +- .../components/nodes/loop/node.tsx | 8 +- .../nodes/question-classifier/node.tsx | 14 +- .../components/note-node/index.tsx | 17 +- .../components/zoom-in-out.tsx | 40 +- .../workflow/workflow-preview/index.tsx | 66 +- web/app/dev-preview/page.tsx | 4 +- .../education-apply/education-apply-page.tsx | 98 +- .../education-apply/expire-notice-modal.tsx | 72 +- web/app/education-apply/hooks.ts | 25 +- web/app/education-apply/role-selector.tsx | 4 +- web/app/education-apply/search-input.tsx | 14 +- web/app/education-apply/user-info.tsx | 26 +- .../education-apply/verify-state-modal.tsx | 38 +- .../forgot-password/ChangePasswordForm.tsx | 45 +- .../forgot-password/ForgotPasswordForm.tsx | 88 +- web/app/forgot-password/page.tsx | 22 +- web/app/init/InitPasswordPopup.tsx | 60 +- web/app/init/page.tsx | 2 +- web/app/install/installForm.tsx | 209 +- web/app/install/page.tsx | 16 +- web/app/layout.tsx | 28 +- web/app/page.tsx | 4 +- .../repos/[owner]/[repo]/releases/route.ts | 7 +- web/app/reset-password/check-code/page.tsx | 72 +- web/app/reset-password/layout.tsx | 49 +- web/app/reset-password/page.tsx | 74 +- web/app/reset-password/set-password/page.tsx | 61 +- web/app/routePrefixHandle.tsx | 4 +- web/app/signin/_header.tsx | 34 +- web/app/signin/check-code/page.tsx | 91 +- .../signin/components/mail-and-code-auth.tsx | 34 +- .../components/mail-and-password-auth.tsx | 146 +- web/app/signin/components/social-auth.tsx | 76 +- web/app/signin/components/sso-auth.tsx | 6 +- web/app/signin/invite-settings/page.tsx | 208 +- web/app/signin/layout.tsx | 38 +- web/app/signin/normal-form.tsx | 286 +- web/app/signin/one-more-step.tsx | 50 +- web/app/signin/page.tsx | 4 +- web/app/signin/split.tsx | 3 +- web/app/signin/utils/post-login-redirect.ts | 7 +- web/app/signup/check-code/page.tsx | 70 +- web/app/signup/components/input-mail.tsx | 128 +- web/app/signup/layout.tsx | 34 +- web/app/signup/page.tsx | 6 +- web/app/signup/set-password/page.tsx | 41 +- web/config/index.spec.ts | 17 +- web/config/index.ts | 32 +- web/context/access-control-store.ts | 4 +- web/context/app-context.tsx | 23 +- web/context/dataset-detail.ts | 6 +- web/context/datasets-context.tsx | 2 +- web/context/debug-configuration.ts | 17 +- web/context/event-emitter.tsx | 4 +- web/context/explore-context.ts | 2 +- .../external-knowledge-api-context.tsx | 2 +- web/context/global-public-context.tsx | 12 +- .../hooks/use-trigger-events-limit-modal.ts | 5 +- web/context/i18n.ts | 4 +- web/context/mitt-context.tsx | 2 +- web/context/modal-context.test.tsx | 6 +- web/context/modal-context.tsx | 67 +- web/context/provider-context-mock.spec.tsx | 4 +- web/context/provider-context.tsx | 44 +- web/context/query-client.tsx | 10 +- web/context/web-app-context.tsx | 20 +- web/context/workspace-context.tsx | 5 +- web/eslint.config.mjs | 225 +- web/hooks/use-app-favicon.ts | 12 +- web/hooks/use-document-title.spec.ts | 4 +- web/hooks/use-document-title.ts | 4 +- web/hooks/use-format-time-from-now.spec.ts | 31 +- web/hooks/use-format-time-from-now.ts | 2 +- web/hooks/use-import-dsl.ts | 22 +- web/hooks/use-metadata.ts | 5 +- web/hooks/use-mitt.ts | 16 +- web/hooks/use-moderate.ts | 2 +- web/hooks/use-pay.tsx | 8 +- web/hooks/use-tab-searchparams.spec.ts | 6 +- web/hooks/use-theme.ts | 2 +- web/hooks/use-timestamp.ts | 4 +- web/i18n-config/README.md | 3 +- web/i18n-config/auto-gen-i18n.js | 23 +- web/i18n-config/check-i18n-sync.js | 9 +- web/i18n-config/check-i18n.js | 41 +- web/i18n-config/generate-i18n-types.js | 27 +- web/i18n-config/i18next-config.ts | 9 +- web/i18n-config/index.ts | 11 +- web/i18n-config/language.ts | 1 + web/i18n-config/server.ts | 8 +- web/models/access-control.ts | 4 +- web/models/app.ts | 12 +- web/models/common.ts | 2 +- web/models/datasets.ts | 14 +- web/models/debug.ts | 11 +- web/models/explore.ts | 1 + web/models/log.ts | 6 +- web/models/pipeline.ts | 10 +- web/next.config.js | 44 +- web/package.json | 78 +- web/pnpm-lock.yaml | 1130 ++++---- web/scripts/copy-and-start.mjs | 2 +- web/scripts/generate-icons.js | 41 +- web/scripts/optimize-standalone.js | 124 +- web/service/_tools_util.spec.ts | 8 +- web/service/access-control.ts | 12 +- web/service/annotation.ts | 10 +- web/service/apps.ts | 66 +- web/service/base.ts | 30 +- web/service/billing.ts | 2 +- web/service/common.ts | 162 +- web/service/datasets.ts | 50 +- web/service/debug.ts | 10 +- web/service/demo/index.tsx | 12 +- web/service/explore.ts | 4 +- web/service/fetch.ts | 10 +- web/service/knowledge/use-create-dataset.ts | 10 +- web/service/knowledge/use-dataset.ts | 24 +- web/service/knowledge/use-document.ts | 16 +- web/service/knowledge/use-hit-testing.ts | 4 +- web/service/knowledge/use-import.ts | 2 +- web/service/knowledge/use-metadata.spec.tsx | 4 +- web/service/knowledge/use-metadata.ts | 8 +- web/service/knowledge/use-segment.ts | 28 +- web/service/log.ts | 18 +- web/service/plugins.ts | 15 +- web/service/share.ts | 27 +- web/service/sso.ts | 4 +- web/service/tag.ts | 2 +- web/service/tools.ts | 4 +- web/service/use-apps.ts | 6 +- web/service/use-base.ts | 3 +- web/service/use-billing.ts | 2 +- web/service/use-common.ts | 46 +- web/service/use-datasource.ts | 11 +- web/service/use-education.ts | 6 +- web/service/use-endpoints.ts | 5 +- web/service/use-explore.ts | 4 +- web/service/use-flow.ts | 2 +- web/service/use-models.ts | 12 +- web/service/use-oauth.ts | 2 +- web/service/use-pipeline.ts | 24 +- web/service/use-plugins-auth.ts | 13 +- web/service/use-plugins.ts | 66 +- web/service/use-strategy.ts | 4 +- web/service/use-tools.ts | 23 +- web/service/use-triggers.ts | 10 +- web/service/use-workflow.ts | 11 +- web/service/utils.spec.ts | 2 +- web/service/workflow-payload.ts | 6 +- web/service/workflow.ts | 10 +- web/tailwind.config.js | 1 + web/testing/analyze-component.js | 184 +- web/testing/testing.md | 27 +- web/tsconfig.json | 34 +- web/types/app.ts | 23 +- web/types/feature.ts | 4 +- web/types/i18n.d.ts | 80 +- web/types/react-18-input-autosize.d.ts | 2 +- web/types/workflow.ts | 36 +- web/utils/app-redirection.spec.ts | 22 +- web/utils/classnames.spec.ts | 20 +- web/utils/classnames.ts | 3 +- web/utils/completion-params.spec.ts | 42 +- web/utils/completion-params.ts | 4 +- web/utils/context.spec.ts | 6 +- web/utils/context.ts | 6 +- web/utils/emoji.spec.ts | 2 +- web/utils/emoji.ts | 2 +- web/utils/encryption.ts | 6 +- web/utils/format.spec.ts | 38 +- web/utils/format.ts | 7 +- web/utils/get-icon.spec.ts | 36 +- web/utils/index.spec.ts | 2 +- web/utils/mcp.spec.ts | 28 +- web/utils/model-config.spec.ts | 4 +- web/utils/model-config.ts | 4 +- web/utils/navigation.spec.ts | 62 +- web/utils/permission.spec.ts | 18 +- web/utils/time.spec.ts | 26 +- web/utils/time.ts | 5 +- web/utils/timezone.json | 2544 ++++++++--------- web/utils/tool-call.spec.ts | 20 +- web/utils/tool-call.ts | 3 +- web/utils/urlValidation.ts | 3 +- web/utils/var.spec.ts | 2 +- web/utils/var.ts | 6 +- web/utils/zod.spec.ts | 2 +- web/vitest.config.ts | 2 +- web/vitest.setup.ts | 2 +- 3356 files changed, 85046 insertions(+), 81278 deletions(-) delete mode 100644 web/.oxlintrc.json diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index bafac7bd13..dbced47988 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -68,25 +68,4 @@ jobs: run: | uvx --python 3.13 mdformat . --exclude ".claude/skills/**/SKILL.md" - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - package_json_file: web/package.json - run_install: false - - - name: Setup NodeJS - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: pnpm - cache-dependency-path: ./web/pnpm-lock.yaml - - - name: Web dependencies - working-directory: ./web - run: pnpm install --frozen-lockfile - - - name: oxlint - working-directory: ./web - run: pnpm exec oxlint --config .oxlintrc.json --fix . - - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 diff --git a/.gitignore b/.gitignore index 5ad728c3da..4e9a0eaa23 100644 --- a/.gitignore +++ b/.gitignore @@ -139,7 +139,6 @@ pyrightconfig.json .idea/' .DS_Store -web/.vscode/settings.json # Intellij IDEA Files .idea/* @@ -205,7 +204,6 @@ sdks/python-client/dify_client.egg-info !.vscode/launch.json.template !.vscode/README.md api/.vscode -web/.vscode # vscode Code History Extension .history @@ -220,15 +218,6 @@ plugins.jsonl # mise mise.toml -# Next.js build output -.next/ - -# PWA generated files -web/public/sw.js -web/public/sw.js.map -web/public/workbox-*.js -web/public/workbox-*.js.map -web/public/fallback-*.js # AI Assistant .roo/ diff --git a/web/.gitignore b/web/.gitignore index 048c5f6485..9de3dc83f9 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -54,3 +54,13 @@ package-lock.json # mise mise.toml + +# PWA generated files +public/sw.js +public/sw.js.map +public/workbox-*.js +public/workbox-*.js.map +public/fallback-*.js + +.vscode/settings.json +.vscode/mcp.json diff --git a/web/.oxlintrc.json b/web/.oxlintrc.json deleted file mode 100644 index 57eddd34fb..0000000000 --- a/web/.oxlintrc.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "plugins": [ - "unicorn", - "typescript", - "oxc" - ], - "categories": {}, - "rules": { - "for-direction": "error", - "no-async-promise-executor": "error", - "no-caller": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "warn", - "no-const-assign": "warn", - "no-constant-binary-expression": "error", - "no-constant-condition": "warn", - "no-control-regex": "warn", - "no-debugger": "warn", - "no-delete-var": "warn", - "no-dupe-class-members": "warn", - "no-dupe-else-if": "warn", - "no-dupe-keys": "warn", - "no-duplicate-case": "warn", - "no-empty-character-class": "warn", - "no-empty-pattern": "warn", - "no-empty-static-block": "warn", - "no-eval": "warn", - "no-ex-assign": "warn", - "no-extra-boolean-cast": "warn", - "no-func-assign": "warn", - "no-global-assign": "warn", - "no-import-assign": "warn", - "no-invalid-regexp": "warn", - "no-irregular-whitespace": "warn", - "no-loss-of-precision": "warn", - "no-new-native-nonconstructor": "warn", - "no-nonoctal-decimal-escape": "warn", - "no-obj-calls": "warn", - "no-self-assign": "warn", - "no-setter-return": "warn", - "no-shadow-restricted-names": "warn", - "no-sparse-arrays": "warn", - "no-this-before-super": "warn", - "no-unassigned-vars": "warn", - "no-unsafe-finally": "warn", - "no-unsafe-negation": "warn", - "no-unsafe-optional-chaining": "error", - "no-unused-labels": "warn", - "no-unused-private-class-members": "warn", - "no-unused-vars": "warn", - "no-useless-backreference": "warn", - "no-useless-catch": "error", - "no-useless-escape": "warn", - "no-useless-rename": "warn", - "no-with": "warn", - "require-yield": "warn", - "use-isnan": "warn", - "valid-typeof": "warn", - "oxc/bad-array-method-on-arguments": "warn", - "oxc/bad-char-at-comparison": "warn", - "oxc/bad-comparison-sequence": "warn", - "oxc/bad-min-max-func": "warn", - "oxc/bad-object-literal-comparison": "warn", - "oxc/bad-replace-all-arg": "warn", - "oxc/const-comparisons": "warn", - "oxc/double-comparisons": "warn", - "oxc/erasing-op": "warn", - "oxc/missing-throw": "warn", - "oxc/number-arg-out-of-range": "warn", - "oxc/only-used-in-recursion": "warn", - "oxc/uninvoked-array-callback": "warn", - "typescript/await-thenable": "warn", - "typescript/no-array-delete": "warn", - "typescript/no-base-to-string": "warn", - "typescript/no-confusing-void-expression": "warn", - "typescript/no-duplicate-enum-values": "warn", - "typescript/no-duplicate-type-constituents": "warn", - "typescript/no-extra-non-null-assertion": "warn", - "typescript/no-floating-promises": "warn", - "typescript/no-for-in-array": "warn", - "typescript/no-implied-eval": "warn", - "typescript/no-meaningless-void-operator": "warn", - "typescript/no-misused-new": "warn", - "typescript/no-misused-spread": "warn", - "typescript/no-non-null-asserted-optional-chain": "warn", - "typescript/no-redundant-type-constituents": "warn", - "typescript/no-this-alias": "warn", - "typescript/no-unnecessary-parameter-property-assignment": "warn", - "typescript/no-unsafe-declaration-merging": "warn", - "typescript/no-unsafe-unary-minus": "warn", - "typescript/no-useless-empty-export": "warn", - "typescript/no-wrapper-object-types": "warn", - "typescript/prefer-as-const": "warn", - "typescript/require-array-sort-compare": "warn", - "typescript/restrict-template-expressions": "warn", - "typescript/triple-slash-reference": "warn", - "typescript/unbound-method": "warn", - "unicorn/no-await-in-promise-methods": "warn", - "unicorn/no-empty-file": "warn", - "unicorn/no-invalid-fetch-options": "warn", - "unicorn/no-invalid-remove-event-listener": "warn", - "unicorn/no-new-array": "warn", - "unicorn/no-single-promise-in-promise-methods": "warn", - "unicorn/no-thenable": "warn", - "unicorn/no-unnecessary-await": "warn", - "unicorn/no-useless-fallback-in-spread": "warn", - "unicorn/no-useless-length-check": "warn", - "unicorn/no-useless-spread": "warn", - "unicorn/prefer-set-size": "warn", - "unicorn/prefer-string-starts-ends-with": "warn" - }, - "settings": { - "jsx-a11y": { - "polymorphicPropName": null, - "components": {}, - "attributes": {} - }, - "next": { - "rootDir": [] - }, - "react": { - "formComponents": [], - "linkComponents": [] - }, - "jsdoc": { - "ignorePrivate": false, - "ignoreInternal": false, - "ignoreReplacesDocs": true, - "overrideReplacesDocs": true, - "augmentsExtendsReplacesDocs": false, - "implementsReplacesDocs": false, - "exemptDestructuredRootsFromChecks": false, - "tagNamePreference": {} - } - }, - "env": { - "builtin": true - }, - "globals": {}, - "ignorePatterns": [ - "**/*.js" - ] -} \ No newline at end of file diff --git a/web/.storybook/preview.tsx b/web/.storybook/preview.tsx index 1f5726de34..37c636cc75 100644 --- a/web/.storybook/preview.tsx +++ b/web/.storybook/preview.tsx @@ -1,8 +1,8 @@ import type { Preview } from '@storybook/react' import { withThemeByDataAttribute } from '@storybook/addon-themes' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import I18N from '../app/components/i18n' import { ToastProvider } from '../app/components/base/toast' +import I18N from '../app/components/i18n' import '../app/styles/globals.css' import '../app/styles/markdown.scss' diff --git a/web/.storybook/utils/form-story-wrapper.tsx b/web/.storybook/utils/form-story-wrapper.tsx index 689c3a20ff..90349a0325 100644 --- a/web/.storybook/utils/form-story-wrapper.tsx +++ b/web/.storybook/utils/form-story-wrapper.tsx @@ -1,6 +1,6 @@ -import { useState } from 'react' import type { ReactNode } from 'react' import { useStore } from '@tanstack/react-form' +import { useState } from 'react' import { useAppForm } from '@/app/components/base/form' type UseAppFormOptions = Parameters[0] @@ -49,7 +49,12 @@ export const FormStoryWrapper = ({