improvement(langsmith): ugpraded langsmith to use tool names directly in dropdown (#2824)

This commit is contained in:
Waleed
2026-01-14 18:46:06 -08:00
committed by GitHub
parent 5af72ea22f
commit 212933746e
2 changed files with 35 additions and 40 deletions

View File

@@ -351,14 +351,16 @@ Enables AI-assisted field generation.
## Tools Configuration
### Simple Tool Selector
**Preferred:** Use tool names directly as dropdown option IDs to avoid switch cases:
```typescript
tools: {
access: ['service_create', 'service_read', 'service_update'],
config: {
tool: (params) => `service_${params.operation}`,
},
}
// Dropdown options use tool IDs directly
options: [
{ label: 'Create', id: 'service_create' },
{ label: 'Read', id: 'service_read' },
]
// Tool selector just returns the operation value
tool: (params) => params.operation,
```
### With Parameter Transformation