Skip to content

Conversation

@index-null
Copy link

@index-null index-null commented Nov 24, 2025

Add Support for CodeBuddy (buddy/buddycn) Editor

📋 Summary

This PR adds native support for CodeBuddy editor (commands: buddy and buddycn) to the launchEditor configuration option.

🎯 Motivation

CodeBuddy is an AI-powered code editor developed by Tencent that uses the same CLI syntax as VS Code for opening files with line and column positioning. Currently, users need to create custom wrapper scripts to use CodeBuddy with this plugin. This PR simplifies the setup by adding first-class support for both buddy and buddycn commands.

🔧 Changes

1. Type Definitions

  • Added 'buddy' and 'buddycn' to the launchEditor option type in:
    • packages/core/src/index.ts
    • All README files (root, packages/core, packages/unplugin)

2. Documentation

  • Added CodeBuddy/CodeBuddy CN to the supported editors table
  • Added configuration examples for CodeBuddy CN in all README files
  • Included both environment variable and direct configuration methods

💡 Editor Compatibility

CodeBuddy uses the same command-line interface as VS Code:

buddycn -g <file:line[:character]>

Key CLI option:

  • -g --goto <file:line[:character]>: Open a file at the path on the specified line and character position

This makes CodeBuddy fully compatible with the existing launch-editor infrastructure without requiring any additional code changes beyond type definitions.

📦 Usage Examples

Method 1: Direct Configuration (Recommended)

import VueInspector from 'vite-plugin-vue-inspector'

export default defineConfig({
  plugins: [
    vue(),
    VueInspector({
      toggleComboKey: 'meta',
      launchEditor: 'buddycn', // ✅ Now officially supported!
    }),
  ],
})

Method 2: Environment Variable

# In shell configuration (.bashrc, .zshrc, etc.)
export LAUNCH_EDITOR=buddycn

# Or in package.json
{
  "scripts": {
    "dev": "LAUNCH_EDITOR=buddycn vite"
  }
}

✅ Testing

  • TypeScript types compile without errors
  • Documentation updated in all README files
  • Verified CLI syntax compatibility with VS Code
  • Tested with CodeBuddy CN 1.2.9

🔗 References

  • Official Website (International): https://www.codebuddy.ai/
  • Official Website (China): https://copilot.tencent.com/ide/
  • Editor Commands: buddy (international version), buddycn (China version)
  • CLI Syntax: Compatible with VS Code (-g file:line:column)
  • Supported Platforms: Linux ✓ | Windows ✓ | macOS ✓

📝 Additional Notes

CodeBuddy is available in two variants:

  1. buddy: International version - https://www.codebuddy.ai/
  2. buddycn: China localized version (CodeBuddy CN / Tencent Copilot IDE) - https://copilot.tencent.com/ide/

Both use identical CLI syntax and can be configured interchangeably based on the user's installed version.


This change improves developer experience by eliminating the need for custom wrapper scripts when using CodeBuddy editor with this plugin.

@index-null index-null force-pushed the chore/support-codebuddy branch from f1cdc11 to c4af69b Compare November 24, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant