better type name, simplified context
| @@ -3739,9 +3739,9 @@ async function sendMessage(prompt, image, generationType, additionalNegativePref | ||
| 3739 | 3739 | }; |
| 3740 | 3740 | context.chat.push(message); |
| 3741 | 3741 | const messageId = context.chat.length - 1; |
| 3742 | 3742 | await eventSource.emit(event_types.MESSAGE_RECEIVED, messageId, 'stable-diffusionextension'); |
| 3743 | 3743 | context.addOneMessage(message); |
| 3744 | 3744 | await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, messageId, 'stable-diffusionextension'); |
| 3745 | 3745 | await context.saveChat(); |
| 3746 | 3746 | } |
| 3747 | 3747 | |
| @@ -246,9 +246,9 @@ export async function getGroupChat(groupId, reload = false) { | ||
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | chat.push(mes); |
| 249 | 249 | await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1), 'group_first_messagefirst_message'); |
| 250 | 250 | addOneMessage(mes); |
| 251 | 251 | await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, (chat.length - 1), 'group_first_messagefirst_message'); |
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | await saveGroupChat(groupId, false); |
| @@ -149,9 +149,7 @@ export function getContext() { | ||
| 149 | 149 | unregisterFunctionTool: ToolManager.unregisterFunctionTool.bind(ToolManager), |
| 150 | 150 | isToolCallingSupported: ToolManager.isToolCallingSupported.bind(ToolManager), |
| 151 | 151 | canPerformToolCalls: ToolManager.canPerformToolCalls.bind(ToolManager), |
| 152 | - registerFunctionToolsOpenAI: ToolManager.registerFunctionToolsOpenAI.bind(ToolManager), | |
| 152 | + ToolManager, | |
| 153 | - invokeFunctionTools: ToolManager.invokeFunctionTools.bind(ToolManager), | |
| 154 | - saveFunctionToolInvocations: ToolManager.saveFunctionToolInvocations.bind(ToolManager), | |
| 155 | 153 | registerDebugFunction, |
| 156 | 154 | /** @deprecated Use renderExtensionTemplateAsync instead. */ |
| 157 | 155 | renderExtensionTemplate, |