mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
85251a2905
- Remove user-level model settings (chat_model_id, memory_model_id, embedding_model_id, max_context_load_time, language) from users table - Merge migration 0002 into 0001, remove compatibility migrations - Delete dead conversation/resolver.go (1177 lines, only flow/resolver.go used) - Remove type aliases (Chat=Conversation, types_alias.go) - Fix SQL: remove AND false stub, fix UpdateChatTitle model_id, reset model IDs in DeleteSettings, add preauth expiry filter, add ListMessages limit, remove 10 dead queries - Extract shared handler helpers (RequireChannelIdentityID, AuthorizeBotAccess) - Rename internal/router to internal/channel/inbound - Fix identity confusion: remove UserID->ChannelIdentityID fallbacks - Fix all _ = var patterns with proper error logging - Fix error propagation: storeMessages, rescheduleJob, botContainerID - Fix naming: ModelId->ModelID, active->is_active, Duration semantic fix - Remove dead code: mcpService, ReplyTarget, callMCPServer, sshShellQuote, buildSessionMetadata, ChatRequest.Language, TriggerPayload.ChatID - Fix code quality: errors.Is(), remove goto, CreateHuman deprecated - Remove Enable model endpoint and user-level settings CLI commands - Regenerate sqlc, swagger, SDK
38 lines
724 B
Go
38 lines
724 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.30.0
|
|
// source: events.sql
|
|
|
|
package sqlc
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
const insertLifecycleEvent = `-- name: InsertLifecycleEvent :exec
|
|
INSERT INTO lifecycle_events (id, container_id, event_type, payload)
|
|
VALUES (
|
|
$1,
|
|
$2,
|
|
$3,
|
|
$4
|
|
)
|
|
`
|
|
|
|
type InsertLifecycleEventParams struct {
|
|
ID string `json:"id"`
|
|
ContainerID string `json:"container_id"`
|
|
EventType string `json:"event_type"`
|
|
Payload []byte `json:"payload"`
|
|
}
|
|
|
|
func (q *Queries) InsertLifecycleEvent(ctx context.Context, arg InsertLifecycleEventParams) error {
|
|
_, err := q.db.Exec(ctx, insertLifecycleEvent,
|
|
arg.ID,
|
|
arg.ContainerID,
|
|
arg.EventType,
|
|
arg.Payload,
|
|
)
|
|
return err
|
|
}
|