@@ -20,6 +20,11 @@ export async function generateAnswersWithBingWebApi(
2020 const config = await getUserConfig ( )
2121
2222 const bingAIClient = new BingAIClient ( { userToken : accessToken } )
23+ if ( session . bingWeb_jailbreakConversationCache )
24+ bingAIClient . conversationsCache . set (
25+ session . bingWeb_jailbreakConversationId ,
26+ session . bingWeb_jailbreakConversationCache ,
27+ )
2328
2429 let answer = ''
2530 const response = await bingAIClient
@@ -40,17 +45,30 @@ export async function generateAnswersWithBingWebApi(
4045 clientId : session . bingWeb_clientId ,
4146 invocationId : session . bingWeb_invocationId ,
4247 }
48+ : session . bingWeb_jailbreakConversationId
49+ ? {
50+ jailbreakConversationId : session . bingWeb_jailbreakConversationId ,
51+ parentMessageId : session . bingWeb_parentMessageId ,
52+ }
4353 : { } ) ,
4454 } )
4555 . catch ( ( err ) => {
4656 port . onMessage . removeListener ( messageListener )
4757 throw err
4858 } )
4959
50- session . bingWeb_conversationSignature = response . conversationSignature
51- session . bingWeb_conversationId = response . conversationId
52- session . bingWeb_clientId = response . clientId
53- session . bingWeb_invocationId = response . invocationId
60+ if ( ! sydneyMode ) {
61+ session . bingWeb_conversationSignature = response . conversationSignature
62+ session . bingWeb_conversationId = response . conversationId
63+ session . bingWeb_clientId = response . clientId
64+ session . bingWeb_invocationId = response . invocationId
65+ } else {
66+ session . bingWeb_jailbreakConversationId = response . jailbreakConversationId
67+ session . bingWeb_parentMessageId = response . messageId
68+ session . bingWeb_jailbreakConversationCache = bingAIClient . conversationsCache . get (
69+ response . jailbreakConversationId ,
70+ )
71+ }
5472
5573 if ( response . details . sourceAttributions . length > 0 ) {
5674 const footnotes =
0 commit comments