fix(ui): improve agent debug and model test feedback

This commit is contained in:
Hyu
2026-09-03 14:51:01 +08:00
parent be0214cf4d
commit 7c64756203
7 changed files with 137 additions and 50 deletions
@@ -522,8 +522,9 @@ export default function ModelsPanel({
setTestResult({ success: true, duration });
} catch (err) {
console.error('Failed to test model', err);
toast.error(t('models.testError') + ': ' + (err as CustomApiError).msg);
setTestResult(null);
const message = (err as CustomApiError).msg || t('models.testError');
toast.error(t('models.testError') + ': ' + message);
setTestResult({ success: false, message });
} finally {
setIsTesting(false);
}