refactor: Update useScrollAnchor to handle user scrolling and overflow

This commit is contained in:
n4ze3m
2024-06-25 21:13:45 +05:30
parent 1e9b66d823
commit 5ac03f5123
2 changed files with 108 additions and 75 deletions

View File

@@ -38,4 +38,18 @@ export const getAdvancedOllamaSettings = async () => {
export const copilotResumeLastChat = async () => {
return await storage.get<boolean>("copilotResumeLastChat")
}
export const defaultSidebarOpen = async () => {
const sidebarOpen = await storage.get("sidebarOpen")
if (!sidebarOpen || sidebarOpen === "") {
return "right_clk"
}
return sidebarOpen
}
export const setSidebarOpen = async (sidebarOpen: string) => {
await storage.set("sidebarOpen", sidebarOpen)
}