@t2000/engine 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -261,6 +261,11 @@ function hasNaviMcp(context) {
|
|
|
261
261
|
const mgr = context.mcpManager;
|
|
262
262
|
return mgr.isConnected(NAVI_SERVER_NAME);
|
|
263
263
|
}
|
|
264
|
+
function hasNaviMcpGlobal(context) {
|
|
265
|
+
if (!context.mcpManager) return false;
|
|
266
|
+
const mgr = context.mcpManager;
|
|
267
|
+
return mgr.isConnected(NAVI_SERVER_NAME);
|
|
268
|
+
}
|
|
264
269
|
function getMcpManager(context) {
|
|
265
270
|
return context.mcpManager;
|
|
266
271
|
}
|
|
@@ -874,7 +879,7 @@ var ratesInfoTool = buildTool({
|
|
|
874
879
|
jsonSchema: { type: "object", properties: {}, required: [] },
|
|
875
880
|
isReadOnly: true,
|
|
876
881
|
async call(_input, context) {
|
|
877
|
-
if (
|
|
882
|
+
if (hasNaviMcpGlobal(context)) {
|
|
878
883
|
const rates2 = await fetchRates(getMcpManager(context));
|
|
879
884
|
return { data: rates2, displayText: formatRatesSummary(rates2) };
|
|
880
885
|
}
|