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或关注我们的公众号极客氢云获取最新地址