Skip to content

Conversation

@filiso
Copy link
Contributor

@filiso filiso commented Jan 21, 2025

  • Implements functionality to go back to a specific message.
  • The footer, which currently includes the conversation cost and the number of tokens, will now display the number (identifier) of each message-pair.
  • A message pair is a user's message followed by the model's response.
  • Typing ':b' or ':back' will undo the last message-pair, including the user's message unlike ':r' which keeps it.
  • Typing ':b X' or ':back X' will go back in the conversation state to message-pair X and confirm it via displaying a string in the console.
  • Going back to X means that X is still part of the conversation with later messages removed.

COMMAND_QUIT = (":quit", ":q")
COMMAND_RERUN = (":rerun", ":r")
COMMAND_HELP = (":help", ":h", ":?")
COMMAND_BACK_REGEX = r":b(?:ack)? (\d{1,3})"
Copy link
Owner

Choose a reason for hiding this comment

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

any reason to limit to 999 messages?

Suggested change
COMMAND_BACK_REGEX = r":b(?:ack)? (\d{1,3})"
COMMAND_BACK_REGEX = r":b(?:ack)? (\d+)"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, no there is no reason to keep this limit.

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