MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / hasPendingToolCalls

Function hasPendingToolCalls

packages/server/src/routes/chat.ts:55–64  ·  view source on GitHub ↗
(message: NightcodeUIMessage)

Source from the content-addressed store, hash-verified

53});
54
55function 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
66const app = new Hono<AuthenticatedEnv>()
67 .post(

Callers 1

onFinishFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected