Download src/components/permissions/utils.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 660 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/components/permissions/utils.ts
- Command line
-
hf download hf://chenbhao/codev@afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/components/permissions/utils.ts
-
curl -L -o utils.ts https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/components/permissions/utils.ts
660 Bytes
| 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, | |
| }, | |
| }) | |
| } | |