dsh-input-history
简体中文 · English
Terminal-style input history: press ↑/↓ to browse messages sent in the current session.
Pure client-side plugin, no host changes — the /history command opens a searchable history panel.
## 🎬 Demo
## ✨ Features
The plugin injects two complementary recall channels into every session:
- **⌨️ Terminal-style arrow recall** — like shell history, with **no popup list**: ↑/↓ directly replace the composer content
- **📋 `/history` panel** — a searchable floating list, browsable with mouse or keyboard
### ⌨️ Arrow-key recall
| Action | Effect |
|---|---|
| ↑ / ↓ (empty composer, or caret at the very start) | Starts recall; fetches the most recent sent message |
| Esc | Restores the draft and exits recall |
### 📋 `/history` panel
| Way | Recall semantics |
|---|---|
| Pick `/history` in the slash menu | **Insert mode**: the message is inserted at the `/history` token, keeping surrounding text |
The panel supports **search filtering**, mouse clicking, and ↑/↓ + Enter; Esc or clicking outside cancels.
> History is read from the current session's full log (paged), strictly isolated per session; adjacent duplicate messages are collapsed automatically.
## 🚀 Install
From NPM:
```
dsh plugin --profile web add @loommii/dsh-input-history@latest
```
Or from GitHub:
```
dsh plugin --profile web add github:loommii/dsh-input-history
```
Restart the profile after installing (`dsh web` / `dsh --profile `).
Upgrade / uninstall:
```
dsh plugin --profile web update @loommii/dsh-input-history
dsh plugin --profile web remove @loommii/dsh-input-history
```
## 💡 Usage
Focus the chat composer of any session:
- With an **empty composer**, press ↑/↓, or move the caret to the **very start** and press ↑: terminal-style recall begins.
- Type /history and pick it in the slash menu, or press Enter on the bare command: the history panel opens.
## 🏗️ Architecture
The plugin is pure client-side UI: history is paged from the host's `remote.session` full session log (cache isolated per session), and recall is written back through the `conversation` input shell's `setDraft`.
## 📄 License
MIT