Skip to content

Conversation

@3coins
Copy link
Collaborator

@3coins 3coins commented Jun 24, 2025

No description provided.

Copy link
Collaborator

@ellisonbg ellisonbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early review comments.

args = command

# Check if the command is in the whitelist
if not args or args[0] not in ALLOWED_COMMANDS:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is too easy to subvert this check for it to be useful. I think we are better off just asking for human approval.

)

# Execute the command
process = subprocess.Popen(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Parse the output if successful
if result["returncode"] == 0 and result["stdout"]:
entries = []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may be better off just returning the text outputs given that the output will be used by a future call to a model rather than Python code.

@3coins
Copy link
Collaborator Author

3coins commented Jun 26, 2025

Closing, moved the tools to jupyter-ai-contrib/jupyter-ai-tools#3

@3coins 3coins closed this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants