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
1.welcomePanel {5.welcomePanel {
2 display: flex;6 display: flex;
3 flex-direction: column;7 flex-direction: column;
public/script.js+4 -0
@@ -638,6 +638,7 @@ export const system_message_types = {
638 MACROS: 'macros',638 MACROS: 'macros',
639 WELCOME_PROMPT: 'welcome_prompt',639 WELCOME_PROMPT: 'welcome_prompt',
640 ASSISTANT_NOTE: 'assistant_note',640 ASSISTANT_NOTE: 'assistant_note',
641 ASSISTANT_MESSAGE: 'assistant_message',
641};642};
642643
643/**644/**
@@ -2298,6 +2299,7 @@ function getMessageFromTemplate({
2298 timestamp,2299 timestamp,
2299 tokenCount,2300 tokenCount,
2300 extra,2301 extra,
2302 type,
2301}) {2303}) {
2302 const mes = messageTemplate.clone();2304 const mes = messageTemplate.clone();
2303 mes.attr({2305 mes.attr({
@@ -2309,6 +2311,7 @@ function getMessageFromTemplate({
2309 'bookmark_link': bookmarkLink,2311 'bookmark_link': bookmarkLink,
2310 'force_avatar': !!forceAvatar,2312 'force_avatar': !!forceAvatar,
2311 'timestamp': timestamp,2313 'timestamp': timestamp,
2314 ...(type ? { type } : {}),
2312 });2315 });
2313 mes.find('.avatar img').attr('src', avatarImg);2316 mes.find('.avatar img').attr('src', avatarImg);
2314 mes.find('.ch_name .name_text').text(characterName);2317 mes.find('.ch_name .name_text').text(characterName);
@@ -2520,6 +2523,7 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll
2520 timestamp: timestamp,2523 timestamp: timestamp,
2521 extra: mes.extra,2524 extra: mes.extra,
2522 tokenCount: mes.extra?.token_count ?? 0,2525 tokenCount: mes.extra?.token_count ?? 0,
2526 type: mes.extra?.type ?? '',
2523 ...formatGenerationTimer(mes.gen_started, mes.gen_finished, mes.extra?.token_count, mes.extra?.reasoning_duration, mes.extra?.time_to_first_token),2527 ...formatGenerationTimer(mes.gen_started, mes.gen_finished, mes.extra?.token_count, mes.extra?.reasoning_duration, mes.extra?.time_to_first_token),
2524 };2528 };
25252529
public/scripts/welcome-screen.js+3 -1
@@ -71,7 +71,9 @@ function sendAssistantMessage() {
71 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.`,71 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.`,
72 is_system: false,72 is_system: false,
73 is_user: false,73 is_user: false,
74 extra: {},74 extra: {
75 type: system_message_types.ASSISTANT_MESSAGE,
76 },
75 };77 };
7678
77 chat.push(message);79 chat.push(message);