feat(settings): add response style presets
This commit is contained in:
@@ -942,6 +942,29 @@ const sanitizeWebSettings = (payload: unknown): DesktopSettings | null => {
|
||||
result.reportUsage = candidate.reportUsage;
|
||||
}
|
||||
|
||||
if (typeof candidate.globalBehaviorPrompt === 'string') {
|
||||
result.globalBehaviorPrompt = candidate.globalBehaviorPrompt;
|
||||
}
|
||||
if (typeof candidate.responseStyleEnabled === 'boolean') {
|
||||
result.responseStyleEnabled = candidate.responseStyleEnabled;
|
||||
}
|
||||
if (
|
||||
typeof candidate.responseStylePreset === 'string'
|
||||
&& (candidate.responseStylePreset === 'concise'
|
||||
|| candidate.responseStylePreset === 'detailed'
|
||||
|| candidate.responseStylePreset === 'mentor'
|
||||
|| candidate.responseStylePreset === 'pushback'
|
||||
|| candidate.responseStylePreset === 'noFiller'
|
||||
|| candidate.responseStylePreset === 'matchEnergy'
|
||||
|| candidate.responseStylePreset === 'warmPeer'
|
||||
|| candidate.responseStylePreset === 'custom')
|
||||
) {
|
||||
result.responseStylePreset = candidate.responseStylePreset;
|
||||
}
|
||||
if (typeof candidate.responseStyleCustomInstructions === 'string') {
|
||||
result.responseStyleCustomInstructions = candidate.responseStyleCustomInstructions;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user