Struct RazCore

Source
pub struct RazCore {
    pub context_analyzer: Arc<ProjectAnalyzer>,
    /* private fields */
}
Expand description

Main entry point for the RAZ command generation system

Fields§

§context_analyzer: Arc<ProjectAnalyzer>

Implementations§

Source§

impl RazCore

Source

pub fn new() -> Result<Self>

Create a new RAZ instance with default configuration

Source

pub fn with_config(config: ConfigManager) -> Result<Self>

Create a new RAZ instance with custom configuration

Source

pub async fn analyze_workspace(&self, path: &Path) -> Result<ProjectContext>

Analyze a workspace and return project context

Source

pub async fn generate_commands( &self, context: &ProjectContext, ) -> Result<Vec<Command>>

Generate commands for the given context

Source

pub async fn execute_command( &self, command: &Command, ) -> Result<ExecutionResult>

Execute a command

Source

pub async fn execute_command_with_browser( &self, command: &Command, browser: Option<String>, ) -> Result<ExecutionResult>

Execute a command with browser launching support

Source

pub fn register_provider(&mut self, provider: Box<dyn CommandProvider>)

Register a custom command provider

Source

pub fn get_config(&self, workspace: &Path) -> EffectiveConfig

Get effective configuration for a workspace

Source

pub fn get_command_override( &self, workspace: &Path, key: &str, ) -> Option<CommandOverride>

Get command override for a specific file/context

Source

pub fn set_command_override( &mut self, workspace: &Path, key: String, override_config: CommandOverride, ) -> Result<()>

Set command override for a specific file/context

Source

pub async fn generate_universal_commands( &self, file_path: &Path, cursor: Option<Position>, ) -> Result<Vec<Command>>

Generate universal commands for any file (stateless)

Source

pub async fn generate_universal_commands_with_options( &self, file_path: &Path, cursor: Option<Position>, force_standalone: bool, ) -> Result<Vec<Command>>

Generate universal commands with force standalone option

Source

pub async fn generate_universal_commands_with_override( &self, file_path: &Path, cursor: Option<Position>, override_input: &str, ) -> Result<Vec<Command>>

Generate universal commands with runtime override

Source

pub fn build_override_key( file_path: &Path, context: &FileExecutionContext, cursor: Option<Position>, ) -> Option<String>

Build override key from file path and context

Source

pub async fn generate_smart_commands( &self, workspace: &Path, file_path: Option<&Path>, cursor: Option<Position>, ) -> Result<Vec<Command>>

Generate smart context-aware commands based on file and cursor position This method now delegates to universal command generation

Trait Implementations§

Source§

impl Default for RazCore

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.