@@ -7,18 +7,18 @@ async function testAgent() {
7
7
try {
8
8
await codebolt . waitForConnection ( ) ;
9
9
10
- // console.log('\n1. Testing agent list retrieval...');
11
- // try {
12
- // const agentsListResult = await codebolt.agent.getAgentsList('downloaded');
13
- // console.log('✅ Agents list result:', agentsListResult);
14
- // console.log(' - Type:', agentsListResult?.type);
15
- // console.log(' - Agents count:', agentsListResult?.agents?.length || 0);
16
- // if (agentsListResult?.agents?.length > 0) {
17
- // console.log(' - First agent:', agentsListResult.agents[0]);
18
- // }
19
- // } catch (error) {
20
- // console.log('⚠️ Agent list retrieval failed:', error.message);
21
- // }
10
+ console . log ( '\n1. Testing agent list retrieval...' ) ;
11
+ try {
12
+ const agentsListResult = await codebolt . agent . getAgentsList ( 'downloaded' ) ;
13
+ console . log ( '✅ Agents list result:' , agentsListResult ) ;
14
+ console . log ( ' - Type:' , agentsListResult ?. type ) ;
15
+ console . log ( ' - Agents count:' , agentsListResult ?. agents ?. length || 0 ) ;
16
+ if ( agentsListResult ?. agents ?. length > 0 ) {
17
+ console . log ( ' - First agent:' , agentsListResult . agents [ 0 ] ) ;
18
+ }
19
+ } catch ( error ) {
20
+ console . log ( '⚠️ Agent list retrieval failed:' , error . message ) ;
21
+ }
22
22
23
23
// console.log('\n2. Testing all agents list...');
24
24
// try {
@@ -69,25 +69,25 @@ async function testAgent() {
69
69
console . log ( '⚠️ getAgentsDetail failed:' , error . message ) ;
70
70
}
71
71
72
- // console.log('\n5. Testing agent finding by task...');
73
- // const testTask = 'Run project ';
74
- // try {
75
- // const findAgentResult = await codebolt.agent.findAgent(
76
- // testTask,
77
- // 3, // maxResult
78
- // [], // agents filter
79
- // 'all ', // agentLocation
80
- // 'use_both' // getFrom
81
- // );
82
- // console.log('✅ Find agent result:', findAgentResult);
83
- // console.log(' - Task:', testTask);
84
- // console.log(' - Found agents count:', findAgentResult?.agents?.length || 0);
85
- // if (findAgentResult?.agents?.length > 0) {
86
- // console.log(' - Best match:', findAgentResult.agents[0]);
87
- // }
88
- // } catch (error) {
89
- // console.log('⚠️ Agent finding failed:', error.message);
90
- // }
72
+ console . log ( '\n5. Testing agent finding by task...' ) ;
73
+ const testTask = 'create node js app ' ;
74
+ try {
75
+ const findAgentResult = await codebolt . agent . findAgent (
76
+ testTask ,
77
+ 3 , // maxResult
78
+ [ ] , // agents filter
79
+ 'remote_only ', // agentLocation
80
+ 'use_both' // getFrom
81
+ ) ;
82
+ console . log ( '✅ Find agent result:' , findAgentResult ) ;
83
+ console . log ( ' - Task:' , testTask ) ;
84
+ console . log ( ' - Found agents count:' , findAgentResult ?. agents ?. length || 0 ) ;
85
+ if ( findAgentResult ?. agents ?. length > 0 ) {
86
+ console . log ( ' - Best match:' , findAgentResult . agents [ 0 ] ) ;
87
+ }
88
+ } catch ( error ) {
89
+ console . log ( '⚠️ Agent finding failed:' , error . message ) ;
90
+ }
91
91
92
92
// console.log('\n6. Testing agent finding with different parameters...');
93
93
// const analysisTask = 'Analyze data and provide insights';
0 commit comments