feat(config): support assistant briefing runtime edits and setup defaults
This commit is contained in:
@@ -176,6 +176,50 @@ const PATCHABLE_KEYS: Record<string, (config: Config, value: unknown) => boolean
|
||||
config.automation.daily_briefing.enabled = value;
|
||||
return true;
|
||||
},
|
||||
'automation.daily_briefing.output.channel': (config, value) => {
|
||||
if (typeof value !== 'string' || value.trim().length === 0) {return false;}
|
||||
config.automation ??= {} as Config['automation'];
|
||||
config.automation.daily_briefing ??= {} as Config['automation']['daily_briefing'];
|
||||
config.automation.daily_briefing.output ??= { channel: 'webchat', peer: 'assistant' };
|
||||
config.automation.daily_briefing.output.channel = value.trim();
|
||||
return true;
|
||||
},
|
||||
'automation.daily_briefing.output.peer': (config, value) => {
|
||||
if (typeof value !== 'string' || value.trim().length === 0) {return false;}
|
||||
config.automation ??= {} as Config['automation'];
|
||||
config.automation.daily_briefing ??= {} as Config['automation']['daily_briefing'];
|
||||
config.automation.daily_briefing.output ??= { channel: 'webchat', peer: 'assistant' };
|
||||
config.automation.daily_briefing.output.peer = value.trim();
|
||||
return true;
|
||||
},
|
||||
'automation.daily_briefing.prompt': (config, value) => {
|
||||
if (typeof value !== 'string' || value.trim().length === 0) {return false;}
|
||||
config.automation ??= {} as Config['automation'];
|
||||
config.automation.daily_briefing ??= {} as Config['automation']['daily_briefing'];
|
||||
config.automation.daily_briefing.prompt = value;
|
||||
return true;
|
||||
},
|
||||
'automation.daily_briefing.schedule': (config, value) => {
|
||||
if (typeof value !== 'string' || value.trim().length === 0) {return false;}
|
||||
config.automation ??= {} as Config['automation'];
|
||||
config.automation.daily_briefing ??= {} as Config['automation']['daily_briefing'];
|
||||
config.automation.daily_briefing.schedule = value.trim();
|
||||
return true;
|
||||
},
|
||||
'automation.daily_briefing.timezone': (config, value) => {
|
||||
if (typeof value !== 'string' || value.trim().length === 0) {return false;}
|
||||
config.automation ??= {} as Config['automation'];
|
||||
config.automation.daily_briefing ??= {} as Config['automation']['daily_briefing'];
|
||||
config.automation.daily_briefing.timezone = value.trim();
|
||||
return true;
|
||||
},
|
||||
'automation.daily_briefing.model_tier': (config, value) => {
|
||||
if (value !== 'fast' && value !== 'default' && value !== 'complex' && value !== 'local') {return false;}
|
||||
config.automation ??= {} as Config['automation'];
|
||||
config.automation.daily_briefing ??= {} as Config['automation']['daily_briefing'];
|
||||
config.automation.daily_briefing.model_tier = value;
|
||||
return true;
|
||||
},
|
||||
'memory.daily_log.enabled': (config, value) => {
|
||||
if (typeof value !== 'boolean') {return false;}
|
||||
config.memory ??= {} as Config['memory'];
|
||||
|
||||
Reference in New Issue
Block a user