Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"devDependencies": {
"@cloudflare/vite-plugin": "^0.1.21",
"@cloudflare/workers-types": "^4.20250505.0",
"@modelcontextprotocol/inspector": "0.10.2",
"@playwright/test": "^1.52.0",
"@react-router/dev": "^7.5.2",
"@tailwindcss/postcss": "^4.1.4",
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default defineConfig({
},
{
name: 'MCP Inspector',
command: 'CLIENT_PORT=5174 SERVER_PORT=6277 npx @modelcontextprotocol/inspector',
command: 'CLIENT_PORT=5174 SERVER_PORT=6277 pnpm exec mcp-inspector',
url: 'http://localhost:5174', // Inspector UI URL (matches baseURL)
stdout: 'ignore',
stderr: 'pipe',
Expand Down
1,094 changes: 1,093 additions & 1 deletion pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/api/tools/commonTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { generateServerName } from "../../shared/nameUtils.js";
import {
getCachedFetchDocResult,
cacheFetchDocResult,
withAutoragCache,
} from "../utils/cache.js";

// Define the return type for fetchDocumentation
Expand Down Expand Up @@ -438,7 +439,12 @@ export async function searchRepositoryDocumentationAutoRag({
},
};

const answer = await env.AI.autorag(autoragPipeline).search(searchRequest);
const answer = await withAutoragCache(
autoragPipeline,
searchRequest,
ctx,
() => env.AI.autorag(autoragPipeline).search(searchRequest),
);

let responseText =
`## Query\n\n${query}.\n\n## Response\n\n` ||
Expand Down
16 changes: 0 additions & 16 deletions src/api/tools/repoHandlers/GenericRepoHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import {
searchRepositoryDocumentation,
searchRepositoryCode,
} from "../commonTools.js";
import { incrementRepoViewCount } from "../../utils/badge.js";
import rawMapping from "./generic/static-mapping.json";
import type { ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";

const badgeCountAllowedRepos = ["mcp-ui", "git-mcp"];

class GenericRepoHandler implements RepoHandler {
name = "generic";
Expand Down Expand Up @@ -57,18 +53,6 @@ class GenericRepoHandler implements RepoHandler {
};
}

if (badgeCountAllowedRepos.includes(repo.repo)) {
ctx.waitUntil(
incrementRepoViewCount(
env as CloudflareEnvironment,
repo.owner,
repo.repo,
).catch((err) => {
console.error("Error incrementing repo view count:", err);
}),
);
}

return {
content: [
{
Expand Down
181 changes: 0 additions & 181 deletions src/api/utils/ViewCounterDO.ts

This file was deleted.

Loading
Loading