@tduncan / Cortana / commits / 1769f4c

chore: bump version to 1.5.7 and refactor model picker header layout to consolidate server and model count info

abdulmominsakib committed Aug 1, 2026 at 13:40 UTC 1769f4cded007a29c5c2e64d28359dcdbf9b774e
2 files changed +59 -47
lib/features/models/views/model_picker_sheet.dart
+58 -46
@@ -123,6 +123,7 @@ class _ModelPickerSheetState extends ConsumerState<ModelPickerSheet> {
123 isDark: isDark,
124 isThinking: isThinking,
125 loadedCount: loadedCount,
126 + serverName: activeServer?.name,
127 showBrowseButton: isLmStudio,
128 onBrowseModels: isLmStudio
129 ? () {
@@ -145,19 +146,6 @@ class _ModelPickerSheetState extends ConsumerState<ModelPickerSheet> {
146 ? () => _unloadAllModels(context, ref, activeServer)
147 : null,
148 ),
148 - if (activeServer != null)
149 - Padding(
150 - padding: const EdgeInsets.only(top: 4),
151 - child: Text(
152 - activeServer.name,
153 - style: TextStyle(
154 - fontSize: 13,
155 - color: isDark
156 - ? AppColors.darkMutedText
157 - : AppColors.lightMutedText,
158 - ),
159 - ),
160 - ),
149 const SizedBox(height: 12),
150 Row(
151 children: [
@@ -235,6 +223,7 @@ class _ModelPickerHeader extends ConsumerWidget {
223 required this.isDark,
224 required this.isThinking,
225 required this.loadedCount,
226 + this.serverName,
227 this.showBrowseButton = false,
228 this.onBrowseModels,
229 this.onRefresh,
@@ -244,6 +233,7 @@ class _ModelPickerHeader extends ConsumerWidget {
233 final bool isDark;
234 final bool isThinking;
235 final int loadedCount;
236 + final String? serverName;
237 final bool showBrowseButton;
238 final VoidCallback? onBrowseModels;
239 final VoidCallback? onRefresh;
@@ -256,6 +246,8 @@ class _ModelPickerHeader extends ConsumerWidget {
246 final activeConv = ref.watch(conv.activeConversationProvider);
247 final contextLength = activeConv?.contextLength ?? settings.contextLength;
248
249 + final hasSubtitle = serverName != null || loadedCount > 0;
250 +
251 return Row(
252 crossAxisAlignment: CrossAxisAlignment.center,
253 children: [
@@ -265,47 +257,67 @@ class _ModelPickerHeader extends ConsumerWidget {
257 children: [
258 Row(
259 children: [
268 - Text(
269 - l10n.select_model_title,
270 - style: TextStyle(
271 - fontSize: 20,
272 - fontWeight: FontWeight.bold,
273 - color: isDark ? Colors.white : Colors.black,
274 - ),
275 - ),
276 - if (loadedCount > 0) ...[
277 - const SizedBox(width: 8),
278 - Container(
279 - padding: const EdgeInsets.symmetric(
280 - horizontal: 8,
281 - vertical: 2,
282 - ),
283 - decoration: BoxDecoration(
284 - color:
285 - (isDark
286 - ? AppColors.darkAccent
287 - : AppColors.lightAccent)
288 - .withValues(alpha: 0.15),
289 - borderRadius: BorderRadius.circular(999),
290 - ),
291 - child: Text(
292 - l10n.loaded_models_count(loadedCount),
293 - style: TextStyle(
294 - fontSize: 11,
295 - fontWeight: FontWeight.w600,
296 - color: isDark
297 - ? AppColors.darkAccent
298 - : AppColors.lightAccent,
299 - ),
260 + Flexible(
261 + child: Text(
262 + l10n.select_model_title,
263 + style: TextStyle(
264 + fontSize: 20,
265 + fontWeight: FontWeight.bold,
266 + color: isDark ? Colors.white : Colors.black,
267 ),
268 + overflow: TextOverflow.ellipsis,
269 + maxLines: 1,
270 ),
302 - ],
271 + ),
272 if (isThinking) ...[
273 const SizedBox(width: 8),
274 ThinkingIndicator(isDark: isDark),
275 ],
276 ],
277 ),
278 + if (hasSubtitle) ...[
279 + const SizedBox(height: 2),
280 + Row(
281 + children: [
282 + if (serverName != null)
283 + Text(
284 + serverName!,
285 + style: TextStyle(
286 + fontSize: 13,
287 + color: isDark
288 + ? AppColors.darkMutedText
289 + : AppColors.lightMutedText,
290 + ),
291 + ),
292 + if (serverName != null && loadedCount > 0)
293 + const SizedBox(width: 8),
294 + if (loadedCount > 0)
295 + Container(
296 + padding: const EdgeInsets.symmetric(
297 + horizontal: 8,
298 + vertical: 2,
299 + ),
300 + decoration: BoxDecoration(
301 + color: (isDark
302 + ? AppColors.darkAccent
303 + : AppColors.lightAccent)
304 + .withValues(alpha: 0.15),
305 + borderRadius: BorderRadius.circular(999),
306 + ),
307 + child: Text(
308 + l10n.loaded_models_count(loadedCount),
309 + style: TextStyle(
310 + fontSize: 11,
311 + fontWeight: FontWeight.w600,
312 + color: isDark
313 + ? AppColors.darkAccent
314 + : AppColors.lightAccent,
315 + ),
316 + ),
317 + ),
318 + ],
319 + ),
320 + ],
321 ],
322 ),
323 ),
pubspec.yaml
+1 -1
@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
16 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17 # In Windows, build-name is used as the major, minor, and patch parts
18 # of the product and file versions while build-number is used as the build suffix.
19 -version: 1.5.6+61
19 +version: 1.5.7+62
20
21 environment:
22 sdk: ">=3.12.0 <4.0.0"