File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Conventions
2+
3+ ## Aider Integration
4+
5+ To use Aider with codebase-memory-mcp, follow these steps:
6+
7+ 1 . Install the Aider integration by running ` npm install @aider/ai `
8+ 2 . Update the ` graph-ui/src/api/rpc.ts ` file to include the Aider integration
9+ 3 . Run the installation script to complete the setup
10+
11+ ## RPC API
12+
13+ The RPC API for Aider integration is defined in ` graph-ui/src/api/rpc.ts ` . It provides the following methods:
14+
15+ * ` indexRepository() ` : Indexes the repository
16+ * ` searchGraph(query: string) ` : Searches the graph for a query
17+ * ` tracePath(query: string) ` : Traces a path in the graph for a query
Original file line number Diff line number Diff line change 1+ /**
2+ * RPC API for Aider integration
3+ */
4+ import { RPC } from './rpc' ;
5+
6+ interface AiderIntegration {
7+ indexRepository : ( ) => void ;
8+ searchGraph : ( query : string ) => void ;
9+ tracePath : ( query : string ) => void ;
10+ }
11+
12+ class AiderRPC extends RPC {
13+ private aiderIntegration : AiderIntegration ;
14+
15+ constructor ( aiderIntegration : AiderIntegration ) {
16+ super ( ) ;
17+ this . aiderIntegration = aiderIntegration ;
18+ }
19+
20+ indexRepository ( ) : void {
21+ this . aiderIntegration . indexRepository ( ) ;
22+ }
23+
24+ searchGraph ( query : string ) : void {
25+ this . aiderIntegration . searchGraph ( query ) ;
26+ }
27+
28+ tracePath ( query : string ) : void {
29+ this . aiderIntegration . tracePath ( query ) ;
30+ }
31+ }
32+
33+ export { AiderRPC } ;
Original file line number Diff line number Diff line change 1+ # Add Aider integration to RPC API
2+ $aiderIntegration = Get-Content - Path graph- ui/ src/ api/ rpc.ts | Select-String - Pattern ' (?<=AiderIntegration {).*?(?=})'
3+ $aiderIntegration = $aiderIntegration.Matches.Value
4+ $aiderIntegration = $aiderIntegration -replace ' }$'
5+ $aiderIntegration = " $aiderIntegration }"
6+ $aiderIntegration = " }"
7+ $aiderIntegration = " AiderIntegration { $aiderIntegration "
8+
9+ Set-Content - Path graph- ui/ src/ api/ rpc.ts - Value ($aiderIntegration + (Get-Content - Path graph- ui/ src/ api/ rpc.ts))
10+
11+ # Install Aider integration
12+ npm install @aider / ai
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Add Aider integration to RPC API
4+ AIDER_INTEGRATION=$( cat graph-ui/src/api/rpc.ts | grep -oP ' (?<=AiderIntegration {).*?(?=})' )
5+ sed -i " s/}/\n$AIDER_INTEGRATION }/g" graph-ui/src/api/rpc.ts
6+
7+ # Install Aider integration
8+ npm install @aider/ai
You can’t perform that action at this time.
0 commit comments