Repository navigation
feat(composer): add composer.yaml with per-context triggers and the moved status bar settings - #1948
Merged
Merged
Conversation
…oved status bar settings The composer trigger table and status bar toggles live in composer.yaml as a sidecar under composer, loaded from the userspace and project layers. Chat reproduces today's menu behavior with agents after files, room puts agents first. Slash and the bang sigils stay reserved and an unknown source or context fails the load naming composer.yaml and the key. The legacy chat.status_bar block from config.yaml still applies with a deprecation warning while composer.yaml sets no status_bar. The TUI and the hot-reload section read the moved settings.
…it on init infer init seeds composer.yaml and moves a legacy chat.status_bar block from the regenerated config.yaml into its status_bar section. infer config get composer prints the resolved and validated composer section so the desktop reads one source. The TUI autocomplete now builds each trigger menu from the composer table of its chat context in the configured section order, appending Markdown and built-in agents after the files, while every row keeps its own sigil.
inference-gateway-maintainer
Bot
marked this pull request as ready for review
November 23, 2026 01:46
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
November 23, 2026 01:46
9 tasks
… init tests The status bar settings now live only in composer.yaml. The runtime fallback for a chat.status_bar block in config.yaml is removed along with its deprecation warning, which never fired at startup since the config loads before the logger, and the block move in infer init. A leftover block is ignored, and the docs say to move it by hand and name the INFER_COMPOSER_STATUS_BAR_* env overrides. The init tests the composer change had deleted are restored, and TestInitializeProject now checks that init seeds composer.yaml. The duplicate linger check leaves Config.Validate, the one-use tableKeysError wrapper is inlined, the TUI passes the chat trigger table straight through, and the trigger lists are unexported.
A trigger in composer.yaml was limited to @ and #, and the TUI matched only those two hard-coded characters. A trigger is now any one punctuation or symbol character, ASCII or not, such as ^ or §. The reserved /, ! and !! still fail the load, as do letters, digits and longer keys, which would open a menu on ordinary typing. The TUI opens a menu for every trigger in the context's table and reads the query after the whole trigger character, so a multi-byte one such as § works. The default trigger table now registers per context instead of per trigger. A context set in composer.yaml replaces that context's defaults, so moving issues from # to ^ in chat turns # off there, while a context the file leaves out keeps its defaults.
6 tasks
Contributor
|
🎉 This PR is included in version 0.267.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Nov 23, 2026
edenreich
added a commit
that referenced
this pull request
Nov 23, 2026
…while filtering (#1953) Follow-up to #1948 from a review of the merged composer change. ## Summary Two display bugs in the composer trigger menus, plus cleanups the review found. - A menu that lists files pads the path column to the full width. The agent rows #1948 added to the default chat `@` menu then appended their description past it, so a row was 103 columns wide in an 80-column menu. Every user hits this, since built-in agents always exist. Menus that list files now render no description column. - The fuzzy filter rebuilt rows from the shortcut alone, so issue titles and agent descriptions disappeared after the first keystroke in a composed menu. It now keeps the original row and only adds the match offsets. ## Changes - `autocomplete.go`: the render and filter fixes above. The chat trigger defaults are set once in `NewAutocomplete`, replacing the `triggerTable`/`composerSources` fallback that built a whole `DefaultComposerConfig()` per keystroke when unset. - `config/composer.go`: `ValidateComposerTriggers` checks a trigger table on its own, and `Validate` calls it before the linger check. The known contexts and sources live in one list each. The test-only `ComposerConfig.TriggerSources` is removed. - `cmd/runtime/config.go`: the pre-merge hook decodes the table with mapstructure. A malformed table now names its key (`'[chat][^]' source data must be an array or slice, got string`) instead of a line number from a re-marshaled document that pointed at the wrong line. - `cmd/config/getset.go`: the three YAML-to-map round-trips share one `yamlMap` helper. - Smaller cleanups: - variables named `context` renamed to `scope` - the duplicate `writeTestHomeFile` replaced by the existing `writeHomeFile` - a reflection test of `ChatConfig`'s shape removed, since the compiler covers it - stale doc comments fixed - Docs: `configuration-reference.md` says the home and project `composer.yaml` merge per trigger, so a project file cannot remove a trigger the home file sets. ## Tests - `TestTriggerMenuFitsItsWidth`: every row of the default `@` menu fits an 80-column width. It failed before the fix with a 103-column row. - `TestComposedMenuKeepsDescriptionsWhileFiltering`: a filtered `^` menu of agents and issues still shows the agent description. It failed before the fix. - Checked by hand in the chat TUI with `INFER_GATEWAY_MOCK=true` in an 80-column tmux pane: `@` lists the files, and `@explore` shows the agent row among them, all within the width.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1947
Summary
The composer gets its own split file: composer.yaml loads as a sidecar under
composerfrom the userspace and project layers. It holds the trigger table per context and the status bar settings, so the TUI and the desktop read one source viainfer config get composer --format json. A trigger is any one special character, such as@,#,^or§. The status bar settings moved fromchat.status_barin config.yaml tostatus_barin composer.yaml. Achat.status_barblock left in config.yaml is ignored, and the docs say to move it by hand.Changes
config/composer.go:ComposerConfigwith thetriggerstable (chatandroomcontexts,files,agentsandissuessources) and the movedstatus_barsettings. A trigger is any one punctuation or symbol character, ASCII or not. Validation namescomposer.yamland the offending key, so the reserved/,!and!!, letters, digits, longer keys and unknown sources or contexts fail the load.cmd/runtime:composer.yamlmerges as a fatal sidecar with its trigger table validated before the merge. The default trigger table registers per context, so a context the file sets replaces that context's defaults (moving issues from#to^in chat turns#off there) while a context it leaves out keeps them.cmd/init: seedscomposer.yamlfrom the defaults.cmd/config:infer config get composer(yaml/json) prints the resolved and validated composer section.composer.status_bar.configuration-reference.mdgains the Composer Settings section (triggers, replacing a trigger, reserved characters, the moved status bar and itsINFER_COMPOSER_STATUS_BAR_*overrides).shortcuts-guide.md,cost-tracking.md,a2a-connections.md,tasks-management.mdand the subagents example point at composer.yaml.infer initseeding and the config-get dump.Follow-ups
chat.status_barkeys incli.md.