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

Issue after Bind [ctrl + s] #5271

Closed
yorevs opened this issue Nov 21, 2024 · 6 comments
Closed

Issue after Bind [ctrl + s] #5271

yorevs opened this issue Nov 21, 2024 · 6 comments

Comments

@yorevs
Copy link

yorevs commented Nov 21, 2024

Hello everyone,

I used the combination [Ctrl+s] to bind functionality to my footer:

("ctrl+s", "stop", " Stop-GenAi"),

When I hit that inside the Input widget, I got strange behavior. All the TUI gets unresponsive and even Ctrl+c and Ctrl+d no longer work. Instead, I keep getting VT100 escape codes, as demonstrated in the attached GIF.

ss-ctrl+s-issue

Copy link

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

What does your action_stop message do?

Can you paste the output of the following command:

textual diagnose

@yorevs
Copy link
Author

yorevs commented Nov 21, 2024

What does your action_stop message do?

Can you paste the output of the following command:

textual diagnose
async def action_stop(self) -> None:
    """Stop generating response."""
    self.askai.abort()
    self.enable_controls()

Abort method:
https://github.com/yorevs/askai/blob/d0ea1346878a542333579c48d1cbcf9862d103fe/src/main/askai/core/askai.py#L123

Enable controls:
https://github.com/yorevs/askai/blob/d0ea1346878a542333579c48d1cbcf9862d103fe/src/main/askai/tui/askai_app.py#L212

-bash: textual: command not found

I'm using version 0.86.3

@willmcgugan
Copy link
Collaborator

You'll need to installed textual-dev for the command.

The most likely cause for this is that you are writing ansi escape sequences, which will almost certainly break something.

@yorevs
Copy link
Author

yorevs commented Nov 21, 2024

Removing the Asc fixed the issue. thanks

@yorevs yorevs closed this as completed Nov 21, 2024
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

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

No branches or pull requests

2 participants