pub struct AskMode { /* private fields */ }Expand description
Ask Mode for question answering and explanations
Ask Mode provides capabilities for:
- Question answering
- Explanations and guidance
- Code examples in responses
- No file modifications or command execution
Implementations§
Source§impl AskMode
impl AskMode
Sourcepub fn with_config(config: ModeConfig) -> Self
pub fn with_config(config: ModeConfig) -> Self
Create an Ask Mode with custom configuration
Sourcepub fn answer_question(&self, question: &str) -> Result<String>
pub fn answer_question(&self, question: &str) -> Result<String>
Answer a question clearly
This method generates a clear answer to the provided question.
Sourcepub fn explain_concept(&self, concept: &str) -> Result<String>
pub fn explain_concept(&self, concept: &str) -> Result<String>
Provide an explanation for a concept
This method generates an explanation for the given concept.
Sourcepub fn include_code_examples(
&self,
response: &str,
language: &str,
) -> Result<String>
pub fn include_code_examples( &self, response: &str, language: &str, ) -> Result<String>
Include code examples in a response
This method adds code examples to a response.
Sourcepub fn suggest_approach(&self, problem: &str) -> Result<String>
pub fn suggest_approach(&self, problem: &str) -> Result<String>
Suggest an approach without executing it
This method provides guidance on how to approach a problem.
Sourcepub fn validate_operation(&self, operation: &Operation) -> Result<()>
pub fn validate_operation(&self, operation: &Operation) -> Result<()>
Validate that an operation is allowed in Ask Mode
This method checks if an operation can be executed in Ask Mode. Only question answering operations are allowed.
Sourcepub fn blocked_operation_message(&self, operation: &Operation) -> String
pub fn blocked_operation_message(&self, operation: &Operation) -> String
Provide clear error message for blocked operations
This method generates a user-friendly error message for blocked operations.