enh: Actions __webui__ flag support

This commit is contained in:
Timothy J. Baek
2024-08-15 17:28:43 +02:00
parent dc6ca61548
commit 8c2ba7f7ea
5 changed files with 99 additions and 10 deletions

View File

@@ -430,7 +430,7 @@
}
};
const chatActionHandler = async (chatId, actionId, modelId, responseMessageId) => {
const chatActionHandler = async (chatId, actionId, modelId, responseMessageId, event = null) => {
const res = await chatAction(localStorage.token, actionId, {
model: modelId,
messages: messages.map((m) => ({
@@ -440,6 +440,7 @@
info: m.info ? m.info : undefined,
timestamp: m.timestamp
})),
...(event ? { event: event } : {}),
chat_id: chatId,
session_id: $socket?.id,
id: responseMessageId