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
3 changes: 2 additions & 1 deletion ui/desktop/src/components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
trackCreateRecipeOpened,
trackEditRecipeOpened,
} from '../utils/analytics';
import { getNavigationShortcutText } from '../utils/keyboardShortcuts';

interface QueuedMessage {
id: string;
Expand Down Expand Up @@ -1212,7 +1213,7 @@ export default function ChatInput({
data-testid="chat-input"
autoFocus
id="dynamic-textarea"
placeholder={isRecording ? '' : '⌘↑/⌘↓ to navigate messages'}
placeholder={isRecording ? '' : getNavigationShortcutText()}
value={displayValue}
onChange={handleChange}
onCompositionStart={handleCompositionStart}
Expand Down
5 changes: 3 additions & 2 deletions ui/desktop/src/components/extensions/ExtensionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import { activateExtension } from '../settings/extensions';
import { useConfig } from '../ConfigContext';
import { SearchView } from '../conversation/SearchView';
import { getSearchShortcutText } from '../../utils/keyboardShortcuts';

export type ExtensionsViewOptions = {
deepLinkConfig?: ExtensionConfig;
Expand Down Expand Up @@ -101,8 +102,8 @@ export default function ExtensionsView({
</div>
<p className="text-sm text-text-muted mb-6">
These extensions use the Model Context Protocol (MCP). They can expand Goose's
capabilities using three main components: Prompts, Resources, and Tools. ⌘F/Ctrl+F to
search.
capabilities using three main components: Prompts, Resources, and Tools.{' '}
{getSearchShortcutText()} to search.
</p>

{/* Action Buttons */}
Expand Down
3 changes: 2 additions & 1 deletion ui/desktop/src/components/recipes/RecipesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
DropdownMenuTrigger,
DropdownMenuSeparator,
} from '../ui/dropdown-menu';
import { getSearchShortcutText } from '../../utils/keyboardShortcuts';

export default function RecipesView() {
const setView = useNavigation();
Expand Down Expand Up @@ -694,7 +695,7 @@ export default function RecipesView() {
</div>
<p className="text-sm text-text-muted mb-1">
View and manage your saved recipes to quickly start new sessions with predefined
configurations. ⌘F/Ctrl+F to search.
configurations. {getSearchShortcutText()} to search.
</p>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion ui/desktop/src/components/sessions/SessionListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
Session,
updateSessionName,
} from '../../api';
import { getSearchShortcutText } from '../../utils/keyboardShortcuts';

interface EditSessionModalProps {
session: Session | null;
Expand Down Expand Up @@ -740,7 +741,8 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(
</Button>
</div>
<p className="text-sm text-text-muted mb-4">
View and search your past conversations with Goose. ⌘F/Ctrl+F to search.
View and search your past conversations with Goose. {getSearchShortcutText()} to
search.
</p>
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions ui/desktop/src/utils/keyboardShortcuts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function isMac(): boolean {
return window.electron?.platform === 'darwin';
}

export function getNavigationShortcutText(): string {
return isMac() ? '⌘↑/⌘↓ to navigate messages' : 'Ctrl+↑/Ctrl+↓ to navigate messages';
}

export function getSearchShortcutText(): string {
return isMac() ? '⌘F' : 'Ctrl+F';
}