-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* evaluate None to default * fix usage report pagination * update persona defaults * update user preferences * k * validate * update typing * nit * formating nits * fallback to all assistants * update ux + spacing * udpate refresh logic * minor update to refresh * nit * touchup * update starter message * update default live assistant logic --------- Co-authored-by: Yuhong Sun <[email protected]>
- Loading branch information
1 parent
43d8daa
commit 07a1b49
Showing
25 changed files
with
533 additions
and
266 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
backend/alembic/versions/b72ed7a5db0e_remove_description_from_starter_messages.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""remove description from starter messages | ||
Revision ID: b72ed7a5db0e | ||
Revises: 33cb72ea4d80 | ||
Create Date: 2024-11-03 15:55:28.944408 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "b72ed7a5db0e" | ||
down_revision = "33cb72ea4d80" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.execute( | ||
sa.text( | ||
""" | ||
UPDATE persona | ||
SET starter_messages = ( | ||
SELECT jsonb_agg(elem - 'description') | ||
FROM jsonb_array_elements(starter_messages) elem | ||
) | ||
WHERE starter_messages IS NOT NULL | ||
""" | ||
) | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.execute( | ||
sa.text( | ||
""" | ||
UPDATE persona | ||
SET starter_messages = ( | ||
SELECT jsonb_agg(elem || '{"description": ""}') | ||
FROM jsonb_array_elements(starter_messages) elem | ||
) | ||
WHERE starter_messages IS NOT NULL | ||
""" | ||
) | ||
) |
29 changes: 29 additions & 0 deletions
29
backend/alembic/versions/c0fd6e4da83a_add_recent_assistants.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""add recent assistants | ||
Revision ID: c0fd6e4da83a | ||
Revises: b72ed7a5db0e | ||
Create Date: 2024-11-03 17:28:54.916618 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "c0fd6e4da83a" | ||
down_revision = "b72ed7a5db0e" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column( | ||
"user", | ||
sa.Column( | ||
"recent_assistants", postgresql.JSONB(), server_default="[]", nullable=False | ||
), | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("user", "recent_assistants") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.