[PR #10094] feat: Use platform paste key for tips.tsx #13330

Closed
opened 2026-02-16 18:18:11 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10094

State: closed
Merged: No


Summary

This PR updates the Tips component to display the correct keyboard shortcut for pasting images based on the user's operating system.

Changes

  • Added platform detection using process.platform.
  • Introduced pasteKey constant that dynamically sets the shortcut:
    • macOS: Displays Cmd+V
    • Windows/Linux: Displays Ctrl+V (default)
  • Updated the specific tip string to use the dynamic {highlight}${pasteKey}{/highlight} variable.

How did you verify your code works?

image

closes https://github.com/anomalyco/opencode/issues/10082

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10094 **State:** closed **Merged:** No --- ### Summary This PR updates the Tips component to display the correct keyboard shortcut for pasting images based on the user's operating system. ### Changes - Added platform detection using process.platform. - Introduced pasteKey constant that dynamically sets the shortcut: - macOS: Displays Cmd+V - Windows/Linux: Displays Ctrl+V (default) - Updated the specific tip string to use the dynamic {highlight}${pasteKey}{/highlight} variable. ### How did you verify your code works? <img width="732" height="100" alt="image" src="https://github.com/user-attachments/assets/563f5cc4-4d2a-43c0-93a9-51cdc0d71ebf" /> closes https://github.com/anomalyco/opencode/issues/10082
yindo added the pull-request label 2026-02-16 18:18:11 -05:00
yindo closed this issue 2026-02-16 18:18:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13330