Handle 'get_task' changes in setupStorageChangeListener to update special prompts IDs accordingly. see #333
This commit is contained in:
parent
12d54d8a31
commit
e1ad9d9c5d
1 changed files with 14 additions and 0 deletions
|
|
@ -676,6 +676,20 @@ function setupStorageChangeListener() {
|
||||||
menus.reload(special_prompts_ids);
|
menus.reload(special_prompts_ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process 'get_task' changes
|
||||||
|
if (changes.get_task) {
|
||||||
|
const newTask = changes.get_task.newValue;
|
||||||
|
let getCalendarEvent = doGetSparkFeature(prefs_init.get_calendar_event);
|
||||||
|
let getTask = doGetSparkFeature(newTask);
|
||||||
|
const special_prompts_ids = getActiveSpecialPromptsIDs({
|
||||||
|
addtags: prefs_init.add_tags,
|
||||||
|
get_calendar_event: getCalendarEvent,
|
||||||
|
get_task: getTask,
|
||||||
|
is_chatgpt_web: (prefs_init.connection_type === "chatgpt_web")
|
||||||
|
});
|
||||||
|
menus.reload(special_prompts_ids);
|
||||||
|
}
|
||||||
|
|
||||||
// Process 'connection_type' changes
|
// Process 'connection_type' changes
|
||||||
if (changes.connection_type) {
|
if (changes.connection_type) {
|
||||||
const newConnectionType = changes.connection_type.newValue;
|
const newConnectionType = changes.connection_type.newValue;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue