forked from anthropics/claude-code
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-cluster-commands.js
More file actions
49 lines (38 loc) · 1.87 KB
/
Copy pathtest-cluster-commands.js
File metadata and controls
49 lines (38 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env node
import { GraphCommands } from './src/graph/GraphCommands.js';
async function testClusterCommands() {
console.log('🧪 Testing cluster commands integration...\n');
const rootPath = '/home/riley/Programming/open_spiel/open_spiel';
const commands = new GraphCommands(rootPath);
try {
// Initialize
console.log('1. Initializing...');
await commands.initialize();
console.log('✅ Initialized\n');
// Test /clusters command
console.log('2. Testing /clusters command...');
const clustersResult = await commands.executeCommand('/clusters', ['--limit=5']);
console.log(`Result type: ${clustersResult.type}`);
console.log(`Content preview: ${clustersResult.content.substring(0, 200)}...\n`);
// Test /cluster expand command
console.log('3. Testing /cluster c0 command...');
const clusterResult = await commands.executeCommand('/cluster', ['c0']);
console.log(`Result type: ${clusterResult.type}`);
console.log(`Content preview: ${clusterResult.content.substring(0, 200)}...\n`);
// Test /csearch command
console.log('4. Testing /csearch command...');
const searchResult = await commands.executeCommand('/csearch', ['test']);
console.log(`Result type: ${searchResult.type}`);
console.log(`Content preview: ${searchResult.content.substring(0, 200)}...\n`);
// Test /cfile command
console.log('5. Testing /cfile command...');
const fileResult = await commands.executeCommand('/cfile', ['download_cache/double_dummy_solver/examples/AnalyseAllPlaysBin.cpp']);
console.log(`Result type: ${fileResult.type}`);
console.log(`Content preview: ${fileResult.content.substring(0, 200)}...\n`);
console.log('✅ All cluster commands working!');
} catch (error) {
console.error('❌ Error:', error.message);
console.error(error.stack);
}
}
testClusterCommands();