@supatest/cli 0.0.13 → 0.0.14

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.js CHANGED
@@ -4667,7 +4667,7 @@ var CLI_VERSION;
4667
4667
  var init_version = __esm({
4668
4668
  "src/version.ts"() {
4669
4669
  "use strict";
4670
- CLI_VERSION = "0.0.13";
4670
+ CLI_VERSION = "0.0.14";
4671
4671
  }
4672
4672
  });
4673
4673
 
@@ -7089,6 +7089,9 @@ function highlightTreeToString(node) {
7089
7089
  if (node.type === "text") {
7090
7090
  return node.value;
7091
7091
  }
7092
+ if (node.type === "root" && node.children) {
7093
+ return node.children.map(highlightTreeToString).join("");
7094
+ }
7092
7095
  if (node.type === "element") {
7093
7096
  const className = node.properties?.className?.[0] || "";
7094
7097
  let content = "";
@@ -7375,7 +7378,8 @@ var init_ErrorMessage = __esm({
7375
7378
  type = "error"
7376
7379
  }) => {
7377
7380
  const { icon, color } = getErrorStyle(type);
7378
- return /* @__PURE__ */ React11.createElement(Box9, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React11.createElement(Text9, { color }, icon, " ", message));
7381
+ const displayMessage = type === "error" ? "Tool call failed" : message;
7382
+ return /* @__PURE__ */ React11.createElement(Box9, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React11.createElement(Text9, { color }, icon, " ", displayMessage));
7379
7383
  };
7380
7384
  }
7381
7385
  });
@@ -7938,6 +7942,7 @@ var init_useOverlayEscapeGuard = __esm({
7938
7942
  import { execSync as execSync3 } from "child_process";
7939
7943
  import { homedir as homedir3 } from "os";
7940
7944
  import { Box as Box18, Text as Text17, useApp } from "ink";
7945
+ import Spinner3 from "ink-spinner";
7941
7946
  import React20, { useEffect as useEffect7, useRef as useRef3, useState as useState6 } from "react";
7942
7947
  var getGitBranch, getCurrentFolder, AppContent, App;
7943
7948
  var init_App = __esm({
@@ -7961,6 +7966,7 @@ var init_App = __esm({
7961
7966
  init_useModeToggle();
7962
7967
  init_useOverlayEscapeGuard();
7963
7968
  init_auth();
7969
+ init_theme();
7964
7970
  getGitBranch = () => {
7965
7971
  try {
7966
7972
  return execSync3("git rev-parse --abbrev-ref HEAD", { encoding: "utf8" }).trim();
@@ -7990,6 +7996,7 @@ var init_App = __esm({
7990
7996
  const inputPromptRef = useRef3(null);
7991
7997
  const [showSessionSelector, setShowSessionSelector] = useState6(false);
7992
7998
  const [showModelSelector, setShowModelSelector] = useState6(false);
7999
+ const [isLoadingSession, setIsLoadingSession] = useState6(false);
7993
8000
  const [authState, setAuthState] = useState6(
7994
8001
  () => config2.supatestApiKey ? "authenticated" /* Authenticated */ : "unauthenticated" /* Unauthenticated */
7995
8002
  );
@@ -8150,15 +8157,13 @@ var init_App = __esm({
8150
8157
  onSubmitTask(task);
8151
8158
  }
8152
8159
  };
8153
- const handleSessionSelect = (session) => {
8160
+ const handleSessionSelect = async (session) => {
8154
8161
  setShowSessionSelector(false);
8155
- addMessage({
8156
- type: "assistant",
8157
- content: `Switching to session: ${session.title || "Untitled"} (${session.id})`
8158
- });
8162
+ setIsLoadingSession(true);
8159
8163
  if (onResumeSession) {
8160
- onResumeSession(session);
8164
+ await onResumeSession(session);
8161
8165
  }
8166
+ setIsLoadingSession(false);
8162
8167
  };
8163
8168
  const handleSessionSelectorCancel = () => {
8164
8169
  markOverlayClosed();
@@ -8271,6 +8276,7 @@ var init_App = __esm({
8271
8276
  onSelect: handleSessionSelect
8272
8277
  }
8273
8278
  ),
8279
+ isLoadingSession && /* @__PURE__ */ React20.createElement(Box18, { borderColor: "cyan", borderStyle: "round", flexDirection: "column", padding: 1 }, /* @__PURE__ */ React20.createElement(Box18, { flexDirection: "row" }, /* @__PURE__ */ React20.createElement(Box18, { width: 2 }, /* @__PURE__ */ React20.createElement(Text17, { color: theme.text.accent }, /* @__PURE__ */ React20.createElement(Spinner3, { type: "dots" }))), /* @__PURE__ */ React20.createElement(Text17, { bold: true, color: "cyan" }, "Loading session...")), /* @__PURE__ */ React20.createElement(Text17, { color: theme.text.dim }, "Fetching queries and context")),
8274
8280
  showModelSelector && /* @__PURE__ */ React20.createElement(
8275
8281
  ModelSelector,
8276
8282
  {
@@ -8285,7 +8291,7 @@ var init_App = __esm({
8285
8291
  onLogin: handleLogin
8286
8292
  }
8287
8293
  ),
8288
- /* @__PURE__ */ React20.createElement(Box18, { flexDirection: "column" }, /* @__PURE__ */ React20.createElement(QueuedMessageDisplay, { messageQueue: queuedTasks }), !showAuthDialog && /* @__PURE__ */ React20.createElement(AuthBanner, { authState }), showInput && !showSessionSelector && !showAuthDialog && !showHelp && !showModelSelector && /* @__PURE__ */ React20.createElement(Box18, { flexDirection: "column", marginTop: 0, width: "100%" }, exitWarning && /* @__PURE__ */ React20.createElement(Box18, { marginBottom: 0, paddingX: 1 }, /* @__PURE__ */ React20.createElement(Text17, { color: "yellow" }, exitWarning)), /* @__PURE__ */ React20.createElement(
8294
+ /* @__PURE__ */ React20.createElement(Box18, { flexDirection: "column" }, /* @__PURE__ */ React20.createElement(QueuedMessageDisplay, { messageQueue: queuedTasks }), !showAuthDialog && /* @__PURE__ */ React20.createElement(AuthBanner, { authState }), showInput && !showSessionSelector && !showAuthDialog && !showHelp && !showModelSelector && !isLoadingSession && /* @__PURE__ */ React20.createElement(Box18, { flexDirection: "column", marginTop: 0, width: "100%" }, exitWarning && /* @__PURE__ */ React20.createElement(Box18, { marginBottom: 0, paddingX: 1 }, /* @__PURE__ */ React20.createElement(Text17, { color: "yellow" }, exitWarning)), /* @__PURE__ */ React20.createElement(
8289
8295
  InputPrompt,
8290
8296
  {
8291
8297
  currentFolder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supatest/cli",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Supatest CLI - AI-powered task automation for CI/CD",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,8 +39,8 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@anthropic-ai/claude-agent-sdk": "^0.1.58",
43
- "@anthropic-ai/sdk": "^0.71.0",
42
+ "@anthropic-ai/claude-agent-sdk": "^0.1.61",
43
+ "@anthropic-ai/sdk": "^0.71.2",
44
44
  "@types/inquirer": "^9.0.0",
45
45
  "ansi-escapes": "^7.0.0",
46
46
  "boxen": "^8.0.1",