fix: do not display 'Untitled'
This commit is contained in:
parent
56da1c990a
commit
584eed0166
|
|
@ -55,10 +55,15 @@ export default function ChatPage() {
|
||||||
isNewThread,
|
isNewThread,
|
||||||
threadId,
|
threadId,
|
||||||
});
|
});
|
||||||
const title = useMemo(
|
const title = useMemo(() => {
|
||||||
() => (isNewThread ? "" : titleOfThread(thread as unknown as AgentThread)),
|
let result = isNewThread
|
||||||
[thread, isNewThread],
|
? ""
|
||||||
);
|
: titleOfThread(thread as unknown as AgentThread);
|
||||||
|
if (result === "Untitled") {
|
||||||
|
result = "";
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}, [thread, isNewThread]);
|
||||||
|
|
||||||
const handleSubmit = useSubmitThread({
|
const handleSubmit = useSubmitThread({
|
||||||
isNewThread,
|
isNewThread,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue