mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29:12 +00:00
Further clean up in home page initial cards experience
This commit is contained in:
@@ -136,10 +136,9 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
|
||||
}, [uploading]);
|
||||
|
||||
useEffect(() => {
|
||||
if (props.prefillMessage) {
|
||||
setMessage(props.prefillMessage);
|
||||
chatInputRef?.current?.focus();
|
||||
}
|
||||
if (props.prefillMessage === undefined) return;
|
||||
setMessage(props.prefillMessage);
|
||||
chatInputRef?.current?.focus();
|
||||
}, [props.prefillMessage]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Card, CardContent, CardDescription } from "@/components/ui/card";
|
||||
|
||||
import styles from "./suggestions.module.css";
|
||||
import { convertSuggestionTitleToIconClass } from "./suggestionsData";
|
||||
import { ArrowLeft, ArrowRight, MagicWand } from "@phosphor-icons/react";
|
||||
import { ArrowLeft, ArrowRight, MagicWand, XCircle } from "@phosphor-icons/react";
|
||||
|
||||
interface StepOneSuggestionCardProps {
|
||||
title: string;
|
||||
@@ -64,20 +64,20 @@ export function StepTwoSuggestionCard(data: StepTwoSuggestionCardProps) {
|
||||
}
|
||||
|
||||
export function StepOneSuggestionRevertCard(data: StepOneSuggestionRevertCardProps) {
|
||||
const cardClassName = `${styles.card} md:w-full md:h-fit sm:w-full h-fit md:w-fit cursor-pointer m-2 md:p-2 animate-fade-in-up border-none shadow-none`;
|
||||
const cardClassName = `${styles.card} md:w-full md:h-fit sm:w-full h-fit md:w-fit cursor-pointer m-2 md:p-1 animate-fade-in-up border-opacity-50 shadow-none`;
|
||||
const descriptionClassName = `${styles.text} dark:text-white`;
|
||||
|
||||
return (
|
||||
<Card className={cardClassName} onClick={data.onClick}>
|
||||
<div className="flex w-full">
|
||||
<CardContent className="m-0 p-2 w-full flex flex-row">
|
||||
<ArrowLeft className="w-6 h-6 text-muted-foreground inline-flex mr-1" />
|
||||
<div className="flex w-full h-full items-center justify-center">
|
||||
<CardContent className="m-0 p-2 w-full flex flex-row items-center justify-center">
|
||||
{convertSuggestionTitleToIconClass(data.title, data.color.toLowerCase())}
|
||||
<CardDescription
|
||||
className={`${descriptionClassName} sm:line-clamp-2 md:line-clamp-4 pt-1 break-words whitespace-pre-wrap max-w-full`}
|
||||
className={`${descriptionClassName} sm:line-clamp-2 md:line-clamp-4 pt-1 break-words whitespace-pre-wrap max-w-full text-center`}
|
||||
>
|
||||
{data.body}
|
||||
</CardDescription>
|
||||
<XCircle className="w-6 h-6 text-muted-foreground inline-flex ml-1" />
|
||||
</CardContent>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@@ -440,7 +440,7 @@ export const stepTwoSuggestion: { [key: string]: StepTwoSuggestion[] } = {
|
||||
prompt: "Find the main arguments in this document.",
|
||||
},
|
||||
{
|
||||
prompt: "Explain the relevance of this document to the topic at hand.",
|
||||
prompt: "Explain the relevance of this document to various other disciplines.",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user