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 {
6363 else {
6464 let finalPrompt = `
6565 The user has sent the following query:
66- ${ this . message . userMessage } .
66+ <user_query> ${ this . message . userMessage } </user_query> .
6767 ` ;
6868 if ( ( _a = this . message . mentionedFiles ) === null || _a === void 0 ? void 0 : _a . length ) {
6969 finalPrompt += `The Attached files are:` ;
@@ -105,8 +105,11 @@ class UserMessage {
105105 * @returns Promise with an array of MCP tools
106106 */
107107 async getMentionedMcpsTools ( ) {
108+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
108109 if ( this . mentionedMCPs . length > 0 ) {
110+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
109111 let tools = await tools_1 . default . listToolsFromToolBoxes ( this . mentionedMCPs ) ;
112+ console . log ( "tools" , tools ) ;
110113 return tools ;
111114 }
112115 else {
Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ class cbws {
5353 const agentIdParam = process . env . agentId ? `&agentId=${ process . env . agentId } ` : '' ;
5454 const parentIdParam = process . env . parentId ? `&parentId=${ process . env . parentId } ` : '' ;
5555 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' : '' } ` ) ;
5758 return new Promise ( ( resolve , reject ) => {
5859 this . websocket . on ( 'error' , ( error ) => {
5960 reject ( error ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @codebolt/codeboltjs" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "description" : " " ,
55 "keywords" : [],
66 "author" : " " ,
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ class UserMessage {
7676 */
7777 constructor ( message : Message , promptOverride : boolean = false ) {
7878 this . message = message ;
79+
7980 this . promptOverride = promptOverride ;
8081 this . userMessages = [ ] ;
8182 this . mentionedMCPs = message . mentionedMCPs || [ ] ;
@@ -108,7 +109,7 @@ class UserMessage {
108109 } else {
109110 let finalPrompt = `
110111 The user has sent the following query:
111- ${ this . message . userMessage } .
112+ <user_query> ${ this . message . userMessage } </user_query> .
112113 ` ;
113114 if ( this . message . mentionedFiles ?. length ) {
114115 finalPrompt += `The Attached files are:` ;
@@ -155,8 +156,11 @@ class UserMessage {
155156 * @returns Promise with an array of MCP tools
156157 */
157158 async getMentionedMcpsTools ( ) {
159+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
158160 if ( this . mentionedMCPs . length > 0 ) {
161+ console . log ( "mentionedMCPs" , this . mentionedMCPs ) ;
159162 let tools = await mcp . listToolsFromToolBoxes ( this . mentionedMCPs )
163+ console . log ( "tools" , tools ) ;
160164 return tools
161165 }
162166 else {
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ class cbws {
5656 const agentIdParam = process . env . agentId ? `&agentId=${ process . env . agentId } ` : '' ;
5757 const parentIdParam = process . env . parentId ? `&parentId=${ process . env . parentId } ` : '' ;
5858 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' : '' } ` ) ;
6061
6162 return new Promise ( ( resolve , reject ) => {
6263 this . websocket . on ( 'error' , ( error : Error ) => {
You can’t perform that action at this time.
0 commit comments