Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): send cited messages with Cmd+Enter #9307

Mergedextoci(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/9307/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 36 additions and 2 deletions (loading 2).

x
0 of 5 viewed, 5 left
10 additions and 0 deletionsapps/web/src/components/chat/AssistantCitationChip.tsxModified
View file
@@ -42,6 +42,7 @@
sourceAnchor?: AssistantCitationSourceAnchor | undefined;
onOpenChange: (open: boolean) => void;
onSave: (comment: string) => boolean;
+ onSaveAndSend?: (comment: string) => boolean;
};
}) {
const navigate = useNavigate();
@@ -158,6 +159,15 @@
commentEditor.onOpenChange(false);
return true;
+ {...(commentEditor.onSaveAndSend
+ ? {
+ onSubmitAndSend: (comment: string) => {
+ if (!commentEditor.onSaveAndSend?.(comment)) return false;
+ commentEditor.onOpenChange(false);
+ return true;
+ },
+ }
+ : {})}
onCancel={() => commentEditor.onOpenChange(false)}
</PopoverPopup>
16 additions and 2 deletionsapps/web/src/components/chat/AssistantCitationCommentEditor.tsxModified
View file
@@ -7,11 +7,13 @@