Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions crates/cli/src/plugins/editor_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ pub(super) struct ComponentEditorState<T> {

#[derive(Debug)]
pub(super) enum EditableComponent {
Observability(ComponentEditorState<ObservabilityConfig>),
Adaptive(ComponentEditorState<AdaptiveConfig>),
NemoGuardrails(ComponentEditorState<NeMoGuardrailsConfig>),
Observability(Box<ComponentEditorState<ObservabilityConfig>>),
Adaptive(Box<ComponentEditorState<AdaptiveConfig>>),
NemoGuardrails(Box<ComponentEditorState<NeMoGuardrailsConfig>>),
Comment on lines +36 to +38
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These should not need to be heap-allocated.

Why are they?

}

impl EditableComponent {
Expand Down Expand Up @@ -148,9 +148,9 @@ pub(super) fn editable_components(
config: &PluginConfig,
) -> Result<Vec<EditableComponent>, CliError> {
Ok(vec![
EditableComponent::Observability(component_observability_state(config)?),
EditableComponent::Adaptive(component_adaptive_state(config)?),
EditableComponent::NemoGuardrails(component_nemo_guardrails_state(config)?),
EditableComponent::Observability(Box::new(component_observability_state(config)?)),
EditableComponent::Adaptive(Box::new(component_adaptive_state(config)?)),
EditableComponent::NemoGuardrails(Box::new(component_nemo_guardrails_state(config)?)),
Comment on lines +151 to +153
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

revert

Suggested change
EditableComponent::Observability(Box::new(component_observability_state(config)?)),
EditableComponent::Adaptive(Box::new(component_adaptive_state(config)?)),
EditableComponent::NemoGuardrails(Box::new(component_nemo_guardrails_state(config)?)),
EditableComponent::Observability(component_observability_state(config)?),
EditableComponent::Adaptive(component_adaptive_state(config)?),
EditableComponent::NemoGuardrails(component_nemo_guardrails_state(config)?),

])
}

Expand Down
Loading