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: pasting slash commands #2037

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: pasting slash commands #2037

wants to merge 1 commit into from

Conversation

mxyng
Copy link
Contributor

@mxyng mxyng commented Jan 18, 2024

there is a bug in paste where the pasted content is written directly to the prompt buffer instead of being processed. for most content, this is fine but slash commands are processed line-by-line.

aggregate status updates, e.g. "Set 'verbose' mode.", "Set system message.", to the end for aesthetics. the status message shouldn't display while in paste mode

there is a bug in paste where the pasted content is written directly to
the prompt buffer instead of being processed. for most content, this is
fine but slash commands are processed line-by-line.

aggregate status updates, e.g. "Set 'verbose' mode.", "Set system
message.", to the end for aesthetics. the status message shouldn't
display while in paste mode
@mxyng mxyng requested a review from pdevine January 18, 2024 01:01
@mxyng mxyng changed the title fix pasting slash commands fix: pasting slash commands Jan 18, 2024
@mxyng
Copy link
Contributor Author

mxyng commented Jan 18, 2024

aggregate status updates, e.g. "Set 'verbose' mode.", "Set system message.", to the end for aesthetics. the status message shouldn't display while in paste mode

this might not be a good idea since the user could in theory cancel the paste. the status update won't show but actions have already been triggered. i.e. the paste itself has side effects. one way around this is to aggregate the actions instead of just the status updates and run them in sequence only after exiting paste

@BruceMacD
Copy link
Contributor

@mxyng I just tested this and needed to enter another new line after my pasted input to get the status message output.

./ollama run mistral
>>> /set verbose
... /set system you are mario
>>>
Set 'verbose' mode.
Set system message.

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.

None yet

2 participants