Function
hasPendingToolCalls
(message: NightcodeUIMessage)
Source from the content-addressed store, hash-verified
| 53 | }); |
| 54 | |
| 55 | function hasPendingToolCalls(message: NightcodeUIMessage) { |
| 56 | return message.parts.some((part) => { |
| 57 | if (part.type === "dynamic-tool" || part.type.startsWith("tool-")) { |
| 58 | const state = (part as { state?: string }).state; |
| 59 | return state !== "output-available" && state !== "output-error"; |
| 60 | } |
| 61 | |
| 62 | return false; |
| 63 | }); |
| 64 | }; |
| 65 | |
| 66 | const app = new Hono<AuthenticatedEnv>() |
| 67 | .post( |
Tested by
no test coverage detected