Commit e04b47f

mo khan <mo@mokhan.ca>
2025-06-22 01:43:42
feat: add a basic repl
1 parent 32bcac9
Changed files (1)
internal
internal/del/assistant.go
@@ -1,7 +1,10 @@
 package del
 
 import (
+	"bufio"
 	"fmt"
+	"os"
+	"strings"
 )
 
 type Tool struct {
@@ -26,4 +29,19 @@ func NewDel(provider AIProvider) *Del {
 
 func (d *Del) StartREPL() {
 	fmt.Printf("๐ŸŽค Del (%s) is ready!\n", d.aiProvider.Name())
+	fmt.Println("Type 'quit' to exit.")
+	scanner := bufio.NewScanner(os.Stdin)
+
+	for {
+		fmt.Print("๐ŸŽค You: ")
+		if !scanner.Scan() {
+			break
+		}
+		input := strings.TrimSpace(scanner.Text())
+		if input == "quit" || input == "exit" {
+			fmt.Println("๐ŸŽค Del says: Peace out! โœŒ๏ธ")
+			break
+		}
+		fmt.Printf("๐Ÿค– (mock reply): You said '%s'\n", input)
+	}
 }