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:
parent
3a6a05d043
commit
4b9d7599fc
4 changed files with 24 additions and 4 deletions
|
|
@ -83,8 +83,10 @@ export function AssistantMessage({
|
|||
)}
|
||||
chatMessage={
|
||||
isStreaming
|
||||
? content +
|
||||
' <span class="inline-block w-1 h-4 bg-primary ml-1 animate-pulse"></span>'
|
||||
? (content.trim()
|
||||
? 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
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -365,4 +365,22 @@
|
|||
width: 100%;
|
||||
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: "...";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export function IBMOnboarding({
|
|||
setIsLoadingModels?: (isLoading: boolean) => void;
|
||||
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 [projectId, setProjectId] = useState("");
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export function OllamaOnboarding({
|
|||
isEmbedding?: 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 debouncedEndpoint = useDebouncedValue(endpoint, 500);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue