Refactor Chat (#1108)

* modify chat table & migrate

* refactor layout

* update layout

* actions for chats & agents

* refactor chat form

* refactor chat form

* update chat form

* rename

* refactor types & locales

* refactor tts engine

* refactor

* fix config

* refactor chat form

* refactor chat member form

* fixing

* refactor ask agent

* chat in conversation

* fix chat message update

* may update chat member

* update chat member from message

* refacto group propmt

* chat member gpt settings

* update ui

* more config for chat

* add locales

* update chat agent form

* add locales for agent form

* update UI

* auto reply for text input

* update chat

* update chat input

* rename colomns

* update chat

* udpate agent message

* add chat member

* add/remove chat member

* fix chat member

* refactor

* auto update chat name

* fix chat update

* refactor chat column

* fix chat

* add agent loading

* use fresh new prompt when ask agent

* add chat forwarder

* refactor chat

* fix

* add copilot

* toggle copilot

* add copilot chat

* avoid open the same chat at the same time

* update copilot header

* add agent introduction in the first place of chat

* rename column

* update style

* refactor

* invoke all agents in group after asking

* chat sidebar collopse

* may select chat in copilot

* update ui

* new chat from agent

* upgrade deps

* refactor chat & chatAgent

* add limit for chat member create

* update chat form

* update db & migration

* fix up

* fix group chat

* fix panel warning

* display chat agent type

* tts message

* fit tts agent

* refactor

* chat fowarder

* update UI

* setup default values for tts agent

* fix chat member add/remove

* edit tts agent

* display chat date

* Fix UI

* add system message

* refactor

* fix hook

* refactor

* touch chat&agent when new message created

* fix auto reply

* migrate conversation to chat

* add migrate api

* fix migrate

* update migrate

* refactor

* refactor

* refactor

* fix delete agent

* add hotkey for copilot

* fix bugs

* upgrade deps

* refactor tts hook

* stop auto playback when azure transcribed

* refactor

* clean up

* fix UI

* fix conversation migrate

* handle error

* update model

* declare types

* audo backup db file when started

* fix db backup

* refactor db migration

* fix UI

* refactor

* fix chat auto update name

* fix authorization lost when hot reload

* refactor

* refactor

* fix tts form

* keep agent avatar up to date

* clean code
This commit is contained in:
an-lee
2024-10-09 16:57:32 +08:00
committed by GitHub
parent 245a1ea461
commit d96c9ff773
96 changed files with 8387 additions and 4889 deletions

View File

@@ -50,76 +50,76 @@
"@types/fluent-ffmpeg": "^2.1.26",
"@types/html-to-text": "^9.0.4",
"@types/intl-tel-input": "^18.1.4",
"@types/lodash": "^4.17.9",
"@types/lodash": "^4.17.10",
"@types/mark.js": "^8.11.12",
"@types/mustache": "^4.2.5",
"@types/node": "^22.6.1",
"@types/node": "^22.7.4",
"@types/prop-types": "^15.7.13",
"@types/rails__actioncable": "^6.1.11",
"@types/react": "^18.3.8",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@types/semver": "^7.5.8",
"@types/unzipper": "^0.10.10",
"@types/validator": "^13.12.2",
"@types/wavesurfer.js": "^6.0.12",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"@vitejs/plugin-react": "^4.3.1",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"@typescript-eslint/parser": "^8.8.0",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"electron": "^32.1.2",
"electron-devtools-installer": "^3.2.0",
"electron-playwright-helpers": "^1.7.1",
"eslint": "^9.11.1",
"eslint": "^9.12.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-import": "^2.31.0",
"flora-colossus": "^2.0.0",
"octokit": "^4.0.2",
"progress": "^2.0.3",
"prop-types": "^15.8.1",
"tailwind-merge": "^2.5.2",
"tailwind-merge": "^2.5.3",
"tailwind-scrollbar": "^3.1.0",
"tailwindcss": "^3.4.13",
"tailwindcss-animate": "^1.0.7",
"ts-node": "^10.9.2",
"tslib": "^2.7.0",
"typescript": "^5.6.2",
"vite": "^5.4.7",
"vite": "^5.4.8",
"vite-plugin-static-copy": "^1.0.6",
"zx": "^8.1.8"
"zx": "^8.1.9"
},
"dependencies": {
"@andrkrn/ffprobe-static": "^5.2.0",
"@divisey/js-mdict": "^5.0.0",
"@electron-forge/publisher-s3": "^7.5.0",
"@hookform/resolvers": "^3.9.0",
"@langchain/community": "^0.3.2",
"@langchain/core": "^0.3.3",
"@langchain/community": "^0.3.4",
"@langchain/core": "^0.3.7",
"@langchain/ollama": "^0.1.0",
"@mozilla/readability": "^0.5.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-accordion": "^1.2.1",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-aspect-ratio": "^1.1.0",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-collapsible": "^1.1.0",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-hover-card": "^1.1.2",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-menubar": "^1.1.1",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-menubar": "^1.1.2",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-select": "^2.1.1",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-scroll-area": "^1.2.0",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slider": "^1.2.0",
"@radix-ui/react-slider": "^1.2.1",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@radix-ui/react-tooltip": "^1.1.3",
"@rails/actioncable": "7.2.100",
"@ricky0123/vad-react": "^0.0.24",
"@ricky0123/vad-web": "^0.0.18",
@@ -137,7 +137,7 @@
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
"command-exists": "^1.2.9",
"compromise": "^14.14.0",
"compromise": "^14.14.1",
"compromise-paragraphs": "^0.1.0",
"compromise-stats": "^0.1.0",
"dayjs": "^1.11.13",
@@ -153,23 +153,23 @@
"fs-extra": "^11.2.0",
"html-to-text": "^9.0.5",
"https-proxy-agent": "^7.0.5",
"i18next": "^23.15.1",
"intl-tel-input": "^24.5.0",
"i18next": "^23.15.2",
"intl-tel-input": "^24.6.0",
"js-md5": "^0.8.3",
"langchain": "^0.3.2",
"lodash": "^4.17.21",
"lru-cache": "^11.0.1",
"lucide-react": "^0.445.0",
"lucide-react": "^0.447.0",
"mark.js": "^8.11.1",
"microsoft-cognitiveservices-speech-sdk": "^1.40.0",
"mustache": "^4.2.0",
"next-themes": "^0.3.0",
"openai": "^4.63.0",
"openai": "^4.67.1",
"pitchfinder": "^2.3.2",
"postcss": "^8.4.47",
"proxy-agent": "^6.4.0",
"react": "^18.3.1",
"react-activity-calendar": "^2.5.2",
"react-activity-calendar": "^2.6.2",
"react-audio-visualize": "^1.2.0",
"react-audio-voice-recorder": "^2.2.0",
"react-dom": "^18.3.1",
@@ -178,14 +178,14 @@
"react-hotkeys-hook": "^4.5.1",
"react-i18next": "^15.0.2",
"react-markdown": "^9.0.1",
"react-resizable-panels": "^2.1.3",
"react-resizable-panels": "^2.1.4",
"react-router-dom": "^6.26.2",
"react-shadow-root": "^6.2.0",
"react-tooltip": "^5.28.0",
"reflect-metadata": "^0.2.2",
"rimraf": "^6.0.1",
"semver": "^7.6.3",
"sequelize": "^6.37.3",
"sequelize": "^6.37.4",
"sequelize-typescript": "^2.1.6",
"sonner": "^1.5.0",
"sqlite3": "^5.1.7",