Merge branch 'main' into notification-expansion-state

This commit is contained in:
Ola Hungerford 2025-07-06 19:59:18 -07:00 • committed by GitHub
commit aa73daaa60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 19 additions and 15 deletions

View file

@ -21,8 +21,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
id: setup_node
with:
node-version: 18
node-version-file: package.json
cache: npm
# Cache Playwright browsers
- name: Cache Playwright browsers
@ -69,7 +71,7 @@ jobs:
job-summary: true
icon-style: "emojis"
custom-info: |
**Test Environment:** Ubuntu Latest, Node.js 18
**Test Environment:** Ubuntu Latest, Node.js ${{ steps.setup_node.outputs.node-version }}
**Browsers:** Chromium, Firefox
📊 [View Detailed HTML Report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) (download artifacts)

View file

@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: package.json
cache: npm
# Working around https://github.com/npm/cli/issues/4828
@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: package.json
cache: npm
registry-url: "https://registry.npmjs.org"

1
.node-version Normal file
View file

@ -0,0 +1 @@
22.x.x

View file

@ -7,7 +7,7 @@
<title>MCP Inspector</title>
</head>
<body>
<div id="root"></div>
<div id="root" class="w-full"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

View file

@ -1,7 +1,3 @@
#root {
margin: 0 auto;
}
.logo {
height: 6em;
padding: 1.5em;

View file

@ -14,8 +14,9 @@ const getSearchParam = (key: string): string | null => {
};
export const getMCPProxyAddress = (config: InspectorConfig): string => {
const proxyFullAddress = config.MCP_PROXY_FULL_ADDRESS.value as string;
let proxyFullAddress = config.MCP_PROXY_FULL_ADDRESS.value as string;
if (proxyFullAddress) {
proxyFullAddress = proxyFullAddress.replace(/\/+$/, "");
return proxyFullAddress;
}

3
package-lock.json generated
View file

@ -37,6 +37,9 @@
"prettier": "3.3.3",
"rimraf": "^6.0.1",
"typescript": "^5.4.2"
},
"engines": {
"node": ">=22.7.5"
}
},
"cli": {

View file

@ -64,5 +64,8 @@
"prettier": "3.3.3",
"rimraf": "^6.0.1",
"typescript": "^5.4.2"
},
"engines": {
"node": ">=22.7.5"
}
}

View file

@ -6,12 +6,10 @@ function onClientError(error: Error) {
}
function onServerError(error: Error) {
if (
(error?.message &&
error.message.includes("Error POSTing to endpoint (HTTP 404)")) ||
(error?.cause && JSON.stringify(error.cause).includes("ECONNREFUSED"))
) {
if (error?.cause && JSON.stringify(error.cause).includes("ECONNREFUSED")) {
console.error("Connection refused. Is the MCP server running?");
} else if (error.message && error.message.includes("404")) {
console.error("Error accessing endpoint (HTTP 404)");
} else {
console.error("Error from MCP server:", error);
}