Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-08-19 11:43:40 -04:00
parent 39fc124f65
commit 92f2944cdc
2 changed files with 14 additions and 8 deletions

View file

@ -196,7 +196,7 @@ export default function ChatPlaygroundPage() {
// Use the helper function with the content
await handleSubmitWithContent(userMessage.content);
};
};
const handleSubmitWithContent = async (content: string) => {
setIsGenerating(true);
@ -264,11 +264,15 @@ export default function ChatPlaygroundPage() {
createdAt: new Date(),
};
setCurrentSession(prev => prev ? {
setCurrentSession(prev =>
prev
? {
...prev,
messages: [...prev.messages, assistantMessage],
updatedAt: Date.now()
} : null);
updatedAt: Date.now(),
}
: null
);
let fullContent = "";
for await (const chunk of response) {

View file

@ -52,8 +52,10 @@ export default function ContentsListPage() {
const [file, setFile] = useState<VectorStoreFile | null>(null);
const [contents, setContents] = useState<VectorStoreContentItem[]>([]);
const [isLoadingStore, setIsLoadingStore] = useState(true);
const [isLoadingFile, setIsLoadingFile] = useState(true);
const [isLoadingContents, setIsLoadingContents] = useState(true);
const [errorStore, setErrorStore] = useState<Error | null>(null);
const [errorFile, setErrorFile] = useState<Error | null>(null);
const [errorContents, setErrorContents] = useState<Error | null>(null);
useEffect(() => {