LibreChat Shortcuts + Token Counter

Press Alt+S to click toggle-left-nav button on localhost:3080

作者
Brian Hurd
今日安裝
0
安裝總數
0
評價
0 0 0
版本
1.9.2
建立日期
2025-03-28
更新日期
2025-03-31
尺寸
15.6 KB
授權條款
未知
腳本執行於

This has 2 iife. If part of it annoys you, delete the functionality you don't like. Each iife has a large comment section divider so it's easy to delete. Search for #1 or #2

1st iife: Keyboard shortcuts
2nd iife: show token usage and calculate based on 4o pricing ($2.50 input per million, $10 output per million, search for 2.50 to change the cost)

This provides some simple keyboard shortcuts for libreChat to scroll, toggle the sidebar, and start a new conversation. More to come. Keyboard shortcut keys below. This uses the free GSAP utilities for smooth scrolling behavior.

Depending on how you installed LibreChat, you may need to update this line:
// @match http://localhost:3080/*

// === Shortcut Keybindings ===
// Alt+S → Toggle sidebar (clicks #toggle-left-nav)
// Alt+N → New chat (clicks button[aria-label="New chat"])
// Alt+T → Scroll to top of message container
// Alt+Z → Scroll to bottom of message container
// Alt+A → Scroll up one message (.message-render)
// Alt+F → Scroll down one message (.message-render)

// Alt+r → refresh token count and conversation cost
// Alt+u → update the token cost per million to use based on the model

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址