@involvex/super-agent-cli 0.0.82 → 0.0.84

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
@@ -1731,7 +1731,7 @@ var init_indexer = __esm(() => {
1731
1731
  var require_package = __commonJS((exports, module) => {
1732
1732
  module.exports = {
1733
1733
  name: "@involvex/super-agent-cli",
1734
- version: "0.0.82",
1734
+ version: "0.0.84",
1735
1735
  description: "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
1736
1736
  keywords: [
1737
1737
  "cli",
@@ -1784,6 +1784,7 @@ var require_package = __commonJS((exports, module) => {
1784
1784
  lint: "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern dist",
1785
1785
  "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix --ignore-pattern dist",
1786
1786
  "package:vscode": "bun run -F super-agent-vscode package",
1787
+ release: "powershell -File scripts/release.ps1",
1787
1788
  start: "bun run dist/index.js",
1788
1789
  "start:node": "node dist/index.js",
1789
1790
  test: "vitest run",
@@ -2343,7 +2344,7 @@ function useEnhancedInput({
2343
2344
  if (disabled) {
2344
2345
  return;
2345
2346
  }
2346
- if (key.ctrl && inputChar === "c" || inputChar === "\x03") {
2347
+ if (key.ctrl && (inputChar === "c" || inputChar === "C") || inputChar === "\x03") {
2347
2348
  setInputState("");
2348
2349
  setCursorPositionState(0);
2349
2350
  setOriginalInput("");
@@ -2507,7 +2508,7 @@ import * as os3 from "os";
2507
2508
  import { useMemo } from "react";
2508
2509
  import { Box, Text } from "ink";
2509
2510
  import { jsxDEV } from "react/jsx-dev-runtime";
2510
- var MAX_SUGGESTIONS = 8;
2511
+ var MAX_SUGGESTIONS = 30;
2511
2512
  function filterCommandSuggestions(suggestions, input) {
2512
2513
  const lowerInput = input.toLowerCase();
2513
2514
  return suggestions.filter((s) => s.command.toLowerCase().startsWith(lowerInput)).slice(0, MAX_SUGGESTIONS);
@@ -4243,8 +4244,16 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
4243
4244
  if (key.tab || key.return) {
4244
4245
  const safeIndex = Math.min(selectedCommandIndex, filteredSuggestions.length - 1);
4245
4246
  const selectedCommand = filteredSuggestions[safeIndex];
4246
- const newInput = selectedCommand.command + " ";
4247
- setInput(newInput, newInput.length);
4247
+ let completedCommand = selectedCommand.command;
4248
+ completedCommand = completedCommand.replace(/\s*<[^>]+>/g, "").replace(/\s*\[[^\]]+\]/g, "");
4249
+ if (!completedCommand.endsWith(" ") && selectedCommand.command.includes("<")) {
4250
+ completedCommand += " ";
4251
+ } else if (!completedCommand.endsWith(" ")) {
4252
+ completedCommand += " ";
4253
+ }
4254
+ const afterCursor = input.slice(cursorPosition);
4255
+ const newInput = completedCommand + afterCursor;
4256
+ setInput(newInput, completedCommand.length);
4248
4257
  setShowCommandSuggestions(false);
4249
4258
  setSelectedCommandIndex(0);
4250
4259
  return true;
@@ -4382,6 +4391,7 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
4382
4391
  const baseCommands = [
4383
4392
  { command: "/help", description: "Show help information" },
4384
4393
  { command: "/clear", description: "Clear chat history" },
4394
+ { command: "/theme", description: "Customize application theme" },
4385
4395
  {
4386
4396
  command: "/init",
4387
4397
  description: "Create Agents.md for project instructions"
@@ -4499,6 +4509,54 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
4499
4509
  resetHistory();
4500
4510
  return true;
4501
4511
  }
4512
+ if (trimmedInput === "/theme") {
4513
+ const manager = getSettingsManager();
4514
+ const settings = manager.loadUserSettings();
4515
+ const currentTheme = settings.ui.theme || "dark";
4516
+ setChatHistory((prev) => [
4517
+ ...prev,
4518
+ {
4519
+ type: "assistant",
4520
+ content: `Current theme: ${currentTheme}
4521
+
4522
+ Available themes: dark, light
4523
+
4524
+ Usage: /theme <name>
4525
+ Example: /theme light`,
4526
+ timestamp: new Date
4527
+ }
4528
+ ]);
4529
+ clearInput();
4530
+ return true;
4531
+ }
4532
+ if (trimmedInput.startsWith("/theme ")) {
4533
+ const themeName = trimmedInput.replace("/theme ", "").trim().toLowerCase();
4534
+ if (themeName === "dark" || themeName === "light") {
4535
+ const manager = getSettingsManager();
4536
+ const settings = manager.loadUserSettings();
4537
+ settings.ui.theme = themeName;
4538
+ manager.saveUserSettings(settings);
4539
+ setChatHistory((prev) => [
4540
+ ...prev,
4541
+ {
4542
+ type: "assistant",
4543
+ content: `✅ Theme switched to: ${themeName}`,
4544
+ timestamp: new Date
4545
+ }
4546
+ ]);
4547
+ } else {
4548
+ setChatHistory((prev) => [
4549
+ ...prev,
4550
+ {
4551
+ type: "assistant",
4552
+ content: `❌ Invalid theme: ${themeName}. Available: dark, light`,
4553
+ timestamp: new Date
4554
+ }
4555
+ ]);
4556
+ }
4557
+ clearInput();
4558
+ return true;
4559
+ }
4502
4560
  if (trimmedInput === "/help") {
4503
4561
  const helpEntry = {
4504
4562
  type: "assistant",
@@ -4507,6 +4565,7 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
4507
4565
  Built-in Commands:
4508
4566
  /clear - Clear chat history
4509
4567
  /help - Show this help
4568
+ /theme - Customize application theme
4510
4569
  /doctor - Check system health & connection
4511
4570
  /init - Create Agents.md for project-specific AI instructions
4512
4571
  /exit - Exit application
@@ -4521,6 +4580,7 @@ Provider Commands:
4521
4580
  /provider set-url <id> <url> - Set base URL for provider
4522
4581
  /provider set-account <id> <acc_id> - Set account ID (e.g. workers-ai)
4523
4582
  /provider remove <id> - Remove a provider
4583
+ /provider reset - Reset provider settings to defaults
4524
4584
 
4525
4585
  Model Commands:
4526
4586
  /models - Show model selection UI
@@ -5274,6 +5334,33 @@ No model specified for this provider. Consider setting one with '/model set <mod
5274
5334
  clearInput();
5275
5335
  return true;
5276
5336
  }
5337
+ if (trimmedInput === "/provider reset") {
5338
+ const manager = getSettingsManager();
5339
+ const settings = manager.loadUserSettings();
5340
+ const defaultProviders = {
5341
+ grok: {
5342
+ id: "grok",
5343
+ provider: "grok",
5344
+ model: "grok-code-fast-1",
5345
+ api_key: "",
5346
+ base_url: "https://api.x.ai/v1",
5347
+ default_model: "grok-code-fast-1"
5348
+ }
5349
+ };
5350
+ settings.active_provider = "grok";
5351
+ settings.providers = { ...settings.providers, ...defaultProviders };
5352
+ manager.saveUserSettings(settings);
5353
+ setChatHistory((prev) => [
5354
+ ...prev,
5355
+ {
5356
+ type: "assistant",
5357
+ content: "✅ Provider settings reset to defaults.",
5358
+ timestamp: new Date
5359
+ }
5360
+ ]);
5361
+ clearInput();
5362
+ return true;
5363
+ }
5277
5364
  if (trimmedInput === "/provider list" || trimmedInput === "/provider ls") {
5278
5365
  const manager = getSettingsManager();
5279
5366
  const settings = manager.loadUserSettings();
@@ -6975,7 +7062,7 @@ function ConfirmationDialog({
6975
7062
  }
6976
7063
 
6977
7064
  // src/ui/components/chat-interface.tsx
6978
- import { useEffect as useEffect5, useRef as useRef2, useState as useState9 } from "react";
7065
+ import { useEffect as useEffect6, useRef as useRef2, useState as useState10 } from "react";
6979
7066
 
6980
7067
  // src/ui/components/model-selection.tsx
6981
7068
  import { Box as Box7, Text as Text6 } from "ink";
@@ -7703,7 +7790,7 @@ function ChatHistory({
7703
7790
  const filteredEntries = isConfirmationActive ? entries.filter((entry) => !(entry.type === "tool_call" && entry.content === "Executing...")) : entries;
7704
7791
  return /* @__PURE__ */ jsxDEV12(Box11, {
7705
7792
  flexDirection: "column",
7706
- children: filteredEntries.slice(-20).map((entry, index) => /* @__PURE__ */ jsxDEV12(MemoizedChatEntry, {
7793
+ children: filteredEntries.slice(-50).map((entry, index) => /* @__PURE__ */ jsxDEV12(MemoizedChatEntry, {
7707
7794
  entry,
7708
7795
  index
7709
7796
  }, `${entry.timestamp.getTime()}-${index}`, false, undefined, this))
@@ -9435,6 +9522,13 @@ class PerplexityProvider extends OpenAICompatibleProvider {
9435
9522
  }
9436
9523
  }
9437
9524
 
9525
+ // src/core/providers/openrouter.ts
9526
+ class OpenRouterProvider extends OpenAICompatibleProvider {
9527
+ constructor(apiKey, baseURL, model) {
9528
+ super(apiKey, baseURL || "https://openrouter.ai/api/v1", model || "anthropic/claude-3.5-sonnet", "openrouter");
9529
+ }
9530
+ }
9531
+
9438
9532
  // src/core/providers/anthropic.ts
9439
9533
  class AnthropicProvider {
9440
9534
  name = "anthropic";
@@ -9637,6 +9731,20 @@ class TogetherProvider extends OpenAICompatibleProvider {
9637
9731
  }
9638
9732
  }
9639
9733
 
9734
+ // src/core/providers/deepseek.ts
9735
+ class DeepSeekProvider extends OpenAICompatibleProvider {
9736
+ constructor(apiKey, baseURL, model) {
9737
+ super(apiKey, baseURL || "https://api.deepseek.com/v1", model || "deepseek-coder", "deepseek");
9738
+ }
9739
+ }
9740
+
9741
+ // src/core/providers/mistral.ts
9742
+ class MistralProvider extends OpenAICompatibleProvider {
9743
+ constructor(apiKey, baseURL, model) {
9744
+ super(apiKey, baseURL || "https://api.mistral.ai/v1", model || "mistral-large-latest", "mistral");
9745
+ }
9746
+ }
9747
+
9640
9748
  // src/core/providers/openai.ts
9641
9749
  import OpenAI2 from "openai";
9642
9750
 
@@ -9710,6 +9818,13 @@ class OpenAIProvider {
9710
9818
  }
9711
9819
  }
9712
9820
 
9821
+ // src/core/providers/ollama.ts
9822
+ class OllamaProvider extends OpenAICompatibleProvider {
9823
+ constructor(apiKey, baseURL, model) {
9824
+ super(apiKey || "ollama", baseURL || "http://localhost:11434/v1", model || "llama3", "ollama");
9825
+ }
9826
+ }
9827
+
9713
9828
  // src/core/providers/gemini.ts
9714
9829
  import { GoogleGenerativeAI } from "@google/generative-ai";
9715
9830
 
@@ -9901,6 +10016,13 @@ class CohereProvider extends OpenAICompatibleProvider {
9901
10016
  }
9902
10017
  }
9903
10018
 
10019
+ // src/core/providers/groq.ts
10020
+ class GroqProvider extends OpenAICompatibleProvider {
10021
+ constructor(apiKey, baseURL, model) {
10022
+ super(apiKey, baseURL || "https://api.groq.com/openai/v1", model || "llama-3.3-70b-versatile", "groq");
10023
+ }
10024
+ }
10025
+
9904
10026
  // src/core/providers/grok.ts
9905
10027
  import OpenAI3 from "openai";
9906
10028
 
@@ -10029,6 +10151,16 @@ class SuperAgent extends EventEmitter4 {
10029
10151
  this.superAgentClient = new PerplexityProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10030
10152
  } else if (providerType === "cohere") {
10031
10153
  this.superAgentClient = new CohereProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10154
+ } else if (providerType === "deepseek") {
10155
+ this.superAgentClient = new DeepSeekProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10156
+ } else if (providerType === "ollama") {
10157
+ this.superAgentClient = new OllamaProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10158
+ } else if (providerType === "mistral") {
10159
+ this.superAgentClient = new MistralProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10160
+ } else if (providerType === "groq") {
10161
+ this.superAgentClient = new GroqProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10162
+ } else if (providerType === "openrouter") {
10163
+ this.superAgentClient = new OpenRouterProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10032
10164
  } else {
10033
10165
  this.superAgentClient = new OpenAICompatibleProvider(effectiveApiKey, effectiveBaseURL || "", effectiveModel, activeProviderId);
10034
10166
  }
@@ -10151,6 +10283,16 @@ Current working directory: ${process.cwd()}`
10151
10283
  this.superAgentClient = new GeminiProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10152
10284
  } else if (providerType === "grok") {
10153
10285
  this.superAgentClient = new GrokProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10286
+ } else if (providerType === "deepseek") {
10287
+ this.superAgentClient = new DeepSeekProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10288
+ } else if (providerType === "ollama") {
10289
+ this.superAgentClient = new OllamaProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10290
+ } else if (providerType === "mistral") {
10291
+ this.superAgentClient = new MistralProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10292
+ } else if (providerType === "groq") {
10293
+ this.superAgentClient = new GroqProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10294
+ } else if (providerType === "openrouter") {
10295
+ this.superAgentClient = new OpenRouterProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10154
10296
  } else {
10155
10297
  this.superAgentClient = new OpenAICompatibleProvider(effectiveApiKey, effectiveBaseURL || "", effectiveModel, activeProviderId);
10156
10298
  }
@@ -10839,6 +10981,7 @@ function MCPStatus({}) {
10839
10981
  }
10840
10982
 
10841
10983
  // src/ui/components/chat-input.tsx
10984
+ import { useEffect as useEffect4, useState as useState8 } from "react";
10842
10985
  import { Box as Box14, Text as Text14 } from "ink";
10843
10986
  import { jsxDEV as jsxDEV15, Fragment as Fragment3 } from "react/jsx-dev-runtime";
10844
10987
  function ChatInput({
@@ -10847,6 +10990,17 @@ function ChatInput({
10847
10990
  isProcessing,
10848
10991
  isStreaming
10849
10992
  }) {
10993
+ const [blink, setBlink] = useState8(true);
10994
+ useEffect4(() => {
10995
+ if (isProcessing || isStreaming) {
10996
+ setBlink(false);
10997
+ return;
10998
+ }
10999
+ const interval = setInterval(() => {
11000
+ setBlink((prev) => !prev);
11001
+ }, 530);
11002
+ return () => clearInterval(interval);
11003
+ }, [isProcessing, isStreaming]);
10850
11004
  const beforeCursor = input.slice(0, cursorPosition);
10851
11005
  const afterCursor = input.slice(cursorPosition);
10852
11006
  const lines = input.split(`
@@ -10894,8 +11048,8 @@ function ChatInput({
10894
11048
  children: [
10895
11049
  beforeCursorInLine,
10896
11050
  showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
10897
- backgroundColor: "white",
10898
- color: "black",
11051
+ backgroundColor: blink ? "white" : undefined,
11052
+ color: blink ? "black" : "white",
10899
11053
  children: cursorChar2
10900
11054
  }, undefined, false, undefined, this),
10901
11055
  !showCursor && cursorChar2 !== " " && cursorChar2,
@@ -10945,8 +11099,8 @@ function ChatInput({
10945
11099
  children: placeholderText
10946
11100
  }, undefined, false, undefined, this),
10947
11101
  showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
10948
- backgroundColor: "white",
10949
- color: "black",
11102
+ backgroundColor: blink ? "white" : undefined,
11103
+ color: blink ? "black" : "white",
10950
11104
  children: " "
10951
11105
  }, undefined, false, undefined, this)
10952
11106
  ]
@@ -10954,8 +11108,8 @@ function ChatInput({
10954
11108
  children: [
10955
11109
  beforeCursor,
10956
11110
  showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
10957
- backgroundColor: "white",
10958
- color: "black",
11111
+ backgroundColor: blink ? "white" : undefined,
11112
+ color: blink ? "black" : "white",
10959
11113
  children: cursorChar
10960
11114
  }, undefined, false, undefined, this),
10961
11115
  !showCursor && cursorChar !== " " && cursorChar,
@@ -10969,7 +11123,7 @@ function ChatInput({
10969
11123
 
10970
11124
  // src/ui/components/statusbar.tsx
10971
11125
  init_settings_manager();
10972
- import { useEffect as useEffect4, useState as useState8 } from "react";
11126
+ import { useEffect as useEffect5, useState as useState9 } from "react";
10973
11127
  import { Box as Box15, Text as Text15 } from "ink";
10974
11128
  import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
10975
11129
  function StatusBar({
@@ -10979,16 +11133,16 @@ function StatusBar({
10979
11133
  tokenCount = 0,
10980
11134
  contextSize = 0
10981
11135
  }) {
10982
- const [config, setConfig] = useState8(getSettingsManager().getEffectiveSettings().ui.statusbar_config);
10983
- const [gitStatus, setGitStatus] = useState8(null);
10984
- const [systemStats, setSystemStats] = useState8(null);
10985
- useEffect4(() => {
11136
+ const [config, setConfig] = useState9(getSettingsManager().getEffectiveSettings().ui.statusbar_config);
11137
+ const [gitStatus, setGitStatus] = useState9(null);
11138
+ const [systemStats, setSystemStats] = useState9(null);
11139
+ useEffect5(() => {
10986
11140
  const settings = getSettingsManager().getEffectiveSettings();
10987
11141
  if (settings.ui.statusbar_config) {
10988
11142
  setConfig(settings.ui.statusbar_config);
10989
11143
  }
10990
11144
  }, []);
10991
- useEffect4(() => {
11145
+ useEffect5(() => {
10992
11146
  if (config?.show_git_status) {
10993
11147
  fetchGitStatus();
10994
11148
  }
@@ -11201,14 +11355,14 @@ function ChatInterfaceWithAgent({
11201
11355
  resumeSession,
11202
11356
  debugMode
11203
11357
  }) {
11204
- const [chatHistory, setChatHistory] = useState9([]);
11205
- const [isProcessing, setIsProcessing] = useState9(false);
11206
- const [processingTime, setProcessingTime] = useState9(0);
11207
- const [tokenCount, setTokenCount] = useState9(0);
11208
- const [isStreaming, setIsStreaming] = useState9(false);
11209
- const [confirmationOptions, setConfirmationOptions] = useState9(null);
11210
- const [toolCallsCount, setToolCallsCount] = useState9(0);
11211
- const [showStatusBar, setShowStatusBar] = useState9(false);
11358
+ const [chatHistory, setChatHistory] = useState10([]);
11359
+ const [isProcessing, setIsProcessing] = useState10(false);
11360
+ const [processingTime, setProcessingTime] = useState10(0);
11361
+ const [tokenCount, setTokenCount] = useState10(0);
11362
+ const [isStreaming, setIsStreaming] = useState10(false);
11363
+ const [confirmationOptions, setConfirmationOptions] = useState10(null);
11364
+ const [toolCallsCount, setToolCallsCount] = useState10(0);
11365
+ const [showStatusBar, setShowStatusBar] = useState10(false);
11212
11366
  const scrollRef = useRef2();
11213
11367
  const processingStartTime = useRef2(0);
11214
11368
  const confirmationService = ConfirmationService.getInstance();
@@ -11246,7 +11400,7 @@ function ChatInterfaceWithAgent({
11246
11400
  isStreaming,
11247
11401
  isConfirmationActive: !!confirmationOptions
11248
11402
  });
11249
- useEffect5(() => {
11403
+ useEffect6(() => {
11250
11404
  const isWindows = process.platform === "win32";
11251
11405
  const isPowerShell = process.env.ComSpec?.toLowerCase().includes("powershell") || process.env.PSModulePath !== undefined;
11252
11406
  if (!isWindows || !isPowerShell) {
@@ -11272,7 +11426,7 @@ function ChatInterfaceWithAgent({
11272
11426
  }
11273
11427
  setChatHistory([]);
11274
11428
  }, [debugMode]);
11275
- useEffect5(() => {
11429
+ useEffect6(() => {
11276
11430
  if (resumeSession) {
11277
11431
  const logger = getLogger();
11278
11432
  logger.debug("Resuming previous session...");
@@ -11294,23 +11448,23 @@ function ChatInterfaceWithAgent({
11294
11448
  });
11295
11449
  }
11296
11450
  }, [resumeSession]);
11297
- useEffect5(() => {
11451
+ useEffect6(() => {
11298
11452
  const { getSettingsManager: getSettingsManager2 } = (init_settings_manager(), __toCommonJS(exports_settings_manager));
11299
11453
  const manager = getSettingsManager2();
11300
11454
  const settings = manager.getEffectiveSettings();
11301
11455
  setShowStatusBar(settings.ui.show_statusbar || false);
11302
11456
  }, []);
11303
- useEffect5(() => {
11457
+ useEffect6(() => {
11304
11458
  const count = chatHistory.filter((entry) => entry.type === "tool_call" || entry.type === "tool_result").length;
11305
11459
  setToolCallsCount(count);
11306
11460
  }, [chatHistory]);
11307
- useEffect5(() => {
11461
+ useEffect6(() => {
11308
11462
  if (scrollRef.current && chatHistory.length > 0) {
11309
11463
  const logger = getLogger();
11310
11464
  logger.debug("Chat history updated, ensuring scroll to bottom");
11311
11465
  }
11312
11466
  }, [chatHistory]);
11313
- useEffect5(() => {
11467
+ useEffect6(() => {
11314
11468
  if (initialMessage && agent) {
11315
11469
  const userEntry = {
11316
11470
  type: "user",
@@ -11388,7 +11542,7 @@ function ChatInterfaceWithAgent({
11388
11542
  processInitialMessage();
11389
11543
  }
11390
11544
  }, [initialMessage, agent]);
11391
- useEffect5(() => {
11545
+ useEffect6(() => {
11392
11546
  const handleConfirmationRequest = (options) => {
11393
11547
  setConfirmationOptions(options);
11394
11548
  };
@@ -11397,7 +11551,7 @@ function ChatInterfaceWithAgent({
11397
11551
  confirmationService.off("confirmation-requested", handleConfirmationRequest);
11398
11552
  };
11399
11553
  }, [confirmationService]);
11400
- useEffect5(() => {
11554
+ useEffect6(() => {
11401
11555
  if (!isProcessing && !isStreaming) {
11402
11556
  setProcessingTime(0);
11403
11557
  return;
@@ -11489,7 +11643,7 @@ function ChatInterfaceWithAgent({
11489
11643
  entries: chatHistory,
11490
11644
  isConfirmationActive: !!confirmationOptions
11491
11645
  }, undefined, false, undefined, this)
11492
- }, chatHistory.length > 0 ? `chat-history-${chatHistory[chatHistory.length - 1]?.timestamp.getTime()}` : "chat-history-empty", false, undefined, this),
11646
+ }, undefined, false, undefined, this),
11493
11647
  confirmationOptions && /* @__PURE__ */ jsxDEV17(ConfirmationDialog, {
11494
11648
  operation: confirmationOptions.operation,
11495
11649
  filename: confirmationOptions.filename,
@@ -11685,7 +11839,7 @@ function ChatInterface({
11685
11839
  resumeSession,
11686
11840
  debugMode
11687
11841
  }) {
11688
- const [currentAgent, setCurrentAgent] = useState9(agent || null);
11842
+ const [currentAgent, setCurrentAgent] = useState10(agent || null);
11689
11843
  const handleApiKeySet = (newAgent) => {
11690
11844
  setCurrentAgent(newAgent);
11691
11845
  };
@@ -12869,7 +13023,7 @@ var import__package = __toESM(require_package(), 1);
12869
13023
  import { program } from "commander";
12870
13024
  import * as dotenv from "dotenv";
12871
13025
  import { render } from "ink";
12872
- import React4 from "react";
13026
+ import React5 from "react";
12873
13027
  dotenv.config();
12874
13028
  process.on("SIGTERM", () => {
12875
13029
  if (process.stdin.isTTY && process.stdin.setRawMode) {
@@ -13124,7 +13278,7 @@ program.name("super-agent").description("A conversational AI CLI tool powered by
13124
13278
  }
13125
13279
  }).catch(() => {});
13126
13280
  const initialMessage = Array.isArray(message) ? message.join(" ") : message;
13127
- render(React4.createElement(ChatInterface, {
13281
+ render(React5.createElement(ChatInterface, {
13128
13282
  agent,
13129
13283
  initialMessage,
13130
13284
  resumeSession,
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@involvex/super-agent-cli",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "description": "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
5
5
  "keywords": [
6
6
  "cli",
@@ -53,6 +53,7 @@
53
53
  "lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern dist",
54
54
  "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix --ignore-pattern dist",
55
55
  "package:vscode": "bun run -F super-agent-vscode package",
56
+ "release": "powershell -File scripts/release.ps1",
56
57
  "start": "bun run dist/index.js",
57
58
  "start:node": "node dist/index.js",
58
59
  "test": "vitest run",
@@ -0,0 +1,45 @@
1
+ # scripts/release.ps1
2
+ $ErrorActionPreference = 'Stop' # Exit immediately if a command exits with a non-zero status.
3
+
4
+ Write-Host "Optimizing new version submission flow (PowerShell compatible)..."
5
+
6
+ # 1. Ensure clean git working directory
7
+ Write-Host "Checking for uncommitted changes..."
8
+ $gitStatus = git status --porcelain
9
+ if ($gitStatus) {
10
+ Write-Host "Error: Uncommitted changes detected. Please commit or stash them before running the release script."
11
+ exit 1
12
+ }
13
+
14
+ # 2. Bump version, create commit and tag
15
+ Write-Host "Bumping version and creating tag..."
16
+ # `bun pm version patch` automatically creates a commit and a tag like vX.Y.Z
17
+ # We need to capture the new version string.
18
+ $newVersionOutput = bun pm version patch
19
+ $NEW_VERSION = ($newVersionOutput | Select-Object -Last 1).Trim() # Assumes the last line is the version, e.g., "v1.0.1"
20
+ Write-Host "Version bumped to $NEW_VERSION"
21
+
22
+ # 3. Generate CHANGELOG.md
23
+ Write-Host "Generating CHANGELOG.md..."
24
+ bun run changelog
25
+
26
+ # 4. Stage CHANGELOG.md
27
+ Write-Host "Staging CHANGELOG.md..."
28
+ git add CHANGELOG.md
29
+
30
+ # 5. Amend the previous commit to include CHANGELOG.md
31
+ # git commit --amend automatically takes the last commit message if --no-edit is used
32
+ Write-Host "Amending previous commit to include CHANGELOG.md..."
33
+ git commit --amend --no-edit
34
+
35
+ # 6. Force update the tag to point to the amended commit (important!)
36
+ # `git commit --amend` creates a new commit SHA. We need to update the tag to point to this new SHA.
37
+ Write-Host "Updating Git tag $NEW_VERSION to new commit SHA..."
38
+ git tag -f $NEW_VERSION HEAD
39
+
40
+ # 7. Run the project build (dist/ is ignored, so it's not committed)
41
+ Write-Host "Running project build..."
42
+ bun run build
43
+
44
+ Write-Host "Release process complete for version $NEW_VERSION."
45
+ Write-Host "You can now push your changes with: git push --follow-tags"