Elffuss BraidHub

kikocis/continue public

fix: update serve stream callbacks
Changeset10459a948591a3b2b7f9d07d3f9b6d033531cafe044f327e5fb5a23bcdddb78c
AuthorNate <sestinj@gmail.com> · 2025-08-28 19:01 -07:00
CommitterNate <sestinj@gmail.com> · 2025-08-28 19:01 -07:00
Parents2993b729f81c

Browse the files at this changeset

1 file changed

modified extensions/cli/src/commands/serve.helpers.ts +6 −21
@@ -31,28 +31,13 @@
3131
3232 // Create callbacks to capture tool events
3333 const callbacks: StreamCallbacks = {
34- onContent: (content: string) => {
35- if (!currentStreamingItem) {
36- currentStreamingItem = {
37- message: { role: "assistant", content: "" },
38- contextItems: [],
39- };
40- state.session.history.push(currentStreamingItem);
41- }
42- currentStreamingItem.message.content =
43- (currentStreamingItem.message.content as string) + content;
44- },
34+ onContent: (_: string) => {},
4535 onContentComplete: (content: string) => {
46- if (currentStreamingItem) {
47- currentStreamingItem.message.content = content;
48- currentStreamingItem = null;
49- } else {
50- // Add complete assistant message
51- state.session.history.push({
52- message: { role: "assistant", content: content },
53- contextItems: [],
54- });
55- }
36+ currentStreamingItem = {
37+ message: { role: "assistant", content },
38+ contextItems: [],
39+ };
40+ state.session.history.push(currentStreamingItem);
5641 },
5742 onToolStart: (toolName: string, toolArgs?: any) => {
5843 // If there was streaming content, finalize it first