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

New Chat UI and Revision system #17

Open
wants to merge 98 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
0228dd4
Add chat page and message input
codewithcheese Jul 4, 2024
d4e6e37
Message input autoresize
codewithcheese Jul 5, 2024
b2fd527
WIP chat messages
codewithcheese Jul 5, 2024
2ec1962
Chat messages
codewithcheese Jul 5, 2024
9443baa
Tweak overflow
codewithcheese Jul 5, 2024
3d9ed37
Reload ChatPage using key
codewithcheese Jul 5, 2024
949967d
Use last user message as revise prompt
codewithcheese Jul 6, 2024
54d630d
Revise support in useChat
codewithcheese Jul 7, 2024
b8d220e
Refactor useChat into ChatService
codewithcheese Jul 7, 2024
e76d56f
Use MessageCard in ChatPage
codewithcheese Jul 7, 2024
6b870ba
Remove useChat, replace with ChatService
codewithcheese Jul 7, 2024
d237a0b
Update ResponseCard
codewithcheese Jul 7, 2024
7d1097f
Move Revise Run button
codewithcheese Jul 7, 2024
cd0bd30
Add previous messages to revise
codewithcheese Jul 7, 2024
0bf358b
Move chat title to component
codewithcheese Jul 7, 2024
23bf74f
Revise submit edit
codewithcheese Jul 7, 2024
c7064cf
Rename
codewithcheese Jul 7, 2024
a1cd612
Create revision and message tables with migration
codewithcheese Jul 7, 2024
6017e35
Replace usage of Response and ResponseMessage with Revision and Revis…
codewithcheese Jul 8, 2024
cd21320
Drop Response and ResponseMessage migration
codewithcheese Jul 8, 2024
310f437
Change ChatService editing to use a mode type
codewithcheese Jul 10, 2024
ab807e1
Create revision on new revise message
codewithcheese Jul 10, 2024
4a35c23
Type-safe route path builder
codewithcheese Jul 10, 2024
41f9091
Add test for revision data functions
codewithcheese Jul 11, 2024
e15c945
Add attachment model
codewithcheese Jul 11, 2024
94f56a6
Remove component requirement from ChatService tests
codewithcheese Jul 12, 2024
ab00928
Add reload test
codewithcheese Jul 12, 2024
f5b7b81
Add attachment handling to ChatService
codewithcheese Jul 13, 2024
c8a4dee
Display attachments in ChatPage
codewithcheese Jul 13, 2024
221aced
Add attributes to document model
codewithcheese Jul 13, 2024
e59f1b3
Fix MessageAttachment usage
codewithcheese Jul 14, 2024
6584f18
Add RobotLoader
codewithcheese Jul 14, 2024
d2a3ffe
Add loader to revise
codewithcheese Jul 14, 2024
641a443
Exit auto scrolling when user scrolls up
codewithcheese Jul 14, 2024
e26ebf9
Add bottom border on ChatTitle
codewithcheese Jul 14, 2024
c8c358d
Order recents in menu by createdAt
codewithcheese Jul 14, 2024
7ab86c0
Adjust padding
codewithcheese Jul 14, 2024
a00c19c
Refactor and improve auto scrolling
codewithcheese Jul 14, 2024
53d7156
Provide request body during ChatService submit
codewithcheese Jul 15, 2024
a4d87d0
Remove unused body state
codewithcheese Jul 15, 2024
30b8962
Add lexical editor for revise
codewithcheese Jul 15, 2024
14ce2fb
Make MessageEditor namespace unique
codewithcheese Jul 15, 2024
68f8ef7
Add MessageEditor placeholder
codewithcheese Jul 15, 2024
827f2d7
Remove EditorCard, remove codemirror
codewithcheese Jul 15, 2024
9a1cc47
Make Revise response editable
codewithcheese Jul 15, 2024
c91a60f
Change do not create revision until a message has been submitted.
codewithcheese Jul 15, 2024
561f1b3
Add to conversation button
codewithcheese Jul 15, 2024
90be9c4
Fix revise response only use editor once streaming has finished
codewithcheese Jul 16, 2024
50a07d4
Drop unique index of document name
codewithcheese Jul 16, 2024
b9bc353
Flex wrap attachments
codewithcheese Jul 16, 2024
e530397
Fix revise autoscroll
codewithcheese Jul 16, 2024
ca293c3
Tweak padding
codewithcheese Jul 16, 2024
cf238be
Fix component prop types
codewithcheese Jul 16, 2024
0902eef
Revise message roles and controls
codewithcheese Jul 16, 2024
653deae
Remove attachment in revise view
codewithcheese Jul 16, 2024
292e4a2
Do not navigate to new revision is first
codewithcheese Jul 16, 2024
f0220a6
Support delete message pairs in revise view
codewithcheese Jul 16, 2024
a0a146f
ChatService cache unsaved changes to local storage
codewithcheese Jul 16, 2024
4e63508
Fix Revise remove index
codewithcheese Jul 17, 2024
c188577
No remove option for first user message
codewithcheese Jul 17, 2024
9b7542f
Computer unsaved state comparing current state with initial state
codewithcheese Jul 17, 2024
2abfe02
Remove message button only remove one message
codewithcheese Jul 18, 2024
9c9e4cf
Add message button before first message with warning
codewithcheese Jul 18, 2024
2d0e3f8
Add message button before first message with warning if not user
codewithcheese Jul 18, 2024
21e3f49
Use Melt tooltip for MessageDivider more ergonomic than shandcn tooltip
codewithcheese Jul 19, 2024
28fe86d
Refactor ChatService for simple append and revise handling
codewithcheese Jul 29, 2024
dea90aa
Use editor event to update content instead of bind
codewithcheese Jul 30, 2024
60111ec
Replace last response when submitting in revise mode
codewithcheese Jul 30, 2024
2a7b3e0
Explicitly signal to ChatService that changes were saved.
codewithcheese Jul 30, 2024
cfab4e7
Separate ChatService onFinished into onAppend onRevision
codewithcheese Jul 30, 2024
419f847
Get latest revision version if no version specified
codewithcheese Jul 30, 2024
8944d9a
Fix tests
codewithcheese Jul 30, 2024
f358204
Update ChatService tests
codewithcheese Jul 30, 2024
1737d20
Change message role drop down menu
codewithcheese Jul 30, 2024
9d1d284
Add response trash button
codewithcheese Jul 30, 2024
806c5ce
Add margin between message and attachments
codewithcheese Jul 30, 2024
43735c5
For revise response toggle between editor and markdown
codewithcheese Aug 1, 2024
cf5fa40
Make the response buttons visible on scroll using sticky
codewithcheese Aug 1, 2024
f143de4
Add markdown view toggle for all revise messages
codewithcheese Aug 1, 2024
a65b639
Fix delete dialog close logic
codewithcheese Aug 1, 2024
f13e2fd
Stop generation button in chat and revise
codewithcheese Aug 1, 2024
d23473a
Fix onSubmit return promise used by test to wait for response
codewithcheese Aug 1, 2024
a2ff761
Revise response default in view mode
codewithcheese Aug 1, 2024
05685d5
Rename service to aiAccount, model to aiModel, add aiService, add aiSdk.
codewithcheese Aug 2, 2024
ea224cf
Add AI account settings form
codewithcheese Aug 3, 2024
f7c7e9b
Add account and update form
codewithcheese Aug 4, 2024
dc9c202
Add form components
codewithcheese Aug 4, 2024
02ba551
Add AI account list and delete. Add cohere.
codewithcheese Aug 4, 2024
1020139
Add AI account list and delete. Add cohere.
codewithcheese Aug 4, 2024
7c2f2ee
Rename AI accounts to keys and remove ai suffix from related tables
codewithcheese Aug 4, 2024
65001b0
WIP model list
codewithcheese Aug 4, 2024
998199d
Fix model visibility toggles and refresh
codewithcheese Aug 5, 2024
4f00b2c
Remove model dialog, update tests to use keys related models
codewithcheese Aug 5, 2024
362b3a9
Update models/chat support for all initial services
codewithcheese Aug 5, 2024
1d2ac99
Add support for pasting images
codewithcheese Aug 6, 2024
e7fc31d
Add nvidia aiService
codewithcheese Aug 8, 2024
a006327
Wip attachment service
codewithcheese Aug 11, 2024
4377984
Use Pglite instead of Sqlite (#18)
codewithcheese Aug 13, 2024
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
25 changes: 11 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,28 @@
"@sveltejs/adapter-cloudflare": "^4.4.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tailwindcss/typography": "^0.5.13",
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/svelte": "^5.2.0",
"@types/better-sqlite3": "^7.6.11",
"@types/lodash": "^4.17.1",
"@vitest/browser": "^1.6.0",
"@vitest/ui": "^1.6.0",
"autoprefixer": "^10.4.19",
"better-sqlite3": "^10.0.0",
"drizzle-kit": "^0.21.2",
"jsdom": "^24.0.0",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.5.14",
"svelte": "^5.0.0-next.1",
"svelte": "^5.0.0-next.201",
"svelte-check": "^3.6.0",
"tailwindcss": "^3.4.3",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"vitest": "^1.6.0",
"wrangler": "^3.53.1"
},
"type": "module",
Expand All @@ -49,39 +54,31 @@
"@ai-sdk/mistral": "^0.0.9",
"@ai-sdk/openai": "^0.0.10",
"@ai-sdk/ui-utils": "^0.0.9",
"@codemirror/autocomplete": "^6.16.0",
"@codemirror/lang-markdown": "^6.2.5",
"@codemirror/language-data": "^6.5.0",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.26.3",
"@fontsource-variable/inter": "^5.0.18",
"@tailwindcss/typography": "^0.5.13",
"@types/lodash": "^4.17.1",
"@vitest/browser": "^1.6.0",
"@lexical/history": "^0.16.0",
"@lexical/plain-text": "^0.16.0",
"@lexical/text": "^0.16.0",
"@lexical/utils": "^0.16.0",
"ai": "^3.1.12",
"bits-ui": "^0.21.7",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"dotenv": "^16.4.5",
"drizzle-kit": "^0.21.2",
"drizzle-orm": "^0.30.10",
"filepond": "^4.31.1",
"highlight.js": "^11.7.0",
"kysely": "^0.27.3",
"lexical": "^0.16.1",
"lodash": "^4.17.21",
"lucide-svelte": "^0.378.0",
"marked": "^12.0.1",
"marked-katex-extension": "^5.0.1",
"msw": "^2.3.1",
"nanoid": "^5.0.7",
"sqlocal": "^0.9.0",
"svelte-codemirror-editor": "^1.3.0",
"svelte-filepond": "^0.2.2",
"svelte-french-toast": "^1.2.0",
"tailwind-merge": "^2.3.0",
"tailwind-variants": "^0.2.1",
"vitest": "^1.6.0",
"webdriverio": "^8.36.1",
"zod": "^3.23.6"
}
}
Loading
Loading