feat: add the 通用 settings page and rename the group to 常规
- 常规 now holds two pages: 通用 (the agent's tools and what it may know, as the web client's General page) and 聊天 (the follow-up behavior) - 通用 covers diagrams/prototypes, images with their model, secrets, notifications, memory with its background tidying (model and thinking level), project knowledge and usage limits - every switch reads and writes /api/config/settings, the same keys the web UI uses; keys the server does not store take its defaults - image models come from /api/model?types=image and the tidying model from the chat model list, both chosen in a sheet and clearable - bump to 0.5.0
This commit is contained in:
1 parent
2185054aab
commit
2f5ce61692
7 files changed
+486
-7
No files matched your search
@@ -15,6 +15,7 @@ void main() {
|
||||
(tester) async {
|
||||
await pumpSettings(tester);
|
||||
|
||||
expect(find.text('常规'), findsOneWidget);
|
||||
expect(find.text('通用'), findsOneWidget);
|
||||
expect(find.text('外观'), findsOneWidget);
|
||||
expect(find.text('帮助与关于'), findsOneWidget);
|
||||
@@ -28,6 +29,33 @@ void main() {
|
||||
expect(find.byType(Switch), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('通用 opens the agent-tool page with the web defaults',
|
||||
(tester) async {
|
||||
final app = await pumpSettings(tester);
|
||||
app.memoryToolsAvailable = true;
|
||||
await tester.pump();
|
||||
|
||||
await tester.tap(find.text('通用'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('在聊天中'), findsOneWidget);
|
||||
expect(find.text('图表和原型'), findsOneWidget);
|
||||
expect(find.text('密钥'), findsOneWidget);
|
||||
expect(find.text('项目知识'), findsOneWidget);
|
||||
expect(find.text('用量限额'), findsOneWidget);
|
||||
|
||||
SwitchListTile tile(String title) => tester
|
||||
.widget<SwitchListTile>(find.widgetWithText(SwitchListTile, title));
|
||||
// The same defaults the web client starts from.
|
||||
expect(tile('图表和原型').value, isTrue);
|
||||
expect(tile('图像').value, isFalse);
|
||||
expect(tile('密钥').value, isTrue);
|
||||
expect(tile('通知').value, isFalse);
|
||||
expect(tile('记忆').value, isFalse);
|
||||
expect(tile('项目知识').value, isTrue);
|
||||
expect(tile('用量限额').value, isFalse);
|
||||
});
|
||||
|
||||
testWidgets('聊天 opens the follow-up behavior page', (tester) async {
|
||||
final app = await pumpSettings(tester);
|
||||
|
||||
|
||||
Reference in new issue
Block a user