# 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`. The `DeviiTerminal` controller (`app.devii`) creates it and appends it to the page, so you do not place it by hand. It extends the shared `FloatingWindow` base (`static/js/components/FloatingWindow.js`), reusing the container terminals' drag, resize, geometry-persistence, and window chrome, 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 Any element marked `data-devii-open` opens the terminal (the controller delegates these clicks), so you rarely instantiate it directly: ```html <button data-devii-open>Ask Devii</button> ```
Live example