@koalaauto/agentchannel 3.39.2 → 3.39.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -50,6 +50,8 @@ export declare class KiroOutput {
|
|
|
50
50
|
jsonLines: number;
|
|
51
51
|
private buf;
|
|
52
52
|
private message;
|
|
53
|
+
/** Thought chunks arrive a few tokens at a time: one thinking step per run of them, not one per chunk. */
|
|
54
|
+
private thought;
|
|
53
55
|
private messages;
|
|
54
56
|
/** kiro-cli 3.x ends a run with `runFinished` carrying the run's final text: it wins over the streamed messages. */
|
|
55
57
|
private runFinal;
|
|
@@ -60,6 +62,7 @@ export declare class KiroOutput {
|
|
|
60
62
|
/** The agent's last message (stream-json), else the text transcript's tail. */
|
|
61
63
|
finalText(): string;
|
|
62
64
|
private flushMessage;
|
|
65
|
+
private flushThought;
|
|
63
66
|
private setSession;
|
|
64
67
|
private line;
|
|
65
68
|
}
|
|
@@ -93,6 +93,8 @@ export class KiroOutput {
|
|
|
93
93
|
jsonLines = 0;
|
|
94
94
|
buf = '';
|
|
95
95
|
message = '';
|
|
96
|
+
/** Thought chunks arrive a few tokens at a time: one thinking step per run of them, not one per chunk. */
|
|
97
|
+
thought = '';
|
|
96
98
|
messages = [];
|
|
97
99
|
/** kiro-cli 3.x ends a run with `runFinished` carrying the run's final text: it wins over the streamed messages. */
|
|
98
100
|
runFinal = '';
|
|
@@ -112,6 +114,7 @@ export class KiroOutput {
|
|
|
112
114
|
if (this.buf)
|
|
113
115
|
this.line(this.buf);
|
|
114
116
|
this.buf = '';
|
|
117
|
+
this.flushThought();
|
|
115
118
|
this.flushMessage();
|
|
116
119
|
}
|
|
117
120
|
/** The agent's last message (stream-json), else the text transcript's tail. */
|
|
@@ -130,6 +133,11 @@ export class KiroOutput {
|
|
|
130
133
|
}
|
|
131
134
|
this.message = '';
|
|
132
135
|
}
|
|
136
|
+
flushThought() {
|
|
137
|
+
if (this.thought.trim())
|
|
138
|
+
this.onEvent({ type: 'thinking', data: this.thought });
|
|
139
|
+
this.thought = '';
|
|
140
|
+
}
|
|
133
141
|
setSession(id) {
|
|
134
142
|
if (typeof id !== 'string' || !id || id === this.sessionId)
|
|
135
143
|
return;
|
|
@@ -150,6 +158,7 @@ export class KiroOutput {
|
|
|
150
158
|
}
|
|
151
159
|
}
|
|
152
160
|
if (!j || typeof j !== 'object') {
|
|
161
|
+
this.flushThought();
|
|
153
162
|
const t = stripAnsi(line);
|
|
154
163
|
this.text.push(t);
|
|
155
164
|
if (!this.sessionId)
|
|
@@ -168,16 +177,15 @@ export class KiroOutput {
|
|
|
168
177
|
}
|
|
169
178
|
const u = p.update ?? j.update ?? j;
|
|
170
179
|
const kind = String(u.sessionUpdate ?? u.type ?? j.type ?? j.method ?? '');
|
|
180
|
+
if (kind !== 'agent_thought_chunk')
|
|
181
|
+
this.flushThought();
|
|
171
182
|
switch (kind) {
|
|
172
183
|
case 'agent_message_chunk':
|
|
173
184
|
this.message += contentText(u.content);
|
|
174
185
|
break;
|
|
175
|
-
case 'agent_thought_chunk':
|
|
176
|
-
|
|
177
|
-
if (t.trim())
|
|
178
|
-
this.onEvent({ type: 'thinking', data: t });
|
|
186
|
+
case 'agent_thought_chunk':
|
|
187
|
+
this.thought += contentText(u.content);
|
|
179
188
|
break;
|
|
180
|
-
}
|
|
181
189
|
case 'tool_call':
|
|
182
190
|
this.flushMessage();
|
|
183
191
|
this.onEvent({ type: 'tool_start', data: { id: String(u.toolCallId ?? u.id ?? ''), name: String(u.title ?? u.kind ?? 'tool'), input: u.rawInput ?? '' } });
|
package/dist/src/version.d.ts
CHANGED
package/dist/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koalaauto/agentchannel",
|
|
3
|
-
"version": "3.39.
|
|
3
|
+
"version": "3.39.3",
|
|
4
4
|
"description": "Hand work between your team's agents (Claude Code, Codex) and follow it in one panel: the ach CLI, MCP server and runner for AgentChannel v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentchannel",
|