Skip to content

Commit

Permalink
Add warning for fresh session
Browse files Browse the repository at this point in the history
  • Loading branch information
aiql-admin authored Jul 14, 2024
1 parent 677d68d commit 0e9a621
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,12 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
},
actions: {
init() {
this.conversation = [],
snackbarStore.showSuccessMessage("Added new session.")
if (this.conversation.length === 0) {
snackbarStore.showWarningMessage("Already in a fresh session.")
} else {
this.conversation = [];
snackbarStore.showSuccessMessage("Added new session.")
}
},
handleKeydown(e) {
if (e.key === "Enter" && (e.altKey || e.shiftKey || e.ctrlKey)) {
Expand Down

0 comments on commit 0e9a621

Please sign in to comment.