Spaces:
MasterDee
/
Paused

nsarrazin Mishig victor HF Staff MichaelFried commited on
Commit
992a8de
·
unverified ·
1 Parent(s): 13489e8

Assistants feature (#639)

Browse files

* First push on assistants

* push fixes

* fix add assistant

* Sign up works

* lint

* mobile layout fixes

* design fixes

* Merge branch 'main' into feature/assistants

* fix copy button

* add error feedback

* hide duplicate feature

* remove wrong comments

* add autoredirect if assistant is missing

* latest changes:
- add edit feature
- hash assistant avatar
- get rid of ugly line
- check for non existent avatar
- make a better looking upload icon

* Update src/routes/conversation/+server.ts

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* reused type more cleanly

* fix type in shared conversation

* fixed feature

* fix: share conv with an assistant

* delete assistant avatars in db when deleting avatar

* affordance on avatar upload

* improve assistant conv start on mobile

* settings modal fly in

* better mobile intro

* mobile padding

* link affordance

* Make assistants disabled by default, but enabled in huggingchat

* lint

* Fix bottom model name

* ui tweaks

* Initial work on chat thumbnails

* fix build

* Get rid of deps

* Update src/routes/settings/assistants/[assistantId]/avatar/+server.ts

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* add comment to app_base

* Use event modifiers

* Use CSS uppercase instead everywhere

* Update src/lib/components/NavMenu.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/routes/+layout.server.ts

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Clearer error message for avatar size check

* one less op on flag check

* revert back preventDefault change in LoginModal

* Update src/routes/settings/+layout.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/routes/+layout.server.ts

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/routes/+layout.server.ts

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Added app logo in corner of thumbnail and clamped description length

* improved thumbnails

* Remove warnings

* Reuse Assisntants settings component (#678)

* Update Assisntants settings

* format

* [Assistants] Use textToImage task for avatar generation (#662)

* Generate assistants avatar using stablediffusion

* wording

* Update +page.server.ts

Co-authored-by: Michael Fried <mikelfried@gmail.com>

* Add timeout & controls to avatar generation

* Add controls for avatar generation in .env

* Update src/routes/+layout.server.ts

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/lib/components/AssistantSettings.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Fix avatar gen feature flag

* Can only upload avatar if generate is unchecked

---------

Co-authored-by: Michael Fried <mikelfried@gmail.com>
Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* layout

* small fixes

* hint

* Show feature if login is not required

* lint

* Only show creator name if it's defined

* tweaks

* thumbnail update

* thumbnail font-size

* Always display model at the bottom

* Bottom links now go to settings

* fix lint

* silent release

* fix bg on share link

* [Assistant] Delete avatar button instead of reset (#725)

* Add rate-limited image generating endpoint

* Add generate avatar button

* add little padding for firefox focus ring

* format

* fix upload image bug

* Fix uploads, replace reset by delete

* left-align buttons

* rm avatar generation feature

* final changes to delete feature

* sys prompt min height

* padding

* Add object-cover everywhere

---------

Co-authored-by: Victor Mustar <victor.mustar@gmail.com>

---------

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>
Co-authored-by: Victor Mustar <victor.mustar@gmail.com>
Co-authored-by: Michael Fried <mikelfried@gmail.com>

This view is limited to 50 files because it contains too many changes.   See raw diff
53 files changed +1942 -96
Files changed (50)
.env+4-1
.env.template+2-1
.vscode/settings.json+1-1
package-lock.json+370
package.json+3
src/lib/components/AssistantSettings.svelteAdded+277
src/lib/components/DisclaimerModal.svelte+1-2
src/lib/components/LoginModal.svelte-1
src/lib/components/NavConversationItem.svelte+22-4
src/lib/components/NavMenu.svelte+2-7
src/lib/components/chat/AssistantIntroduction.svelteAdded+85
src/lib/components/chat/ChatMessages.svelte+33-2
src/lib/components/chat/ChatWindow.svelte+16-15
src/lib/server/database.ts+8
src/lib/stores/settings.ts+4
src/lib/types/Assistant.tsAdded+15
src/lib/types/ConvSidebar.tsAdded+8
src/lib/types/Conversation.ts+2
src/lib/types/Report.tsAdded+10
src/lib/types/Settings.ts+5
src/lib/types/SharedConversation.ts+2
src/lib/utils/timeout.tsAdded+6
src/routes/+layout.server.ts+67-29
src/routes/+layout.svelte+19-8
src/routes/+page.svelte+20-1
src/routes/assistant/[assistantId]/+page.server.tsAdded+20
src/routes/assistant/[assistantId]/+page.svelteAdded+112
src/routes/assistant/[assistantId]/thumbnail.png/+server.tsAdded+64
src/routes/assistant/[assistantId]/thumbnail.png/ChatThumbnail.svelteAdded+41
src/routes/conversation/+server.ts+14-3
src/routes/conversation/[id]/+page.server.ts+10
src/routes/conversation/[id]/share/+server.ts+1
src/routes/settings/+layout.server.tsAdded+31
src/routes/settings/+layout.svelte+65-18
src/routes/settings/+server.ts+1-2
src/routes/settings/[...model]/+page.svelte+1-1
src/routes/settings/assistants/[assistantId]/+page.server.tsAdded+115
src/routes/settings/assistants/[assistantId]/+page.svelteAdded+156
src/routes/settings/assistants/[assistantId]/+page.tsAdded+14
src/routes/settings/assistants/[assistantId]/avatar/+server.tsAdded+46
src/routes/settings/assistants/[assistantId]/edit/+page.server.tsAdded+136
src/routes/settings/assistants/[assistantId]/edit/+page.svelteAdded+12
src/routes/settings/assistants/new/+page.server.tsAdded+112
src/routes/settings/assistants/new/+page.svelteAdded+9
static/fonts/Inter-Black.ttfAdded
Binary file (317 kB). View file
static/fonts/Inter-Bold.ttfAdded
Binary file (317 kB). View file
static/fonts/Inter-ExtraBold.ttfAdded
Binary file (317 kB). View file
static/fonts/Inter-ExtraLight.ttfAdded
Binary file (311 kB). View file
static/fonts/Inter-Light.ttfAdded
Binary file (311 kB). View file
static/fonts/Inter-Medium.ttfAdded
Binary file (315 kB). View file