diff --git a/public/css/welcome.css b/public/css/welcome.css index c1051ccde..ed860bd1a 100644 --- a/public/css/welcome.css +++ b/public/css/welcome.css @@ -1,3 +1,7 @@ +#chat .mes[type="assistant_message"] .mes_button { + display: none; +} + .welcomePanel { display: flex; flex-direction: column; diff --git a/public/script.js b/public/script.js index 6f77e0f53..2f80c5d53 100644 --- a/public/script.js +++ b/public/script.js @@ -638,6 +638,7 @@ export const system_message_types = { MACROS: 'macros', WELCOME_PROMPT: 'welcome_prompt', ASSISTANT_NOTE: 'assistant_note', + ASSISTANT_MESSAGE: 'assistant_message', }; /** @@ -2298,6 +2299,7 @@ function getMessageFromTemplate({ timestamp, tokenCount, extra, + type, }) { const mes = messageTemplate.clone(); mes.attr({ @@ -2309,6 +2311,7 @@ function getMessageFromTemplate({ 'bookmark_link': bookmarkLink, 'force_avatar': !!forceAvatar, 'timestamp': timestamp, + ...(type ? { type } : {}), }); mes.find('.avatar img').attr('src', avatarImg); mes.find('.ch_name .name_text').text(characterName); @@ -2520,6 +2523,7 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll timestamp: timestamp, extra: mes.extra, tokenCount: mes.extra?.token_count ?? 0, + type: mes.extra?.type ?? '', ...formatGenerationTimer(mes.gen_started, mes.gen_finished, mes.extra?.token_count, mes.extra?.reasoning_duration, mes.extra?.time_to_first_token), }; diff --git a/public/scripts/welcome-screen.js b/public/scripts/welcome-screen.js index 99c2a4534..ee98bc2fb 100644 --- a/public/scripts/welcome-screen.js +++ b/public/scripts/welcome-screen.js @@ -71,7 +71,9 @@ function sendAssistantMessage() { mes: t`If you're connected to an API, try asking me something!` + '\n***\n' + t`**Hint:** Set any character as your welcome page assistant from their "More..." menu.`, is_system: false, is_user: false, - extra: {}, + extra: { + type: system_message_types.ASSISTANT_MESSAGE, + }, }; chat.push(message);