replicas-cli 0.2.414 → 0.2.416

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.mjs +23 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -24428,7 +24428,7 @@ function formatTurnElapsed(ms) {
24428
24428
  }
24429
24429
 
24430
24430
  // ../shared/src/cli-version.ts
24431
- var CLI_VERSION = "0.2.414";
24431
+ var CLI_VERSION = "0.2.416";
24432
24432
 
24433
24433
  // ../shared/src/version.ts
24434
24434
  function compareVersions(v1, v2) {
@@ -24455,6 +24455,9 @@ var DESKTOP_VIEWER_HEIGHT = 1080;
24455
24455
 
24456
24456
  // ../shared/src/engine/v1.ts
24457
24457
  var MERGED_MESSAGE_SEPARATOR = "\n\n<!-- replicas:merged -->\n\n";
24458
+ function getTerminalChatProcessing(event) {
24459
+ return event.type === "chat.turn.completed" ? event.payload.processing ?? false : false;
24460
+ }
24458
24461
  var createChatRequestSchema = external_exports.object({
24459
24462
  id: external_exports.string().uuid().optional(),
24460
24463
  createdAt: external_exports.string().datetime().optional(),
@@ -30114,6 +30117,12 @@ async function learningsUpdateCommand(id, options) {
30114
30117
  async function learningsDeleteCommand(id) {
30115
30118
  await propose({ action: "delete", target_learning_id: id });
30116
30119
  }
30120
+ async function learningsWithdrawCommand(id) {
30121
+ const { proposal } = await agentFetch(`/v1/agent/learnings/proposals/${id}/withdraw`, {
30122
+ method: "POST"
30123
+ });
30124
+ console.log(`Proposal withdrawn (id: ${proposal.id}).`);
30125
+ }
30117
30126
 
30118
30127
  // src/commands/computer/index.ts
30119
30128
  import { spawn as spawn5, spawnSync as spawnSync3 } from "child_process";
@@ -33384,7 +33393,7 @@ function useWorkspaceEvents(workspaceId, enabled = true) {
33384
33393
  if (event.type === "chat.turn.completed" || event.type === "chat.interrupted") {
33385
33394
  qc.setQueryData(chatsKey, (current) => {
33386
33395
  if (!current) return current;
33387
- return { chats: patchChat(current.chats, event.payload.chatId, { processing: false, updatedAt: event.ts }) };
33396
+ return { chats: patchChat(current.chats, event.payload.chatId, { processing: getTerminalChatProcessing(event), updatedAt: event.ts }) };
33388
33397
  });
33389
33398
  qc.invalidateQueries({ queryKey: ["chat-history", workspaceId, event.payload.chatId] });
33390
33399
  return;
@@ -37402,6 +37411,18 @@ if (isAgentMode()) {
37402
37411
  if (error51 instanceof Error) {
37403
37412
  console.error(chalk25.red(`
37404
37413
  \u2717 ${error51.message}
37414
+ `));
37415
+ }
37416
+ process.exit(1);
37417
+ }
37418
+ });
37419
+ learnings.command("withdraw <id>").description("Withdraw a pending learning proposal from this workspace").action(async (id) => {
37420
+ try {
37421
+ await learningsWithdrawCommand(id);
37422
+ } catch (error51) {
37423
+ if (error51 instanceof Error) {
37424
+ console.error(chalk25.red(`
37425
+ \u2717 ${error51.message}
37405
37426
  `));
37406
37427
  }
37407
37428
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.414",
3
+ "version": "0.2.416",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {