Summary
Currently custom directives are displayed in the chat session header. This ticket moves them to a more contextual location — a single chip inside the chat input field area that opens a popover for managing active directives.
Motivation
- The header location is easy to overlook and feels like a static session setting rather than an active input modifier
- With many directives, the current header view becomes a large dropdown that takes up prominent space
- Placing directives at the input field makes them feel like "what is shaping my next message", which is the correct mental model
- A single chip with a popover scales cleanly from 1 to N directives without any layout issues
Implementation notes
-
ChatInputField.kt — add a directivesChip composable row above the text input area, visible when the session has at least one directive. Chip renders active count badge when activeCount > 0.
-
Popover — use a Popup anchored to the chip, opening upward (alignment = Alignment.TopStart with negative offset). Contains a LazyColumn of directive rows with Checkbox + label + edit icon.
-
State — the chip needs:
- List of all directives for the session
- Set of currently active directive IDs
- Toggle callback per directive
- Add/edit callbacks
-
Remove from header — once the chip is in place, remove the directive dropdown from the chat session header to avoid duplication.
-
Persist toggle state — the active/inactive state per directive per session should be persisted so reopening a session restores which directives were enabled.
Summary
Currently custom directives are displayed in the chat session header. This ticket moves them to a more contextual location — a single chip inside the chat input field area that opens a popover for managing active directives.
Motivation
Implementation notes
ChatInputField.kt— add adirectivesChipcomposable row above the text input area, visible when the session has at least one directive. Chip renders active count badge whenactiveCount > 0.Popover — use a
Popupanchored to the chip, opening upward (alignment = Alignment.TopStartwith negative offset). Contains aLazyColumnof directive rows withCheckbox+ label + edit icon.State — the chip needs:
Remove from header — once the chip is in place, remove the directive dropdown from the chat session header to avoid duplication.
Persist toggle state — the active/inactive state per directive per session should be persisted so reopening a session restores which directives were enabled.