feat(editor): Retrieve previous chat message on arrow-up (#8696)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -125,6 +125,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
executionWaitingForWebhook: false,
|
||||
nodeMetadata: {},
|
||||
isInDebugMode: false,
|
||||
chatMessages: [],
|
||||
}),
|
||||
getters: {
|
||||
// Workflow getters
|
||||
@@ -277,6 +278,9 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
getTotalFinishedExecutionsCount(): number {
|
||||
return this.finishedExecutionsCount;
|
||||
},
|
||||
getPastChatMessages(): string[] {
|
||||
return Array.from(new Set(this.chatMessages));
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
getPinDataSize(pinData: Record<string, string | INodeExecutionData[]> = {}): number {
|
||||
@@ -1436,5 +1440,13 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
resetChatMessages(): void {
|
||||
this.chatMessages = [];
|
||||
},
|
||||
|
||||
appendChatMessage(message: string): void {
|
||||
this.chatMessages.push(message);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user