Commit Graph

324 Commits

Author SHA1 Message Date
Yidadaa
fcdf15b417 fix: #410 can not stop response 2023-04-06 03:19:33 +08:00
xiaotianxt
187867662e performance: introduce lazy-loading for ChatList
Reduce the first load JS bundle size using next/dynamic.
2023-04-06 02:41:27 +08:00
Yidadaa
f71841a8d7 feat: close #469 support reset session and do not send memory 2023-04-06 02:37:12 +08:00
Yidadaa
aeb818060e fix: #439 context prompt input with textarea 2023-04-06 02:05:44 +08:00
Yifei Zhang
208e7a7627 Merge pull request #482 from zyqq/main
fix(utils): 修复复制问题
2023-04-06 01:48:20 +08:00
xiaotianxt
57943cbe6c feat(dnd): add drag and drop feature 2023-04-06 01:43:10 +08:00
Yidadaa
ef4c04016a doc: update screenshots 2023-04-06 01:22:29 +08:00
Yidadaa
bc8670c058 doc: update document 2023-04-06 00:41:44 +08:00
Yifei Zhang
60a6c4cf09 Merge pull request #497 from waltcow/main
fix 头像无法正常显示
2023-04-05 22:07:17 +08:00
Yorun
7b5055e4a9 fix: header title overflow 2023-04-05 11:32:45 +00:00
waltcow
0f2221104e add getEmojiUrl as util function 2023-04-05 15:48:44 +08:00
waltcow
5d09891352 fix import 2023-04-05 15:31:46 +08:00
waltcow
7b821c336b emoji resouce CDN format override 2023-04-05 15:29:25 +08:00
Jun Wu
d3ef50c28f perf: memorize markdown rendering
Markdown rendering can take time. Use `React.memo` for better performance.

The improvement is especially visible if there are complex elements. For
example, a `<Chat />` with an output of `如何推导三次方程求根方程?` (which
uses latex) now renders in about 5ms, down from ~140ms.

