mirror of
https://github.com/cosmicoptima/loom.git
synced 2026-07-22 07:40:25 +00:00
add prepend sequence setting and scroll active tree node into view
This commit is contained in:
parent
beafcdd3b0
commit
a5c4ea653b
1 changed files with 7 additions and 0 deletions
7
views.ts
7
views.ts
|
|
@ -146,6 +146,12 @@ export class LoomView extends ItemView {
|
|||
this.renderTree(this.tree, state);
|
||||
|
||||
this.containerEl.scrollTop = scroll;
|
||||
|
||||
// scroll to active node in the tree
|
||||
const activeNode = this.tree.querySelector(".is-active");
|
||||
if (activeNode){ //&& !container.contains(activeNode)){
|
||||
activeNode.scrollIntoView({ block: "nearest" });
|
||||
}
|
||||
}
|
||||
|
||||
renderNavButtons(settings: LoomSettings) {
|
||||
|
|
@ -327,6 +333,7 @@ export class LoomView extends ItemView {
|
|||
setting("Top p", "topP", String(settings.topP), "float");
|
||||
setting("Frequency penalty", "frequencyPenalty", String(settings.frequencyPenalty), "float");
|
||||
setting("Presence penalty", "presencePenalty", String(settings.presencePenalty), "float");
|
||||
setting("Prepend sequence", "prepend", settings.prepend, "string");
|
||||
}
|
||||
|
||||
renderBookmarks(container: HTMLElement, state: NoteState) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue