) => {
+ if (props.onChange) {
+ props.onChange(e);
+ }
+ };
+
return (
@@ -543,6 +565,7 @@ export function Selector(props: {
);
}
+
export function FullScreen(props: any) {
const { children, right = 10, top = 10, ...rest } = props;
const ref = useRef();
diff --git a/app/constant.ts b/app/constant.ts
index d15a2fe79..4c2730d4d 100644
--- a/app/constant.ts
+++ b/app/constant.ts
@@ -121,8 +121,8 @@ export enum ServiceProvider {
Stability = "Stability",
Iflytek = "Iflytek",
XAI = "XAI",
- Bedrock = "Bedrock",
ChatGLM = "ChatGLM",
+ Bedrock = "Bedrock",
}
// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings
@@ -136,7 +136,6 @@ export enum GoogleSafetySettingsThreshold {
export enum ModelProvider {
Stability = "Stability",
- Bedrock = "Bedrock",
GPT = "GPT",
GeminiPro = "GeminiPro",
Claude = "Claude",
@@ -148,6 +147,7 @@ export enum ModelProvider {
Iflytek = "Iflytek",
XAI = "XAI",
ChatGLM = "ChatGLM",
+ Bedrock = "Bedrock",
}
export const Stability = {
diff --git a/app/utils/encryption.ts b/app/utils/encryption.ts
index 76ceed68b..ef750d9ab 100644
--- a/app/utils/encryption.ts
+++ b/app/utils/encryption.ts
@@ -8,6 +8,7 @@ if (!SECRET_KEY || SECRET_KEY.length < 32) {
"ENCRYPTION_KEY environment variable must be set with at least 32 characters",
);
}
+
export function encrypt(data: string): string {
try {
return AES.encrypt(data, SECRET_KEY).toString();
@@ -26,3 +27,9 @@ export function decrypt(encryptedData: string): string {
return encryptedData; // Fallback to the original data if decryption fails
}
}
+
+export function maskSensitiveValue(value: string): string {
+ if (!value) return "";
+ if (value.length <= 4) return value;
+ return "*".repeat(value.length - 4) + value.slice(-4);
+}