File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
extensions/positron-assistant Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 357
357
"modelDescription" : " View the current active plot if one exists. Don't invoke this tool if there are no plots in the session." ,
358
358
"canBeReferencedInPrompt" : false ,
359
359
"tags" : [
360
- " positron-assistant"
360
+ " positron-assistant" ,
361
+ " requires-session"
361
362
]
362
363
},
363
364
{
390
391
]
391
392
},
392
393
"tags" : [
393
- " positron-assistant"
394
+ " positron-assistant" ,
395
+ " requires-session"
394
396
]
395
397
},
396
398
{
Original file line number Diff line number Diff line change @@ -277,6 +277,10 @@ abstract class PositronAssistantParticipant implements IPositronAssistantPartici
277
277
// TODO: Remove this restriction when the tool is supported in R https://github.com/posit-dev/positron/issues/8343
278
278
// The logic above with TOOL_TAG_REQUIRES_ACTIVE_SESSION will handle checking for active sessions once this is removed.
279
279
return activeSessions . has ( 'python' ) ;
280
+ case PositronAssistantToolName . GetPlot :
281
+ return positronContext . plots ?. hasPlots === true ;
282
+ // case PositronAssistantToolName.InspectVariables:
283
+ // TODO: only allow this tool when there are variables to inspect
280
284
// Otherwise, include the tool if it is tagged for use with Positron Assistant.
281
285
// Allow all tools in Agent mode.
282
286
default :
You can’t perform that action at this time.
0 commit comments