Skip to content

Peon AI — Interaction Design

Layout (top → bottom)

┌──────────────────────────────────────────────────────┐
│  1. Chat History (ChatMarkdownWidget)                │
│     fills all available vertical space               │
│                                                      │
├──────────────────────────────────────────────────────┤
│  2. User Input (UserInputWidget)                     │
│     ┌────────────────────────────────────────────┐   │
│     │ [📎 file.java ×] [📎 pom.xml ×]  (hidden)   │   │  file chips, hidden when empty
│     ├────────────────────────────────────────────┤   │
│     │ StyledText (auto-grow, max 7 rows)    [🎤] │   │  mic: flat, white bg
│     └────────────────────────────────────────────┘   │
│                                                      │
├──────────────────────────────────────────────────────┤
│  3. Action Bar (white bg, visually unified with 2)   │
│                                                      │
│    [Plan▾]  [Model Name▾]  [🧠]  [Clear]    [▶/■]    │  send/stop pinned right
│    [Start Impl.]  [☐ autonomous]  (conditional)      │
│                                                      │
├──────────────────────────────────────────────────────┤
│  4. Status Bar (white bg)                            │
│    [📌 ProjectName]  [file.java]  [⚡ 2 skills]       │
│    [AGENTS.md]  [MCP on/off]  [Compact 45K/100K]     │
└──────────────────────────────────────────────────────┘

Section Details

2 — User Input Widget

  • StyledText: auto-grows up to 7 rows, then scrolls. Enter = newline, Ctrl/Cmd+Enter = send.
  • File chips bar: hidden until files are attached. Each chip: file icon + name + ×. + button opens workspace file picker.
  • Mic button: flat ToolBar/ToolItem on the right side of the text area. Transparent/white background. Turns red while recording. Hidden unless voice is configured.
  • No outer border on the composite — the StyledText itself provides the focus visual. The whole section (2 + 3) reads as one unified input block.

3 — Action Bar

Background matches section 2 (white / system bg) so they read as one block.

PositionControlNotes
LeftMode selector (Plan, Dev, Agent)combo or segmented button
LeftModel selectorcombo, ~200px
Left🧠 Think toggleon/off for extended thinking; new feature
LeftClearclears conversation history
Right (pinned)Send / Stopalways rightmost; icon swaps on lock
ConditionalStart Impl.visible in Plan/Agent mode when AI has replied
Conditional☐ autonomouscheckbox, visible in Agent mode only

Layout: GridLayout(2) — left cell is a RowLayout composite that wraps, right cell is SendOrStopButton aligned SWT.RIGHT.

4 — Status Bar

Separate composite below Action Bar. RowLayout, wrapping. White / system bg.

ControlTypeNotes
📌 ProjectToggle button (pin icon)pin/unpin project; shows project name; hidden if no project
Selected fileLabelcurrently active file in editor
⚡ N skillsToggle buttonon/off; enables/disables skill loading; shows count
AGENTS.mdLabel/iconshown only when an AGENTS.md is found
MCP on/offToggle buttonmoved here from Action Bar
Compact N/MPush buttonmoved here from Action Bar; color coding (yellow 70%, red 88%)

Visual Unification

Sections 2, 3 and 4 form one cohesive input block by sharing the same background color (white on light theme / system widget color on dark theme). No visual borders between them — only the StyledText itself has a focused border. Thin horizontal separator lines (1px) may optionally mark section boundaries.

New Features Required

FeatureWhereDescription
🧠 Think toggleAction BarEnable Claude extended thinking for the next request. Stored in LlmConfig or per-request flag.
Skills on/off toggleStatus BarSkillService.setEnabled(boolean). Button shows count when on, grayed when off.

Open Questions

  • Clear button: Action Bar (row 3) is the current proposal. Could also live in Status Bar next to Compact if space is tight.
  • Start Impl. / autonomous: These only appear in Plan/Agent mode. They currently go on a second visual row inside the Action Bar. Could instead be folded into a context menu on the Mode selector.
  • Compact button placement: Moving to Status Bar makes sense since it reflects state (token usage). Action Bar was pragmatic; Status Bar is more informative.

Affected Files

FileChange
…/parts/widget/ChatWidget.javaRename concept to UserInputWidget; remove StatusLineWidget from inside it; keep file chips + mic
…/parts/widget/ActionsBarWidget.javaNew layout (GridLayout 2), white bg, add Think toggle, move MCP+Compact out
…/parts/widget/StatusLineWidget.javaAdd MCP toggle, Compact button, Skills toggle; remove fixed non-wrapping layout
…/parts/widget/SendOrStopButton.javaNo change — already extracted
…/parts/AIChatView.javaReorder composites (input before action bar), rewire status line calls

Released under the MIT License.