forked from ultraworkers/claw-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.ts
More file actions
25 lines (24 loc) · 660 Bytes
/
Copy pathutils.ts
File metadata and controls
25 lines (24 loc) · 660 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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,
},
})
}