In-engine AI / MCP session surface for DevTools. 更多...
#include <AiPanel.hpp>
Public 类型 | |
| using | ImGuiDrawer = void(*)(AiPanel &panel) |
Public 成员函数 | |
| AiPanel (const AiPanel &)=delete | |
| AiPanel & | operator= (const AiPanel &)=delete |
| void | setVisible (bool on) |
| bool | isVisible () const |
| void | toggleVisible () |
| void | setMcpPort (int port) |
| int | mcpPort () const |
| void | setMcpConnected (bool on) |
| bool | mcpConnected () const |
| void | setClientName (std::string name) |
| std::string | clientName () const |
| void | clearLog () |
| void | addLog (std::string kind, std::string title, std::string detail={}) |
| void | addNote (std::string text) |
| std::vector< AiLogEntry > | recentLog (size_t max=64) const |
| std::string | formatLog (size_t max=64) const |
| std::string | statusLine () const |
| Compact status line for overlays / MCP resources. | |
| void | drawImGui () |
Optional ImGui draw hook. Default no-op: in-engine AI status is exposed via MCP / eve.dev.ai. ImGui drawing is registered by the host so EVDevTools does not need to include imgui.h. | |
| void | setMaxEntries (size_t n) |
| size_t | maxEntries () const |
静态 Public 成员函数 | |
| static AiPanel & | instance () |
| static void | setImGuiDrawer (ImGuiDrawer fn) |
友元 | |
| template<typename > | |
| struct | Immortal |
详细描述
In-engine AI / MCP session surface for DevTools.
Records recent MCP tool calls and free-form notes so humans (ImGui panel / script API) and agents (MCP resource eve://ai-session) share one log. Drawing is optional — drawImGui() is a no-op when imgui is unavailable.
在文件 AiPanel.hpp 第 27 行定义.
成员类型定义说明
◆ ImGuiDrawer
| using eve::dev::AiPanel::ImGuiDrawer = void (*)(AiPanel& panel) |
在文件 AiPanel.hpp 第 61 行定义.
构造及析构函数说明
◆ AiPanel()
|
delete |
成员函数说明
◆ addLog()
| void eve::dev::AiPanel::addLog | ( | std::string | kind, |
| std::string | title, | ||
| std::string | detail = {} |
||
| ) |
在文件 AiPanel.cpp 第 84 行定义.
引用了 eve::dev::AiLogEntry::detail, eve::dev::AiLogEntry::kind, kind, eve::dev::AiLogEntry::timestamp, eve::dev::AiLogEntry::title , 以及 title.
被这些函数引用 addNote() , 以及 eve::dev::McpServer::listen().
◆ addNote()
| void eve::dev::AiPanel::addNote | ( | std::string | text | ) |
◆ clearLog()
| void eve::dev::AiPanel::clearLog | ( | ) |
在文件 AiPanel.cpp 第 79 行定义.
被这些函数引用 eve::dev::DevTool::exposeScriptApi().
◆ clientName()
| std::string eve::dev::AiPanel::clientName | ( | ) | const |
在文件 AiPanel.cpp 第 74 行定义.
◆ drawImGui()
| void eve::dev::AiPanel::drawImGui | ( | ) |
Optional ImGui draw hook. Default no-op: in-engine AI status is exposed via MCP / eve.dev.ai. ImGui drawing is registered by the host so EVDevTools does not need to include imgui.h.
在文件 AiPanel.cpp 第 140 行定义.
被这些函数引用 eve::dev::DevTool::drawAiPanel().
◆ formatLog()
| std::string eve::dev::AiPanel::formatLog | ( | size_t | max = 64 | ) | const |
◆ instance()
|
static |
◆ isVisible()
| bool eve::dev::AiPanel::isVisible | ( | ) | const |
在文件 AiPanel.cpp 第 42 行定义.
被这些函数引用 eve::dev::DevTool::exposeScriptApi() , 以及 toggleVisible().
◆ maxEntries()
|
inline |
在文件 AiPanel.hpp 第 65 行定义.
◆ mcpConnected()
| bool eve::dev::AiPanel::mcpConnected | ( | ) | const |
在文件 AiPanel.cpp 第 64 行定义.
被这些函数引用 eve::dev::DevTool::exposeScriptApi().
◆ mcpPort()
| int eve::dev::AiPanel::mcpPort | ( | ) | const |
在文件 AiPanel.cpp 第 54 行定义.
被这些函数引用 eve::dev::DevTool::exposeScriptApi().
◆ operator=()
◆ recentLog()
| std::vector< AiLogEntry > eve::dev::AiPanel::recentLog | ( | size_t | max = 64 | ) | const |
在文件 AiPanel.cpp 第 97 行定义.
被这些函数引用 formatLog().
◆ setClientName()
| void eve::dev::AiPanel::setClientName | ( | std::string | name | ) |
在文件 AiPanel.cpp 第 69 行定义.
引用了 name.
◆ setImGuiDrawer()
|
static |
在文件 AiPanel.cpp 第 138 行定义.
引用了 fn.
◆ setMaxEntries()
| void eve::dev::AiPanel::setMaxEntries | ( | size_t | n | ) |
在文件 AiPanel.cpp 第 132 行定义.
引用了 n.
◆ setMcpConnected()
| void eve::dev::AiPanel::setMcpConnected | ( | bool | on | ) |
在文件 AiPanel.cpp 第 59 行定义.
被这些函数引用 eve::dev::McpServer::listen().
◆ setMcpPort()
| void eve::dev::AiPanel::setMcpPort | ( | int | port | ) |
在文件 AiPanel.cpp 第 49 行定义.
被这些函数引用 eve::dev::McpServer::listen().
◆ setVisible()
| void eve::dev::AiPanel::setVisible | ( | bool | on | ) |
在文件 AiPanel.cpp 第 37 行定义.
被这些函数引用 eve::dev::DevTool::exposeScriptApi() , 以及 toggleVisible().
◆ statusLine()
| std::string eve::dev::AiPanel::statusLine | ( | ) | const |
Compact status line for overlays / MCP resources.
在文件 AiPanel.cpp 第 117 行定义.
被这些函数引用 eve::dev::DevTool::exposeScriptApi().
◆ toggleVisible()
| void eve::dev::AiPanel::toggleVisible | ( | ) |
在文件 AiPanel.cpp 第 47 行定义.
引用了 isVisible() , 以及 setVisible().
被这些函数引用 eve::dev::DevTool::exposeScriptApi().
友元及相关函数文档
◆ Immortal
|
friend |
在文件 AiPanel.hpp 第 69 行定义.
该类的文档由以下文件生成:
- src/engine/devtools/AiPanel.hpp
- src/engine/devtools/AiPanel.cpp