Rocky_Mountain_Vending/.pnpm-store/v10/files/8b/6ec2e993ba5820af18e543aaf08605c8b3e162043bd171abe180fc3a6a27e8654cb632e287092b424a6a4809b82735305d7451d9de58ab64b7d20e2329ae20
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
3.1 KiB
Text

{"version":3,"file":"utils.js","sources":["../../../../src/utils/openai/utils.ts"],"sourcesContent":["import { OPENAI_OPERATIONS } from '../gen-ai-attributes';\nimport { INSTRUMENTED_METHODS } from './constants';\nimport type { InstrumentedMethod, OpenAiChatCompletionObject, OpenAIResponseObject } from './types';\n\n/**\n * Maps OpenAI method paths to Sentry operation names\n */\nexport function getOperationName(methodPath: string): string {\n if (methodPath.includes('chat.completions')) {\n return OPENAI_OPERATIONS.CHAT;\n }\n if (methodPath.includes('responses')) {\n // The responses API is also a chat operation\n return OPENAI_OPERATIONS.CHAT;\n }\n return methodPath.split('.').pop() || 'unknown';\n}\n\n/**\n * Get the span operation for OpenAI methods\n * Following Sentry's convention: \"gen_ai.{operation_name}\"\n */\nexport function getSpanOperation(methodPath: string): string {\n return `gen_ai.${getOperationName(methodPath)}`;\n}\n\n/**\n * Check if a method path should be instrumented\n */\nexport function shouldInstrument(methodPath: string): methodPath is InstrumentedMethod {\n return INSTRUMENTED_METHODS.includes(methodPath as InstrumentedMethod);\n}\n\n/**\n * Build method path from current traversal\n */\nexport function buildMethodPath(currentPath: string, prop: string): string {\n return currentPath ? `${currentPath}.${prop}` : prop;\n}\n\n/**\n * Check if response is a Chat Completion object\n */\nexport function isChatCompletionResponse(response: unknown): response is OpenAiChatCompletionObject {\n return (\n response !== null &&\n typeof response === 'object' &&\n 'object' in response &&\n (response as Record<string, unknown>).object === 'chat.completion'\n );\n}\n\n/**\n * Check if response is a Responses API object\n */\nexport function isResponsesApiResponse(response: unknown): response is OpenAIResponseObject {\n return (\n response !== null &&\n typeof response === 'object' &&\n 'object' in response &&\n (response as Record<string, unknown>).object === 'response'\n );\n}\n"],"names":["OPENAI_OPERATIONS","INSTRUMENTED_METHODS"],"mappings":";;;;;AAIA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,UAAU,EAAkB;AAC7D,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;AAC/C,IAAI,OAAOA,iCAAiB,CAAC,IAAI;AACjC;AACA,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;AACxC;AACA,IAAI,OAAOA,iCAAiB,CAAC,IAAI;AACjC;AACA,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAC,IAAK,SAAS;AACjD;;AAEA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,UAAU,EAAkB;AAC7D,EAAE,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAA;AACA;;AAEA;AACA;AACA;AACA,SAAA,gBAAA,CAAA,UAAA,EAAA;AACA,EAAA,OAAAC,8BAAA,CAAA,QAAA,CAAA,UAAA,EAAA;AACA;;AAEA;AACA;AACA;AACA,SAAA,eAAA,CAAA,WAAA,EAAA,IAAA,EAAA;AACA,EAAA,OAAA,WAAA,GAAA,CAAA,EAAA,WAAA,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA,GAAA,IAAA;AACA;;AAEA;AACA;AACA;AACA,SAAA,wBAAA,CAAA,QAAA,EAAA;AACA,EAAA;AACA,IAAA,QAAA,KAAA,IAAA;AACA,IAAA,OAAA,QAAA,KAAA,QAAA;AACA,IAAA,QAAA,IAAA,QAAA;AACA,IAAA,CAAA,QAAA,GAAA,MAAA,KAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAA,sBAAA,CAAA,QAAA,EAAA;AACA,EAAA;AACA,IAAA,QAAA,KAAA,IAAA;AACA,IAAA,OAAA,QAAA,KAAA,QAAA;AACA,IAAA,QAAA,IAAA,QAAA;AACA,IAAA,CAAA,QAAA,GAAA,MAAA,KAAA;AACA;AACA;;;;;;;;;"}