@fivetu53/soul-chat 1.0.3 → 1.0.5

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/bin/index.js +3 -3
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  import readline from 'readline';
4
4
  import { execSync } from 'child_process';
5
5
  import fs from 'fs';
6
+ import os from 'os';
6
7
  import { Marked } from 'marked';
7
8
  import { markedTerminal } from 'marked-terminal';
8
9
  import { loadConfig, saveConfig, getConfigPath } from './config.js';
@@ -98,7 +99,6 @@ const showCursor = () => process.stdout.write('\x1b[?25h');
98
99
 
99
100
  // 获取剪贴板图片 (跨平台)
100
101
  function getClipboardImage() {
101
- const os = require('os');
102
102
  const tmpDir = os.tmpdir();
103
103
  const tmpFile = process.platform === 'win32'
104
104
  ? `${tmpDir}\\soul_clipboard.png`
@@ -1044,7 +1044,7 @@ async function main() {
1044
1044
  console.log(' 检查更新中...\n');
1045
1045
 
1046
1046
  try {
1047
- const latestVersion = execSync('npm view @fivetu53/soul-chat version --registry https://registry.npmjs.org', { encoding: 'utf8' }).trim();
1047
+ const latestVersion = execSync('npm view @fivetu53/soul-chat version --registry https://registry.npmmirror.com', { encoding: 'utf8' }).trim();
1048
1048
 
1049
1049
  if (latestVersion === currentVersion) {
1050
1050
  console.log(' ✓ 已是最新版本\n');
@@ -1053,7 +1053,7 @@ async function main() {
1053
1053
 
1054
1054
  console.log(` 发现新版本: v${latestVersion}`);
1055
1055
  console.log(' 正在更新...\n');
1056
- execSync('npm update -g @fivetu53/soul-chat --registry https://registry.npmjs.org', { stdio: 'inherit' });
1056
+ execSync('npm update -g @fivetu53/soul-chat --registry https://registry.npmmirror.com', { stdio: 'inherit' });
1057
1057
  console.log('\n ✓ 更新完成!\n');
1058
1058
  } catch (err) {
1059
1059
  console.log(' 更新失败,请手动运行: npm update -g @fivetu53/soul-chat\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fivetu53/soul-chat",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Soul Chat - 智能 AI 伴侣命令行客户端",
5
5
  "type": "module",
6
6
  "bin": {