Very minor polish (#2445)

* fix minor polish

* cleaner chat flow

* remove keys

* slight robustification to copying
This commit is contained in:
pablodanswer
2024-09-14 10:54:29 -07:00
committed by GitHub
parent ee278522ef
commit a50c2e30ec
5 changed files with 8 additions and 10 deletions

View File

@@ -183,7 +183,7 @@ def update_current_search_settings(
# Whenever we update the current search settings, we should ensure that the local reranking model is warmed up. # Whenever we update the current search settings, we should ensure that the local reranking model is warmed up.
if ( if (
current_settings.provider_type is None search_settings.rerank_provider_type is None
and search_settings.rerank_model_name is not None and search_settings.rerank_model_name is not None
and current_settings.rerank_model_name != search_settings.rerank_model_name and current_settings.rerank_model_name != search_settings.rerank_model_name
): ):

View File

@@ -45,6 +45,7 @@ export function ChatBanner() {
shadow-sm shadow-sm
rounded rounded
border-l-8 border-l-400 border-l-8 border-l-400
bg-background
border-r-4 border-r-200 border-r-4 border-r-200
border-border border-border
border border

View File

@@ -1124,9 +1124,9 @@ export function ChatPage({
await delay(50); await delay(50);
while (!stack.isComplete || !stack.isEmpty()) { while (!stack.isComplete || !stack.isEmpty()) {
await delay(2); await delay(0.5);
if (!stack.isEmpty()) { if (!stack.isEmpty() && !controller.signal.aborted) {
const packet = stack.nextPacket(); const packet = stack.nextPacket();
if (!packet) { if (!packet) {
continue; continue;

View File

@@ -698,7 +698,8 @@ export async function useScrollonStream({
) { ) {
// catch up if necessary! // catch up if necessary!
const scrollAmount = scrollDist.current + 10000; const scrollAmount = scrollDist.current + 10000;
if (scrollDist.current > 140) { if (scrollDist.current > 300) {
// if (scrollDist.current > 140) {
endDivRef.current.scrollIntoView(); endDivRef.current.scrollIntoView();
} else { } else {
blockActionRef.current = true; blockActionRef.current = true;

View File

@@ -383,17 +383,13 @@ export const AIMessage = ({
// TODO: fix the fact that you have to double click to follow link // TODO: fix the fact that you have to double click to follow link
// for the first link // for the first link
return ( return (
<Citation <Citation link={rest?.href}>
link={rest?.href}
key={node?.position?.start?.offset}
>
{rest.children} {rest.children}
</Citation> </Citation>
); );
} else { } else {
return ( return (
<a <a
key={node?.position?.start?.offset}
onMouseDown={() => onMouseDown={() =>
rest.href rest.href
? window.open(rest.href, "_blank") ? window.open(rest.href, "_blank")
@@ -570,8 +566,8 @@ export const AIMessage = ({
<div <div
ref={hoverElementRef} ref={hoverElementRef}
className={` className={`
absolute -bottom-5 absolute -bottom-5
z-20
invisible ${(isHovering || isRegenerateHovered || settings?.isMobile) && "!visible"} invisible ${(isHovering || isRegenerateHovered || settings?.isMobile) && "!visible"}
opacity-0 ${(isHovering || isRegenerateHovered || settings?.isMobile) && "!opacity-100"} opacity-0 ${(isHovering || isRegenerateHovered || settings?.isMobile) && "!opacity-100"}
translate-y-2 ${(isHovering || settings?.isMobile) && "!translate-y-0"} translate-y-2 ${(isHovering || settings?.isMobile) && "!translate-y-0"}