feat: browse subagent sessions nested under their parent
Sessions with a parentID were filtered out of the sidebar, so a subagent's conversation was unreachable. They now render indented under the session that started them (robot marker, "子代理 ·" subtitle), the parent shows its worker count, and tapping one opens its full chat. Opening a parent also fetches its children with parentID=<id>, so older workers missing from the loaded page appear. A subagent's app bar gets a back arrow to its parent session. Builds now produce a universal APK plus per-ABI arm64/armv7/x86_64 splits; the packaging preference is kept in project memory. 0.4.9 (409).
This commit is contained in:
1 parent
79221e57d7
commit
cebf09048e
9 files changed
+170
-19
No files matched your search
@@ -43,6 +43,46 @@ void main() {
|
||||
expect(find.text('LC_ALL 环境变量的设置来源'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a subagent session shows nested under its parent and opens',
|
||||
(tester) async {
|
||||
final app = AppState();
|
||||
final now = DateTime.now().millisecondsSinceEpoch;
|
||||
app.sessions = [
|
||||
Session(
|
||||
id: 'parent',
|
||||
title: '子代理输出 hello',
|
||||
agent: 'build',
|
||||
location: Location('/home/me/Sources/app'),
|
||||
created: now,
|
||||
updated: now,
|
||||
),
|
||||
Session(
|
||||
id: 'child',
|
||||
parentID: 'parent',
|
||||
title: '输出 hello',
|
||||
agent: 'general',
|
||||
location: Location('/home/me/Sources/app'),
|
||||
created: now - 500,
|
||||
updated: now - 500,
|
||||
),
|
||||
];
|
||||
addTearDown(app.dispose);
|
||||
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
home: Scaffold(body: SessionListPane(app: app)),
|
||||
));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('子代理输出 hello'), findsOneWidget);
|
||||
expect(find.text('输出 hello'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.smart_toy_outlined), findsOneWidget);
|
||||
expect(find.textContaining('1 个子代理'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.text('输出 hello'));
|
||||
await tester.pump();
|
||||
expect(app.chat?.session.id, 'child');
|
||||
});
|
||||
|
||||
testWidgets('the project band matches a session row and keeps the keys in line',
|
||||
(tester) async {
|
||||
final app = AppState();
|
||||
|
||||
Reference in new issue
Block a user