File tree Expand file tree Collapse file tree 2 files changed +13
-16
lines changed Expand file tree Collapse file tree 2 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -26,24 +26,22 @@ export class DeferredPromise<T> extends Promise<T> {
2626 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2727 this . reject = rejectFn ! ;
2828
29- if ( timeout !== undefined ) {
29+ if ( timeout !== undefined && onTimeout ) {
3030 this . timeoutId = setTimeout ( ( ) => {
31- onTimeout ?. ( this . resolve , this . reject ) ;
31+ onTimeout ( this . resolve , this . reject ) ;
3232 } , timeout ) ;
3333 }
3434
35- if ( executor ) {
36- executor (
37- ( value : T ) => {
38- if ( this . timeoutId ) clearTimeout ( this . timeoutId ) ;
39- this . resolve ( value ) ;
40- } ,
41- ( reason : Error ) => {
42- if ( this . timeoutId ) clearTimeout ( this . timeoutId ) ;
43- this . reject ( reason ) ;
44- }
45- ) ;
46- }
35+ executor (
36+ ( value : T ) => {
37+ if ( this . timeoutId ) clearTimeout ( this . timeoutId ) ;
38+ this . resolve ( value ) ;
39+ } ,
40+ ( reason : Error ) => {
41+ if ( this . timeoutId ) clearTimeout ( this . timeoutId ) ;
42+ this . reject ( reason ) ;
43+ }
44+ ) ;
4745 }
4846
4947 static fromPromise < T > ( promise : Promise < T > , options : DeferredPromiseOptions < T > = { } ) : DeferredPromise < T > {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export class Telemetry {
7777 }
7878
7979 /**
80- * @returns A hashed, unique identifier for the running device or `undefined ` if not known.
80+ * @returns A hashed, unique identifier for the running device or `"unknown" ` if not known.
8181 */
8282 private async getDeviceId ( ) : Promise < string > {
8383 try {
@@ -126,7 +126,6 @@ export class Telemetry {
126126 public getCommonProperties ( ) : CommonProperties {
127127 return {
128128 ...this . commonProperties ,
129- device_id : this . commonProperties . device_id ,
130129 mcp_client_version : this . session . agentRunner ?. version ,
131130 mcp_client_name : this . session . agentRunner ?. name ,
132131 session_id : this . session . sessionId ,
You can’t perform that action at this time.
0 commit comments