Skip to content

Let run_python to use user globals, not .core globals to access tools and variables.#122

Merged
jph00 merged 1 commit intomainfrom
fix/run_python-scope
Feb 10, 2026
Merged

Let run_python to use user globals, not .core globals to access tools and variables.#122
jph00 merged 1 commit intomainfrom
fix/run_python-scope

Conversation

@PiotrCzapla
Copy link
Copy Markdown
Contributor

The dialoghelper.core globals() have limited nubmer of tools (smaller than what __llmtools__ define)
Tools like rg, sed, bash were not avaliable, same for user defined tools.

We change globals() to result of _find_frame_dict('__msg_id') (mechanism as inspecttools use).

… and variables.

The dialoghelper.core globals() have limited nubmer of tools (smaller than what `__llmtools__` define)
Tools like rg, sed, bash were not avaliable, same for user defined tools.

We change globals() to result of _find_frame_dict('__msg_id') (mechanism as inspecttools use).
@PiotrCzapla PiotrCzapla requested a review from jph00 February 5, 2026 11:55
@jph00
Copy link
Copy Markdown
Contributor

jph00 commented Feb 10, 2026

Great idea - thanks! :)

@jph00 jph00 merged commit 70b98f1 into main Feb 10, 2026
@jph00 jph00 added the enhancement New feature or request label Feb 10, 2026
@jph00 jph00 changed the title Fix run_python to use user globals, not .core globals to access tools and variables. Let run_python to use user globals, not .core globals to access tools and variables. Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants