Skip to content

Commit

Permalink
small fix: scrollbar padding and others
Browse files Browse the repository at this point in the history
  • Loading branch information
weilirs committed Oct 22, 2024
1 parent 7991e69 commit 242e2a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/WritingAssistant/ConversationHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const ConversationHistory: React.FC<ConversationHistoryProps> = ({
Next
</button>
</div>
<div className="grow overflow-y-auto">
<div className="grow overflow-y-auto pr-2 scrollbar-thin scrollbar-track-gray-200 scrollbar-thumb-gray-400">
{currentConversation.map(
(message) =>
message.role === 'assistant' && (
Expand Down
4 changes: 3 additions & 1 deletion src/components/WritingAssistant/WritingAssistant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ const WritingAssistant: React.FC = () => {
: JSON.stringify(lastAssistantMessage.content)
}
const prompt = generatePromptString(option, selectedText, isSpaceTrigger, customPromptInput)
// setPrompts((prev) => [...prev, { option, customPromptInput }])
setPrevPrompt(prompt)
setIsNewConversation(true)
setIsOptionsVisible(false)
await getLLMResponse(prompt)
}

Expand Down Expand Up @@ -297,6 +297,7 @@ const WritingAssistant: React.FC = () => {
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleOption('custom', customPrompt)
setCustomPrompt('')
}
}}
/>
Expand Down Expand Up @@ -364,6 +365,7 @@ const WritingAssistant: React.FC = () => {
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleOption('custom', customPrompt)
setCustomPrompt('')
}
}}
/>
Expand Down
3 changes: 2 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default {
},
plugins: [
require('tailwind-scrollbar'),
require("tailwindcss-animate")
require("tailwindcss-animate"),
require('tailwind-scrollbar')
],
};

0 comments on commit 242e2a4

Please sign in to comment.