replicas-cli 0.2.211 → 0.2.212
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/dist/index.mjs +12 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8932,7 +8932,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
8932
8932
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
8933
8933
|
|
|
8934
8934
|
// ../shared/src/cli-version.ts
|
|
8935
|
-
var CLI_VERSION = "0.2.
|
|
8935
|
+
var CLI_VERSION = "0.2.212";
|
|
8936
8936
|
|
|
8937
8937
|
// ../shared/src/engine/environment.ts
|
|
8938
8938
|
var DESKTOP_NOVNC_PORT = 6080;
|
|
@@ -9172,6 +9172,14 @@ function displayId(event, eventIndex, prefix) {
|
|
|
9172
9172
|
const stableId = getPayloadString(event, USER_MESSAGE_ID_PAYLOAD_KEY) ?? getPayloadString(event, CODEX_ASP_ITEM_ID_PAYLOAD_KEY);
|
|
9173
9173
|
return stableId ? `${prefix}-${stableId}` : `${prefix}-${event.timestamp}-${eventIndex}`;
|
|
9174
9174
|
}
|
|
9175
|
+
function userMessageImages(value) {
|
|
9176
|
+
if (!Array.isArray(value)) return void 0;
|
|
9177
|
+
const images = value.filter((item) => {
|
|
9178
|
+
if (!isRecord(item)) return false;
|
|
9179
|
+
return item.type === "image" && typeof item.mediaType === "string" && typeof item.data === "string";
|
|
9180
|
+
});
|
|
9181
|
+
return images.length > 0 ? images : void 0;
|
|
9182
|
+
}
|
|
9175
9183
|
function parseShellOutput(raw) {
|
|
9176
9184
|
const exitCodeMatch = raw.match(/^Exit code: (\d+)/m) || raw.match(/Process exited with code (\d+)/);
|
|
9177
9185
|
const exitCode = exitCodeMatch ? parseInt(exitCodeMatch[1], 10) : 0;
|
|
@@ -9255,10 +9263,12 @@ function parseCodexEvents(events) {
|
|
|
9255
9263
|
return;
|
|
9256
9264
|
}
|
|
9257
9265
|
if (event.type === "event_msg" && event.payload?.type === "user_message") {
|
|
9266
|
+
const message = getPayloadString(event, "message");
|
|
9258
9267
|
messages.push({
|
|
9259
9268
|
id: displayId(event, eventIndex, "user"),
|
|
9260
9269
|
type: "user",
|
|
9261
|
-
content:
|
|
9270
|
+
content: message ?? "",
|
|
9271
|
+
images: userMessageImages(event.payload.images),
|
|
9262
9272
|
timestamp: event.timestamp
|
|
9263
9273
|
});
|
|
9264
9274
|
}
|