Repository: lapce/lapce
File: lapce-app/src/palette.rs (Rust)

Code before:
        self.input = self.kind.get_input(&input).to_string();
    }
}

#[derive(Clone)]
pub struct PaletteData {
    run_id_counter: Arc<AtomicU64>,
    pub run_id: RwSignal<u64>,
    pub workspace: Arc<LapceWorkspace>,
    pub status: RwSignal<PaletteStatus>,
    pub index: RwSignal<usize>,
    pub items: RwSignal<im::Vector<PaletteItem>>,
    pub filtered_items: ReadSignal<im::Vector<PaletteItem>>,
    pub input: RwSignal<PaletteInput>,
    kind: RwSignal<PaletteKind>,
    pub input_editor: EditorData,
    pub preview_editor: RwSignal<EditorData>,
    pub has_preview: RwSignal<bool>,
    pub keypress: ReadSignal<KeyPressData>,
    /// Listened on for which entry in the palette has been clicked
    pub clicked_index: RwSignal<Option<usize>>,
    pub executed_commands: Rc<RefCell<HashMap<String, Instant>>>,
    pub executed_run_configs: Rc<RefCell<HashMap<(RunDebugMode, String), Instant>>>,
    pub main_split: MainSplitData,
    pub references: RwSignal<Vec<EditorLocation>>,
    pub source_control: RwSignal<SourceControlData>,
    pub common: CommonData,
}

impl PaletteData {
    pub fn new(
        cx: Scope,
        workspace: Arc<LapceWorkspace>,
        main_split: MainSplitData,
        keypress: ReadSignal<KeyPressData>,
        source_control: RwSignal<SourceControlData>,
        common: CommonData,
    ) -> Self {
        let status = create_rw_signal(cx, PaletteStatus::Inactive);
        let items = create_rw_signal(cx, im::Vector::new());
        let index = create_rw_signal(cx, 0);
        let references = create_rw_signal(cx, Vec::new());
        let input = create_rw_signal(
            cx,
            PaletteInput {
                input: "".to_string(),
                kind: PaletteKind::File,
            },
        );
        let kind = create_rw_signal(cx, PaletteKind::File);
        let input_editor =

Review comment (suggestion):
```SourceControlData``` doesn't need to be a signal. 

Code after:
        self.input = self.kind.get_input(&input).to_string();
    }
}

#[derive(Clone)]
pub struct PaletteData {
    run_id_counter: Arc<AtomicU64>,
    pub run_id: RwSignal<u64>,
    pub workspace: Arc<LapceWorkspace>,
    pub status: RwSignal<PaletteStatus>,
    pub index: RwSignal<usize>,
    pub items: RwSignal<im::Vector<PaletteItem>>,
    pub filtered_items: ReadSignal<im::Vector<PaletteItem>>,
    pub input: RwSignal<PaletteInput>,
    kind: RwSignal<PaletteKind>,
    pub input_editor: EditorData,
    pub preview_editor: RwSignal<EditorData>,
    pub has_preview: RwSignal<bool>,
    pub keypress: ReadSignal<KeyPressData>,
    /// Listened on for which entry in the palette has been clicked
    pub clicked_index: RwSignal<Option<usize>>,
    pub executed_commands: Rc<RefCell<HashMap<String, Instant>>>,
    pub executed_run_configs: Rc<RefCell<HashMap<(RunDebugMode, String), Instant>>>,
    pub main_split: MainSplitData,
    pub references: RwSignal<Vec<EditorLocation>>,
    pub source_control: SourceControlData,
    pub common: CommonData,
}

impl PaletteData {
    pub fn new(
        cx: Scope,
        workspace: Arc<LapceWorkspace>,
        main_split: MainSplitData,
        keypress: ReadSignal<KeyPressData>,
        source_control: SourceControlData,
        common: CommonData,
    ) -> Self {
        let status = create_rw_signal(cx, PaletteStatus::Inactive);
        let items = create_rw_signal(cx, im::Vector::new());
        let index = create_rw_signal(cx, 0);
        let references = create_rw_signal(cx, Vec::new());
        let input = create_rw_signal(
            cx,
            PaletteInput {
                input: "".to_string(),
                kind: PaletteKind::File,
            },
        );
        let kind = create_rw_signal(cx, PaletteKind::File);
        let input_editor =