@supatest/cli 0.0.33 → 0.0.35

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.js +131 -66
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -304,8 +304,11 @@ var init_config = __esm({
304
304
  isDevelopment = process.env.NODE_ENV === "development";
305
305
  if (isDevelopment) {
306
306
  const envFile = process.env.ENV_NAME ? `.env.${process.env.ENV_NAME}` : ".env";
307
- const dotenv = await import("dotenv");
308
- dotenv.config({ path: resolve(process.cwd(), envFile) });
307
+ try {
308
+ const dotenv = await import("dotenv");
309
+ dotenv.config({ path: resolve(process.cwd(), envFile) });
310
+ } catch (error) {
311
+ }
309
312
  }
310
313
  getEnvVar = (key, defaultValue) => {
311
314
  if (process.env.ENV_NAME) {
@@ -343,14 +346,28 @@ function getTierFromProviderModel(providerModel) {
343
346
  return null;
344
347
  }
345
348
  function getModelCostLabel(modelId) {
346
- if (modelId === "small") return "0.5x";
347
- if (modelId === "medium") return "1x";
348
- if (modelId === "premium") return "2x";
349
+ if (modelId === "small") {
350
+ return SMALL_COST_LABEL;
351
+ }
352
+ if (modelId === "medium") {
353
+ return MEDIUM_COST_LABEL;
354
+ }
355
+ if (modelId === "premium") {
356
+ return PREMIUM_COST_LABEL;
357
+ }
349
358
  const model = getModelById(modelId);
350
359
  if (model) {
351
- return model.costMultiplier === 0.5 ? "0.5x" : model.costMultiplier === 1 ? "1x" : model.costMultiplier === 2 ? "2x" : "1x";
360
+ if (model.costMultiplier === SMALL_COST_MULTIPLIER) {
361
+ return SMALL_COST_LABEL;
362
+ }
363
+ if (model.costMultiplier === MEDIUM_COST_MULTIPLIER) {
364
+ return MEDIUM_COST_LABEL;
365
+ }
366
+ if (model.costMultiplier === PREMIUM_COST_MULTIPLIER) {
367
+ return PREMIUM_COST_LABEL;
368
+ }
352
369
  }
353
- return "1x";
370
+ return MEDIUM_COST_LABEL;
354
371
  }
355
372
  function getModelDisplayName(id) {
356
373
  if (MODEL_TIERS.includes(id)) {
@@ -591,7 +608,31 @@ function getToolDisplayName(toolName) {
591
608
  };
592
609
  return displayNameMap[toolName] || toolName;
593
610
  }
594
- var AVAILABLE_MODELS, DATE_SUFFIX_REGEX, MODEL_TIERS, CONTEXT_WINDOWS, util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, ZodFirstPartyTypeKind, stringType, numberType, booleanType, dateType, unknownType, arrayType, objectType, unionType, discriminatedUnionType, recordType, functionType, lazyType, literalType, enumType, promiseType, coerce, MAX_API_KEY_NAME_LENGTH, apiKeySchema, apiKeyUsageSchema, createApiKeyRequestSchema, apiKeyResponseSchema, apiKeyUsageSummarySchema, genericErrorSchema, validationErrorSchema, feedbackCategorySchema, FEEDBACK_CATEGORIES, createFeedbackSchema, feedbackResponseSchema, listFeedbackQuerySchema, feedbackListResponseSchema, healthMetricSchema, healthMetricDailyItemSchema, healthMetricsWithDailySchema, healthAnalyticsPeriodSchema, healthAnalyticsDailyItemSchema, healthAnalyticsResponseSchema, MAX_TIMEZONE_CHAR_LENGTH, organizationSchema, organizationSettingsSchema, textBlockSchema, toolUseBlockSchema, toolResultBlockSchema, thinkingBlockSchema, imageBlockSchema, contentBlockSchema, sessionSchema, createSessionRequestSchema, updateSessionRequestSchema, messageSchema, createMessageRequestSchema, cliEventSchema, createCLISessionRequestSchema, queryResultSchema, queryTurnSchema, queryContentSchema, queryUsageSchema, querySchema, runStatusSchema, testResultStatusSchema, testOutcomeSchema, attachmentKindSchema, stepCategorySchema, runSummarySchema, ciMetadataSchema, gitMetadataSchema, playwrightConfigSchema, errorInfoSchema, locationSchema, sourceSnippetSchema, runSchema, annotationSchema, testSchema, testResultSchema, baseStepSchema, stepSchema, attachmentSchema, listRunsQuerySchema, listTestsQuerySchema, runsListResponseSchema, runDetailResponseSchema, testsListResponseSchema, testDetailResponseSchema, testHistoryItemSchema, testHistoryResponseSchema, topOffenderSchema, topOffendersResponseSchema, trendPointSchema, trendsResponseSchema, errorCategorySchema, failureClusterSchema, newFailureSchema, runInsightsResponseSchema, FailureCategoryEnum, SelectorTypeEnum, FailureCategoryStatsSchema, FailureCategoriesResponseSchema, FailingSelectorStatsSchema, FailingSelectorsResponseSchema, newFailureItemSchema, newFailuresResponseSchema, flakyTestItemSchema, flakyTestsResponseSchema, slowestTestItemSchema, slowestTestsResponseSchema;
611
+ function getToolCategory(toolName) {
612
+ const name = toolName.toLowerCase();
613
+ if (name.includes("read")) return "Read";
614
+ if (name.includes("write")) return "Write";
615
+ if (name.includes("edit")) return "Edit";
616
+ if (name.includes("bash") || name.includes("command")) return "Bash";
617
+ if (name.includes("glob")) return "Glob";
618
+ if (name.includes("grep")) return "Grep";
619
+ if (name.includes("task")) return "Task";
620
+ if (name.includes("todo")) return "Todo";
621
+ return getToolDisplayName(toolName);
622
+ }
623
+ function getToolGroupCounts(tools) {
624
+ const groups = tools.reduce(
625
+ (acc, tool) => {
626
+ const toolName = tool.toolName || tool.name || "";
627
+ const category = getToolCategory(toolName);
628
+ acc[category] = (acc[category] || 0) + 1;
629
+ return acc;
630
+ },
631
+ {}
632
+ );
633
+ return Object.entries(groups).map(([name, count]) => ({ name, count })).sort((a, b) => b.count - a.count);
634
+ }
635
+ var AVAILABLE_MODELS, DATE_SUFFIX_REGEX, SMALL_COST_MULTIPLIER, MEDIUM_COST_MULTIPLIER, PREMIUM_COST_MULTIPLIER, SMALL_COST_LABEL, MEDIUM_COST_LABEL, PREMIUM_COST_LABEL, MODEL_TIERS, CONTEXT_WINDOWS, util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, ZodFirstPartyTypeKind, stringType, numberType, booleanType, dateType, unknownType, arrayType, objectType, unionType, discriminatedUnionType, recordType, functionType, lazyType, literalType, enumType, promiseType, coerce, MAX_API_KEY_NAME_LENGTH, apiKeySchema, apiKeyUsageSchema, createApiKeyRequestSchema, apiKeyResponseSchema, apiKeyUsageSummarySchema, genericErrorSchema, validationErrorSchema, feedbackCategorySchema, FEEDBACK_CATEGORIES, createFeedbackSchema, feedbackResponseSchema, listFeedbackQuerySchema, feedbackListResponseSchema, healthMetricSchema, healthMetricDailyItemSchema, healthMetricsWithDailySchema, healthAnalyticsPeriodSchema, healthAnalyticsDailyItemSchema, healthAnalyticsResponseSchema, MAX_TIMEZONE_CHAR_LENGTH, organizationSchema, organizationSettingsSchema, textBlockSchema, toolUseBlockSchema, toolResultBlockSchema, thinkingBlockSchema, imageBlockSchema, contentBlockSchema, sessionSchema, createSessionRequestSchema, updateSessionRequestSchema, messageSchema, createMessageRequestSchema, cliEventSchema, createCLISessionRequestSchema, queryResultSchema, queryTurnSchema, queryContentSchema, queryUsageSchema, querySchema, runStatusSchema, testResultStatusSchema, testOutcomeSchema, attachmentKindSchema, stepCategorySchema, runSummarySchema, ciMetadataSchema, gitMetadataSchema, playwrightConfigSchema, errorInfoSchema, locationSchema, sourceSnippetSchema, runSchema, annotationSchema, testSchema, testResultSchema, baseStepSchema, stepSchema, attachmentSchema, listRunsQuerySchema, listTestsQuerySchema, runsListResponseSchema, runDetailResponseSchema, testsListResponseSchema, testDetailResponseSchema, testHistoryItemSchema, testHistoryResponseSchema, topOffenderSchema, topOffendersResponseSchema, trendPointSchema, trendsResponseSchema, errorCategorySchema, failureClusterSchema, newFailureSchema, runInsightsResponseSchema, FailureCategoryEnum, SelectorTypeEnum, FailureCategoryStatsSchema, FailureCategoriesResponseSchema, FailingSelectorStatsSchema, FailingSelectorsResponseSchema, newFailureItemSchema, newFailuresResponseSchema, flakyTestItemSchema, flakyTestsResponseSchema, slowestTestItemSchema, slowestTestsResponseSchema;
595
636
  var init_shared_es = __esm({
596
637
  "../shared/dist/shared.es.mjs"() {
597
638
  "use strict";
@@ -619,6 +660,12 @@ var init_shared_es = __esm({
619
660
  }
620
661
  ];
621
662
  DATE_SUFFIX_REGEX = /-\d{8}$/;
663
+ SMALL_COST_MULTIPLIER = 0.5;
664
+ MEDIUM_COST_MULTIPLIER = 1;
665
+ PREMIUM_COST_MULTIPLIER = 2;
666
+ SMALL_COST_LABEL = "0.5x";
667
+ MEDIUM_COST_LABEL = "1x";
668
+ PREMIUM_COST_LABEL = "2x";
622
669
  MODEL_TIERS = ["small", "medium", "premium"];
623
670
  CONTEXT_WINDOWS = Object.fromEntries(
624
671
  AVAILABLE_MODELS.map((m) => [m.id, m.contextWindow])
@@ -5321,7 +5368,7 @@ var CLI_VERSION;
5321
5368
  var init_version = __esm({
5322
5369
  "src/version.ts"() {
5323
5370
  "use strict";
5324
- CLI_VERSION = "0.0.33";
5371
+ CLI_VERSION = "0.0.35";
5325
5372
  }
5326
5373
  });
5327
5374
 
@@ -6932,7 +6979,7 @@ var init_react = __esm({
6932
6979
  });
6933
6980
 
6934
6981
  // src/ui/contexts/SessionContext.tsx
6935
- import React, { createContext, useCallback, useContext, useState } from "react";
6982
+ import React, { createContext, useCallback, useContext, useMemo, useState } from "react";
6936
6983
  var SessionContext, SessionProvider, useSession;
6937
6984
  var init_SessionContext = __esm({
6938
6985
  "src/ui/contexts/SessionContext.tsx"() {
@@ -7047,7 +7094,7 @@ var init_SessionContext = __esm({
7047
7094
  const toggleToolGroups = useCallback(() => {
7048
7095
  setToolGroupsExpanded((prev) => !prev);
7049
7096
  }, []);
7050
- const value = {
7097
+ const value = useMemo(() => ({
7051
7098
  messages,
7052
7099
  addMessage,
7053
7100
  updateLastMessage,
@@ -7083,7 +7130,33 @@ var init_SessionContext = __esm({
7083
7130
  setLlmProvider,
7084
7131
  staticRemountKey,
7085
7132
  refreshStatic
7086
- };
7133
+ }), [
7134
+ messages,
7135
+ addMessage,
7136
+ updateLastMessage,
7137
+ updateMessageById,
7138
+ updateMessageByToolId,
7139
+ clearMessages,
7140
+ loadMessages,
7141
+ toggleAllToolOutputs,
7142
+ allToolsExpanded,
7143
+ toolGroupsExpanded,
7144
+ toggleToolGroups,
7145
+ todos,
7146
+ stats,
7147
+ updateStats,
7148
+ usageStats,
7149
+ isAgentRunning,
7150
+ shouldInterruptAgent,
7151
+ sessionId,
7152
+ webUrl,
7153
+ agentMode,
7154
+ planFilePath,
7155
+ selectedModel,
7156
+ llmProvider,
7157
+ staticRemountKey,
7158
+ refreshStatic
7159
+ ]);
7087
7160
  return /* @__PURE__ */ React.createElement(SessionContext.Provider, { value }, children);
7088
7161
  };
7089
7162
  useSession = () => {
@@ -7122,7 +7195,7 @@ var init_theme = __esm({
7122
7195
  text: {
7123
7196
  primary: "#FFFFFF",
7124
7197
  secondary: "#A0AEC0",
7125
- dim: "#4A5568",
7198
+ dim: "#8C99B2",
7126
7199
  accent: "#38B2AC",
7127
7200
  // Cyan/teal accent
7128
7201
  success: "#48BB78",
@@ -7138,7 +7211,7 @@ var init_theme = __esm({
7138
7211
  },
7139
7212
  // Borders
7140
7213
  border: {
7141
- default: "#4A5568",
7214
+ default: "#8C99B2",
7142
7215
  accent: "#38B2AC",
7143
7216
  error: "#F56565"
7144
7217
  },
@@ -7178,7 +7251,7 @@ var init_Header = __esm({
7178
7251
  init_banner();
7179
7252
  init_version();
7180
7253
  init_theme();
7181
- Header = ({ currentFolder, gitBranch, headless = false }) => {
7254
+ Header = React2.memo(({ currentFolder, gitBranch, headless = false }) => {
7182
7255
  const version = CLI_VERSION;
7183
7256
  const banner = getBanner();
7184
7257
  const infoParts = [`v${version}`];
@@ -7203,7 +7276,7 @@ var init_Header = __esm({
7203
7276
  /* @__PURE__ */ React2.createElement(Box, { justifyContent: "center", marginTop: 0 }, /* @__PURE__ */ React2.createElement(Text, { color: theme.text.dim }, infoLine)),
7204
7277
  !headless && /* @__PURE__ */ React2.createElement(Box, { flexDirection: "column", marginTop: 1, paddingX: 2, width: "100%" }, /* @__PURE__ */ React2.createElement(Box, { flexDirection: "column", marginBottom: 0 }, /* @__PURE__ */ React2.createElement(Text, { color: theme.text.dim }, "\u{1F4A1} ", /* @__PURE__ */ React2.createElement(Text, { color: theme.text.secondary }, "Tip:"), " Use ", /* @__PURE__ */ React2.createElement(Text, { bold: true, color: theme.text.accent }, "@filename"), " to reference files, or ", /* @__PURE__ */ React2.createElement(Text, { bold: true, color: theme.text.accent }, "/help"), " for commands")), /* @__PURE__ */ React2.createElement(Box, { flexDirection: "column", marginTop: 0 }, /* @__PURE__ */ React2.createElement(Text, { color: theme.text.dim }, "\u2328\uFE0F ", /* @__PURE__ */ React2.createElement(Text, { color: theme.text.secondary }, "Shortcuts:"), " ", /* @__PURE__ */ React2.createElement(Text, { bold: true, color: theme.text.accent }, "Ctrl+H"), " help, ", /* @__PURE__ */ React2.createElement(Text, { bold: true, color: theme.text.accent }, "Ctrl+C"), " exit, ", /* @__PURE__ */ React2.createElement(Text, { bold: true, color: theme.text.accent }, "ESC"), " interrupt")), /* @__PURE__ */ React2.createElement(Box, { flexDirection: "column", marginTop: 0 }, /* @__PURE__ */ React2.createElement(Text, { color: theme.text.dim }, "\u{1F680} ", /* @__PURE__ */ React2.createElement(Text, { color: theme.text.secondary }, "Prompt Tips:"), " Be explicit with instructions, provide context, use examples, and think step-by-step")))
7205
7278
  );
7206
- };
7279
+ });
7207
7280
  }
7208
7281
  });
7209
7282
 
@@ -7211,7 +7284,7 @@ var init_Header = __esm({
7211
7284
  import chalk2 from "chalk";
7212
7285
  import { Box as Box2, Text as Text2 } from "ink";
7213
7286
  import { all, createLowlight } from "lowlight";
7214
- import React3, { useMemo } from "react";
7287
+ import React3, { useMemo as useMemo2 } from "react";
7215
7288
  function parseMarkdownSections(text) {
7216
7289
  const sections = [];
7217
7290
  const lines = text.split(/\r?\n/);
@@ -7371,7 +7444,7 @@ var init_markdown = __esm({
7371
7444
  text,
7372
7445
  isPending = false
7373
7446
  }) => {
7374
- const sections = useMemo(() => parseMarkdownSections(text), [text]);
7447
+ const sections = useMemo2(() => parseMarkdownSections(text), [text]);
7375
7448
  const elements = sections.map((section, index) => {
7376
7449
  if (section.type === "table" && section.tableRows) {
7377
7450
  return /* @__PURE__ */ React3.createElement(Table, { key: `table-${index}`, rows: section.tableRows });
@@ -7907,33 +7980,11 @@ var init_ToolMessage = __esm({
7907
7980
  // src/ui/components/messages/ToolGroup.tsx
7908
7981
  import { Box as Box9, Text as Text9 } from "ink";
7909
7982
  import React10 from "react";
7910
- function getToolCategory(toolName) {
7911
- const name = toolName.toLowerCase();
7912
- if (name.includes("read")) return "Read";
7913
- if (name.includes("write")) return "Write";
7914
- if (name.includes("edit")) return "Edit";
7915
- if (name.includes("bash") || name.includes("command")) return "Bash";
7916
- if (name.includes("glob")) return "Glob";
7917
- if (name.includes("grep")) return "Grep";
7918
- if (name.includes("task")) return "Task";
7919
- if (name.includes("todo")) return "Todo";
7920
- return toolName.charAt(0).toUpperCase() + toolName.slice(1).toLowerCase();
7921
- }
7922
- function getToolGroupCounts(tools) {
7923
- const groups = tools.reduce(
7924
- (acc, tool) => {
7925
- const category = getToolCategory(tool.toolName);
7926
- acc[category] = (acc[category] || 0) + 1;
7927
- return acc;
7928
- },
7929
- {}
7930
- );
7931
- return Object.entries(groups).map(([name, count]) => ({ name, count })).sort((a, b) => b.count - a.count);
7932
- }
7933
7983
  var ToolGroup;
7934
7984
  var init_ToolGroup = __esm({
7935
7985
  "src/ui/components/messages/ToolGroup.tsx"() {
7936
7986
  "use strict";
7987
+ init_shared_es();
7937
7988
  init_theme();
7938
7989
  init_ToolMessage();
7939
7990
  ToolGroup = ({
@@ -8021,7 +8072,7 @@ var init_QueuedMessageDisplay = __esm({
8021
8072
 
8022
8073
  // src/ui/components/MessageList.tsx
8023
8074
  import { Box as Box12, Static } from "ink";
8024
- import React13, { useMemo as useMemo3 } from "react";
8075
+ import React13, { useMemo as useMemo4, useRef } from "react";
8025
8076
  var MessageList;
8026
8077
  var init_MessageList = __esm({
8027
8078
  "src/ui/components/MessageList.tsx"() {
@@ -8135,7 +8186,28 @@ var init_MessageList = __esm({
8135
8186
  }
8136
8187
  return renderMessage(group.messages[0]);
8137
8188
  };
8138
- const { completedGroups, currentTurnGroups } = useMemo3(() => {
8189
+ const lastUserMessageIndex = useMemo4(() => {
8190
+ for (let i = messages.length - 1; i >= 0; i--) {
8191
+ if (messages[i].type === "user") {
8192
+ return i;
8193
+ }
8194
+ }
8195
+ return -1;
8196
+ }, [messages]);
8197
+ const hasPendingAssistant = useMemo4(
8198
+ () => messages.some((m) => m.type === "assistant" && m.isPending),
8199
+ [messages]
8200
+ );
8201
+ const completedBoundaryRef = useRef(-1);
8202
+ const completedBoundaryKey = useMemo4(() => {
8203
+ const currentBoundary = lastUserMessageIndex;
8204
+ if (currentBoundary !== completedBoundaryRef.current) {
8205
+ completedBoundaryRef.current = currentBoundary;
8206
+ return `boundary-${currentBoundary}`;
8207
+ }
8208
+ return `boundary-${completedBoundaryRef.current}`;
8209
+ }, [lastUserMessageIndex]);
8210
+ const { completedGroups, currentTurnGroups } = useMemo4(() => {
8139
8211
  const completed = [];
8140
8212
  const currentTurn = [];
8141
8213
  const processTurn = (turnMessages2, targetArray) => {
@@ -8159,13 +8231,6 @@ var init_MessageList = __esm({
8159
8231
  }
8160
8232
  flushToolGroup();
8161
8233
  };
8162
- let lastUserMessageIndex = -1;
8163
- for (let i = messages.length - 1; i >= 0; i--) {
8164
- if (messages[i].type === "user") {
8165
- lastUserMessageIndex = i;
8166
- break;
8167
- }
8168
- }
8169
8234
  let turnMessages = [];
8170
8235
  for (let i = 0; i < lastUserMessageIndex; i++) {
8171
8236
  const msg = messages[i];
@@ -8184,8 +8249,8 @@ var init_MessageList = __esm({
8184
8249
  const currentTurnMessages = lastUserMessageIndex >= 0 ? messages.slice(lastUserMessageIndex + 1) : messages;
8185
8250
  processTurn(currentTurnMessages, currentTurn);
8186
8251
  return { completedGroups: completed, currentTurnGroups: currentTurn };
8187
- }, [messages]);
8188
- const staticItems = useMemo3(() => [
8252
+ }, [messages, lastUserMessageIndex, completedBoundaryKey]);
8253
+ const staticItems = useMemo4(() => [
8189
8254
  { id: "header", type: "header" },
8190
8255
  ...completedGroups.map((group, idx) => {
8191
8256
  if (group.type === "group") {
@@ -8216,7 +8281,7 @@ var init_MessageList = __esm({
8216
8281
  return null;
8217
8282
  }
8218
8283
  return /* @__PURE__ */ React13.createElement(Box12, { flexDirection: "column", key: group.type === "group" ? `current-group-${idx}` : group.messages[0].id, width: "100%" }, content);
8219
- }), /* @__PURE__ */ React13.createElement(QueuedMessageDisplay, { messageQueue: queuedTasks }), isAgentRunning && !messages.some((m) => m.type === "assistant" && m.isPending) && /* @__PURE__ */ React13.createElement(LoadingMessage, { headless, key: "loading" }));
8284
+ }), /* @__PURE__ */ React13.createElement(QueuedMessageDisplay, { messageQueue: queuedTasks }), isAgentRunning && !hasPendingAssistant && /* @__PURE__ */ React13.createElement(LoadingMessage, { headless, key: "loading" }));
8220
8285
  };
8221
8286
  }
8222
8287
  });
@@ -9275,7 +9340,7 @@ import React17, {
9275
9340
  useCallback as useCallback2,
9276
9341
  useContext as useContext2,
9277
9342
  useEffect as useEffect4,
9278
- useRef as useRef2
9343
+ useRef as useRef3
9279
9344
  } from "react";
9280
9345
  function charLengthAt(str, i) {
9281
9346
  if (str.length <= i) {
@@ -9562,7 +9627,7 @@ function KeypressProvider({
9562
9627
  debugKeystrokeLogging
9563
9628
  }) {
9564
9629
  const { stdin, setRawMode } = useStdin2();
9565
- const subscribers = useRef2(/* @__PURE__ */ new Set()).current;
9630
+ const subscribers = useRef3(/* @__PURE__ */ new Set()).current;
9566
9631
  const subscribe = useCallback2(
9567
9632
  (handler) => subscribers.add(handler),
9568
9633
  [subscribers]
@@ -11164,18 +11229,18 @@ var init_useModeToggle = __esm({
11164
11229
  });
11165
11230
 
11166
11231
  // src/ui/hooks/useOverlayEscapeGuard.ts
11167
- import { useCallback as useCallback3, useMemo as useMemo4, useRef as useRef3 } from "react";
11232
+ import { useCallback as useCallback3, useMemo as useMemo5, useRef as useRef4 } from "react";
11168
11233
  var useOverlayEscapeGuard;
11169
11234
  var init_useOverlayEscapeGuard = __esm({
11170
11235
  "src/ui/hooks/useOverlayEscapeGuard.ts"() {
11171
11236
  "use strict";
11172
11237
  useOverlayEscapeGuard = ({ overlays, suppressionMs = 250 }) => {
11173
- const suppressUntilRef = useRef3(0);
11238
+ const suppressUntilRef = useRef4(0);
11174
11239
  const markOverlayClosed = useCallback3(() => {
11175
11240
  suppressUntilRef.current = Date.now() + suppressionMs;
11176
11241
  }, [suppressionMs]);
11177
11242
  const isCancelSuppressed = useCallback3(() => Date.now() < suppressUntilRef.current, []);
11178
- const isOverlayOpen = useMemo4(() => overlays.some(Boolean), [overlays]);
11243
+ const isOverlayOpen = useMemo5(() => overlays.some(Boolean), [overlays]);
11179
11244
  return { isOverlayOpen, isCancelSuppressed, markOverlayClosed };
11180
11245
  };
11181
11246
  }
@@ -11186,7 +11251,7 @@ import { execSync as execSync6 } from "child_process";
11186
11251
  import { homedir as homedir6 } from "os";
11187
11252
  import { Box as Box25, Text as Text23, useApp as useApp2, useStdout as useStdout2 } from "ink";
11188
11253
  import Spinner3 from "ink-spinner";
11189
- import React28, { useEffect as useEffect13, useRef as useRef4, useState as useState14 } from "react";
11254
+ import React28, { useEffect as useEffect13, useRef as useRef5, useState as useState14 } from "react";
11190
11255
  var getGitBranch2, getCurrentFolder2, AppContent, App;
11191
11256
  var init_App = __esm({
11192
11257
  "src/ui/App.tsx"() {
@@ -11244,7 +11309,7 @@ var init_App = __esm({
11244
11309
  const [currentFolder] = useState14(() => getCurrentFolder2(config2.cwd));
11245
11310
  const [hasInputContent, setHasInputContent] = useState14(false);
11246
11311
  const [exitWarning, setExitWarning] = useState14(null);
11247
- const inputPromptRef = useRef4(null);
11312
+ const inputPromptRef = useRef5(null);
11248
11313
  const [showSessionSelector, setShowSessionSelector] = useState14(false);
11249
11314
  const [showModelSelector, setShowModelSelector] = useState14(false);
11250
11315
  const [showProviderSelector, setShowProviderSelector] = useState14(false);
@@ -11600,7 +11665,7 @@ var init_App = __esm({
11600
11665
  markOverlayClosed();
11601
11666
  setShowHelp(false);
11602
11667
  };
11603
- const isInitialMount = useRef4(true);
11668
+ const isInitialMount = useRef5(true);
11604
11669
  useEffect13(() => {
11605
11670
  const handleResize = () => {
11606
11671
  setTerminalWidth(process.stdout.columns || 80);
@@ -11799,7 +11864,7 @@ __export(interactive_exports, {
11799
11864
  runInteractive: () => runInteractive
11800
11865
  });
11801
11866
  import { render as render2 } from "ink";
11802
- import React29, { useEffect as useEffect15, useRef as useRef5 } from "react";
11867
+ import React29, { useEffect as useEffect15, useRef as useRef6 } from "react";
11803
11868
  function getToolDescription2(toolName, input) {
11804
11869
  switch (toolName) {
11805
11870
  case "Read":
@@ -12009,7 +12074,7 @@ var init_interactive = __esm({
12009
12074
  selectedModel,
12010
12075
  llmProvider
12011
12076
  } = useSession();
12012
- const agentRef = useRef5(null);
12077
+ const agentRef = useRef6(null);
12013
12078
  useEffect15(() => {
12014
12079
  if (shouldInterruptAgent && agentRef.current) {
12015
12080
  agentRef.current.abort();
@@ -12332,7 +12397,7 @@ init_SessionContext();
12332
12397
  import { execSync as execSync2 } from "child_process";
12333
12398
  import { homedir as homedir3 } from "os";
12334
12399
  import { Box as Box13, useApp } from "ink";
12335
- import React14, { useEffect as useEffect2, useRef, useState as useState3 } from "react";
12400
+ import React14, { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
12336
12401
  var getGitBranch = () => {
12337
12402
  try {
12338
12403
  return execSync2("git rev-parse --abbrev-ref HEAD", { encoding: "utf8" }).trim();
@@ -12358,7 +12423,7 @@ var HeadlessAgentRunner = ({ config: config2, sessionId, apiClient, onComplete }
12358
12423
  setTodos,
12359
12424
  setUsageStats
12360
12425
  } = useSession();
12361
- const agentRef = useRef(null);
12426
+ const agentRef = useRef2(null);
12362
12427
  useEffect2(() => {
12363
12428
  let isMounted = true;
12364
12429
  const runAgent2 = async () => {
@@ -12446,7 +12511,7 @@ var HeadlessAppContent = ({
12446
12511
  const [gitBranch] = useState3(() => getGitBranch());
12447
12512
  const [currentFolder] = useState3(() => getCurrentFolder());
12448
12513
  const [terminalWidth, setTerminalWidth] = useState3(process.stdout.columns || 80);
12449
- const hasCompletedRef = useRef(false);
12514
+ const hasCompletedRef = useRef2(false);
12450
12515
  useEffect2(() => {
12451
12516
  setSessionId(sessionId);
12452
12517
  if (webUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supatest/cli",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "Supatest CLI - AI-powered task automation for CI/CD",
5
5
  "type": "module",
6
6
  "bin": {