Skip to content

Commit 0e9a621

Browse files
author
aiql-admin
authored
Add warning for fresh session
1 parent 677d68d commit 0e9a621

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,12 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
821821
},
822822
actions: {
823823
init() {
824-
this.conversation = [],
825-
snackbarStore.showSuccessMessage("Added new session.")
824+
if (this.conversation.length === 0) {
825+
snackbarStore.showWarningMessage("Already in a fresh session.")
826+
} else {
827+
this.conversation = [];
828+
snackbarStore.showSuccessMessage("Added new session.")
829+
}
826830
},
827831
handleKeydown(e) {
828832
if (e.key === "Enter" && (e.altKey || e.shiftKey || e.ctrlKey)) {

0 commit comments

Comments
 (0)