feat: Add feature_citation toggle for Captain assistants (#12052)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Shivam Mishra
2025-08-11 13:06:20 +05:30
committed by GitHub
parent 6cab741392
commit fcc6e2b8b2
9 changed files with 115 additions and 17 deletions

View File

@@ -35,6 +35,7 @@ const initialState = {
productName: '',
featureFaq: false,
featureMemory: false,
featureCitation: false,
};
const state = reactive({ ...initialState });
@@ -70,6 +71,7 @@ const prepareAssistantDetails = () => ({
product_name: state.productName,
feature_faq: state.featureFaq,
feature_memory: state.featureMemory,
feature_citation: state.featureCitation,
},
});
@@ -93,6 +95,7 @@ const updateStateFromAssistant = assistant => {
productName: config.product_name,
featureFaq: config.feature_faq || false,
featureMemory: config.feature_memory || false,
featureCitation: config.feature_citation || false,
});
};
@@ -151,6 +154,13 @@ watch(
{{ t('CAPTAIN.ASSISTANTS.FORM.FEATURES.ALLOW_MEMORIES') }}
</span>
</label>
<label class="flex items-center gap-2">
<input v-model="state.featureCitation" type="checkbox" />
<span class="text-sm font-medium text-n-slate-12">
{{ t('CAPTAIN.ASSISTANTS.FORM.FEATURES.ALLOW_CITATIONS') }}
</span>
</label>
</fieldset>
<div class="flex items-center justify-between w-full gap-3">