Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: erase script content when switching threads #164

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

g-linville
Copy link
Member

for #161

The issue linked above was happening whenever the user switches from a Claude thread back to a normal gpt-4o. I figured out that this is just one case of a broader bug in the code, where switching threads can cause the previously selected script to execute.

The script context has a script and scriptContent state, the latter taking priority over the former. The thread code was overwriting script but doing nothing to scriptContent, which was the source of the issue here.

Comment on lines +3 to +9
"version": "v0.10.0-rc3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "acorn",
"version": "v0.10.0-rc2",
"version": "v0.10.0-rc3",
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure why these weren't already updated, since I didn't make any changes to package.json. 🤷‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

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

My fault.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah we should enforce that at ci level, like doing a npm install and check if git is dirty

@g-linville g-linville merged commit b2a463a into gptscript-ai:main Aug 15, 2024
1 check passed
@g-linville g-linville deleted the fix-thread-change branch August 15, 2024 17:39
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.

3 participants