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(vim): fix agent exit wrong type bug #2069

Merged
merged 1 commit into from
May 7, 2024

Conversation

andreabak
Copy link
Contributor

In the vim plugin, whenever the tabby-agent exits (unexpectedly) the s:tabby variable is set to {} instead of the numeric 0 to indicate that the agent job is not running.

This leads to the agent functions trying to send messages anyway and error messages being spammed for almost any editor event, for the wrong variable type and subsequent errors, like:

line    8:
E731: using Dictionary as a String
line   12:
E474: Invalid argument

and

Error detected while processing BufLeave Autocommands for "*"... [...]

Setting the s:tabby variable to 0 on agent exit solves it.

In the vim plugin, whenever the tabby-agent exits (unexpectedly) the
s:tabby variable is set to `{}` instead of the numeric `0` to indicate
that the agent job is not running.

This leads to the agent functions trying to send messages anyway and
error messages being spammed for almost any editor event, for the wrong
variable type and subsequent errors, like:
```
line    8:
E731: using Dictionary as a String
line   12:
E474: Invalid argument
```
and
```
Error detected while processing BufLeave Autocommands for "*"... [...]
```

Setting the s:tabby variable to `0` on agent exit solves it.
@icycodes
Copy link
Member

icycodes commented May 7, 2024

@andreabak, Thank you for fixing this!

@icycodes icycodes merged commit bc37060 into TabbyML:main May 7, 2024
1 check passed
@andreabak andreabak deleted the fix-vim_agent_exit-abk16 branch May 7, 2024 13:02
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