Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: reveal last 4 letters for the api key (#5197)

Tianzhou (天舟)ccd679f087e2
diff --git a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
index ad4d8980b9..7a41f6f64f 100644
--- a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
+++ b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
@@ -109,7 +109,11 @@ const state = reactive<LocalState>({
const openAIKeySetting = useSettingByName("bb.plugin.openai.key");
watchEffect(() => {
- state.openAIKey = openAIKeySetting.value?.value ? "sk-******" : "";
+ state.openAIKey = openAIKeySetting.value?.value
+ ? openAIKeySetting.value?.value.slice(0, 3) +
+ "***" +
+ openAIKeySetting.value?.value.slice(-4)
+ : "";
});
const allowEdit = computed((): boolean => {