LibreChat Shortcuts + Token Counter

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

2025/03/31のページです。最新版はこちら。

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
Brian Hurd
評価
0 0 0
バージョン
1.9.0
作成日
2025/03/28
更新日
2025/03/31
大きさ
15.4KB
ライセンス
不明
対象サイト

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