Skip to content

Commit c12f828

Browse files
committed
feat: add ChatState for runs
Signed-off-by: Donnie Adams <[email protected]>
1 parent b195649 commit c12f828

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

run.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (r *Run) Close() error {
8080
}
8181

8282
// If the command has already exited, then nothing to do.
83-
if r.cmd.ProcessState == nil {
83+
if r.cmd.ProcessState != nil {
8484
return nil
8585
}
8686

@@ -99,6 +99,11 @@ func (r *Run) RawOutput() (map[string]any, error) {
9999
return r.rawOutput, nil
100100
}
101101

102+
// ChatState returns the current chat state of the Run.
103+
func (r *Run) ChatState() string {
104+
return r.chatState
105+
}
106+
102107
// NextChat will pass input and create the next run in a chat.
103108
// The new Run will be returned.
104109
func (r *Run) NextChat(ctx context.Context, input string) (*Run, error) {

0 commit comments

Comments
 (0)