ai-project-manage-cli 5.0.21 → 5.0.22

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -4
  2. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -1049,7 +1049,6 @@ import { Agent, CursorAgentError } from "@cursor/sdk";
1049
1049
  import { resolve as resolve3 } from "path";
1050
1050
 
1051
1051
  // src/session-utils.ts
1052
- import { formatCursorMessageLogEvent } from "@opc/shared";
1053
1052
  var EventSession = class {
1054
1053
  events = [];
1055
1054
  dirtyIndices = /* @__PURE__ */ new Set();
@@ -1175,11 +1174,37 @@ var EventSession = class {
1175
1174
  return this.events.filter((e) => e.type === "assistant").map((e) => String(e.content ?? "")).join("\n").trim();
1176
1175
  }
1177
1176
  resolveLogContent() {
1178
- return this.events.map(
1179
- (event) => formatCursorMessageLogEvent(event.type, JSON.stringify(event))
1180
- ).join("\n");
1177
+ return this.events.map((event) => formatLogEvent(event.type, event)).join("\n");
1181
1178
  }
1182
1179
  };
1180
+ function formatLogEvent(type, event) {
1181
+ if (type === "input") {
1182
+ return `## \u7528\u6237\u8F93\u5165
1183
+
1184
+ ${String(event.content ?? "")}
1185
+ `;
1186
+ }
1187
+ if (type === "assistant") {
1188
+ return `## \u6A21\u578B\u8F93\u51FA
1189
+
1190
+ ${String(event.content ?? "")}
1191
+ `;
1192
+ }
1193
+ if (type === "thinking") {
1194
+ return `## \u6A21\u578B\u601D\u8003
1195
+
1196
+ ${String(event.content ?? "")}
1197
+ `;
1198
+ }
1199
+ if (type === "tool_call") {
1200
+ return "````toolcall\n" + JSON.stringify(event, null, 2) + "\n````\n";
1201
+ }
1202
+ return `## \u672A\u77E5\u4E8B\u4EF6\uFF1A${type}
1203
+
1204
+ \`\`\`json
1205
+ ${JSON.stringify(event, null, 2)}
1206
+ \`\`\``;
1207
+ }
1183
1208
 
1184
1209
  // src/commands/connect/cursor-message-log.ts
1185
1210
  function assistantStreamChunk(event) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-project-manage-cli",
3
- "version": "5.0.21",
3
+ "version": "5.0.22",
4
4
  "description": "命令行工具:后续用于调用平台后端 API 完成运维与自动化操作",
5
5
  "type": "module",
6
6
  "private": false,
@@ -30,7 +30,6 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@cursor/sdk": "~1.0.18",
33
- "@opc/shared": "workspace:*",
34
33
  "ws": "~8.18.0",
35
34
  "listpage-http": "~0.0.318",
36
35
  "commander": "~14.0.3",