Commit 096c0dd
authored
fix(agents): consider tool's customName in tools from callable (#1883)
<!--
PR title should follow Conventional Commits format:
type(scope): description
For breaking changes, append ! after type/scope:
type(scope)!: description
Examples:
feat(agents): add streaming response node
fix(prompt): handle null responses in PromptExecutor
refactor(agents)!: remove deprecated methods from Tool
See CONTRIBUTING.md for more details
-->
Fix the big "@tool(customName = ...) is ignored when using
ToolSet.asTools() / ToolRegistryBuilder.tools(ToolSet)" and add a test.
<!-- Include references to related issues below, e.g., closes #1, closes
KG-1. Otherwise, delete it. -->
closes #18811 parent 4992fe7 commit 096c0dd
2 files changed
Lines changed: 39 additions & 1 deletion
File tree
- agents/agents-tools/src
- jvmCommonMain/kotlin/ai/koog/agents/core/tools/reflect
- jvmTest/kotlin/ai/koog/agents/core/tools/reflect
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
106 | 123 | | |
107 | 124 | | |
108 | 125 | | |
| |||
241 | 258 | | |
242 | 259 | | |
243 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
244 | 281 | | |
0 commit comments