Files
klz-cables.com/.pnpm-store/v10/files/29/f1148400dad5d00698a1099ae1240de0fd884e436dfcb001bec44c55bf2fabe221cf28be190814ddfdfcf9e0e90e93e0b3050ec823595816d68cd398896754
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

44 lines
1.9 KiB
Plaintext

import type { TraceContext } from '../../types-hoist/context';
import type { Span, SpanAttributes, SpanJSON } from '../../types-hoist/span';
import type { TokenSummary } from './types';
/**
* Accumulates token data from a span to its parent in the token accumulator map.
* This function extracts token usage from the current span and adds it to the
* accumulated totals for its parent span.
*/
export declare function accumulateTokensForParent(span: SpanJSON, tokenAccumulator: Map<string, TokenSummary>): void;
/**
* Applies accumulated token data to the `gen_ai.invoke_agent` span.
* Only immediate children of the `gen_ai.invoke_agent` span are considered,
* since aggregation will automatically occur for each parent span.
*/
export declare function applyAccumulatedTokens(spanOrTrace: SpanJSON | TraceContext, tokenAccumulator: Map<string, TokenSummary>): void;
/**
* Get the span associated with a tool call ID
*/
export declare function _INTERNAL_getSpanForToolCallId(toolCallId: string): Span | undefined;
/**
* Clean up the span mapping for a tool call ID
*/
export declare function _INTERNAL_cleanupToolCallSpan(toolCallId: string): void;
/**
* Convert an array of tool strings to a JSON string
*/
export declare function convertAvailableToolsToJsonString(tools: unknown[]): string;
/**
* Normalize the user input (stringified object with prompt, system, messages) to messages array
*/
export declare function convertUserInputToMessagesFormat(userInput: string): {
role: string;
content: string;
}[];
/**
* Generate a request.messages JSON array from the prompt field in the
* invoke_agent op
*/
export declare function requestMessagesFromPrompt(span: Span, attributes: SpanAttributes): void;
/**
* Maps a Vercel AI span name to the corresponding Sentry op.
*/
export declare function getSpanOpFromName(name: string): string | undefined;
//# sourceMappingURL=utils.d.ts.map