package http import ( "context" "embed" "encoding/csv" "encoding/json" "fmt" "html/template" "io/fs" "math" "net/http" "os" "path/filepath" "regexp" "sort" "strings" "time" "github.com/gin-gonic/gin" "github.com/rs/zerolog/log" "github.com/sjzar/chatlog/internal/errors" "github.com/sjzar/chatlog/internal/model" "github.com/sjzar/chatlog/pkg/util" "github.com/sjzar/chatlog/pkg/util/dat2img" "github.com/sjzar/chatlog/pkg/util/silk" ) //go:embed static var EFS embed.FS // 统一的 HTML 预览组件片段 var previewHTMLSnippetBase = `
" + messageHTMLPlaceholder(msg) + "
" + messageHTMLPlaceholder(m) + "
")
c.Writer.WriteString(messageHTMLPlaceholder(m))
c.Writer.WriteString("" + messageHTMLPlaceholder(m) + "