# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.0] - 2026-05-17

### Added
- Initial release of `PromptBar` for Compose Multiplatform.
- `PromptBar` — the composer composable. Auto-growing multi-line textfield, attachment chips,
  templates row, autocomplete panels, voice button, model selector slot, send/stop button.
- `PromptBarState` + `rememberPromptBarState` — headless state container.
  - `fieldValue` (TextFieldValue), `text`, `attachments`, `selectedModel`, `sendState`,
    `activeTrigger`, `charCount`, `tokenCount`, `outgoing` (snapshot).
  - `addAttachment`, `removeAttachment`, `clearAttachments`.
  - `markSending`, `markStreaming`, `markReady`, `forceSendState` — send-button state machine
    overrides.
  - `applyTemplate`, `appendAtCaret`, `pasteTokensAsAttachments` — text manipulation helpers.
  - `selectModel`, `reset`.
  - Pluggable `tokenizer: (String) -> Int` for accurate token counting.
- `SlashCommand` + `SlashAutocompletePanel` — `/cmd` autocomplete dropdown with hotkey chips.
- `Mention`, `MentionProvider` (async `suggest(query)`), `MentionAutocompletePanel` — `@mention`
  dropdown. `MentionProvider.Empty` and `MentionProvider.fromList` helpers.
- `AttachmentChip` + `AttachmentPreview` (`Image`, `File`) + `PromptAttachment` —
  attachment chips with built-in image/file icons or custom preview composable.
- `PromptTemplate` — quick-start prompt chips above the input.
- `ModelOption` + a slot for any inline model selector composable.
- `SendStopButton` + `SendState` — single button that toggles Send → Sending → Stop based on
  the lifecycle.
- `detectActiveTrigger`, `insertTriggerReplacement` — pure-logic helpers for the autocomplete
  state machine (no composition required).
- `tokenizePastedBlob` — smart paste-tokenizer that splits comma/semicolon/newline blobs and
  strips surrounding quotes; used by `pasteTokensAsAttachments`.
- `approximateTokenCount` — ~4-chars-per-token estimator used as the default for the live counter.
- Keyboard shortcuts: `Enter` sends (when in `Ready`), `Shift+Enter` newline, `ImeAction.Send`
  on mobile keyboards.
- 35+ pure-logic tests + 14 Compose UI tests.
- Targets: Android (minSdk 24), iOS (x64, arm64, simulatorArm64), Desktop (JVM 11), Web (wasmJs).

[Unreleased]: https://github.com/NadeemIqbal/prompt-bar/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/NadeemIqbal/prompt-bar/releases/tag/v0.1.0
