Rename product to Lingma Proxy

This commit is contained in:
lutc5
2026-05-06 15:03:04 +08:00
parent 7eb68f8bdc
commit 1c349227a3
22 changed files with 227 additions and 160 deletions

View File

@@ -178,7 +178,7 @@ func (s *Server) handleRoot(w http.ResponseWriter, r *http.Request) {
}
writeJSON(w, http.StatusOK, map[string]any{
"ok": true,
"service": "lingma-ipc-proxy",
"service": "lingma-proxy",
"state": s.svc.State(),
})
}
@@ -214,7 +214,7 @@ func (s *Server) handleDebugRequests(w http.ResponseWriter, r *http.Request) {
records := s.debugRecords(limit)
writeJSON(w, http.StatusOK, map[string]any{
"ok": true,
"service": "lingma-ipc-proxy",
"service": "lingma-proxy",
"count": len(records),
"requests": records,
"state": s.svc.State(),
@@ -265,7 +265,7 @@ func (s *Server) handleCapabilities(w http.ResponseWriter, r *http.Request) {
}
writeJSON(w, http.StatusOK, map[string]any{
"service": "lingma-ipc-proxy",
"service": "lingma-proxy",
"protocols": []string{
"openai.chat_completions",
"anthropic.messages",
@@ -441,8 +441,8 @@ func (s *Server) handleVersion(w http.ResponseWriter, r *http.Request) {
return
}
writeJSON(w, http.StatusOK, map[string]any{
"version": "lingma-ipc-proxy",
"service": "lingma-ipc-proxy",
"version": "lingma-proxy",
"service": "lingma-proxy",
})
}

View File

@@ -308,7 +308,7 @@ func (c *Client) headers(cred Credential, path string, body string) (map[string]
"Cosy-Machinetype": "",
"Cosy-Version": c.cfg.CosyVersion,
"Login-Version": "v2",
"User-Agent": "lingma-ipc-proxy/remote",
"User-Agent": "lingma-proxy/remote",
"Accept": "text/event-stream",
"Cache-Control": "no-cache",
}, nil
@@ -396,6 +396,7 @@ func candidateConfigFiles() []string {
filepath.Join(home, ".lingma", "extension", "server", "config.json"),
filepath.Join(home, ".lingma", "extension", "local", "config.json"),
filepath.Join(home, ".lingma", "bin", "config.json"),
filepath.Join(home, ".config", "lingma-proxy", "config.json"),
filepath.Join(home, ".config", "lingma-ipc-proxy", "config.json"),
filepath.Join(home, ".lingma", "logs", "lingma.log"),
filepath.Join(home, ".lingma", "logs", "lingma-extension.log"),