Commit 578f103
Fix tool-routes.ts to use ToolRegistry.execute() API
- Fixed ToolRegistry API usage (use has() and execute() instead of non-existent get() method)
- Added extractOutputValue() helper to safely handle different output types
- Updated tests to use correct ToolRegistry.register() signature (separate definition and handler params)
- Fixed test expectations to match string output from handlers
- All builds and tests now passing
Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/4239d194-ecf4-4513-9729-f161ab40710d
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>1 parent be84ef7 commit 578f103
File tree
2 files changed
+56
-34
lines changed- packages/services/service-ai/src
- __tests__
- routes
2 files changed
+56
-34
lines changedLines changed: 25 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | | - | |
39 | 41 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
7 | 19 | | |
8 | 20 | | |
9 | 21 | | |
| |||
75 | 87 | | |
76 | 88 | | |
77 | 89 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 90 | + | |
| 91 | + | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
84 | | - | |
| 95 | + | |
85 | 96 | | |
86 | | - | |
87 | 97 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
92 | 111 | | |
93 | 112 | | |
94 | | - | |
| 113 | + | |
95 | 114 | | |
96 | 115 | | |
97 | 116 | | |
98 | 117 | | |
99 | | - | |
| 118 | + | |
100 | 119 | | |
101 | 120 | | |
102 | 121 | | |
103 | 122 | | |
104 | 123 | | |
105 | | - | |
106 | | - | |
107 | 124 | | |
108 | 125 | | |
109 | 126 | | |
110 | | - | |
| 127 | + | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
| |||
0 commit comments