Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: interactive after run #1377

Merged
merged 2 commits into from
Feb 26, 2025
Merged

feat: interactive after run #1377

merged 2 commits into from
Feb 26, 2025

Conversation

baxen
Copy link
Collaborator

@baxen baxen commented Feb 25, 2025

This adds a flag -s/--interactive that drops into an interactive session after starting from a CLI/file message

This adds a flag -s/--interactive that drops into an
interactive session after starting from a CLI/file
message

Also fixed the prompting for tool approvals
@baxen baxen force-pushed the baxen/session-input branch from 3485f75 to a58abc3 Compare February 25, 2025 15:57
@alexhancock alexhancock self-requested a review February 25, 2025 20:53
_ => false,
};

let confirmed = cliclack::confirm(prompt).initial_value(true).interact()?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this is much cleaner!

}

/// Start an interactive session, optionally with an initial message
pub async fn interactive(&mut self, message: Option<String>) -> Result<()> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interactive is a little confusing of a function name because of the argument imo - name something else?

@@ -106,6 +106,14 @@ enum Command {
)]
input_text: Option<String>,

/// Continue in interactive mode after processing input
#[arg(
short = 's',
Copy link
Collaborator

@wendytang wendytang Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-s? why not -i

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-i was already taken

@baxen baxen merged commit e615ad1 into main Feb 26, 2025
6 checks passed
@baxen baxen deleted the baxen/session-input branch February 26, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants