@hunyed15/codecgc 0.2.8 → 0.2.10

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": "@hunyed15/codecgc",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Claude-hosted multi-model workflow product shell for CodeCGC.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -1952,22 +1952,29 @@ def build_assistant_reply(result: dict[str, Any]) -> str:
1952
1952
  dispatched = bool(result.get("dispatched"))
1953
1953
  dispatch_result = result.get("dispatch_result", {}) if isinstance(result.get("dispatch_result"), dict) else {}
1954
1954
  user_next = build_user_facing_next(result)
1955
+
1956
+ # Build beginner-friendly action suggestions
1957
+ beginner_actions = build_beginner_action_pack(result)
1958
+ beginner_suffix = ""
1959
+ if beginner_actions:
1960
+ beginner_suffix = "\n\n**下一步建议:**\n" + "\n".join(f"- {action}" for action in beginner_actions)
1961
+
1955
1962
  if entry_mode == "new":
1956
1963
  summary = build_new_mode_human_summary(result)
1957
1964
  suggested = str(result.get("suggested_reply_template", "")).strip()
1958
1965
  if dispatched and not dispatch_result.get("success"):
1959
- return summary
1966
+ return summary + beginner_suffix
1960
1967
  if suggested:
1961
- return f"{summary}\n\n{suggested}"
1962
- return compose_user_reply(summary, user_next)
1968
+ return f"{summary}\n\n{suggested}{beginner_suffix}"
1969
+ return compose_user_reply(summary, user_next) + beginner_suffix
1963
1970
 
1964
1971
  summary = build_existing_mode_human_summary(result)
1965
1972
  if dispatched and not dispatch_result.get("success"):
1966
- return summary
1973
+ return summary + beginner_suffix
1967
1974
  route_status = result.get("route_status", {}) if isinstance(result.get("route_status"), dict) else {}
1968
1975
  if str(route_status.get("operator_action_summary", "")).strip():
1969
- return compose_user_reply(summary, user_next)
1970
- return compose_user_reply(summary, user_next)
1976
+ return compose_user_reply(summary, user_next) + beginner_suffix
1977
+ return compose_user_reply(summary, user_next) + beginner_suffix
1971
1978
 
1972
1979
 
1973
1980
  def build_beginner_action_pack(result: dict[str, Any]) -> list[str]:
@@ -294,7 +294,7 @@ async def execute_payload(payload: dict[str, Any], timeout_seconds: int) -> dict
294
294
  payload["tool_args"],
295
295
  read_timeout_seconds=datetime.timedelta(seconds=timeout_seconds),
296
296
  )
297
- except* ExceptionGroup:
297
+ except Exception:
298
298
  # MCP SDK 清理阶段的 TaskGroup 异常不影响已获得的结果
299
299
  pass
300
300