Skip to content

Commit 84f0883

Browse files
authored
Merge pull request #6382 from remix-project-org/joe-patch-013
Fix Remix AI Assistant style issues
2 parents ec5908e + 2ce1ae4 commit 84f0883

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

libs/remix-ui/remix-ai-assistant/src/components/contextOptMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function GroupListMenu(props: GroupListMenuProps) {
1515
{props.groupList.map((item, index) => (
1616
<button
1717
key={`${item.label}-${index}`}
18-
className="btn btn-light"
18+
className={`btn btn-light border border-0`}
1919
data-id={item.dataId}
2020
onClick={() => {
2121
props.setChoice(item.stateValue)

libs/remix-ui/remix-ai-assistant/src/components/prompt.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const PromptArea: React.FC<PromptAreaProps> = ({
118118
<div className="btn-group btn-group-sm" role="group">
119119
<button
120120
type="button"
121-
className={`btn ${aiMode === 'ask' ? 'btn-primary' : 'btn-outline-secondary'} px-2`}
121+
className={`btn btn-sm ${aiMode === 'ask' ? 'btn-primary' : 'btn-outline-secondary'} px-2`}
122122
onClick={() => {
123123
setAiMode('ask')
124124
_paq.push(['trackEvent', 'remixAI', 'ModeSwitch', 'ask'])
@@ -129,7 +129,7 @@ export const PromptArea: React.FC<PromptAreaProps> = ({
129129
</button>
130130
<button
131131
type="button"
132-
className={`btn ${aiMode === 'edit' ? 'btn-primary' : 'btn-outline-secondary'} px-2`}
132+
className={`btn btn-sm ${aiMode === 'edit' ? 'btn-primary' : 'btn-outline-secondary'} px-2`}
133133
onClick={() => {
134134
setAiMode('edit')
135135
_paq.push(['trackEvent', 'remixAI', 'ModeSwitch', 'edit'])

libs/remix-ui/remix-ai-assistant/src/components/remix-ui-remix-ai-assistant.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
5252
const [selectedModel, setSelectedModel] = useState<string | null>(null)
5353
const [isOllamaFailureFallback, setIsOllamaFailureFallback] = useState(false)
5454
const [aiMode, setAiMode] = useState<'ask' | 'edit'>('ask')
55+
const [themeTracker, setThemeTracker] = useState(null)
5556

5657
const historyRef = useRef<HTMLDivElement | null>(null)
5758
const modelBtnRef = useRef(null)
@@ -205,6 +206,15 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
205206
// fetchAssistantChoice()
206207
// }, [props.plugin])
207208

209+
useEffect(() => {
210+
props.plugin.on('theme', 'themeChanged', (theme) => {
211+
setThemeTracker(theme)
212+
})
213+
return () => {
214+
props.plugin.off('theme', 'themeChanged')
215+
}
216+
})
217+
208218
// bubble messages up to parent
209219
useEffect(() => {
210220
props.onMessagesChange?.(messages)

0 commit comments

Comments
 (0)