Skip to content

Commit aed873a

Browse files
bug: fix simple "hello world" chat use case
If you have a file with only "chat: true" and nothing else running it from the CLI would result in an error.
1 parent ff39d44 commit aed873a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/chat/chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func Start(ctx context.Context, prevState runner.ChatState, chatter Chatter, prg
5858
if startInput != "" {
5959
input = startInput
6060
startInput = ""
61-
} else if !(prevState == nil && prg.ToolSet[prg.EntryToolID].Arguments == nil) {
61+
} else if targetTool := prg.ToolSet[prg.EntryToolID]; !(prevState == nil && targetTool.Arguments == nil && targetTool.Instructions != "") {
6262
// The above logic will skip prompting if this is the first loop and the chat expects no args
6363
input, ok, err = prompter.Readline()
6464
if !ok || err != nil {

0 commit comments

Comments
 (0)