Skip to content

feat (ai): opus + hotkeys#887

Merged
ehayes2000 merged 7 commits intomainfrom
opus-maxing
Jan 9, 2026
Merged

feat (ai): opus + hotkeys#887
ehayes2000 merged 7 commits intomainfrom
opus-maxing

Conversation

@ehayes2000
Copy link
Copy Markdown
Contributor

No description provided.

@ehayes2000 ehayes2000 requested review from a team as code owners January 9, 2026 17:28
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 9, 2026

@ehayes2000 ehayes2000 changed the base branch from main to opus-maxing-backend January 9, 2026 17:40
scopeId,
hotkey: 'ctrl+c',
condition: () =>
Boolean(bigChatOpen() || isRightPanelOpen()) && Boolean(stream()),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my stance is that we shouldn't set unnecessary conditions. I think they are best used for situations where you would not want to surface the hotkey to users unless certain conditions are met. i think you can remove all of these. what I'd do instead, is, if there is not stream, have the keyDownHandler return false, so that it doesn't capture the keypress.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gtk + done


createEffect(() => {
console.log('activescope', activeScope());
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove log

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

const handleKeyUp = (e: KeyboardEvent) => {
if (e.key === 'Meta') setIsMetaHeld(false);
if (e.key === 'Control') setIsCtrlHeld(false);
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a pressedKeys() signal that you can use to see what keys are currently pressed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

} else {
sendMessage();
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should just be a registered hotkeys?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is directly attached to an md area and it's a bit annoying to rewrite as a hotkey. I'd rather not change this.

Base automatically changed from opus-maxing-backend to main January 9, 2026 21:36
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jan 9, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jan 9, 2026

Code review

I found one issue that needs attention:

Issue: Cmd/Ctrl+Enter shortcut broken on Windows and Linux

Location: js/app/packages/core/component/AI/component/input/useChatInput.tsx line 203

Problem: The handleEnter function checks only e.metaKey to determine if the Opus model should be used when sending a message. This works correctly on macOS (⌘+Enter), but on Windows and Linux, e.metaKey corresponds to the Windows/Super key, not Ctrl.

The UI correctly displays "Ctrl + Enter" on non-Mac platforms via modifierMap.cmd, but pressing Ctrl+Enter won't trigger the Opus model because the keyboard event handler doesn't adapt to the platform.

Evidence: The codebase has an established cross-platform pattern that should be used here. Examples:

Suggested fix:

Change line 203 from:

if (e.metaKey) {

To:

if (IS_MAC ? e.metaKey : e.ctrlKey) {

This requires importing IS_MAC at the top of the file:

import { IS_MAC } from '@core/constant/isMac';

✅ No CLAUDE.md violations found. Checked for adherence to coding standards and guidelines.

class="flex items-center gap-1.5"
classList={{
'text-accent': isMetaHeld(),
'text-accent': pressedKeys().has("ctrl"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe this should be "cmd"

@ehayes2000 ehayes2000 merged commit 2905df5 into main Jan 9, 2026
23 checks passed
@ehayes2000 ehayes2000 deleted the opus-maxing branch January 9, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants