File tree Expand file tree Collapse file tree
docs/content.en/docs/release-notes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ Information about release notes of Coco Server is provided here.
2525- feat: add keyboard-only operation to history list #385
2626- feat: add error notification #386
2727- feat: add support for AI assistant #394
28- - feat: add support for AI assistant #394
2928- feat: add support for calculator function #399
3029
3130### Bug fix
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { ChevronsRight } from "lucide-react";
22import { FC } from "react" ;
33import clsx from "clsx" ;
44import { useTranslation } from "react-i18next" ;
5+ import { copyToClipboard } from "@/utils" ;
56
67interface CalculatorProps {
78 item : any ;
@@ -36,7 +37,12 @@ const Calculator: FC<CalculatorProps> = (props) => {
3637 } ;
3738
3839 return (
39- < div className = "flex items-center gap-1 w-full children:flex" >
40+ < div
41+ className = "flex items-center gap-1 w-full children:flex"
42+ onDoubleClick = { ( ) => {
43+ copyToClipboard ( result . value ) ;
44+ } }
45+ >
4046 { renderItem ( query . value , t ( `calculator.${ query . type } ` ) ) }
4147
4248 < ChevronsRight className = "text-[#999999] size-5" />
Original file line number Diff line number Diff line change 1- import { useClickAway , useCreation , useReactive } from "ahooks" ;
1+ import {
2+ useClickAway ,
3+ useCreation ,
4+ useEventListener ,
5+ useReactive ,
6+ } from "ahooks" ;
27import clsx from "clsx" ;
38import { isNil , noop } from "lodash-es" ;
49import { Copy , Link , SquareArrowOutUpRight } from "lucide-react" ;
@@ -152,6 +157,12 @@ const ContextMenu = ({ hideCoco }: ContextMenuProps) => {
152157 handleClick ( item ?. clickEvent ) ;
153158 } ) ;
154159
160+ useEventListener ( "keydown" , ( event ) => {
161+ if ( ! visibleContextMenu ) return ;
162+
163+ event . stopImmediatePropagation ( ) ;
164+ } ) ;
165+
155166 const handleClick = ( click = noop ) => {
156167 click ?.( ) ;
157168
You can’t perform that action at this time.
0 commit comments