opencode-copilot-account-switcher 0.10.8 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugin-hooks.js +5 -4
- package/package.json +1 -1
package/dist/plugin-hooks.js
CHANGED
|
@@ -418,11 +418,12 @@ export function buildPluginHooks(input) {
|
|
|
418
418
|
reason: toReasonByInitiator(initiator),
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
const
|
|
422
|
-
const
|
|
421
|
+
const sessionClient = input.client?.session;
|
|
422
|
+
const sessionLookup = sessionClient?.get;
|
|
423
|
+
const messageLookup = sessionClient?.message;
|
|
423
424
|
const messageIDHeader = getMergedRequestHeader(requestInput.request, requestInput.init, INTERNAL_DEBUG_LINK_HEADER);
|
|
424
425
|
if (typeof messageIDHeader === "string" && messageIDHeader.length > 0) {
|
|
425
|
-
const currentMessage = await messageLookup?.({
|
|
426
|
+
const currentMessage = await messageLookup?.call(sessionClient, {
|
|
426
427
|
path: {
|
|
427
428
|
id: requestInput.sessionID,
|
|
428
429
|
messageID: messageIDHeader,
|
|
@@ -439,7 +440,7 @@ export function buildPluginHooks(input) {
|
|
|
439
440
|
};
|
|
440
441
|
}
|
|
441
442
|
}
|
|
442
|
-
const session = await sessionLookup?.({
|
|
443
|
+
const session = await sessionLookup?.call(sessionClient, {
|
|
443
444
|
path: {
|
|
444
445
|
id: requestInput.sessionID,
|
|
445
446
|
},
|