Register all sketch-constraint commands in the autocomplete registry

None of the 17 constraint commands (HCONSTRAINT, VCONSTRAINT,
PCONSTRAINT, QCONSTRAINT, ECONSTRAINT, TCONSTRAINT, NCONSTRAINT,
NRCONSTRAINT, LCONSTRAINT, FXCONSTRAINT, SYCONSTRAINT, CCONSTRAINT,
EDCONSTRAINT, CPCONSTRAINT, MPCONSTRAINT, OCCONSTRAINT, DCONSTRAINT,
ACONSTRAINT) carried an inventory::submit! registration, so they were
invisible to command-line autocomplete, the MCP commands listing, and
the ALIASEDIT shortcut editor (which rejects a custom shortcut target
that isn't in this same registry). Each constraint module now
registers itself, with a regression test pinning the full set.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Felix RiestraandClaude Sonnet 5 committed 2026-09-10 11:24:30 +02:00
1 parent 3d0a41b69a
commit 9f7972ee0d
7 files changed
+97 -1

No files matched your search

+3
View File
@@ -71,3 +71,6 @@ impl CadCommand for CoincidentConstraintCommand {
CmdResult::Cancel
}
}
// ── Autocomplete registry ─────────────────────────────────
inventory::submit!(crate::command::CommandRegistration { names: &["CCONSTRAINT"] });
@@ -65,3 +65,6 @@ impl CadCommand for EqualDistanceConstraintCommand {
CmdResult::Cancel
}
}
// ── Autocomplete registry ─────────────────────────────────
inventory::submit!(crate::command::CommandRegistration { names: &["EDCONSTRAINT"] });
@@ -89,3 +89,6 @@ impl CadCommand for PointOnEntityConstraintCommand {
CmdResult::Cancel
}
}
// ── Autocomplete registry ─────────────────────────────────
inventory::submit!(crate::command::CommandRegistration { names: &["CPCONSTRAINT", "MPCONSTRAINT", "OCCONSTRAINT"] });
+17
View File
@@ -141,3 +141,20 @@ pub mod symmetric {
}
}
}
// ── Autocomplete registry ─────────────────────────────────
inventory::submit!(crate::command::CommandRegistration {
names: &[
"HCONSTRAINT",
"VCONSTRAINT",
"PCONSTRAINT",
"QCONSTRAINT",
"ECONSTRAINT",
"TCONSTRAINT",
"NCONSTRAINT",
"NRCONSTRAINT",
"LCONSTRAINT",
"FXCONSTRAINT",
"SYCONSTRAINT",
]
});
+3
View File
@@ -307,6 +307,9 @@ impl CadCommand for AngleConstraintCommand {
}
}
// ── Autocomplete registry ─────────────────────────────────
inventory::submit!(crate::command::CommandRegistration { names: &["DCONSTRAINT", "ACONSTRAINT"] });
#[cfg(test)]
mod tests {
use super::*;