@x-all-in-one/coding-helper 0.4.9 → 0.5.0

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.
@@ -1,2 +1,2 @@
1
1
  export * from './ccline-plugin.js';
2
- export * from './oh-my-opencode-plugin.js';
2
+ export * from './oh-my-openagent-plugin.js';
@@ -1,3 +1,3 @@
1
1
  // 插件导出
2
2
  export * from './ccline-plugin.js';
3
- export * from './oh-my-opencode-plugin.js';
3
+ export * from './oh-my-openagent-plugin.js';
@@ -0,0 +1,15 @@
1
+ import type { IPlugin } from '../tools/base-tool.js';
2
+ export declare class OhMyOpenAgentPlugin implements IPlugin {
3
+ readonly name = "oh-my-openagent";
4
+ readonly displayName = "Oh My OpenAgent";
5
+ private configPath;
6
+ constructor();
7
+ isInstalled(): boolean;
8
+ install(): Promise<void>;
9
+ load(): void;
10
+ unload(): void;
11
+ isLoaded(): boolean;
12
+ private getConfig;
13
+ private saveConfig;
14
+ }
15
+ export declare const ohMyOpenAgentPlugin: OhMyOpenAgentPlugin;
@@ -3,34 +3,25 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
3
3
  import { homedir } from 'node:os';
4
4
  import { join } from 'node:path';
5
5
  import { bunInstaller } from '../wizard/installers/bun-installer.js';
6
- /**
7
- * Oh My OpenCode 插件实现
8
- * Oh My OpenCode 是 OpenCode 的增强插件
9
- */
10
- export class OhMyOpenCodePlugin {
11
- name = 'oh-my-opencode';
12
- displayName = 'Oh My OpenCode';
6
+ export class OhMyOpenAgentPlugin {
7
+ name = 'oh-my-openagent';
8
+ displayName = 'Oh My OpenAgent';
13
9
  configPath;
14
10
  constructor() {
15
11
  this.configPath = join(homedir(), '.config', 'opencode', 'opencode.json');
16
12
  }
17
- /**
18
- * 检查 Oh My OpenCode 是否已安装
19
- * 通过检查配置文件或 plugin 数组来判断
20
- */
21
13
  isInstalled() {
22
- // 检查 oh-my-opencode 配置文件是否存在
14
+ const ohMyOpenAgentConfigPath = join(homedir(), '.config', 'opencode', 'oh-my-openagent.json');
23
15
  const ohMyOpenCodeConfigPath = join(homedir(), '.config', 'opencode', 'oh-my-opencode.json');
24
- if (existsSync(ohMyOpenCodeConfigPath)) {
16
+ if (existsSync(ohMyOpenAgentConfigPath) || existsSync(ohMyOpenCodeConfigPath)) {
25
17
  return true;
26
18
  }
27
- // 或者检查是否已在 opencode.json 的 plugin 数组中
28
19
  return this.isLoaded();
29
20
  }
30
21
  async install() {
31
22
  const hasBun = await bunInstaller.ensureBun();
32
23
  if (!hasBun) {
33
- throw new Error('Bun is required for Oh My OpenCode. Please install bun first.');
24
+ throw new Error('Bun is required for Oh My OpenAgent. Please install bun first.');
34
25
  }
35
26
  const isWindows = process.platform === 'win32';
36
27
  const bunxCommand = isWindows ? 'bunx.cmd' : 'bunx';
@@ -44,54 +35,39 @@ export class OhMyOpenCodePlugin {
44
35
  if (code === 0)
45
36
  resolve();
46
37
  else
47
- reject(new Error(`Oh My OpenCode install failed with code ${code}`));
38
+ reject(new Error(`Oh My OpenAgent install failed with code ${code}`));
48
39
  });
49
40
  child.on('error', reject);
50
41
  });
51
42
  }
