chore: import Local-Cursor v1.1.8 source snapshot

Includes the current working directory changes. Historical commits and release binaries are excluded to limit Gitea storage.
Source base: d7515973fbfd6dd2001fa156c483455b8081c7cb
This commit is contained in:
FuDie0915
2026-11-10 01:24:28 +08:00
commit db73cf5a39
337 changed files with 147502 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package bridge
import (
"errors"
"cursor/internal/logger"
)
var errServiceNotReady = errors.New("应用未初始化")
// logServiceCall 记录用户触发或后台调用的服务操作,不记录密钥和配置正文。
func logServiceCall(service string, operation string, attrs ...any) {
args := append([]any{"service", service, "operation", operation}, attrs...)
logger.Info("service call", args...)
}
// logServiceResult 统一记录服务操作结果,失败时保留原始错误。
func logServiceResult(service string, operation string, err error) {
if err != nil {
logger.Error("service call failed", "service", service, "operation", operation, "error", err)
return
}
logger.Info("service call completed", "service", service, "operation", operation)
}