@x-all-in-one/coding-helper 0.0.2 → 0.0.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.
@@ -47,6 +47,7 @@
47
47
  "welcome": "Welcome to Coding Tool Helper!",
48
48
  "privacy_note": "We value your privacy. All configurations are stored locally only.",
49
49
  "select_language": "Select interface language",
50
+ "language_set": "Language set successfully",
50
51
  "input_api_key": "Enter API key",
51
52
  "input_your_api_key": "Please input your API key here, Enter to confirm:",
52
53
  "update_api_key": "Update API key",
@@ -105,6 +106,9 @@
105
106
  "detected_config_title": "Claude Code Current Configuration",
106
107
  "chelper_config_title": "Chelper Configuration",
107
108
  "claude_code_config_title": "Claude Code Current Global Configuration",
109
+ "opencode_config_title": "OpenCode Current Global Configuration",
110
+ "current_model": "Model",
111
+ "current_small_model": "Small Model",
108
112
  "config_synced": "Configuration synchronized",
109
113
  "config_out_of_sync": "Configuration out of sync, refresh recommended",
110
114
  "config_not_loaded": "Claude Code configuration not loaded yet",
@@ -142,6 +146,9 @@
142
146
  "get_api_key_hint": "To get API Key, visit:",
143
147
  "get_api_key_link_text": "Click here to get API Key",
144
148
  "action_config_models": "Configure Models - (Select Haiku/Sonnet/Opus models)",
149
+ "action_config_models_opencode": "Configure Models - (Select Model/Small Model)",
150
+ "select_model": "Select Model (Main)",
151
+ "select_small_model": "Select Small Model (Fast/Lightweight)",
145
152
  "select_start_directory": "Select start directory",
146
153
  "start_from_current_dir": "Start from current directory",
147
154
  "start_from_custom_dir": "Enter custom directory",
@@ -47,6 +47,7 @@
47
47
  "welcome": "欢迎使用编码工具助手!",
48
48
  "privacy_note": "我们重视您的隐私,所有配置信息仅保存在本地.",
49
49
  "select_language": "请选择界面语言",
50
+ "language_set": "语言设置成功",
50
51
  "input_api_key": "输入 API Key",
51
52
  "input_your_api_key": "请在这里输入您的 API key, 回车键确认:",
52
53
  "update_api_key": "更新 API Key",
@@ -105,6 +106,9 @@
105
106
  "detected_config_title": "Claude Code 当前配置",
106
107
  "chelper_config_title": "Chelper 配置",
107
108
  "claude_code_config_title": "Claude Code 当前全局配置",
109
+ "opencode_config_title": "OpenCode 当前全局配置",
110
+ "current_model": "主模型",
111
+ "current_small_model": "小模型",
108
112
  "config_synced": "配置已同步",
109
113
  "config_out_of_sync": "配置不一致,建议刷新",
110
114
  "config_not_loaded": "Claude Code 尚未装载配置",
@@ -142,6 +146,9 @@
142
146
  "get_api_key_hint": "获取 API Key 请访问:",
143
147
  "get_api_key_link_text": "点击这里获取 API Key",
144
148
  "action_config_models": "配置模型 - (选择 Haiku/Sonnet/Opus 模型)",
149
+ "action_config_models_opencode": "配置模型 - (选择主模型/小模型)",
150
+ "select_model": "选择主模型 (默认)",
151
+ "select_small_model": "选择小模型 (快速/轻量)",
145
152
  "select_start_directory": "选择启动目录",
146
153
  "start_from_current_dir": "从当前目录启动",
147
154
  "start_from_custom_dir": "输入自定义目录",
@@ -7,7 +7,7 @@
7
7
  */
