Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ android/build/reports/problems/problems-report.html
**/firebase.json
firebase.json
SIGNALS_MIGRATION.md
EXTERNAL_LIB_OPPORTUNITIES.md
3 changes: 0 additions & 3 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
plugins {
id("com.android.application")
// START: FlutterFire Configuration
id("com.google.gms.google-services")
// END: FlutterFire Configuration
id("org.jetbrains.kotlin.android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
Expand Down
3 changes: 0 additions & 3 deletions android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.9.1" apply false
// START: FlutterFire Configuration
id("com.google.gms.google-services") version("4.3.15") apply false
// END: FlutterFire Configuration
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}

Expand Down
4 changes: 0 additions & 4 deletions build_model.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#!/bin/bash

dart run build_runner build --delete-conflicting-outputs
cd llm && dart run build_runner build --delete-conflicting-outputs
cd ../mcp && dart run build_runner build --delete-conflicting-outputs

clear
2 changes: 1 addition & 1 deletion lib/app/app_routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Route<dynamic> generateRoute(RouteSettings settings) {
case AppRoutes.profiles:
return MaterialPageRoute(builder: (_) => const ChatProfilesScreen());
case AppRoutes.mcp:
return MaterialPageRoute(builder: (_) => const McpServersPage());
return MaterialPageRoute(builder: (_) => const McpItemsPage());
default:
// Log the undefined route for debugging
debugPrint(
Expand Down
4 changes: 2 additions & 2 deletions lib/app/models/default_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ class DefaultModels {

@JsonSerializable(explicitToJson: true, fieldRename: FieldRename.snake)
class DefaultModel {
final String modelName;
final String modelId;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The fieldRename: FieldRename.snake annotation on the class implies that modelId should be serialized to model_id. However, the generated code uses model_name. While this might be intentional for compatibility, it's confusing for future maintenance. To make the intent explicit and remove ambiguity, please add a @JsonKey annotation.

Suggested change
final String modelId;
@JsonKey(name: 'model_name')
final String modelId;

final String providerId;

DefaultModel({required this.modelName, required this.providerId});
DefaultModel({required this.modelId, required this.providerId});

factory DefaultModel.fromJson(Map<String, dynamic> json) =>
_$DefaultModelFromJson(json);
Expand Down
35 changes: 22 additions & 13 deletions lib/app/models/default_options.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file removed lib/app/translate/service.dart
Empty file.
1 change: 0 additions & 1 deletion lib/core/chat/chat.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export 'models/conversation.dart';
export 'models/message.dart';
export 'storage/conversation_storage.dart';
16 changes: 8 additions & 8 deletions lib/core/chat/models/conversation.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:convert';

import 'package:json_annotation/json_annotation.dart';
import 'package:multigateway/core/chat/models/message.dart';

part 'conversation.g.dart';

Expand All @@ -11,12 +10,14 @@ class Conversation {
final String title;
final DateTime createdAt;
final DateTime updatedAt;
final List<ChatMessage> messages;
final List<Map<String, dynamic>> messages;
final int? tokenCount;
final String providerId;
final String modelName;
final String modelId;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to other models in this PR, the fieldRename: FieldRename.snake annotation implies that modelId should be serialized to model_id, but the generated code uses model_name. This can be confusing. Adding an explicit @JsonKey(name: 'model_name') would clarify the intended serialization key.

Suggested change
final String modelId;
@JsonKey(name: 'model_name')
final String modelId;

final String profileId;

String get modelName => modelId;

Conversation({
required this.id,
required this.title,
Expand All @@ -25,18 +26,17 @@ class Conversation {
this.messages = const [],
this.tokenCount,
required this.providerId,
required this.modelName,
required this.modelId,
required this.profileId,
});

Conversation copyWith({
String? title,
DateTime? updatedAt,
List<ChatMessage>? messages,
List<Map<String, dynamic>>? messages,
int? tokenCount,
bool? isAgentConversation,
String? providerId,
String? modelName,
String? modelId,
String? profileId,
}) {
return Conversation(
Expand All @@ -47,7 +47,7 @@ class Conversation {
messages: messages ?? this.messages,
tokenCount: tokenCount ?? this.tokenCount,
providerId: providerId ?? this.providerId,
modelName: modelName ?? this.modelName,
modelId: modelId ?? this.modelId,
profileId: profileId ?? this.profileId,
);
}
Expand Down
31 changes: 16 additions & 15 deletions lib/core/chat/models/conversation.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 0 additions & 108 deletions lib/core/chat/models/message.dart

This file was deleted.

Loading