diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 1fef246..b067000 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -363,7 +363,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 174; + CURRENT_PROJECT_VERSION = 180; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -494,7 +494,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 174; + CURRENT_PROJECT_VERSION = 180; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -519,7 +519,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 174; + CURRENT_PROJECT_VERSION = 180; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; diff --git a/lib/data/res/build.dart b/lib/data/res/build.dart index 21a886c..605dd07 100644 --- a/lib/data/res/build.dart +++ b/lib/data/res/build.dart @@ -2,8 +2,9 @@ class Build { static const String name = "GPTBox"; - static const int build = 174; + static const int build = 180; static const String engine = "3.22.1"; - static const String buildAt = "2024-05-30 23:08:22"; - static const int modifications = 1; + static const String buildAt = "2024-06-03 11:43:51"; + static const int modifications = 4; + static const String script = "(fl_build preview)"; } diff --git a/lib/data/res/misc.dart b/lib/data/res/misc.dart index 608dce2..7561714 100644 --- a/lib/data/res/misc.dart +++ b/lib/data/res/misc.dart @@ -1,3 +1,3 @@ abstract final class Miscs { static const bakFileName = 'gptbox_bak.json'; -} \ No newline at end of file +} diff --git a/lib/view/page/home/appbar.dart b/lib/view/page/home/appbar.dart index 5c685e0..0be7887 100644 --- a/lib/view/page/home/appbar.dart +++ b/lib/view/page/home/appbar.dart @@ -123,18 +123,18 @@ void _onSwitchModel(BuildContext context) async { ); return; } - final models = OpenAICfg.models.value; - final modelStrs = List.from(models); - modelStrs.removeWhere((element) => !element.startsWith('gpt')); - if (modelStrs.isEmpty) { - modelStrs.addAll(models); - } + final models = OpenAICfg.models.value; final model = await context.showPickSingleDialog( - items: modelStrs, + items: models, initial: cfg.model, title: l10n.model, ); if (model == null) return; - OpenAICfg.setTo(cfg.copyWith(model: model), context); + final newModel = switch (_chatType.value) { + ChatType.text => cfg.copyWith(model: model), + ChatType.img => cfg.copyWith(imgModel: model), + ChatType.audio => cfg.copyWith(speechModel: model), + }; + OpenAICfg.setTo(newModel, context); }