Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build
.nx
.idea
.vscode
.cursor
.zed
# Logs

Expand Down
75 changes: 59 additions & 16 deletions app/components/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,15 @@ export default function Content({
<div id="tab-cursor" className="tab-content">
<div className="bg-slate-50 p-3 sm:p-4 rounded-md border border-slate-200">
<p className="text-sm text-slate-700 mb-2">
To add this MCP to Cursor, update your{" "}
<code className="bg-slate-200 px-1.5 py-0.5 rounded text-blue-700 break-words">
~/.cursor/mcp.json
</code>
:
To add this MCP to Cursor, update your config file at:
</p>
<OSPaths
paths={[
{ os: "macOS", path: "~/.cursor/mcp.json" },
{ os: "Windows", path: "%USERPROFILE%\\.cursor\\mcp.json" },
{ os: "Linux", path: "~/.cursor/mcp.json" },
]}
/>
<CodeExample
code={`{
"mcpServers": {
Expand Down Expand Up @@ -344,12 +347,24 @@ export default function Content({
<div id="tab-windsurf" className="tab-content hidden">
<div className="bg-slate-50 p-3 sm:p-4 rounded-md border border-slate-200">
<p className="text-sm text-slate-700 mb-2">
To add this MCP to Windsurf, update your{" "}
<code className="bg-slate-200 px-1.5 py-0.5 rounded text-blue-700 break-words">
~/.codeium/windsurf/mcp_config.json
</code>
:
To add this MCP to Windsurf, update your config file at:
</p>
<OSPaths
paths={[
{
os: "macOS",
path: "~/.codeium/windsurf/mcp_config.json",
},
{
os: "Windows",
path: "%APPDATA%\\Codeium\\windsurf\\mcp_config.json",
},
{
os: "Linux",
path: "~/.codeium/windsurf/mcp_config.json",
},
]}
/>
<CodeExample
code={`{
"mcpServers": {
Expand Down Expand Up @@ -392,13 +407,24 @@ export default function Content({
<div id="tab-cline" className="tab-content hidden">
<div className="bg-slate-50 p-3 sm:p-4 rounded-md border border-slate-200">
<p className="text-sm text-slate-700 mb-2">
To add this MCP to Cline, update your{" "}
<code className="bg-slate-200 px-1.5 py-0.5 rounded text-blue-700 break-words">
~/Library/Application
Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
</code>
:
To add this MCP to Cline, update your config file at:
</p>
<OSPaths
paths={[
{
os: "macOS",
path: "~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
},
{
os: "Windows",
path: "%APPDATA%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json",
},
{
os: "Linux",
path: "~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
},
]}
/>
<CodeExample
code={`{
"mcpServers": {
Expand Down Expand Up @@ -773,3 +799,20 @@ function CodeExample({
</div>
);
}

function OSPaths({ paths }: { paths: Array<{ os: string; path: string }> }) {
return (
<div className="mb-3">
<ul className="text-sm text-slate-700 list-disc pl-5 space-y-1">
{paths.map(({ os, path }) => (
<li key={os}>
<span className="font-medium">{os}:</span>{" "}
<code className="bg-slate-200 px-1.5 py-0.5 rounded text-blue-700 break-words">
{path}
</code>
</li>
))}
</ul>
</div>
);
}
98 changes: 98 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/api/tools/commonTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,15 @@ export async function searchRepositoryDocumentationAutoRag({
score_threshold: 0.4,
},
filters: {
type: "and",
type: "and" as const,
filters: [
{
type: "gte",
type: "gte" as const,
key: "folder",
value: `${repoPrefix}`,
},
{
type: "lte",
type: "lte" as const,
key: "folder",
value: `${repoPrefix}~`,
},
Expand Down
2 changes: 1 addition & 1 deletion src/api/tools/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("Tools Module", () => {
},
fetchUsageCodeExamples: {
description:
"Fetch code examples that use the given function. Use it when the user asks about code example or how to use his function. Returns code snippets that demonstrate how to call this function.",
"Fetch code examples that use the given function. Use it when the user asks about code example or how to use his function. Returns code snippets that demonstrate how to calls this function.",
Copy link
Preview

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammatical error: 'how to calls this function' should be 'how to call this function'.

Suggested change
"Fetch code examples that use the given function. Use it when the user asks about code example or how to use his function. Returns code snippets that demonstrate how to calls this function.",
"Fetch code examples that use the given function. Use it when the user asks about code example or how to use his function. Returns code snippets that demonstrate how to call this function.",

Copilot uses AI. Check for mistakes.

},
},
},
Expand Down
10 changes: 8 additions & 2 deletions src/api/tools/repoHandlers/graphTools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { getGraphService } from "./graphTools";
import path from "path";

// Comprehensive test suite for all 8 fetchUsageCodeExamples scenarios using real data
describe("fetchUsageCodeExamples - All 8 Scenarios with Real Data", () => {
const shouldRunGraphTests = process.env.RUN_GRAPH_TESTS === "1";

const describeMaybe = shouldRunGraphTests ? describe : describe.skip;

describeMaybe("fetchUsageCodeExamples - All 8 Scenarios with Real Data", () => {
let client: FalkorDB;
let graphService: any;

Expand All @@ -31,8 +35,10 @@ describe("fetchUsageCodeExamples - All 8 Scenarios with Real Data", () => {
};

beforeAll(async () => {
const host = process.env.FALKORDB_HOST || "127.0.0.1";
const port = parseInt(process.env.FALKORDB_PORT || "6379");
client = await FalkorDB.connect({
socket: { host: "localhost", port: 6379 },
socket: { host, port },
});
graphService = getGraphService();
});
Expand Down
6 changes: 4 additions & 2 deletions src/api/tools/repoHandlers/graphTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ export { getGlobalCreationRegistry };
* Create a new FalkorDB connection with standard configuration
*/
export async function createFalkorDBConnection(): Promise<FalkorDB> {
const host = process.env.FALKORDB_HOST || "127.0.0.1";
const port = parseInt(process.env.FALKORDB_PORT || "6379");
return await FalkorDB.connect({
socket: {
host: "localhost",
port: 6379,
host,
port,
noDelay: false,
keepAlive: false,
},
Expand Down
Loading
Loading