52
- /**
53
- * 装载 Oh My OpenCode(添加到 OpenCode 配置)
54
- */
55
43
  load() {
56
44
  const config = this.getConfig();
57
- // 初始化 plugin 数组
58
45
  if (!config.plugin) {
59
46
  config.plugin = [];
60
47
  }
61
- // 检查是否已添加
62
- const hasPlugin = config.plugin.some((p) => typeof p === 'string' && p.startsWith('oh-my-opencode'));
48
+ const hasPlugin = config.plugin.some((p) => typeof p === 'string' && (p.startsWith('oh-my-openagent') || p.startsWith('oh-my-opencode')));
63
49
  if (!hasPlugin) {
64
- config.plugin.push('oh-my-opencode');
50
+ config.plugin.push('oh-my-openagent');
65
51
  this.saveConfig(config);
66
52
  }
67
53
  }
68
- /**
69
- * 取消装载 Oh My OpenCode(从配置中移除)
70
- */
71
54
  unload() {
72
55
  const config = this.getConfig();
73
56
  if (config.plugin && Array.isArray(config.plugin)) {
74
- config.plugin = config.plugin.filter((p) => !(typeof p === 'string' && p.startsWith('oh-my-opencode')));
75
- // 如果 plugin 为空,删除整个 plugin 数组
57
+ config.plugin = config.plugin.filter((p) => !(typeof p === 'string' && (p.startsWith('oh-my-openagent') || p.startsWith('oh-my-opencode'))));
76
58
  if (config.plugin.length === 0) {
77
59
  delete config.plugin;
78
60
  }
79
61
  this.saveConfig(config);
80
62
  }
81
63
  }
82
- /**
83
- * 检查 Oh My OpenCode 是否已装载到配置
84
- */
85
64
  isLoaded() {
86
65
  const config = this.getConfig();
87
66
  if (config.plugin && Array.isArray(config.plugin)) {
88
- return config.plugin.some((p) => typeof p === 'string' && p.startsWith('oh-my-opencode'));
67
+ return config.plugin.some((p) => typeof p === 'string' && (p.startsWith('oh-my-openagent') || p.startsWith('oh-my-opencode')));
89
68
  }
90
69
  return false;
91
70
  }
