forked from Shinonome/dots-hyprland
sidebar: improve apis autoscrolling
This commit is contained in:
@@ -10,6 +10,7 @@ import { SystemMessage, ChatMessage } from "./ai_chatmessage.js";
|
||||
import { ConfigToggle, ConfigSegmentedSelection, ConfigGap } from '../../.commonwidgets/configwidgets.js';
|
||||
import { markdownTest } from '../../.miscutils/md2pango.js';
|
||||
import { MarginRevealer } from '../../.widgethacks/advancedrevealers.js';
|
||||
import { chatEntry } from '../apiwidgets.js';
|
||||
|
||||
const MODEL_NAME = `Gemini`;
|
||||
|
||||
@@ -257,6 +258,7 @@ export const geminiView = Box({
|
||||
// Always scroll to bottom with new content
|
||||
const adjustment = scrolledWindow.get_vadjustment();
|
||||
adjustment.connect("changed", () => {
|
||||
if(!chatEntry.hasFocus) return;
|
||||
adjustment.set_value(adjustment.get_upper() - adjustment.get_page_size());
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user