@involvex/super-agent-cli 0.0.64 → 0.0.67

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
@@ -978,7 +978,7 @@ var init_session_manager = __esm(() => {
978
978
  var require_package = __commonJS((exports, module) => {
979
979
  module.exports = {
980
980
  name: "@involvex/super-agent-cli",
981
- version: "0.0.64",
981
+ version: "0.0.67",
982
982
  description: "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
983
983
  keywords: [
984
984
  "cli",
@@ -3095,31 +3095,50 @@ function useInputHandler({
3095
3095
  useEffect(() => {
3096
3096
  handleInputChange(input);
3097
3097
  }, [input]);
3098
- const commandSuggestions = [
3099
- { command: "/help", description: "Show help information" },
3100
- { command: "/clear", description: "Clear chat history" },
3101
- { command: "/models", description: "Switch Super Agent Model" },
3102
- { command: "/config", description: "View or edit configuration" },
3103
- { command: "/provider", description: "Manage AI providers" },
3104
- { command: "/chat save <name>", description: "Save current chat" },
3105
- { command: "/chat load <name>", description: "Load a saved chat" },
3106
- { command: "/chat list", description: "List saved chats" },
3107
- { command: "/chat delete <name>", description: "Delete a saved chat" },
3108
- {
3109
- command: "/mcp <action>",
3110
- description: "Manage MCP servers"
3111
- },
3112
- {
3113
- command: "/plugin <action>",
3114
- description: "Manage plugins (list, install, remove)"
3115
- },
3116
- { command: "/commit-and-push", description: "AI commit & push to remote" },
3117
- {
3118
- command: "/import <type> <source>",
3119
- description: "Import resources (agents, skills, hooks)"
3120
- },
3121
- { command: "/exit", description: "Exit the application" }
3122
- ];
3098
+ const commandSuggestions = useMemo2(() => {
3099
+ const baseCommands = [
3100
+ { command: "/help", description: "Show help information" },
3101
+ { command: "/clear", description: "Clear chat history" },
3102
+ { command: "/doctor", description: "Check status & connection" },
3103
+ { command: "/models", description: "Switch Super Agent Model" },
3104
+ { command: "/config", description: "View or edit configuration" },
3105
+ { command: "/commands", description: "Manage custom commands" },
3106
+ { command: "/provider", description: "Manage AI providers" },
3107
+ { command: "/chat save <name>", description: "Save current chat" },
3108
+ { command: "/chat load <name>", description: "Load a saved chat" },
3109
+ { command: "/chat list", description: "List saved chats" },
3110
+ { command: "/chat delete <name>", description: "Delete a saved chat" },
3111
+ { command: "/skills", description: "Manage AI skills" },
3112
+ { command: "/agents", description: "Manage AI agents" },
3113
+ { command: "/import", description: "Import from other AI assistants" },
3114
+ { command: "/index", description: "Index current directory" },
3115
+ {
3116
+ command: "/mcp <action>",
3117
+ description: "Manage MCP servers"
3118
+ },
3119
+ {
3120
+ command: "/plugin <action>",
3121
+ description: "Manage plugins (list, install, remove)"
3122
+ },
3123
+ {
3124
+ command: "/commit-and-push",
3125
+ description: "AI commit & push to remote"
3126
+ },
3127
+ {
3128
+ command: "/import <type> <source>",
3129
+ description: "Import resources (agents, skills, hooks)"
3130
+ },
3131
+ { command: "/exit", description: "Exit the application" }
3132
+ ];
3133
+ const manager = getSettingsManager();
3134
+ const settings = manager.loadUserSettings();
3135
+ const customCommands = settings.custom_commands || {};
3136
+ const customSuggestions = Object.keys(customCommands).map((name) => ({
3137
+ command: `/${name}`,
3138
+ description: customCommands[name]
3139
+ }));
3140
+ return [...baseCommands, ...customSuggestions];
3141
+ }, []);
3123
3142
  const [activeProvider, setActiveProvider] = useState3(() => {
3124
3143
  return getSettingsManager().loadUserSettings().active_provider;
3125
3144
  });
@@ -3171,9 +3190,11 @@ function useInputHandler({
3171
3190
  Built-in Commands:
3172
3191
  /clear - Clear chat history
3173
3192
  /help - Show this help
3193
+ /doctor - Check system health & connection
3174
3194
  /models - Switch between available models
3175
3195
  /config - View current configuration
3176
3196
  /provider - List or switch AI providers
3197
+ /commands - Manage custom slash commands
3177
3198
  /exit - Exit application
3178
3199
  exit, quit - Exit application
3179
3200
 
@@ -3190,6 +3211,7 @@ Config Commands:
3190
3211
  /config - View current active configuration
3191
3212
  /provider - List configured providers
3192
3213
  /provider use <id> - Switch active AI provider
3214
+ /provider set-account <id> <acc_id> - Set account ID (e.g. workers-ai)
3193
3215
  /model set <id> - Set active model for current provider
3194
3216
  `,
3195
3217
  timestamp: new Date
@@ -3257,14 +3279,95 @@ Config Commands:
3257
3279
  return true;
3258
3280
  }
3259
3281
  if (trimmedInput.startsWith("/commands ")) {
3260
- setChatHistory((prev) => [
3261
- ...prev,
3262
- {
3263
- type: "assistant",
3264
- content: "\uD83D\uDEA7 Custom commands support implies storing them. Feature placeholder.",
3265
- timestamp: new Date
3282
+ const args = trimmedInput.split(" ");
3283
+ const action = args[1];
3284
+ const manager = getSettingsManager();
3285
+ const settings = manager.loadUserSettings();
3286
+ const customCommands = settings.custom_commands || {};
3287
+ if (action === "add") {
3288
+ const name = args[2];
3289
+ const prompt = args.slice(3).join(" ");
3290
+ if (!name || !prompt) {
3291
+ setChatHistory((prev) => [
3292
+ ...prev,
3293
+ {
3294
+ type: "assistant",
3295
+ content: "❌ Usage: /commands add <name> <prompt>",
3296
+ timestamp: new Date
3297
+ }
3298
+ ]);
3299
+ clearInput();
3300
+ return true;
3266
3301
  }
3267
- ]);
3302
+ const newCommands = { ...customCommands, [name]: prompt };
3303
+ manager.updateUserSetting("custom_commands", newCommands);
3304
+ setChatHistory((prev) => [
3305
+ ...prev,
3306
+ {
3307
+ type: "assistant",
3308
+ content: `✅ Custom command '/${name}' created.`,
3309
+ timestamp: new Date
3310
+ }
3311
+ ]);
3312
+ } else if (action === "remove") {
3313
+ const name = args[2];
3314
+ if (!name || !customCommands[name]) {
3315
+ setChatHistory((prev) => [
3316
+ ...prev,
3317
+ {
3318
+ type: "assistant",
3319
+ content: `❌ Command '/${name}' not found.`,
3320
+ timestamp: new Date
3321
+ }
3322
+ ]);
3323
+ clearInput();
3324
+ return true;
3325
+ }
3326
+ const newCommands = { ...customCommands };
3327
+ delete newCommands[name];
3328
+ manager.updateUserSetting("custom_commands", newCommands);
3329
+ setChatHistory((prev) => [
3330
+ ...prev,
3331
+ {
3332
+ type: "assistant",
3333
+ content: `✅ Custom command '/${name}' removed.`,
3334
+ timestamp: new Date
3335
+ }
3336
+ ]);
3337
+ } else if (action === "list") {
3338
+ const commandList = Object.keys(customCommands);
3339
+ if (commandList.length === 0) {
3340
+ setChatHistory((prev) => [
3341
+ ...prev,
3342
+ {
3343
+ type: "assistant",
3344
+ content: "No custom commands defined. Use /commands add to create one.",
3345
+ timestamp: new Date
3346
+ }
3347
+ ]);
3348
+ } else {
3349
+ const list = commandList.map((name) => ` /${name} - ${customCommands[name]}`).join(`
3350
+ `);
3351
+ setChatHistory((prev) => [
3352
+ ...prev,
3353
+ {
3354
+ type: "assistant",
3355
+ content: `Custom Commands:
3356
+ ${list}`,
3357
+ timestamp: new Date
3358
+ }
3359
+ ]);
3360
+ }
3361
+ } else {
3362
+ setChatHistory((prev) => [
3363
+ ...prev,
3364
+ {
3365
+ type: "assistant",
3366
+ content: "❌ Usage: /commands <add|remove|list> [name] [prompt]",
3367
+ timestamp: new Date
3368
+ }
3369
+ ]);
3370
+ }
3268
3371
  clearInput();
3269
3372
  return true;
3270
3373
  }
@@ -4145,6 +4248,19 @@ ${structure}
4145
4248
  } catch (e) {}
4146
4249
  }
4147
4250
  }
4251
+ if (userInput.startsWith("/")) {
4252
+ const commandName = userInput.split(" ")[0].slice(1);
4253
+ const manager = getSettingsManager();
4254
+ const settings = manager.loadUserSettings();
4255
+ const customCommands = settings.custom_commands || {};
4256
+ if (customCommands[commandName]) {
4257
+ const args = userInput.split(" ").slice(1);
4258
+ resolvedInput = customCommands[commandName];
4259
+ if (args.length > 0) {
4260
+ resolvedInput += " " + args.join(" ");
4261
+ }
4262
+ }
4263
+ }
4148
4264
  if (agentMode === "plan") {
4149
4265
  resolvedInput = `[MODE: PLAN] ${resolvedInput}`;
4150
4266
  } else if (agentMode === "debug") {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@involvex/super-agent-cli",
3
- "version": "0.0.64",
3
+ "version": "0.0.67",
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",