File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 11/**
22 * Result type constants for telemetry events
33 */
4- export const TELEMETRY_RESULT = {
5- SUCCESS : "success" as const ,
6- FAILURE : "failure" as const ,
7- } ;
8-
9- export type TelemetryResult = ( typeof TELEMETRY_RESULT ) [ keyof typeof TELEMETRY_RESULT ] ;
4+ export type TelemetryResult = "success" | "failure" ;
105
116/**
127 * Base interface for all events
Original file line number Diff line number Diff line change @@ -74,14 +74,14 @@ export abstract class ToolBase {
7474 ) ;
7575
7676 const result = await this . execute ( ...args ) ;
77- await this . emitToolEvent ( startTime , TELEMETRY_RESULT . SUCCESS ) ;
77+ await this . emitToolEvent ( startTime , "success" ) ;
7878 return result ;
7979 } catch ( error : unknown ) {
8080 logger . error ( mongoLogId ( 1_000_000 ) , "tool" , `Error executing ${ this . name } : ${ error as string } ` ) ;
8181
8282 await this . emitToolEvent (
8383 startTime ,
84- TELEMETRY_RESULT . FAILURE ,
84+ "failure" ,
8585 error instanceof Error ? error : new Error ( String ( error ) )
8686 ) ;
8787
You can’t perform that action at this time.
0 commit comments