92
- /**
93
- * 读取 OpenCode 配置
94
- */
95
71
  getConfig() {
96
72
  try {
97
73
  if (existsSync(this.configPath)) {
@@ -104,12 +80,8 @@ export class OhMyOpenCodePlugin {
104
80
  }
105
81
  return {};
106
82
  }
107
- /**
108
- * 保存 OpenCode 配置
109
- */
110
83
  saveConfig(config) {
111
84
  writeFileSync(this.configPath, JSON.stringify(config, null, 2), 'utf-8');
112
85
  }
113
86
  }
114
- // 单例导出
115
- export const ohMyOpenCodePlugin = new OhMyOpenCodePlugin();
87
+ export const ohMyOpenAgentPlugin = new OhMyOpenAgentPlugin();
@@ -4,7 +4,7 @@ import inquirer from 'inquirer';
4
4
  import terminalLink from 'terminal-link';
5
5
  import { i18n } from './i18n.js';
6
6
  import { cclinePlugin } from './plugins/ccline-plugin.js';
7
- import { ohMyOpenCodePlugin } from './plugins/oh-my-opencode-plugin.js';
7
+ import { ohMyOpenAgentPlugin } from './plugins/oh-my-openagent-plugin.js';
8
8
  import { claudeCodeTool } from './tools/claude-code-tool.js';
9
9
  import { codexTool } from './tools/codex-tool.js';
10
10
  import { openCodeTool } from './tools/opencode-tool.js';
@@ -22,7 +22,7 @@ export class ToolRegistry {
22
22
  this.registerTool(codexTool);
23
23
  // 注册插件
24
24
  claudeCodeTool.registerPlugin(cclinePlugin);
25
- openCodeTool.registerPlugin(ohMyOpenCodePlugin);
25
+ openCodeTool.registerPlugin(ohMyOpenAgentPlugin);
26
26
  }
27
27
  static getInstance() {
28
28
  if (!ToolRegistry.instance) {
@@ -1,7 +1,7 @@
1
1
  import type { ModelInfo } from '../utils/fetch-models.js';
2
2
  import type { IPlugin } from './base-tool.js';
3
3
  import { BaseTool } from './base-tool.js';
4
- export interface OhMyOpenCodeConfig {
4
+ export interface OhMyOpenAgentConfig {
5
5
  $schema?: string;
6
6
  agents?: Record<string, {
7
7
  model?: string;
@@ -78,7 +78,7 @@ export declare class OpenCodeTool extends BaseTool {
78
78
  readonly command = "opencode";
79
79
  readonly installCommand = "npm install -g opencode-ai";
80
80
  readonly configPath: string;
81
- private ohMyOpenCodeConfigPath;
81
+ private ohMyOpenAgentConfigPath;
82
82
  private constructor();
83
83
  static getInstance(): OpenCodeTool;
84
84
  /**
@@ -116,25 +116,13 @@ export declare class OpenCodeTool extends BaseTool {
116
116
  * 如果 provider 不存在但有 apiKey,则创建新的 provider
117
117
  */
118
118
  syncModelsToConfig(modelInfos: ModelInfo[]): void;
119
- /**
120
- * Check if oh-my-opencode plugin is installed in opencode.json
121
- */
122
- hasOhMyOpenCodePlugin(): boolean;
123
- /**
124
- * Get oh-my-opencode config
125
- */
126
- getOhMyOpenCodeConfig(): OhMyOpenCodeConfig;
127
- /**
128
- * Save oh-my-opencode config
129
- */
130
- saveOhMyOpenCodeConfig(config: OhMyOpenCodeConfig): void;
131
- private updateOhMyOpenCodeAgents;
132
- private updateOhMyOpenCodeCategories;
133
- /**
134
- * Update oh-my-opencode agent and category models
135
- * Only updates the model field, preserves other configurations
136
- */
137
- updateOhMyOpenCodeModels(model: string, smallModel: string): void;
119
+ private resolveOhMyOpenAgentConfigPath;
120
+ hasOhMyOpenAgentPlugin(): boolean;
121
+ getOhMyOpenAgentConfig(): OhMyOpenAgentConfig;
122
+ saveOhMyOpenAgentConfig(config: OhMyOpenAgentConfig): void;
123
+ private updateOhMyOpenAgentAgents;
124
+ private updateOhMyOpenAgentCategories;
125
+ updateOhMyOpenAgentModels(model: string, smallModel: string): void;
138
126
  /**
139
127
  * 获取所有已注册的插件
140
128
  */
@@ -7,8 +7,8 @@ import { modelService } from '../model-service.js';
7
7
  import { BaseTool } from './base-tool.js';
8
8
  // X-AIO Provider ID
9
9
  const XAIO_PROVIDER_ID = 'xaio';
10
- // oh-my-opencode agent names (latest version)
11
- const OH_MY_OPENCODE_AGENTS = [
10
+ // oh-my-openagent agent names (latest version)
11
+ const OH_MY_OPENAGENT_AGENTS = [
12
12
  'sisyphus',
13
13
  'hephaestus',
14
14
  'oracle',
@@ -22,13 +22,13 @@ const OH_MY_OPENCODE_AGENTS = [
22
22
  'frontend-ui-ux-engineer',
23
23
  'document-writer',
24
24
  ];
25
- const OH_MY_OPENCODE_SMALL_AGENTS = [
25
+ const OH_MY_OPENAGENT_SMALL_AGENTS = [
26
26
  'librarian',
27
27
  'explore',
28
28
  'document-writer',
29
29
  ];
30
- // oh-my-opencode category names
31
- const OH_MY_OPENCODE_CATEGORIES = [
30
+ // oh-my-openagent category names
31
+ const OH_MY_OPENAGENT_CATEGORIES = [
32
32
  'visual-engineering',
33
33
  'ultrabrain',
34
34
  'deep',
@@ -38,7 +38,7 @@ const OH_MY_OPENCODE_CATEGORIES = [
38
38
  'unspecified-high',
39
39
  'writing',
40
40
  ];
41
- const OH_MY_OPENCODE_SMALL_CATEGORIES = [
41
+ const OH_MY_OPENAGENT_SMALL_CATEGORIES = [
42
42
  'quick',
43
43
  'unspecified-low',
44
44
  'writing',
@@ -125,15 +125,15 @@ export class OpenCodeTool extends BaseTool {
125
125
  command = 'opencode';
126
126
  installCommand = 'npm install -g opencode-ai';
127
127
  configPath;
128
- ohMyOpenCodeConfigPath;
128
+ ohMyOpenAgentConfigPath;
129
129
  constructor() {
130
130
  super();
131
131
  // OpenCode config file paths (cross-platform support)
132
132
  // - macOS/Linux: ~/.config/opencode/opencode.json
133
133
  // - Windows: %USERPROFILE%\.config\opencode\opencode.json
134
134
  this.configPath = join(homedir(), '.config', 'opencode', 'opencode.json');
135
- // oh-my-opencode config path
136
- this.ohMyOpenCodeConfigPath = join(homedir(), '.config', 'opencode', 'oh-my-opencode.json');
135
+ // oh-my-openagent config path (also detects legacy oh-my-opencode.json)
136
+ this.ohMyOpenAgentConfigPath = this.resolveOhMyOpenAgentConfigPath();
137
137
  }
138
138
  static getInstance() {
139
139
  if (!OpenCodeTool.instance) {
@@ -313,15 +313,20 @@ export class OpenCodeTool extends BaseTool {
313
313
  xaioProvider.models = deepmerge(xaioProvider.models || {}, modelsConfig);
314
314
  this.saveConfig(currentConfig);
315
315
  }
316
- // ==================== Oh My OpenCode 相关方法 ====================
317
- /**
318
- * Check if oh-my-opencode plugin is installed in opencode.json
319
- */
320
- hasOhMyOpenCodePlugin() {
316
+ // ==================== Oh My OpenAgent 相关方法 ====================
317
+ resolveOhMyOpenAgentConfigPath() {
318
+ const newConfigPath = join(homedir(), '.config', 'opencode', 'oh-my-openagent.json');
319
+ const legacyConfigPath = join(homedir(), '.config', 'opencode', 'oh-my-opencode.json');
320
+ if (existsSync(newConfigPath)) {
321
+ return newConfigPath;
322
+ }
323
+ return legacyConfigPath;
324
+ }
325
+ hasOhMyOpenAgentPlugin() {
321
326
  try {
322
327
  const config = this.getConfig();
323
328
  if (config.plugin && Array.isArray(config.plugin)) {
324
- return config.plugin.some((p) => typeof p === 'string' && p.startsWith('oh-my-opencode'));
329
+ return config.plugin.some((p) => typeof p === 'string' && (p.startsWith('oh-my-openagent') || p.startsWith('oh-my-opencode')));
325
330
  }
326
331
  return false;
327
332
  }
@@ -329,39 +334,33 @@ export class OpenCodeTool extends BaseTool {
329
334
  return false;
330
335
  }
331
336
  }
332
- /**
333
- * Get oh-my-opencode config
334
- */
335
- getOhMyOpenCodeConfig() {
337
+ getOhMyOpenAgentConfig() {
336
338
  try {
337
- if (existsSync(this.ohMyOpenCodeConfigPath)) {
338
- const content = readFileSync(this.ohMyOpenCodeConfigPath, 'utf-8');
339
+ if (existsSync(this.ohMyOpenAgentConfigPath)) {
340
+ const content = readFileSync(this.ohMyOpenAgentConfigPath, 'utf-8');
339
341
  return JSON.parse(content);
340
342
  }
341
343
  }
342
344
  catch (error) {
343
- console.warn('Failed to read oh-my-opencode config:', error);
345
+ console.warn('Failed to read oh-my-openagent config:', error);
344
346
  }
345
347
  return {};
346
348
  }
347
- /**
348
- * Save oh-my-opencode config
349
- */
350
- saveOhMyOpenCodeConfig(config) {
349
+ saveOhMyOpenAgentConfig(config) {
351
350
  try {
352
- this.ensureDir(this.ohMyOpenCodeConfigPath);
353
- writeFileSync(this.ohMyOpenCodeConfigPath, JSON.stringify(config, null, 2), 'utf-8');
351
+ this.ensureDir(this.ohMyOpenAgentConfigPath);
352
+ writeFileSync(this.ohMyOpenAgentConfigPath, JSON.stringify(config, null, 2), 'utf-8');
354
353
  }
355
354
  catch (error) {
356
- throw new Error(`Failed to save oh-my-opencode config: ${error}`);
355
+ throw new Error(`Failed to save oh-my-openagent config: ${error}`);
357
356
  }
358
357
  }
359
- updateOhMyOpenCodeAgents(config, model, smallModel) {
358
+ updateOhMyOpenAgentAgents(config, model, smallModel) {
360
359
  if (!config.agents) {
361
360
  config.agents = {};
362
361
  }
363
- for (const agentName of OH_MY_OPENCODE_AGENTS) {
364
- const targetModel = OH_MY_OPENCODE_SMALL_AGENTS.includes(agentName)
362
+ for (const agentName of OH_MY_OPENAGENT_AGENTS) {
363
+ const targetModel = OH_MY_OPENAGENT_SMALL_AGENTS.includes(agentName)
365
364
  ? smallModel
366
365
  : model;
367
366
  if (config.agents[agentName]) {
@@ -372,12 +371,12 @@ export class OpenCodeTool extends BaseTool {
372
371
  }
373
372
  }
374
373
  }
375
- updateOhMyOpenCodeCategories(config, model, smallModel) {
374
+ updateOhMyOpenAgentCategories(config, model, smallModel) {
376
375
  if (!config.categories) {
377
376
  config.categories = {};
378
377
  }
379
- for (const categoryName of OH_MY_OPENCODE_CATEGORIES) {
380
- const targetModel = OH_MY_OPENCODE_SMALL_CATEGORIES.includes(categoryName)
378
+ for (const categoryName of OH_MY_OPENAGENT_CATEGORIES) {
379
+ const targetModel = OH_MY_OPENAGENT_SMALL_CATEGORIES.includes(categoryName)
381
380
  ? smallModel
382
381
  : model;
383
382
  if (config.categories[categoryName]) {
@@ -388,20 +387,16 @@ export class OpenCodeTool extends BaseTool {
388
387
  }
389
388
  }
390
389
  }
391
- /**
392
- * Update oh-my-opencode agent and category models
393
- * Only updates the model field, preserves other configurations
394
- */
395
- updateOhMyOpenCodeModels(model, smallModel) {
390
+ updateOhMyOpenAgentModels(model, smallModel) {
396
391
  const prefixedModel = `${XAIO_PROVIDER_ID}/${model}`;
397
392
  const prefixedSmallModel = `${XAIO_PROVIDER_ID}/${smallModel}`;
398
- const currentConfig = this.getOhMyOpenCodeConfig();
399
- this.updateOhMyOpenCodeAgents(currentConfig, prefixedModel, prefixedSmallModel);
400
- this.updateOhMyOpenCodeCategories(currentConfig, prefixedModel, prefixedSmallModel);
393
+ const currentConfig = this.getOhMyOpenAgentConfig();
394
+ this.updateOhMyOpenAgentAgents(currentConfig, prefixedModel, prefixedSmallModel);
395
+ this.updateOhMyOpenAgentCategories(currentConfig, prefixedModel, prefixedSmallModel);
401
396
  if (!currentConfig.$schema) {
402
- currentConfig.$schema = 'https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json';
397
+ currentConfig.$schema = 'https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json';
403
398
  }
404
- this.saveOhMyOpenCodeConfig(currentConfig);
399
+ this.saveOhMyOpenAgentConfig(currentConfig);
405
400
  }
406
401
  // ==================== 插件管理 ====================
407
402
  /**
@@ -73,7 +73,7 @@ export class BunInstaller {
73
73
  if (this.hasBun()) {
74
74
  return true;
75
75
  }
76
- console.log(chalk.yellow(`\n${i18n.t('wizard.oh_my_opencode_requires_bun')}`));
76
+ console.log(chalk.yellow(`\n${i18n.t('wizard.oh_my_openagent_requires_bun')}`));
77
77
  // 询问用户是否安装
78
78
  const shouldInstall = await promptHelper.confirm(i18n.t('wizard.bun_install_confirm'), true);
79
79
  if (!shouldInstall) {
@@ -85,8 +85,8 @@ export class PluginMenu {
85
85
  try {
86
86
  await plugin.install();
87
87
  console.log(chalk.green(`\n✓ ${i18n.t('wizard.plugin_installed', { plugin: plugin.displayName })}`));
88
- // oh-my-opencode 安装后提示刷新模型列表
89
- if (plugin.name === 'oh-my-opencode') {
88
+ // oh-my-openagent 安装后提示刷新模型列表
89
+ if (plugin.name === 'oh-my-openagent') {
90
90
  await this.promptRefreshModels();
91
91
  }
92
92
  }
@@ -118,7 +118,7 @@ export class PluginMenu {
118
118
  if (result.success) {
119
119
  const modelConfig = openCodeTool.getModelConfig();
120
120
  if (modelConfig?.model && modelConfig.smallModel) {
121
- openCodeTool.updateOhMyOpenCodeModels(modelConfig.model, modelConfig.smallModel);
121
+ openCodeTool.updateOhMyOpenAgentModels(modelConfig.model, modelConfig.smallModel);
122
122
  }
123
123
  spinner.succeed(chalk.green(i18n.t('wizard.models_refreshed', { count: String(result.count) })));
124
124
  }
@@ -361,12 +361,12 @@ export class ToolMenu {
361
361
  openCodeSmallModel,
362
362
  codexModel,
363
363
  });
364
- // Update oh-my-opencode agent models if plugin is installed
365
- if (toolName === 'opencode' && openCodeTool.hasOhMyOpenCodePlugin()) {
366
- spinner.text = i18n.t('wizard.oh_my_opencode_detected');
367
- openCodeTool.updateOhMyOpenCodeModels(openCodeModel, openCodeSmallModel);
364
+ // Update oh-my-openagent agent models if plugin is installed
365
+ if (toolName === 'opencode' && openCodeTool.hasOhMyOpenAgentPlugin()) {
366
+ spinner.text = i18n.t('wizard.oh_my_openagent_detected');
367
+ openCodeTool.updateOhMyOpenAgentModels(openCodeModel, openCodeSmallModel);
368
368
  await new Promise(resolve => setTimeout(resolve, 500));
369
- console.log(chalk.gray(` ${i18n.t('wizard.oh_my_opencode_models_updated')}`));
369
+ console.log(chalk.gray(` ${i18n.t('wizard.oh_my_openagent_models_updated')}`));
370
370
  }
371
371
  await new Promise(resolve => setTimeout(resolve, 800));
372
372
  spinner.succeed(chalk.green(i18n.t('wizard.config_loaded', { tool: toolRegistry.getTool(toolName)?.displayName })));
@@ -165,13 +165,13 @@
165
165
  "directory_not_exist": "Directory does not exist",
166
166
  "press_ctrl_c_to_exit": "Press Ctrl+C to go back",
167
167
  "nav_go_back": "Go back",
168
- "action_install_oh_my_opencode": "Install oh-my-opencode Plugin",
169
- "oh_my_opencode_installing": "Installing oh-my-opencode...",
170
- "oh_my_opencode_installed": "oh-my-opencode installed successfully!",
171
- "oh_my_opencode_install_failed": "Failed to install oh-my-opencode",
172
- "oh_my_opencode_detected": "oh-my-opencode plugin detected, updating agent models...",
173
- "oh_my_opencode_models_updated": "oh-my-opencode agent models updated",
174
- "oh_my_opencode_requires_bun": "oh-my-opencode requires Bun to be installed",
168
+ "action_install_oh_my_openagent": "Install oh-my-openagent Plugin",
169
+ "oh_my_openagent_installing": "Installing oh-my-openagent...",
170
+ "oh_my_openagent_installed": "oh-my-openagent installed successfully!",
171
+ "oh_my_openagent_install_failed": "Failed to install oh-my-openagent",
172
+ "oh_my_openagent_detected": "oh-my-openagent plugin detected, updating agent models...",
173
+ "oh_my_openagent_models_updated": "oh-my-openagent agent models updated",
174
+ "oh_my_openagent_requires_bun": "oh-my-openagent requires Bun to be installed",
175
175
  "bun_install_hint": "Please install Bun first:",
176
176
  "bun_install_confirm": "Would you like to install Bun now?",
177
177
  "bun_installing": "Installing Bun...",
@@ -165,13 +165,13 @@
165
165
  "directory_not_exist": "目录不存在",
166
166
  "press_ctrl_c_to_exit": "按 Ctrl+C 可退出返回",
167
167
  "nav_go_back": "返回上一步",
168
- "action_install_oh_my_opencode": "安装 oh-my-opencode 插件",
169
- "oh_my_opencode_installing": "正在安装 oh-my-opencode...",
170
- "oh_my_opencode_installed": "oh-my-opencode 安装成功!",
171
- "oh_my_opencode_install_failed": "oh-my-opencode 安装失败",
172
- "oh_my_opencode_detected": "检测到 oh-my-opencode 插件,正在更新 Agent 模型...",
173
- "oh_my_opencode_models_updated": "oh-my-opencode Agent 模型已更新",
174
- "oh_my_opencode_requires_bun": "oh-my-opencode 需要先安装 Bun",
168
+ "action_install_oh_my_openagent": "安装 oh-my-openagent 插件",
169
+ "oh_my_openagent_installing": "正在安装 oh-my-openagent...",
170
+ "oh_my_openagent_installed": "oh-my-openagent 安装成功!",
171
+ "oh_my_openagent_install_failed": "oh-my-openagent 安装失败",
172
+ "oh_my_openagent_detected": "检测到 oh-my-openagent 插件,正在更新 Agent 模型...",
173
+ "oh_my_openagent_models_updated": "oh-my-openagent Agent 模型已更新",
174
+ "oh_my_openagent_requires_bun": "oh-my-openagent 需要先安装 Bun",
175
175
  "bun_install_hint": "请先安装 Bun:",
176
176
  "bun_install_confirm": "是否需要帮您安装 Bun?",
177
177
  "bun_installing": "正在安装 Bun...",
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.4.9",
4
+ "version": "0.5.0",
5
5
  "description": "X All In One Coding Helper",
6
6
  "author": "X.AIO",
7
7
  "homepage": "https://docs.x-aio.com/zh/docs",
@@ -1,38 +0,0 @@
1
- import type { IPlugin } from '../tools/base-tool.js';
2
- /**
3
- * Oh My OpenCode 插件实现
4
- * Oh My OpenCode 是 OpenCode 的增强插件
5
- */
6
- export declare class OhMyOpenCodePlugin implements IPlugin {
7
- readonly name = "oh-my-opencode";
8
- readonly displayName = "Oh My OpenCode";
9
- private configPath;
10
- constructor();
11
- /**
12
- * 检查 Oh My OpenCode 是否已安装
13
- * 通过检查配置文件或 plugin 数组来判断
14
- */
15
- isInstalled(): boolean;
16
- install(): Promise<void>;
17
- /**
18
- * 装载 Oh My OpenCode(添加到 OpenCode 配置)
19
- */
20
- load(): void;
21
- /**
22
- * 取消装载 Oh My OpenCode(从配置中移除)
23
- */
24
- unload(): void;
25
- /**
26
- * 检查 Oh My OpenCode 是否已装载到配置
27
- */
28
- isLoaded(): boolean;
29
- /**
30
- * 读取 OpenCode 配置
31
- */
32
- private getConfig;
33
- /**
34
- * 保存 OpenCode 配置
35
- */
36
- private saveConfig;
37
- }
38
- export declare const ohMyOpenCodePlugin: OhMyOpenCodePlugin;