| """manual dataset field update | |||||
| Revision ID: 532b3f888abf | |||||
| Revises: 8bcc02c9bd07 | |||||
| Create Date: 2025-07-24 14:50:48.779833 | |||||
| """ | |||||
| from alembic import op | |||||
| import models as models | |||||
| import sqlalchemy as sa | |||||
| # revision identifiers, used by Alembic. | |||||
| revision = '532b3f888abf' | |||||
| down_revision = '8bcc02c9bd07' | |||||
| branch_labels = None | |||||
| depends_on = None | |||||
| def upgrade(): | |||||
| op.execute("ALTER TABLE tidb_auth_bindings ALTER COLUMN status SET DEFAULT 'CREATING'::character varying") | |||||
| def downgrade(): | |||||
| op.execute("ALTER TABLE tidb_auth_bindings ALTER COLUMN status SET DEFAULT 'CREATING'") |
| cluster_id: Mapped[str] = mapped_column(String(255), nullable=False) | cluster_id: Mapped[str] = mapped_column(String(255), nullable=False) | ||||
| cluster_name: Mapped[str] = mapped_column(String(255), nullable=False) | cluster_name: Mapped[str] = mapped_column(String(255), nullable=False) | ||||
| active: Mapped[bool] = mapped_column(db.Boolean, nullable=False, server_default=db.text("false")) | active: Mapped[bool] = mapped_column(db.Boolean, nullable=False, server_default=db.text("false")) | ||||
| status = mapped_column(String(255), nullable=False, server_default=db.text("CREATING")) | |||||
| status = mapped_column(String(255), nullable=False, server_default=db.text("'CREATING'::character varying")) | |||||
| account: Mapped[str] = mapped_column(String(255), nullable=False) | account: Mapped[str] = mapped_column(String(255), nullable=False) | ||||
| password: Mapped[str] = mapped_column(String(255), nullable=False) | password: Mapped[str] = mapped_column(String(255), nullable=False) | ||||
| created_at: Mapped[datetime] = mapped_column(DateTime, nullable=False, server_default=func.current_timestamp()) | created_at: Mapped[datetime] = mapped_column(DateTime, nullable=False, server_default=func.current_timestamp()) |
| footer, | footer, | ||||
| }) => { | }) => { | ||||
| return ( | return ( | ||||
| <div className={`${s.mask} absolute inset-0 z-10 pt-16 bg-components-panel-bg-blur`} | |||||
| <div className={`${s.mask} absolute inset-0 z-10 bg-components-panel-bg-blur pt-16`} | |||||
| > | > | ||||
| <div className='mx-auto px-10'> | <div className='mx-auto px-10'> | ||||
| <div className={`${s.icon} flex h-11 w-11 items-center justify-center rounded-xl bg-components-panel-bg`}>{warningIcon}</div> | <div className={`${s.icon} flex h-11 w-11 items-center justify-center rounded-xl bg-components-panel-bg`}>{warningIcon}</div> |
| const wordCountText = useMemo(() => { | const wordCountText = useMemo(() => { | ||||
| const count = content.length | const count = content.length | ||||
| return `${formatNumber(count)} ${t('datasetDocuments.segment.characters', { count })}` | return `${formatNumber(count)} ${t('datasetDocuments.segment.characters', { count })}` | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, [content.length]) | }, [content.length]) | ||||
| const EditTimeText = useMemo(() => { | const EditTimeText = useMemo(() => { | ||||
| dateFormat: `${t('datasetDocuments.segment.dateTimeFormat')}`, | dateFormat: `${t('datasetDocuments.segment.dateTimeFormat')}`, | ||||
| }) | }) | ||||
| return `${t('datasetDocuments.segment.editedAt')} ${timeText}` | return `${t('datasetDocuments.segment.editedAt')} ${timeText}` | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, [childChunkInfo?.updated_at]) | }, [childChunkInfo?.updated_at]) | ||||
| return ( | return ( |
| return () => { | return () => { | ||||
| handleSyncWorkflowDraft(true, true) | handleSyncWorkflowDraft(true, true) | ||||
| } | } | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, []) | }, []) | ||||
| const { handleRefreshWorkflowDraft } = useWorkflowRefreshDraft() | const { handleRefreshWorkflowDraft } = useWorkflowRefreshDraft() | ||||
| const { fetchInspectVars } = useSetWorkflowVarsWithValue() | const { fetchInspectVars } = useSetWorkflowVarsWithValue() | ||||
| useEffect(() => { | useEffect(() => { | ||||
| fetchInspectVars() | fetchInspectVars() | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, []) | }, []) | ||||
| const store = useStoreApi() | const store = useStoreApi() |
| category: PluginType.agent, | category: PluginType.agent, | ||||
| }) | }) | ||||
| } | } | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, [query]) | }, [query]) | ||||
| const pluginRef = useRef<ListRef>(null) | const pluginRef = useRef<ListRef>(null) |
| return | return | ||||
| const newData = formattingLegacyData() | const newData = formattingLegacyData() | ||||
| setInputs(newData) | setInputs(newData) | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, [currentStrategy]) | }, [currentStrategy]) | ||||
| // vars | // vars |
| }) | }) | ||||
| setInputs(newInputs) | setInputs(newInputs) | ||||
| } | } | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, [defaultConfig, isChatModel]) | }, [defaultConfig, isChatModel]) | ||||
| const [modelChanged, setModelChanged] = useState(false) | const [modelChanged, setModelChanged] = useState(false) | ||||
| return | return | ||||
| setModelChanged(false) | setModelChanged(false) | ||||
| handleVisionConfigAfterModelChanged() | handleVisionConfigAfterModelChanged() | ||||
| // eslint-disable-next-line react-hooks/exhaustive-deps | |||||
| }, [isVisionModel, modelChanged]) | }, [isVisionModel, modelChanged]) | ||||
| // variables | // variables |
| delete = 'delete', | delete = 'delete', | ||||
| } | } | ||||
| export interface ChildNodeTypeCount { | |||||
| export type ChildNodeTypeCount = { | |||||
| [key: string]: number; | [key: string]: number; | ||||
| } | } |