mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
pr comments
This commit is contained in:
parent
c514efd755
commit
b0e33410ba
@ -135,7 +135,7 @@ export const POST = createSmartRouteHandler({
|
||||
|
||||
const innerToolCallsJson = JSON.stringify(contentBlocks.filter(b => b.type === "tool-call"));
|
||||
|
||||
runAsynchronously(logMcpCall({
|
||||
const logPromise = logMcpCall({
|
||||
correlationId,
|
||||
toolName: body.mcpCallMetadata.toolName,
|
||||
reason: body.mcpCallMetadata.reason,
|
||||
@ -148,9 +148,11 @@ export const POST = createSmartRouteHandler({
|
||||
durationMs: BigInt(Date.now() - startedAt),
|
||||
modelId: String(model.modelId),
|
||||
errorMessage: undefined,
|
||||
}));
|
||||
});
|
||||
runAsynchronously(logPromise);
|
||||
|
||||
runAsynchronously(reviewMcpCall({
|
||||
logPromise,
|
||||
correlationId,
|
||||
question,
|
||||
reason: body.mcpCallMetadata.reason,
|
||||
|
||||
@ -39,6 +39,7 @@ Set needsHumanReview=true if: score < 50, any critical flag, or you are uncertai
|
||||
const REVIEW_MODEL_ID = "anthropic/claude-haiku-4.5";
|
||||
|
||||
export async function reviewMcpCall(entry: {
|
||||
logPromise: Promise<void>;
|
||||
correlationId: string;
|
||||
question: string;
|
||||
reason: string;
|
||||
@ -75,7 +76,7 @@ export async function reviewMcpCall(entry: {
|
||||
|
||||
try {
|
||||
// Wait for the log row to be written first
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
await entry.logPromise;
|
||||
|
||||
devinClient = await createMCPClient({
|
||||
transport: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user