MCPcopy Index your code
hub / github.com/continuedev/continue / handleKeyUp

Function handleKeyUp

gui/src/components/History/HistoryTableRow.tsx:57–78  ·  view source on GitHub ↗
(e: React.KeyboardEvent<HTMLInputElement>)

Source from the content-addressed store, hash-verified

55 };
56
57 const handleKeyUp = async (e: React.KeyboardEvent<HTMLInputElement>) => {
58 if (e.key === "Enter") {
59 if (sessionTitleEditValue !== sessionMetadata.title) {
60 // imperfect solution of loading session just to update it
61 // but fine for now, pretty low latency
62 const currentSession = await getSession(
63 ideMessenger,
64 sessionMetadata.sessionId,
65 );
66 await dispatch(
67 updateSession({
68 ...currentSession,
69 title: sessionTitleEditValue,
70 }),
71 );
72 }
73 setEditing(false);
74 } else if (e.key === "Escape") {
75 setSessionTitleEditValue(sessionMetadata.title);
76 setEditing(false);
77 }
78 };
79
80 return (
81 <tr

Callers 1

HistoryTableRowFunction · 0.70

Calls 1

getSessionFunction · 0.90

Tested by

no test coverage detected