feat(v2): chat command history + smart auto-scroll
Command history: - Up/Down arrow keys browse sent command history (like bash/console) - 50 commands stored per character in localStorage - Persists across page reloads and browser sessions - Current input preserved when browsing (restored on Down past end) - Duplicates kept (matches user preference) Smart auto-scroll: - New messages only auto-scroll if user is already at the bottom - If user has scrolled up to read history, it stays put - Sending a message snaps back to bottom - 30px threshold for "at bottom" detection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8a2d0e1a72
commit
0b64c6ccff
23 changed files with 214 additions and 29 deletions
1
static/assets/CombatPickerWindow-Bmi4B-3k.js
Normal file
1
static/assets/CombatPickerWindow-Bmi4B-3k.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{u as c,j as r,D as d}from"./index-BZJ3WwmC.js";import"./react-DlyoauG8.js";const p=({id:n,zIndex:i,characters:a})=>{const{openWindow:s}=c(),e=Array.from(a.keys()).sort();return r.jsx(d,{id:n,title:"Combat Stats — Select Character",zIndex:i,width:300,height:400,children:r.jsx("div",{style:{flex:1,overflowY:"auto",padding:6},children:e.length===0?r.jsx("div",{style:{padding:12,color:"#666",textAlign:"center",fontSize:"0.8rem"},children:"No characters online"}):e.map(o=>r.jsx("div",{style:{padding:"5px 8px",cursor:"pointer",borderBottom:"1px solid #222",color:"#ccc",fontSize:"0.82rem"},onMouseEnter:t=>t.currentTarget.style.background="#2a2a2a",onMouseLeave:t=>t.currentTarget.style.background="",onClick:()=>s(`combat-${o}`,`Combat: ${o}`,o),children:o},o))})})};export{p as CombatPickerWindow};
|
||||
Loading…
Add table
Add a link
Reference in a new issue