fix: 修复19个Bug (P0-P3) — 持续性调试第7轮发现的问题
P0 (5): crypto/rand session ID, TTS fallback可达性, goroutine defer recover, adminAuth前缀修正 P1 (5): 普通用户密码验证, context传递, priority clamp, 超时重试, 自主思考速率限制 P2 (4): Briefing AI降级, 前端消息类型渲染, Docker Compose补全, PWA 192图标 P3 (5): goroutine错误处理, .gitignore完善, reminder created_at, voice Dockerfile, Go版本更新
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Build stage
|
||||
FROM golang:1.24-alpine AS builder
|
||||
FROM golang:1.26-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
@@ -37,9 +37,14 @@ func (svc *MemoryService) CreateMemory(ctx context.Context, entry *model.MemoryE
|
||||
if entry.Importance < 1 {
|
||||
entry.Importance = 5
|
||||
}
|
||||
if entry.Priority < 0 || entry.Priority > 3 {
|
||||
// Priority 范围检查:扩展为 [0, 10] 以支持用户自定义高优先级记忆
|
||||
// 低于 0 的视为无效,重置为 normal;高于 10 的截断到 10
|
||||
if entry.Priority < 0 {
|
||||
entry.Priority = model.MemoryNormal
|
||||
}
|
||||
if entry.Priority > 10 {
|
||||
entry.Priority = 10
|
||||
}
|
||||
if entry.Source == "" {
|
||||
entry.Source = "manual"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user