@lobehub/chat 0.96.7 → 0.96.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/issue-auto-comments.yml +4 -3
- package/CHANGELOG.md +26 -0
- package/package.json +1 -2
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/IFrameRender/index.tsx +11 -2
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx +2 -2
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/postMessage.ts +1 -1
|
@@ -26,6 +26,7 @@ jobs:
|
|
|
26
26
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
|
|
27
27
|
issuesOpened: |
|
|
28
28
|
👀 @{{ author }}
|
|
29
|
+
|
|
29
30
|
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
|
|
30
31
|
Please make sure you have given us as much context as possible.\
|
|
31
32
|
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
|
|
@@ -35,7 +36,7 @@ jobs:
|
|
|
35
36
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
|
|
36
37
|
issuesClosed: |
|
|
37
38
|
✅ @{{ author }}
|
|
38
|
-
|
|
39
|
+
|
|
39
40
|
This issue is closed, If you have any questions, you can comment and reply.\
|
|
40
41
|
此问题已经关闭。如果您有任何问题,可以留言并回复。
|
|
41
42
|
- name: Auto Comment on Pull Request Opened
|
|
@@ -44,7 +45,7 @@ jobs:
|
|
|
44
45
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
|
|
45
46
|
pullRequestOpened: |
|
|
46
47
|
👍 @{{ author }}
|
|
47
|
-
|
|
48
|
+
|
|
48
49
|
Thank you for raising your pull request and contributing to our Community
|
|
49
50
|
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
|
|
50
51
|
If you encounter any problems, please feel free to connect with us.\
|
|
@@ -57,7 +58,7 @@ jobs:
|
|
|
57
58
|
token: ${{ secrets.GH_TOKEN }}
|
|
58
59
|
comment: |
|
|
59
60
|
❤️ Great PR @${{ github.event.pull_request.user.login }} ❤️
|
|
60
|
-
|
|
61
|
+
|
|
61
62
|
The growth of project is inseparable from user feedback and contribution, thanks for your contribution!\
|
|
62
63
|
项目的成长离不开用户反馈和贡献,感谢您的贡献!
|
|
63
64
|
emoji: 'hooray'
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.96.8](https://github.com/lobehub/lobe-chat/compare/v0.96.7...v0.96.8)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-10-31**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix a bug that weather plugin is not work correctly, template remove sharp deps.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix a bug that weather plugin is not work correctly ([dbb65ff](https://github.com/lobehub/lobe-chat/commit/dbb65ff))
|
|
21
|
+
- **misc**: Template remove sharp deps ([380723d](https://github.com/lobehub/lobe-chat/commit/380723d))
|
|
22
|
+
|
|
23
|
+
</details>
|
|
24
|
+
|
|
25
|
+
<div align="right">
|
|
26
|
+
|
|
27
|
+
[](#readme-top)
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
|
|
5
31
|
### [Version 0.96.7](https://github.com/lobehub/lobe-chat/compare/v0.96.6...v0.96.7)
|
|
6
32
|
|
|
7
33
|
<sup>Released on **2023-10-31**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.8",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -154,7 +154,6 @@
|
|
|
154
154
|
"prettier": "^3",
|
|
155
155
|
"remark-cli": "^11",
|
|
156
156
|
"semantic-release": "^21",
|
|
157
|
-
"sharp": "^0.32.6",
|
|
158
157
|
"stylelint": "^15",
|
|
159
158
|
"ts-node": "^10",
|
|
160
159
|
"typescript": "^5",
|
|
@@ -3,7 +3,8 @@ import { Skeleton } from 'antd';
|
|
|
3
3
|
import { memo, useRef, useState } from 'react';
|
|
4
4
|
|
|
5
5
|
import { useOnPluginReadyForInteraction } from '../../utils/iframeOnReady';
|
|
6
|
-
import {
|
|
6
|
+
import { useOnPluginFetchMessage } from '../../utils/listenToPlugin';
|
|
7
|
+
import { sendMessageContentToPlugin } from '../../utils/postMessage';
|
|
7
8
|
|
|
8
9
|
interface IFrameRenderProps extends PluginRenderProps {
|
|
9
10
|
height?: number;
|
|
@@ -20,7 +21,15 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, width = 800, height = 300,
|
|
|
20
21
|
const iframeWin = iframeRef.current?.contentWindow;
|
|
21
22
|
|
|
22
23
|
if (iframeWin) {
|
|
23
|
-
|
|
24
|
+
sendMessageContentToPlugin(iframeWin, props);
|
|
25
|
+
}
|
|
26
|
+
}, [props]);
|
|
27
|
+
|
|
28
|
+
// when get iframe fetch message ,send message content
|
|
29
|
+
useOnPluginFetchMessage(() => {
|
|
30
|
+
const iframeWin = iframeRef.current?.contentWindow;
|
|
31
|
+
if (iframeWin) {
|
|
32
|
+
sendMessageContentToPlugin(iframeWin, props);
|
|
24
33
|
}
|
|
25
34
|
}, [props]);
|
|
26
35
|
|
package/src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
useOnPluginFillContent,
|
|
17
17
|
} from '../utils/listenToPlugin';
|
|
18
18
|
import {
|
|
19
|
-
|
|
19
|
+
sendMessageContentToPlugin,
|
|
20
20
|
sendPayloadToPlugin,
|
|
21
21
|
sendPluginSettingsToPlugin,
|
|
22
22
|
sendPluginStateToPlugin,
|
|
@@ -58,7 +58,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, id, payload, width = 600, h
|
|
|
58
58
|
props.content = message.content || '';
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
sendMessageContentToPlugin(iframeWin, props);
|
|
62
62
|
}
|
|
63
63
|
}, []);
|
|
64
64
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginChannel } from '@lobehub/chat-plugin-sdk/client';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const sendMessageContentToPlugin = (window: Window, props: any) => {
|
|
4
4
|
window.postMessage({ props, type: PluginChannel.renderPlugin }, '*');
|
|
5
5
|
};
|
|
6
6
|
|