KCL: Custom snippet values for kcl-in-kcl (#7163)

In #7156, I allowed KCL to set specific snippet completions for each arg of each function. They're optional -- if you don't set one, it'll fall back to the type-driven defaults.

That PR only worked for KCL stdlib functions defined in Rust. This PR enables the same feature, but for functions defined in KCL.
This commit is contained in:
Adam Chalmers
2025-05-21 22:16:04 -05:00
committed by GitHub
parent ed979d807b
commit 9c7aee32bd
3 changed files with 47 additions and 5 deletions

View File

@ -33,10 +33,12 @@ export fn circle(
/// Sketch to extend, or plane or surface to sketch on.
@sketch_or_surface: Sketch | Plane | Face,
/// The center of the circle.
@(snippetArray = ["0", "0"])
center: Point2d,
/// The radius of the circle. Incompatible with `diameter`.
radius?: number(Length),
/// The diameter of the circle. Incompatible with `radius`.
@(include_in_snippet = true)
diameter?: number(Length),
/// Create a new tag which refers to this circle.
tag?: tag,