File tree Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class UserMessage {
63
63
else {
64
64
let finalPrompt = `
65
65
The user has sent the following query:
66
- ${ this . message . userMessage } .
66
+ <user_query> ${ this . message . userMessage } </user_query> .
67
67
` ;
68
68
if ( ( _a = this . message . mentionedFiles ) === null || _a === void 0 ? void 0 : _a . length ) {
69
69
finalPrompt += `The Attached files are:` ;
@@ -105,8 +105,11 @@ class UserMessage {
105
105
* @returns Promise with an array of MCP tools
106
106
*/
107
107
async getMentionedMcpsTools ( ) {
108
+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
108
109
if ( this . mentionedMCPs . length > 0 ) {
110
+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
109
111
let tools = await tools_1 . default . listToolsFromToolBoxes ( this . mentionedMCPs ) ;
112
+ console . log ( "tools" , tools ) ;
110
113
return tools ;
111
114
}
112
115
else {
Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ class cbws {
53
53
const agentIdParam = process . env . agentId ? `&agentId=${ process . env . agentId } ` : '' ;
54
54
const parentIdParam = process . env . parentId ? `&parentId=${ process . env . parentId } ` : '' ;
55
55
const parentAgentInstanceIdParam = process . env . parentAgentInstanceId ? `&parentAgentInstanceId=${ process . env . parentAgentInstanceId } ` : '' ;
56
- this . websocket = new ws_1 . default ( `ws://localhost:${ process . env . SOCKET_PORT } /codebolt?id=${ uniqueConnectionId } ${ agentIdParam } ${ parentIdParam } ${ parentAgentInstanceIdParam } ${ process . env . Is_Dev ? '&dev=true' : '' } ` ) ;
56
+ const agentTask = process . env . agentTask ? `&agentTask=${ process . env . agentTask } ` : '' ;
57
+ this . websocket = new ws_1 . default ( `ws://localhost:${ process . env . SOCKET_PORT } /codebolt?id=${ uniqueConnectionId } ${ agentIdParam } ${ parentIdParam } ${ parentAgentInstanceIdParam } ${ agentTask } ${ process . env . Is_Dev ? '&dev=true' : '' } ` ) ;
57
58
return new Promise ( ( resolve , reject ) => {
58
59
this . websocket . on ( 'error' , ( error ) => {
59
60
reject ( error ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @codebolt/codeboltjs" ,
3
- "version" : " 2.0.0 " ,
3
+ "version" : " 2.0.1 " ,
4
4
"description" : " " ,
5
5
"keywords" : [],
6
6
"author" : " " ,
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ class UserMessage {
76
76
*/
77
77
constructor ( message : Message , promptOverride : boolean = false ) {
78
78
this . message = message ;
79
+
79
80
this . promptOverride = promptOverride ;
80
81
this . userMessages = [ ] ;
81
82
this . mentionedMCPs = message . mentionedMCPs || [ ] ;
@@ -108,7 +109,7 @@ class UserMessage {
108
109
} else {
109
110
let finalPrompt = `
110
111
The user has sent the following query:
111
- ${ this . message . userMessage } .
112
+ <user_query> ${ this . message . userMessage } </user_query> .
112
113
` ;
113
114
if ( this . message . mentionedFiles ?. length ) {
114
115
finalPrompt += `The Attached files are:` ;
@@ -155,8 +156,11 @@ class UserMessage {
155
156
* @returns Promise with an array of MCP tools
156
157
*/
157
158
async getMentionedMcpsTools ( ) {
159
+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
158
160
if ( this . mentionedMCPs . length > 0 ) {
161
+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
159
162
let tools = await mcp . listToolsFromToolBoxes ( this . mentionedMCPs )
163
+ console . log ( "tools" , tools ) ;
160
164
return tools
161
165
}
162
166
else {
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ class cbws {
56
56
const agentIdParam = process . env . agentId ? `&agentId=${ process . env . agentId } ` : '' ;
57
57
const parentIdParam = process . env . parentId ? `&parentId=${ process . env . parentId } ` : '' ;
58
58
const parentAgentInstanceIdParam = process . env . parentAgentInstanceId ? `&parentAgentInstanceId=${ process . env . parentAgentInstanceId } ` : '' ;
59
- this . websocket = new WebSocket ( `ws://localhost:${ process . env . SOCKET_PORT } /codebolt?id=${ uniqueConnectionId } ${ agentIdParam } ${ parentIdParam } ${ parentAgentInstanceIdParam } ${ process . env . Is_Dev ? '&dev=true' : '' } ` ) ;
59
+ const agentTask = process . env . agentTask ? `&agentTask=${ process . env . agentTask } ` : '' ;
60
+ this . websocket = new WebSocket ( `ws://localhost:${ process . env . SOCKET_PORT } /codebolt?id=${ uniqueConnectionId } ${ agentIdParam } ${ parentIdParam } ${ parentAgentInstanceIdParam } ${ agentTask } ${ process . env . Is_Dev ? '&dev=true' : '' } ` ) ;
60
61
61
62
return new Promise ( ( resolve , reject ) => {
62
63
this . websocket . on ( 'error' , ( error : Error ) => {
You can’t perform that action at this time.
0 commit comments