fix: match the background task bar to the activity strip
- draw the task bar in the activity strip's capsule (8px margins, 14px padding, 36px min height, stadium radius) so the two read as one stack - drop the stop button from the bar: its padding pushed the clock off the right edge shared with the strip above; the row opens the sheet instead - in the sheet, show only the clock while running, a stop button with a stop icon, and "已结束" once the command ends; no "运行中" label and no close x (the drag handle and the scrim already close it) - say "读取输出…" while the first page loads instead of claiming the command has printed nothing - rest the pet's feet on the status capsule's edge (4px top margin) instead of sinking 2px into it
This commit is contained in:
1 parent
c4de5e84d8
commit
9564019a91
7 files changed
+142
-86
No files matched your search
@@ -342,7 +342,11 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
Positioned.fill(child: _messageList()),
|
||||
// Over the messages, not in the column: the list keeps its
|
||||
// full height and shows through around the pet.
|
||||
Positioned.fill(child: PetLayer(state: _petState())),
|
||||
Positioned.fill(
|
||||
child: PetLayer(
|
||||
state: _petState(),
|
||||
footOffset: _petFootOffset,
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -1714,6 +1718,15 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
/// Where the pet's feet rest: on the composer's capsule, or on the status
|
||||
/// capsule when one is the last thing above the composer. That strip keeps
|
||||
/// a 4px top margin of its own, so the feet stop on its edge instead of
|
||||
/// sinking into it.
|
||||
double get _petFootOffset {
|
||||
final strip = chat.running || (_shells?.tasks.isNotEmpty ?? false);
|
||||
return strip ? 4 : 6;
|
||||
}
|
||||
|
||||
/// The mood the pet draws: the same activity the strip shows, then a failed
|
||||
/// last turn, then idle.
|
||||
String _petState() {
|
||||
@@ -1780,10 +1793,6 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
tasks: tasks,
|
||||
sessionId: chat.session.id,
|
||||
onOpen: _openShellSheet,
|
||||
onStop: (task) async {
|
||||
final ok = await confirmStopShell(context, task.command);
|
||||
if (ok == true) await _stopShell(task);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user