Hide buttons on welcome assistant message

7a23fe794e436498dc115f4f7e5f2594bccf6c02

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +11 -1Ignore whitespace
public/css/welcome.css+4 -0
@@ -1,3 +1,7 @@
1+#chat .mes[type="assistant_message"] .mes_button {
2+ display: none;
3+}
4+
15.welcomePanel {
26 display: flex;
37 flex-direction: column;
public/script.js+4 -0
@@ -638,6 +638,7 @@ export const system_message_types = {
638638 MACROS: 'macros',
639639 WELCOME_PROMPT: 'welcome_prompt',
640640 ASSISTANT_NOTE: 'assistant_note',
641+ ASSISTANT_MESSAGE: 'assistant_message',
641642};
642643
643644/**
@@ -2298,6 +2299,7 @@ function getMessageFromTemplate({
22982299 timestamp,
22992300 tokenCount,
23002301 extra,
2302+ type,
23012303}) {
23022304 const mes = messageTemplate.clone();
23032305 mes.attr({
@@ -2309,6 +2311,7 @@ function getMessageFromTemplate({
23092311 'bookmark_link': bookmarkLink,
23102312 'force_avatar': !!forceAvatar,
23112313 'timestamp': timestamp,
2314+ ...(type ? { type } : {}),
23122315 });
23132316 mes.find('.avatar img').attr('src', avatarImg);
23142317 mes.find('.ch_name .name_text').text(characterName);
@@ -2520,6 +2523,7 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll
25202523 timestamp: timestamp,
25212524 extra: mes.extra,
25222525 tokenCount: mes.extra?.token_count ?? 0,
2526+ type: mes.extra?.type ?? '',
25232527 ...formatGenerationTimer(mes.gen_started, mes.gen_finished, mes.extra?.token_count, mes.extra?.reasoning_duration, mes.extra?.time_to_first_token),
25242528 };
25252529
public/scripts/welcome-screen.js+3 -1
@@ -71,7 +71,9 @@ function sendAssistantMessage() {
7171 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.`,
7272 is_system: false,
7373 is_user: false,
7474 extra: {},
75+ type: system_message_types.ASSISTANT_MESSAGE,
76+ },
7577 };
7678
7779 chat.push(message);