refactor: formatting

This commit is contained in:
cogwheel0
2025-09-24 12:00:49 +05:30
parent b8c024d0b0
commit 5f013b1b73
27 changed files with 158 additions and 121 deletions

View File

@@ -229,7 +229,7 @@ class BrandService {
return AppBar(
title: Text(
title,
style: context != null
style: context != null
? context.conduitTheme.headingSmall?.copyWith(
color: context.conduitTheme.textPrimary,
fontWeight: FontWeight.w600,

View File

@@ -3,13 +3,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
part 'outbound_task.freezed.dart';
part 'outbound_task.g.dart';
enum TaskStatus {
queued,
running,
succeeded,
failed,
cancelled,
}
enum TaskStatus { queued, running, succeeded, failed, cancelled }
@freezed
abstract class OutboundTask with _$OutboundTask {
@@ -74,7 +68,6 @@ abstract class OutboundTask with _$OutboundTask {
String? error,
}) = GenerateImageTask;
const factory OutboundTask.generateTitle({
required String id,
required String conversationId,
@@ -106,16 +99,16 @@ abstract class OutboundTask with _$OutboundTask {
// Provide a unified nullable conversationId across variants
String? get maybeConversationId => map(
sendTextMessage: (t) => t.conversationId,
uploadMedia: (t) => t.conversationId,
executeToolCall: (t) => t.conversationId,
generateImage: (t) => t.conversationId,
generateTitle: (t) => t.conversationId,
imageToDataUrl: (t) => t.conversationId,
);
sendTextMessage: (t) => t.conversationId,
uploadMedia: (t) => t.conversationId,
executeToolCall: (t) => t.conversationId,
generateImage: (t) => t.conversationId,
generateTitle: (t) => t.conversationId,
imageToDataUrl: (t) => t.conversationId,
);
String get threadKey =>
(maybeConversationId == null || maybeConversationId!.isEmpty)
? 'new'
: maybeConversationId!;
? 'new'
: maybeConversationId!;
}