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

「WIP」feat: ProChat 2.0 重构升级 #144

Open
wants to merge 93 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
380f98c
init
chenshuai2144 Mar 23, 2024
2b62dfc
merge
chenshuai2144 Mar 23, 2024
804709a
merge
chenshuai2144 Mar 23, 2024
c34e597
merge
chenshuai2144 Mar 24, 2024
27de3b4
merge
chenshuai2144 Mar 24, 2024
e33ce7d
merge
chenshuai2144 Mar 24, 2024
e138cac
优化代码
chenshuai2144 Mar 25, 2024
5f19b97
:bug: fix: slove docs resolve not correct
ONLY-yours Mar 25, 2024
2d33ed9
:twisted_rightwards_arrows: fix: merge origin
ONLY-yours Mar 25, 2024
ce6c884
修复错误的信息
chenshuai2144 Mar 25, 2024
34eec44
修复错误的信息
chenshuai2144 Mar 25, 2024
20e7c11
修改头像的问题
chenshuai2144 Mar 25, 2024
438251a
修改头像的问题
chenshuai2144 Mar 25, 2024
3d36c39
修复数据异常
chenshuai2144 Mar 25, 2024
cc360f1
修复数据异常
chenshuai2144 Mar 25, 2024
10ef876
支持sse 和 request
chenshuai2144 Mar 26, 2024
585e70f
支持sse 和 request
chenshuai2144 Mar 26, 2024
8e2704c
支持sse 和 request
chenshuai2144 Mar 26, 2024
8107ac9
更好的render支持
chenshuai2144 Mar 26, 2024
f04191a
2.0.1
chenshuai2144 Mar 26, 2024
7d9bd90
更好的render支持
chenshuai2144 Mar 26, 2024
54cbdf3
2.0.2
chenshuai2144 Mar 26, 2024
06a47b7
:bug: fix: slove some error problem
ONLY-yours Mar 27, 2024
ee52e3c
:sparkles: feat: change request to sendMessageRequest
ONLY-yours Mar 27, 2024
05f314f
:sparkles: feat: update markdown showcase
ONLY-yours Mar 27, 2024
e491c47
:sparkles: feat: add markdown render
ONLY-yours Mar 27, 2024
9a3d76c
:sparkles: feat: add controlled mode
Apr 1, 2024
ef89e8f
:bug: fix: userMeta & assistantMeta api fixed
Apr 2, 2024
1751e9b
:twisted_rightwards_arrows: feat: merge main
Apr 2, 2024
8e3144b
:bug: fix: delete useless docs
Apr 2, 2024
1381e38
fix: fix sendMessage data is old error
chenshuai2144 Apr 7, 2024
fc2744d
docs: updata snapshot
chenshuai2144 Apr 7, 2024
2359587
修复demo的列表
chenshuai2144 Apr 7, 2024
082d791
2.0.3
chenshuai2144 Apr 7, 2024
5ccd768
修复demo的列表
chenshuai2144 Apr 7, 2024
b029718
fix: 不把 helloMessage 加入到数据中
chenshuai2144 Apr 7, 2024
75c3044
2.0.4
chenshuai2144 Apr 7, 2024
3067c9e
demo: update demos
chenshuai2144 Apr 7, 2024
56d516c
demo: update demos
chenshuai2144 Apr 7, 2024
55bb22a
feat: support genMessageRecord
chenshuai2144 Apr 7, 2024
19bb6c6
fix: fix message no 100% error
chenshuai2144 Apr 8, 2024
21e43eb
feat: support genMessageRecord
chenshuai2144 Apr 7, 2024
71e5c93
2.0.5
chenshuai2144 Apr 7, 2024
790d87f
2.0.6
chenshuai2144 Apr 8, 2024
fd41c68
:sparkles: feat: scrollToBottom button get
ONLY-yours Apr 9, 2024
2ccd2df
fix: remove container error
chenshuai2144 Apr 10, 2024
9bbb24c
chore: update snapshot
chenshuai2144 Apr 11, 2024
78f8c41
fix: fix chatlist auto render error
chenshuai2144 Apr 13, 2024
e4f7787
2.0.7
chenshuai2144 Apr 13, 2024
d2956e8
fix: fix chatlist auto render error
chenshuai2144 Apr 13, 2024
b258f96
2.0.8
chenshuai2144 Apr 13, 2024
7eee0e3
2.0.9
chenshuai2144 Apr 13, 2024
4a2e6f8
增加一点动画
chenshuai2144 Apr 15, 2024
09564f6
优化动画效果
chenshuai2144 Apr 15, 2024
e5aac79
支持一个字一个字的键入
chenshuai2144 Apr 15, 2024
8a75649
修改 uuid 的生成逻辑
chenshuai2144 Apr 16, 2024
2d0fcf2
v2.1.0
chenshuai2144 Apr 16, 2024
761d17e
add more transition
chenshuai2144 Apr 16, 2024
35119a7
快速记录
chenshuai2144 Apr 14, 2024
4e30595
2.0.11
chenshuai2144 Apr 15, 2024
46651f8
rebuild
chenshuai2144 Apr 16, 2024
099b598
fix: fix style no work error
chenshuai2144 Apr 17, 2024
a8e1397
fix: fix style no work error
chenshuai2144 Apr 17, 2024
a55cc89
优化逻辑设置
chenshuai2144 Apr 17, 2024
85ed21d
2.1.1
chenshuai2144 Apr 17, 2024
de34769
fix: use border,remove Divider
chenshuai2144 Apr 21, 2024
0443422
2.1.2
chenshuai2144 Apr 21, 2024
0c29380
chore:fix ts error
chenshuai2144 Apr 25, 2024
9cf67f1
feat: support styles.chatListSendButtonStyle
chenshuai2144 Apr 25, 2024
94b22ce
2.1.3
chenshuai2144 Apr 25, 2024
f4e6345
feat: support beforeChatListDom
chenshuai2144 Apr 25, 2024
caf17c0
2.1.4
chenshuai2144 Apr 25, 2024
56dc575
支持更多的 style
chenshuai2144 May 31, 2024
d8789d7
2.1.5
chenshuai2144 May 31, 2024
332fa0d
fix: support sendAreaStyle
chenshuai2144 May 31, 2024
fccf394
减少 memo 次数
chenshuai2144 Jun 1, 2024
335dfba
2.1.6
chenshuai2144 Jun 1, 2024
496c886
2.1.7
chenshuai2144 Jun 1, 2024
67bfbaf
export BubblesLoading
chenshuai2144 Jun 1, 2024
def7c4c
2.1.8
chenshuai2144 Jun 1, 2024
0860cbd
feat: default render table
chenshuai2144 Jun 11, 2024
66b0a04
2.1.9
chenshuai2144 Jun 11, 2024
5096c75
feat: send message support ChatMessage
chenshuai2144 Jun 11, 2024
2b62ed2
2.1.10
chenshuai2144 Jun 11, 2024
d746405
生成优化信息
chenshuai2144 Jun 11, 2024
d333ab8
2.1.11
chenshuai2144 Jun 11, 2024
36039dc
修复chatitem 宽度百分百的问题
chenshuai2144 Jun 20, 2024
d06bc18
2.1.12
chenshuai2144 Jun 20, 2024
b82b494
fix: 优化 loading 的体验
chenshuai2144 Jun 21, 2024
2dc51ca
2.1.13
chenshuai2144 Jun 21, 2024
84ffbe1
删除最大宽度限制
chenshuai2144 Jun 21, 2024
7371eb3
2.1.14
chenshuai2144 Jun 21, 2024
edc0f74
feat: add chatListRightItemContentStyle and chatListLeftItemContentS…
chenshuai2144 Jun 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export default defineConfig({
footer: 'Made with ❤️ by 蚂蚁集团 - AFX & 数字科技',
logo: 'https://mdn.alipayobjects.com/huamei_re70wt/afts/img/A*Mo27Sr3kS4kAAAAAAAAAAAAADmuEAQ/original',
},
mfsu: false,
title: '@ant-design/pro-chat',
resolve: {
docDirs: ['docs'],
atomDirs: [{ type: 'component', dir: 'src/components' }],
},
outputPath: 'docs-dist',
html2sketch: {},
extraBabelPlugins: ['antd-style'],
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ $ pnpm install antd // peerDependencies

```js
const nextConfig = {
transpilePackages: [
'@ant-design/pro-chat',
'@ant-design/pro-editor',
'react-intersection-observer',
],
transpilePackages: ['@ant-design/pro-chat', 'react-intersection-observer'],
};
```

Expand Down
6 changes: 1 addition & 5 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ $ pnpm install antd // peerDependencies

```js
const nextConfig = {
transpilePackages: [
'@ant-design/pro-chat',
'@ant-design/pro-editor',
'react-intersection-observer',
],
transpilePackages: ['@ant-design/pro-chat', 'react-intersection-observer'],
};
```

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ describe('ProChat', () => {
it('input area render worked', () => {
const wrapper = render(
<ProChat
renderInputArea={() => {
return <div>RenderInputArea</div>;
inputAreaRender={() => {
return <div>inputAreaRender</div>;
}}
/>,
);
expect(wrapper.getByText('RenderInputArea')).toBeInTheDocument();
expect(wrapper.getByText('inputAreaRender')).toBeInTheDocument();
});

it('i18n worked', () => {
Expand Down
36 changes: 0 additions & 36 deletions demos/chatgpt-nextjs/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions demos/chatgpt-nextjs/next-env.d.ts

This file was deleted.

10 changes: 0 additions & 10 deletions demos/chatgpt-nextjs/next.config.js

This file was deleted.

30 changes: 0 additions & 30 deletions demos/chatgpt-nextjs/package.json

This file was deleted.

27 changes: 0 additions & 27 deletions demos/chatgpt-nextjs/src/app/api/openai/route.ts

This file was deleted.

35 changes: 0 additions & 35 deletions demos/chatgpt-nextjs/src/app/chatgpt/index.tsx

This file was deleted.

107 changes: 0 additions & 107 deletions demos/chatgpt-nextjs/src/app/globals.css

This file was deleted.

18 changes: 0 additions & 18 deletions demos/chatgpt-nextjs/src/app/layout.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions demos/chatgpt-nextjs/src/app/page.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions demos/chatgpt-nextjs/tsconfig.json

This file was deleted.