# devii-terminal
The draggable terminal window for the Devii assistant. It connects to `/devii/ws`, renders
markdown replies, keeps input history, and supports closed, normal, maximized, and fullscreen
states with geometry persisted to `localStorage`. It is created automatically by the
`DeviiTerminal` controller (`app.devii`) and appended to the page; you normally do not place it by
hand.
It extends the shared `FloatingWindow` base (`static/js/components/FloatingWindow.js`), reusing the
same drag, resize, geometry-persistence, and window chrome as the container terminals, and adds
its own launcher button, closed state, and socket/markdown/history.
Source: `static/js/devii/devii-terminal.js`.
## Attributes
| Attribute | Type | Description |
|---|---|---|
| `open` | boolean | Open the terminal on connection. |
| `avatar` | string | Id or selector of an associated `devii-avatar` element. |
## Methods and properties
| Member | Description |
|---|---|
| `open()` / `close()` / `toggle()` | Control visibility. |
| `state` | `closed`, `normal`, `maximized`, or `fullscreen`. |
| `geometry` | `{ width, height, left, top }` window placement. |
## Usage
The terminal is opened from any element marked `data-devii-open` (the controller delegates these
clicks), so you rarely instantiate it directly:
```html
<button data-devii-open>Ask Devii</button>
```