dsh-fish-pet 0.2.6 → 0.2.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.7] - 2026-10-31
4
+
5
+ ### Fixed
6
+ - 喂食没有明显反馈:现在会冒泡 + 说话(按主人上一句的语言选台词)
7
+ - 喂食语音和当前对话抢话:正在说话时只冒泡,不插话
8
+
9
+ ### Added
10
+ - `tools/check-versions.ps1`:一条命令检查 Gitee / GitHub / npm 三个渠道版本是否一致
3
11
  ## [0.2.6] - 2026-10-31
4
12
 
5
13
  ### Changed
@@ -675,6 +675,17 @@ function Invoke-Feed {
675
675
  foreach ($dx in @(-26, 4, 30)) {
676
676
  $script:hearts += @{ dx = $dx; age = 0.0; life = 1.4 }
677
677
  }
678
+ # 给个明显的反馈:气泡 + 说话
679
+ $zhFeed = @('哼,就一口啊…再来一碗嘛', '白饭!主人最好了', '才、才不是为了你才吃的呢', '谢谢主人,鱼鱼吃饱了')
680
+ $enFeed = @('Hmph, only one bite? More please.', 'Rice! You are the best, master.', 'I am NOT eating because of you, okay?', 'Thank you master, Fatty Fish is full.')
681
+ $feedLine = ''
682
+ $feedLang = $script:langMode
683
+ if ($feedLang -eq 'auto') { try { $feedLang = Get-TextLang ([string]$script:lastUser) } catch { $feedLang = 'zh' } }
684
+ if ($feedLang -eq 'en') { $feedLine = Get-Random -InputObject $enFeed } else { $feedLine = Get-Random -InputObject $zhFeed }
685
+ Show-Bubble $feedLine
686
+ # 正在说话时只冒泡,不插话(否则语音和喂食不搭调)
687
+ $speechBusy = ($script:ttsSegPlaying -ge 0) -or (@($script:ttsSegs).Count -gt 0) -or ($null -ne $script:ttsHandle)
688
+ if (-not $speechBusy) { try { Speak-Text $feedLine } catch { } }
678
689
  Save-State
679
690
  } catch {
680
691
  $line = (Get-Date -Format 'HH:mm:ss') + ' FEED-ERR ' + $_.Exception.Message
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-fish-pet",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Desktop blue fish pet for DeepSeek Harness: per-pixel transparent WinForms window, text chat, and cloud speech-to-text voice conversation.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -0,0 +1,61 @@
1
+ # check-versions.ps1 · 检查 Gitee / GitHub / npm 三个渠道的版本是否一致
2
+ # 用法:powershell -ExecutionPolicy Bypass -File tools\check-versions.ps1
3
+ # 退出码:0 = 全部一致;1 = 有不一致
4
+
5
+ $ErrorActionPreference = 'Stop'
6
+ $pkgDir = Split-Path -Parent $PSScriptRoot
7
+ $reg = 'https://registry.npmjs.org'
8
+
9
+ Push-Location $pkgDir
10
+ try {
11
+ $localVer = (Get-Content 'package.json' -Raw | ConvertFrom-Json).version
12
+
13
+ $gitVer = ''
14
+ try { $gitVer = (git show HEAD:package.json | Out-String | ConvertFrom-Json).version } catch { $gitVer = '(读取失败)' }
15
+
16
+ $gitHubVer = ''
17
+ try { $gitHubVer = (git show 'github/main:package.json' | Out-String | ConvertFrom-Json).version } catch { $gitHubVer = '(未同步)' }
18
+
19
+ $npmVer = ''
20
+ try {
21
+ $npmVer = (& npm view dsh-fish-pet version --registry=$reg 2>$null | Out-String).Trim()
22
+ if (-not $npmVer) { $npmVer = '(查询失败)' }
23
+ } catch { $npmVer = '(查询失败)' }
24
+
25
+ $gitHead = (git rev-parse --short HEAD 2>$null | Out-String).Trim()
26
+ $gitGitee = (git rev-parse --short origin/main 2>$null | Out-String).Trim()
27
+ $gitGH = (git rev-parse --short github/main 2>$null | Out-String).Trim()
28
+
29
+ Write-Host ''
30
+ Write-Host '渠道 版本 提交' -ForegroundColor Cyan
31
+ Write-Host ('本地工作区 {0,-10} {1}' -f $localVer, $gitHead)
32
+ Write-Host ('Gitee (origin) {0,-10} {1}' -f $gitVer, $gitGitee)
33
+ Write-Host ('GitHub {0,-10} {1}' -f $gitHubVer, $gitGH)
34
+ Write-Host ('npm (latest) {0,-10}' -f $npmVer)
35
+ Write-Host ''
36
+
37
+ $problems = @()
38
+ if ($localVer -ne $gitVer) { $problems += "本地 package.json($localVer) 与 Gitee($gitVer) 不一致——忘了提交?" }
39
+ if ($gitVer -ne $gitHubVer) { $problems += "Gitee($gitVer) 与 GitHub($gitHubVer) 不一致——GitHub 没推上去" }
40
+ if ($localVer -ne $npmVer) {
41
+ if ($npmVer -match '^\d') {
42
+ $problems += "本地($localVer) 与 npm($npmVer) 不一致——npm 可能还在审核,或没发布"
43
+ } else {
44
+ $problems += "npm 版本查询失败($npmVer),检查网络或 registry 配置"
45
+ }
46
+ }
47
+
48
+ if ($problems.Count -eq 0) {
49
+ Write-Host '✅ 三个渠道版本一致' -ForegroundColor Green
50
+ exit 0
51
+ } else {
52
+ Write-Host '⚠️ 发现不一致:' -ForegroundColor Yellow
53
+ $problems | ForEach-Object { Write-Host (" - " + $_) -ForegroundColor Yellow }
54
+ Write-Host ''
55
+ Write-Host '提示:npm 发布后要等自动审核(几分钟),审核通过 latest 才会跳到新版本。' -ForegroundColor DarkGray
56
+ exit 1
57
+ }
58
+ }
59
+ finally {
60
+ Pop-Location
61
+ }