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:
blumia committed 2026-11-25 14:30:29 +08:00
1 parent 2185054aab
commit 2f5ce61692
7 files changed
+486 -7

No files matched your search

+12
View File
@@ -247,6 +247,18 @@ class Client {
.toList();
}
/// The models that generate or edit images (`types=image`), for the image
/// tool's model choice in 设置 → 通用.
Future<List<ModelInfo>> imageModels(String directory) async {
final r = await _json('GET', '/api/model', query: {
'types': 'image',
if (directory.isNotEmpty) 'location[directory]': directory,
});
return (r['data'] as List? ?? [])
.map((e) => ModelInfo.fromJson(e as Map<String, dynamic>))
.toList();
}
Future<List<AgentInfo>> agents(String directory) async {
final r = await _json('GET', '/api/agent',
query: directory.isNotEmpty ? {'location[directory]': directory} : null);