@optima-chat/browser-cli 0.19.0 → 0.20.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1421,9 +1421,9 @@ function registerFeikuaCommands(program2) {
1421
1421
  // src/commands/files.ts
1422
1422
  function formatVideoList(videos) {
1423
1423
  if (videos.length === 0) {
1424
- return `No videos found. Put your videos in:
1425
- macOS/Linux: ~/Downloads/OptimaConnect/videos
1426
- Windows: C:\\Users\\<\u7528\u6237\u540D>\\Downloads\\OptimaConnect\\videos
1424
+ return `No videos found. Videos are listed from your OptimaConnect folder:
1425
+ macOS/Linux: ~/Downloads/OptimaConnect/<\u5E73\u53F0>/<\u8D27\u54C1>/\u89C6\u9891/ (older files: ~/Downloads/OptimaConnect/videos)
1426
+ Windows: C:\\Users\\<\u7528\u6237\u540D>\\Downloads\\OptimaConnect\\<\u5E73\u53F0>\\<\u8D27\u54C1>\\\u89C6\u9891\\ (older files: ...\\OptimaConnect\\videos)
1427
1427
  Then try again.`;
1428
1428
  }
1429
1429
  return videos.map((v) => {
@@ -1432,17 +1432,22 @@ Then try again.`;
1432
1432
  return `${v.name} \u2014 ${mb} MB, ${time}`;
1433
1433
  }).join("\n");
1434
1434
  }
1435
+ function mediaRefLine(result) {
1436
+ return result.media_ref ? `media_ref: ${result.media_ref} (\u4E0A\u4F20\u53C2\u6570\u586B\u8FD9\u4E2A)` : null;
1437
+ }
1435
1438
  function registerFileCommands(program2) {
1436
1439
  program2.command("send-file").description("Send a file from your workspace to your local download folder").requiredOption("--src <path>", "Source path in your workspace (e.g. ~/output/report.pdf)").requiredOption("--dest <path>", "Destination path relative to the download folder").action(async (opts) => {
1437
1440
  try {
1438
1441
  const result = await api.sendFile(opts.src, opts.dest);
1439
1442
  console.log(result.local_path);
1443
+ const hint = mediaRefLine(result);
1444
+ if (hint) console.error(hint);
1440
1445
  } catch (err) {
1441
1446
  console.error(formatError(err));
1442
1447
  process.exit(1);
1443
1448
  }
1444
1449
  });
1445
- program2.command("list-videos").description("List videos in your local video folder (requires Desktop app online)").action(async () => {
1450
+ program2.command("list-videos").description("List videos in your local OptimaConnect folder (requires Desktop app online)").action(async () => {
1446
1451
  try {
1447
1452
  const { videos } = await api.listVideos();
1448
1453
  console.log(formatVideoList(videos));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/browser-cli",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {