π File detail
components/permissions/utils.ts
π§© .tsπ 26 linesπΎ 660 bytesπ text
β Back to All Filesπ― Use case
This file lives under βcomponents/β, which covers shared React UI pieces. On the API surface it exposes logUnaryPermissionEvent β mainly functions, hooks, or classes. It composes internal code from PermissionRequest (relative imports).
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import { getHostPlatformForAnalytics } from '../../utils/env.js' import { type CompletionType, logUnaryEvent } from '../../utils/unaryLogging.js' import type { ToolUseConfirm } from './PermissionRequest.js' export function logUnaryPermissionEvent(
π€ Exports (heuristic)
logUnaryPermissionEvent
π₯οΈ Source preview
import { getHostPlatformForAnalytics } from '../../utils/env.js'
import { type CompletionType, logUnaryEvent } from '../../utils/unaryLogging.js'
import type { ToolUseConfirm } from './PermissionRequest.js'
export function logUnaryPermissionEvent(
completion_type: CompletionType,
{
assistantMessage: {
message: { id: message_id },
},
}: ToolUseConfirm,
event: 'accept' | 'reject',
hasFeedback?: boolean,
): void {
void logUnaryEvent({
completion_type,
event,
metadata: {
language_name: 'none',
message_id,
platform: getHostPlatformForAnalytics(),
hasFeedback: hasFeedback ?? false,
},
})
}