@@ -294,12 +294,12 @@ export class FlutterGPTViewProvider implements vscode.WebviewViewProvider {
294
294
try {
295
295
const { value } = data ;
296
296
const _parsedAgent = JSON . parse ( value ) ;
297
- const agentDetails = ( ( await this . _fetchAgent (
298
- _parsedAgent . name ,
299
- _parsedAgent . versions [ 0 ] . version ,
300
- _parsedAgent . testing
301
- ) ) as any ) ?? { agent : { name : "" , version : "" } } ;
302
- this . _storingAgentsLocally ( agentDetails ) ;
297
+ // const agentDetails = ((await this._fetchAgent(
298
+ // _parsedAgent.name,
299
+ // _parsedAgent.versions[0].version,
300
+ // _parsedAgent.testing
301
+ // )) as any) ?? { agent: { name: "", version: "" } };
302
+ this . _storingAgentsLocally ( _parsedAgent ) ;
303
303
} catch ( error ) {
304
304
console . error ( "Error installing agents:" , error ) ;
305
305
}
@@ -360,7 +360,7 @@ export class FlutterGPTViewProvider implements vscode.WebviewViewProvider {
360
360
...agentDetails ,
361
361
name : `@${ name } ` ,
362
362
search : `@${ metadata . display_name } ` ,
363
- supported_commands : agentDetails ?. supported_commands . map (
363
+ supported_commands : agentDetails ?. supported_commands ? .map (
364
364
( command : any ) => ( {
365
365
...command ,
366
366
slug : `/${ command . slug } ` ,
@@ -448,7 +448,7 @@ export class FlutterGPTViewProvider implements vscode.WebviewViewProvider {
448
448
const agentName = agentResponse [ "agent" ] ;
449
449
const data = {
450
450
agent_name : agentName . split ( "@" ) [ 1 ] ,
451
- agent_version : agentResponse [ "agent_version" ] ,
451
+ agent_version : agentResponse [ "agent_version" ] ?? "1.0.0" ,
452
452
chat_history : conversationHistory ,
453
453
included_references : conversationReference . length > 0 ? conversationReference [ conversationReference . length - 1 ] . references : [ ] ,
454
454
private : false ,
0 commit comments