@devness/useai 0.5.20 → 0.5.21
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 +8 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2681,7 +2681,7 @@ var VERSION;
|
|
|
2681
2681
|
var init_version = __esm({
|
|
2682
2682
|
"../shared/dist/constants/version.js"() {
|
|
2683
2683
|
"use strict";
|
|
2684
|
-
VERSION = "0.5.
|
|
2684
|
+
VERSION = "0.5.21";
|
|
2685
2685
|
}
|
|
2686
2686
|
});
|
|
2687
2687
|
|
|
@@ -36299,21 +36299,24 @@ var init_session_state = __esm({
|
|
|
36299
36299
|
|
|
36300
36300
|
// src/mcp-map.ts
|
|
36301
36301
|
import { join as join7 } from "path";
|
|
36302
|
+
function mcpMapPath() {
|
|
36303
|
+
return join7(DATA_DIR, "mcp-map.json");
|
|
36304
|
+
}
|
|
36302
36305
|
function readMcpMap() {
|
|
36303
|
-
return readJson(
|
|
36306
|
+
return readJson(mcpMapPath(), {});
|
|
36304
36307
|
}
|
|
36305
36308
|
function writeMcpMapping(mcpSessionId, useaiSessionId) {
|
|
36306
36309
|
if (!mcpSessionId) return;
|
|
36307
36310
|
const map = readMcpMap();
|
|
36308
36311
|
map[mcpSessionId] = useaiSessionId;
|
|
36309
|
-
writeJson(
|
|
36312
|
+
writeJson(mcpMapPath(), map);
|
|
36310
36313
|
}
|
|
36311
36314
|
function removeMcpMapping(mcpSessionId) {
|
|
36312
36315
|
if (!mcpSessionId) return;
|
|
36313
36316
|
const map = readMcpMap();
|
|
36314
36317
|
if (mcpSessionId in map) {
|
|
36315
36318
|
delete map[mcpSessionId];
|
|
36316
|
-
writeJson(
|
|
36319
|
+
writeJson(mcpMapPath(), map);
|
|
36317
36320
|
}
|
|
36318
36321
|
}
|
|
36319
36322
|
function removeMcpMappingByUseaiId(useaiSessionId) {
|
|
@@ -36325,14 +36328,12 @@ function removeMcpMappingByUseaiId(useaiSessionId) {
|
|
|
36325
36328
|
changed = true;
|
|
36326
36329
|
}
|
|
36327
36330
|
}
|
|
36328
|
-
if (changed) writeJson(
|
|
36331
|
+
if (changed) writeJson(mcpMapPath(), map);
|
|
36329
36332
|
}
|
|
36330
|
-
var MCP_MAP_FILE;
|
|
36331
36333
|
var init_mcp_map = __esm({
|
|
36332
36334
|
"src/mcp-map.ts"() {
|
|
36333
36335
|
"use strict";
|
|
36334
36336
|
init_dist8();
|
|
36335
|
-
MCP_MAP_FILE = join7(DATA_DIR, "mcp-map.json");
|
|
36336
36337
|
}
|
|
36337
36338
|
});
|
|
36338
36339
|
|