Release v1.4.6

This commit is contained in:
lutc5
2026-05-06 12:43:55 +08:00
parent 4622dee883
commit 7eb68f8bdc
7 changed files with 47 additions and 5 deletions

View File

@@ -4,6 +4,11 @@
- Nothing yet. - Nothing yet.
## v1.4.6 - 2026-05-06
- Added the VS Code Lingma plugin shared cache directory `~/.lingma/vscode/sharedClientCache` to remote credential auto-detection.
- This fixes Windows setups where Lingma is installed through the VS Code extension and stores `cache/user` plus `cache/id` under the plugin shared client cache.
## v1.4.5 - 2026-05-06 ## v1.4.5 - 2026-05-06
- Improved Windows remote credential detection for Lingma App installations. - Improved Windows remote credential detection for Lingma App installations.

View File

@@ -13,7 +13,7 @@ The proxy now supports two backend modes:
## Current Version ## Current Version
The current desktop line is `v1.4.5`. The current desktop line is `v1.4.6`.
See [CHANGELOG.md](./CHANGELOG.md) for release history. See [CHANGELOG.md](./CHANGELOG.md) for release history.

View File

@@ -16,7 +16,7 @@
## 当前版本 ## 当前版本
当前桌面端版本线:`v1.4.5` 当前桌面端版本线:`v1.4.6`
版本更新记录见 [CHANGELOG.md](./CHANGELOG.md)。 版本更新记录见 [CHANGELOG.md](./CHANGELOG.md)。

View File

@@ -239,7 +239,7 @@ onUnmounted(() => {
<span class="status-dot" :class="{ running: status.running }"></span> <span class="status-dot" :class="{ running: status.running }"></span>
<div> <div>
<strong>{{ status.running ? 'Proxy Running' : 'Proxy Stopped' }}</strong> <strong>{{ status.running ? 'Proxy Running' : 'Proxy Stopped' }}</strong>
<small>v1.4.5</small> <small>v1.4.6</small>
</div> </div>
</div> </div>
</aside> </aside>

View File

@@ -11,6 +11,6 @@
"email": "lutc5@asiainfo.com" "email": "lutc5@asiainfo.com"
}, },
"info": { "info": {
"productVersion": "1.4.5" "productVersion": "1.4.6"
} }
} }

View File

@@ -1,6 +1,10 @@
package remote package remote
import "testing" import (
"os"
"path/filepath"
"testing"
)
func TestExtractBaseURLFromEndpointLog(t *testing.T) { func TestExtractBaseURLFromEndpointLog(t *testing.T) {
got := extractBaseURLFromText(`2026-04-10 INFO Update endpoint success. endpoint config: https://ai-lingma-cmb01-cn-beijing.rdc.aliyuncs.com`) got := extractBaseURLFromText(`2026-04-10 INFO Update endpoint success. endpoint config: https://ai-lingma-cmb01-cn-beijing.rdc.aliyuncs.com`)
@@ -31,3 +35,35 @@ func TestExtractMachineIDFromTextJSON(t *testing.T) {
t.Fatalf("machine id = %q", got) t.Fatalf("machine id = %q", got)
} }
} }
func TestCandidateLingmaCacheDirsIncludesVSCodeSharedClientCache(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
t.Setenv("USERPROFILE", home)
t.Setenv("LINGMA_CACHE_DIR", "")
dirs := candidateLingmaCacheDirs()
want := filepath.Join(home, ".lingma", "vscode", "sharedClientCache")
for _, dir := range dirs {
if dir == want {
return
}
}
t.Fatalf("missing vscode shared client cache %q in %#v", want, dirs)
}
func TestLoadMachineIDReadsVSCodeSharedClientCacheID(t *testing.T) {
dir := t.TempDir()
if err := os.MkdirAll(filepath.Join(dir, "cache"), 0755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(dir, "cache", "id"), []byte("abcdefghijklmnop1234"), 0644); err != nil {
t.Fatal(err)
}
got, err := loadMachineID(dir)
if err != nil {
t.Fatal(err)
}
if got != "abcdefghijklmnop1234" {
t.Fatalf("machine id = %q", got)
}
}

View File

@@ -126,6 +126,7 @@ func candidateLingmaCacheDirs() []string {
if home, err := os.UserHomeDir(); err == nil && strings.TrimSpace(home) != "" { if home, err := os.UserHomeDir(); err == nil && strings.TrimSpace(home) != "" {
dirs = append(dirs, dirs = append(dirs,
filepath.Join(home, ".lingma"), filepath.Join(home, ".lingma"),
filepath.Join(home, ".lingma", "vscode", "sharedClientCache"),
filepath.Join(home, ".config", "Lingma"), filepath.Join(home, ".config", "Lingma"),
filepath.Join(home, ".local", "share", "Lingma"), filepath.Join(home, ".local", "share", "Lingma"),
) )