hover-triggered inline translation with dual-engine routing
Automatically detects text selection in VS Code editor and displays translation results in a hover tooltip without modifying editor content. Routes short phrases to Youdao's proprietary API for fast dictionary-style translation, while routing longer text or Japanese-containing selections to Doubao LLM via Volcano Ark. The routing decision is made client-side based on text length heuristics and character set detection (kana detection for Japanese), eliminating unnecessary API calls for short terms.
Unique: Implements client-side intelligent routing between two distinct translation engines (Youdao for short text, Doubao for long text) based on text length heuristics and character set detection, avoiding unnecessary LLM API calls for simple dictionary lookups while preserving context-aware translation for complex text.
vs alternatives: Faster than pure-LLM translation tools for short phrases (uses Youdao's optimized API) while more context-aware than dictionary-only tools for longer text (uses Doubao LLM), creating a hybrid approach that balances latency and translation quality.
auto-activation on vs code window load
Extension automatically activates when VS Code window loads without requiring manual trigger or configuration. Uses VS Code's activation event system to register hover listeners and command handlers immediately upon window completion, eliminating cold-start friction. The activation is transparent to the user — translation functionality is immediately available without any setup steps beyond initial API key configuration.
Unique: Uses VS Code's onWindowLoad activation event to register all hover and command listeners immediately upon window completion, ensuring zero-latency availability without requiring users to manually trigger activation or run setup commands.
vs alternatives: More seamless than extensions requiring explicit activation commands (e.g., 'Enable Translation') or keybinding-first workflows, as translation is immediately available on any text selection without user action.
configurable doubao llm model selection with custom system prompts
Allows users to specify which Doubao model to use for long-text translation by entering a model ID from Volcano Ark console (e.g., 'Doubao-1.5-pro-32k'). Additionally supports customization of the system prompt (role definition) sent to Doubao, enabling users to override the default multi-language-to-Chinese translation behavior with custom instructions. Configuration is stored in VS Code settings and validated via a built-in connectivity test function that verifies API key and model availability before use.
Unique: Provides both model ID selection and system prompt customization in a single settings interface, with a built-in connectivity test function that validates both API key and model availability before use, reducing trial-and-error configuration cycles.
vs alternatives: More flexible than fixed-model translation tools (allows model switching) while simpler than full Doubao API clients (hides authentication and request formatting complexity behind VS Code settings).
japanese text detection and doubao-exclusive routing
Detects presence of Japanese kana characters (hiragana, katakana) in selected text and automatically routes such selections exclusively to Doubao LLM, bypassing Youdao API entirely. This routing decision is made client-side before API calls are initiated, preventing unnecessary Youdao requests for Japanese text. The detection mechanism is character-set based (likely Unicode range checking for kana blocks U+3040-U+309F and U+30A0-U+30FF) and is non-configurable.
Unique: Implements automatic character-set detection for Japanese kana (U+3040-U+309F and U+30A0-U+30FF Unicode ranges) to trigger Doubao-exclusive routing, avoiding Youdao API calls for Japanese text without requiring user configuration or manual routing decisions.
vs alternatives: More intelligent than single-engine translation tools (automatically selects appropriate engine for Japanese) while more opaque than tools with visible routing logic (users cannot see or override routing decisions).
command palette translation trigger with keybinding support
Provides an optional command palette entry ('translate' command) that can be invoked via keyboard shortcut (Ctrl+Alt+T on Windows/Linux, Cmd+Alt+T on macOS) to explicitly trigger translation of the current selection. This complements the default hover-based interaction, allowing users who prefer explicit command invocation or have keybinding muscle memory to trigger translation without hovering. The command executes the same routing logic and API calls as hover-triggered translation, but requires deliberate user action.
Unique: Provides both hover-based (passive) and command-palette-based (explicit) translation triggers, allowing users to choose interaction style while reusing the same underlying routing and API logic for both paths.
vs alternatives: More flexible than hover-only tools (accommodates keyboard-first workflows) while simpler than tools with extensive keybinding customization (uses standard VS Code command palette integration).
youdao short-phrase translation via proprietary api
Routes text selections below an undocumented length threshold to Youdao's proprietary suggestion API for fast, dictionary-style translation. Youdao API is non-configurable (no API key or model selection available) and operates as a closed black-box service. The extension handles authentication and request formatting internally, presenting results in the same hover tooltip as Doubao translations. Youdao is selected for short text to minimize latency compared to LLM-based approaches.
Unique: Integrates Youdao's proprietary API as a lightweight, low-latency translation engine for short text, with client-side routing logic that automatically selects Youdao for phrases below an undocumented length threshold, reducing LLM API costs and latency for common short-text translation scenarios.
vs alternatives: Faster than pure-LLM translation for short phrases (avoids LLM overhead) while less transparent than documented APIs (Youdao API is proprietary and non-configurable).
api key and model connectivity validation
Provides a built-in test function accessible from VS Code settings UI or command palette that validates Doubao API key and model ID connectivity before translations are attempted. The test function sends a minimal request to Volcano Ark API to verify authentication and model availability, providing immediate feedback on configuration correctness. This reduces trial-and-error debugging by catching misconfigured credentials or unavailable models before they cause translation failures.
Unique: Integrates a built-in connectivity test function directly into VS Code settings UI, allowing users to validate API credentials and model availability without leaving the settings panel or attempting actual translations.
vs alternatives: More convenient than manual API testing (no need to write test scripts) while less comprehensive than full API explorers (only validates connectivity, not quota or cost).
read-only translation display in hover tooltip
Displays translation results in a VS Code hover tooltip overlay that appears when user hovers over selected text. The tooltip is read-only and non-interactive — translations cannot be edited, copied directly from the tooltip, or inserted into the editor. This design keeps the editor content pristine and prevents accidental modifications, but limits the utility of translation results to viewing only. The tooltip automatically dismisses when the user moves the mouse away or continues editing.
Unique: Implements translation results as read-only hover tooltips that automatically dismiss on mouse movement, preventing accidental editor modifications while maintaining a non-intrusive viewing experience.
vs alternatives: Safer than inline translation insertion (no risk of accidental code changes) while less interactive than side-panel or inline-editable approaches (users cannot directly copy or edit translations).
+1 more capabilities