Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xranx OpenContext IntentSelector

From Leeroopedia
Knowledge Sources
Domains UI, Agent_Chat, React
Last Updated 2026-10-24 00:00 GMT

Overview

Dropdown selector component for choosing agent intent/quick-actions in the agent chat input bar, with active state highlighting and i18n labels.

Description

The IntentSelector component in src/ui/src/components/agent/ renders a pill-shaped button that opens a dropdown menu of intent options (auto, create, iterate, search). Each option shows an icon and i18n label, with a checkmark on the active selection. The "auto" option clears the active intent, while other options set the intent that modifies the agent's behavior.

Usage

Import this component in AgentInputBar to provide intent selection in the agent chat.

Code Reference

Source Location

Signature

export function IntentSelector({
  activeIntent, intentLabel, IntentIcon,
  showIntentMenu, setShowIntentMenu, handleQuickAction,
  t, intentMenuRef, quickActions
})

Import

import { IntentSelector } from './components/agent/IntentSelector';

I/O Contract

Inputs

Name Type Required Description
activeIntent null Yes Currently active intent ID
quickActions Array Yes [{id, icon, labelKey, placeholderKey}]
showIntentMenu boolean Yes Menu open state
handleQuickAction Function Yes Called with intent ID

Usage Examples

Intent Selection

<IntentSelector
  activeIntent={activeIntent}
  intentLabel={intentLabel}
  IntentIcon={IntentIcon}
  showIntentMenu={showMenu}
  setShowIntentMenu={setShowMenu}
  handleQuickAction={handleQuickAction}
  t={t}
  intentMenuRef={menuRef}
  quickActions={quickActions}
/>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment