luxe 0.1.4: remembered models, wheel-driven lists, and a steadier phone app
- luxe starts on the model you last chose in this project, then the last one anywhere. Signing in opens the model picker instead of choosing for you. - Every list in a modal takes the mouse wheel and a draggable scrollbar. - The phone app shows reasoning in full, stays put while you read back through a long session, and shows a question's answer on its card. - On Windows, luxe update replaces the running luxe, and a signed-in install no longer sees setup again. - The file tree no longer shows "engine busy" in a large project, loop output is easier to follow, and the name is written lowercase. The CHANGELOG has the full list.
This commit is contained in:
@@ -36,29 +36,30 @@ impl App {
|
||||
|
||||
/// The same, opening with something to say first. Args: `(note)`.
|
||||
pub(crate) fn open_model_picker_with(&mut self, note: Vec<String>) {
|
||||
let active = self.active_model_info.as_ref().map(|info| info.r#ref.clone());
|
||||
self.open_model_picker_on(note, active);
|
||||
}
|
||||
|
||||
/// The same, with the cursor on the first row rather than the model in use. Args: `(note)`.
|
||||
pub(crate) fn open_model_picker_at_top(&mut self, note: Vec<String>) {
|
||||
self.open_model_picker_on(note, None);
|
||||
}
|
||||
|
||||
/// Opens the picker with the cursor on `start`, or the top. Args: `(note, start)`.
|
||||
fn open_model_picker_on(
|
||||
&mut self,
|
||||
note: Vec<String>,
|
||||
start: Option<luxe_core::provider::ModelRef>,
|
||||
) {
|
||||
if let Some(sources) = &self.model_sources {
|
||||
self.model_catalog = (sources.build)().catalog;
|
||||
}
|
||||
if self.model_catalog.is_empty() {
|
||||
match self.provider_configured() {
|
||||
true => self.push_convo(ConvoBlock::System(
|
||||
"No models available to switch to — add models under \"models\" in your Luxe \
|
||||
config."
|
||||
.to_string(),
|
||||
)),
|
||||
false => {
|
||||
self.push_convo(ConvoBlock::System(
|
||||
"No provider is configured, so there are no models to choose from yet."
|
||||
.to_string(),
|
||||
));
|
||||
self.open_configuration();
|
||||
}
|
||||
}
|
||||
self.explain_no_models();
|
||||
return;
|
||||
}
|
||||
let active = self.active_model_info.as_ref().map(|info| info.r#ref.clone());
|
||||
self.overlays.model_picker = Some(
|
||||
crate::model_picker::ModelPickerState::open(self.model_catalog.clone(), active)
|
||||
crate::model_picker::ModelPickerState::open(self.model_catalog.clone(), start)
|
||||
.with_note(note),
|
||||
);
|
||||
// Drawn from what is on disk, then corrected by whatever a local server says when it
|
||||
@@ -68,6 +69,22 @@ impl App {
|
||||
self.model_sources.as_ref().is_some_and(|sources| sources.probe.is_some());
|
||||
}
|
||||
|
||||
/// Says why there is no picker, and sends a machine with no provider to setup.
|
||||
fn explain_no_models(&mut self) {
|
||||
if self.provider_configured() {
|
||||
self.push_convo(ConvoBlock::System(
|
||||
"No models available to switch to — add models under \"models\" in your luxe \
|
||||
config."
|
||||
.to_string(),
|
||||
));
|
||||
return;
|
||||
}
|
||||
self.push_convo(ConvoBlock::System(
|
||||
"No provider is configured, so there are no models to choose from yet.".to_string(),
|
||||
));
|
||||
self.open_configuration();
|
||||
}
|
||||
|
||||
/// Apply a catalog rebuilt off the frame, leaving an open picker where the reader had it.
|
||||
pub fn apply_model_catalog_refresh(&mut self, catalog: Vec<crate::model_picker::ModelEntry>) {
|
||||
if catalog == self.model_catalog {
|
||||
@@ -81,7 +98,7 @@ impl App {
|
||||
|
||||
/// Whether a turn has a model to run on.
|
||||
///
|
||||
/// Luxe chooses none on the reader's behalf, so a session can legitimately open with nothing
|
||||
/// luxe chooses none on the reader's behalf, so a session can legitimately open with nothing
|
||||
/// selected — the dashboard's first screen is one of the places you pick. The engine refuses a
|
||||
/// turn either way ([`luxe_core::engine::EngineError::NoModel`]); this is what lets the UI ask
|
||||
/// before the reader's message leaves the composer.
|
||||
|
||||
Reference in New Issue
Block a user