Related: #302
2023-04-05 00:16:10 -07:00
Jun Wu
9ddb8df17e chore: removed redundant checkUsage
`checkUsage()` was already called by another `useEffect`.
There is no need to call it twice.
2023-04-04 22:41:33 -07:00
yiqiuzheng
95854e9cee fix(utils): 修复复制问题 2023-04-05 02:49:44 +08:00
Yifei Zhang
91f0dfabd4 Merge pull request #434 from gaogao1030/optimize
[opt]  Optimize the display of exported chat history content.
2023-04-05 02:08:38 +08:00
MaYuKe
3d41c79946 Update settings.tsx
Update parameter `step` of historyMessageCount to 1.
2023-04-04 23:32:19 +08:00
kakawanyifan
ead6bb36c1 linkTarget={'_blank'},这个对于对话框中的链接,会在新的tab页打开,体验更好。 2023-04-04 16:33:36 +08:00
kakawanyifan
151f2d2e7a 访问改成授权 2023-04-04 13:27:50 +08:00
Yifei Zhang
fdad4159e6 Merge pull request #435 from yorunning/fix-1
fix: add media query to theme-color, fix auto theme not updating theme-color
2023-04-04 11:16:34 +08:00
ガオガオ
562d6de0e4 [opt] Optimize the display of exported chat history content. 2023-04-04 05:55:06 +08:00
yidadaa
abfa64652f fix: #418 valid model config 2023-04-04 01:05:33 +08:00
Yorun
922f44edcc fix: add media query to theme-color, fix auto theme not updating theme-color 2023-04-03 16:24:59 +00:00
Feifan Zheng
d79c10f0c5 feat: optimize usage display 2023-04-03 12:18:04 +00:00
RugerMc
db7829f37e opt: back to auto scroll 2023-04-03 17:51:35 +08:00
cyhhao
bb0fd2a261 rm input mouseover 2023-04-03 15:21:03 +08:00
cyhhao
c73cde5c85 rm msg body mouseover 2023-04-03 15:20:16 +08:00
cyhhao
3c3a55cf33 fix conflict 2023-04-03 14:58:34 +08:00
cyhhao
8ff4820318 optimize: scrolling experience 2023-04-03 14:56:13 +08:00
Yifei Zhang
0ae0d83bf0 Merge pull request #401 from cyhhao/pr2
fix: context message should exclude all error tips
2023-04-03 14:26:32 +08:00
cyhhao
17cfea7f1f session message should exclude all error tips 2023-04-03 14:13:57 +08:00
Yifei Zhang
3ef8889c1e Merge pull request #377 from ilario92/main
Update: locales in Italian
2023-04-03 13:44:40 +08:00
Yidadaa
1b6f97e0db fix: #397 #373 Array.prototype.at polyfill errors 2023-04-03 13:29:37 +08:00
Yifei Zhang
35dd139d27 fix: improve scroll 2023-04-03 03:35:24 +00:00
Yifei Zhang
851e20841a fix: #384 improve scroll 2023-04-03 03:27:42 +00:00
Yifei Zhang
c66bec9f58 fix: #366 use fallback copy 2023-04-03 03:27:42 +00:00
Yifei Zhang
063a1c8dbf Update app.ts 2023-04-03 10:50:29 +08:00
Yifei Zhang
4b9599d70f revert: fix mobile scroll 2023-04-02 19:24:29 +00:00
Yifei Zhang
e26c42db25 chore: fix mobile scroll 2023-04-02 19:20:57 +00:00
Yifei Zhang
f24187510e fix: #289 #367 #353 #369 provide more error message info 2023-04-02 19:14:53 +00:00
Ilario Scandurra
8a8beb1c56 Merge branch 'Yidadaa:main' into main 2023-04-02 21:14:04 +02:00
Yifei Zhang
1e6fef87be chore: fix usage display 2023-04-02 18:55:08 +00:00
Yifei Zhang
0933610c3e chore: fix preview bubble 2023-04-02 18:51:37 +00:00
Yifei Zhang
a624981e7e fix: mobile scroll problem 2023-04-02 18:41:25 +00:00
ilarioscandurra
cd7202de09 Update: locales in Italian 2023-04-02 20:32:43 +02:00
Yifei Zhang
355a125b36 fixup: ux improve 2023-04-02 18:28:07 +00:00
Ilario Scandurra
bf6f0a1c37 Merge branch 'main' into main 2023-04-02 20:13:58 +02:00
Yifei Zhang
fb3f19f2f7 Merge pull request #378 from Yidadaa/prompt-edit
feat: add context prompt edit
2023-04-03 02:03:54 +08:00
Yifei Zhang
b456cd407f fixup: translation context 2023-04-02 18:02:03 +00:00
Yifei Zhang
f67e014952 feat: #138 add context prompt, close #330 #321 2023-04-02 17:48:43 +00:00
ilarioscandurra
f89becd51e Update: locales in Italian 2023-04-02 19:23:50 +02:00
Call White
00a9af8af7 translate SendPreviewBubble 2023-04-03 01:07:06 +08:00
Yifei Zhang
69417d9a25 fix: #253 #356 auto scroll ux 2023-04-02 15:19:36 +00:00
Yifei Zhang
0e8b90da0a refactor: split homt.tsx components 2023-04-02 15:05:54 +00:00
Yifei Zhang
1e93542b12 fix: #289 use highlight.js instead of prism 2023-04-02 14:48:18 +00:00
Yifei Zhang
3c7fd418d9 fix: #367 failed to fetch account usage 2023-04-02 14:22:06 +00:00
Yifei Zhang
f4d82c13ed fix: #244 optimize polyfill 2023-04-02 13:56:34 +00:00
Cesaryuan
44b7da5e5f Merge branch 'main' into patch-1 2023-04-02 21:39:03 +08:00
MapleUncle
a288a2b172 🐞 fix(locales): Fix the missing SendPreviewBubble in ES configuration 2023-04-02 20:38:14 +08:00
Cesaryuan
6d02da8cab fix: historyMessageCount 2023-04-02 20:23:56 +08:00
Yifei Zhang
1e85ea75b6 Merge pull request #271 from RugerMcCarthy/feat/send_preview_option
feat: add switch of send preview bubble
2023-04-02 20:08:35 +08:00
Cesaryuan
4df73fd1e5 fix: fix history message count
Bug: The length of `new Array(20).slice(20 - 24) ` is 4 which should be 24.
2023-04-02 19:43:11 +08:00
AprilNEA
6fa25cb8af Merge branch 'main' into reset
# Conflicts:
#	app/components/settings.tsx
2023-04-02 13:45:34 +08:00
AprilNEA
d9905c122d feat: clear session only 2023-04-02 13:42:47 +08:00
Yifei Zhang
7adc96e4cd Merge pull request #322 from quark-zju/wexin-compat
fix: 微信 Android 内置浏览器兼容性
2023-04-02 13:17:56 +08:00
Leedom
1f7c026fa0 Update calcTextareaHeight.js 2023-04-02 09:47:55 +08:00
Leedom
647002ab6b Update home.tsx 2023-04-02 02:56:45 +08:00
Leedom
c48c044b58 Update home.tsx 2023-04-02 02:54:46 +08:00
leedom
6b3a43779d feat: add calcTextareaHeight.js from element-ui 2023-04-02 02:42:00 +08:00
leedom
267271668c refactor: use the method of element-ui 2023-04-02 02:40:00 +08:00
Jun Wu
025bdee569 app: polyfill Array.at
This fixes compatibility issue with older browsers like WeChat webview.
The summary feature now works as expected.
2023-04-01 11:38:52 -07:00
linqirong
bb7647fd22 fix:修复中文输入法下enter错误发送消息问题 2023-04-02 00:12:31 +08:00
Jun Wu
7faeaede24 utils: simplify trimTopic
Also avoid using Array.prototype.at, which does not seem to exist
in the Wexin builtin webview (Android Wexin 8.0.30).
2023-04-01 03:37:28 -07:00
Jun Wu
0730f64ad4 api: set Content-Type to json
This avoids issues in browsers like WeChat where the encoding is
incorrect and the summary feature does not work if it contains
zh-CN characters.
2023-04-01 03:37:09 -07:00
Leedom
04a7902b32 Update home.tsx 2023-04-01 17:48:05 +08:00
leedom
c965311182 feat: add optimize textarea height when inputing 2023-04-01 17:34:38 +08:00
Yifei Zhang
36f0638fe6 fix: #305 disable double click to copy on pc 2023-04-01 15:46:34 +08:00
Yifei Zhang
e397b4bcf3 fix: remove scroll anchor height 2023-04-01 15:39:30 +08:00
leedom
238f77b43b feat: add confirm tips when deleting conversation on pc 2023-04-01 10:24:06 +08:00
Dogtiti
23a2686f6c Merge branch 'Yidadaa:main' into main 2023-03-31 19:21:46 +08:00
Dogtiti
4028408823 fix: 修复在手机浏览器高度样式问题 2023-03-31 19:21:11 +08:00
Yifei Zhang
560fa54ae3 fix: #277 no cache for credit query 2023-03-31 18:33:26 +08:00
RugerMc
495fbe6107 feat: add switch of send preview bubble 2023-03-31 13:16:12 +08:00
Daniel Gerardo Rondón García
9d160c144d Update: language options to "Language".
- Update Name option in language files to display 'Language' consistently
- Fix locale issues in 'tw' and 'cn' files that were mistakenly changed
2023-03-30 23:32:56 -05:00
Daniel Gerardo Rondón García
733345806b Update: locales in spanish 2023-03-30 19:48:57 -05:00
Yifei Zhang
11bdc92aac fix: commit id as version id 2023-03-30 18:15:49 +00:00
Yifei Zhang
aa5843869a Merge pull request #254 from Yidadaa/bugfix-0330
Bugfix 0330
2023-03-31 01:10:36 +08:00
Yifei Zhang
f59207ef41 fix: #182 prompt cannot be selected 2023-03-30 17:08:50 +00:00
Yifei Zhang
c6097df92e fix: auto scroll on enter 2023-03-30 17:04:32 +00:00
Yifei Zhang
36aa36ab35 Merge pull request #234 from GOWxx/feat_set_history_to_zero
feat: support history message count to zero
2023-03-31 00:56:57 +08:00
Yifei Zhang
830f64d819 feat: use tag as version number 2023-03-30 16:46:17 +00:00
Yifei Zhang
b163616733 fix: tight border on mobile style 2023-03-30 16:20:47 +00:00
Yifei Zhang
214fd3745f fix: #229 disable light code theme 2023-03-30 15:50:08 +00:00
Yifei Zhang
6af0464a71 fix: #244 better scroll ux 2023-03-30 15:42:54 +00:00
Yifei Zhang
c2f11049b3 fix: #185 input and select align center 2023-03-30 15:25:38 +00:00
Yifei Zhang
fc49b34f6a fix: crash caused by filter config 2023-03-30 15:20:19 +00:00
GOWxx
4313f6382f feat: support history message count to zero 2023-03-30 18:50:58 +08:00
Leotrinos
6c6616dbea fix trimTopic 2023-03-30 02:55:19 -07:00
Leedom
782ba12915 Update home.tsx 2023-03-30 15:32:03 +08:00
leedom
6e91a5f07b feat: setUserInput with onDoubleClickCapture in mobile phone 2023-03-30 15:22:10 +08:00
Yifei Zhang
8b09b7739c Merge pull request #202 from RugerMcCarthy/feat/display_line_break
feat: import remark-breaks plugin
2023-03-30 14:56:21 +08:00
RugerMc
c3ac2d0ad6 feat: import ramarkBreaks plugin 2023-03-30 12:48:38 +08:00
angular-moon
e0ec3eb72a onUserSubmit hide promptHints 2023-03-30 10:16:00 +08:00
Yifei Zhang
e20024dc83 Update home.tsx 2023-03-30 02:30:38 +08:00
Yifei Zhang
5b531a66df feat: close #2 add check account balance 2023-03-29 17:45:26 +00:00
Yifei Zhang
d036461af6 feat: #112 add edit chat title 2023-03-29 16:02:50 +00:00
Yifei Zhang
1c02d0164b feat: #170 auto scroll after retrying 2023-03-29 15:40:37 +00:00
Yifei Zhang
34899ddee4 refactor: #121 trigger auto-cmp with / prefix 2023-03-29 15:31:55 +00:00
Yifei Zhang
a3e7af6ed1 Merge pull request #162 from HimiCos/main
fix: dialog height
2023-03-29 22:12:05 +08:00
Yifei Zhang
1baeac50d9 Merge pull request #163 from GOWxx/bugfix_send_button_cover_text
fix: send button covering the text in the textarea
2023-03-29 22:11:34 +08:00
HimiCos
7757c8f00d fix: dialog height 2023-03-29 20:53:23 +08:00
GOWxx
ca4a4088cc fix: send button covering the text in the textarea 2023-03-29 20:37:21 +08:00
Yifei Zhang
f311a3b81f fix: #159 temperature should range 0 - 2 2023-03-29 20:00:23 +08:00
HimiCos
6a7e043eb7 chore: standardize input box punctuation 2023-03-29 19:31:34 +08:00
Yifei Zhang
3b67ea8f86 Merge pull request #148 from RugerMcCarthy/dev
supports the display of line breaks in Markdown
2023-03-29 18:05:52 +08:00
RugerMc
a2d3f6eab7 feat: display line break hints in enter mode 2023-03-29 17:53:52 +08:00
RugerMc
4e9de55b45 feat: supports the display of line breaks in Markdown 2023-03-29 17:19:30 +08:00
Yifei Zhang
934b1edf79 Update settings.tsx 2023-03-29 16:06:22 +08:00
Yifei Zhang
91a36c7365 Merge pull request #146 from iSource/fix-mobile-autofocus
fix: mobile textarea autofocus ui error
2023-03-29 16:00:21 +08:00
iSource
be9917f9dc fix: mobile textarea autofocus ui error 2023-03-29 15:45:31 +08:00
Yifei Zhang
a075c0dfb7 Merge pull request #89 from iFwu/main
feat: add font size config
2023-03-29 14:49:05 +08:00
Yifei Zhang
a6f3692b8c Merge pull request #127 from stonega/main
fix: message top action style issue
2023-03-29 14:48:20 +08:00
伏晓
5f3fcc5d7a feat: add font size setting 2023-03-29 13:15:32 +08:00
HimiCos
f8cd8a19ae Update app/locales/tw.ts 2023-03-29 12:27:32 +08:00
Yifei Zhang
efe7b0bfc7 Update home.tsx 2023-03-29 02:19:20 +08:00
Yifei Zhang
ae80d45732 feat: add lint-staged 2023-03-28 18:09:05 +00:00
Yifei Zhang
cff14d2383 fixup: i18n for prompts 2023-03-28 17:45:23 +00:00
Yifei Zhang
9ad1795e8d feat: #2 add prompt hints 2023-03-28 17:45:23 +00:00
Yifei Zhang
ae6af1d6a8 feat: #2 add prompt list 2023-03-28 17:45:23 +00:00
Yifei Zhang
b23bcef0be Merge pull request #109 from HimiCos/main
feat: language support traditional chinese
2023-03-28 23:00:16 +08:00
HimiCos
ca5359fb00 feat: language support traditional chinese 2023-03-28 21:29:30 +08:00
石门
f3a08a6f3d fix: minor fix 2023-03-28 20:14:44 +08:00
石门
845973d541 fix: minor fix 2023-03-28 19:38:18 +08:00
石门
cb887d5be0 fix: hide actions when loading 2023-03-28 18:59:03 +08:00
Yifei Zhang
d862fa6c69 Merge pull request #100 from iSource/fix-docker-access-code
fix: docker access code setting missing
2023-03-28 18:52:46 +08:00
石门
1d9584afda fix: hide actions when loading 2023-03-28 18:48:03 +08:00
iSource
53427aac03 fix: docker access code setting missing 2023-03-28 17:55:03 +08:00
Yifei Zhang
988111edb6 Merge pull request #76 from xiaotianxt/main
feat: CmdEnter config for submitkey, bug fix for auto scrolling
2023-03-28 13:35:36 +08:00
Yifei Zhang
746da1feb5 fix: light theme code highlight 2023-03-28 05:24:51 +00:00
xiaotianxt
ef334bc72c refactor: refocus textarea after btn clicked 2023-03-28 13:02:49 +08:00
xiaotianxt
de37e2052e fix: Enter key bug 2023-03-28 12:56:36 +08:00
xiaotianxt
a354243a8f fix(scroll): scroll after click submit button
The behavior of SubmitKey and SubmitButton should be the same
2023-03-28 12:56:36 +08:00
xiaotianxt
9b5bec0837 feat(SubmitKey): add MetaEnter option
Add another option for MacOS user who prefer Cmd+Enter
or Linux user who prefer Meta+Enter.
2023-03-28 12:56:36 +08:00
Yifei Zhang
99c8f77264 Merge pull request #81 from iSource/fix-code-copy-button
fix: code copy button position
2023-03-28 11:57:03 +08:00
AprilNEA
f7539e13b3 fix: fix #82, close sidebar after new session 2023-03-28 11:51:36 +08:00
iSource
1eb7bc3027 fix: code copy button position 2023-03-28 10:50:50 +08:00
Yifei Zhang
2266988e24 Merge pull request #68 from AprilNEA/main
fix(#65): fix unknown git commit id
2023-03-27 22:01:19 +08:00
Yifei Zhang
15cc8900d4 Merge pull request #66 from iFwu/main
fix: resolve hydration error
2023-03-27 21:59:19 +08:00
Yifei Zhang
9d5295c01a Delete userRole.tsx 2023-03-27 21:52:50 +08:00