From 2f0d8531d72514be893880430a370470bbe50aeb Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Fri, 5 Jun 2026 15:58:05 +0800 Subject: Exclude all hidden nodes from completion filtering --- CHANGELOG.md | 2 ++ mingling_core/src/comp.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a888cc2..55dbfce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ 1. **\[core:flag\]** Refactored the `special_argument!` and `special_arguments!` macros to replace index‑based `while` loops with iterator `position` and `drain`, improving both performance and readability. +2. **\[core:comp\]** Changed the completion system's node filtering to exclude all hidden nodes (names starting with `_`) instead of only the specific `__comp` node. This makes the completion script generation more general — any node prefixed with an underscore is now treated as internal/hidden and excluded from suggestions. + #### Features: 1. **\[core\]** Added the `unpack_chain_process!` macro for ergonomically extracting the inner value from a `ChainProcess` result. diff --git a/mingling_core/src/comp.rs b/mingling_core/src/comp.rs index 4f3890a..1769a5c 100644 --- a/mingling_core/src/comp.rs +++ b/mingling_core/src/comp.rs @@ -155,7 +155,7 @@ where let cmd_nodes: Vec = this::

() .get_nodes() .into_iter() - .filter(|(s, _)| s != "__comp") + .filter(|(s, _)| !s.starts_with('_')) .map(|(s, _)| s) .collect(); debug!("cmd_nodes: {:?}", cmd_nodes); -- cgit