25#include <nlohmann/json.hpp>
67 explicit McpToolError(
const std::string &msg) : std::runtime_error(msg) {}
113 m_isMaximaConnected = std::move(isConnected);
130 std::function<
bool(
const wxString &,
bool)> setVisible)
132 m_listSidebars = std::move(list);
133 m_setSidebarVisible = std::move(setVisible);
140 nlohmann::json
CallTool(
const wxString &name,
141 const nlohmann::json &arguments)
const;
143 nlohmann::json ListCells()
const;
144 nlohmann::json ReadCell(
const nlohmann::json &arguments)
const;
145 nlohmann::json ReadWorksheet()
const;
146 nlohmann::json ReadToc()
const;
147 nlohmann::json ReadSection(
const nlohmann::json &arguments)
const;
148 nlohmann::json ReadVariables()
const;
156 nlohmann::json WatchVariable(
const nlohmann::json &arguments)
const;
157 nlohmann::json UnwatchVariable(
const nlohmann::json &arguments)
const;
163 nlohmann::json
SearchCells(
const nlohmann::json &arguments)
const;
182 nlohmann::json
ShowSidebar(
const nlohmann::json &arguments)
const;
185 nlohmann::json
HideSidebar(
const nlohmann::json &arguments)
const;
206 std::function<bool()> m_isMaximaConnected;
208 std::function<std::vector<McpSidebarInfo>()> m_listSidebars;
209 std::function<bool(
const wxString &,
bool)> m_setSidebarVisible;
218 nlohmann::json SetSidebarVisible(
const nlohmann::json &arguments,
221 void RequireSidebarAccess()
const;
224 GroupCell *FindGroupByUUID(
const wxString &uuid)
const;
226 static wxString GroupTypeName(
int groupType);
228 static wxString InputText(
GroupCell &cell);
230 static wxString OutputText(
GroupCell &cell);
232 nlohmann::json CellSummary(
GroupCell &cell,
int index)
const;
237 wxString CellText(
GroupCell &cell)
const;
254 bool MaximaIsBusy()
const;
264 bool IsMaximaConnected()
const
266 return !m_isMaximaConnected || m_isMaximaConnected();
269 static wxString CapLength(wxString text);
274 static wxString TruncateText(
const wxString &text, std::size_t maxLen,
275 bool fromEnd,
bool &wasTruncated);
277 static wxString RequireString(
const nlohmann::json &arguments,
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:88
A "variables" sidepane.
Definition: VariablesPane.h:45
The canvas that contains the spreadsheet the whole program is about.
Definition: Worksheet.h:118