Add always_new_chat option to apps and sites
Introduces a new boolean field 'always_new_chat' (default true) to both apps and sites in the backend and frontend. This option allows configuration to always start a new chat session, ignoring previous conversations. Includes database migration, API/controller updates, model changes, UI controls, and i18n support.pull/22059/head
parent
d61ea5a2de
commit
b8b5acc1f0
@ -0,0 +1,24 @@
|
||||
"""add always_new_chat boolean field to apps and sites (default true)
|
||||
|
||||
Revision ID: 0001_add_always_new_chat
|
||||
Revises:
|
||||
Create Date: 2025-07-08 00:00:00.000000
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd57ba9ebb254'
|
||||
down_revision = '0ab65e1cc7fa'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
for table in ('apps', 'sites'):
|
||||
op.add_column(table, sa.Column('always_new_chat', sa.Boolean(), nullable=False, server_default=sa.text('true')))
|
||||
|
||||
|
||||
def downgrade():
|
||||
for table in ('apps', 'sites'):
|
||||
op.drop_column(table, 'always_new_chat')
|
||||
Loading…
Reference in New Issue