Skip to content

Commit 3d316e5

Browse files
committed
require variables for the data summary tool
1 parent 3486cd2 commit 3d316e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/positron-assistant/src/participants.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,10 @@ abstract class PositronAssistantParticipant implements IPositronAssistantPartici
280280
return inChatPane && (isEditMode || isAgentMode);
281281
// Only include the getTableSummary tool for Python sessions until supported in R
282282
case PositronAssistantToolName.GetTableSummary:
283-
// TODO: Remove this restriction when the tool is supported in R https://github.com/posit-dev/positron/issues/8343
283+
// TODO: Remove the python-specific restriction when the tool is supported in R https://github.com/posit-dev/positron/issues/8343
284284
// The logic above with TOOL_TAG_REQUIRES_ACTIVE_SESSION will handle checking for active sessions once this is removed.
285-
return activeSessions.has('python');
285+
// We'll still want to check that variables are defined.
286+
return activeSessions.has('python') && hasVariables;
286287
// Only include the getPlot tool if there is a plot available.
287288
case PositronAssistantToolName.GetPlot:
288289
return positronContext.plots?.hasPlots === true;

0 commit comments

Comments
 (0)