@atlisp/mcp 1.6.1 → 1.6.2
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/atlisp-mcp.js +1 -1
- package/dist/cad-worker.js +14 -14
- package/package.json +1 -1
package/dist/atlisp-mcp.js
CHANGED
|
@@ -22,7 +22,7 @@ var FILE_EXTENSIONS = {
|
|
|
22
22
|
"BricsCAD": [".des"]
|
|
23
23
|
};
|
|
24
24
|
var SERVER_NAME = "atlisp-mcp-server";
|
|
25
|
-
var SERVER_VERSION = "1.
|
|
25
|
+
var SERVER_VERSION = "1.6.2";
|
|
26
26
|
var MOCK_PACKAGES = [
|
|
27
27
|
{ name: "base", description: "\u57FA\u7840\u51FD\u6570\u5E93", version: "1.0.0" },
|
|
28
28
|
{ name: "at-pm", description: "\u5DE5\u7A0B\u9879\u76EE\u7BA1\u7406", version: "2.1.0" },
|
package/dist/cad-worker.js
CHANGED
|
@@ -46,7 +46,7 @@ const cadConnect = edge.func(function() {/*
|
|
|
46
46
|
System.Diagnostics.Debug.WriteLine("GStarCAD connect error: " + ex.Message);
|
|
47
47
|
}
|
|
48
48
|
try {
|
|
49
|
-
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject("
|
|
49
|
+
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject("Bricscadapp.cadApplication");
|
|
50
50
|
if (cad != null) {
|
|
51
51
|
string ver = cad.Version.ToString();
|
|
52
52
|
return new { success = true, platform = "BricsCAD", version = ver };
|
|
@@ -61,7 +61,7 @@ const cadConnect = edge.func(function() {/*
|
|
|
61
61
|
const cadLaunch = edge.func(function() {/*
|
|
62
62
|
async (input) => {
|
|
63
63
|
string[] platforms = { "AutoCAD", "ZWCAD", "GStarCAD", "BricsCAD" };
|
|
64
|
-
string[] progIds = { "AutoCAD.Application", "ZWCAD.Application", "GStarCAD.Application", "
|
|
64
|
+
string[] progIds = { "AutoCAD.Application", "ZWCAD.Application", "GStarCAD.Application", "Bricscadapp.cadApplication" };
|
|
65
65
|
|
|
66
66
|
for (int i = 0; i < platforms.Length; i++) {
|
|
67
67
|
try {
|
|
@@ -101,9 +101,9 @@ const cadSend = edge.func(function() {/*
|
|
|
101
101
|
async (input) => {
|
|
102
102
|
try {
|
|
103
103
|
dynamic d = input;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
string code = d.code.ToString();
|
|
105
|
+
string platform = d.platform.ToString();
|
|
106
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
107
107
|
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject(progId);
|
|
108
108
|
if (cad != null) {
|
|
109
109
|
dynamic doc = cad.ActiveDocument;
|
|
@@ -128,9 +128,9 @@ const cadSendWithResult = edge.func(function() {/*
|
|
|
128
128
|
dynamic d = input;
|
|
129
129
|
string code = d.code.ToString();
|
|
130
130
|
string platform = d.platform.ToString();
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
string encoding = d.encoding != null ? d.encoding.ToString() : "";
|
|
132
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
133
|
+
string tempDir = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "@lisp", "tmp");
|
|
134
134
|
System.IO.Directory.CreateDirectory(tempDir);
|
|
135
135
|
|
|
136
136
|
tempFile = System.IO.Path.Combine(tempDir, "atlisp_result_" + System.Guid.NewGuid().ToString("N") + ".txt");
|
|
@@ -262,7 +262,7 @@ const cadIsBusy = edge.func(function() {/*
|
|
|
262
262
|
async (input) => {
|
|
263
263
|
try {
|
|
264
264
|
string platform = input.ToString();
|
|
265
|
-
string progId = platform + ".Application";
|
|
265
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
266
266
|
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject(progId);
|
|
267
267
|
if (cad != null) {
|
|
268
268
|
bool isBusy = false;
|
|
@@ -284,7 +284,7 @@ const cadHasDoc = edge.func(function() {/*
|
|
|
284
284
|
async (input) => {
|
|
285
285
|
try {
|
|
286
286
|
string platform = input.ToString();
|
|
287
|
-
string progId = platform + ".Application";
|
|
287
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
288
288
|
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject(progId);
|
|
289
289
|
if (cad != null) {
|
|
290
290
|
int docCount = cad.Documents.Count;
|
|
@@ -301,7 +301,7 @@ const cadNewDoc = edge.func(function() {/*
|
|
|
301
301
|
async (input) => {
|
|
302
302
|
try {
|
|
303
303
|
string platform = input.ToString();
|
|
304
|
-
string progId = platform + ".Application";
|
|
304
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
305
305
|
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject(progId);
|
|
306
306
|
if (cad != null) {
|
|
307
307
|
cad.Documents.Add();
|
|
@@ -319,7 +319,7 @@ const cadBringToFront = edge.func(function() {/*
|
|
|
319
319
|
async (input) => {
|
|
320
320
|
try {
|
|
321
321
|
string platform = input.ToString();
|
|
322
|
-
string progId = platform + ".Application";
|
|
322
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
323
323
|
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject(progId);
|
|
324
324
|
if (cad != null) {
|
|
325
325
|
cad.Visible = true;
|
|
@@ -337,7 +337,7 @@ const cadConnectByName = edge.func(function() {/*
|
|
|
337
337
|
async (input) => {
|
|
338
338
|
try {
|
|
339
339
|
string platform = input.ToString();
|
|
340
|
-
string progId = platform + ".Application";
|
|
340
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
341
341
|
dynamic cad = System.Runtime.InteropServices.Marshal.GetActiveObject(progId);
|
|
342
342
|
if (cad != null) {
|
|
343
343
|
string ver = cad.Version.ToString();
|
|
@@ -348,7 +348,7 @@ const cadConnectByName = edge.func(function() {/*
|
|
|
348
348
|
}
|
|
349
349
|
try {
|
|
350
350
|
string platform = input.ToString();
|
|
351
|
-
string progId = platform + ".Application";
|
|
351
|
+
string progId = platform == "BricsCAD" ? "Bricscadapp.cadApplication" : platform + ".Application";
|
|
352
352
|
var type = System.Type.GetTypeFromProgID(progId);
|
|
353
353
|
if (type != null) {
|
|
354
354
|
dynamic cad = System.Activator.CreateInstance(type);
|