mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
better type name, simplified context
This commit is contained in:
@ -3739,9 +3739,9 @@ async function sendMessage(prompt, image, generationType, additionalNegativePref
|
||||
};
|
||||
context.chat.push(message);
|
||||
const messageId = context.chat.length - 1;
|
||||
await eventSource.emit(event_types.MESSAGE_RECEIVED, messageId, 'stable-diffusion');
|
||||
await eventSource.emit(event_types.MESSAGE_RECEIVED, messageId, 'extension');
|
||||
context.addOneMessage(message);
|
||||
await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, messageId, 'stable-diffusion');
|
||||
await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, messageId, 'extension');
|
||||
await context.saveChat();
|
||||
}
|
||||
|
||||
|
@ -246,9 +246,9 @@ export async function getGroupChat(groupId, reload = false) {
|
||||
}
|
||||
|
||||
chat.push(mes);
|
||||
await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1), 'group_first_message');
|
||||
await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1), 'first_message');
|
||||
addOneMessage(mes);
|
||||
await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, (chat.length - 1), 'group_first_message');
|
||||
await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, (chat.length - 1), 'first_message');
|
||||
}
|
||||
}
|
||||
await saveGroupChat(groupId, false);
|
||||
|
@ -149,9 +149,7 @@ export function getContext() {
|
||||
unregisterFunctionTool: ToolManager.unregisterFunctionTool.bind(ToolManager),
|
||||
isToolCallingSupported: ToolManager.isToolCallingSupported.bind(ToolManager),
|
||||
canPerformToolCalls: ToolManager.canPerformToolCalls.bind(ToolManager),
|
||||
registerFunctionToolsOpenAI: ToolManager.registerFunctionToolsOpenAI.bind(ToolManager),
|
||||
invokeFunctionTools: ToolManager.invokeFunctionTools.bind(ToolManager),
|
||||
saveFunctionToolInvocations: ToolManager.saveFunctionToolInvocations.bind(ToolManager),
|
||||
ToolManager,
|
||||
registerDebugFunction,
|
||||
/** @deprecated Use renderExtensionTemplateAsync instead. */
|
||||
renderExtensionTemplate,
|
||||
|
Reference in New Issue
Block a user