feat: AI-output Markdown, live SSE fixes, faster builds
- render assistant Markdown with gpt_markdown (the same renderer dsh-Go uses): streaming, syntax-highlighted code with copy, tables, LaTeX and task lists, replacing flutter_markdown - fix the event stream: Dart's Map collapsed the repeated `types` query into one value, so only one event type was subscribed and chats never updated; build the query by hand - keep the optimistic prompt on failure out of the transcript and put the text back for a retry - clamp negative turn durations - build: Aliyun Maven mirrors, pre-seeded Gradle 9.5.0, and a complete NDK 28.2 install to avoid multi-hour downloads
This commit is contained in:
1 parent
aee560172c
commit
885a27c6a9
7 files changed
+186
-46
No files matched your search
+6
-1
@@ -536,9 +536,14 @@ class ChatState extends ChangeNotifier {
|
||||
await app.client!.prompt(this.id, text: t, messageId: id, directory: dir, files: files);
|
||||
return id;
|
||||
} catch (e) {
|
||||
// The prompt did not reach the server: take the optimistic message back
|
||||
// and keep what was typed, so a retry is not a duplicate.
|
||||
msgs.removeWhere((m) => m.id == id);
|
||||
_reindex();
|
||||
draft = t;
|
||||
error = e.toString();
|
||||
notifyListeners();
|
||||
return id;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user