Skip to content

Commit 542eb9d

Browse files
committed
change togglePath method to default to left=true to keep the sidebar open
1 parent e2bd4cb commit 542eb9d

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

llms/ui/ctx.mjs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,16 @@ export class AppContext {
297297
console.log('toggleTop', name, toggle, this.layout.top, this.layout.top === name)
298298
return this.layout.top === name
299299
}
300-
togglePath(path, toggle) {
300+
togglePath(path, { left = true } = {}) {
301301
const currentPath = this.router.currentRoute.value?.path
302-
console.log('togglePath', path, currentPath, toggle)
302+
console.log('togglePath', path, currentPath, left)
303303
if (currentPath != path) {
304-
if (toggle === undefined) {
305-
toggle = true
306-
}
307304
this.router.push({ path })
308305
}
309-
this.toggleLayout('left', toggle)
310-
return toggle
306+
if (left !== undefined) {
307+
this.toggleLayout('left', left)
308+
}
309+
return left
311310
}
312311
setThreadHeaders(components) {
313312
Object.assign(this.threadHeaderComponents, components)

0 commit comments

Comments
 (0)