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