fix: add Thinking state to agent response, fix ollama and watsonx overwriting values on the onboarding (#405)

* Added thinking message to assistant message

* fixed ibm and ollama overwriting values
This commit is contained in:
Lucas Oliveira 2025-11-14 17:42:47 -03:00 committed by GitHub
parent 3a6a05d043
commit 4b9d7599fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 4 deletions

View file

@ -83,8 +83,10 @@ export function AssistantMessage({
)} )}
chatMessage={ chatMessage={
isStreaming isStreaming
? content + ? (content.trim()
' <span class="inline-block w-1 h-4 bg-primary ml-1 animate-pulse"></span>' ? content +
' <span class="inline-block w-1 h-4 bg-primary ml-1 animate-pulse"></span>'
: '<span class="text-muted-foreground italic">Thinking<span class="thinking-dots"></span></span>')
: content : content
} }
/> />

View file

@ -365,4 +365,22 @@
width: 100%; width: 100%;
height: 30px; height: 30px;
} }
.thinking-dots::after {
content: ".";
animation: thinking-dots 1.4s steps(3, end) infinite;
}
@keyframes thinking-dots {
0% {
content: ".";
}
33.33% {
content: "..";
}
66.66%,
100% {
content: "...";
}
}
} }

View file

@ -26,7 +26,7 @@ export function IBMOnboarding({
setIsLoadingModels?: (isLoading: boolean) => void; setIsLoadingModels?: (isLoading: boolean) => void;
alreadyConfigured?: boolean; alreadyConfigured?: boolean;
}) { }) {
const [endpoint, setEndpoint] = useState("https://us-south.ml.cloud.ibm.com"); const [endpoint, setEndpoint] = useState(alreadyConfigured ? "" : "https://us-south.ml.cloud.ibm.com");
const [apiKey, setApiKey] = useState(""); const [apiKey, setApiKey] = useState("");
const [projectId, setProjectId] = useState(""); const [projectId, setProjectId] = useState("");

View file

@ -25,7 +25,7 @@ export function OllamaOnboarding({
isEmbedding?: boolean; isEmbedding?: boolean;
alreadyConfigured?: boolean; alreadyConfigured?: boolean;
}) { }) {
const [endpoint, setEndpoint] = useState(`http://localhost:11434`); const [endpoint, setEndpoint] = useState(alreadyConfigured ? undefined : `http://localhost:11434`);
const [showConnecting, setShowConnecting] = useState(false); const [showConnecting, setShowConnecting] = useState(false);
const debouncedEndpoint = useDebouncedValue(endpoint, 500); const debouncedEndpoint = useDebouncedValue(endpoint, 500);