mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 09:15:50 +00:00
Update ui-bindings.js
This commit is contained in:
@@ -732,14 +732,8 @@ function addMessage(role, content) {
|
||||
.replace(/<tool_code(?:\s+[^>]*)?>[\s\S]*?<\/tool_code>/gi, '')
|
||||
.trim();
|
||||
|
||||
const tools = [
|
||||
'read_world_info', 'read_world_entry', 'write_world_info_entry', 'create_world_book',
|
||||
'read_character_card', 'update_character_card', 'edit_character_text',
|
||||
'edit_world_info_entry',
|
||||
'manage_first_message', 'use_tool'
|
||||
];
|
||||
|
||||
const regex = new RegExp(`<(${tools.join('|')})(?:\\s+[^>]*)?>[\\s\\S]*?<\\/\\1>`, 'gi');
|
||||
const toolNames = Object.keys(tools);
|
||||
const regex = new RegExp(`<(${toolNames.join('|')})(?:\\s+[^>]*)?>[\\s\\S]*?<\\/\\1>`, 'gi');
|
||||
displayContent = displayContent.replace(regex, '').trim();
|
||||
|
||||
if (!displayContent && role === 'executor') {
|
||||
|
||||
Reference in New Issue
Block a user