autohand-cli 0.7.3 → 0.7.4

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.
@@ -3,7 +3,7 @@
3
3
  var _chunkREPKBECDcjs = require('./chunk-REPKBECD.cjs');
4
4
 
5
5
 
6
- var _chunkSXUZ3CX3cjs = require('./chunk-SXUZ3CX3.cjs');
6
+ var _chunkQMVTT55Ycjs = require('./chunk-QMVTT55Y.cjs');
7
7
 
8
8
 
9
9
  var _chunk3HPUOQJNcjs = require('./chunk-3HPUOQJN.cjs');
@@ -106,7 +106,7 @@ async function login(ctx) {
106
106
  expiresAt
107
107
  }
108
108
  };
109
- await _chunkSXUZ3CX3cjs.saveConfig.call(void 0, updatedConfig);
109
+ await _chunkQMVTT55Ycjs.saveConfig.call(void 0, updatedConfig);
110
110
  console.log();
111
111
  console.log(_chalk2.default.green("Login successful!"));
112
112
  console.log(_chalk2.default.cyan(`Welcome, ${pollResult.user.name || pollResult.user.email}!`));
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-CHQMK2ZG.js";
4
4
  import {
5
5
  saveConfig
6
- } from "./chunk-B2BPL6IL.js";
6
+ } from "./chunk-PVM5I5WI.js";
7
7
  import {
8
8
  safePrompt
9
9
  } from "./chunk-7BYSXAKS.js";
@@ -3,7 +3,7 @@
3
3
  var _chunkREPKBECDcjs = require('./chunk-REPKBECD.cjs');
4
4
 
5
5
 
6
- var _chunkSXUZ3CX3cjs = require('./chunk-SXUZ3CX3.cjs');
6
+ var _chunkQMVTT55Ycjs = require('./chunk-QMVTT55Y.cjs');
7
7
 
8
8
 
9
9
  var _chunk3HPUOQJNcjs = require('./chunk-3HPUOQJN.cjs');
@@ -42,7 +42,7 @@ async function logout(ctx) {
42
42
  ...config,
43
43
  auth: void 0
44
44
  };
45
- await _chunkSXUZ3CX3cjs.saveConfig.call(void 0, updatedConfig);
45
+ await _chunkQMVTT55Ycjs.saveConfig.call(void 0, updatedConfig);
46
46
  console.log();
47
47
  console.log(_chalk2.default.green("Successfully logged out."));
48
48
  console.log(_chalk2.default.gray("Your local session has been cleared."));
@@ -5,7 +5,7 @@ import readline from "readline";
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "autohand-cli",
8
- version: "0.7.3",
8
+ version: "0.7.4",
9
9
  licenses: "SEE LICENSE IN LICENSE",
10
10
  description: "Autohand interactive coding agent CLI powered by LLMs.",
11
11
  repository: {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-CHQMK2ZG.js";
4
4
  import {
5
5
  saveConfig
6
- } from "./chunk-B2BPL6IL.js";
6
+ } from "./chunk-PVM5I5WI.js";
7
7
  import {
8
8
  safePrompt
9
9
  } from "./chunk-7BYSXAKS.js";
@@ -5,7 +5,7 @@ import {
5
5
  isThemeInitialized,
6
6
  listAvailableThemes,
7
7
  saveConfig
8
- } from "./chunk-B2BPL6IL.js";
8
+ } from "./chunk-PVM5I5WI.js";
9
9
 
10
10
  // src/commands/theme.ts
11
11
  import chalk from "chalk";
@@ -5,18 +5,18 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkSXUZ3CX3cjs = require('./chunk-SXUZ3CX3.cjs');
8
+ var _chunkQMVTT55Ycjs = require('./chunk-QMVTT55Y.cjs');
9
9
 
10
10
  // src/commands/theme.ts
11
11
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
12
12
  var _enquirer = require('enquirer'); var _enquirer2 = _interopRequireDefault(_enquirer);
