This commit is contained in:
锦恢 2025-04-11 00:55:16 +08:00
parent 1b3130ad6c
commit f3677ad60f
3 changed files with 26 additions and 18 deletions

View File

@ -32,6 +32,14 @@
] ]
} }
}, },
"scripts": {
"vscode:prepublish": "webpack --mode production",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
"dependencies": { "dependencies": {
"@modelcontextprotocol/sdk": "^1.9.0", "@modelcontextprotocol/sdk": "^1.9.0",
"axios": "^1.7.7", "axios": "^1.7.7",

View File

@ -1,9 +1,8 @@
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as path from 'path';
import * as fs from 'fs'; import * as fs from 'fs';
import * as fspath from 'path'; import * as fspath from 'path';
import * as OpenMCPService from '../resources/service'; import * as OpenMCPService from '@resources/service';
function getWebviewContent(context: vscode.ExtensionContext, panel?: vscode.WebviewPanel): string | undefined { function getWebviewContent(context: vscode.ExtensionContext, panel?: vscode.WebviewPanel): string | undefined {
const viewRoot = fspath.join(context.extensionPath, 'resources', 'renderer'); const viewRoot = fspath.join(context.extensionPath, 'resources', 'renderer');

View File

@ -1,17 +1,18 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "Node16", "module": "commonjs",
"target": "ES2022", "target": "es6",
"lib": [ "outDir": "./dist",
"ES2022" "rootDir": "./src",
], "strict": true,
"sourceMap": true, "esModuleInterop": true,
"rootDir": "src", "skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"strict": true, /* enable all strict type-checking options */ // 访 resources
/* Additional Checks */ "paths": {
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "@resources/*": ["./resources/*"]
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
} }
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "service", "renderer"]
} }