Expand description
Command-mode and argument completion content + menu rendering.
State and lifecycle live in tau_cli_term_raw; this module
supplies the content (which candidates exist for a given buffer)
and the presentation (how the menu block is laid out and styled).
Public types:
CommandCompletion— command completion entryCompletionItem/CompletionData— dynamic argument completionsbuild_candidates— turns the current buffer into aVec<Candidate>render_menu_block— turns aCompletionViewinto aStyledBlock
Structs§
- Command
Completion - One command-mode completion entry with its display description.
- Command
Name - One command-mode token, including its leading
:(for example,":model"). - Completion
Data - Thread-safe storage for dynamic command and argument completions.
- Completion
Item - A single argument completion candidate.
- Completion
Rule - A single prompt completion rule keyed by the word prefix that activates it.
- Completion
Rules - Prompt completion rules. If multiple rules match, the longest prefix wins.
Enums§
- Completion
Rule Kind - Named completion behavior selected by prompt completion config.
Functions§
- build_
candidates - Builds the candidate list for the given buffer/cursor.
- build_
candidates_ with_ rules - Builds candidates using explicit prompt completion rules.
- render_
menu_ block - Renders the completion menu as a
StyledBlock: each candidate on its own line, with the selected entry highlighted.
Type Aliases§
- ArgCompleter
- Closure that produces argument completions for a command, given the already-typed args (the last element is the partial arg being completed; may be empty for “just typed a space”).