fix: switching a session's model, and put the model row in the composer
- POST /api/session/:id/model takes the reference under `model`; sending it at the top level was rejected with "Missing key at [model]". - The chat now shows the model/agent row above the input (revealed while typing or running, as dsh-Go does) instead of in the app bar; the draft keeps the same row, with its project chip first. - Thinking levels: /api/model's variants become a 思考 chip and sheet; the choice travels as ModelRef.variant on the switch or the create, and the last level per model is remembered on the device. - The model picker groups providers, adds 收藏 and 最近 (device-local), shows each model's context size and reasoning mark, and collapses sections. - The `/` palette is shared by the chat and the draft (new slash_palette widget); the draft lists commands and skills but not the client-local /compact, which needs an existing session. - 0.3.14 (314).
This commit is contained in:
1 parent
fff6562cbc
commit
7f2f454539
12 files changed
+962
-344
No files matched your search
+3
-1
@@ -305,8 +305,10 @@ class Client {
|
||||
}
|
||||
|
||||
Future<void> switchModel(String sessionId, ModelRef model, {String? directory}) async {
|
||||
// The route takes the reference under `model`; sending it at the top level
|
||||
// is rejected with "Missing key at [model]".
|
||||
await _json('POST', '/api/session/${Uri.encodeComponent(sessionId)}/model',
|
||||
directory: directory, body: model.toJson());
|
||||
directory: directory, body: {'model': model.toJson()});
|
||||
}
|
||||
|
||||
Future<void> switchAgent(String sessionId, String agent, {String? directory}) async {
|
||||
|
||||
Reference in new issue
Block a user