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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatccc",
3
- "version": "0.2.130",
3
+ "version": "0.2.131",
4
4
  "description": "Feishu bot bridge for Claude Code",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -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 (replayed input from --replay-user-messages)", () => {
134
- // user 消息中的 text block 来自 --replay-user-messages 重放的用户输入
135
- // (含内嵌的 IM skill prompt),不应出现在最终回复中
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
- // 跳过 user 消息中的 text block:--replay-user-messages 会重放
249
- // 之前的用户消息(含内嵌的 IM skill prompt),这些不应出现在最终回复中
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", "--replay-user-messages"],
474
+ ["--resume", sessionId, "--input-format", "stream-json"],
475
475
  this.maxTurn,
476
476
  options?.planMode,
477
477
  );