Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

Removed the handleReviseKey function and commented out its usage.

Dane Schneider586e91a5b6da
diff --git a/cli/lib/term.go b/cli/lib/term.go
index 569a3378..d7096571 100644
--- a/cli/lib/term.go
+++ b/cli/lib/term.go
@@ -1,7 +1,6 @@
package lib
import (
- "bufio"
"fmt"
"os"
"strings"
@@ -40,35 +39,35 @@ func handleAbortKey(proposalId string) error {
return Abort(proposalId)
}
-// Function for 'r' key action
-func handleReviseKey(proposalId string) error {
- // Terminate current operation
- err := Api.Abort(proposalId)
- if err != nil {
- return err
- }
-
- // Prompt the user for new message
- fmt.Println(">\"")
- reader := bufio.NewReader(os.Stdin)
- newMessage, _ := reader.ReadString('"')
-
- // Propose the new message
- err = Propose(newMessage)
- if err != nil {
- return err
- }
-
- fmt.Println("Revision proposed.")
- return nil
-}
+// // Function for 'r' key action
+// func handleReviseKey(proposalId string) error {
+// // Terminate current operation
+// err := Api.Abort(proposalId)
+// if err != nil {
+// return err
+// }
+
+// // Prompt the user for new message
+// fmt.Println(">\"")
+// reader := bufio.NewReader(os.Stdin)
+// newMessage, _ := reader.ReadString('"')
+
+// // Propose the new message
+// err = Propose(newMessage)
+// if err != nil {
+// return err
+// }
+
+// fmt.Println("Revision proposed.")
+// return nil
+// }
func handleKeyPress(input rune, proposalId string) error {
switch input {
case 's':
return handleAbortKey(proposalId)
- case 'r':
- return handleReviseKey(proposalId)
+ // case 'r':
+ // return handleReviseKey(proposalId)
default:
return fmt.Errorf("invalid key pressed: %s", string(input))
}