@x-all-in-one/coding-helper 0.3.1 → 0.3.3

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.
@@ -16,6 +16,8 @@ const OH_MY_OPENCODE_AGENTS = [
16
16
  'document-writer',
17
17
  'multimodal-looker',
18
18
  ];
19
+ // Unified output token limit for all models
20
+ const OUTPUT_TOKEN_LIMIT = 32000;
19
21
  // Default configuration
20
22
  export const OPENCODE_DEFAULT_CONFIG = {
21
23
  BASE_URL: 'https://code-api.x-aio.com/v1',
@@ -24,10 +26,10 @@ export const OPENCODE_DEFAULT_CONFIG = {
24
26
  DEFAULT_SMALL_MODEL: 'Qwen3-Coder-30B-A3B-Instruct',
25
27
  // Default limits (hardcoded for v1, will be fetched from API in future)
26
28
  DEFAULT_CONTEXT: 128000,
27
- DEFAULT_OUTPUT: 64000,
29
+ DEFAULT_OUTPUT: OUTPUT_TOKEN_LIMIT,
28
30
  // Vision model limits
29
31
  VISION_CONTEXT: 64000,
30
- VISION_OUTPUT: 32000,
32
+ VISION_OUTPUT: OUTPUT_TOKEN_LIMIT,
31
33
  };
32
34
  /**
33
35
  * OpenCode 工具实现
@@ -118,11 +120,11 @@ export class OpenCodeTool extends BaseTool {
118
120
  if (info.name && info.name !== info.id) {
119
121
  entry.name = info.name;
120
122
  }
121
- // Set limits (use API values if available, otherwise use defaults)
123
+ // Set limits (context from API, output always use unified limit)
122
124
  if (isVision) {
123
125
  entry.limit = {
124
126
  context: info.context_length || OPENCODE_DEFAULT_CONFIG.VISION_CONTEXT,
125
- output: info.max_output_tokens || OPENCODE_DEFAULT_CONFIG.VISION_OUTPUT,
127
+ output: OUTPUT_TOKEN_LIMIT,
126
128
  };
127
129
  // Add modalities for vision models
128
130
  entry.modalities = {
@@ -133,7 +135,7 @@ export class OpenCodeTool extends BaseTool {
133
135
  else {
134
136
  entry.limit = {
135
137
  context: info.context_length || OPENCODE_DEFAULT_CONFIG.DEFAULT_CONTEXT,
136
- output: info.max_output_tokens || OPENCODE_DEFAULT_CONFIG.DEFAULT_OUTPUT,
138
+ output: OUTPUT_TOKEN_LIMIT,
137
139
  };
138
140
  }
139
141
  models[info.id] = entry;
@@ -228,7 +228,7 @@ export class ToolMenu {
228
228
  actionText = i18n.t('wizard.action_refresh_config', { tool: toolRegistry.getTool(toolName)?.displayName });
229
229
  }
230
230
  else {
231
- console.log(chalk.blue(`${i18n.t('wizard.config_not_loaded')}`));
231
+ console.log(chalk.blue(`${i18n.t('wizard.config_not_loaded', { tool: toolRegistry.getTool(toolName)?.displayName })}`));
232
232
  actionText = i18n.t('wizard.action_load_config', { tool: toolRegistry.getTool(toolName)?.displayName });
233
233
  }
234
234
  console.log('');
@@ -111,7 +111,7 @@
111
111
  "current_small_model": "Small Model",
112
112
  "config_synced": "Configuration synchronized",
113
113
  "config_out_of_sync": "Configuration out of sync, refresh recommended",
114
- "config_not_loaded": "Claude Code configuration not loaded yet",
114
+ "config_not_loaded": "{{tool}} configuration not loaded yet",
115
115
  "action_refresh_config": "Configuration Refresh - (Update {{tool}}'s configuration)",
116
116
  "global_config_warning": "⚠️ Warning: You are modifying the {{tool}} global configuration. Changes will affect all workspaces",
117
117
  "global_label": "GLOBAL",
@@ -111,7 +111,7 @@
111
111
  "current_small_model": "小模型",
112
112
  "config_synced": "配置已同步",
113
113
  "config_out_of_sync": "配置不一致,建议刷新",
114
- "config_not_loaded": "Claude Code 尚未装载配置",
114
+ "config_not_loaded": "{{tool}} 尚未装载配置",
115
115
  "action_refresh_config": "配置刷新 - (更新 {{tool}} 的配置)",
116
116
  "global_config_warning": "⚠️ 注意:您正在修改 {{tool}} 全局配置,更改将影响所有工作区",
117
117
  "global_label": "全局",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@x-all-in-one/coding-helper",
3
3
  "type": "module",
4
- "version": "0.3.1",
4
+ "version": "0.3.3",
5
5
  "description": "X All In One Coding Helper",
6
6
  "author": "X.AIO",
7
7
  "homepage": "https://docs.x-aio.com/zh/docs",