Increase user prompt history capacity and dropdown height

• History limit: 8 → 12 items
• Dropdown height: max-h-60 → max-h-96
• Better visibility for longer prompts
• Improved user experience
This commit is contained in:
yangdx 2025-09-26 10:27:03 +08:00
parent 683bbe9364
commit d5fe6bb33e
2 changed files with 4 additions and 4 deletions

View file

@ -165,7 +165,7 @@ export default function UserPromptInputWithHistory({
{/* Dropdown */}
{isOpen && history.length > 0 && (
<div className="absolute top-full left-0 right-0 z-50 mt-0.5 bg-gray-100 dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-auto min-w-0">
<div className="absolute top-full left-0 right-0 z-50 mt-0.5 bg-gray-100 dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-96 overflow-auto min-w-0">
{history.map((prompt, index) => (
<div
key={index}

View file

@ -220,9 +220,9 @@ const useSettingsStoreBase = create<SettingsState>()(
// Add to beginning
newHistory.unshift(prompt)
// Keep only last 8 items
if (newHistory.length > 8) {
newHistory.splice(8)
// Keep only last 12 items
if (newHistory.length > 12) {
newHistory.splice(12)
}
return { userPromptHistory: newHistory }