UI: make text between quotes colored in chat mode

This commit is contained in:
oobabooga 2024-07-23 21:29:30 -07:00
parent 98ed6d3a66
commit e637b702ff
3 changed files with 39 additions and 1 deletions

View file

@ -488,7 +488,7 @@ def start_new_chat(state):
greeting = replace_character_names(state['greeting'], state['name1'], state['name2'])
if greeting != '':
history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', greeting]]
history['visible'] += [['', apply_extensions('output', greeting, state, is_chat=True)]]
history['visible'] += [['', apply_extensions('output', html.escape(greeting), state, is_chat=True)]]
unique_id = datetime.now().strftime('%Y%m%d-%H-%M-%S')
save_history(history, unique_id, state['character_menu'], state['mode'])