保留模型选择保存错误正文
模型配置写回失败时展示具体 IPC 或配置错误
This commit is contained in:
+8
-4
@@ -198,8 +198,10 @@ export function ConversationModelSelect({
|
||||
),
|
||||
}),
|
||||
);
|
||||
} catch {
|
||||
throw new ModelSelectionConfigError('模型选择保存失败');
|
||||
} catch (error) {
|
||||
throw new ModelSelectionConfigError(
|
||||
visibleClientErrorMessage(error, '模型选择保存失败'),
|
||||
);
|
||||
}
|
||||
if (
|
||||
persisted.config.selectedModelId !== next ||
|
||||
@@ -382,8 +384,10 @@ export function ConversationModelSelect({
|
||||
setNotice('');
|
||||
}
|
||||
markReady(true);
|
||||
} catch {
|
||||
if (mountedRef.current) setError('模型选择保存失败');
|
||||
} catch (error) {
|
||||
if (mountedRef.current) {
|
||||
setError(visibleClientErrorMessage(error, '模型选择保存失败'));
|
||||
}
|
||||
markReady(false);
|
||||
} finally {
|
||||
if (mountedRef.current) setBusy(false);
|
||||
|
||||
Reference in New Issue
Block a user