@@ -9,7 +9,7 @@ enum Debugger {
99 static func didSendRequestBody( body: CompletionRequestBody ) {
1010 do {
1111 let json = try JSONEncoder ( ) . encode ( body)
12- let center = NSWorkspace . shared . notificationCenter
12+ let center = NotificationCenter . default
1313 center. post (
1414 name: . init( " ServiceDebugger.ChatRequestDebug.requestSent " ) ,
1515 object: nil ,
@@ -24,7 +24,7 @@ enum Debugger {
2424 }
2525
2626 static func didReceiveFunction( name: String , arguments: String ) {
27- let center = NSWorkspace . shared . notificationCenter
27+ let center = NotificationCenter . default
2828 center. post (
2929 name: . init( " ServiceDebugger.ChatRequestDebug.receivedFunctionCall " ) ,
3030 object: nil ,
@@ -37,7 +37,7 @@ enum Debugger {
3737 }
3838
3939 static func didReceiveFunctionResult( result: String ) {
40- let center = NSWorkspace . shared . notificationCenter
40+ let center = NotificationCenter . default
4141 center. post (
4242 name: . init( " ServiceDebugger.ChatRequestDebug.receivedFunctionResult " ) ,
4343 object: nil ,
@@ -49,7 +49,7 @@ enum Debugger {
4949 }
5050
5151 static func didReceiveResponse( content: String ) {
52- let center = NSWorkspace . shared . notificationCenter
52+ let center = NotificationCenter . default
5353 center. post (
5454 name: . init( " ServiceDebugger.ChatRequestDebug.responseReceived " ) ,
5555 object: nil ,
@@ -61,7 +61,7 @@ enum Debugger {
6161 }
6262
6363 static func didFinish( ) {
64- let center = NSWorkspace . shared . notificationCenter
64+ let center = NotificationCenter . default
6565 center. post (
6666 name: . init( " ServiceDebugger.ChatRequestDebug.finished " ) ,
6767 object: nil ,
0 commit comments