Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ui/desktop/src/components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export default function ChatInput({
useEffect(() => {
clearAlerts();

// Only show token alerts if we have loaded the real token limit
// Always show token alerts if we have loaded the real token limit and have tokens
if (isTokenLimitLoaded && tokenLimit && numTokens && numTokens > 0) {
if (numTokens >= tokenLimit) {
// Only show error alert when limit reached
Expand All @@ -409,6 +409,16 @@ export default function ChatInput({
},
});
}
} else if (isTokenLimitLoaded && tokenLimit) {
// Always show context window info even when no tokens are present (start of conversation)
addAlert({
type: AlertType.Info,
message: 'Context window',
progress: {
current: 0,
total: tokenLimit,
},
});
}

// Add tool count alert if we have the data
Expand Down
10 changes: 3 additions & 7 deletions ui/desktop/src/components/bottom_menu/BottomMenuAlertPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface AlertPopoverProps {

export default function BottomMenuAlertPopover({ alerts }: AlertPopoverProps) {
const [isOpen, setIsOpen] = useState(false);
const [hasShownInitial, setHasShownInitial] = useState(false);
const [isHovered, setIsHovered] = useState(false);
const [wasAutoShown, setWasAutoShown] = useState(false);
const [popoverPosition, setPopoverPosition] = useState({ top: 0, left: 0 });
Expand Down Expand Up @@ -116,17 +115,14 @@ export default function BottomMenuAlertPopover({ alerts }: AlertPopoverProps) {
// Only auto-show if any of the new/changed alerts have autoShow: true
const hasNewAutoShowAlert = changedAlerts.some((alert) => alert.autoShow === true);

// Auto show the popover only if:
// 1. There are new alerts that should auto-show AND
// 2. We haven't shown this specific alert before (tracked by hasShownInitial)
if (hasNewAutoShowAlert && !hasShownInitial) {
// Auto show the popover for new auto-show alerts
if (hasNewAutoShowAlert) {
setIsOpen(true);
setHasShownInitial(true);
setWasAutoShown(true);
// Start 3 second timer for auto-show
startHideTimer(3000);
}
}, [alerts, hasShownInitial, startHideTimer]);
}, [alerts, startHideTimer]);

// Handle auto-hide based on hover state changes
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion ui/desktop/src/components/bottom_menu/DirSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const DirSwitcher: React.FC<DirSwitcherProps> = ({
</div>
</button>
</TooltipTrigger>
<TooltipContent className="max-w-96 overflow-auto scrollbar-thin" side="top">
<TooltipContent side="top">
{window.appConfig.get('GOOSE_WORKING_DIR') as string}
</TooltipContent>
</Tooltip>
Expand Down
Loading