Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(neuron): no false 'no vector tool' notice while the model loads

purpleec9896153cf4
diff --git a/src/components/neuron/NeuronView.tsx b/src/components/neuron/NeuronView.tsx
index a013405b..a1c64b91 100644
--- a/src/components/neuron/NeuronView.tsx
+++ b/src/components/neuron/NeuronView.tsx
@@ -217,7 +217,7 @@ export function NeuronView() {
{job && job.status !== 'idle' && <JobPanel job={job} onStop={() => void neuronCancel().then(poll)} onDismiss={() => void neuronDismiss().then(poll)} />}
<Section title="Sliders">
- {!info?.generator && (
+ {info && !info.generator && (
<Hinweis className="mb-2">This build has no vector tool, so ready-made and own sliders cannot be computed here (Linux: later version). Feature sliders work where the model has one.</Hinweis>
)}
<div className="space-y-2" data-testid="neuron-presets">
diff --git a/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsx b/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsx
index 0ca25f63..bb3800ab 100644
--- a/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsx
+++ b/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsx
@@ -2,7 +2,8 @@
* @vitest-environment jsdom
*
* P11 (3.0.9): the Neuron tweaker. A slider that is not computed for the
- * model offers to compute it; a computed one, moved, reaches the engine as
+ * model offers to compute it (locked, with no false notice, until the model's
+ * info is in); a computed one, moved, reaches the engine as
* one entry; Reset brings the engine back to no vector at all; a chat model
* in Ollama is told plainly that the sliders cannot reach it.
*
@@ -61,7 +62,11 @@ afterEach(() => cleanup())
describe('Neuron tweaker view', () => {
it('offers to compute a slider the model does not have yet', async () => {
render(createElement(NeuronView))
- const button = await screen.findByTestId('neuron-compute-creative')
+ const button = (await screen.findByTestId('neuron-compute-creative')) as HTMLButtonElement
+ // Locked until the model's info says the vector tool is there; a click
+ // before that does nothing, as it should.
+ expect(screen.queryByText(/This build has no vector tool/)).toBeNull()
+ await waitFor(() => expect(button.disabled).toBe(false))
fireEvent.click(button)
await waitFor(() => expect(buildPreset).toHaveBeenCalledWith('/models/qwen.gguf', 'creative'))
})