Skip to content

Commit

Permalink
1.4.4 - major updates to message streaming functionality and a new ad…
Browse files Browse the repository at this point in the history
…dMessage method
  • Loading branch information
OvidijusParsiunas committed Nov 25, 2023
1 parent 6f441c0 commit 80f4124
Show file tree
Hide file tree
Showing 19 changed files with 13,101 additions and 12,009 deletions.
24,784 changes: 12,909 additions & 11,875 deletions component/custom-elements.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions component/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deep-chat",
"version": "1.4.3",
"version": "1.4.4",
"description": "Customizable chat component for AI APIs",
"main": "./dist/deepChat.js",
"module": "./dist/deepChat.js",
Expand Down
8 changes: 4 additions & 4 deletions component/src/views/chat/messages/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export class Messages extends MessagesBase {
deepChat.clearMessages = this.clearMessages.bind(this, serviceIO);
deepChat.refreshMessages = this.refreshTextMessages.bind(this);
deepChat.scrollToBottom = ElementUtils.scrollToBottom.bind(this, this.elementRef);
deepChat.addMessage = (content: MessageContent, isUpdate = true) => {
this.addNewMessage({...content, sendUpdate: isUpdate}, !isUpdate);
deepChat.addMessage = (content: MessageContent, isUpdate?: boolean) => {
this.addNewMessage({...content, sendUpdate: !!isUpdate}, !isUpdate);
};
serviceIO.addMessage = this.addIOMessage.bind(this);
if (demo) this.prepareDemo(demo);
Expand Down Expand Up @@ -132,8 +132,8 @@ export class Messages extends MessagesBase {
this.updateStateOnMessage(message, data.overwrite, data.sendUpdate, isInitial);
}

private updateStateOnMessage(messageContent: MessageContentI, isOverwrite?: boolean, update = true, initial = false) {
if (!isOverwrite) this.messages.push(messageContent);
private updateStateOnMessage(messageContent: MessageContentI, overwrite?: boolean, update = true, initial = false) {
if (!overwrite) this.messages.push(messageContent);
if (update) this.sendClientUpdate(messageContent, initial);
}

Expand Down
30 changes: 15 additions & 15 deletions example-servers/nextjs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example-servers/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"dependencies": {
"axios": "^1.4.0",
"deep-chat-react": "^1.4.3",
"deep-chat-react": "^1.4.4",
"eventsource-parser": "^1.0.0",
"next": "13.4.9",
"react": "^18.2.0",
Expand Down
14 changes: 7 additions & 7 deletions example-servers/sveltekit/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example-servers/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"type": "module",
"dependencies": {
"deep-chat": "^1.4.3",
"deep-chat": "^1.4.4",
"eventsource-parser": "^1.0.0"
}
}
30 changes: 15 additions & 15 deletions example-servers/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example-servers/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@types/node": "^16.18.38",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"deep-chat-react": "^1.4.3",
"deep-chat-react": "^1.4.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
Expand Down
18 changes: 9 additions & 9 deletions other-packages/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions other-packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deep-chat-react",
"version": "1.4.3",
"version": "1.4.4",
"description": "Customizable chat component for AI APIs",
"main": "./dist/deepChat.js",
"module": "./dist/deepChat.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"license": "MIT",
"dependencies": {
"@lit-labs/react": "^1.1.1",
"deep-chat": "1.4.3"
"deep-chat": "1.4.4"
},
"devDependencies": {
"@types/react": "^18.0.28",
Expand Down
Loading

0 comments on commit 80f4124

Please sign in to comment.