Skip to content

Commit ed2c692

Browse files
AndlerRLBran18sheriffjimohBrandon fernandez
authored
[masterbots.ai] perf(impr): enhance user preferences, update database schema, and improve ui components (#495)
* fix: change toggler wording + util hook (#424) * impr: makes threads open on profile page and profile tweaks (#421) * update * fix: update * update * update * update * update * fix: opening threads * fix: rm threads dropdwon & added back link to bot page thread view page * fix: rm threads dropdwon & added back link to bot page thread view page * fix: update * fix: added back to profile page * fix: added sticky and color * fix: codeblock ctas refactor markdown rendering, sidebar nav, code block & clipboard hook (#425) * fix: codeblock ctas * fix: ts build * fix: continue thread + allMessages sequence + mobile chat css tweak (#426) * fix: css handleCLick condition * fix: get latest search params, continuous thread * fix(impr): all messages sorting * perf(impr): sign in & up redirection tweak * perf(impr): mobile chat css * chore: next + react security ver upt (#427) * refactor: use chat and continue thread + continue conversation fallback (#432) * refactor: use chat and continue generation * fix: uniq slug and id gen (#433) * fix: uniq thread + msg slug gen * style: formatting * fix: thread user attachments state upt * perf: impr thread component at all pages + mobile tweaks * refactor: thread-component card * chore: restore continue generation v1 * feat(impr): thread component card * fix: admin panel n actions * fix: fetch getThreads * chore: continue conversation v1.2 * chore: continue and update thread content * chore: add ui control continue generation state * chore: fix infinity loop * chore(impr): enable upt msg table permission * fix: seo thread fetch * chore: style formating * fix(impr): continued thread title + thread component reusability * chore: refactor loadings + extending sonners --------- Co-authored-by: bran18 <andreyfdez18@gmail.com> --------- Co-authored-by: Roberto Lucas <andler@bitcash.org> * feat: add gemini provider (#437) * feat: add gemini provider * chore: update icons * feat: impr continuing thread tags + accordion first msg toggle (#435) * feat(wip): impr continuing thread tags + accordion first msg toggle * feat(impr): continuing thread tags + accordion at first message + header mobile tweak * style(impr): mobile thread-component x-axis space * perf(style): coderabbitai feedbacks * fix: css typo * perf: sendMessageFromResponse clicked guard + continued thread tags label tweak * chore: user thread panel clean up * fix: user-thread-panel infinite loader * perf: impr shared accordion animation and ux * style: defaultAccordionState comments loc * fix: record type warning, hasura updateMessage * fix: getThread user data, shared-accordion * fix: coderabbitai observations * fix: impr file management per llm, multimodel feat flag, chat tool labels, parent thread guard * fix: tunningUserContent parentThread condition * fix: feature flag typo * feat: profile page thread popup feature flag and tweaks (#434) * update * fix: update * update * update * update * update * refactor: profile page threads pop up * fix: update config * fix: update * fix: update * fix: make profile page scroll on hero * fix: bot make popup and scroll * fix: make profile page sidebar scroll independently * fix: make profile page sidebar scroll independently * fix: check the category along the chatbot when it's not checked * fix: check the category along the chatbot when it's not checked --------- Co-authored-by: Roberto Lucas <andler.dev@gmail.com> Co-authored-by: Roberto Lucas <andler@bitcash.org> * feat: add new llm models (#444) * feat-add-models * feat-add-models * feat-add-models * chore: add model * fix: typo * chore: add toggler color * perf(impr): thread llm context, last question & response + new models seeds (#447) * feat(wip): thread llm context, prev questions * fix: previousQuestionsString slice * fix: clickedContentId in followingQuestionsPrompt * feat: isContinued + model type in message table * fix: ts typo + sendMessageFromResponse callback call * fix: ts typo * fix: bot profile page view (#449) * fix(wip): bot profile thread list * style: formatting * fix: new chats and share + og img (#451) * fix: new chat state reset * fix: genql gen + share link check * fix: og img * fix: duplicate role permission in msg table * feat: initial continuation logic flow (#450) * chore: restore base version * chore: add new logic and hooks * chore: fix providers file * chore: improve continuation prompt * chore: add exlucision flag * chore: add better handler * chore: updated flow + experimental delay * chore: extended time * chore(impr): streamDelayMs experimental feat flag * style: formatting --------- Co-authored-by: Roberto Lucas <andler.dev@gmail.com> * fix: profile sidebar cat opt render (#453) * fix: profile sidebar cat opt render * chore: clean-up * [masterbots.ai] refactor: slug generation logic with improved uniqueness and type support (#456) * fix: slugify fn * chore: devMode logs * fix: uniq slug gen fn nanoid flag typo * feat: sentry logs in webapp (#457) * fix(impr): llm enum data, thread creation, ts, and log behavior (#458) * fix: slugify first request delay incr + genql ts, seeds & model migration upt * fix: create thread & msg ts * fix(impr): profile page bugs & tweaks v1 4/15/25 (#455) * update * fix: update * update * update * update * update * fix: use the user avatar or robohash * fix: added avater to user menu * fix: user avatar * fix: reset search input when filter by category or chatbot * fix: personal chat browse provider + username chk in sign up * chore: clean duplicated if condition signup --------- Co-authored-by: Roberto Lucas <andler.dev@gmail.com> * refactor: continuation flow (#460) * impr: continuation logic flow * impr: continuation logic flow * chore: update createImprovementPrompt * chore: upt logs --------- Co-authored-by: Roberto Lucas <andler.dev@gmail.com> * feat: models table, enum type, and refactor chat msg deduplication logic (#462) * feat: models table * style: formatting * fix: continuation accordion content * fix: sql + metadata typo * fix: db migrations and messages uniqby condition (#463) * fix: db migrations + messages uniqby condition * fix: typo * perf(impr): verify duplicate message return condition * chore: upt default available models * perf(impr): reassign continued prompt * chore: incr fn stream max duration * fix: mob prof sidebar + sign-up pw verif + username chk (#464) * fix: mob prof sidebar + sign-up pw verif + username chk * chore: upt genql gen * perf(impr): profile navigation * feat: model selector (#466) * wip: model selector query * wip: model selector query * chore: improve funtions * chore: add coderabbit suggestion * chore: add hasura permissions, models table * style: formatting * chore: fix get model client type * chore: add model --------- Co-authored-by: Roberto Romero Lucas <contact@andler.dev> * chore: impr models (#472) * chore: fix model name and condition (#473) * refactor: user fetching code (#471) * refactor: profile sidebar ui, upt styling, and disable prefetch (#470) * chore: remove prefetch on sidebar & profile navigation * perf: impr profile sidebar * fix: infinite scroll load more fetch * perf(impr): google sign-in * perf(impr): session loaders tweak * perf: impr categoriesId obtention * fix: tailwind typo * chore(impr): pro user guard in model selector * chore: category label upt to topic * chore: rm dev mode guard (#476) * feat: add reasoning compatibility (#480) * feat: add resoning stable * chore: add reasoning stable v * chore: activate reasoning * chore: activate reasoning * feat: pro users whitelist (#481) * feat(wip): whitelist pro users * chore: add whitelist pro users + page size fetch * perf(impr): following question impr prompt * fix: pro whitelist users clean up * feat: user account setting (#468) * update * fix: update * update * update * update * update * feat: imple account setting * feat: added dialog to delete button * feat: update user deletion func * fix: move back exmaples files * fix: update * fix: user account scheduling api * fix: user account deletion request function * refactor: account deletion request api * fix: user account request and thread deletion * fix: added permission and account deletion page * fix: update on permission * fix: enable new col permission * fix: profile side bar * fix: update * fix: function rerendering * fix: update route * chore(impr): preferences actions and ui tweaks --------- Co-authored-by: Roberto Lucas <andler.dev@gmail.com> * chore: enable twitter pixel track (#479) * chore: enable twitter pixel track * perf(impr): twitter ads availability + dynamic config * feat: impr profile navigation page (#478) * fix(wip): subscriptions page render * feat(impr): profile navigation + page ui tweaks * style: lintin + formatting * style(css): nav links px on mob * fix: goToProfile in mob prof sidebar * fix: build * fix: thread popup opening at nav * chore: enable preferences nav on prod * feat: image generation (#486) * feat: add image generation support - gemini provider * chore: add mineType * chore: add conditional checks * chore: upt model enums & list * chore: hasura, set icl seeds chunks (#484) * chore: hasura, set icl seeds chunks * chore: track backup icl seed loc to lfs * chore(seeds): uncomment phase 3 topics & add new chatbots + icl metadata rel * chore: upt phase 3 init config seeds, adding rel * fix: example seeds integrity * test: incr hasura max req body * revert: cloudbuild og config * chore: restore skipped seed lines * fix: thread rendering (#487) * fix: thread list render states * chore: linting & format * fix: thread pop-up on refresh * fix: user table selection * fix(impr): type safety for image data and refactor model enums in chat (#489) * fix: image generation flow * chore: impr gemini generation logic * fix: build issue * chore: change subscription page * chore: change subscription page + lint * chore: user pref disable options --------- Co-authored-by: bran18 <andreyfdez18@gmail.com> * fix: add hotfix image generation * chore: add more image models * fix: models_enum values + genql upt * feat: improved subscription section (#491) * feat: add improved subscription section * feat: add type * chore: add conditional dislay * feat: add username tags * chore: add new order and benefits * fix: thread empty state on user profile (#490) * update * fix: update * update * update * update * update * feat: added empty state to user profile page * feat: added empty state to user profile page * fix: update * fix: update * fix: account creation slug issue * chore: restore public models table select permissions + clean up --------- Co-authored-by: Roberto Lucas <andler@bitcash.org> Co-authored-by: Roberto Lucas <andler.dev@gmail.com> * feat(wip): web search v2 (#494) * feat(wip): web search * feat(wip): thread config actions * feat(wip): share cta impr * chore: upt domain slugs list * chore: comment legacy getWebSearchTool * fix: preference insert * wip: user preferences set * fix: typo * fix: updateUser data upt --------- Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> Co-authored-by: Jimoh sherifdeen <63134009+sheriffjimoh@users.noreply.github.com> Co-authored-by: bran18 <andreyfdez18@gmail.com> Co-authored-by: Brandon fernandez <brandonfernandez@Brandons-Mac-mini.local>
1 parent adb23e9 commit ed2c692

File tree

58 files changed

+7346
-3626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+7346
-3626
lines changed

apps/hasura/metadata/databases/masterbots/tables/public_preference.yaml

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,87 @@ object_relationships:
2121
using:
2222
foreign_key_constraint_on: user_id
2323
insert_permissions:
24+
- role: moderator
25+
permission:
26+
check: {}
27+
columns:
28+
- deep_expertise
29+
- favorite
30+
- preferred_complexity
31+
- preferred_length
32+
- preferred_tone
33+
- preferred_type
34+
- user_id
35+
- web_search
36+
comment: ""
2437
- role: user
2538
permission:
26-
check:
27-
user_id:
28-
_eq: X-Hasura-User-Id
39+
check: {}
2940
columns:
30-
- chatbot_id
41+
- deep_expertise
3142
- favorite
3243
- preferred_complexity
3344
- preferred_length
3445
- preferred_tone
3546
- preferred_type
3647
- user_id
48+
- web_search
3749
comment: ""
3850
select_permissions:
3951
- role: moderator
4052
permission:
4153
columns:
54+
- deep_expertise
4255
- favorite
43-
- chatbot_id
4456
- preference_id
4557
- preferred_complexity
4658
- preferred_length
4759
- preferred_tone
4860
- preferred_type
4961
- user_id
62+
- web_search
5063
filter: {}
5164
comment: ""
5265
- role: user
5366
permission:
5467
columns:
68+
- deep_expertise
5569
- favorite
56-
- chatbot_id
5770
- preference_id
5871
- preferred_complexity
5972
- preferred_length
6073
- preferred_tone
6174
- preferred_type
6275
- user_id
76+
- web_search
77+
filter: {}
78+
comment: ""
79+
update_permissions:
80+
- role: moderator
81+
permission:
82+
columns:
83+
- deep_expertise
84+
- favorite
85+
- preferred_complexity
86+
- preferred_length
87+
- preferred_tone
88+
- preferred_type
89+
- web_search
90+
filter: {}
91+
check: null
92+
comment: ""
93+
- role: user
94+
permission:
95+
columns:
96+
- deep_expertise
97+
- favorite
98+
- preferred_complexity
99+
- preferred_length
100+
- preferred_tone
101+
- preferred_type
102+
- web_search
63103
filter:
64104
user_id:
65105
_eq: X-Hasura-User-Id
106+
check: null
66107
comment: ""

apps/hasura/metadata/databases/masterbots/tables/public_user.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
table:
22
name: user
33
schema: public
4+
object_relationships:
5+
- name: preference
6+
using:
7+
foreign_key_constraint_on:
8+
column: user_id
9+
table:
10+
name: preference
11+
schema: public
412
array_relationships:
513
- name: followers
614
using:
@@ -164,6 +172,7 @@ update_permissions:
164172
columns:
165173
- bio
166174
- date_joined
175+
- deletion_requested_at
167176
- email
168177
- favourite_topic
169178
- get_free_month
@@ -183,6 +192,7 @@ update_permissions:
183192
permission:
184193
columns:
185194
- bio
195+
- deletion_requested_at
186196
- favourite_topic
187197
- get_free_month
188198
- last_login

apps/hasura/migrations/masterbots/1718416395664_create_table_models_enum/up.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ INSERT INTO public.models_enum (name, value) VALUES
1717
('Gemini__Flash__Lite','gemini_2_0_flash_lite'),
1818
('Gemini__2_5__Flash','gemini-2.5-flash-preview-04-17'),
1919
('Gemini__2_5__Pro','gemini-2.5-pro-preview-03-25'),
20-
('Gemini__2_0__Flash','gemini-2.0-flash-exp')
20+
('Gemini__Flash__IMG','gemini-2.0-flash-exp'),
21+
('OpenAI__IMG','gpt-image-1'),
22+
('OpenAI__Dalle__2','dall-e-2'),
23+
('OpenAI__Dalle__3','dall-e-3')
2124
ON CONFLICT (name) DO UPDATE SET value = EXCLUDED.value;

apps/hasura/migrations/masterbots/1745471202166_create_table_public_models/up.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ INSERT INTO public.models (model, enabled, type) VALUES
2727
('gemini-2.5-pro-preview-03-25', true, 'paid'),
2828
('gemini_2_0_flash_lite', false, 'free'),
2929
('llama-3-sonar-large-32k-online', false, 'paid'),
30-
('gemini-2.0-flash-exp', true, 'paid')
30+
('gemini-2.0-flash-exp', true, 'paid'),
31+
('gpt-image-1', true, 'paid'),
32+
('dall-e-2', true, 'paid'),
33+
('dall-e-3', true, 'paid')
3134
ON CONFLICT ("model") DO NOTHING;
3235

3336
-- Add index to models_enum table
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- Could not auto-generate a down migration.
2+
-- Please write an appropriate down migration for the SQL below:
3+
-- alter table "public"."preference" add column "web_search" boolean
4+
-- null default 'false';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
alter table "public"."preference" add column "web_search" boolean
2+
null default 'false';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- Could not auto-generate a down migration.
2+
-- Please write an appropriate down migration for the SQL below:
3+
-- alter table "public"."preference" add column "deep_expertise" boolean
4+
-- null default 'false';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
alter table "public"."preference" add column "deep_expertise" boolean
2+
null default 'false';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table "public"."preference" drop constraint "preference_user_id_key";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table "public"."preference" add constraint "preference_user_id_key" unique ("user_id");

0 commit comments

Comments
 (0)