Elffuss BraidHub

kikocis/continue public

fix: use loading state for loading indicator, better error messages
Changeset8e5e5aa429337c3732c595827043d27702f75681ffed49fbfeb3989e66c26bb1
AuthorTomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-07-24 11:49 -07:00
CommitterTomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-07-24 12:11 -07:00
Parents476bc6bc2ea8

Browse the files at this changeset

3 files changed

modified core/config/ConfigHandler.ts +3 −3
@@ -438,7 +438,7 @@
438438 if (!this.currentProfile) {
439439 return {
440440 config: undefined,
441- errors: [],
441+ errors: [{ message: "Current profile not found", fatal: true }],
442442 configLoadInterrupted: true,
443443 };
444444 }
@@ -494,7 +494,7 @@
494494 if (!this.currentProfile) {
495495 return {
496496 config: undefined,
497- errors: [],
497+ errors: [{ message: "Current profile not found", fatal: true }],
498498 configLoadInterrupted: true,
499499 };
500500 }
@@ -507,7 +507,7 @@
507507 if (!this.currentProfile) {
508508 return {
509509 config: undefined,
510- errors: [],
510+ errors: [{ message: "Current profile not found", fatal: true }],
511511 configLoadInterrupted: true,
512512 };
513513 }
modified gui/src/components/modelSelection/ModelSelect.tsx +1 −2
@@ -11,7 +11,6 @@
1111 import { IdeMessengerContext } from "../../context/IdeMessenger";
1212 import { AddModelForm } from "../../forms/AddModelForm";
1313 import { useAppDispatch, useAppSelector } from "../../redux/hooks";
14-import { EMPTY_CONFIG } from "../../redux/slices/configSlice";
1514 import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice";
1615 import { updateSelectedModelByRole } from "../../redux/thunks/updateSelectedModelByRole";
1716 import {
@@ -94,6 +93,7 @@
9493
9594 const isInEdit = useAppSelector((store) => store.session.isInEdit);
9695 const config = useAppSelector((state) => state.config.config);
96+ const isConfigLoading = useAppSelector((state) => state.config.loading);
9797 const ideMessenger = useContext(IdeMessengerContext);
9898 const buttonRef = useRef<HTMLButtonElement>(null);
9999 const [options, setOptions] = useState<Option[]>([]);
@@ -192,7 +192,6 @@
192192 );
193193 }
194194
195- const isConfigLoading = config === EMPTY_CONFIG;
196195 const hasNoModels = allModels?.length === 0;
197196
198197 return (
modified gui/src/redux/slices/configSlice.ts +1 −0
@@ -68,6 +68,7 @@
6868 } else {
6969 state.config = config;
7070 }
71+ state.loading = false;
7172 },
7273 updateConfig: (
7374 state,