@involvex/super-agent-cli 0.0.82 → 0.0.83

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.83",
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",
@@ -2507,7 +2507,7 @@ import * as os3 from "os";
2507
2507
  import { useMemo } from "react";
2508
2508
  import { Box, Text } from "ink";
2509
2509
  import { jsxDEV } from "react/jsx-dev-runtime";
2510
- var MAX_SUGGESTIONS = 8;
2510
+ var MAX_SUGGESTIONS = 30;
2511
2511
  function filterCommandSuggestions(suggestions, input) {
2512
2512
  const lowerInput = input.toLowerCase();
2513
2513
  return suggestions.filter((s) => s.command.toLowerCase().startsWith(lowerInput)).slice(0, MAX_SUGGESTIONS);
@@ -4243,8 +4243,16 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
4243
4243
  if (key.tab || key.return) {
4244
4244
  const safeIndex = Math.min(selectedCommandIndex, filteredSuggestions.length - 1);
4245
4245
  const selectedCommand = filteredSuggestions[safeIndex];
4246
- const newInput = selectedCommand.command + " ";
4247
- setInput(newInput, newInput.length);
4246
+ let completedCommand = selectedCommand.command;
4247
+ completedCommand = completedCommand.replace(/\s*<[^>]+>/g, "").replace(/\s*\[[^\]]+\]/g, "");
4248
+ if (!completedCommand.endsWith(" ") && selectedCommand.command.includes("<")) {
4249
+ completedCommand += " ";
4250
+ } else if (!completedCommand.endsWith(" ")) {
4251
+ completedCommand += " ";
4252
+ }
4253
+ const afterCursor = input.slice(cursorPosition);
4254
+ const newInput = completedCommand + afterCursor;
4255
+ setInput(newInput, completedCommand.length);
4248
4256
  setShowCommandSuggestions(false);
4249
4257
  setSelectedCommandIndex(0);
4250
4258
  return true;
@@ -6975,7 +6983,7 @@ function ConfirmationDialog({
6975
6983
  }
6976
6984
 
6977
6985
  // src/ui/components/chat-interface.tsx
6978
- import { useEffect as useEffect5, useRef as useRef2, useState as useState9 } from "react";
6986
+ import { useEffect as useEffect6, useRef as useRef2, useState as useState10 } from "react";
6979
6987
 
6980
6988
  // src/ui/components/model-selection.tsx
6981
6989
  import { Box as Box7, Text as Text6 } from "ink";
@@ -7703,7 +7711,7 @@ function ChatHistory({
7703
7711
  const filteredEntries = isConfirmationActive ? entries.filter((entry) => !(entry.type === "tool_call" && entry.content === "Executing...")) : entries;
7704
7712
  return /* @__PURE__ */ jsxDEV12(Box11, {
7705
7713
  flexDirection: "column",
7706
- children: filteredEntries.slice(-20).map((entry, index) => /* @__PURE__ */ jsxDEV12(MemoizedChatEntry, {
7714
+ children: filteredEntries.slice(-50).map((entry, index) => /* @__PURE__ */ jsxDEV12(MemoizedChatEntry, {
7707
7715
  entry,
7708
7716
  index
7709
7717
  }, `${entry.timestamp.getTime()}-${index}`, false, undefined, this))
@@ -9637,6 +9645,13 @@ class TogetherProvider extends OpenAICompatibleProvider {
9637
9645
  }
9638
9646
  }
9639
9647
 
9648
+ // src/core/providers/deepseek.ts
9649
+ class DeepSeekProvider extends OpenAICompatibleProvider {
9650
+ constructor(apiKey, baseURL, model) {
9651
+ super(apiKey, baseURL || "https://api.deepseek.com/v1", model || "deepseek-coder", "deepseek");
9652
+ }
9653
+ }
9654
+
9640
9655
  // src/core/providers/openai.ts
9641
9656
  import OpenAI2 from "openai";
9642
9657
 
@@ -9710,6 +9725,13 @@ class OpenAIProvider {
9710
9725
  }
9711
9726
  }
9712
9727
 
9728
+ // src/core/providers/ollama.ts
9729
+ class OllamaProvider extends OpenAICompatibleProvider {
9730
+ constructor(apiKey, baseURL, model) {
9731
+ super(apiKey || "ollama", baseURL || "http://localhost:11434/v1", model || "llama3", "ollama");
9732
+ }
9733
+ }
9734
+
9713
9735
  // src/core/providers/gemini.ts
9714
9736
  import { GoogleGenerativeAI } from "@google/generative-ai";
9715
9737
 
@@ -10029,6 +10051,10 @@ class SuperAgent extends EventEmitter4 {
10029
10051
  this.superAgentClient = new PerplexityProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10030
10052
  } else if (providerType === "cohere") {
10031
10053
  this.superAgentClient = new CohereProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10054
+ } else if (providerType === "deepseek") {
10055
+ this.superAgentClient = new DeepSeekProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10056
+ } else if (providerType === "ollama") {
10057
+ this.superAgentClient = new OllamaProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10032
10058
  } else {
10033
10059
  this.superAgentClient = new OpenAICompatibleProvider(effectiveApiKey, effectiveBaseURL || "", effectiveModel, activeProviderId);
10034
10060
  }
@@ -10151,6 +10177,10 @@ Current working directory: ${process.cwd()}`
10151
10177
  this.superAgentClient = new GeminiProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10152
10178
  } else if (providerType === "grok") {
10153
10179
  this.superAgentClient = new GrokProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10180
+ } else if (providerType === "deepseek") {
10181
+ this.superAgentClient = new DeepSeekProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10182
+ } else if (providerType === "ollama") {
10183
+ this.superAgentClient = new OllamaProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
10154
10184
  } else {
10155
10185
  this.superAgentClient = new OpenAICompatibleProvider(effectiveApiKey, effectiveBaseURL || "", effectiveModel, activeProviderId);
10156
10186
  }
@@ -10839,6 +10869,7 @@ function MCPStatus({}) {
10839
10869
  }
10840
10870
 
10841
10871
  // src/ui/components/chat-input.tsx
10872
+ import { useEffect as useEffect4, useState as useState8 } from "react";
10842
10873
  import { Box as Box14, Text as Text14 } from "ink";
10843
10874
  import { jsxDEV as jsxDEV15, Fragment as Fragment3 } from "react/jsx-dev-runtime";
10844
10875
  function ChatInput({
@@ -10847,6 +10878,17 @@ function ChatInput({
10847
10878
  isProcessing,
10848
10879
  isStreaming
10849
10880
  }) {
10881
+ const [blink, setBlink] = useState8(true);
10882
+ useEffect4(() => {
10883
+ if (isProcessing || isStreaming) {
10884
+ setBlink(false);
10885
+ return;
10886
+ }
10887
+ const interval = setInterval(() => {
10888
+ setBlink((prev) => !prev);
10889
+ }, 530);
10890
+ return () => clearInterval(interval);
10891
+ }, [isProcessing, isStreaming]);
10850
10892
  const beforeCursor = input.slice(0, cursorPosition);
10851
10893
  const afterCursor = input.slice(cursorPosition);
10852
10894
  const lines = input.split(`
@@ -10894,8 +10936,8 @@ function ChatInput({
10894
10936
  children: [
10895
10937
  beforeCursorInLine,
10896
10938
  showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
10897
- backgroundColor: "white",
10898
- color: "black",
10939
+ backgroundColor: blink ? "white" : undefined,
10940
+ color: blink ? "black" : "white",
10899
10941
  children: cursorChar2
10900
10942
  }, undefined, false, undefined, this),
10901
10943
  !showCursor && cursorChar2 !== " " && cursorChar2,
@@ -10945,8 +10987,8 @@ function ChatInput({
10945
10987
  children: placeholderText
10946
10988
  }, undefined, false, undefined, this),
10947
10989
  showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
10948
- backgroundColor: "white",
10949
- color: "black",
10990
+ backgroundColor: blink ? "white" : undefined,
10991
+ color: blink ? "black" : "white",
10950
10992
  children: " "
10951
10993
  }, undefined, false, undefined, this)
10952
10994
  ]
@@ -10954,8 +10996,8 @@ function ChatInput({
10954
10996
  children: [
10955
10997
  beforeCursor,
10956
10998
  showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
10957
- backgroundColor: "white",
10958
- color: "black",
10999
+ backgroundColor: blink ? "white" : undefined,
11000
+ color: blink ? "black" : "white",
10959
11001
  children: cursorChar
10960
11002
  }, undefined, false, undefined, this),
10961
11003
  !showCursor && cursorChar !== " " && cursorChar,
@@ -10969,7 +11011,7 @@ function ChatInput({
10969
11011
 
10970
11012
  // src/ui/components/statusbar.tsx
10971
11013
  init_settings_manager();
10972
- import { useEffect as useEffect4, useState as useState8 } from "react";
11014
+ import { useEffect as useEffect5, useState as useState9 } from "react";
10973
11015
  import { Box as Box15, Text as Text15 } from "ink";
10974
11016
  import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
10975
11017
  function StatusBar({
@@ -10979,16 +11021,16 @@ function StatusBar({
10979
11021
  tokenCount = 0,
10980
11022
  contextSize = 0
10981
11023
  }) {
10982
- const [config, setConfig] = useState8(getSettingsManager().getEffectiveSettings().ui.statusbar_config);
10983
- const [gitStatus, setGitStatus] = useState8(null);
10984
- const [systemStats, setSystemStats] = useState8(null);
10985
- useEffect4(() => {
11024
+ const [config, setConfig] = useState9(getSettingsManager().getEffectiveSettings().ui.statusbar_config);
11025
+ const [gitStatus, setGitStatus] = useState9(null);
11026
+ const [systemStats, setSystemStats] = useState9(null);
11027
+ useEffect5(() => {
10986
11028
  const settings = getSettingsManager().getEffectiveSettings();
10987
11029
  if (settings.ui.statusbar_config) {
10988
11030
  setConfig(settings.ui.statusbar_config);
10989
11031
  }
10990
11032
  }, []);
10991
- useEffect4(() => {
11033
+ useEffect5(() => {
10992
11034
  if (config?.show_git_status) {
10993
11035
  fetchGitStatus();
10994
11036
  }
@@ -11201,14 +11243,14 @@ function ChatInterfaceWithAgent({
11201
11243
  resumeSession,
11202
11244
  debugMode
11203
11245
  }) {
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);
11246
+ const [chatHistory, setChatHistory] = useState10([]);
11247
+ const [isProcessing, setIsProcessing] = useState10(false);
11248
+ const [processingTime, setProcessingTime] = useState10(0);
11249
+ const [tokenCount, setTokenCount] = useState10(0);
11250
+ const [isStreaming, setIsStreaming] = useState10(false);
11251
+ const [confirmationOptions, setConfirmationOptions] = useState10(null);
11252
+ const [toolCallsCount, setToolCallsCount] = useState10(0);
11253
+ const [showStatusBar, setShowStatusBar] = useState10(false);
11212
11254
  const scrollRef = useRef2();
11213
11255
  const processingStartTime = useRef2(0);
11214
11256
  const confirmationService = ConfirmationService.getInstance();
@@ -11246,7 +11288,7 @@ function ChatInterfaceWithAgent({
11246
11288
  isStreaming,
11247
11289
  isConfirmationActive: !!confirmationOptions
11248
11290
  });
11249
- useEffect5(() => {
11291
+ useEffect6(() => {
11250
11292
  const isWindows = process.platform === "win32";
11251
11293
  const isPowerShell = process.env.ComSpec?.toLowerCase().includes("powershell") || process.env.PSModulePath !== undefined;
11252
11294
  if (!isWindows || !isPowerShell) {
@@ -11272,7 +11314,7 @@ function ChatInterfaceWithAgent({
11272
11314
  }
11273
11315
  setChatHistory([]);
11274
11316
  }, [debugMode]);
11275
- useEffect5(() => {
11317
+ useEffect6(() => {
11276
11318
  if (resumeSession) {
11277
11319
  const logger = getLogger();
11278
11320
  logger.debug("Resuming previous session...");
@@ -11294,23 +11336,23 @@ function ChatInterfaceWithAgent({
11294
11336
  });
11295
11337
  }
11296
11338
  }, [resumeSession]);
11297
- useEffect5(() => {
11339
+ useEffect6(() => {
11298
11340
  const { getSettingsManager: getSettingsManager2 } = (init_settings_manager(), __toCommonJS(exports_settings_manager));
11299
11341
  const manager = getSettingsManager2();
11300
11342
  const settings = manager.getEffectiveSettings();
11301
11343
  setShowStatusBar(settings.ui.show_statusbar || false);
11302
11344
  }, []);
11303
- useEffect5(() => {
11345
+ useEffect6(() => {
11304
11346
  const count = chatHistory.filter((entry) => entry.type === "tool_call" || entry.type === "tool_result").length;
11305
11347
  setToolCallsCount(count);
11306
11348
  }, [chatHistory]);
11307
- useEffect5(() => {
11349
+ useEffect6(() => {
11308
11350
  if (scrollRef.current && chatHistory.length > 0) {
11309
11351
  const logger = getLogger();
11310
11352
  logger.debug("Chat history updated, ensuring scroll to bottom");
11311
11353
  }
11312
11354
  }, [chatHistory]);
11313
- useEffect5(() => {
11355
+ useEffect6(() => {
11314
11356
  if (initialMessage && agent) {
11315
11357
  const userEntry = {
11316
11358
  type: "user",
@@ -11388,7 +11430,7 @@ function ChatInterfaceWithAgent({
11388
11430
  processInitialMessage();
11389
11431
  }
11390
11432
  }, [initialMessage, agent]);
11391
- useEffect5(() => {
11433
+ useEffect6(() => {
11392
11434
  const handleConfirmationRequest = (options) => {
11393
11435
  setConfirmationOptions(options);
11394
11436
  };
@@ -11397,7 +11439,7 @@ function ChatInterfaceWithAgent({
11397
11439
  confirmationService.off("confirmation-requested", handleConfirmationRequest);
11398
11440
  };
11399
11441
  }, [confirmationService]);
11400
- useEffect5(() => {
11442
+ useEffect6(() => {
11401
11443
  if (!isProcessing && !isStreaming) {
11402
11444
  setProcessingTime(0);
11403
11445
  return;
@@ -11489,7 +11531,7 @@ function ChatInterfaceWithAgent({
11489
11531
  entries: chatHistory,
11490
11532
  isConfirmationActive: !!confirmationOptions
11491
11533
  }, undefined, false, undefined, this)
11492
- }, chatHistory.length > 0 ? `chat-history-${chatHistory[chatHistory.length - 1]?.timestamp.getTime()}` : "chat-history-empty", false, undefined, this),
11534
+ }, undefined, false, undefined, this),
11493
11535
  confirmationOptions && /* @__PURE__ */ jsxDEV17(ConfirmationDialog, {
11494
11536
  operation: confirmationOptions.operation,
11495
11537
  filename: confirmationOptions.filename,
@@ -11685,7 +11727,7 @@ function ChatInterface({
11685
11727
  resumeSession,
11686
11728
  debugMode
11687
11729
  }) {
11688
- const [currentAgent, setCurrentAgent] = useState9(agent || null);
11730
+ const [currentAgent, setCurrentAgent] = useState10(agent || null);
11689
11731
  const handleApiKeySet = (newAgent) => {
11690
11732
  setCurrentAgent(newAgent);
11691
11733
  };
@@ -12869,7 +12911,7 @@ var import__package = __toESM(require_package(), 1);
12869
12911
  import { program } from "commander";
12870
12912
  import * as dotenv from "dotenv";
12871
12913
  import { render } from "ink";
12872
- import React4 from "react";
12914
+ import React5 from "react";
12873
12915
  dotenv.config();
12874
12916
  process.on("SIGTERM", () => {
12875
12917
  if (process.stdin.isTTY && process.stdin.setRawMode) {
@@ -13124,7 +13166,7 @@ program.name("super-agent").description("A conversational AI CLI tool powered by
13124
13166
  }
13125
13167
  }).catch(() => {});
13126
13168
  const initialMessage = Array.isArray(message) ? message.join(" ") : message;
13127
- render(React4.createElement(ChatInterface, {
13169
+ render(React5.createElement(ChatInterface, {
13128
13170
  agent,
13129
13171
  initialMessage,
13130
13172
  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.83",
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",