feat: remove custom prompt display
This commit is contained in:
@@ -57,11 +57,7 @@ export const ChatHeader = () => {
|
||||
|
||||
<div className="relative z-10 flex h-full items-center justify-between px-4">
|
||||
<div className="mr-2 flex min-w-0 flex-1 items-center">
|
||||
<EditableTitle
|
||||
title={currentTitle}
|
||||
onSave={handleTitleSave}
|
||||
placeholder="Untitled Chat"
|
||||
/>
|
||||
<EditableTitle title={currentTitle} onSave={handleTitleSave} placeholder="New Chat" />
|
||||
</div>
|
||||
|
||||
{/* Right side - Actions */}
|
||||
|
||||
@@ -18,7 +18,6 @@ export const WelcomeScreen = ({ onSend }: WelcomeScreenProps) => {
|
||||
const mainEntryId = useMainEntryId()
|
||||
|
||||
const hasEntryContext = !!mainEntryId
|
||||
const hasCustomPrompt = aiSettings.personalizePrompt?.trim()
|
||||
const enabledShortcuts = aiSettings.shortcuts?.filter((shortcut) => shortcut.enabled) || []
|
||||
|
||||
return (
|
||||
@@ -59,8 +58,6 @@ export const WelcomeScreen = ({ onSend }: WelcomeScreenProps) => {
|
||||
key="default-welcome"
|
||||
onSend={onSend}
|
||||
shortcuts={enabledShortcuts}
|
||||
hasCustomPrompt={!!hasCustomPrompt}
|
||||
personalizePrompt={aiSettings.personalizePrompt}
|
||||
/>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
|
||||
-28
@@ -1,13 +1,9 @@
|
||||
import type { EditorState, LexicalEditor } from "lexical"
|
||||
import { m } from "motion/react"
|
||||
|
||||
import { useSettingModal } from "~/modules/settings/modal/use-setting-modal-hack"
|
||||
|
||||
interface DefaultWelcomeContentProps {
|
||||
onSend: (message: EditorState | string, editor: LexicalEditor | null) => void
|
||||
shortcuts: Array<{ id: string; name: string; prompt: string; enabled: boolean; hotkey?: string }>
|
||||
hasCustomPrompt?: boolean
|
||||
personalizePrompt?: string
|
||||
}
|
||||
|
||||
const DEFAULT_SHORTCUTS = [
|
||||
@@ -20,11 +16,7 @@ const DEFAULT_SHORTCUTS = [
|
||||
export const DefaultWelcomeContent: React.FC<DefaultWelcomeContentProps> = ({
|
||||
onSend,
|
||||
shortcuts: enabledShortcuts,
|
||||
hasCustomPrompt,
|
||||
personalizePrompt,
|
||||
}) => {
|
||||
const settingModalPresent = useSettingModal()
|
||||
|
||||
return (
|
||||
<m.div
|
||||
initial={{ opacity: 0, y: 20, scale: 0.98 }}
|
||||
@@ -32,9 +24,6 @@ export const DefaultWelcomeContent: React.FC<DefaultWelcomeContentProps> = ({
|
||||
exit={{ opacity: 0, y: -20, scale: 0.98 }}
|
||||
className="w-full space-y-8"
|
||||
>
|
||||
{/* Empty space placeholder for visual balance */}
|
||||
<div className="relative mx-auto h-36 max-w-2xl" />
|
||||
|
||||
<div className="relative flex flex-wrap items-center justify-center gap-2">
|
||||
{/* Custom shortcuts first */}
|
||||
{enabledShortcuts.slice(0, 6).map((shortcut, index) => (
|
||||
@@ -69,23 +58,6 @@ export const DefaultWelcomeContent: React.FC<DefaultWelcomeContentProps> = ({
|
||||
{suggestion}
|
||||
</m.button>
|
||||
))}
|
||||
|
||||
{hasCustomPrompt && personalizePrompt && (
|
||||
<div className="bg-material-medium border-border absolute -bottom-4 mx-auto mt-2 w-full max-w-2xl translate-y-full rounded-lg border p-3 text-left">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="text-text-secondary mb-1 text-xs font-medium">Personal Prompt:</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => settingModalPresent("ai")}
|
||||
className="text-text-tertiary hover:text-text-secondary flex size-5 items-center justify-center rounded transition-colors"
|
||||
title="Edit in Settings"
|
||||
>
|
||||
<i className="i-mgc-edit-cute-re size-3.5" />
|
||||
</button>
|
||||
</div>
|
||||
<p className="text-text-secondary text-xs leading-relaxed">{personalizePrompt}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</m.div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user