('textJson').value = resultLines.join('\n');
    },

    /**
     * 自动翻译
     */
    async autoTranslate() {
      this.showNewEnError = false;
      this.showOldEnError = false;
      this.showOldZhError = false;
      this.errorMsg = null;

      // 验证API配置
      if (this.selectedApi === 'openai') {
        if (!this.openai.apiKey) {
          this.errorMsg = '请填写 OpenAI API 密钥。';
          return;
        }
      } else if (this.selectedApi === 'deepseek') {
        if (!this.