Files
pdd_AI/native/src/Log.h
T
zhangyu 2b55aa5a44 Add native client with image adjustment and AI hybrid intent mode
Switch to WebView2 host with embedded resources, save chat images by order, and support buyer photo replace/delete via rules, dHash matching, and optional model-assisted intent parsing.
2026-11-11 02:19:26 +08:00

29 lines
651 B
C++

#pragma once
#include <string>
#include <vector>
namespace pddai {
class Log {
public:
enum class Level { Info, Warn, Error };
static void Init();
static void Write(Level level, const std::string& message);
static void Info(const std::string& m) { Write(Level::Info, m); }
static void Warn(const std::string& m) { Write(Level::Warn, m); }
static void Error(const std::string& m) { Write(Level::Error, m); }
// 环形缓冲,供 UI 的日志页读取
struct Entry {
long long timeMs;
Level level;
std::string text;
};
static std::vector<Entry> Recent(size_t maxCount = 500);
};
}