Amir deris/support continuous conversation#18
Conversation
| if err != nil { | ||
| return err | ||
| } | ||
| for { |
There was a problem hiding this comment.
| for { | |
| for ctx.Err() == nil { |
| } | ||
|
|
||
| type userConfirmation struct { | ||
| confirm bool |
There was a problem hiding this comment.
Maybe confirmed is a better name?
| confirm bool | |
| confirmed bool |
| if confirmation.confirm { | ||
| err = g.executeCommand(exeCommand) | ||
| if err != nil { | ||
| return err |
There was a problem hiding this comment.
For the future work we could keep the conversation continuous and try to resolve this with more AI calls? Please feel free to capture an issue if that feature makes sense.
| }, nil | ||
| } | ||
| g.print(message) | ||
| var userConfirmation userConfirmation |
There was a problem hiding this comment.
I would pick a different name for this variable to make the code easier to read.
| g.print("Command output:") | ||
| g.print(strings.Repeat("-", lineWidth)) | ||
| g.print(string(output)) | ||
| g.print(strings.Repeat("-", lineWidth)) |
There was a problem hiding this comment.
In the future it would make sense to decouple the text output formatting from actions. This is where they return structs of data then a printer turns them into text output.
For now as is, is more than fine 👍
There was a problem hiding this comment.
Thanks for feedback. Sure, created issue #20
Fixes #13