13
13
  async function theme(ctx) {
14
14
  const { Select } = _enquirer2.default;
15
- const themes = _chunkSXUZ3CX3cjs.listAvailableThemes.call(void 0, );
16
- const currentTheme = _chunkSXUZ3CX3cjs.isThemeInitialized.call(void 0, ) ? _chunkSXUZ3CX3cjs.getTheme.call(void 0, ).name : _optionalChain([ctx, 'access', _ => _.config, 'access', _2 => _2.ui, 'optionalAccess', _3 => _3.theme]) || "dark";
15
+ const themes = _chunkQMVTT55Ycjs.listAvailableThemes.call(void 0, );
16
+ const currentTheme = _chunkQMVTT55Ycjs.isThemeInitialized.call(void 0, ) ? _chunkQMVTT55Ycjs.getTheme.call(void 0, ).name : _optionalChain([ctx, 'access', _ => _.config, 'access', _2 => _2.ui, 'optionalAccess', _3 => _3.theme]) || "dark";
17
17
  console.log(_chalk2.default.cyan("\n\u{1F3A8} Theme Selection\n"));
18
18
  console.log(_chalk2.default.gray(`Current theme: ${_chalk2.default.white(currentTheme)}`));
19
- console.log(_chalk2.default.gray(`Custom themes location: ${_chunkSXUZ3CX3cjs.CUSTOM_THEMES_DIR}
19
+ console.log(_chalk2.default.gray(`Custom themes location: ${_chunkQMVTT55Ycjs.CUSTOM_THEMES_DIR}
20
20
  `));
21
21
  const choices = themes.map((name) => ({
22
22
  name,
@@ -35,12 +35,12 @@ async function theme(ctx) {
35
35
  console.log(_chalk2.default.gray("\nNo change made."));
36
36
  return null;
37
37
  }
38
- _chunkSXUZ3CX3cjs.initTheme.call(void 0, selected);
38
+ _chunkQMVTT55Ycjs.initTheme.call(void 0, selected);
39
39
  ctx.config.ui = { ...ctx.config.ui, theme: selected };
40
- await _chunkSXUZ3CX3cjs.saveConfig.call(void 0, ctx.config);
40
+ await _chunkQMVTT55Ycjs.saveConfig.call(void 0, ctx.config);
41
41
  console.log(_chalk2.default.green(`
42
42
  \u2713 Theme changed to '${selected}'`));
43
- const newTheme = _chunkSXUZ3CX3cjs.getTheme.call(void 0, );
43
+ const newTheme = _chunkQMVTT55Ycjs.getTheme.call(void 0, );
44
44
  console.log("\nTheme preview:");
45
45
  console.log(` ${newTheme.fg("accent", "\u25CF accent")} ${newTheme.fg("success", "\u25CF success")} ${newTheme.fg("error", "\u25CF error")} ${newTheme.fg("warning", "\u25CF warning")}`);
46
46
  console.log(` ${newTheme.fg("muted", "\u25CF muted")} ${newTheme.fg("dim", "\u25CF dim")} ${newTheme.fg("text", "\u25CF text")}`);
@@ -52,15 +52,15 @@ async function theme(ctx) {
52
52
  }
53
53
  }
54
54
  async function themeInfo() {
55
- if (!_chunkSXUZ3CX3cjs.isThemeInitialized.call(void 0, )) {
55
+ if (!_chunkQMVTT55Ycjs.isThemeInitialized.call(void 0, )) {
56
56
  console.log(_chalk2.default.yellow("Theme not initialized."));
57
57
  return null;
58
58
  }
59
- const currentTheme = _chunkSXUZ3CX3cjs.getTheme.call(void 0, );
59
+ const currentTheme = _chunkQMVTT55Ycjs.getTheme.call(void 0, );
60
60
  console.log(_chalk2.default.cyan("\n\u{1F3A8} Current Theme Info\n"));
61
61
  console.log(_chalk2.default.gray(`Name: ${_chalk2.default.white(currentTheme.name)}`));
62
62
  console.log(_chalk2.default.gray(`Color mode: ${_chalk2.default.white(currentTheme.getColorMode())}`));
63
- console.log(_chalk2.default.gray(`Custom themes dir: ${_chunkSXUZ3CX3cjs.CUSTOM_THEMES_DIR}`));
63
+ console.log(_chalk2.default.gray(`Custom themes dir: ${_chunkQMVTT55Ycjs.CUSTOM_THEMES_DIR}`));
64
64
  console.log();
65
65
  console.log("Color preview:");
66
66
  console.log(` ${currentTheme.fg("accent", "\u25CF accent")} ${currentTheme.fg("success", "\u25CF success")} ${currentTheme.fg("error", "\u25CF error")} ${currentTheme.fg("warning", "\u25CF warning")}`);
@@ -888,6 +888,7 @@ var DEFAULT_BASE_URL = "https://openrouter.ai/api/v1";
888
888
  var DEFAULT_OLLAMA_URL = "http://localhost:11434";
889
889
  var DEFAULT_LLAMACPP_URL = "http://localhost:8080";
890
890
  var DEFAULT_OPENAI_URL = "https://api.openai.com/v1";
891
+ var DEFAULT_MLX_URL = "http://localhost:8080";
891
892
  async function detectConfigPath(customPath) {
892
893
  if (customPath) {
893
894
  return path.resolve(customPath);
@@ -990,7 +991,7 @@ function normalizeConfig(config) {
990
991
  return config;
991
992
  }
992
993
  function isModernConfig(config) {
993
- return typeof config.openrouter === "object" || typeof config.ollama === "object" || typeof config.llamacpp === "object" || typeof config.openai === "object";
994
+ return typeof config.openrouter === "object" || typeof config.ollama === "object" || typeof config.llamacpp === "object" || typeof config.openai === "object" || typeof config.mlx === "object";
994
995
  }
995
996
  function isLegacyConfig(config) {
996
997
  return typeof config.api_key === "string";
@@ -1043,7 +1044,8 @@ function getProviderConfig(config, provider) {
1043
1044
  openrouter: config.openrouter,
1044
1045
  ollama: config.ollama,
1045
1046
  llamacpp: config.llamacpp,
1046
- openai: config.openai
1047
+ openai: config.openai,
1048
+ mlx: config.mlx
1047
1049
  };
1048
1050
  const entry = configByProvider[chosen];
1049
1051
  if (!entry) {
@@ -1074,6 +1076,8 @@ function defaultBaseUrlFor(provider, port) {
1074
1076
  return p ? `http://localhost:${p}` : DEFAULT_LLAMACPP_URL;
1075
1077
  case "openai":
1076
1078
  return DEFAULT_OPENAI_URL;
1079
+ case "mlx":
1080
+ return p ? `http://localhost:${p}` : DEFAULT_MLX_URL;
1077
1081
  default:
1078
1082
  return void 0;
1079
1083
  }
@@ -888,6 +888,7 @@ var DEFAULT_BASE_URL = "https://openrouter.ai/api/v1";
888
888
  var DEFAULT_OLLAMA_URL = "http://localhost:11434";
889
889
  var DEFAULT_LLAMACPP_URL = "http://localhost:8080";
890
890
  var DEFAULT_OPENAI_URL = "https://api.openai.com/v1";
891
+ var DEFAULT_MLX_URL = "http://localhost:8080";
891
892
  async function detectConfigPath(customPath) {
892
893
  if (customPath) {
893
894
  return _path2.default.resolve(customPath);
@@ -990,7 +991,7 @@ function normalizeConfig(config) {
990
991
  return config;
991
992
  }
992
993
  function isModernConfig(config) {
993
- return typeof config.openrouter === "object" || typeof config.ollama === "object" || typeof config.llamacpp === "object" || typeof config.openai === "object";
994
+ return typeof config.openrouter === "object" || typeof config.ollama === "object" || typeof config.llamacpp === "object" || typeof config.openai === "object" || typeof config.mlx === "object";
994
995
  }
995
996
  function isLegacyConfig(config) {
996
997
  return typeof config.api_key === "string";
@@ -1043,7 +1044,8 @@ function getProviderConfig(config, provider) {
1043
1044
  openrouter: config.openrouter,
1044
1045
  ollama: config.ollama,
1045
1046
  llamacpp: config.llamacpp,
1046
- openai: config.openai
1047
+ openai: config.openai,
1048
+ mlx: config.mlx
1047
1049
  };
1048
1050
  const entry = configByProvider[chosen];
1049
1051
  if (!entry) {
@@ -1074,6 +1076,8 @@ function defaultBaseUrlFor(provider, port) {
1074
1076
  return p ? `http://localhost:${p}` : DEFAULT_LLAMACPP_URL;
1075
1077
  case "openai":
1076
1078
  return DEFAULT_OPENAI_URL;
1079
+ case "mlx":
1080
+ return p ? `http://localhost:${p}` : DEFAULT_MLX_URL;
1077
1081
  default:
1078
1082
  return void 0;
1079
1083
  }
@@ -5,7 +5,7 @@ var _readline = require('readline'); var _readline2 = _interopRequireDefault(_re
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "autohand-cli",
8
- version: "0.7.3",
8
+ version: "0.7.4",
9
9
  licenses: "SEE LICENSE IN LICENSE",
10
10
  description: "Autohand interactive coding agent CLI powered by LLMs.",
11
11
  repository: {