clean up buttons

This commit is contained in:
Webifi 2023-06-02 04:35:39 -05:00
parent 28764ba9b3
commit 59897ffe1e
5 changed files with 19 additions and 12 deletions

View File

@ -190,6 +190,11 @@
return cname return cname
} }
const setDirty = () => {
chatSettings.isDirty = true
}
</script> </script>
@ -237,10 +242,9 @@
</div> </div>
</header> </header>
<section class="modal-card-body"> <section class="modal-card-body">
<!-- Below are the settings that OpenAI allows to be changed for the API calls. See the <a href="https://platform.openai.com/docs/api-reference/chat/create">OpenAI API docs</a> for more details.</p> -->
{#key showSettingsModal} {#key showSettingsModal}
{#each settingsList as setting} {#each settingsList as setting}
<ChatSettingField on:refresh={refreshSettings} chat={chat} chatDefaults={chatDefaults} chatSettings={chatSettings} setting={setting} /> <ChatSettingField on:refresh={refreshSettings} on:change={setDirty} chat={chat} chatDefaults={chatDefaults} chatSettings={chatSettings} setting={setting} />
{/each} {/each}
{/key} {/key}
</section> </section>

View File

@ -228,7 +228,7 @@
<a <a
href={'#'} href={'#'}
title="Jump to summary" title="Jump to summary"
class="msg-summary-button button is-small is-info" class="msg-summary button is-small"
on:click|preventDefault={() => { on:click|preventDefault={() => {
scrollToMessage(message.summarized) scrollToMessage(message.summarized)
}} }}
@ -240,7 +240,7 @@
<a <a
href={'#'} href={'#'}
title="Jump to summarized" title="Jump to summarized"
class="msg-summarized-button button is-small is-info" class="msg-summarized button is-small"
on:click|preventDefault={() => { on:click|preventDefault={() => {
scrollToMessage(message.summary) scrollToMessage(message.summary)
}} }}
@ -252,7 +252,7 @@
<a <a
href={'#'} href={'#'}
title="Delete this message" title="Delete this message"
class=" msg-delete-button button is-small is-warning" class=" msg-delete button is-small"
on:click|preventDefault={() => { on:click|preventDefault={() => {
checkDelete() checkDelete()
}} }}
@ -267,8 +267,8 @@
{#if !message.summarized} {#if !message.summarized}
<a <a
href={'#'} href={'#'}
title="Truncate all and submit" title="Truncate from here and submit"
class=" msg-delete-button button is-small is-danger" class=" msg-truncate button is-small"
on:click|preventDefault={() => { on:click|preventDefault={() => {
checkTruncate() checkTruncate()
}} }}
@ -284,7 +284,7 @@
<a <a
href={'#'} href={'#'}
title={(message.suppress ? 'Uns' : 'S') + 'uppress message from submission'} title={(message.suppress ? 'Uns' : 'S') + 'uppress message from submission'}
class=" msg-delete-button button is-small is-info" class=" msg-supress button is-small"
on:click|preventDefault={() => { on:click|preventDefault={() => {
setSuppress(!message.suppress) setSuppress(!message.suppress)
}} }}

View File

@ -62,7 +62,7 @@ const gptDefaults = {
presence_penalty: 0, presence_penalty: 0,
frequency_penalty: 0, frequency_penalty: 0,
logit_bias: null, logit_bias: null,
user: undefined user: undefined,
} }
// Core set of defaults // Core set of defaults
@ -81,12 +81,14 @@ const defaults:ChatSettings = {
useSystemPrompt: false, useSystemPrompt: false,
systemPrompt: '', systemPrompt: '',
autoStartSession: false, autoStartSession: false,
trainingPrompts: [] trainingPrompts: [],
isDirty: false,
} }
const excludeFromProfile = { const excludeFromProfile = {
messages: true, messages: true,
user: true user: true,
isDirty: true,
} }
const profileSetting: ChatSetting & SettingSelect = { const profileSetting: ChatSetting & SettingSelect = {

View File

@ -12,7 +12,7 @@
export let checkStateChange = writable(0) // Trigger for Chat export let checkStateChange = writable(0) // Trigger for Chat
export let showSetChatSettings = writable(false) // export let showSetChatSettings = writable(false) //
export let submitExitingPromptsNow = writable(false) // for them to go now. Will not submit anything in the input export let submitExitingPromptsNow = writable(false) // for them to go now. Will not submit anything in the input
export let pinMainMenu = writable(false) // for them to go now. Will not submit anything in the input export let pinMainMenu = writable(false) // Show menu (for mobile use)
const chatDefaults = getChatDefaults() const chatDefaults = getChatDefaults()

View File

@ -59,6 +59,7 @@
systemPrompt: string; systemPrompt: string;
autoStartSession: boolean; autoStartSession: boolean;
trainingPrompts?: Message[]; trainingPrompts?: Message[];
isDirty?: boolean;
} & Request; } & Request;
export type Chat = { export type Chat = {