mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for prompt not showing up
Fix for sentence splitting eating new lines.
This commit is contained in:
@@ -1465,7 +1465,7 @@ class KoboldStoryRegister(object):
|
||||
action_text = self.__str__()
|
||||
action_text = "{}{}".format("" if self.story_settings is None else self.story_settings.prompt, action_text)
|
||||
###########action_text_split = [sentence, actions used in sentence, token length, included in AI context]################
|
||||
action_text_split = [[x+" ", [], 0, False] for x in re.split("(?<=[.!?])\s+", action_text)]
|
||||
action_text_split = [[x+" ", [], 0, False] for x in re.split("(?<=[.!?])[ \t]+", action_text)]
|
||||
#The last action shouldn't have the extra space from the sentence splitting, so let's remove it
|
||||
action_text_split[-1][0] = action_text_split[-1][0][:-1]
|
||||
|
||||
|
@@ -586,7 +586,7 @@ function var_changed(data) {
|
||||
|
||||
scroll_trigger_element = document.getElementById("Selected Text Chunk "+actions[0].id);
|
||||
//if we hit the top, unhide the prompt and clear the scroll trigger
|
||||
if (actions[actions.length-1].id == 0) {
|
||||
if (actions[0].id == 0) {
|
||||
document.getElementById("story_prompt").classList.remove("hidden");
|
||||
scroll_trigger_element = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user