Merge branch 'ui' into develop

This commit is contained in:
Sakamoto Shiina
2025-12-04 14:55:07 +09:00

View File

@@ -40,18 +40,18 @@ export const _useBackendErrorHandling = () => {
updateDeepLAuthKey,
updatePlamoAuthKey,
updatePlamoModel,
updateSelectedPlamoModel,
updateGeminiAuthKey,
updateGeminiModel,
updateSelectedGeminiModel,
updateOpenAIAuthKey,
updateOpenAIModel,
updateSelectedOpenAIModel,
updateLMStudioUrl,
updateLMStudioModel,
updateSelectedLMStudioModel,
updateOllamaModel,
updateSelectedOllamaModel,
} = useTranslation();
const { updateEnableVrcMicMuteSync } = useOthers();
@@ -164,6 +164,16 @@ export const _useBackendErrorHandling = () => {
}
return;
case "/set/data/selected_plamo_model":
if (message === "Plamo model is not valid") {
updateSelectedPlamoModel(data);
showNotification_Error(message, { category_id: "selected_plamo_model" });
} else {
updateSelectedPlamoModel(data);
showNotification_Error(message, { category_id: "selected_plamo_model" });
}
return;
case "/set/data/gemini_auth_key":
if (message === "Gemini auth key length is not correct") {
updateGeminiAuthKey(data);
@@ -177,6 +187,16 @@ export const _useBackendErrorHandling = () => {
}
return;
case "/set/data/selected_gemini_model":
if (message === "Gemini model is not valid") {
updateSelectedGeminiModel(data);
showNotification_Error(message, { category_id: "selected_gemini_model" });
} else {
updateSelectedGeminiModel(data);
showNotification_Error(message, { category_id: "selected_gemini_model" });
}
return;
case "/set/data/openai_auth_key":
if (message === "OpenAI auth key is not valid") {
updateOpenAIAuthKey(data);
@@ -190,33 +210,13 @@ export const _useBackendErrorHandling = () => {
}
return;
case "/set/data/selected_plamo_model":
if (message === "Plamo model is not valid") {
updatePlamoModel(data);
showNotification_Error(message, { category_id: "selected_plamo_model" });
} else {
updatePlamoModel(data);
showNotification_Error(message, { category_id: "selected_plamo_model" });
}
return;
case "/set/data/selected_gemini_model":
if (message === "Gemini model is not valid") {
updateGeminiModel(data);
showNotification_Error(message, { category_id: "selected_gemini_model" });
} else {
updateGeminiModel(data);
showNotification_Error(message, { category_id: "selected_gemini_model" });
}
return;
case "/set/data/selected_openai_model":
console.log(data);
if (message === "OpenAI model is not valid") {
updateOpenAIModel(data);
updateSelectedOpenAIModel(data);
showNotification_Error(message, { category_id: "selected_openai_model" });
} else {
updateOpenAIModel(data);
updateSelectedOpenAIModel(data);
showNotification_Error(message, { category_id: "selected_openai_model" });
}
return;
@@ -233,20 +233,20 @@ export const _useBackendErrorHandling = () => {
case "/set/data/selected_lmstudio_model":
if (message === "LMStudio model is not valid") {
updateLMStudioModel(data);
updateSelectedLMStudioModel(data);
showNotification_Error(message, { category_id: "selected_lmstudio_model" });
} else {
updateLMStudioModel(data);
updateSelectedLMStudioModel(data);
showNotification_Error(message, { category_id: "selected_lmstudio_model" });
}
return;
case "/set/data/selected_ollama_model":
if (message === "ollama model is not valid") {
updateOllamaModel(data);
updateSelectedOllamaModel(data);
showNotification_Error(message, { category_id: "selected_ollama_model" });
} else {
updateOllamaModel(data);
updateSelectedOllamaModel(data);
showNotification_Error(message, { category_id: "selected_ollama_model" });
}
return;