Commit 68dde2c 1 parent 98930a4 commit 68dde2c Copy full SHA for 68dde2c
File tree 1 file changed +10
-21
lines changed
packages/client-direct/src
1 file changed +10
-21
lines changed Original file line number Diff line number Diff line change @@ -229,34 +229,23 @@ export class DirectClient {
229
229
const shouldSuppressInitialMessage =
230
230
action ?. suppressInitialMessage ;
231
231
232
- if ( ! shouldSuppressInitialMessage ) {
233
- const _result = await runtime . processActions (
234
- memory ,
235
- [ responseMessage ] ,
236
- state ,
237
- async ( newMessages ) => {
238
- message = newMessages ;
239
- return [ memory ] ;
240
- }
241
- ) ;
232
+ const _result = await runtime . processActions (
233
+ memory ,
234
+ [ responseMessage ] ,
235
+ state ,
236
+ async ( newMessages ) => {
237
+ message = newMessages ;
238
+ return [ memory ] ;
239
+ }
240
+ ) ;
242
241
242
+ if ( ! shouldSuppressInitialMessage ) {
243
243
if ( message ) {
244
244
res . json ( [ response , message ] ) ;
245
245
} else {
246
246
res . json ( [ response ] ) ;
247
247
}
248
248
} else {
249
- // Only process the action without sending initial response
250
- const _result = await runtime . processActions (
251
- memory ,
252
- [ responseMessage ] ,
253
- state ,
254
- async ( newMessages ) => {
255
- message = newMessages ;
256
- return [ memory ] ;
257
- }
258
- ) ;
259
-
260
249
if ( message ) {
261
250
res . json ( [ message ] ) ;
262
251
} else {
You can’t perform that action at this time.
0 commit comments