Vision-model bridge for rendered-frame review (desktop / devtools only). 更多...
#include <RenderVision.hpp>
Public 成员函数 | |
| RenderVision (const RenderVision &)=delete | |
| RenderVision & | operator= (const RenderVision &)=delete |
| void | setBaseUrl (std::string url) |
| void | setApiKey (std::string key) |
| void | setModel (std::string model) |
| void | setPath (std::string path) |
| void | setTimeoutMs (int ms) |
| std::string | configJson () |
| JSON description of current config (API key masked). | |
| bool | configured () |
| std::string | latest () const |
| std::string | lastError () const |
| void | notifyPending (const std::string &reason, const std::string &source, int line) |
| Record that a breakpoint / critical site wants a vision dump. | |
| bool | pending () const |
| std::string | pendingReason () const |
| std::string | describe (eve::IRenderCapture *cap, const std::string &renderDataJson, bool fresh, const std::string &reason={}) |
Main-thread capture + vision describe. Returns the description text, or a string starting with "error: " on failure. When fresh is false and a cached description exists, returns the cache. | |
| void | pollPending (eve::IRenderCapture *cap, const std::string &renderDataJson) |
| McpServer::poll hook: performs one pending dump when safe, clears flag. | |
静态 Public 成员函数 | |
| static RenderVision & | instance () |
友元 | |
| template<typename > | |
| struct | Immortal |
详细描述
Vision-model bridge for rendered-frame review (desktop / devtools only).
Captures the current frame (Graphics readback), encodes it as a PNG data URL, and sends it together with engine render parameters to an OpenAI-compatible vision model over plain HTTP (JSON body, no multipart). The model returns a prose description of what is rendered and how the provided render parameters relate to the visible result — useful for other LLM agents debugging visuals.
Config is set via env vars or the eve_render_vision_config MCP tool: EVE_VISION_BASE_URL e.g. http://127.0.0.1:11434/v1 (must be plain HTTP; no TLS/OpenSSL is linked into the engine) EVE_VISION_API_KEY optional bearer token EVE_VISION_MODEL e.g. llava / gpt-4o-mini / qwen2-vl EVE_VISION_PATH request path suffix, default /chat/completions EVE_VISION_TIMEOUT_MS
Capture/describe must be called on the main (render/game) thread, since it touches the Graphics readback. Breakpoint / error sites only record a pending flag here; the actual dump happens later from McpServer::poll.
在文件 RenderVision.hpp 第 36 行定义.
构造及析构函数说明
◆ RenderVision()
|
delete |
成员函数说明
◆ configJson()
| std::string eve::dev::RenderVision::configJson | ( | ) |
JSON description of current config (API key masked).
在文件 RenderVision.cpp 第 132 行定义.
◆ configured()
| bool eve::dev::RenderVision::configured | ( | ) |
在文件 RenderVision.cpp 第 126 行定义.
◆ describe()
| std::string eve::dev::RenderVision::describe | ( | eve::IRenderCapture * | cap, |
| const std::string & | renderDataJson, | ||
| bool | fresh, | ||
| const std::string & | reason = {} |
||
| ) |
Main-thread capture + vision describe. Returns the description text, or a string starting with "error: " on failure. When fresh is false and a cached description exists, returns the cache.
在文件 RenderVision.cpp 第 170 行定义.
◆ instance()
|
static |
在文件 RenderVision.cpp 第 78 行定义.
引用了 eve::dev::Immortal< T >::get().
被这些函数引用 eve::dev::DevTool::notifyError() , 以及 eve::dev::Debugger::onScriptLine().
◆ lastError()
| std::string eve::dev::RenderVision::lastError | ( | ) | const |
在文件 RenderVision.cpp 第 151 行定义.
◆ latest()
| std::string eve::dev::RenderVision::latest | ( | ) | const |
在文件 RenderVision.cpp 第 146 行定义.
◆ notifyPending()
| void eve::dev::RenderVision::notifyPending | ( | const std::string & | reason, |
| const std::string & | source, | ||
| int | line | ||
| ) |
Record that a breakpoint / critical site wants a vision dump.
在文件 RenderVision.cpp 第 156 行定义.
引用了 line.
被这些函数引用 eve::dev::DevTool::notifyError() , 以及 eve::dev::Debugger::onScriptLine().
◆ operator=()
|
delete |
◆ pending()
| bool eve::dev::RenderVision::pending | ( | ) | const |
在文件 RenderVision.cpp 第 163 行定义.
◆ pendingReason()
| std::string eve::dev::RenderVision::pendingReason | ( | ) | const |
在文件 RenderVision.cpp 第 165 行定义.
◆ pollPending()
| void eve::dev::RenderVision::pollPending | ( | eve::IRenderCapture * | cap, |
| const std::string & | renderDataJson | ||
| ) |
McpServer::poll hook: performs one pending dump when safe, clears flag.
在文件 RenderVision.cpp 第 181 行定义.
◆ setApiKey()
| void eve::dev::RenderVision::setApiKey | ( | std::string | key | ) |
在文件 RenderVision.cpp 第 103 行定义.
◆ setBaseUrl()
| void eve::dev::RenderVision::setBaseUrl | ( | std::string | url | ) |
在文件 RenderVision.cpp 第 98 行定义.
◆ setModel()
| void eve::dev::RenderVision::setModel | ( | std::string | model | ) |
在文件 RenderVision.cpp 第 108 行定义.
引用了 model.
◆ setPath()
| void eve::dev::RenderVision::setPath | ( | std::string | path | ) |
在文件 RenderVision.cpp 第 113 行定义.
◆ setTimeoutMs()
| void eve::dev::RenderVision::setTimeoutMs | ( | int | ms | ) |
在文件 RenderVision.cpp 第 120 行定义.
友元及相关函数文档
◆ Immortal
|
friend |
在文件 RenderVision.hpp 第 76 行定义.
该类的文档由以下文件生成:
- src/engine/devtools/RenderVision.hpp
- src/engine/devtools/RenderVision.cpp