feat(was-lib): map GrowToolHint metadata fields to ToolMetadata in ToolScanner
All checks were successful
Deploy Tools / deploy (push) Successful in 2m21s

This commit is contained in:
jade
2026-08-18 22:00:21 +09:00
parent 90cf757b5e
commit 1560589dd5

View File

@@ -164,6 +164,18 @@ public class ToolRegistryHeartbeatSender {
meta.setOpenWorldHint(true);
}
if (hintAnnotation != null) {
if (!hintAnnotation.displayDescription().isBlank()) meta.setDisplayDescription(hintAnnotation.displayDescription());
if (!hintAnnotation.functionDescription().isBlank()) meta.setFunctionDescription(hintAnnotation.functionDescription());
if (!hintAnnotation.whenToUse().isBlank()) meta.setWhenToUse(hintAnnotation.whenToUse());
if (!hintAnnotation.whenNotToUse().isBlank()) meta.setWhenNotToUse(hintAnnotation.whenNotToUse());
if (!hintAnnotation.ioLimits().isBlank()) meta.setIoLimits(hintAnnotation.ioLimits());
if (hintAnnotation.exampleQueries().length > 0) meta.setExampleQueries(java.util.List.of(hintAnnotation.exampleQueries()));
if (hintAnnotation.tags().length > 0) meta.setTags(java.util.List.of(hintAnnotation.tags()));
if (hintAnnotation.requiredEnvKeys().length > 0) meta.setRequiredEnvKeys(java.util.List.of(hintAnnotation.requiredEnvKeys()));
if (!hintAnnotation.ownerOrg().isBlank()) meta.setOwnerOrg(hintAnnotation.ownerOrg());
}
Map<String, String> prompts = new HashMap<>();
meta.setActionPrompts(prompts);