Changelog
July 29, 2026 · View on GitHub
0.14.0
Minor Changes
-
c3c0662: mcporter tool calls now honour a call timeout. Flemma passes
--timeout(milliseconds) tomcporter call, derived fromtools.mcporter.timeout, and exposes an optional per-calltimeout(seconds) in every discovered tool's input schema — mirroring the built-inbashtool — so the model can extend the budget for slow tools such as deep research. Previously neither the configured timeout nor a model-suppliedtimeoutreached mcporter: the value was serialized into the tool arguments and silently ignored while mcporter fell back to its own default. A grace window now lets mcporter report its own timeout before Flemma force-kills the subprocess, and a server-ownedtimeoutparameter is left untouched. -
a2b8065: Model strings accept URI matrix parameters:
flemma.opt.model = "vertex/gemini-3.1-pro-preview;project_id=x"decomposes into provider, model, and provider-scoped parameters everywhere a model is named (config,:Flemma switch, presets), with source-order precedence,;key=nilclearing, and deterministic command-line-over-preset overrides in both grammars.@filereferences accept the same multi-key;key=valueoptions (quote a parameterized MIME:;type='text/plain;charset=utf-8'). Preset parameters normalize to the config shape — provider-specific keys nest under the provider namespace. -
37864f3: Refreshed model definitions and pricing across all four providers (July 24, 2026):
- Anthropic — added Claude Opus 5 (
claude-opus-5, $5/$25 per MTok, 1M context, 128K output) and Claude Fable 5 (claude-fable-5, $10/$50, 1M/128K), both adaptive-thinking. Corrected Claude Sonnet 4.6's max output to 128K (was 64K), and raised themaxthinking level to the API'smaxeffort on Sonnet 4.6 and Sonnet 5 — per Anthropic's effort docs,maxis available on every adaptive-thinking model (Opus 4.5, which has effort but not adaptive thinking, still clamps tohigh). The intermediatexhighlevel — available on Fable 5, Opus 5, Opus 4.8, Opus 4.7 and Sonnet 5 — remains unreachable, since Flemma's canonical levels stop atmax. Replaced the family-widemin_cache_tokensapproximation with the documented per-model minimum cacheable prefix, which is not monotonic across generations: 512 for Opus 5 and Fable 5; 1024 for Opus 4.8, Sonnet 5, Sonnet 4.6, Sonnet 4.5, and Opus 4.1; 2048 for Opus 4.7; 4096 for Opus 4.6, Opus 4.5, and Haiku 4.5. This corrects the cache-percentage indicator, which previously hid cache stats on prompts that were in fact cacheable (Opus 5, Opus 4.8, Sonnet) and showed them on prompts that were not (Opus 4.6, Opus 4.5). - OpenAI — added the GPT-5.6 family:
gpt-5.6-sol(with itsgpt-5.6alias, $5/$30),gpt-5.6-terra($2.50/$15), andgpt-5.6-luna($1/$6), all 1.05M context / 128K output and the first OpenAI models with a nativemaxreasoning effort and a billed cache-write rate ($6.25/$3.125/$1.25 per MTok). Dropped eleven models shut down on July 23, 2026 (gpt-5-codex, the fourgpt-5.1-*variants,gpt-5.2-codex,o3-deep-research,o4-mini-deep-research,computer-use-preview, and the two*-search-previewmodels).gpt-5,gpt-5-mini,gpt-5-nano,gpt-5-pro,o3, ando3-proare now marked deprecated (retiring December 11, 2026); the stale deprecation note ongpt-5.1was removed. - Google (Vertex AI) — added Gemini 3.6 Flash (
gemini-3.6-flash, $1.50/$7.50) and Gemini 3.5 Flash-Lite (gemini-3.5-flash-lite, $0.30/$2.50). Droppedgemini-2.0-flashandgemini-2.0-flash-lite(and their-001snapshots), retired June 1, 2026. Gemini 2.5 models are noted as retiring October 16, 2026. - Moonshot AI — added Kimi K3 (
kimi-k3, $3/$15 per MTok, $0.30 cache hit, 1M context, 128K output). K3 always reasons and configures depth through the top-levelreasoning_effortfield rather than the K2 family'sthinkingobject. Themoonshot-v1-*line is noted as sunsetting August 31, 2026.
- Anthropic — added Claude Opus 5 (
-
2ec02c4: Survive
viewoptions+=folds: while a chat buffer is active,foldsis stripped fromviewoptionsso:mkviewno longer persists stale fold state (tweakable viaediting.manage_viewoptions), and fold settings clobbered by a:loadviewof a pre-existing view (foldmethod=manual,foldexpr=0) are now detected and fully re-applied — previously onlyfoldmethodwas restored, leaving a dead foldexpr and no folds at all.
Patch Changes
-
16b5d0c: Fixed a crash when a Flemma module is
require()d beforesetup()runs. The experimental Codex adapter registers its ChatGPT secrets resolver as a load-time side effect, and that path asserted the config system was already initialized — so merely requiring the adapter in isolation threwconfig.init() must be called before register_module_defaults(). This broke tools that load every module in a bare Neovim, most notably nixpkgs packaging (nvimRequireCheck). Config now queues module-default registrations that arrive before initialization and flushes them oncesetup()supplies the schema, so any module can be required standalone and its defaults still land. -
1489470: Fixed fence overlay rendering for wide and nested code fences — bar now scales to the actual backtick count, and inner backtick lines inside a wider fence are no longer overlaid
-
d458544: Fix
provider/modelshorthand (e.g.,flemma.opt.model = "anthropic/claude-opus-4-8") in setup opts and frontmatter — previously only worked in:Flemma switchcommands. -
be8eec2: Foreign thinking is now injected as tagless prose ("Here is some context to help you: …", closed by a lone
---rule) instead of an XML-style wrapper. Anything framing the model's own prior turns is eventually reproduced verbatim in replies, so the framing must stay harmless when echoed — tag pairs re-enter the conversation as structure. The framing lives in the string catalogue (thinking.foreign.wrapinpo/flemma-harness.po). -
93089d2: Fix the
flemma.jobs.statustool'sjob_idparameter: its guidance text was passed ass.string(<default>), so it shipped as a JSON Schemadefault(a nonsense default value) with nodescriptionfor the model. It now renders as the parameter'sdescription, so the model finally sees how to fill injob_id. -
37864f3: The unified
thinkingparameter now controls reasoning depth on Kimi K3. K3 configures thinking through the top-levelreasoning_effortfield rather than the K2 family'sthinkingobject, so settingthinkinghad no effect and every request reasoned at the server default ofmax— the most expensive setting, with no way to make K3 cheaper or faster. Flemma's canonical levels now map onto the three values the API accepts:minimalandlowsendlow,mediumandhighsendhigh, andmaxsendsmax. K3 cannot stop reasoning, so thinking turned off sendslow— the floor — rather than omitting the field and silently inheritingmax. Temperature is locked to 1.0, which Moonshot fixes on K3 as it does across the K2.x line. -
a64c027: Corrected three model limits that were wrong against provider documentation:
gpt-5-proreserves 272K of its 400K context window for output, leaving 128K for input — the inverse of every other GPT-5 model. Itsmax_input_tokenshad been set to 272000 (the output figure), so the context indicator showed a request as half-full when it was already over the limit.gemini-2.5-pro's thinking budget floor is 128, not 1. Only 2.5 Flash accepts a budget of 1; thinking cannot be turned off on 2.5 Pro at all.gpt-5.3-codex-spark's input limit is 96000 (its 128K context window minus the 32K output reservation), not 100000. Its entry now records that it is a research preview with restricted API access and that its pricing mirrorsgpt-5.3-codexrather than a published rate.
Also dropped
thinking_budgetsfrom the Gemini 3 entries that still carried them. Google publishes athinkingBudgetrange for Gemini 2.5 only, Gemini 3 usesthinkingLevel, and a request carrying both parameters returns an error. The budgets were never sent — but they clamped numeric budgets before mapping them to a level, so the same configured budget resolved to a differentthinkingLevelongemini-3-flash-previewthan ongemini-3.5-flash. -
a64c027: Fixed the request Flemma sends to
kimi-k2.7-codeandkimi-k2.7-code-highspeed. Both were declared as thinking-toggle models, so turning thinking off sentthinking = {"type": "disabled"}withtemperature = 0.6— a combination the API rejects outright, since thinking on the K2.7 Code family is always on and cannot be disabled. They are now declaredforced: nothinkingobject is sent at all (Moonshot documents it as omittable, and the only form it accepts when set explicitly is{"type":"enabled","keep":"all"}), and temperature is locked to the 1.0 the API fixes it at. Parameter validation now warns about fixed sampling parameters on every K2.x/K3 model rather than only the toggleable ones. -
ce89e46: Fix assistant turns being silently emptied by an unterminated
<thinking>block: the collected content is now preserved as thinking instead of dropping the rest of the turn from the AST.</thinking>still only closes a block on a line of its own — the token followed by content is treated as thinking prose (HTML/XML examples, format transcripts). -
6e7796f: Externalized conversation messages, tool definition strings, and the full user-facing surface into gettext PO catalogues, split by audience:
po/flemma-harness.poholds model-facing strings (conversation text, tool descriptions, runtime tool output and error messages, shared truncation-overflow notices, and each tool's coding-assistant personality snippet and guidelines — English-only prompt surface),po/flemma.poholds user-facing UI strings (the translatable surface, all keys namespacedui.*). Covers notifications (usage, rejection popup, tool actions, :Flemma commands, send-pipeline guards, provider switch/initialize, diagnostics, build-prompt failures, autopilot, presets, hooks, secrets, config validation, sandbox, migration, response truncation, max-tokens clamping, request/cURL errors), keymap descriptions, inline progress-spinner and tool-status indicator labels (thevirt_textwaiting/executing/pending/complete/failed states and the streamed-character counter), user-triggered template diagnostics (file references, includes, expression errors,@fileopen/read failures), and buffer parse diagnostics for malformed tool-use/tool-result blocks. Adds gettext plural support —msgid_plural/msgstr[N]selected by a compiledPlural-Formsexpression (EN/FR/RU/PL), fixing e.g. "1 orphaned job resolved" vs "N orphaned jobs resolved". Amake qagate (lint-messages.sh) validates key resolution, call-site↔template variables,#. Variables:comments, no pure-formatting entries, and newline-only joins between translations. Rendered strings are unchanged (still English by default); keys stay unique across the files, enforced when the catalogue loads. -
3968948: Fix Gemini 3+ rejecting conversations migrated from another provider (HTTP 400): tool calls without a native Vertex thought signature now carry Google's documented migrated-trace placeholder, and buffered API error bodies are logged so failures stay diagnosable from the log file.
-
ea64058: Fixed Vertex AI service-account authentication. The gcloud secrets resolver handed the service-account key to
gcloud auth print-access-tokenviaGOOGLE_APPLICATION_CREDENTIALS, but that subcommand ignores the variable and silently uses the activegcloud auth loginaccount — so the service account was never actually used, and Vertex broke whenever the user login required reauthentication. Service-account keys are now minted throughgcloud auth application-default print-access-token(with the cloud-platform scope), which reads the key and is immune to user reauth.
0.13.1
Patch Changes
- e4a907d: Fixed
read/write/editso$FLEMMA_TOOLS_STORE_PATH/<file>resolves to the buffer's store directory — the same placeflemma.save_towrites. Previously a tool could save a file withflemma.save_to: "$FLEMMA_TOOLS_STORE_PATH/…"and then get "File not found" reading it back. - 801b63f:
config.materialize()now expands a$presetmodel reference into its concrete provider, model, and merged parameters as part of materialization. Previously every call site that needed the effective config had to wrap materialize innormalize.resolve_preset(...)— a two-step dance that was easy to forget, leaving$presetaliases unexpanded and reaching model logic as literal strings. Preset expansion now lives with the config facade (the other config-domain expansion, e.g.$presetlist references, already did);normalize.resolve_presetis removed.config.get()/config.inspect()continue to return the raw alias, which is what setup's one-timepresets.resolve_defaultreads.
0.13.0
Minor Changes
-
731ee95: Add inline approval widget on the closing fence line of pending tool results. Shows a pause icon, optional tool label, and keybind hints when the cursor is within range. Approved-but-not-executed tools show a check icon; executing and terminal-status tools show an hourglass with the label. All labels render on the fence line — never as virtual lines inside the fenced block.
-
0a40d7a: Auto-scroll viewport during streaming responses. The cursor follows new content to the bottom (tail mode), disengages when the user moves away (breakaway), and re-engages when the user navigates back to the last line (re-attach). All non-forced cursor moves respect breakaway state so the user can freely explore the buffer during autopilot.
-
eab0d0b: Tool capabilities now gate harness parameter injection —
disables_backgroundpreventsflemma.backgroundanddisables_save_topreventsflemma.save_tofrom appearing in a tool's schema. Harness tools declare both, fixing duplicate store files when the LLM copiedflemma.save_toonto status checks. Existing capabilities renamed to verb_target convention:emits_template,auto_approves_if_sandboxed. -
38e64f0: Added experimental Codex provider for ChatGPT subscription authentication. Users with a ChatGPT subscription can now use their existing
codex logintoken to drive Flemma, without needing a separate OpenAI Platform API key.Enable via
providers.modules = { "flemma.provider.adapters.experimental.codex" }in your Flemma setup config.Also includes:
providers.modulesconfig key for registering non-built-in provider adaptersprovider/modelslash syntax (codex/gpt-5.5) for:Flemma switch, presets, and frontmatteropenai_responses.luaintermediate base for Responses API wire format reuseresolve_credential()on provider base for metadata-rich credential resolution
-
2afb5cd: Added local token estimation for Codex provider and fixed preset resolution in usage prefetch
-
57fca24: Add
editing.compact_headersconfig option (defaulttrue) to omit the blank line between Tool Use, Tool Result, and Job Result headers and their fenced code blocks -
9ded5a0: Replace string-based highlight DSL with composable
flemma.hlbuilder API. All highlight construction — config defaults and internal derivations — now uses lazy ops (h.link,h.from,h.themed,h.coalesce,h.diff,h.attrs,h.hex) with chainable methods (:blend,:pick,:omit,:contrast,:tint,:mute,:style,:merge) and terminal:get()/:set(). The old string syntax ("Normal+bg:#101010","Folded!bg",{ dark = "...", light = "..." }) is removed entirely.highlights.role_stylereplaced byhighlights.role_name(an HlOp).highlights.defaultsremoved. -
3c01208: Highlight config fields now accept plain strings: a group name coerces to
h.link(), a#RRGGBBhex value coerces toh.hex(). This removes the need torequire("flemma.hl")for simple overrides. -
8a161a4: Add
h.none()to theflemma.hlhighlight builder — a no-op op whose:get()resolves to nothing and:set()does nothing. Use it as a config value to leave a highlight group unmanaged by Flemma (e.g.highlights = { thinking_tag = h.none() }), so the colorscheme or your own definition stands. -
8157711: HlOps
tint,mute, andblendnow accept an optional ratio parameter and an HlOp color source, enabling expressions likeh.from("Normal"):tint("bg", h.from("DiagnosticWarn"):pick("fg"), 0.10) -
8bf2cee: Added inline rejection popup that replaces
vim.ui.inputfor tool rejection feedback. The floating window overlays the tool result fence block with╌borders, supports multi-line editing via Vim motions, and is fully configurable (ui.rejection.enabled,ui.rejection.winblend,highlights.rejection_input,highlights.rejection_border). Setui.rejection.enabled = falseto revert to the original command-line prompt. -
cc80506: Updated model definitions and pricing:
- Anthropic — added Claude Sonnet 5 (
claude-sonnet-5): adaptive thinking, $3/$15 per MTok standard (introductory $2/$10 through August 31, 2026), 1M context, 128K max output (mirrors Sonnet 4.6's request surface). Added alongside Claude Sonnet 4.6, which remains the default Anthropic model.
- Anthropic — added Claude Sonnet 5 (
-
9dbd329: Updated model definitions and pricing:
- Anthropic — added Claude Opus 4.8 (
claude-opus-4-8): adaptive-thinking-only, $5/$25 per MTok, 1M context, 128K max output (mirrors Opus 4.7's request surface). Removed Claude Opus 4 (claude-opus-4-0/claude-opus-4-20250514) and Claude Sonnet 4 (claude-sonnet-4-0/claude-sonnet-4-20250514), which retired on June 15, 2026 and now return errors. Noted Claude Opus 4.1's deprecation (retiring August 5, 2026). - Moonshot — added Kimi K2.7 Code (
kimi-k2.7-code, $0.95/$4.00) and its fasterkimi-k2.7-code-highspeedtier ($1.90/$8.00), both with toggleable thinking. Added explicit cache-read pricing to the legacy Moonshot V1 models (uniform, no cache discount).
- Anthropic — added Claude Opus 4.8 (
-
55922cb: Removed
:Flemma importcommand and Claude Workbench import support -
c15f633: Secrets resolvers now own their config schema (
metadata.config_schema), composed into thesecretsconfig namespace via DISCOVER — the same pattern provider adapters and sandbox backends use. Defaults materialize when a resolver registers, and custom resolvers can declare their ownsecrets.<name>options.secrets.chatgpt.auth_fileis now a configurablesetup()key (effective when the experimental Codex adapter is loaded, which self-registers the ChatGPT resolver). -
832b93b: Surface subscription rate limits (5-hour, weekly) from Codex/ChatGPT response headers in the usage bar and as lualine statusline resolvers
-
f86af3b: Add
:tint(attr, hex)and:mute(attr, hex)theme-aware blend methods to theflemma.hlbuilder.:tint()offsets away from the theme background (making colours more distinct),:mute()offsets toward it (making colours more subdued). Both automatically flip blend direction based onvim.o.background, replacing verboseh.themed()+ flipped+/-patterns with single-line calls. -
34691fd: Added treesitter-powered syntax highlighting for tool preview virt_lines. Bash commands now render with per-token syntax coloring. Any tool can opt in by returning
highlight = { lang = "language_name" }from itsformat_previewmethod. Falls back silently to flat highlighting when the treesitter grammar is unavailable. -
ac56bc9: Added tool result store for durable materialization of tool output.
Tool results can be materialized to deterministic file paths alongside the .chat file (opt-in via
tools.store.materialize, layout viatools.store.path_format). Truncation overflow now always lands at the durable store location, replacing ephemeral$TMPDIRfiles. Breaking:tools.truncate.output_path_formatis removed — truncation overflow now routes through the store.New config:
tools.store.{path_format, unnamed_path_format, materialize, preview, backup}. -
f90efda: Added
flemma.save_toand renamed the background parameter toflemma.background.Every tool schema now carries an optional
flemma.save_toparameter: the model can redirect full tool output to a file and the conversation receives a short preview plus the saved path instead. Thebashtool exports$FLEMMA_TOOLS_STORE_PATHpointing at the conversation's store directory, which is sandbox-writable by default via the newurn:flemma:storepolicy variable. The background-execution parameter is now namespaced asflemma.background; both harness parameters are stripped from tool input before execution and respect strict-mode schema invariants.tools.store.materializenow defaults tofalse— only truncation overflow and explicitflemma.save_toredirects write to the store unless opted in.
Patch Changes
- 4f10bd6: Fixed approval preview: leading symbol always shown, generic multiline previews put tool name on its own line, continuation indent respects buffer shiftwidth
- 7063a39: Improved tool throttle notification to show queued count and running slots instead of cryptic "Executing 0/1" format
- 0642363: Terminate SSE stream after response.completed to avoid idle connection tail
- 9b13f26: Fix line highlight groups (
FlemmaLine*) being lost after a colorscheme change. Groups are now re-established on everyapply_syntax()call instead of once at setup time. - bfb6e6c: Highlight groups now refresh automatically when switching colorschemes mid-session. A
ColorSchemeautocmd re-runsapply_syntax(), and since builder operations resolve lazily with no cache, all groups pick up the new colorscheme's colours immediately. - ee99627: Fixed background parameter not being injected into tool schemas for Chat Completions providers (Moonshot/Kimi)
- cd8159c: Fixed CursorLine not highlighting text in chat buffers when line_highlights is disabled
- 69639c3: Fixed parser bug where malformed JSON in a tool_use block caused all subsequent tool_use blocks in the same message to be skipped.
- 7142363: Fixed tool preview backgrounds leaving black bands after window resize (e.g. opening/closing a sidebar)
- b2802ae: Fixed "Unknown tool" errors appearing on first send when async tool sources (e.g., MCPorter) are still loading and frontmatter references tools from lazy modules
- 628fd22: Fixed "N more lines" indicator in tool previews not inheriting the role line background highlight
- b1bd6b3: Show status text and colored icons in fold previews for rejected, denied, and aborted tool results
- 7e61cb3: Tool use blocks now fold whenever a matching tool result exists, regardless of the result's status
- dd2aae5: Surface actionable diagnostic when gcloud credentials expire instead of a bare exit code
- b64ede9: Eliminate all raw
nvim_get_hl/nvim_set_hlcalls fromhighlight.lua, fully delegating tohl.luabuilder ops. Addh.default(attr)constructor for Normal-with-fallback resolution. Exposehighlights.tool_labelandhighlights.progress_accentas configurable schema entries. - e633490: Background job results are now delivered on every send — autopilot cycles included — instead of waiting for the conversation to reach full idle. Previously a completed job's result could arrive several turns late while the model polled
flemma.jobs.status, with each poll itself postponing delivery. The status tool also no longer reports finished jobs as a bare "queued": completed-but-undelivered jobs reportcompleted (delivery pending)withelapsed_secondsfrozen at the job's actual runtime. - 9401492: Fix missing usage bar and session recording when using preset-based providers
- 095bb11: HTTP request body files no longer litter
/tmp. The client wrote every request body viaos.tmpname(), which on LuaJITmkstemp()s a/tmp/lua_XXXXXXfile that nothing ever removed (one leaked, empty file per request), and theflemma_lua_*body beside it — world-readable — survived whenever Neovim was killed before the request'son_exitfired. Bodies now live in Neovim's private per-instance temp directory (vim.fn.tempname(), mode 0700), which Neovim removes wholesale on exit. - 83049ce: Unnamed-buffer store paths are now process-unique. The default
tools.store.unnamed_path_formatis${TMPDIR:-/tmp}/flemma/unnamed/{{ flemma.pid }}/{{ bufnr }}/{{ source }}_{{ name }}_{{ id }}.txt(previously…/flemma/unnamed-{{ bufnr }}/…). Buffer numbers restart in every Neovim instance, so concurrent instances sharing$TMPDIRcould commingle results in — and delete — each other's unnamed store directories, intermittently dropping the sandboxurn:flemma:storegrant.{{ flemma.pid }}is also available to custom store path formats, and the per-process subtree keeps$TMPDIR/flemmato a singleunnamed/directory. - 93e5c97: Reject completed tools early: show error before opening the rejection UI instead of after the user submits feedback
- 1f0352a: Fixed the sandboxed
bashtool hanging on Neovim 0.12+ when a command invokes an interactive pager. The 0.12+ terminal (PTY) backend gives commands a tty on stdout, sogit(andless/man) launch the user's pager; the window-less terminal buffer's PTY is only a few rows tall, so any multi-line output (such asgit log) pages and blocks until the tool times out. The terminal backend now setsGIT_PAGER=catandPAGER=cat, matching the non-PTY backend's behavior (piped stdout never triggers a pager). This also resolves the earlier "Error: missing file" symptom, which was the same pager failing fast under bubblewrap's--new-session. - 73f24ae: Fixed sandboxed commands failing outright when a configured
rw_pathsentry does not exist on disk (e.g. the lazily-created tool result store directory): nonexistent paths now drop out of the resolved policy instead of producing a bwrap mount error, degrading to "not writable" until the directory exists. - 95a886f: Fix statusline muted text rendering with colorschemes that use
reverseon StatusLine (e.g., wildcharm). Derived groups now stripreverse/bold/ctermvia:pick()and usenocombineto prevent attribute bleedthrough in%#Group#statusline escapes. RemoveExpectOp— replaced by:pick(..., { strict = true }). - 245df16: The tool label (
FlemmaToolLabel) — the approved tool-result footer and the label shown in folded message previews — now renders in the muted preview color with an italic accent instead of inheriting the brightNormalforeground. It is built by merging thetool_labelaccent ontotool_preview(theprogress_accentpattern), so the approved footer no longer jars against the muted command-preview lines above it. Set afginhighlights.tool_labelto recolor the label. - b1639c3: Repeated
setup()calls no longer stack duplicate usage-bar hook subscribers — eachusage.setup()now disposes its previousrequest:finished/buffer:destroyedsubscriptions before re-registering.
0.12.0
Minor Changes
-
fa02a31: Added glob pattern support in
auto_approvelists — entries containing*match tool names (e.g.,"flemma:*"). The$standardpreset now includesflemma:*to auto-approve harness tools. -
5af8a62: Added background job support for async tools. Tools can run in the background without blocking the conversation — the model requests it via
background: true, or the user moves an executing tool mid-flight with<M-b>(:Flemma tool:background). Completed results are delivered as**Job Result:**blocks when the conversation reaches idle. Orphaned jobs are detected and resolved on file reload.flemma:jobs:statusharness tool lets the model query job status- Jobs observability bar shows active count, spinner, and autopilot resume countdown (
ui.jobs.position) tools.autopilot.resume_delay(default 2000ms) debounces auto-continue after job completion; Ctrl+C cancels- Cursor-aware Ctrl+C with double-tap RAGE cancel (cancels all tools and the active request)
hooks.on(name, callback)Lua subscriber API alongside User autocmds- New hooks:
conversation:idle,job:submitted,job:completed,autopilot:resume-scheduled/cancelled/resumed - Job result blocks: syntax highlighting, folding, fold text preview, LSP hover and go-to-definition
-
fa02a31: Migrated conceal keybindings from
<Space><Space>toyoe(toggle),]oe(enable),[oe(disable), following Neovim's option-toggle convention -
dedaac7: Eliminated 88% per-keystroke overhead in .chat buffers caused by Neovim's treesitter
conceal_linesinteraction withconceallevel>=2. Typing latency drops from ~36ms to ~4ms per keystroke on large buffers. Fenced code block delimiters are now styled with configurable overlay extmarks instead of being hidden via conceal. Addsexperimental.patch_markdown_concealconfig flag andhighlights.fence_label/highlights.fence_barhighlight groups. Frontmatter folds now work at any conceallevel. -
54ac02d: Added op-prefix syntax for list-valued config fields (+append, ^prepend, !remove, $spread from preset). Presets now support a
toolsfield for controlling available tools via:Flemma switch. -
e84f62f: Run test suite against multiple Neovim versions (0.11 and 0.12) in parallel during
make qa -
aac445f: Bash tool now executes commands in a Neovim terminal buffer instead of a raw job pipe. Output behavior is unchanged but programs that detect TTY on stdout may produce different formatting (e.g., colored output, columnar layout). stdin is redirected from /dev/null to prevent interactive programs from blocking.
-
fa02a31: Redesigned tool result indicators with a two-extmark model: inline
⬢icon + EOL status text, each with dedicated highlight groups (FlemmaToolIcon{Pending,Executing,Success,Error}andFlemmaTool{Pending,Executing,Success,Error}) -
34179cc: Changed tool name separator from
:to.for consistency with MCP and conventional namespace syntax. Existing.chatfiles are migrated automatically on open. Tool modules can now export.approvalto register approval resolvers viatools.modules, replacing the module-path-in-auto_approve pattern. -
6113f7e: Added zy/zY keybindings to fold conversation turns to first/last message, hiding intermediate tool use and results for a quick overview
Patch Changes
- e042cfb: Fixed bar float windows getting stuck on screen when dismissed during a command-line window (q:, q/, q?)
- e3c2fa4: Fixed silent data loss in bash tool output on Neovim 0.11.x under load (libuv#4992). The terminal backend is now gated to 0.12+ where the PTY flush bug is fixed; 0.11.x uses a jobstart+sink backend that collects output reliably via callbacks.
- 09015cc: Fence overlay extmarks are now only shown when conceallevel >= 2; toggling conceal off reveals raw ``` delimiters. Markdown buffers in the same session regain native fence concealing via automatic highlighter restoration.
- d76312f: Decode wire-format tool names (e.g.,
trello__tool_name→trello.tool_name) in the progress bar - 2a6b02f: Fixed async tool sources (e.g., mcporter) seeing schema defaults instead of user config when their config schema is DISCOVER-resolved
- 1e8774a: Improved typing responsiveness on large .chat buffers by deferring fold evaluation during insert mode
- 3d31a34: Fixed empty tool input encoding as
[]instead of{}— the Anthropic streaming response sends no input deltas for empty tool input, causing the sink to read as""which failed JSON decode and fell back to an untagged{}that encoded as[] - 54ac02d: Fixed
get_for_promptto respect an explicit empty tools list from non-DEFAULTS layers - 34ff016: Fixed E5108 crash when pressing Alt+Enter to execute a tool while tool discovery is still in progress
- e2e6e82: Fence bar/label extmarks now get contrast-adjusted highlights when overlapping with CursorLine, ensuring readability on colorschemes where the default fence foreground blends into the CursorLine background
- 078fc97: Fixed unreliable auto-folding of
<thinking>blocks in multi-turn conversations - 9644ab9: Fold text previews now fall back gracefully when a tool's preview formatter encounters unexpected input
- f9f8d26: Fixed job ID collisions when reopening
.chatfiles from a previous session — duplicate IDs caused job completions to be injected adjacent to the wrong tool_result, corrupting conversation history - 85fe6f8: Fixed activity bar segment ordering so the resume countdown appears before the job count, keeping jobs visually stable regardless of whether a resume timer is active
- c267e7f: Fixed "Unknown tool" errors when executing tools from lazy-loaded third-party modules
- 1e9cf37: Fixed MCPorter tool calls failing when input is empty (e.g.,
trello:list_workspaces) —json.encode({})produces[]which mcporter rejects as not a JSON object - 242ef24: Fixed background tool execution when tool definitions finish loading during tool result processing.
- c7d0a22: Fixed infinite "Tool is already executing" loop after undoing and resending a response with background tool calls
- fa02a31: Renamed
tool:finishedhook totool:completed(FlemmaToolFinished→FlemmaToolCompleted) - e72aed3: Bash tool now sets terminal scrollback to
-1(Neovim's maximum) instead of a hardcoded100000, automatically using the highest supported value for the running Neovim version. - 5dfbb63: SVG files are now treated as text instead of binary images, fixing read tool and file reference handling for text-based image formats
- 7914d16: Fixed Tool Use blocks not folding simultaneously with their Tool Result blocks
- 34ff016: Fixed manual tool approval (Alt+Enter) ignoring the
backgroundexecution flag, causing tools to run foreground instead of as background jobs - 6cc04c5: Updated all provider model data: removed retired models (Claude Haiku 3, Moonshot K2 series), added new Vertex models (Gemini 3.5 Flash, 3 Pro, 3.1 Flash Lite), fixed OpenAI chat-latest context limits and deprecation annotations, and corrected Moonshot vision model exclusions
0.11.0
Minor Changes
-
2d4298f: Added
@//pathfile reference syntax for absolute paths —@//tmp/image.pngresolves to/tmp/image.png. The read tool now emits@//references for absolute paths instead of incorrectly prepending./. -
6b36e48: Extract reusable Bar UI utility and reorganise ui config namespace.
Breaking changes (default behaviour is unchanged for users who did not customise these keys):
- Config namespace moves under
ui. Renamenotifications.*→ui.usage.*andprogress.*→ui.progress.*. - Removed config keys:
notifications.limit,notifications.border,notifications.zindex,notifications.position,progress.zindex. Stacking, the underline border, and the z-index overrides are gone by design. - Highlight groups
FlemmaNotificationsBar,FlemmaNotificationsSecondary,FlemmaNotificationsMuted,FlemmaNotificationsCacheGood,FlemmaNotificationsCacheBadrename toFlemmaUsageBar{,Secondary,Muted,CacheGood,CacheBad}.FlemmaNotificationsBottomis removed with the border feature. Fallback chains and computed colours preserved exactly. - User command
:Flemma notification:recallrenames to:Flemma usage:recall.
New capabilities:
- Usage bar and progress bar each gain a
positionoption; choose fromtop,bottom,top left,top right,bottom left,bottom right. Defaults unchanged (topfor usage,bottom leftfor progress).
Internal structure (informational):
lua/flemma/bar.luamoves tolua/flemma/ui/bar/layout.luaand gains anapply_rendered_highlightshelper.- New module
lua/flemma/ui/bar/init.luaprovides a handle-basedBar.new(opts)withset_icon/set_segments/set_highlight/update/dismiss/is_dismissedmethods, six positions, mutual exclusion, and lifecycle autocmds. lua/flemma/notifications.luais deleted; its driver logic lives inlua/flemma/usage.lua.- Progress float in
lua/flemma/ui/init.luarewires toBar; the inline "Waiting"/"Thinking" virt_text path and the off-screen fallback are preserved unchanged.
- Config namespace moves under
-
9e265cf: Added
<Space><Space>keymap to toggle conceallevel between the configured level and 0 in chat buffers. Configurable viakeymaps.normal.conceal_toggle; only registered whenediting.concealis active. The toggle re-opens the frontmatter fold to prevent it from auto-collapsing during the transition. -
e8be40b: Restructured config schema: moved orphaned top-level keys under their parent groups.
Migration: rename the following keys in your
setup()call:Old path New path defaultshighlights.defaultsrole_stylehighlights.role_stylepricingui.pricingstatuslineui.statuslinetext_objectkeymaps.text_object -
9eadd16: First
.chatbuffer open and first:Flemma sendno longer freeze the editor while resolving credentials (e.g.gcloud auth print-access-token). Subprocess resolvers now run async; the send pipeline raises a readiness suspense on cache miss, subscribes to the async work, and retries automatically on completion with a "Resolving …" notification. -
ca12afd: Preserve foreign thinking blocks when switching providers mid-conversation. When an assistant message contains thinking from a different provider, the thinking summary is wrapped in
<thinking>tags and injected as text content, giving the new model context on the previous model's reasoning. -
b41bef0: Added
editing.concealwith default"2nv"— Flemma now hides markdown syntax (bold, italic, link markers, etc.) in chat windows while reading or selecting, and reveals it when you move the cursor onto a line in Insert or Command mode. The value is a compact{conceallevel}{concealcursor}string; set it tofalseto opt out and keep whatever conceal settings your colorscheme/config provides. Seedocs/conceal.mdfor the format and the intentionally-unfixedline_highlights+Concealinteraction (a Neovim drawline design, documented inline).This is the first of a series of "reduce noise by default" changes — chat buffers already carry role markers, tool blocks, thinking blocks, rulers, and usage bars; removing visible markdown markup on top of that makes assistant prose much easier to read. The old behaviour is one line away:
editing = { conceal = false }. -
fff4af8: Added
:Flemma usage:estimate— delegates to the active provider'stry_estimate_usagehook. The Anthropic adapter queriesPOST /v1/messages/count_tokenswith the exact body a real send would produce (minusmax_tokens,stream,temperature) and reports input tokens, estimated cost, and per-MTok pricing viaflemma.notify.info. -
38f2bad: Added support for Kimi K2.6 (
kimi-k2.6) and promoted it to the default Moonshot model. Pricing per platform.kimi.ai/docs/pricing/chat-k26: $0.95/M input, $0.16/M cache read, $4.00/M output, 256K context. K2 preview/turbo/thinking variants are now flagged with their May 25, 2026 retirement date.Also introduced a provider-specific extension point on
flemma.models.ModelInfo: an optionalmetatable whose shape is documented by the owning adapter. Moonshot usesmeta.thinking_mode = "forced" | "optional"to drive thinking behaviour directly from the model data instead of hardcoded tables in the adapter. -
4b1ccd3: Replaced tmux-style statusline and truncate formats with Lua template formats.
-
3325423: Added opt-in lualine segment
#{buffer.tokens.input}showing projected input tokens for the next request, fetched via the active provider (Anthropic today) and debounced 2.5s after the user pauses editing. The defaultstatusline.formatnow includes the segment with an↑marker; users with a customstatusline.formatare unaffected unless they add the variable.Internal:
try_estimate_usage(bufnr, on_result)is now callback-mandatory — notify/format moved to the:Flemma usage:estimatecommand dispatcher so adapter implementations stay pure-data. New hookusage:estimated/FlemmaUsageEstimatedfires when a buffer's token estimate changes. -
5b12dc7: Added GPT-5.5 and GPT-5.5 pro model definitions for OpenAI
-
de4e185: Added support for Claude Opus 4.7 (
claude-opus-4-7) with adaptive thinking. Opus 4.7 is adaptive-only (manualbudget_tokensis rejected), and its default thinking display is"omitted"— Flemma now sendsdisplay: "summarized"explicitly on all adaptive requests so thinking text is returned.Added an Anthropic-specific
effortparameter (parameters.anthropic.effort = "xhigh") as an escape hatch for effort values outside Flemma's canonical enum, mirroring OpenAI'sreasoningoverride. This makes Opus 4.7's newxhighlevel reachable. -
e511779: Show the active tool name in the progress bar during tool call streaming (e.g.
write · 475 characters · 14s) -
0dcddd0:
statusline.formatnow accepts either a single string or a list of strings. When a list is provided, entries are concatenated with""at render time, letting you break the default into readable pieces without manualtable.concatcalls. -
0dcddd0: Added
FlemmaStatusTextMutedhighlight group — a theme-neutral dim variant ofStatusLinederived via Flemma's hl expression composer (StatusLine±fg:#666666). Use%#FlemmaStatusTextMuted#…%*instatusline.formatto dim fragments while keeping the statusline background continuous.When rendered through the bundled lualine component, both escapes are auto-rewritten at render time so they anchor to the active section hl rather than plain
StatusLine:%*→ section's default hl (restoreslualine_c_normaletc. instead of falling back toStatusLine)%#FlemmaStatusTextMuted#→ a memoised render-time group combining the section's bg with the muted fg, so embedded muted text keeps bg continuity across mode tints
The render-time group is cached on the component and only re-set when the section bg or muted fg actually changes (mode switch or colorscheme), keeping the statusline redraw hot path cheap. Outside lualine, both escapes pass through untouched — vim handles
%*natively and the staticFlemmaStatusTextMutedgroup (anchored toStatusLine.bg) is used directly.The shipped
statusline.formatdefault now surfaces session request count + cost and the buffer token estimate alongside the model name, with muted separators between segments. Seelua/flemma/config/schema.luafor the literal list; users with a customstatusline.formatare unaffected. -
8bf8557: Added
thinking.foreignconfig option to control whether foreign thinking blocks are included in requests. Thethinkingparameter now accepts an object form{ level = "high", foreign = "preserve" }alongside the existing scalar shorthand (coerced automatically). -
df68d3f: Unified tool result status into a parenthesized header suffix. The pending / approved / denied / rejected / aborted lifecycle states and the previously-separate
(error)marker now all live in the**Tool Result:**header via a modeline-parseable suffix — e.g.**Tool Result:** `toolu_01` (pending).The old
flemma:tool status=<status>fenced-block format has been retired. The fence below a tool_result is now always a plain code block. On the AST,is_erroris gone;status = "error"replaces it, and any non-status tokens in the header suffix (e.g.(status=pending sandbox=false)) round-trip through a newmetafield for future metadata support.No migration is provided. In-flight conversations with old
flemma:toolplaceholders must be upgraded manually — the(error)suffix continues to parse correctly, so completed conversations with errored tool results are unaffected. The header suffix also survivesconceallevel = 2(the default since 0.11), so pending tools remain visibly approvable without disabling markdown conceal.Also adds
:Flemma tool:approveand:Flemma tool:reject [message]commands mirroring the existing:Flemma tool:executeentry point, so the header status can be toggled programmatically or by keymap without hand-editing.tool:rejectaccepts an optional message that is written into the fence body as the rejection reason visible to the model.Classified as
minorrather thanmajorbecause the format change is bounded: completed conversations (the(error)case and all plain tool results) round-trip unchanged, and the only affected buffers are ones paused mid-approval — a transient state, not persisted work. -
f1c86cb: Added distinct syntax highlight groups for every concise status suffix on
**Tool Result:**headers, mirroring the long-standing(error)treatment:(pending)→FlemmaToolResultPending→DiagnosticInfo(approved)→FlemmaToolResultApproved→DiagnosticOk(rejected)→FlemmaToolResultRejected→DiagnosticWarn(denied)→FlemmaToolResultDenied→DiagnosticError(aborted)→FlemmaToolResultAborted→DiagnosticError(error)→FlemmaToolResultError→DiagnosticError(unchanged)
Each is configurable through
highlights.tool_result_<status>in setup, and each default is set withdefault = trueso colourschemes can override without opt-out ceremony. Only the bare-word suffix is decorated — the explicit modeline form(status=approved sandbox=false)stays plain, keeping the visual rule "concise = coloured, explicit = metadata." -
45968a7: Changed the default
turns.paddingfrom{ left = 1, right = 0 }to{ left = 0, right = 1 }so the turn indicator hugs the sign column with breathing room on the right. -
36b50d1: Added
try_estimate_usageto the Vertex AI and Moonshot adapters, bringing:Flemma usage:estimateand the opt-in#{buffer.tokens.input}lualine segment to both providers. Vertex queries the{model}:countTokensREST endpoint (stripsgenerationConfig); Moonshot queriesPOST /v1/tokenizers/estimate-token-count(stripsstream/max_tokens/temperature/thinking). Both endpoints are free and rate-limited separately from generation.
Patch Changes
-
37b40ff: Enabled eager input streaming for Anthropic tool calls, eliminating multi-second delays in the progress bar during large tool argument generation
-
1f76b59: Fixed two conceal-related bugs. (1) Opening a
.chatbuffer was mutating the user's globalconceallevel/concealcursorbecausenvim_set_option_valuewith only awinkey behaves like:set, not:setlocal; Flemma now passesscope = "local"so chat settings stay window-scoped. (2) Splitting or:tabedit-ing from a chat window copied chat'sconceallevelinto the new (non-chat) window because Neovim duplicates window-local options on window creation. Flemma now restores the global conceal on the new window when a non-chat buffer lands there with chat's conceal fingerprint still applied. -
63a877a: Suppress suspense notifications (e.g., "Resolving Anthropic API key...") when the dependency resolves within 600ms
-
92346da: Fixed the first diagnostic line collapsing onto the
Flemma:title when the request is blocked by multiple diagnostics. The diagnostic renderer now starts with a leading blank so the prefix sits on its own line above the list. -
a4eb39e: Fixed duplicate error notifications when the API returns a single-line JSON error body (e.g. Anthropic 429 rate limit).
_handle_non_sse_linewas buffering the line and emittingon_error, after whichfinalize_response's_check_buffered_responsere-parsed the same buffered body and emitted the error again. The line is now only buffered when it can't be handled directly, so_check_buffered_responseonly runs on genuinely unhandled bodies (multi-line JSON, non-JSON, etc.). -
694aa8b: Fixed frontmatter block vanishing at
conceallevel >= 1. Neovim's bundledmarkdown/highlights.scmsetsconceal_lines = ""on fenced-code-block delimiters — atconceallevel >= 1the fence rows render as zero-height. Because the frontmatter fold placeholder was anchored on the now-concealed opening fence, the whole collapsed fold disappeared with it. Flemma now skips the frontmatter fold whenvim.wo.conceallevel >= 1: the delimiter lines stay concealed, the body renders inline with its language highlighting, and there is no collapsed placeholder to lose. The behaviour is driven by the live window option, so togglingediting.concealat runtime switches modes without a buffer reload. Seedocs/conceal.md"Folds andconceal_lines" for the drawline layering that forces this. -
375b544: Fixed
<Space>throwingE490: No fold foundwhen pressed on frontmatter while conceal is on. Flemma now shows a short info message naming the active conceallevel instead of an error. -
98f0924: Fixed a ghost progress-bar icon that could linger in the gutter after a request completed. Bar's
WinClosedhandler released both float handles (_float_winidand_gutter_winid) whenever either float was closed externally, but did not close the twin float — leaving it orphaned beyond the reach of any subsequent_renderordismiss()call. The handler now closes the still-open twin before scheduling the re-render, so the progress bar fully clears when the agent finishes. -
90c4903: Closed a remaining gap in the ghost progress-bar fix: even after the
WinClosedtwin-close patch, an orphan gutter float could survive when the close path didn't fireWinClosed(close inside a non-nested autocmd,:tabclosecascade silence) or whenpcall(nvim_win_close)silently failed.Bar:dismissnow force-deletes the bar's scratch buffers, which Neovim resolves by closing every window showing them — reaching orphan floats the bar lost track of. -
e613f18:
normalize.resolve_max_tokensnow honoursmin_output_tokenson model info as a lower bound. Values below the model's minimum are raised to the minimum with a warning, and percentage-basedmax_tokensvalues use the larger ofMIN_MAX_TOKENSor the model's minimum as their floor. Affects Moonshot Kimi K2.x thinking-capable models where the API rejectsmax_tokensbelow 16,000. -
79d4eca: Routed all internal notifications through the new
flemma.notifymodule — centralising dispatch, implicitvim.schedulewrapping,once-dedup, and lazy nvim-notify backend detection. Users with rcarriga/nvim-notify installed automatically get rich notifications (titles, icons, replace-in-place, dedup); users on vanillavim.notifysee no behavior change. -
451f5eb: Fixed plugin installation failure on nixpkgs (and other eager require-checkers) when rcarriga/nvim-notify is not installed.
flemma.integrations.nvim_notifyused to hard-requirenotifyat module load; it now pcalls the require so the module loads cleanly in isolation andflemma.notifyfalls back tovim.notify. Users with nvim-notify installed see no behavior change. -
bb8af07: Added optional
nvim-treesitter-contextintegration that disables the sticky-context window on.chatbuffers. Wirerequire("flemma.integrations.nvim-treesitter-context").on_attach(or.wrap(existing)) into your treesitter-context config. Internal rename:flemma.integrations.devicons→flemma.integrations.nvim-web-deviconsandflemma.integrations.nvim_notify→flemma.integrations.nvim-notify— user-facing config keys (integrations.devicons.*) and internal type identifiers (flemma.integrations.Devicons,flemma.integrations.NvimNotify) are unchanged. -
5a42488: Preserve OpenAI assistant message phases when replaying Responses API history.
-
aa4a591: Omit OpenAI
reasoningrequest fields for models that do not support reasoning effort, while preserving docs-backed effort mappings for pro reasoning models. -
c591f7d: Fixed
thinking = falseon OpenAI reasoning models to sendreasoning.effort = "none"instead of silently defaulting to the model's default effort level -
387b2e4: Added OpenAI support for
:Flemma usage:estimateand the opt-in#{buffer.tokens.input}statusline segment viaPOST /v1/responses/input_tokens. -
0527b76: Fixed preset parameter merge bypassing schema coercion (e.g.,
thinking = "low"staying as a raw string instead of being normalized to{ level = "low", foreign = "preserve" }) -
1547404: Refactor: consolidated try_estimate_usage orchestration into a shared base.send_count_tokens helper. Adapters now declare only endpoint, body transformer, and response parser.
-
22f5297: Fixed inconsistent
FlemmaToolUseTitle/FlemmaToolResultTitlehighlighting where only the first**Tool Use:**/**Tool Result:**header in a role block received the dedicated highlight while subsequent ones were rendered as plain text. Vim's default syntax sync (maxlines=60) could leave the outerFlemmaSystem/FlemmaUser/FlemmaAssistantregion unmatched after a fenced code block between headers, so the containedFlemmaToolUse/FlemmaToolResultregions had nowhere to anchor. Addedsyntax sync match … groupheredirectives on the three role markers so every header now picks up its title highlight regardless of position. The issue became visually obvious onceediting.conceal = "2nv"hid the**markers, but was latent in all prior versions. -
b03d3ca: Refreshed the default visuals:
- Tool fold icons now distinguish request from response:
⬡(hollow hexagon) for tool_use and⬢(filled hexagon) for tool_result, replacing the shared◆glyph. Both share theFlemmaToolIconhighlight group. @Systemand@Youmessages now carry subtle background tints by default (#101112/#202122), making role transitions legible even when rulers are hidden.@Assistantstays onNormalso the eye rests on the LLM output.- Thinking blocks softened to dark gray on near-black (
bg:#000000 fg:#333333), replacing the prior teal-tinted palette.
Override any of these under
highlights.*andline_highlights.*to restore the previous look. - Tool fold icons now distinguish request from response:
-
cdbf9a0: Fixed tool-result previews vanishing at
conceallevel>=1. Tree-sitter's markdown query setsconceal_lines = ""on fenced-code delimiter lines, so anchoring virtual-line extmarks on the opening fence caused them to be hidden along with the delimiter. Now the virt_line anchors on the blank line between the**Tool Result:**header and the opening fence when conceal is active, keeping the preview visible under the defaultediting.conceal = "2nv". The original inside-the-fence anchor is preserved atconceallevel=0. -
ee446b4: Fixed tool preview virt_lines showing Normal bg instead of the surrounding role bg when
line_highlightsis enabled.line_hl_groupon a range extmark does not propagate to virtual lines Neovim inserts inside that range, so the preview row rendered a visible stripe against the@Yourole's tinted background (exposed by the refreshed default palette that gave@Youa distinct bg). The preview text chunk now combinesFlemmaToolPreviewfg withFlemmaLineUserbg, and a padding chunk extends that bg across the text area width to match howline_hl_groupfills real buffer lines. -
ab29deb: Fixed file references with spaces in filenames (e.g.,
image (1).png) breaking the preprocessor — the read tool now URL-encodes paths before emitting@./path;type=mimereferences -
0b6bdba: Fixed Vertex adapter reporting a spurious error when Gemini returns an empty response with
finishReason: "STOP" -
268ef56: Fixed Vertex adapter using "unknown" for
functionResponsenames when tool IDs originate from another provider (e.g., Anthropic'stoolu_*format)
0.10.0
Minor Changes
- 72eeb7a: Added binary content support in tool results. The read tool now detects binary files (images, PDFs) and emits file references instead of raw bytes. Providers that support mixed content (Anthropic, OpenAI Responses, Vertex) send images and PDFs natively; providers that don't (OpenAI Chat, Moonshot) fall back to text placeholders with a diagnostic warning.
- 65f80df: Added mcporter tool integration: dynamically discovers MCP servers and registers their tools as Flemma tool definitions. Configure via
tools.mcporterwith include/exclude glob patterns. Disabled by default. - 5ddd354: Added
mime.detect(filepath)as the single public entry point for MIME detection — tries extension-based lookup first, falls back to thefilecommand. Addedmime.is_binary(mime_type)for classifying MIME types as binary vs textual. The previousget_mime_type()andget_mime_by_extension()methods are now internal. - f921664: Promoted LSP and exploration tools (find, grep, ls) out of experimental. LSP is now configured via
lsp = { enabled = true }(top-level). The three exploration tools are enabled by default. Theexperimentalconfig section is now empty and strict — any keys passed to it will produce a validation error. - 5ddd354: Added
@~/pathfile reference syntax for home-directory relative paths, alongside the existing@./and@../. The~is expanded at evaluation time, keeping.chatfiles portable across machines. - ad7227e: Use colon as internal tool name separator with wire encoding to double underscore for LLM APIs
- e3f6e0e: Added shared tool output overflow handling: when bash or MCP tool results exceed 2000 lines or 50KB, the full output is saved to a configurable temp file and the model receives truncated content with instructions to read the full output. The overflow path format is configurable via
tools.truncate.output_path_format. - 1e20943: Added
User-Agent: flemma.nvim/X.Y.Z Neovim/A.B.Cheader to all API requests, backed by a version module that is automatically kept in sync with releases via CI
Patch Changes
- e86eafe: Fixed autopilot skipping throttled auto-approved tools when pending (non-auto-approved) tools coexist in the same response
- 2cdde26: Fixed HTTP 417 errors from Vertex AI caused by cURL's default
Expect: 100-continueheader - 0de4dd0: Status buffer now auto-refreshes when async tool sources finish loading, replacing the "loading" indicator with a "finished" confirmation
- e698820: Fixed tool preview disappearing during execution. The virtual line preview (e.g.,
bash: print Hello — $ sleep 5 && echo Hello) now remains visible while a tool is executing, not just while pending approval.
0.9.0
Minor Changes
-
1d9b496: Auto-generate EmmyLua config types from the schema DSL via
make types -
568f684: Added Moonshot AI (Kimi) provider with support for kimi-k2.5 thinking, tool calling, and all Kimi/Moonshot models. Introduced a reusable Chat Completions base class (openai_chat.lua) for OpenAI-compatible APIs.
-
f4714f9: Temperature is now optional with no default. Previously Flemma always sent
temperature: 0.7to provider APIs, which caused reasoning-native models (gpt-5-mini, o-series) to reject requests entirely. Temperature is now omitted unless explicitly set by the user, letting each API use its own default (typically 1.0).If you previously relied on the implicit 0.7 default for less random responses, add
temperature = 0.7to your setup config or chat frontmatter.Note: temperature is no longer silently stripped when set alongside reasoning/thinking. If you explicitly set both, the API will reject the request — correct this by removing the temperature setting.
-
c5aac07: Split monolithic models.lua into per-provider data modules under lua/flemma/models/, allowing providers to declare their own model data via metadata.models. Added pricing.high_cost_threshold config option (default 30) replacing the hardcoded constant.
-
3aa501b: Removed the signs feature and replaced it with a
turnsconfig schema (turns.enabled,turns.padding,turns.hl) and aFlemmaTurnhighlight group linked toFlemmaRuler. -
2bb0d2a: Expose
os.date,os.time,os.clock, andos.difftimein the template sandbox, enabling date/time formatting in expressions (e.g.,{{ os.date("%B %d, %Y") }}). Dangerousos.*functions (execute,exit,getenv,remove, etc.) remain excluded. -
6278037: Extended the modeline parser with quote-aware tokenization, type coercion for positional arguments, single and double quote support with backslash escaping, comma-separated list values, and empty value handling (
key=→ nil,key=""→ empty string). -
0371511:
<Space>now toggles the entire message fold instead of the fold under the cursor. Nested folds (thinking, tool use/result) are closed along the way so the message reopens cleanly. Frontmatter folds are also toggled when the cursor is outside any message. Usezafor the previous per-fold toggle behavior. -
d7cea2e: Added turn detection and statuscolumn rendering module for visual turn boundaries in the gutter
-
fcf28d7: Template expressions now handle
}}and%}inside Lua string literals, comments, and table constructors without breaking. Previously,{{ "email={{ customer.email }}" }}would crash because the parser matched the first}}it found regardless of context. -
0ba2eba: Added
print()support in template code blocks —{% print("text") %}now emits directly into the template output instead of going to stdout. Arguments are concatenated with no separators and no trailing newline, giving full whitespace control to the template author. -
ccd9646: Unified presets:
config.tools.presetsmerged into top-levelpresets. Presets can now carryprovider,model,parameters, andauto_approvefields — enabling composite presets like$explorethat switch both model and tool approval in one:Flemma switchcall. Built-in$defaultrenamed to$standard(approves read, write, edit, find, grep, ls);$readonlyupdated to include find, grep, ls. Read-only tools (find, grep, ls) are now approved via the$standardpreset instead of the sandbox auto-approval path. Schema validates preset key$prefix at finalize via newMapNodedeferred key validation.:Flemma statusnow shows (R) icon for runtime-sourced tool approvals.
Patch Changes
- 8b4b516: Send document title metadata on Anthropic PDF blocks so Claude can see the filename
- 5dd4c2d: Fixed Anthropic API rejection when text content appears after tool_use blocks in assistant messages by reordering content blocks to text-before-tool_use
- f848083: Centralized sink buffer name sanitization in the sink module. Callers no longer need to sanitize names themselves —
sink.create()handles it automatically, keeping alphanumerics, dots, hyphens, underscores, and colons while collapsing consecutive hyphens. Sink buffer names are now more readable (e.g.flemma://sink/http/https:-api.anthropic.com-v1-messages#1instead offlemma://sink/http/https-//api-anthropic-com/v1/messages#1). Removed unusedcontrib/extras/sink_viewer.lua. - e031c1f: Fixed crash and stuck spinner when a provider request completes while the command-line window (q:) is open
- b9c9f6e: Standardized vim.notify prefix to "Flemma: " across all notification call sites
- c2bc110: Silenced test suite output: passing specs emit a one-line summary, failing specs show only the failure details
- b8ad1a9: Fixed
:Flemma switchignoringkey=syntax for clearing parameters (e.g.,temperature=to unset a setup default) - 4befc56: Unified all monetary formatting into a single
format_moneyfunction with smart precision: integers show no decimals, values >= $1 use 2, values in [0.01, 1) use 3, and sub-cent values use 4 (trailing zeros past the 2nd decimal are stripped) - 486a03a: Updated model definitions and pricing: added gpt-5.4-mini, gpt-5.4-nano, gpt-5.4-2026-03-05; updated context windows for claude-opus-4-6, claude-sonnet-4-6 (1M), gpt-5.4, gpt-5.4-pro (922K); fixed o4-mini cache pricing; removed retired models (gemini-3-pro-preview, gpt-4-0125-preview, gpt-4-1106-preview, gpt-4-0314)
0.8.0
Minor Changes
-
4ca6f8e: Added
editing.auto_promptoption (defaulttrue) that prepends@You:to empty.chatbuffers on open, giving new users a clear starting point. -
d8a1187: Replaced the configuration system with a layered, schema-backed copy-on-write store.
The new system introduces a schema DSL for declarative config shape definition, a four-layer store (DEFAULTS, SETUP, RUNTIME, FRONTMATTER) with separate scalar (top-down first-set-wins) and list (bottom-up accumulation) resolution, read/write proxy metatables for ergonomic access, and a DISCOVER callback pattern that lets tool, provider, and sandbox modules register their own config schemas at load time without coupling the schema definition to heavy modules.
All configuration access now goes through a single public facade (
require("flemma.config")). The legacy flat merge (vim.tbl_deep_extendinconfig.lua), the global config cache (state.get_config/state.set_config), and the per-buffer opt overlay (buffer/opt.lua) have all been removed. Frontmatter evaluation writes directly to the FRONTMATTER layer of the store, andflemma.optis now a write proxy into that layer.Providers are now request-scoped — constructed inline per
send_to_provider()call with per-buffer parameters, captured in closures, and GC'd after the request completes. The global mutable provider instance, the parameter override diffing machinery, andconfig_manager.luahave been dissolved intocore.lua(orchestration) andprovider/normalize.lua(pure parameter normalization functions).The approval system is unified into a single config resolver that reads the resolved
tools.auto_approvefrom the layer store, replacing the previous two-resolver pattern (config + frontmatter at separate priorities). Presetdenylists have been removed — an auto-approve policy that denies is a contradiction.:Flemma statusnow shows right-aligned layer source indicators (D/S/R/F) on provider, model, parameter, and tool lines, and a verbose view with per-layer ops and a schema-walked resolved config tree.Test coverage includes 9 new config test suites (store, proxy, schema, definition, alias, list ops, DISCOVER, lens, integration) alongside migration of ~30 existing test files to the new facade.
-
1cda981: Add deferred semantic validation to config schema nodes. Tool names in frontmatter and setup config are now validated against the tool registry at finalize time, with "did you mean?" suggestions for typos.
-
fb5f241: Added devicons integration that auto-registers a .chat file icon with nvim-web-devicons (or other compatible devicons plugins). Enabled by default — configure via
integrations.devicons.enabledandintegrations.devicons.icon. -
3fcb594: Fold previews now show tool labels (the LLM's stated intent) prominently, with raw technical detail visually subordinate.
Tool
format_previewfunctions can now return{ label?, detail? }instead of a plain string, wheredetailmay be astring[](joined with double-space upstream for uniform display). Built-in tools (bash, read, write, edit, grep, find, ls) have been updated to use the structured return. String-returningformat_previewfunctions are fully backward-compatible. New highlight groupsFlemmaToolLabel(italic) andFlemmaToolDetail(default: Comment) style the two pieces independently. Label and detail are separated by an em-dash (—) in both folds and tool preview virtual lines. -
2c7661e: JSON frontmatter now supports MongoDB-style operators (append, prepend) for config writes via the
flemmakey -
4248502: The lualine component now accepts a
formatoption directly in the section config, which takes precedence overstatusline.formatin the Flemma config:{ "flemma", format = "#{provider}:#{model}" } -
8d5b6a6: Passively evaluate frontmatter on InsertLeave, TextChanged, and BufEnter so integrations like lualine see up-to-date config values without waiting for a request send. On error, the last successful frontmatter parse is preserved.
Refactored
config.finalize()to return validation failures as data instead of accepting a reporter callback, making codeblock parsers pure data functions with novim.notifyside effects. Callers now decide when and how to surface diagnostics.:Flemma statusrenders frontmatter diagnostics (parse errors, runtime errors, and validation failures) as DiagnosticError lines in the status buffer. -
948f341: Added
secrets.gcloud.pathconfig option to override the gcloud binary path, and introduced the genericflemma.config.ConfigAware<T>interface withflemma.secrets.Contextfor typed per-resolver config access -
9da24c7: Show resolved thinking value in Parameters section (e.g., "minimal → low") instead of opaque Model Info line
-
a43f5a9: Redesigned
:Flemma statusdisplay with box-drawing tree layout and extmark-based highlighting, replacing the flat text format and vim syntax file. -
d23d58d: Added per-item config layer source indicators to Autopilot and Sandbox status sections; removed redundant section-level source from Tools header; suppressed defaults-only (D) indicators
-
6f486ef: Unified schema engine: schema DSL nodes can now define tool input schemas via
to_json_schema()serialization, as an alternative to raw JSON Schema tables. Addeds.nullable()for required-but-nullable fields, chainable:optional()and:nullable()modifiers, and converted all built-in tools to use the DSL.
Patch Changes
- 68c476c: Fixed auto_write crashing when an external process modifies the .chat file on disk mid-request, which left autopilot and request state broken
- 60b8997: Unknown commands now suggest the closest match ("Did you mean 'ast:diff'?"). Also fixed a double-colon in sub-command hints when the input has a trailing colon.
- 37bba97: Fixed abort markers being stripped from historical assistant messages, which caused prompt-cache busting when the conversation grew
- 2ba5d67: Fixed approval status marking all approved tools with frontmatter indicator when only some were added by frontmatter
- e8a83b5: Fixed frontmatter marker not showing on pending/denied tools in approval status section
- 1864552: Fixed race condition where autopilot emitted "Cannot send while tool execution is in progress" when an LLM response contained both sync and async tool_use blocks.
- 48241a8: Fixed per-buffer config layer edge cases: frontmatter ops now release memory on buffer delete, provider switch notification detects higher-priority overrides, and secrets invalidation is scoped to user-initiated switches only
- 2884e7a: Fixed diagnostics accumulating across repeated requests (doubling, tripling, etc.) due to mutating the AST snapshot's error list in-place.
- 0c71954: Fixed race condition where autopilot emitted "Tool … is already executing" during heavy tool use with mixed sync/async tools in the same response.
- 2b71602: Fixed gf and LSP goto-definition on {{ include() }} expressions — navigation now uses a path-only include that resolves file paths without compiling target content, fixing failures on files containing literal {{ }} documentation
- 78213f6: Fixed tool preview virt_lines not appearing when autopilot pauses on pending tool approval
- 58f6b63: Fixed blank separator line between @You: and @Assistant: not being foldable while the assistant is streaming a response
- 6cecb3a: Fixed
:Flemma statusshowing stale autopilot state on second invocation when the cursor was already in the status split - 670e671: Fixed truncation splitting multi-byte UTF-8 characters, which produced invalid JSON request bodies rejected by the API with "surrogates not allowed"
- c1ed4d7: Removed vestigial
reset()from provider lifecycle — providers are request-scoped and single-use, so initialization is inlined intonew()and the redundant pre-request reset in client.lua is removed - 6667fb8: Resolver diagnostics: when credential resolution fails, every resolver now reports why it couldn't help, surfaced as indented sub-lines in the failure notification
- 7aa1050: Improved diagnostic error messages: config proxy, eval, and JSON parser errors now use structured error tables instead of plain strings, producing cleaner user-facing output without noisy Lua source locations and redundant context wrappers.
- 7e21ed3: Unified validation failure diagnostic output across JSON and Lua frontmatter paths
0.7.0
Minor Changes
-
d36de50: Added
ast:diffcommand for side-by-side comparison of raw and rewritten ASTs, with syntax highlighting, folding, and cursor-aware scrolling. LSP hover now uses the same tree dump format for consistent AST inspection. -
ba903a8: Add booting indicator for async tool sources:
#{booting}lualine variable,FlemmaBootCompleteautocmd, and ⏳ indicator in:Flemma status -
464a909: Added optional bufferline.nvim integration that shows a busy icon on
.chattabs while a request is in-flight. Configure withget_element_icon = require("flemma.integrations.bufferline").get_element_iconin your bufferline setup. Custom icons supported viaget_element_icon({ icon = "+" }). -
235b8e1: Added centralized cursor engine with focus-stealing prevention. System-initiated cursor moves (tool results, response completion, autopilot) are now deferred until user idle, preventing cursor hijacking during agent loops. User-initiated moves (send, navigation) execute immediately.
-
0c6e6cb: Added experimental in-process LSP server for chat buffers with hover and goto-definition support. Enable with
experimental = { lsp = true }in setup. Every buffer position returns a hover result: segments (expressions, thinking blocks, tool use/result, text) show structured dumps, role markers show message summaries with segment breakdowns, and frontmatter shows language and code. Goto-definition (gd,<C-]>, etc.) on@./filereferences and{{ include() }}expressions jumps to the referenced file, reusing the navigation module's path resolution. -
92bd667: Added three exploration tools for LLM-powered codebase navigation:
grep(content search with rg/grep fallback, --json match counting, per-line truncation),find(file discovery with fd/git-ls-files/find fallback, recursive patterns, configurable excludes), andls(directory listing with depth control). All tools use existing truncation, sink, and sandbox infrastructure. Executor cwd resolution generalized from bash-specific to per-tool. -
cf30657: Added file drift detection: warns when
@./filereferences change between requests, helping identify cache breaks and potential LLM confusion from stale conversation context -
393e18d: Added
<Space>keymap to toggle folds in.chatbuffers. Configurable viakeymaps.normal.fold_toggle; automatically skipped when the key conflicts withmapleader. -
749c1c7: Added hooks module for external plugin integration. Flemma now dispatches User autocmds at key lifecycle points: FlemmaRequestSending, FlemmaRequestFinished (with status: completed/cancelled/errored), FlemmaToolExecuting, and FlemmaToolFinished (with status: success/error). Existing autocmds (FlemmaBootComplete, FlemmaSinkCreated, FlemmaSinkDestroyed) migrated to the new hooks infrastructure.
-
e6ecdd8: Added
gfnavigation for file references and include expressions in chat buffers. Cursor on@./fileor{{ include('path') }}and pressgfto open the file or<C-w>ffor a split. Paths are resolved using the same logic as the expression evaluator, including frontmatter variables and buffer-relative resolution. -
3c6f1d5: Added LSP go-to-definition navigation between tool_use and tool_result siblings in
.chatbuffers -
b7e5c50: Added
tools.max_concurrentconfig option to limit per-buffer tool execution concurrency (default: 2, set 0 for unlimited) -
ba9b05b: Added personality system for dynamic system prompt generation via
{{ include('urn:flemma:personality:<name>') }}. Includes acoding-assistantpersonality that assembles tool listings, guidelines, environment context, and project-specific files into a complete system prompt. Tool definitions can contribute personality-scoped parts (snippets, guidelines, etc.) via a newpersonalitiesfield. -
19dc325: Added preprocessor/rewriter pipeline for extensible AST transforms before expression evaluation. File references (@./file) are now handled by a rewriter instead of inline parser logic.
-
80fc278: Added persistent progress indicator showing character count, elapsed time, and phase-specific animation throughout the full request lifecycle including tool use buffering. The indicator appears as a floating window at the bottom of the chat window when the progress line is off-screen, with spinner icon placed in the gutter to match notification bar layout. Configurable via
progress.highlightandprogress.zindex. -
308767b: Preprocessor rewriter modules can now declare their own Vim syntax rules and highlight groups via
get_vim_syntax(config), removing the need to modify the main syntax file when adding new rewriters. -
fcbce89: Sandbox variable expansion overhaul and DNS fix:
- Path variables in
rw_pathsnow useurn:flemma:cwdandurn:flemma:buffer:pathinstead of$CWDand$FLEMMA_BUFFER_PATH(breaking change for custom configs) - Added
$ENVand${ENV:-default}expansion with bash-style fallback syntax - Default
rw_pathsnow includes${TMPDIR:-/tmp},${XDG_CACHE_HOME:-~/.cache}, and${XDG_DATA_HOME:-~/.local/share}for package manager compatibility - Removed
--tmpfs /runfrom bwrap backend, fixing DNS resolution on NixOS/systemd (nscd socket was hidden) - Paths are now prefix-deduplicated (parent subsumes child)
:Flemma statusand:Flemma sandbox:statusnow show resolved rw_paths, network, and privilege policy
- Path variables in
-
f08cb7a: Added pluggable secrets module for credential resolution. Providers now declare what credentials they need (kind + service) and platform-aware resolvers handle lookup from environment variables, GNOME Keyring (Linux), macOS Keychain, and gcloud CLI. Includes TTL-aware caching with configurable freshness scaling. Existing keyring entries stored under the previous scheme are still supported via legacy fallback.
-
08ecd55: Added template code blocks (
{% lua code %}) for conditionals, loops, and logic in @System and @You messages. Added optional whitespace trimming ({%- -%},{{- -}}). Added parameterized includes:include('file.md', { name = "Alice" }). Included files now support full template syntax at any depth. Binary include mode now uses symbol keys ([symbols.BINARY],[symbols.MIME]) instead of reserved string keys, sobinaryandmimecan be used as template variable names. -
8032850: Template machinery consolidated under
flemma.templating/namespace. Environment is now extensible viatemplating.modulesconfig. Populators are functions that build the Lua table available to{{ }}and{% %}blocks. Ships two built-in populators:stdlib(standard library) anditerators(providesvalues()andeach()for concise array iteration). -
4927995: Increased default request timeout from 120s to 600s for modern thinking LLMs
-
bfc8f91: Added tmux-style format strings for the lualine statusline component. The new
statusline.formatconfig replacesthinking_formatwith a composable syntax supporting variable expansion (#{model},#{provider},#{thinking}), ternary conditionals (#{?cond,true,false}), string comparisons, and boolean operators. Variables are lazy-evaluated — only referenced variables trigger data lookups. -
5e14653: Added per-buffer tool execution concurrency limiting to prevent system overload from large batches of heavy tool calls
-
b43de9f: Updated default models: OpenAI
gpt-5→gpt-5.4, Vertex AIgemini-2.5-pro→gemini-3.1-pro-preview
Patch Changes
- 7a3fc43: Centralized formatting helpers (format_number, format_tokens, format_cost, format_size, format_percent) in flemma.utilities.string. Sub-cent costs now display with 4 decimal places everywhere, not just in the statusline.
- 15d15a3: Comprehensive documentation update: fixed stale config defaults, added missing options (max_concurrent, auto_close, progress, diagnostics, experimental LSP), created docs/extending.md covering hooks/events and credential resolution, and added new feature mentions (gf navigation, tool concurrency, file drift detection, progress bar) to README.
- 9c23aaf: Fixed emission list position overlap where trailing text after file references (e.g., the dot in
@./math.png.) shared the expression's position range instead of getting its own correct offset - d7f760b: Exposed executor.count_running() for per-buffer tool concurrency tracking
- a8cbcd1: Fixed binary file includes (e.g.,
@./image.png) crashing withVim:E976: Using a Blob as a String - 518d0fb: Fixed race conditions where nvim_get_current_buf() could resolve to the wrong buffer during async operations
- f06318d: Fixed cross-buffer personality environment leak where a background buffer's system prompt could pick up the focused buffer's cached date/time during tool-calling loops
- 2c49af3: Fixed role marker colon handler inserting a duplicate blank line when one already exists (e.g. after using
Sto retype a role header) - 6bbf347: Fixed file-references rewriter incorrectly processing @./file references in Assistant messages
- 18b05ec: Fixed parser treating inline fenced code (e.g.,
```markdown Hello!```) as fence openers, which caused subsequent @Role: markers to be missed - 6a0e27e: Fixed input token count in notifications showing only non-cached tokens for Anthropic (e.g. 10 instead of ~6,500) and added missing debug logging for cache token flow
- c6ba3b4: Fixed parser incorrectly splitting messages when role markers (
@You:,@Assistant:, etc.) appear inside fenced code blocks - 3b89ba3: Fixed parser producing per-line text segments for assistant and user messages, fixed text segments missing column positions causing wrong segment lookup, and fixed find_segment_at_position failing on multi-line segments where end_col belongs to a different line
- 0e31ec7: Fixed preprocessor runner producing structurally different ASTs for untouched text segments by adding a pre-scan early return and accumulating non-matching lines into single segments instead of splitting per-line
- 5872ed2: Fixed trailing newlines from inter-message whitespace leaking into API content blocks, causing cache-breaking prefix drift in multi-turn conversations
- 7e47167: Added
format_elapsed()duration formatting utility to string module - 589855d: Fixed frontmatter
auto_approve = {}(and other table assignments) not blocking sandbox auto-approval of bash. Table policies in frontmatter are now authoritative — tools not explicitly listed require approval, preventing lower-priority resolvers from granting additional approvals. - b70d052: Moved all inline require() calls to the top of each file for explicit dependency visibility. No behavioral changes.
- 0e8ca7e: Fixed include() with absolute paths doubling the directory prefix, and improved error diagnostics for include failures to show the full include chain instead of
table: 0x... - d127523: Optimized AST parsing during streaming: the parser now snapshots the document before a request and only re-parses newly appended content during streaming, reducing per-chunk parse cost from O(total_lines) to O(new_content_lines) for long conversations.
- 499d3a9: Fixed progress character counter freezing during tool use for OpenAI and Vertex providers by emitting
on_tool_inputcallback for function call argument deltas - d0a44e4: Refactored provider layer to eliminate ~370 lines of duplicated code across Anthropic, OpenAI, and Vertex providers. Base now owns the SSE parsing preamble, content emission (tool use blocks, thinking blocks, truncation warnings), and automatic sink lifecycle management. New providers need roughly one-third of the previous boilerplate.
- df1ec98: Removed viewport centering (zz) on send that caused flickering with scrolloff=999
- 6c7664c: Renamed
:Flemma diagnostics:opencommand to:Flemma diagnostics:difffor clarity - 2f44b20: Fixed
:Flemma statusshowing sandbox-auto-approved tools (e.g. bash) as "require approval" even when sandbox was active. The approval section now uses the actual resolver chain, so all approval sources (config, frontmatter, sandbox, community resolvers) are reflected accurately. - e917ea3: Fixed :Flemma status not reflecting parameter overrides from :Flemma switch commands
- b43377d: Fixed thinking level mapping for OpenAI, Anthropic, and Vertex providers. Flemma's canonical thinking levels (minimal/low/medium/high/max) are now silently mapped to valid provider API values via per-model metadata instead of being passed through raw. This fixes the "Unsupported value: 'minimal'" error when using
thinking = "minimal"with OpenAI models.
0.6.0
Minor Changes
- 6546355: Aligned all registry modules to a consistent API contract: every registry now exposes register(), unregister(), get(), get_all(), has(), clear(), and count(). Extracted shared name validation into a new flemma.registry utility module. Renamed tools registry define() to register() (define() kept as deprecated alias).
- dea4561: Notification bar background is now a blend of Normal bg (base), StatusLine bg (30%), and DiffChange fg (20%), producing a subtly tinted bar that's easier to read against the editor background
- 568fb63: Compact notification bar format: token arrows now follow numbers (129↑ 117↓), session request count is merged into the Σ label (Σ3), and the bar automatically uses relaxed double-spacing when width allows
- bb15c08: Restore CursorLine visibility on line-highlighted chat buffer lines. Blended overlay highlights preserve role-specific backgrounds while showing the cursor line, with smart toggling via OptionSet and a fg-only thinking fold preview group.
- 9459e97: Add deterministic key-ordered JSON encoder for prompt caching. API request bodies now serialize with sorted keys and provider-specific trailing keys (messages, tools) placed last, maximizing prefix-based cache hits across all providers.
- 9c0f873: Added diagnostics mode for debugging prompt caching issues. When enabled via
diagnostics = { enabled = true }, Flemma compares consecutive API requests per buffer and warns when the prefix diverges (breaking caching). Includes byte-level analysis, structural change detection, and a side-by-side diff view (:Flemma diagnostics:open). - a6618bd: Notification bar now derives all colors from DiffChange with three foreground tiers (primary, secondary, muted) and WCAG contrast enforcement on semantic cache colors. Added
^contrast operator to highlight expressions and extracted color utilities intoflemma.utilities.colorfor reuse. - bae5026: Extracted folding logic into dedicated
ui/foldingmodule with registry-based fold rules, O(1) cached fold map, and configurableauto_closeper fold type (thinking, tool_use, tool_result, frontmatter) - c56f356: Added independent folding for Tool Use and Tool Result blocks at fold level 2. Completed and terminal tool blocks auto-fold after execution, reducing visual noise. In-flight tools (pending, approved, executing) remain visible. Fold summaries reuse the same preview format as pending tool extmarks.
- 77cb82b: Added per-segment syntax highlighting to fold text lines. Fold lines now return
{text, hl_group}tuples so each part (icon, title, tool name, preview, line count) uses its own highlight group. New config keys:tool_icon,tool_name,fold_preview,fold_meta. Renamedtool_usetotool_use_titleandtool_resulttotool_result_titlefor 1:1 correspondence with highlight groups. Added sharedroles.luautility for centralised role name mapping. - 0fc8bea: Merged ruler into role marker lines:
@Role:now renders as─ Role ─────...with the ruler extending to the window edge, replacing the separate virtual line above each message - 078a3a2: Enriched model metadata matrix with per-model thinking budgets, cache pricing, and cache minimum thresholds. Thinking parameters are now silently clamped to model-specific bounds instead of hitting runtime API errors. Cache percentage indicator is suppressed when input tokens are below the model's minimum cacheable threshold. Session pricing now uses per-model absolute cache costs where available, with provider-level multipliers as fallback.
- b46f3ea: Rewrite notification bar with a priority-based layout engine and gutter icon. The 💬 prefix now renders in the gutter when space allows, freeing 3 columns for content. Renamed all FlemmaNotify* highlight groups to FlemmaNotifications* for consistency.
- 5d646e1: Added configurable
notifications.highlightandnotifications.borderoptions, and fixed notification misalignment when async plugins (git-signs, LSP) change gutter width after positioning - fe71464: Line highlights now use per-message range extmarks instead of per-line extmarks, reducing API calls from ~500 to ~20 per update. New lines created by pressing Return in insert mode are highlighted immediately via Neovim's gravity system instead of waiting for CursorHoldI.
- 652e9f6: Reprioritized notification bar segments: session cost and request input tokens now survive truncation at narrow widths. Replaced word labels with compact Unicode symbols (Σ for session totals, #N for request count, bare percentage for cache).
- 0c6e898: Role markers (
@System:,@You:,@Assistant:) now occupy their own line in.chatbuffers. Old-format files are automatically migrated on load, and a new:Flemma formatcommand is available for manual migration. Insert-mode colon auto-newline moves the cursor to a new content line after completing a role marker. - 29ba841:
:Flemma statusnow shows model metadata (context window, pricing, thinking budget range) in the Provider section for known models. Verbose mode includes a full Model Info dump. Syntax highlighting updated with model version suffixes, dollar amounts, and token count suffixes. - 46e6b25: Move shared utility modules to
flemma.utilities.*namespace and introduceflemma.utilities.bufferfor common buffer manipulation patterns
Patch Changes
- b109b62: Cancel both Space and Enter after role marker auto-newline to prevent unwanted blank lines from muscle memory
- acc51d0: Fixed spurious "A request is already in progress" warning during autopilot tool execution loops with sync tools
- a870175: Fixed CursorLine overlay flashing on every keystroke when blink-cmp completion menu is open
- 5de6e77: Fixed spurious "Cache break detected" diagnostics warning when switching between providers
- b60a533: Fix diagnostics false positive when messages grow between turns. Cache-break warnings now only fire for actual prefix-breaking changes (tools, config, system prompt), not for normal message appends at the document tail.
- 9cc706d: Fixed fold auto-close race condition where thinking blocks and tool blocks would remain unfolded ~10% of the time due to silent foldclose failures being permanently marked as successful. Also fixed folds not being applied when returning to a chat buffer after switching tabs during streaming.
- 5c87b26: Fixed fold_completed_blocks firing redundantly on every cursor movement, spamming the debug log
- 6bf2ed9: Fixed tool fold previews falling back to generic key=value format for tools registered via
config.tools.modules(e.g. extras) by ensuring lazy modules are loaded before registry lookup - a57a6dc: Fixed preview truncation (fold text, tool indicators) using byte length instead of display width, which caused incorrect truncation and potential UTF-8 splitting with multibyte content (CJK, accented characters, Unicode symbols)
- e098341: Fixed notification bar icon flickering during scrolling by replacing the 💬 emoji prefix with ℹ (U+2139), which renders reliably across terminal emulators
- 720ddab: Fixed extra space in notification bar caused by stale item width alignment from dismissed notifications
- 8686997: Fixed role_style attributes (e.g., underline) bleeding into ruler characters on role marker lines
- 84442f0: Fixed self-closing thinking tags (
<thinking .../>) creating unclosed folds that swallowed subsequent buffer content - 300525a: Fixed missing warning when pressing
<C-]>while a request is already in progress — the keypress was silently ignored instead of showing the "Use<C-c>to cancel" message - f59d94f: Fixed silent failure when API returns non-SSE error responses (plain JSON, HTML error pages, or plain text). Errors are now properly surfaced via vim.notify instead of being silently swallowed.
- 46da4a0: Fixed thinking blocks not auto-folding after the first response in a session
- 932dc68: Tool block folds now absorb trailing blank lines when the next adjacent tool block is also foldable, producing a cleaner collapsed view without vertical gaps between folded blocks
- 9386d8f: Notification recall now derives segments from session data on demand instead of caching them locally, enabling
:Flemma notification:recallto work after importing a session viasession:load() - ea006dd: Removed
ruler.adopt_line_highlightconfig option — rulers now inherit line highlight backgrounds automatically since they share the role marker line - 6478dc3: Sink buffer writes now go through writequeue for E565 textlock protection. Sink scratch buffers are set to nomodifiable, preventing users from accidentally editing them when viewed via sink_viewer.
- 5caff34: Updated OpenAI model catalog and corrected cache pricing across all models. Added gpt-5.4, gpt-5.4-pro, gpt-5.3-chat-latest, gpt-5.3-codex, gpt-5.3-codex-spark, and gemini-3.1-flash-lite-preview. Fixed cache_read values to match actual per-model pricing tiers instead of assuming a uniform 50% discount.
- 2b0bc93: Invalid role_style values (e.g., "italics") now show a helpful warning with a "Did you mean 'italic'?" suggestion instead of crashing
0.5.0
Minor Changes
- 2350bd7: Added automatic handling of aborted responses: when a user cancels (
<C-c>) mid-stream after tool_use blocks, orphaned tool calls are now automatically resolved with error results instead of triggering the approval flow. The abort marker (<!-- flemma:aborted: message -->) is preserved for the LLM on the last text-only assistant message so it can continue contextually. - 5c3aee7: Added max_input_tokens and max_output_tokens to all model definitions, enabling future context window awareness and cost prediction features
- 681ebbf: Added
flemma.sinkmodule — a buffer-backed data accumulator that replaces in-memory string/table accumulators across the codebase. Sinks handle line framing, write batching, and lifecycle management behind an opaque API. Migrated cURL streaming, bash tool output, provider response buffering, thinking accumulation, and tool input accumulation to use sinks. - 2d24104: Use Anthropic's auto-caching API for the conversation tail breakpoint, replacing manual last-user-message walking with a more robust top-level cache_control field
- 9aff386: Redesigned usage notifications with compact dotted-leader layout, cache hit percentage with conditional color highlighting, and arrow-based token display
- c574d43: Show rate limit details (retry-after, remaining quota headers) in error notifications when API returns HTTP 429, with a fallback "Try again in a moment" hint when headers are unavailable
- ee19164: Auto-approve bash tool when sandbox is enabled and a backend is available. A new resolver at priority 25 approves bash calls when sandboxing is active, so sandboxed sessions run without manual approval prompts by default. Users can opt out via
tools.auto_approve_sandboxed = falsein config, or by excluding bash from auto-approval in frontmatter (auto_approve:remove("bash")). - 8758bdd: Smart max_tokens: default is now "50%" (half the model's max output), percentage strings are resolved automatically, and integers exceeding the model limit are clamped with a warning.
:Flemma statusshows the resolved value alongside the percentage.
Patch Changes
- 1991273: Fixed auto_write not consistently writing the buffer after tool execution, denied/rejected tool processing, and
:Flemma import - 8058909: Fixed bwrap sandbox breaking nix commands on NixOS by using
--symlinkinstead of--ro-bindfor/run/current-systemand/run/booted-system, preserving their symlink nature so nix can detect store paths correctly - e4afad6: Fixed role marker highlights losing foreground color when the base highlight group only defines background, and fixed spinner background not inheriting line highlight colors
- b767a0d: Fixed pending tool blocks with user-provided content being silently discarded. When a user pastes output into a
flemma:tool status=pendingblock and presses<C-]>, the content is now accepted as the tool result and sent to the provider instead of being replaced by a synthetic error. - 80eb9fc: Fixed E565 textlock errors when visual-mode plugins (e.g., targets.vim) hold textlock while streaming responses complete. All async buffer modifications now go through a per-buffer FIFO write queue that retries on textlock.
- 0c333ef: Added FlemmaSinkCreated and FlemmaSinkDestroyed user autocmd events for observing sink lifecycle
- 2d24104: Fixed non-deterministic tool ordering in Vertex provider that was causing implicit cache misses on every request
0.4.0
Minor Changes
-
ffe72b3:
tools.auto_approvenow accepts astring[]of module paths (and mixed module paths + tool names). Internal approval resolver names useurn:flemma:approval:*convention; module-sourced resolvers are addressable by their module path directly. -
fae1e16: Added dynamic module resolution for third-party extensions. Lua module paths (dot-notation strings like "3rd.tools.todos") can now be used in config.provider, config.tools.modules, config.tools.auto_approve, config.sandbox.backend, and flemma.opt.tools to reference third-party modules without explicit require() calls. Modules are validated at setup time and lazily loaded on first use.
-
3cf9fe3: Refactor tool definitions to use ExecutionContext SDK — tools now code against
ctx.path,ctx.sandbox,ctx.truncate, andctx:get_config()instead of requiring internal Flemma modules directly -
75e34c8: Moved calculator and calculator_async tools from built-in definitions to lua/extras (dev-only); production builds no longer ship calculator tools
-
974eac1: Auto-approve policy now expands -prefixed preset references, allowing `auto_approve = { "default", "$readonly" }` to union approve/deny lists from the preset registry. Config-level resolvers defer to frontmatter when it sets auto_approve, enabling per-buffer override of global presets.
-
ef6a932: Removed all backwards-compatibility layers from the Claudius-to-Flemma migration. This is a breaking change for users who still rely on any of the following:
Removed:
require("claudius")module fallback. Thelua/claudius/shim that forwarded torequire("flemma")has been deleted. Update your config torequire("flemma").Removed: legacy
:Flemma*commands. The individual commands:FlemmaSend,:FlemmaCancel,:FlemmaImport,:FlemmaSendAndInsert,:FlemmaSwitch,:FlemmaNextMessage,:FlemmaPrevMessage,:FlemmaEnableLogging,:FlemmaDisableLogging,:FlemmaOpenLog, and:FlemmaRecallNotificationhave been removed. Use the unified:Flemma <subcommand>tree instead (e.g.,:Flemma send,:Flemma cancel,:Flemma message:next).Removed:
"claude"provider alias. Configs specifyingprovider = "claude"will no longer resolve to"anthropic". Update your configuration to use"anthropic"directly.Removed:
reasoning_formatconfig field. The deprecatedreasoning_formattype annotation (alias forthinking_format) has been removed fromflemma.config.Statusline.Removed:
resolve_all_awaiting_execution()internal API. This backwards-compatibility wrapper inflemma.tools.contexthas been removed. Useresolve_all_tool_blocks()and filter for the"pending"status group instead. -
50eea2b: Rich fold text previews for message blocks. Folded
@Assistantmessages now show tool use previews (e.g.bash: $ free -h | bash: $ cat /proc/meminfo (+1 tool)), and folded@Youmessages show tool result previews with resolved tool names (e.g.calculator_async: 4 | calculator_async: 8). Expression segments are included in fold previews, consecutive text segments are merged, and runs of whitespace are collapsed to keep previews compact. -
5b637d2: Added an Approval section to
:Flemma statusshowing auto-approve, deny, and require-approval classification per tool with preset expansion. Frontmatter overrides are marked with ✲ on individual items across Tools, Approval, Parameters, and Autopilot sections, with a conditional legend at the bottom. -
cd97ff5: Added tool approval presets for zero-config agent loops. Flemma now ships with
$readonlyand$defaultpresets. The defaultauto_approveis{ "$default" }, which auto-approvesread,write, andeditwhile keepingbashgated behind manual approval. Users can define custom presets intools.presetsand reference them inauto_approve. Frontmatter supportsflemma.opt.tools.auto_approve:remove("$default")and:remove("read")for per-buffer overrides. -
0617d2c: Changed tool execute function signature from
(input, callback, ctx)to(input, ctx, callback?)— sync tools no longer need a placeholder_argument, and callback-last ordering matches Node.js conventions -
5de4f32: Tools now resolve relative paths against the .chat buffer's directory (
__dirname) instead of Neovim's working directory, matching the behavior of@./filereferences and{{ include() }}expressions. Thetools.bash.cwdconfig defaults to"$FLEMMA_BUFFER_PATH"(set tonilto restore the previous cwd behavior). -
ff794c4: Added tool approval presets configuration field and wired preset registry into plugin initialization with
{ "$default" }as the default auto_approve policy
Patch Changes
-
5035b41: Fixed
flemma.opt.tools.auto_approve:append()failing when auto_approve was not explicitly assigned first in frontmatter -
4062653: Fixed bwrap sandbox hiding NixOS system packages by re-binding
/run/current-systemread-only after the/runtmpfs mount -
93b79e8: Frontmatter is now evaluated exactly once per dispatch cycle instead of 2N+2 times (where N = number of tool calls), reducing redundant sandbox executions and preventing potential side-effects from repeated evaluation.
-
ec0072b: Updated model definitions with latest pricing and availability data from all three providers.
Anthropic: Removed retired Claude Sonnet 3.7 and Claude Haiku 3.5 models (retired Feb 19, 2026). Updated Claude Haiku 3 deprecation comment to reflect April 2026 retirement date.
Vertex AI: Added Gemini 3.1 Pro Preview (
gemini-3.1-pro-preview). Removed superseded preview-dated aliasesgemini-2.5-flash-preview-09-2025andgemini-2.5-flash-lite-preview-09-2025.OpenAI: No changes — all existing models and pricing confirmed current against official documentation.
0.3.0
Minor Changes
- e5a9b6f: Added
:Flemma statuscommand that displays comprehensive runtime status (provider, model, merged parameters, autopilot state, sandbox state, enabled tools) in a read-only scratch buffer. Use:Flemma status verbosefor full config dump.:Flemma autopilot:statusand:Flemma sandbox:statusnow open the same status view with cursor positioned at the relevant section. - 9fc147c: Tool definitions can now provide an optional
format_previewfunction for custom preview text in tool status blocks. All built-in tools (calculator, bash, read, edit, write) include tailored previews showing the most relevant input at a glance. - 6f8b455: Added support for
model = "$preset-name"in config to use a preset as the startup default, avoiding duplication of provider/model/parameters at the top level - f20492f: Added virtual line previews inside tool status blocks showing a compact summary of the tool call, so users can see what they are approving or rejecting
- 9bd2785: Unified tool execution into a three-phase advance algorithm with explicit status semantics (
flemma:tool status=pending|approved|rejected|denied), replacing the oldflemma:pendingmarker and separate autopilot/manual flows - 299702f: Added Claude Sonnet 4.6 as the new default Anthropic model, removed retired chatgpt-4o-latest, added o3-pro snapshot, and updated Gemini 2.0 retirement dates
Patch Changes
- 6a5cb12: Fixed Sonnet 4.6 to use adaptive thinking instead of deprecated budget_tokens, clamped
maxeffort tohighon non-Opus models, and added budget_tokens < max_tokens guard for budget-based models - e4933aa: Preview text for tool blocks and folded messages now sizes dynamically to the editor width instead of using a fixed 72-character limit
- 41c130b: Fixed bash tool failing with heredoc commands by replacing
{ cmd; } 2>&1group wrapping withexec 2>&1prefix - 1ca55b2: Fixed cross-provider parameter merge bug where provider-specific config keys (e.g.,
project_id) were silently dropped when switching providers via presets - e4ddd0b: Fixed JSON null values decoding as vim.NIL (truthy userdata) instead of Lua nil, causing crashes in tool definitions when LLMs send null for optional parameters like offset, limit, timeout, and delay
- f88449f: Fixed thinking preview counter disappearing when models emit whitespace-only text before thinking blocks (e.g. Opus 4.6 with adaptive thinking)
- 0af66ea: Moved session reset API from
require("flemma.state").reset_session()torequire("flemma.session").get():reset()
0.2.0
Minor Changes
- 7cccfc6: Adopted semantic versioning (semver) and changesets for automated version management and changelog generation. The project transitions from the previous CalVer (
vYY.MM-N) scheme to standard semver, starting at0.1.0. - c22dd05: Added Anthropic stop reason handling (max_tokens warns, refusal/sensitive surface as errors) and adaptive thinking for Opus 4.6+ models (auto-detected, sends effort level instead of deprecated budget_tokens)
- 4471a07: Added autopilot: an autonomous tool execution loop that transforms Flemma into a fully autonomous agent. After each LLM response containing tool calls, autopilot executes approved tools, collects results, and re-sends the conversation automatically – repeating until the model stops calling tools or a tool requires manual approval. Includes per-buffer frontmatter override (
flemma.opt.tools.autopilot), runtime toggle commands (:Flemma autopilot:enable/disable/status), configurable turn limits, conflict detection for user-edited pending blocks, and full cancellation safety via Ctrl-C. - 05809d5: Added
minimalandmaxthinking levels, expanding from 3 to 5 gradations (minimal | low | medium | high | max). Budget values forlow(1024 → 2048) andhigh(32768 → 16384) were adjusted to align with upstream defaults and make room for the new levels. Each provider maps the canonical levels to its API: Anthropic mapsminimal→lowand passesmaxon Opus 4.6; OpenAI mapsmax→xhighfor GPT-5.2+; Vertex mapsminimal→MINIMAL(Flash) orLOW(Pro) and clampsmaxtoHIGH. - 907b787: Added filesystem sandboxing for tool execution. Shell commands now run inside a read-only rootfs with write access limited to configurable paths (project directory, .chat file directory, /tmp by default). Enabled by default with auto-detection of available backends; silently degrades on platforms without one. Includes Bubblewrap backend (Linux), pluggable backend registry for custom/future backends, per-buffer overrides via frontmatter, runtime toggle via :Flemma sandbox:enable/disable/status, and comprehensive documentation.
- 76c635e: Added Gemini 3 model support: uses
thinkingLevelenum (LOW/MEDIUM/HIGH) instead of numericthinkingBudgetfor gemini-3-pro and gemini-3-flash models - e6b53e2: Added approval resolver registry and per-buffer approval via frontmatter. Tool approval is now driven by a priority-based chain of named resolvers – global config, per-buffer frontmatter (
flemma.opt.tools.auto_approve), and custom plugin resolvers are all evaluated in order. Consolidated tool documentation intodocs/tools.md. - 629dfda: Sandbox enforcement for write and edit tools – both now check
sandbox.is_path_writable()before modifying files and refuse operations outsiderw_paths - dcaa5be: Add unified
thinkingparameter that works across all providers – setthinking = "high"once instead of provider-specificthinking_budgetorreasoning. The default is"high"so all providers use maximum thinking out of the box. Provider-specific parameters still take priority when set. Also promotescache_retentionto a general parameter, consolidatesoutput_has_thoughtsinto the capabilities registry, clamps sub-minimum thinking budgets instead of disabling, and supportsflemma.opt.thinkingin frontmatter for provider-agnostic overrides. - 93f4b68: Added proactive token refresh and reactive auth-error recovery for Vertex AI provider, eliminating the need to manually run
:Flemma switchwhen OAuth2 tokens expire
Patch Changes
- c22dd05: Fixed OpenAI top-level stream error events being silently discarded; they now properly surface as errors
- a59da49: Fixed tool completion indicators being prematurely dismissed during concurrent execution and autopilot
- 784fe5a: Fixed Vertex AI safety-filtered responses silently appearing as successful completions; SAFETY, RECITATION, and other error finish reasons now properly surface as errors
- 5b6b5af: Fixed Vertex AI thinking signature retention during streaming; empty or non-string
thoughtSignaturechunks no longer overwrite a valid cached signature - 784fe5a: Fixed Vertex AI tool response format to use
outputkey instead ofresult, matching the Google SDK convention - 7bf8d64: Fixed Vertex AI tool declarations rejecting nullable types by switching to
parametersJsonSchemaon v1beta1 API - 9995605: Flash a brief "● Pending" indicator on tool result headers awaiting user approval
Historical Releases (CalVer)
The releases below used the vYY.MM-N CalVer scheme and were manually curated.
Starting with 0.1.0, versioning follows semver and changelogs are generated by
changesets.
v25.10-1 – 2025-10-14
Added
- Introduce a single
:Flemmacommand tree with sub-commands for sending, cancelling, navigation, logging, notification recall, and importing Claude Workbench snippets. - Add provider presets so aliases declared via
setup({ presets = { … } })surface in:Flemma switchand completion menus before built-in providers. - Implement a reusable modeline/parser utility so positional arguments and
key=valueoverrides behave consistently across commands and configuration files. - Add multi-language frontmatter parsers (Lua and JSON) with automatic detection and richer error messaging.
- Expand the templating sandbox with an
include(path)helper plus access tovim.fnandvim.fs, enabling modular prompt composition with circular-include detection. - Add highlight hooks for
{{ expressions }}and@./filereferences, configurablethinking_tagandthinking_blockextmark highlights, and table-based highlight attribute support. - Introduce a floating notification system with recall support (
:Flemma notification:recall) and stacked window positioning to avoid overlap. - Add a lualine component at
require("lualine.components.flemma")that reports the active model and OpenAI reasoning effort while refreshing automatically when providers change. - Bundle tooling helpers in the Nix shell, including
flemma-fmt,flemma-amp, and the newflemma-codexOpenAI CLI wrapper. - Add MIME type override support for attachments via
@./file;type=mime/typeto satisfy provider-specific requirements.
Changed
- Rename the project and runtime modules from
claudius.*toflemma.*, refresh syntax files, and update all highlight group prefixes. - Raise the minimum supported Neovim version to 0.11+ to leverage the new Tree-sitter folding APIs and
vim.fshelpers. - Update provider metadata with the latest model lists and pricing (Claude Sonnet/Opus 4.x, GPT‑5 family, Gemini 2.5 series) while surfacing capability flags such as reasoning, thinking budgets, and thought outputs.
- Rework usage reporting so request notifications include the provider/model, aggregate reasoning/thinking tokens (
⊂ thoughts), and automatically cost thought tokens. - Improve buffer UX by temporarily locking buffers during requests, excluding spinners from spell checking, skipping
<thinking>sections in message text objects, and guarding fold updates. - Overhaul the README with end-to-end setup guidance, provider-specific walkthroughs, and detailed templating/file attachment docs aligned with the refactored plugin.
- Move Claude Workbench import support into the Claude provider so other providers opt in via
try_import_from_buffer. - Warn on invalid provider or model configuration and fall back to safe defaults instead of silently reverting to Claude.
- Update Vertex AI binary attachments to include the filename in the
displayNamefield for inline data.
Deprecated
- Deprecate legacy
:Claudius*and:Flemma*shim commands in favor of the consolidated:Flemmacommand tree.
Removed
- Remove the previously deprecated parser, logging, notify, and provider shims that were kept for compatibility.
Breaking
- Change
frontmatter.parseto return(language, code, content)and require passing the language intofrontmatter.execute, reflecting the new multi-language parser registry. - Change
buffers.parse_bufferto return(messages, frontmatter_code, context)after introducing immutable context objects for template evaluation. - Refactor provider integrations to use the
Promptclass, shared response accumulator, and provider-specifictry_import_from_buffer; custom providers must callbase.reset(self)and adopt the new API. - Restructure public modules by moving UI helpers to
flemma.ui, buffer helpers toflemma.core.buffers, and exportingflemma.configdirectly as a table, so external integrations must update theirrequirepaths. - Switch HTTP fixture registration to domain-based patterns via the extracted client module, requiring custom fixtures to target hostnames instead of models.
Fixed
- Surface diagnostics when attachments reference missing or unsupported files, strip trailing punctuation from MIME overrides, and fall back to extension-based detection when the
filebinary is unavailable. - Correct Vertex AI defaults by defaulting
locationtoglobal, fixing the global endpoint hostname, and clearing cached credentials on provider switches. - Resolve Vertex AI authentication edge cases when service-account JSON comes from environment variables or Secret Service.
- Ensure OpenAI requests honor
reasoningsettings by sendingreasoning_effortandmax_completion_tokens. - Prevent spinner cleanup from leaving blank lines, schedule spinner updates to avoid E565 errors, and guard fold operations to eliminate E490 fold-close failures.
- Fix
:Flemma switchcompletion to list user presets before built-in providers for predictable alias selection. - Prevent frontmatter from executing during UI refresh events by parsing messages without evaluation.
- Restore
{{ }}template expressions in chat messages, clone contexts immutably, and report accurate filenames in template errors. - Handle cancellation of completed requests gracefully by ignoring invalid channel errors and issuing friendly warnings.
- Harden Claude Workbench import by logging failed snippets and prepared JSON to
flemma_import_debug.log.
v25.06-1 – 2025-06-02
Added
@fileReferences:- Implemented robust support for
@./path/to/filereferences in user messages across all providers (Claude, OpenAI, Vertex AI). - Files are read, their MIME types detected (requires the
filecommand-line utility), and content is base64 encoded for inclusion in API requests. - Claude Provider: Supports images (JPEG, PNG, GIF, WebP) and PDFs as
imageanddocumentsource types respectively. Text files (text/*) are embedded as text blocks. - OpenAI Provider: Supports images (JPEG, PNG, WebP, GIF) as
image_urlparts. Text files (text/*) are embedded as text parts. PDF files are also included as base64 encoded data (note: direct PDF support in chat completion API might vary by model). - Vertex AI Provider: Supports generic binary files as
inlineDataparts. Text files (text/*) are now sent as distinct text parts rather thaninlineData. - File paths can be URL-encoded (e.g., spaces as
%20) and will be automatically decoded. - Trailing punctuation in file paths (e.g., from ending a sentence with
@./file.txt.) is ignored for robustness. - Notifications are shown if a file is not found, not readable, or its MIME type is unsupported by the provider for direct inclusion; in such cases, the raw
@./path/to/filereference is sent as text. - Extracted MIME type detection to a new utility module
lua/claudius/mime.lua.
- Implemented robust support for
- Vertex AI "Thinking":
- Added support for Vertex AI's "thinking" feature (experimental model capability).
- New
thinking_budgetparameter underparameters.vertexinsetup()allows specifying a token budget for model thinking.nilor0disables thinking by not sending thethinkingConfigto the API.- Values
>= 1enable thinking with the specified budget (integer part taken).
- When enabled, "thinking" from the model are streamed and displayed in the chat buffer, wrapped in
<thinking>...</thinking>tags. - These
<thinking>blocks are automatically stripped from assistant messages when they are part of the history sent in subsequent requests. - Thinking token usage is tracked and included in request/session cost calculations and notifications.
- Lualine Integration:
- Added a Lualine component to display the currently active Claudius AI model.
- The component is available as
require('lualine.components.claudius')or simply"claudius". - The model display is active only for
*.chatbuffers. - The display automatically refreshes when switching models/providers via
:ClaudiusSwitch.
- Configurable Timeouts:
- Made cURL
connect_timeout(default: 10s) andtimeout(response timeout, default: 120s) configurable. - These can be set globally in
setup()underparametersor overridden per call with:ClaudiusSwitch ... connect_timeout=X timeout=Y.
- Made cURL
- New Models Supported:
- Vertex AI:
- Added support for
gemini-2.5-pro-preview-05-06(now the default Vertex AI model). - Added support for
gemini-2.5-flash-preview-04-17.
- Added support for
- Pricing information for these new models has been added.
- Vertex AI:
- Logging:
- Added
M.warn()function to the logging module.
- Added
Changed
- README Overhaul:
- Significantly restructured and updated the README for clarity and completeness.
- Added a new screenshot.
- Reorganized sections: Installation, Requirements, Configuration, Usage.
- Clarified API key storage with a
<details>block for Linuxsecret-tool. - Moved plugin defaults into a
<details>block. - Reordered and improved Usage sub-sections (Starting a New Chat, Commands and Keybindings, Switching Providers, Lualine Integration, Templating, File References, Importing).
- Updated Lualine example to show icon usage:
{{ "claudius", icon = "🧠" }}. - Documented new configuration options (
timeout,connect_timeout,thinking_budget) and updated:ClaudiusSwitchexamples.
- Default Model:
- Vertex AI: Default model changed to
gemini-2.5-pro-preview-05-06.
- Vertex AI: Default model changed to
- Visuals & Styling:
- Default ruler character (
ruler.char) changed from─to━(Box Drawings Heavy Horizontal). - Default user sign character (
signs.user.char) changed fromnil(which defaulted to▌) to▏(Box Drawings Light Vertical). - Token usage and cost display in notifications is now better aligned for readability.
- "Thoughts" token count in usage notifications is prefixed with the subset symbol
⊂(e.g., "Output: X tokens (⊂ Y thoughts)").
- Default ruler character (
- Token Usage Display:
- Output token count in usage notifications now correctly includes any "thoughts" tokens.
- Cost calculation for output tokens now correctly includes the cost of "thoughts" tokens.
Fixed
- Error Handling:
- Prevented a new
@You:prompt from being added if an API error occurred during a request, even if the cURL command itself exited successfully. - Improved handling of cURL errors:
- Spinner (
Thinking...message) is now reliably cleaned up on cURL errors. - User is notified of cURL errors with more specific messages for common issues:
- Code 6 (
CURLE_COULDNT_RESOLVE_HOST): "cURL could not resolve host..." - Code 7 (
CURLE_COULDNT_CONNECT): "cURL could not connect to host..." - Code 28 (Timeout): Message now includes the configured timeout value.
- Code 6 (
- New
@You:prompt is not added if the cURL request itself failed.
- Spinner (
- Updated error message for when the
filecommand-line utility (for@fileMIME type detection) is not found.
- Prevented a new
- Internal:
- Corrected debug log messages in the
:ClaudiusSwitchfunction. - Standardized API key parameter access within provider modules.
- Unified OpenAI
data: [DONE]message handling. - Switched from
vim.fn.base64encodetovim.base64.encode. - Quoted filenames in various log messages for clarity.
- Corrected debug log messages in the
v25.04-1 – 2025-04-16
This release marks a major transition for Claudius, evolving from a Claude-specific plugin to a multi-provider AI chat interface within Neovim.
Breaking Changes 💥
This version introduces significant internal refactoring and configuration changes. Please review the following and update your configuration if necessary:
-
Configuration Option Renames:
- The
prefix_styleoption withinsetup({})has been renamed torole_style.- Migration: Rename
prefix_styletorole_stylein yourrequire("claudius").setup({...})call.
- Migration: Rename
- The
ruler.styleoption withinsetup({})has been renamed toruler.hl.- Migration: Rename
ruler.styletoruler.hlin yoursetup({})call.
- Migration: Rename
- The
-
Highlight Group Renames (Affects Manual Linking Only):
- Internal syntax highlight groups used by
syntax/chat.vimhave been renamed fromChat*toClaudius*(e.g.,ChatSystem⇒ClaudiusSystem,ChatSystemPrefix⇒ClaudiusRoleSystem). - Migration: This only affects users who were manually linking these highlight groups in their Neovim configuration (e.g., using
vim.cmd("highlight link ChatSystem MyCustomGroup")). If you were doing this, update the source group name (e.g.,vim.cmd("highlight link ClaudiusSystem MyCustomGroup")). - Users configuring highlights only via the
highlightstable insetup()are not affected by this change.
- Internal syntax highlight groups used by
-
Configuration Structure (
model,provider,parameters):- A new top-level
provideroption specifies the AI provider ("claude","openai","vertex"). It defaults to"claude"for backward compatibility. - The
modeloption now defaults based on the selectedproviderif set tonil. If you specify amodel, ensure it's valid for the selected provider. - Provider-specific parameters (currently only for Vertex AI) are now nested (e.g.,
parameters = { vertex = { project_id = "..." } }). - Migration:
- If you want to continue using Claude (the previous default), no action is strictly needed, but explicitly setting
provider = "claude"is recommended for clarity. - If you had a specific
modelconfigured, ensure it's compatible with the defaultclaudeprovider or explicitly set the correctprovider. - If switching to Vertex AI, configure necessary parameters under
parameters.vertex = { ... }.
- If you want to continue using Claude (the previous default), no action is strictly needed, but explicitly setting
- A new top-level
-
Internal Function Relocation (Advanced Users Only):
- The Lua functions
get_fold_levelandget_fold_textwere moved from the mainclaudiusmodule toclaudius.buffers. - Migration: If you were calling these functions directly in your Neovim config (e.g.,
require("claudius").get_fold_level(...)), update the call to userequire("claudius.buffers")instead. Most users will not be affected.
- The Lua functions
Added
- Multi-Provider Support: Claudius now supports multiple AI providers:
- Anthropic Claude: Original provider.
- OpenAI: Added support for various GPT models (e.g.,
gpt-4o,gpt-3.5-turbo). - Google Vertex AI: Added support for Gemini models (e.g.,
gemini-2.5-pro,gemini-1.5-pro).
- Provider Switching (
:ClaudiusSwitch):- New command
:ClaudiusSwitchallows switching the active AI provider and model on the fly. - Supports interactive selection via
vim.ui.selectwhen called with no arguments. - Allows specifying provider, model, and provider-specific parameters (e.g.,
project_idfor Vertex) via arguments. - Includes command-line completion for providers and models.
- New command
- Provider Configuration:
- New top-level
provideroption insetup()to set the default provider (claude,openai,vertex). Defaults toclaude. - New
parameters.vertexsection insetup()for Vertex AI specific settings (project_id,location). - Configuration defaults are now centralized and provider-aware (e.g., default
modeldepends on the selectedprovider).
- New top-level
- Authentication:
- Generalized API key handling across providers.
- Added support for retrieving OpenAI API keys via
OPENAI_API_KEYenvironment variable or Linuxsecret-tool(service openai key api). - Added support for Vertex AI authentication:
- Via
VERTEX_AI_ACCESS_TOKENenvironment variable. - Via service account JSON stored in
VERTEX_SERVICE_ACCOUNTenvironment variable. - Via service account JSON stored using Linux
secret-tool(service vertex key api project_id <your_project_id>). RequiresgcloudCLI for token generation.
- Via
- Improved authentication error messages using new modal alerts (
claudius.notify.alert).
- Highlighting & Styling:
- Highlight groups (
highlights.*,ruler.hl) now accept hex color codes (e.g.,"#80a0ff") in addition to highlight group names. - Sign configuration (
signs.*.hl) also accepts hex codes or specific highlight group names.
- Highlight groups (
- Notifications:
- Added
claudius.notify.alert()function for displaying modal error/information windows with Markdown support. - Usage notifications now display the model name and provider.
- Added syntax highlighting for model names in usage notifications (
syntax/claudius_notify.vim).
- Added
- Pricing Data: Added pricing information for numerous OpenAI and Vertex AI models in
lua/claudius/pricing.lua. - Logging: Introduced a dedicated logging module (
lua/claudius/logging.lua) with improvedinspectformatting and configuration options. - Developer Environment:
- Added Nix configuration (
python-packages.nix, updatedshell.nix) for Python dependencies required for Vertex AI development (via Aider). - Added Aider configuration file (
.aider.conf.yml). - Added
.env.exampleand.envrcfor easier setup.
- Added Nix configuration (
Changed
- Core Architecture: Major internal refactoring to introduce a provider abstraction layer (
lua/claudius/provider/). API interaction logic is now handled by specific provider modules (claude.lua,openai.lua,vertex.lua) inheriting from a base class (base.lua). - Configuration:
- Centralized default configuration values in
lua/claudius/config.lua. - Renamed
prefix_styleconfiguration option torole_style(See Breaking Changes). - Renamed
ruler.styleconfiguration option toruler.hl(See Breaking Changes). - Clarified that setting
model,max_tokens, ortemperaturetonilinsetup()uses the provider's default value.
- Centralized default configuration values in
- README: Significantly updated to reflect multi-provider support, new configuration options, authentication methods, the
:ClaudiusSwitchcommand, and developer setup. - Highlight Groups: Renamed internal syntax highlight groups from
Chat*toClaudius*(See Breaking Changes). - UI Updates: Rulers and signs are now updated on
CursorHoldandCursorHoldIevents, debouncing updates and improving performance, especially in large chat files. - Folding Logic: Moved folding functions (
get_fold_level,get_fold_text) frominit.luatobuffers.lua(See Breaking Changes). - Command Descriptions: Updated descriptions for
ClaudiusSend,ClaudiusCancelto reflect multi-provider support. - Internal Naming: Renamed internal variables like
prefixtorole_typefor clarity. - Dependencies: Updated Nix flake inputs (
flake.lock). - Developer Scripts: Updated
claudius-dev(Aider wrapper) andclaudius-fmtscripts inshell.nix.
Fixed
- UI Performance: Debounced ruler and sign updates should reduce potential flickering and improve performance when editing chat files.
- Note: Users may still experience syntax highlighting flicker, particularly when a
.chatbuffer is open in multiple windows scrolled to different positions. This is related to an upstream Neovim issue (neovim/neovim#32660) affecting Treesitter's handling of injections in recent nightly builds (as of 2025-04-16). A temporary workaround is to force synchronous parsing by settingvim.g._ts_force_sync_parsing = true. While the debouncing in Claudius might mitigate some visual artifacts, the root cause lies within Neovim core.
- Note: Users may still experience syntax highlighting flicker, particularly when a
- Error Handling: More specific error reporting for authentication failures using modal alerts. Vertex AI provider includes handling for specific non-SSE error formats.
- Cancellation: Cancellation logic is now delegated to the provider implementation for potentially cleaner termination.