8
8
  export function stripAnsi(str) {
9
9
  // eslint-disable-next-line no-control-regex
10
- return str.replace(/\u001b\[[0-9;]*m/g, '');
10
+ return str.replace(/\u001B\[[0-9;]*m/g, '');
11
11
  }
12
12
  /**
13
13
  * Calculate the visual width of a character
@@ -20,46 +20,46 @@ function charWidth(char) {
20
20
  if (!code)
21
21
  return 0;
22
22
  // Zero-width characters
23
- if (code === 0x200b || // Zero-width space
24
- code === 0x200c || // Zero-width non-joiner
25
- code === 0x200d || // Zero-width joiner
26
- code === 0xfeff || // Zero-width no-break space
27
- (code >= 0xfe00 && code <= 0xfe0f) // Variation Selectors (emoji style selectors)
23
+ if (code === 0x200B // Zero-width space
24
+ || code === 0x200C // Zero-width non-joiner
25
+ || code === 0x200D // Zero-width joiner
26
+ || code === 0xFEFF // Zero-width no-break space
27
+ || (code >= 0xFE00 && code <= 0xFE0F) // Variation Selectors (emoji style selectors)
28
28
  ) {
29
29
  return 0;
30
30
  }
31
31
  // Emoji and symbols (rough approximation)
32
32
  // Most emoji are in these ranges and display as 2 characters wide
33
- if ((code >= 0x1f300 && code <= 0x1f9ff) || // Misc Symbols and Pictographs, Emoticons, etc.
34
- (code >= 0x2600 && code <= 0x26ff) || // Misc symbols
35
- (code >= 0x2700 && code <= 0x27bf) || // Dingbats
36
- (code >= 0x1f000 && code <= 0x1f02f) || // Mahjong Tiles, Domino Tiles
37
- (code >= 0x1f0a0 && code <= 0x1f0ff) // Playing Cards
33
+ if ((code >= 0x1F300 && code <= 0x1F9FF) // Misc Symbols and Pictographs, Emoticons, etc.
34
+ || (code >= 0x2600 && code <= 0x26FF) // Misc symbols
35
+ || (code >= 0x2700 && code <= 0x27BF) // Dingbats
36
+ || (code >= 0x1F000 && code <= 0x1F02F) // Mahjong Tiles, Domino Tiles
37
+ || (code >= 0x1F0A0 && code <= 0x1F0FF) // Playing Cards
38
38
  ) {
39
39
  return 2;
40
40
  }
41
41
  // CJK characters (Chinese, Japanese, Korean)
42
42
  // These are typically displayed as 2 characters wide
43
- if ((code >= 0x4e00 && code <= 0x9fff) || // CJK Unified Ideographs
44
- (code >= 0x3400 && code <= 0x4dbf) || // CJK Unified Ideographs Extension A
45
- (code >= 0x20000 && code <= 0x2a6df) || // CJK Unified Ideographs Extension B
46
- (code >= 0x2a700 && code <= 0x2b73f) || // CJK Unified Ideographs Extension C
47
- (code >= 0x2b740 && code <= 0x2b81f) || // CJK Unified Ideographs Extension D
48
- (code >= 0x2b820 && code <= 0x2ceaf) || // CJK Unified Ideographs Extension E
49
- (code >= 0xf900 && code <= 0xfaff) || // CJK Compatibility Ideographs
50
- (code >= 0x2f800 && code <= 0x2fa1f) || // CJK Compatibility Ideographs Supplement
51
- (code >= 0x3040 && code <= 0x309f) || // Hiragana
52
- (code >= 0x30a0 && code <= 0x30ff) || // Katakana
53
- (code >= 0xac00 && code <= 0xd7af) || // Hangul Syllables
54
- (code >= 0x1100 && code <= 0x11ff) || // Hangul Jamo
55
- (code >= 0x3130 && code <= 0x318f) || // Hangul Compatibility Jamo
56
- (code >= 0xa960 && code <= 0xa97f) || // Hangul Jamo Extended-A
57
- (code >= 0xd7b0 && code <= 0xd7ff) // Hangul Jamo Extended-B
43
+ if ((code >= 0x4E00 && code <= 0x9FFF) // CJK Unified Ideographs
44
+ || (code >= 0x3400 && code <= 0x4DBF) // CJK Unified Ideographs Extension A
45
+ || (code >= 0x20000 && code <= 0x2A6DF) // CJK Unified Ideographs Extension B
46
+ || (code >= 0x2A700 && code <= 0x2B73F) // CJK Unified Ideographs Extension C
47
+ || (code >= 0x2B740 && code <= 0x2B81F) // CJK Unified Ideographs Extension D
48
+ || (code >= 0x2B820 && code <= 0x2CEAF) // CJK Unified Ideographs Extension E
49
+ || (code >= 0xF900 && code <= 0xFAFF) // CJK Compatibility Ideographs
50
+ || (code >= 0x2F800 && code <= 0x2FA1F) // CJK Compatibility Ideographs Supplement
51
+ || (code >= 0x3040 && code <= 0x309F) // Hiragana
52
+ || (code >= 0x30A0 && code <= 0x30FF) // Katakana
53
+ || (code >= 0xAC00 && code <= 0xD7AF) // Hangul Syllables
54
+ || (code >= 0x1100 && code <= 0x11FF) // Hangul Jamo
55
+ || (code >= 0x3130 && code <= 0x318F) // Hangul Compatibility Jamo
56
+ || (code >= 0xA960 && code <= 0xA97F) // Hangul Jamo Extended-A
57
+ || (code >= 0xD7B0 && code <= 0xD7FF) // Hangul Jamo Extended-B
58
58
  ) {
59
59
  return 2;
60
60
  }
61
61
  // Fullwidth characters
62
- if (code >= 0xff00 && code <= 0xffef) {
62
+ if (code >= 0xFF00 && code <= 0xFFEF) {
63
63
  return 2;
64
64
  }
65
65
  // Default to 1 for regular ASCII and other characters
package/package.json CHANGED
@@ -1,21 +1,28 @@
1
1
  {
2
2
  "name": "@x-all-in-one/coding-helper",
3
- "version": "0.0.2",
4
- "description": "X All In One Coding Helper",
5
3
  "type": "module",
4
+ "version": "0.0.4",
5
+ "description": "X All In One Coding Helper",
6
+ "author": "X.AIO",
7
+ "homepage": "https://docs.x-aio.com/zh/docs",
8
+ "bugs": {
9
+ "url": "https://docs.x-aio.com/zh/docs"
10
+ },
11
+ "keywords": [
12
+ "cli",
13
+ "coding",
14
+ "helper",
15
+ "tools"
16
+ ],
6
17
  "main": "dist/index.js",
7
18
  "bin": {
8
19
  "coding-helper": "dist/cli.js",
9
20
  "chelper": "dist/cli.js"
10
21
  },
11
- "homepage": "https://docs.x-aio.com/zh/docs",
12
- "bugs": {
13
- "url": "https://docs.x-aio.com/zh/docs"
14
- },
15
22
  "files": [
16
- "dist",
23
+ "LICENSE",
17
24
  "README.md",
18
- "LICENSE"
25
+ "dist"
19
26
  ],
20
27
  "engines": {
21
28
  "node": ">=18.0.0"
@@ -23,13 +30,6 @@
23
30
  "publishConfig": {
24
31
  "access": "public"
25
32
  },
26
- "keywords": [
27
- "cli",
28
- "coding",
29
- "helper",
30
- "tools"
31
- ],
32
- "author": "X.AIO",
33
33
  "dependencies": {
34
34
  "chalk": "^5.3.0",
35
35
  "commander": "^12.1.0",
@@ -40,11 +40,13 @@
40
40
  "terminal-link": "^5.0.0"
41
41
  },
42
42
  "devDependencies": {
43
+ "@antfu/eslint-config": "^6.2.0",
43
44
  "@eslint/js": "^9.39.1",
44
45
  "@types/inquirer": "^9.0.7",
45
46
  "@types/js-yaml": "^4.0.9",
46
47
  "@types/node": "^24.10.1",
47
48
  "eslint": "^9.39.1",
49
+ "eslint-plugin-format": "^1.2.0",
48
50
  "globals": "^16.5.0",
49
51
  "javascript-obfuscator": "^4.1.0",
50
52
  "nodemon": "^3.1.11",
@@ -57,7 +59,6 @@
57
59
  "package": "pnpm run build",
58
60
  "dev": "tsx watch src/cli.ts",
59
61
  "start": "node dist/cli.js",
60
- "test": "echo \"Error: no test specified\" && exit 1",
61
62
  "lint": "eslint .",
62
63
  "lint:fix": "eslint . --fix",
63
64
  "release": "pnpm run build && pnpm publish"