Initial Commit

This commit is contained in:
Harshavardhan Musanalli
2025-09-27 17:35:24 +02:00
parent 83fa088ed2
commit 1f01c38881
14 changed files with 1277 additions and 2 deletions

46
main.go Normal file
View File

@@ -0,0 +1,46 @@
package main
import (
"bufio"
"fmt"
"log"
"os"
"strings"
)
func main() {
// Initialize the agent
agent := NewLinuxDiagnosticAgent()
// Start the interactive session
fmt.Println("Linux Diagnostic Agent Started")
fmt.Println("Enter a system issue description (or 'quit' to exit):")
scanner := bufio.NewScanner(os.Stdin)
for {
fmt.Print("> ")
if !scanner.Scan() {
break
}
input := strings.TrimSpace(scanner.Text())
if input == "quit" || input == "exit" {
break
}
if input == "" {
continue
}
// Process the issue
if err := agent.DiagnoseIssue(input); err != nil {
fmt.Printf("Error: %v\n", err)
}
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
fmt.Println("Goodbye!")
}