@ww_nero/mini-cli 1.0.80 → 1.0.81

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/package.json +1 -1
  2. package/src/config.js +4 -49
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ww_nero/mini-cli",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "description": "极简的 AI 命令行助手",
5
5
  "bin": {
6
6
  "mini": "bin/mini.js"
package/src/config.js CHANGED
@@ -5,11 +5,8 @@ const path = require('path');
5
5
  const CONFIG_DIR = path.join(os.homedir(), '.mini');
6
6
  const FILE_NAMES = {
7
7
  chat: 'chat.json',
8
- commit: 'commit.json',
9
8
  mcp: 'mcp.json',
10
- settings: 'settings.json',
11
- worktree: 'worktree.json',
12
- mini: 'MINI.md'
9
+ settings: 'settings.json'
13
10
  };
14
11
 
15
12
  const DEFAULT_TOOL_RESPONSE_MAX_TOKENS = 65536;
@@ -46,43 +43,16 @@ const detectCommandPath = () => {
46
43
 
47
44
  const DEFAULT_CHAT_ENDPOINTS = [
48
45
  {
49
- baseUrl: 'https://generativelanguage.googleapis.com/v1beta/openai',
46
+ baseUrl: 'https://api.openai.com/v1',
50
47
  key: 'your-api-key',
51
- model: 'gemini-flash-latest',
52
- alias: 'Gemini Flash',
53
- name: 'gemini-flash-latest',
54
- options: {
55
- extra_body: {
56
- google: {
57
- thinking_config: {
58
- thinking_budget: -1,
59
- include_thoughts: false
60
- }
61
- }
62
- }
63
- }
48
+ model: 'gpt-5',
49
+ alias: 'gpt-5'
64
50
  }
65
51
  ];
66
52
 
67
- const DEFAULT_COMMIT_MODEL = {
68
- baseUrl: 'https://generativelanguage.googleapis.com/v1beta/openai',
69
- key: 'your-api-key',
70
- model: 'gemini-flash-latest',
71
- options: {
72
- reasoning_effort: 'none'
73
- }
74
- };
75
-
76
- const DEFAULT_WORKTREE_COMMANDS = [
77
- { base: 'codex', prompt: 'codex --full-auto {prompt}', resume: 'codex --full-auto resume' },
78
- { base: 'claude', prompt: 'claude --permission-mode acceptEdits {prompt}', resume: 'claude --permission-mode acceptEdits --continue' },
79
- { base: 'gemini', prompt: 'gemini -m pro --approval-mode=auto_edit -i {prompt}', resume: 'gemini -m pro --approval-mode=auto_edit --resume' }
80
- ];
81
-
82
53
  const DEFAULT_SETTINGS = {
83
54
  mcpServers: {},
84
55
  tools: {},
85
- commands: [],
86
56
  maxToolTokens: DEFAULT_TOOL_RESPONSE_MAX_TOKENS,
87
57
  compactTokenThreshold: DEFAULT_COMPACT_TOKEN_THRESHOLD,
88
58
  mcpToolTimeout: DEFAULT_MCP_TOOL_TIMEOUT_MS,
@@ -92,8 +62,6 @@ const DEFAULT_SETTINGS = {
92
62
  largeFileLineThreshold: DEFAULT_LARGE_FILE_LINE_THRESHOLD
93
63
  };
94
64
 
95
- const DEFAULT_MINI_CONTENT = '# 在此填写全局系统指令。\n';
96
-
97
65
  class ConfigError extends Error {
98
66
  constructor(message, configPath) {
99
67
  super(message);
@@ -154,10 +122,6 @@ const ensureConfigFiles = () => {
154
122
  createdFiles.push(FILE_NAMES.chat);
155
123
  }
156
124
 
157
- if (ensureFile(getConfigPath('commit'), { model: DEFAULT_COMMIT_MODEL })) {
158
- createdFiles.push(FILE_NAMES.commit);
159
- }
160
-
161
125
  if (ensureFile(getConfigPath('mcp'), { mcpServers: {} })) {
162
126
  createdFiles.push(FILE_NAMES.mcp);
163
127
  }
@@ -166,14 +130,6 @@ const ensureConfigFiles = () => {
166
130
  createdFiles.push(FILE_NAMES.settings);
167
131
  }
168
132
 
169
- if (ensureFile(getConfigPath('worktree'), { commands: DEFAULT_WORKTREE_COMMANDS })) {
170
- createdFiles.push(FILE_NAMES.worktree);
171
- }
172
-
173
- if (ensureFile(getConfigPath('mini'), DEFAULT_MINI_CONTENT)) {
174
- createdFiles.push(FILE_NAMES.mini);
175
- }
176
-
177
133
  return { configDir: CONFIG_DIR, createdFiles };
178
134
  };
179
135
 
@@ -332,7 +288,6 @@ const loadSettings = ({ defaultTools = [] } = {}) => {
332
288
 
333
289
  return defaultTools.filter((name) => toolConfig[name] !== false);
334
290
  })(),
335
- commands: ensureArrayOfStrings(parsed.commands),
336
291
  commandPath: detectCommandPath(),
337
292
  maxToolTokens: normalizePositiveInteger(
338
293
  parsed.maxToolTokens,