Load last used preset when opening new chat #1252
-
As titled, currently whenever i open a new chat, it remembers the last model used, but not the last preset. It would be great if we don't have to reselect preset on each new chat session |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
This is sort of planned but not how you said. You will have to explicitly set a default preset, which then will be loaded for every new chat |
Beta Was this translation helpful? Give feedback.
-
Just a small suggestion: an option to keep the last used preset active for new conversations would be great, so each assigned preset becomes the default until changed. Also, an easier way to reorder presets (beyond pinning) would be helpful. I've been using alt+1 to alt+9 to label and switch presets: Click to expand code//
// alt+1 to alt+9 to select presets
//
(() => {
const synthClick = el => {
if (!el) return;
el.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
el.focus?.();
};
function handleAltDigit(ev) {
if (!ev.altKey || !/^Digit[1-9]$/.test(ev.code)) return;
ev.preventDefault();
ev.stopPropagation();
const idx = +ev.code.slice(-1) - 1;
const btn = document.getElementById('presets-button');
if (!btn) return console.warn('[Preset-helper] #presets-button not found');
btn.click();
setTimeout(() => {
const items = Array.from(
document.querySelectorAll('div[role="option"][data-testid^="preset-item"]')
);
if (items[idx]) synthClick(items[idx]);
}, 500);
}
window.addEventListener('keydown', handleAltDigit, true);
})();
//
// Label the presets
//
(() => {
/* ——— simple style for the tiny label ——— */
const style = document.createElement('style');
style.textContent = `
.alt-hint {
font-size: 10px; /* small text */
opacity: .5; /* 50 % opacity */
margin-left: 4px; /* a little gap */
pointer-events: none; /* never blocks clicks */
user-select: none;
}`;
document.head.appendChild(style);
const ITEM_SELECTOR = 'div[role="option"][data-testid^="preset-item"]';
const MAX_DIGITS = 9; // Alt+1 … Alt+9
/** add the hint to each item (if not already present) */
const addHints = () => {
[...document.querySelectorAll(ITEM_SELECTOR)]
.slice(0, MAX_DIGITS)
.forEach((el, i) => {
if (el.querySelector('.alt-hint')) return; // only once
const span = document.createElement('span');
span.className = 'alt-hint';
span.textContent = `Alt+${i + 1}`;
el.appendChild(span);
});
};
/* run once right now (in case the menu is already open) */
addHints();
/* keep watching for future openings of the menu */
const mo = new MutationObserver(addHints);
mo.observe(document.body, { childList: true, subtree: true });
})();
//
// alt+d → Open the preset menu
//
(() => {
'use strict';
window.addEventListener('keydown', handleAltP, true);
const openPresetMenu = () => {
const btn = document.getElementById('presets-button');
if (!btn) {
console.log('[Preset-helper] couldn’t find #presets-button');
return false;
}
btn.click();
return true;
};
function handleAltP(e) {
if (e.altKey && e.code === 'KeyD') {
e.preventDefault();
e.stopPropagation();
openPresetMenu();
}
}
})(); |
Beta Was this translation helpful? Give feedback.
This is sort of planned but not how you said. You will have to explicitly set a default preset, which then will be loaded for every new chat