replicas-cli 0.3.333 → 0.3.335
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.cjs +7 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -30198,6 +30198,7 @@ function assistantError(info) {
|
|
|
30198
30198
|
}
|
|
30199
30199
|
function parseOpencodeEvents(events) {
|
|
30200
30200
|
const messages = [];
|
|
30201
|
+
const inputState = { requests: /* @__PURE__ */ new Map(), resolutions: /* @__PURE__ */ new Map(), requestedAt: /* @__PURE__ */ new Map() };
|
|
30201
30202
|
for (const event of events) {
|
|
30202
30203
|
if (event.type === "event_msg" && event.payload.type === "user_message") {
|
|
30203
30204
|
const message2 = event.payload.message;
|
|
@@ -30236,15 +30237,17 @@ function parseOpencodeEvents(events) {
|
|
|
30236
30237
|
});
|
|
30237
30238
|
continue;
|
|
30238
30239
|
}
|
|
30240
|
+
if (applyToolInputEvent(event, messages, "opencode", inputState, isToolInputQuestion)) continue;
|
|
30239
30241
|
if (event.type === "opencode-session.next.tool.called") {
|
|
30240
30242
|
const tool = typeof event.payload.tool === "string" ? event.payload.tool : "tool";
|
|
30241
30243
|
const input = event.payload.input ?? event.payload.arguments;
|
|
30242
30244
|
const callId = typeof event.payload.callID === "string" ? event.payload.callID : null;
|
|
30243
|
-
const id2 = callId ? `opencode-${callId}` : `opencode-${event.type}-${event.timestamp}`;
|
|
30245
|
+
const id2 = callId ? `opencode-tool-${callId}` : `opencode-${event.type}-${event.timestamp}`;
|
|
30244
30246
|
upsertDisplayMessage(messages, createCallDisplayMessage({
|
|
30245
30247
|
id: id2,
|
|
30246
30248
|
server: "opencode",
|
|
30247
30249
|
tool,
|
|
30250
|
+
inputRequest: callId ? inputState.requests.get(callId) : void 0,
|
|
30248
30251
|
input: isRecord(input) ? input : stringifyDisplayValue(input),
|
|
30249
30252
|
status: "in_progress",
|
|
30250
30253
|
timestamp: event.timestamp
|
|
@@ -30254,7 +30257,7 @@ function parseOpencodeEvents(events) {
|
|
|
30254
30257
|
const part = partFromEvent(event);
|
|
30255
30258
|
if (!part) continue;
|
|
30256
30259
|
let id = `opencode-${event.type}-${event.timestamp}`;
|
|
30257
|
-
if (typeof part.callID === "string") id = `opencode-${part.callID}`;
|
|
30260
|
+
if (typeof part.callID === "string") id = `opencode-tool-${part.callID}`;
|
|
30258
30261
|
else if (typeof part.id === "string") id = `opencode-${part.id}`;
|
|
30259
30262
|
const time3 = isRecord(part.time) ? part.time : null;
|
|
30260
30263
|
const timestamp = timestampFromMs(time3?.start, event.timestamp);
|
|
@@ -30293,6 +30296,7 @@ function parseOpencodeEvents(events) {
|
|
|
30293
30296
|
id,
|
|
30294
30297
|
server: "opencode",
|
|
30295
30298
|
tool,
|
|
30299
|
+
inputRequest: typeof part.callID === "string" ? inputState.requests.get(part.callID) : void 0,
|
|
30296
30300
|
input: isRecord(input) ? input : stringifyDisplayValue(input),
|
|
30297
30301
|
output: output2,
|
|
30298
30302
|
status,
|
|
@@ -32122,7 +32126,7 @@ var CLI_VERSION;
|
|
|
32122
32126
|
var init_cli_version = __esm({
|
|
32123
32127
|
"../shared/src/cli-version.ts"() {
|
|
32124
32128
|
"use strict";
|
|
32125
|
-
CLI_VERSION = "0.3.
|
|
32129
|
+
CLI_VERSION = "0.3.335";
|
|
32126
32130
|
}
|
|
32127
32131
|
});
|
|
32128
32132
|
|