feat: search tool working

This commit is contained in:
Eugen Eisler
2025-06-11 19:56:38 +02:00
parent 5ffd458aa0
commit ed77cc2320
6 changed files with 292 additions and 196 deletions

View File

@@ -256,7 +256,8 @@ func Cli(version string) (err error) {
}
var chatter *core.Chatter
if chatter, err = registry.GetChatter(currentFlags.Model, currentFlags.ModelContextLength, currentFlags.Strategy, currentFlags.Stream, currentFlags.DryRun); err != nil {
if chatter, err = registry.GetChatter(currentFlags.Model, currentFlags.ModelContextLength,
currentFlags.Strategy, currentFlags.Stream, currentFlags.DryRun); err != nil {
return
}

View File

@@ -76,7 +76,7 @@ type Flags struct {
ShellCompleteOutput bool `long:"shell-complete-list" description:"Output raw list without headers/formatting (for shell completion)"`
}
var debug = false
var debug = true
func Debugf(format string, a ...interface{}) {
if debug {
@@ -159,7 +159,7 @@ func Init() (ret *Flags, err error) {
// Handle stdin and messages
// Handle stdin and messages
info, _ := os.Stdin.Stat()
pipedToStdin := (info.Mode() & os.ModeCharDevice) == 0
pipedToStdin := (info.Mode()&os.ModeCharDevice) == 0 && debug
// Append positional arguments to the message (custom message)
if len(args) > 0 {