Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[masterbots.ai] Fix: pre ICL changes #346

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ array_relationships:
table:
name: chat
schema: public
- name: followers
using:
foreign_key_constraint_on:
column: followee_id_chatbot
table:
name: social_following
schema: public
- name: metadataLabels
using:
foreign_key_constraint_on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,13 @@ table:
name: social_following
schema: public
object_relationships:
- name: chatbot
using:
foreign_key_constraint_on: followee_id_chatbot
- name: user
using:
foreign_key_constraint_on: followee_id
- name: userByFollowerId
using:
foreign_key_constraint_on: follower_id
insert_permissions:
- role: moderator
permission:
check:
_and:
- followee_id:
_eq: X-Hasura-User-Id
- follower_id:
_eq: X-Hasura-User-Id
columns:
- followee_id
- followee_id_chatbot
- follower_id
comment: ""
- role: user
permission:
check:
Expand All @@ -35,74 +19,22 @@ insert_permissions:
_neq: X-Hasura-User-Id
columns:
- followee_id
- followee_id_chatbot
- follower_id
comment: ""
select_permissions:
- role: anonymous
permission:
columns:
- created_at
- followee_id
- followee_id_chatbot
- follower_id
filter: {}
comment: ""
- role: moderator
permission:
columns:
- created_at
- followee_id
- followee_id_chatbot
- follower_id
filter: {}
comment: ""
- role: user
permission:
columns:
- followee_id
- followee_id_chatbot
- follower_id
filter:
_or:
- follower_id:
_eq: X-Hasura-User-Id
- followee_id:
_neq: X-Hasura-User-Id
comment: ""
update_permissions:
- role: moderator
permission:
columns:
- followee_id
- followee_id_chatbot
- follower_id
filter:
follower_id:
_eq: X-Hasura-User-Id
check: null
comment: ""
- role: user
permission:
columns:
- followee_id
- followee_id_chatbot
- follower_id
filter:
_and:
- follower_id:
_eq: X-Hasura-User-Id
- followee_id:
_neq: X-Hasura-User-Id
check: null
comment: ""
delete_permissions:
- role: moderator
permission:
filter:
follower_id:
_eq: X-Hasura-User-Id
comment: ""
- role: user
permission:
filter:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
table:
name: user
schema: public

array_relationships:
- name: chats
using:
Expand Down Expand Up @@ -30,27 +31,31 @@ array_relationships:
table:
name: preference
schema: public

- name: prompts
using:
foreign_key_constraint_on:
column: user_id
table:
name: prompt_user
schema: public

- name: referrals
using:
foreign_key_constraint_on:
column: referrer_id
table:
name: referral
schema: public

- name: referralsByUserId
using:
foreign_key_constraint_on:
column: user_id
table:
name: referral
schema: public

- name: threads
using:
foreign_key_constraint_on:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

42 changes: 41 additions & 1 deletion apps/masterbots.ai/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@
--tertiary: 288, 82%, 50%;
--tertiary-foreground: 0 0% 98%;
--font-size-base: 1rem;

--background-public-gradient: linear-gradient(180deg, rgba(115, 201, 97, 0.2) 0%, rgba(122, 214, 104, 0.4) 100%);
--background-public-hover-gradient: linear-gradient(-180deg, rgba(113, 199, 96, 0.1) 0%, rgba(117, 205, 99, 0.3) 100%);

/* Public route gradients */
--background-chat-gradient: linear-gradient(180deg, rgba(155, 22, 232, 0.2) 0%, rgba(190, 22, 232, 0.53) 100%);
--background-chat-hover-gradient: linear-gradient(-180deg, rgba(166, 22, 232, 0.1) 0%, rgba(190, 22, 232, 0.3) 100%);
}

.dark {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;
--foreground: 0 0% 100%;

--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 79%;
Expand Down Expand Up @@ -94,6 +101,13 @@

--tertiary: 120, 100%, 65%;
--tertiary-foreground: 0 0% 98%;

--background-public-gradient: linear-gradient(180deg, rgba(115, 201, 97, 0.2) 0%, rgba(122, 214, 104, 0.4) 100%);
--background-public-hover-gradient: linear-gradient(-180deg, rgba(113, 199, 96, 0.1) 0%, rgba(117, 205, 99, 0.3) 100%);

/* Public route gradients */
--background-chat-gradient: linear-gradient(180deg, rgba(155, 22, 232, 0.2) 0%, rgba(190, 22, 232, 0.53) 100%);
--background-chat-hover-gradient: linear-gradient(-180deg, rgba(166, 22, 232, 0.1) 0%, rgba(190, 22, 232, 0.3) 100%);
}
}

