Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

chore: enhance toggle agent mode

Faisal Amir585035dd3e5f
diff --git a/web-app/src/containers/ChatInput.tsx b/web-app/src/containers/ChatInput.tsx
index 012b81a1c..61158d7b1 100644
--- a/web-app/src/containers/ChatInput.tsx
+++ b/web-app/src/containers/ChatInput.tsx
@@ -31,8 +31,8 @@ import {
IconWorld,
IconBrandChrome,
IconUser,
- IconRobot,
} from '@tabler/icons-react'
+import { BotIcon } from 'lucide-react'
import { useTranslation } from '@/i18n/react-i18next-compat'
import { useGeneralSetting } from '@/hooks/useGeneralSetting'
import { useModelProvider } from '@/hooks/useModelProvider'
@@ -1783,17 +1783,16 @@ const ChatInput = memo(function ChatInput({
<Tooltip>
<TooltipTrigger asChild>
<Button
- variant="ghost"
+ variant={isAgentMode ? "default" : "ghost"}
size="icon-xs"
onClick={handleAgentToggle}
className={cn(
- isAgentMode && 'text-primary'
+ isAgentMode && 'text-primary bg-primary/10 hover:bg-primary/10 items-center'
)}
>
- <IconRobot
- size={18}
+ <BotIcon
className={cn(
- 'text-muted-foreground',
+ 'text-muted-foreground -mt-0.5',
isAgentMode && 'text-primary'
)}
/>
diff --git a/web-app/src/containers/DropdownModelProvider.tsx b/web-app/src/containers/DropdownModelProvider.tsx
index 189cb2c79..a3bd54fdc 100644
--- a/web-app/src/containers/DropdownModelProvider.tsx
+++ b/web-app/src/containers/DropdownModelProvider.tsx
@@ -26,7 +26,7 @@ import { getLastUsedModel } from '@/utils/getModelToStart'
import { syncModelToOpenClaw } from '@/utils/openclaw'
import { ChevronsUpDown } from 'lucide-react'
import { useAgentMode } from '@/hooks/useAgentMode'
-import { IconRobot } from '@tabler/icons-react'
+import { BotIcon } from 'lucide-react'
import { TEMPORARY_CHAT_ID } from '@/constants/chat'
type DropdownModelProviderProps = {
@@ -487,7 +487,7 @@ const DropdownModelProvider = memo(function DropdownModelProvider({
if (isAgentMode) {
return (
<div className="border relative z-20 px-4 py-1.5 flex items-center gap-1.5 rounded-full text-muted-foreground">
- <IconRobot size={16} className="shrink-0" />
+ <BotIcon className="shrink-0 size-4" />
<span className="text-sm font-medium leading-normal">
OpenClaw Agent
</span>