chatccc 0.2.130 → 0.2.131
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.
package/package.json
CHANGED
|
@@ -130,9 +130,9 @@ describe("normalizeSdkMessage", () => {
|
|
|
130
130
|
expect((result!.blocks[0] as any).content).toEqual(content);
|
|
131
131
|
});
|
|
132
132
|
|
|
133
|
-
it("skips text blocks in user messages
|
|
134
|
-
// user
|
|
135
|
-
//
|
|
133
|
+
it("skips text blocks in user messages", () => {
|
|
134
|
+
// user text is host input, not assistant output. If the CLI emits it for
|
|
135
|
+
// any reason, it should not appear in the final reply.
|
|
136
136
|
const result = normalizeSdkMessage({
|
|
137
137
|
type: "user",
|
|
138
138
|
message: {
|
|
@@ -244,12 +244,12 @@ export function normalizeSdkMessage(msg: SdkMessageLike): UnifiedStreamMessage |
|
|
|
244
244
|
type: "search_result",
|
|
245
245
|
query: block.query ?? "",
|
|
246
246
|
});
|
|
247
|
-
} else if (block.type === "text" && block.text) {
|
|
248
|
-
//
|
|
249
|
-
//
|
|
250
|
-
if (msg.type === "user") continue;
|
|
251
|
-
blocks.push({ type: "text", text: block.text });
|
|
252
|
-
}
|
|
247
|
+
} else if (block.type === "text" && block.text) {
|
|
248
|
+
// user text is host input, not assistant output. Keep it out of the
|
|
249
|
+
// final reply if the CLI ever emits it.
|
|
250
|
+
if (msg.type === "user") continue;
|
|
251
|
+
blocks.push({ type: "text", text: block.text });
|
|
252
|
+
}
|
|
253
253
|
}
|
|
254
254
|
return { type: msg.type, blocks };
|
|
255
255
|
}
|
|
@@ -471,7 +471,7 @@ class ClaudeAdapter implements ToolAdapter {
|
|
|
471
471
|
const env = buildCliEnv(this.subagentModel, this.apiKey, this.baseUrl);
|
|
472
472
|
const args = buildCliArgs(
|
|
473
473
|
this.model, this.effort, this.isEmpty, mcpConfigJson,
|
|
474
|
-
["--resume", sessionId, "--input-format", "stream-json"
|
|
474
|
+
["--resume", sessionId, "--input-format", "stream-json"],
|
|
475
475
|
this.maxTurn,
|
|
476
476
|
options?.planMode,
|
|
477
477
|
);
|