Expand Down Expand Up @@ -305,3 +319,29 @@
.lucide {
stroke-width: 1.25px;
}

/* Base sidebar gradient styles *//* Chat route styles */

.sidebar-gradient {
transition: background-image 0.3s ease;
}

/* Chat route styles */
[data-route="chat"] .sidebar-gradient:hover:not(.selected) {
background-image: var(--background-chat-hover-gradient);
}

[data-route="chat"] .sidebar-gradient.selected {
background-image: var(--background-chat-gradient);
}

/* Public route styles */
[data-route="public"] .sidebar-gradient:hover:not(.selected) {
background-image: var(--background-public-hover-gradient);
}

[data-route="public"] .sidebar-gradient.selected {
background-image: var(--background-public-gradient);
}


8 changes: 2 additions & 6 deletions apps/masterbots.ai/components/layout/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ export function Header() {
<div className="hidden lg:flex lg:items-center">
<IconSeparator className="size-6 text-muted-foreground/50" />
<HeaderLink href="/c" text="Chat" />
{appConfig.features.devMode && (
<>
<HeaderLink href="/c/p" text="Pro" />
<HeaderLink href="/wordware" text="Ww" />
</>
)}
<HeaderLink href="/" text="Public" />
{appConfig.features.devMode && <HeaderLink href="/c/p" text="Pro" />}
</div>
</div>
<div className="flex items-center space-x-4">
Expand Down
57 changes: 29 additions & 28 deletions apps/masterbots.ai/components/layout/sidebar/profile-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,18 @@ export function ProfileSidebar({ user }: ProfileSidebarProps) {
}
}, [])

const goToProfile = useCallback((e: React.MouseEvent) => {
e.preventDefault()
e.stopPropagation()
const userSlug = toSlugWithUnderScore(user.name || '')
if (userSlug) {
setIsOpen(false)
router.push(`/u/${userSlug}/t`)
}
}, [router, user.name])

const goToProfile = useCallback(
(e: React.MouseEvent) => {
e.preventDefault()
e.stopPropagation()
const userSlug = toSlugWithUnderScore(user.name || '')
if (userSlug) {
setIsOpen(false)
router.push(`/u/${userSlug}/t`)
}
},
[router, user.name]
)

return (
<Sheet open={isOpen} onOpenChange={setIsOpen}>
Expand Down Expand Up @@ -115,32 +117,31 @@ export function ProfileSidebar({ user }: ProfileSidebarProps) {
Chat
</Button>

{appConfig.features.devMode && (
<Button
variant="ghost"
className="justify-start w-full text-sm"
onClick={() => handleNavigation('/c/p')}
>
Pro
</Button>
)}

<Button
variant="ghost"
className="justify-start w-full text-sm"
onClick={() => handleNavigation('/')}
>
Browse
Public
</Button>

{appConfig.features.devMode && (
<Button
variant="ghost"
className="justify-start w-full text-sm"
onClick={() => handleNavigation('/wordware')}
>
Ww
</Button>
<>
<Button
variant="ghost"
className="justify-start w-full text-sm"
onClick={() => handleNavigation('/c/p')}
>
Pro
</Button>
<Button
variant="ghost"
className="justify-start w-full text-sm"
onClick={() => handleNavigation('/wordware')}
>
Ww
</Button>
</>
)}
</nav>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useSidebar } from '@/lib/hooks/use-sidebar'

export function SidebarCategoryGeneral({ page }: { page?: string }) {
const { filteredCategories, isFilterMode } = useSidebar()

if (!filteredCategories.length) return <div className="p-4 text-center">No matching categories found</div>
return (
<ul className="space-y-2">
Expand Down
4 changes: 2 additions & 2 deletions apps/masterbots.ai/components/layout/sidebar/sidebar-item.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import * as React from 'react'
import type * as React from 'react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { motion } from 'framer-motion'
Expand All @@ -12,7 +12,7 @@ import {
TooltipTrigger
} from '@/components/ui/tooltip'
import { useLocalStorage } from '@/lib/hooks/use-local-storage'
import { type Chat } from '@/types/types'
import type { Chat } from '@/types/types'
import { cn } from '@/lib/utils'

interface SidebarItemProps {
Expand Down
Loading