fix: 修复 basedpyright 类型错误和语言设置同步问题

runner.py: 将 user_text 解构从 tuple 第二元素改为第一元素(str),
消除 str | list[dict[str,Any]] 与 Msg.content 的类型不兼容问题。
简化了始终为 true 的 user_blocks 条件分支。

repository.py: 将 result.rowcount 的 type: ignore 替换为基于
pyright: ignore[reportAttributeAccessIssue],消除 basedpyright 错误。

app.dart: 保存 profile 时同步 _locale 和 session store 中的语言标记。
This commit is contained in:
qzl
2026-04-14 12:42:35 +08:00
parent 55bac03eb0
commit c74e3f688c
3 changed files with 8 additions and 15 deletions
+4
View File
@@ -300,7 +300,11 @@ class _EryaoAppState extends State<EryaoApp> {
if (!mounted) {
return;
}
final serverLanguage = profile.preferences.interfaceLanguage;
final serverLocale = localeFromLanguageTag(serverLanguage);
await _sessionStore.saveLocaleTag(serverLanguage);
setState(() {
_locale = serverLocale;
_profileSettings = profile;
_loadedProfileUserEmail = userEmail;
});