MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / hideMostRecentFunctionOutputs

Function hideMostRecentFunctionOutputs

lib/edge-runtime/utils.ts:396–409  ·  view source on GitHub ↗
(
  chatHistory: GPTMessageInclSummary[],
)

Source from the content-addressed store, hash-verified

394}
395
396export function hideMostRecentFunctionOutputs(
397 chatHistory: GPTMessageInclSummary[],
398): GPTMessageInclSummary[] {
399 for (let i = chatHistory.length - 1; i >= 0; i--) {
400 const message = chatHistory[i];
401 if (message.role === "function") {
402 message.summary = `Data output used by ${dataAnalysisActionName}`;
403 }
404 if (message.role !== "function") {
405 return chatHistory;
406 }
407 }
408 return chatHistory;
409}
410
411export async function getSessionFromCookie(
412 req: NextRequest,

Callers 2

AngelaFunction · 0.90
utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected