diff --git a/CHANGELOG.md b/CHANGELOG.md index e444a68..e99f41b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ - 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 - Improved Windows remote credential detection for Lingma App installations. diff --git a/README.md b/README.md index 758287f..8d06df5 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The proxy now supports two backend modes: ## 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. diff --git a/README.zh-CN.md b/README.zh-CN.md index 4efa9ea..307bca5 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -16,7 +16,7 @@ ## 当前版本 -当前桌面端版本线:`v1.4.5` +当前桌面端版本线:`v1.4.6` 版本更新记录见 [CHANGELOG.md](./CHANGELOG.md)。 diff --git a/desktop/frontend/src/App.vue b/desktop/frontend/src/App.vue index c44c3a5..1fbb54f 100644 --- a/desktop/frontend/src/App.vue +++ b/desktop/frontend/src/App.vue @@ -239,7 +239,7 @@ onUnmounted(() => {
{{ status.running ? 'Proxy Running' : 'Proxy Stopped' }} - v1.4.5 + v1.4.6
diff --git a/desktop/wails.json b/desktop/wails.json index b215595..2575ad9 100644 --- a/desktop/wails.json +++ b/desktop/wails.json @@ -11,6 +11,6 @@ "email": "lutc5@asiainfo.com" }, "info": { - "productVersion": "1.4.5" + "productVersion": "1.4.6" } } diff --git a/internal/remote/client_test.go b/internal/remote/client_test.go index 31bbb0e..e755567 100644 --- a/internal/remote/client_test.go +++ b/internal/remote/client_test.go @@ -1,6 +1,10 @@ package remote -import "testing" +import ( + "os" + "path/filepath" + "testing" +) 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`) @@ -31,3 +35,35 @@ func TestExtractMachineIDFromTextJSON(t *testing.T) { 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) + } +} diff --git a/internal/remote/credentials.go b/internal/remote/credentials.go index c9b95ab..e62de7d 100644 --- a/internal/remote/credentials.go +++ b/internal/remote/credentials.go @@ -126,6 +126,7 @@ func candidateLingmaCacheDirs() []string { if home, err := os.UserHomeDir(); err == nil && strings.TrimSpace(home) != "" { dirs = append(dirs, filepath.Join(home, ".lingma"), + filepath.Join(home, ".lingma", "vscode", "sharedClientCache"), filepath.Join(home, ".config", "Lingma"), filepath.Join(home, ".local", "share", "Lingma"), )