mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 14:25:19 +00:00
enh: focus on current message
This commit is contained in:
parent
e6b6f42139
commit
be44af4680
1 changed files with 9 additions and 3 deletions
|
|
@ -34,6 +34,10 @@
|
||||||
drawFlow();
|
drawFlow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: if (history?.currentId) {
|
||||||
|
fitView({ nodes: [{ id: history.currentId }] });
|
||||||
|
}
|
||||||
|
|
||||||
const drawFlow = async () => {
|
const drawFlow = async () => {
|
||||||
const nodeList = [];
|
const nodeList = [];
|
||||||
const edgeList = [];
|
const edgeList = [];
|
||||||
|
|
@ -116,19 +120,21 @@
|
||||||
nodesInitialized.subscribe(async (initialized) => {
|
nodesInitialized.subscribe(async (initialized) => {
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
await tick();
|
await tick();
|
||||||
const res = await fitView();
|
const res = await fitView({ nodes: [{ id: history.currentId }] });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
width.subscribe((value) => {
|
width.subscribe((value) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
fitView();
|
// fitView();
|
||||||
|
fitView({ nodes: [{ id: history.currentId }] });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
height.subscribe((value) => {
|
height.subscribe((value) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
fitView();
|
// fitView();
|
||||||
|
fitView({ nodes: [{ id: history.currentId }] });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue