opencode-tbot 0.1.14 → 0.1.17

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.
package/dist/plugin.js CHANGED
@@ -1265,29 +1265,15 @@ var OpenRouterVoiceTranscriptionClient = class {
1265
1265
  }
1266
1266
  };
1267
1267
  var MIME_TYPE_FORMAT_MAP = {
1268
- "audio/aac": "aac",
1269
- "audio/aiff": "aiff",
1270
- "audio/flac": "flac",
1271
- "audio/m4a": "m4a",
1272
1268
  "audio/mp3": "mp3",
1273
- "audio/mp4": "m4a",
1274
1269
  "audio/mpeg": "mp3",
1275
1270
  "audio/ogg": "ogg",
1276
1271
  "audio/wav": "wav",
1277
1272
  "audio/wave": "wav",
1278
- "audio/x-aac": "aac",
1279
- "audio/x-aiff": "aiff",
1280
- "audio/x-flac": "flac",
1281
- "audio/x-m4a": "m4a",
1282
1273
  "audio/x-wav": "wav",
1283
1274
  "audio/vnd.wave": "wav"
1284
1275
  };
1285
1276
  var FILE_EXTENSION_FORMAT_MAP = {
1286
- ".aac": "aac",
1287
- ".aif": "aiff",
1288
- ".aiff": "aiff",
1289
- ".flac": "flac",
1290
- ".m4a": "m4a",
1291
1277
  ".mp3": "mp3",
1292
1278
  ".oga": "ogg",
1293
1279
  ".ogg": "ogg",
@@ -1301,9 +1287,12 @@ function resolveAudioFormat(filename, mimeType) {
1301
1287
  return "ogg";
1302
1288
  }
1303
1289
  function toBase64(data) {
1304
- const bytes = data instanceof Uint8Array ? data : new Uint8Array(data);
1290
+ const bytes = toUint8Array(data);
1305
1291
  return Buffer.from(bytes).toString("base64");
1306
1292
  }
1293
+ function toUint8Array(data) {
1294
+ return data instanceof Uint8Array ? data : new Uint8Array(data);
1295
+ }
1307
1296
  function buildTranscriptionPrompt(transcriptionPrompt) {
1308
1297
  const basePrompt = [
1309
1298
  "Transcribe the provided audio verbatim.",
@@ -3306,9 +3295,9 @@ function splitStatusLines(text) {
3306
3295
  function formatHealthBadge(healthy, layout) {
3307
3296
  return healthy ? "🟢" : layout.errorStatus;
3308
3297
  }
3309
- function formatVoiceRecognitionBadge(status, layout) {
3310
- if (status.status === "configured") return status.model ? `\uD83D\uDFE2 ${layout.voiceRecognitionConfiguredLabel} (${status.model})` : `\uD83D\uDFE2 ${layout.voiceRecognitionConfiguredLabel}`;
3311
- return `\u26AA ${layout.voiceRecognitionNotConfiguredLabel}`;
3298
+ function formatVoiceRecognitionBadge(status, _layout) {
3299
+ if (status.status === "configured") return status.model ? `\uD83D\uDFE2 (${status.model})` : "🟡";
3300
+ return "⚪";
3312
3301
  }
3313
3302
  function formatLspStatusBadge(status) {
3314
3303
  switch (status.status) {
@@ -3378,9 +3367,7 @@ function getStatusLayoutCopy(copy) {
3378
3367
  rootLabel: "Root",
3379
3368
  statusLabel: "Status",
3380
3369
  tbotVersionLabel: "opencode-tbot Version",
3381
- voiceRecognitionConfiguredLabel: "configured",
3382
3370
  voiceRecognitionLabel: "Voice Recognition",
3383
- voiceRecognitionNotConfiguredLabel: "not configured",
3384
3371
  workspaceTitle: "📁 Workspace"
3385
3372
  };
3386
3373
  return {
@@ -3403,9 +3390,7 @@ function getStatusLayoutCopy(copy) {
3403
3390
  rootLabel: "根目录",
3404
3391
  statusLabel: "状态",
3405
3392
  tbotVersionLabel: "opencode-tbot版本",
3406
- voiceRecognitionConfiguredLabel: "已配置",
3407
3393
  voiceRecognitionLabel: "语音识别",
3408
- voiceRecognitionNotConfiguredLabel: "未配置",
3409
3394
  workspaceTitle: "📁 工作区"
3410
3395
  };
3411
3396
  }