editing-messages.mdx 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ---
  2. title: "Editing Messages"
  3. sidebarTitle: "Editing Messages"
  4. ---
  5. Cline allows you to edit chat messages in a task after they've been submitted. This feature lets you refine your requests without starting a new task, helping you get better results with minimal disruption to your workflow.
  6. ## When to Edit Messages
  7. You might want to edit a message when:
  8. - You didn't get the results you wanted
  9. - You thought of a better way to phrase your request
  10. - You need to add more information or context
  11. - You made a typo or error in your original message
  12. ## How to Edit Messages
  13. 1. Click on any message in the conversation (except the initial task message)
  14. 2. Edit the text as needed
  15. 3. Use the restore options to resubmit your request
  16. <Frame>
  17. <img
  18. src="https://storage.googleapis.com/cline_public_images/docs/assets/message-editing.png"
  19. alt="Message editing interface"
  20. />
  21. </Frame>
  22. ## Restore Options
  23. When you edit a message, you have two options for restoring:
  24. ### Restore Chat
  25. The "Restore Chat" option:
  26. - Restores just the task state
  27. - Re-submits an API request with your edited message
  28. - Preserves all file changes made up to that point
  29. - Is useful when you want to keep the current state of your workspace
  30. ### Restore All
  31. The "Restore All" option:
  32. - Restores both the task state and workspace state
  33. - Re-submits an API request with your edited message
  34. - Reverts your workspace to how it was at that point in the conversation
  35. - Uses [checkpoints](/features/checkpoints) under the hood to restore your workspace
  36. - Is useful when you want to try a completely different approach
  37. ## Keyboard Shortcuts
  38. When editing a message, you can use these keyboard shortcuts:
  39. - **Escape**: Exit edit mode without making changes
  40. - **Enter**: Restore just the task (equivalent to "Restore Chat")
  41. - **Cmd/Ctrl + Enter**: Restore the task and workspace (equivalent to "Restore All")
  42. - **Shift + Enter**: Insert a new line / line break in your message
  43. ## Best Practices
  44. - Use message editing for minor adjustments to your requests
  45. - For major changes in direction, consider starting a new task
  46. - When using "Restore All," be aware that any file changes made after that message will be reverted
  47. - Edit messages closer to the beginning of a conversation to avoid losing significant progress