replicas-cli 0.2.132 → 0.2.134
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.
|
@@ -7866,11 +7866,11 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7866
7866
|
timestamp: event.timestamp
|
|
7867
7867
|
});
|
|
7868
7868
|
}
|
|
7869
|
-
if (block.type === "thinking" && block.
|
|
7869
|
+
if (block.type === "thinking" && block.thinking) {
|
|
7870
7870
|
messages.push({
|
|
7871
7871
|
id: `reasoning-${event.timestamp}-${messages.length}`,
|
|
7872
7872
|
type: "reasoning",
|
|
7873
|
-
content: block.
|
|
7873
|
+
content: block.thinking,
|
|
7874
7874
|
status: "completed",
|
|
7875
7875
|
timestamp: event.timestamp
|
|
7876
7876
|
});
|
|
@@ -8708,6 +8708,22 @@ var SOURCE_CONFIG = {
|
|
|
8708
8708
|
plan_quote: { label: "Plan", color: "#66bb6a" }
|
|
8709
8709
|
};
|
|
8710
8710
|
|
|
8711
|
+
// ../shared/src/sse.ts
|
|
8712
|
+
function parseSseChunk(chunk) {
|
|
8713
|
+
let data = "";
|
|
8714
|
+
for (const line of chunk.split("\n")) {
|
|
8715
|
+
if (line.startsWith("data: ")) {
|
|
8716
|
+
data += line.slice(6);
|
|
8717
|
+
}
|
|
8718
|
+
}
|
|
8719
|
+
if (!data) return null;
|
|
8720
|
+
try {
|
|
8721
|
+
return JSON.parse(data);
|
|
8722
|
+
} catch {
|
|
8723
|
+
return null;
|
|
8724
|
+
}
|
|
8725
|
+
}
|
|
8726
|
+
|
|
8711
8727
|
export {
|
|
8712
8728
|
readConfig,
|
|
8713
8729
|
writeConfig,
|
|
@@ -8736,5 +8752,6 @@ export {
|
|
|
8736
8752
|
buildGroups,
|
|
8737
8753
|
createMockWorkspaceRecord,
|
|
8738
8754
|
MEDIA_KIND,
|
|
8739
|
-
MEDIA_KINDS
|
|
8755
|
+
MEDIA_KINDS,
|
|
8756
|
+
parseSseChunk
|
|
8740
8757
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
setIdeCommand,
|
|
20
20
|
setOrganizationId,
|
|
21
21
|
writeConfig
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DRUIU36T.mjs";
|
|
23
23
|
import "./chunk-FFDYI4OH.mjs";
|
|
24
24
|
|
|
25
25
|
// src/index.ts
|
|
@@ -2536,12 +2536,12 @@ async function interactiveCommand() {
|
|
|
2536
2536
|
);
|
|
2537
2537
|
}
|
|
2538
2538
|
console.log(chalk18.gray("Starting interactive mode..."));
|
|
2539
|
-
const { launchInteractive } = await import("./interactive-
|
|
2539
|
+
const { launchInteractive } = await import("./interactive-KN5ZYYOU.mjs");
|
|
2540
2540
|
await launchInteractive();
|
|
2541
2541
|
}
|
|
2542
2542
|
|
|
2543
2543
|
// src/index.ts
|
|
2544
|
-
var CLI_VERSION = "0.2.
|
|
2544
|
+
var CLI_VERSION = "0.2.134";
|
|
2545
2545
|
var program = new Command();
|
|
2546
2546
|
program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
|
|
2547
2547
|
program.command("login").description("Authenticate with your Replicas account").action(async () => {
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
getValidToken,
|
|
12
12
|
isAgentBackendEvent,
|
|
13
13
|
parseAgentEvents,
|
|
14
|
+
parseSseChunk,
|
|
14
15
|
parseUserMessage
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DRUIU36T.mjs";
|
|
16
17
|
import "./chunk-FFDYI4OH.mjs";
|
|
17
18
|
|
|
18
19
|
// src/interactive/index.tsx
|
|
@@ -201,18 +202,6 @@ function patchChat(chats, chatId, patch) {
|
|
|
201
202
|
});
|
|
202
203
|
return changed ? next.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt)) : chats;
|
|
203
204
|
}
|
|
204
|
-
function parseSseEvent(raw) {
|
|
205
|
-
for (const line of raw.split("\n")) {
|
|
206
|
-
if (line.startsWith("data: ")) {
|
|
207
|
-
try {
|
|
208
|
-
return JSON.parse(line.slice(6));
|
|
209
|
-
} catch {
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return null;
|
|
215
|
-
}
|
|
216
205
|
function getEventSignature(value) {
|
|
217
206
|
const normalize = (input) => {
|
|
218
207
|
if (Array.isArray(input)) return input.map(normalize);
|
|
@@ -417,7 +406,7 @@ function useWorkspaceEvents(workspaceId, enabled = true) {
|
|
|
417
406
|
const chunks = buffer.split("\n\n");
|
|
418
407
|
buffer = chunks.pop() ?? "";
|
|
419
408
|
for (const chunk of chunks) {
|
|
420
|
-
const event =
|
|
409
|
+
const event = parseSseChunk(chunk);
|
|
421
410
|
if (event) handleEvent(event);
|
|
422
411
|
}
|
|
423
412
|
}
|