mirror of
https://github.com/katanemo/plano.git
synced 2026-05-06 14:22:51 +02:00
removing the tabs permission and reverting to window.postMessage (#524)
Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-329.local>
This commit is contained in:
parent
5ea51c8cbd
commit
4e2355965b
3 changed files with 27 additions and 13 deletions
|
|
@ -220,11 +220,10 @@ export default function PreferenceBasedModelSelector() {
|
|||
console.log('[PBMS] Saved tuples:', tuples);
|
||||
}
|
||||
});
|
||||
// Send message to background script to apply the default model
|
||||
window.parent.postMessage({ action: 'applyModelSelection', model: defaultModel }, "*");
|
||||
|
||||
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
|
||||
chrome.tabs.sendMessage(tabs[0].id, { action: 'applyModelSelection', model: defaultModel });
|
||||
});
|
||||
|
||||
// Close the modal after saving
|
||||
window.parent.postMessage({ action: 'CLOSE_PBMS_MODAL' }, '*');
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue