Skip to content

Commit 38b3369

Browse files
committed
feat(archview): enhance component view output with count
Add a count of UI components to the output string for better clarity and debugging.
1 parent e180831 commit 38b3369

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/kotlin/cc/unitmesh/devti/bridge/archview/ComponentViewFunctionProvider.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@ class ComponentViewFunctionProvider : ToolchainFunctionProvider {
1616
prop: String,
1717
args: List<Any>,
1818
allVariables: Map<String, Any?>
19-
): String = ComponentViewProvider.collect(project).joinToString("\n", transform = UiComponent::format)
19+
): String {
20+
val uiComponents = ComponentViewProvider.collect(project)
21+
val components = uiComponents.joinToString("\n", transform = UiComponent::format)
22+
return "Here is current project components, ${uiComponents.size}:\n$components"
23+
}
2024
}

0 commit comments

Comments
 (0)