feat: add validation
Also revoked potentially problematic feature(add hypav2data chunk) TODO: 1. On mid-context editing, currently that is not considered as deletion. Do have optional editedChatIndex to latter dive in more. 2. re-roll mainChunks(re-summarization) functionalities added, but not able to access it.
This commit is contained in:
@@ -291,16 +291,10 @@
|
||||
<TextAreaInput bind:value={chunk.text} />
|
||||
{/each}
|
||||
|
||||
<Button onclick={() => {
|
||||
DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].hypaV2Data.chunks.push({
|
||||
text: '',
|
||||
targetId: 'all'
|
||||
})
|
||||
DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].hypaV2Data.chunks = DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].hypaV2Data.chunks
|
||||
}}>+</Button>
|
||||
<!-- Adding non-bound chunk is not okay, change the user flow to edit existing ones. -->
|
||||
</div>
|
||||
{:else}
|
||||
{#each DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].hypaV2Data.chunks as chunk, i}
|
||||
{#each DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].hypaV2Data.mainChunks as chunk, i} // Summarized -> mainChunks
|
||||
<div class="flex flex-col p-2 rounded-md border-darkborderc border">
|
||||
{#if i === 0}
|
||||
<span class="text-green-500">Active</span>
|
||||
|
||||
Reference in New Issue
Block a user